WD: SETUP ID ADDED

ipd-changes-for-vida-plus
taha.alam 2 years ago
parent ad29dd41f4
commit 3af6248d13

@ -67,10 +67,12 @@ class SOAPService extends LookupService {
List<GetHopiDetails> hopiDetails = [];
List<GetChiefComplaintVidaPlus> patientChiefComplaintListVidaPlus = [];
List<SearchChiefComplaint> searchChiefComplaintListVidaPlus = [];
List<EpisodeByChiefComplaintVidaPlus> episodeByChiefComplaintListVidaPlus = [];
List<EpisodeByChiefComplaintVidaPlus> episodeByChiefComplaintListVidaPlus =
[];
List<GetHomeMedicationList> getHomeMedicationList = [];
List<GetSearchCurrentMedication> getSearchCurrentMedication = [];
List<GetSearchCurrentMedicationDetails> getSearchCurrentMedicationDetails = [];
List<GetSearchCurrentMedicationDetails> getSearchCurrentMedicationDetails =
[];
List<PatientPreviousDiagnosis> patientPreviousDiagnosisList = [];
List<PatientPreviousDiagnosis> patientDiagnosisList = [];
List<FavoriteDiseaseDetails> favoriteDiagnosisDetailsList = [];
@ -412,7 +414,6 @@ class SOAPService extends LookupService {
}, body: request);
}
Future getEditAllergies(int allergyId) async {
hasError = false;
@ -427,10 +428,12 @@ class SOAPService extends LookupService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {"allergyId": allergyId, "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)});
}, body: {
"allergyId": allergyId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
});
}
Future searchAllergies(String searchKey) async {
hasError = false;
@ -492,10 +495,8 @@ class SOAPService extends LookupService {
Future resolveAllergies(
PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async {
/*changed request parameters based on the vida plus requested */
var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
List<PatientsAllergyReactionsDTOs>? reaction =
allergy.patientsAllergyReactionsDTOs!;
@ -543,7 +544,6 @@ class SOAPService extends LookupService {
Future updateAllergies(
PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async {
var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
List<PatientsAllergyReactionsDTOs>? reaction =
allergy.patientsAllergyReactionsDTOs!;
@ -645,7 +645,8 @@ class SOAPService extends LookupService {
patientChiefComplaintListVidaPlus.clear();
response['ListChiefComplaintDetails']['resultData'].forEach((v) {
patientChiefComplaintListVidaPlus.add(GetChiefComplaintVidaPlus.fromJson(v));
patientChiefComplaintListVidaPlus
.add(GetChiefComplaintVidaPlus.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -770,9 +771,11 @@ class SOAPService extends LookupService {
PatiantInformtion patient,
String patientProblemRevisionID,
) async {
print('the setup id is ${await sharedPref.getString(DOCTOR_SETUP_ID)}');
Map<String, dynamic> request = {
"patientProblemRevisionId": patientProblemRevisionID,
"ProjectID": patient.projectId
"ProjectID": patient.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
};
hasError = false;
auditDiagnosislist.clear();
@ -858,13 +861,15 @@ class SOAPService extends LookupService {
// "patientId": patientInfo.patientId,
// "problemId": problemId,
// "deletedRemarks": deletedRemarks,
// "ProjectID": patientInfo.projectId
// "ProjectID": patientInfo.projectId,
// "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
//todo just for the test as the create diagnosis is still not working
"patientProblemId": 13691,
"patientId": 70010986,
"problemId": 41698,
"deletedRemarks": "kethees test",
"ProjectID": 313
"ProjectID": 313,
"setupId": 105
};
hasError = false;
patientPreviousDiagnosisList.clear();
@ -924,7 +929,8 @@ class SOAPService extends LookupService {
"pomrId": patientInfo.pomrId,
"hospitalId": patientInfo.projectId,
"hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"ProjectID": patientInfo.projectId
"ProjectID": patientInfo.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
};
hasError = false;
patientPhysicalExaminationList.clear();
@ -948,6 +954,7 @@ class SOAPService extends LookupService {
Map<String, dynamic> request = {
"ProjectID": patientInfo.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"listCreatPhysicalExam": jsonListOfPhysicalExamination
};
hasError = false;
@ -1190,6 +1197,7 @@ class SOAPService extends LookupService {
"appointmentId": diagnosis.appointmentId,
"problemId": diagnosis.problemId,
"diagnosisType": diagnosis.diagnosisType,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
};
var success = false;
await baseAppClient.post(RESOLVE_DIAGNOSIS,
@ -1216,9 +1224,8 @@ class SOAPService extends LookupService {
var success = false;
await baseAppClient.post(GET_CLINIC,
onSuccess: (dynamic response, int statusCode) {
response['ListDoctorClinics'].forEach((v) =>
v['categories'].forEach(
(cat) => clinicsList.add(Clinic.fromJson(cat))));
response['ListDoctorClinics'].forEach((v) => v['categories']
.forEach((cat) => clinicsList.add(Clinic.fromJson(cat))));
success = false;
}, onFailure: (String error, int statusCode) {
success = false;
@ -1229,15 +1236,16 @@ class SOAPService extends LookupService {
return success;
}
continueEpisodeVidaPlus(
PatiantInformtion patient, List<PatientPomrs> chiefComplaint) async {
List<Map<String, dynamic>> chiefComplaintList = [];
chiefComplaint.forEach((action) {
action.chiefComplains!.forEach((action2) {
chiefComplaintList.add({"chiefComplain": action2.chiefComplain,"chiefComplainTemplateId": action!.chiefComplainTemplateId});
chiefComplaintList.add({
"chiefComplain": action2.chiefComplain,
"chiefComplainTemplateId": action!.chiefComplainTemplateId
});
});
});
Map<String, dynamic> request = {
@ -1245,7 +1253,6 @@ class SOAPService extends LookupService {
"projectId": patient.projectId,
"setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
"chiefComplain": chiefComplaintList
};
hasError = false;
await baseAppClient.post(CONTINUE_EPISODE_VP,
@ -1257,31 +1264,29 @@ class SOAPService extends LookupService {
}, body: request);
}
updateChiefComplaintVidaPlus(
PatiantInformtion patient, GetChiefComplaintVidaPlus chiefComplaint) async {
updateChiefComplaintVidaPlus(PatiantInformtion patient,
GetChiefComplaintVidaPlus chiefComplaint) async {
Map<String, dynamic> request = {
"AppointmentNo": patient.appointmentNo,
"pomrId": patient.pomrId,
"PatientMRN": patient.patientMRN,
"PatientName": patient.firstName! + ' ' + patient.lastName!,
"addedChiefComplaintCreateDtos": [
],
"addedChiefComplaintCreateDtos": [],
"removedChiefComplaintIds": [chiefComplaint.chiefComplainId]
};
hasError = false;
await baseAppClient.post(UPDATE_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
DrAppToastMsg.showErrorToast(response['List_UpdateChiefComplaint']['message']);
DrAppToastMsg.showErrorToast(
response['List_UpdateChiefComplaint']['message']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: request);
}
episodeByChiefComplaint(
PatiantInformtion patient) async {
episodeByChiefComplaint(PatiantInformtion patient) async {
Map<String, dynamic> request = {
"patientId": patient.patientId,
"clinicId": patient.clinicId,
@ -1292,7 +1297,8 @@ class SOAPService extends LookupService {
episodeByChiefComplaintListVidaPlus.clear();
response['EpisodeByChiefcomplaint']['resultData'].forEach((v) {
episodeByChiefComplaintListVidaPlus.add(EpisodeByChiefComplaintVidaPlus.fromJson(v));
episodeByChiefComplaintListVidaPlus
.add(EpisodeByChiefComplaintVidaPlus.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -1300,8 +1306,7 @@ class SOAPService extends LookupService {
}, body: request);
}
getHomeMedication(
PatiantInformtion patient) async {
getHomeMedication(PatiantInformtion patient) async {
Map<String, dynamic> request = {
"patientId": patient.patientId,
};
@ -1318,12 +1323,8 @@ class SOAPService extends LookupService {
}, body: request);
}
searchCurrentMedication(
String query
) async {
Map<String, dynamic> request = {
"SearchKey": query
};
searchCurrentMedication(String query) async {
Map<String, dynamic> request = {"SearchKey": query};
hasError = false;
await baseAppClient.post(SEARCH_CURRENT_MEDICATION,
onSuccess: (dynamic response, int statusCode) {
@ -1337,19 +1338,15 @@ class SOAPService extends LookupService {
}, body: request);
}
getCurrentMedicationDetails(
String id
) async {
Map<String, dynamic> request = {
"genericFormularyId": id
};
getCurrentMedicationDetails(String id) async {
Map<String, dynamic> request = {"genericFormularyId": id};
hasError = false;
await baseAppClient.post(SEARCH_CURRENT_MEDICATION_DETAILS,
onSuccess: (dynamic response, int statusCode) {
getSearchCurrentMedicationDetails.clear();
response['ListFormularyMaster']['resultData'].forEach((v) {
getSearchCurrentMedicationDetails.add(GetSearchCurrentMedicationDetails.fromJson(v));
getSearchCurrentMedicationDetails
.add(GetSearchCurrentMedicationDetails.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -1357,18 +1354,13 @@ class SOAPService extends LookupService {
}, body: request);
}
removeCurrentMedicationVidaPlus(
String medicationID) async {
Map<String, dynamic> request = {
"homeMedicationId":medicationID
};
removeCurrentMedicationVidaPlus(String medicationID) async {
Map<String, dynamic> request = {"homeMedicationId": medicationID};
hasError = false;
await baseAppClient.post(REMOVE_CURRENT_MEDICATION,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: request);
@ -1376,7 +1368,6 @@ class SOAPService extends LookupService {
addCurrentMedicationVidaPlus(
Map<String, dynamic> request, PatiantInformtion patientInfo) async {
var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
Map<String, dynamic> genericRequest = {
@ -1396,13 +1387,10 @@ class SOAPService extends LookupService {
..addAll(genericRequest);
hasError = false;
await baseAppClient.post(ADD_CURRENT_MEDICATION,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: finalRequest);
}
}

Loading…
Cancel
Save