|
|
|
@ -68,14 +68,15 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
|
|
|
|
|
PatiantInformtion _selectedPatient;
|
|
|
|
|
|
|
|
|
|
Future<Map> getPatientList(PatientModel patient, patientType) async {
|
|
|
|
|
getPatientList(PatientModel patient, patientType) async {
|
|
|
|
|
int val = int.parse(patientType);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await BaseAppClient.post( SERVICES_PATIANT[val],
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
return Future.value(response);
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
var localResponse ;
|
|
|
|
|
await BaseAppClient.post( 'DoctorApplication.svc/REST/'+SERVICES_PATIANT[val],
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) async{
|
|
|
|
|
localResponse = response;
|
|
|
|
|
}, onFailure: (String error, int statusCode) async{
|
|
|
|
|
throw error;
|
|
|
|
|
}, body: {
|
|
|
|
|
"ProjectID": patient.ProjectID,
|
|
|
|
@ -99,9 +100,12 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
|
|
|
|
|
"PatientOutSA": patient.PatientOutSA
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return localResponse;
|
|
|
|
|
} catch (err) {
|
|
|
|
|
handelCatchErrorCase(error);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setBasicData() {
|
|
|
|
@ -138,11 +142,15 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
a.vitalSignDate.microsecondsSinceEpoch;
|
|
|
|
|
});
|
|
|
|
|
patientVitalSignOrderdSubList.clear();
|
|
|
|
|
for (int x = 0; x < 20; x++) {
|
|
|
|
|
int length = patientVitalSignOrderdSubListTemp.length >= 20 ? 20 : patientVitalSignOrderdSubListTemp.length;
|
|
|
|
|
for (int x = 0; x < length; x++) {
|
|
|
|
|
patientVitalSignOrderdSubList
|
|
|
|
|
.add(patientVitalSignOrderdSubListTemp[x]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -174,6 +182,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
response['List_GetLabOreders'].forEach((v) {
|
|
|
|
|
patientLabResultOrdersList.add(new LabOrdersResModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -203,6 +214,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
patientPrescriptionsList
|
|
|
|
|
.add(new PrescriptionResModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -300,6 +314,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
response['List_GetRadOreders'].forEach((v) {
|
|
|
|
|
patientRadiologyList.add(new RadiologyResModel.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -343,6 +360,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
await BaseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
insuranceApporvalsList = response['List_ApprovalMain_InPatient'];
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -367,6 +387,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
await BaseAppClient.post(PATIENT_PROGRESS_NOTE_URL,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
patientProgressNoteList = response['List_GetPregressNoteForInPatient'];
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -391,6 +414,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
await BaseAppClient.post(PATIENT_GET_DOCTOR_BY_CLINIC_URL,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
doctorsList = response['List_Doctors_All'];
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -421,6 +447,9 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
await BaseAppClient.post(PATIENT_GET_CLINIC_BY_PROJECT_URL,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
clinicsList = response['List_Clinic_All'];
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
@ -446,13 +475,15 @@ class PatientsProvider with ChangeNotifier {
|
|
|
|
|
*@desc: getReferralFrequancyList
|
|
|
|
|
*/
|
|
|
|
|
getReferralFrequancyList() async {
|
|
|
|
|
String token = await sharedPref.getString(TOKEN);
|
|
|
|
|
setBasicData();
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
await BaseAppClient.post(PATIENT_GET_LIST_REFERAL_URL,
|
|
|
|
|
onSuccess: (dynamic response, int statusCode) {
|
|
|
|
|
referalFrequancyList = response['list_STPReferralFrequency'];
|
|
|
|
|
isLoading = false;
|
|
|
|
|
isError = false;
|
|
|
|
|
this.error = '';
|
|
|
|
|
},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
isLoading = false;
|
|
|
|
|