From 01f32a39f67ddb0c930fe0635c1ce716fc91d0c3 Mon Sep 17 00:00:00 2001 From: Mohammad ALjammal Date: Wed, 3 Jun 2020 10:42:30 +0300 Subject: [PATCH] fix master --- lib/providers/patients_provider.dart | 106 ++++++++++++--------------- 1 file changed, 48 insertions(+), 58 deletions(-) diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index 464835cc..8b84420a 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -34,15 +34,15 @@ class PatientsProvider with ChangeNotifier { List patientLabResultOrdersList = []; List patientPrescriptionsList = []; List patientRadiologyList = []; -<<<<<<< HEAD + /*@author: ibrahe albitar *@Date:2/6/2020 *@desc: getPatientPrescriptions */ -======= + List labResultList = []; ->>>>>>> 4afca06aec89273155b264baea03db8fc2a9051d + var patientProgressNoteList = []; var insuranceApporvalsList = []; @@ -144,9 +144,7 @@ class PatientsProvider with ChangeNotifier { patientVitalSignOrderdSubList .add(patientVitalSignOrderdSubListTemp[x]); } - var asd = ""; } - // patientVitalSignList = res['List_DoctorPatientVitalSign']; } else { isError = true; error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; @@ -312,53 +310,6 @@ class PatientsProvider with ChangeNotifier { } } -<<<<<<< HEAD -/*@author: ibrahe albitar - *@Date:2/6/2020 - *@desc: getPatientPrescriptions - */ - getPatientProgressNote(patient) async{ -======= - getPatientProgressNote(patient) async { ->>>>>>> 4afca06aec89273155b264baea03db8fc2a9051d - setBasicData(); - try { - if (await Helpers.checkConnection()) { - final response = await AppClient.post(PATIENT_PROGRESS_NOTE_URL, - body: json.encode(patient)); - final int statusCode = response.statusCode; - isLoading = false; - - if (statusCode < 200 || statusCode >= 400 || json == null) { - isError = true; - error = 'Error While Fetching data'; - } else { - var res = json.decode(response.body); - print('$res'); - if (res['MessageStatus'] == 1) { - patientProgressNoteList = res['List_GetPregressNoteForInPatient']; - } else { - isError = true; - error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; - } - } - } else { - isLoading = false; - isError = true; - error = 'Please Check The Internet Connection'; - } - notifyListeners(); - } catch (err) { - handelCatchErrorCase(err); - } - } -<<<<<<< HEAD -/*@author: ibrahe albitar - *@Date:2/6/2020 - *@desc: getPatientPrescriptions - */ - getPatientInsuranceApprovals(patient) async{ -======= getLabResult(LabOrdersResModel labOrdersResModel) async { labResultList.clear(); @@ -369,7 +320,8 @@ class PatientsProvider with ChangeNotifier { requestLabResult.orderNo = labOrdersResModel.orderNo; requestLabResult.invoiceNo = labOrdersResModel.invoiceNo; requestLabResult.patientTypeID = labOrdersResModel.patientType; - await BaseAppClient.post('DoctorApplication.svc/REST/GetPatientLabResults', + await BaseAppClient.post( + 'DoctorApplication.svc/REST/GetPatientLabResults', onSuccess: (dynamic response, int statusCode) { isError = false; isLoading = false; @@ -377,14 +329,13 @@ class PatientsProvider with ChangeNotifier { labResultList.add(new LabResult.fromJson(v)); }); }, onFailure: (String error, int statusCode) { - isError = true; - isLoading = false; - this.error = error; - }, body: requestLabResult.toJson()); + isError = true; + isLoading = false; + this.error = error; + }, body: requestLabResult.toJson()); notifyListeners(); } ->>>>>>> 4afca06aec89273155b264baea03db8fc2a9051d getPatientInsuranceApprovals(patient) async { setBasicData(); @@ -420,5 +371,44 @@ class PatientsProvider with ChangeNotifier { } } +/*@author: ibrahe albitar + *@Date:2/6/2020 + *@desc: getPatientPrescriptions + */ + getPatientProgressNote(patient) async { + setBasicData(); + try { + if (await Helpers.checkConnection()) { + final response = await AppClient.post(PATIENT_PROGRESS_NOTE_URL, + body: json.encode(patient)); + final int statusCode = response.statusCode; + isLoading = false; + + if (statusCode < 200 || statusCode >= 400 || json == null) { + isError = true; + error = 'Error While Fetching data'; + } else { + var res = json.decode(response.body); + print('$res'); + if (res['MessageStatus'] == 1) { + patientProgressNoteList = res['List_GetPregressNoteForInPatient']; + } else { + isError = true; + error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; + } + } + } else { + isLoading = false; + isError = true; + error = 'Please Check The Internet Connection'; + } + notifyListeners(); + } catch (err) { + handelCatchErrorCase(err); + } + } + + + }