|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
|
|
|
import '../base_service.dart';
|
|
|
|
|
|
|
|
class AmService extends BaseService {
|
|
|
|
List<PatientER_RRT_GetAllTransportationMethodListModel> amModelList = List();
|
|
|
|
List<PatientAllPresOrders> patientAllPresOrdersList = List();
|
|
|
|
|
|
|
|
Future getAllTransportationOrders() async {
|
|
|
|
hasError = false;
|
|
|
|
await baseAppClient.post(GET_AMBULANCE_REQUEST,
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
amModelList.clear();
|
|
|
|
response['AmModelList'].forEach((vital) {
|
|
|
|
amModelList.add(
|
|
|
|
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital));
|
|
|
|
});
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
}, body: Map());
|
|
|
|
}
|
|
|
|
|
|
|
|
Future getPatientAllPresOrdersList() async {
|
|
|
|
hasError = false;
|
|
|
|
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
patientAllPresOrdersList.clear();
|
|
|
|
response['PatientER_GetPatientAllPresOrdersList'].forEach((vital) {
|
|
|
|
patientAllPresOrdersList.add(PatientAllPresOrders.fromJson(vital));
|
|
|
|
});
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
hasError = true;
|
|
|
|
super.error = error;
|
|
|
|
}, body: Map());
|
|
|
|
}
|
|
|
|
}
|