diff --git a/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart b/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart index 5a7fedd2..4fcae8ab 100644 --- a/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart +++ b/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart @@ -94,7 +94,7 @@ class AllergyReactionDTOs { this.pomrid, this.patientID, this.allergyReactionMappingID, - this.severity + this.severity =1 }); AllergyReactionDTOs.fromJson(Map json) { diff --git a/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart b/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart index d2e30e4e..ce84f58b 100644 --- a/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart +++ b/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart @@ -91,7 +91,7 @@ class PatientsAllergyReactionsDTOs { this.patientID, this.patientsAllergyReactionRevisionID, this.pomrId, - this.severity, + this.severity =1, this.isSelected, this.reactionSelection }); diff --git a/lib/core/service/patient_medical_file/soap/SOAP_service.dart b/lib/core/service/patient_medical_file/soap/SOAP_service.dart index 949fe0ff..dd43153a 100644 --- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart +++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart @@ -465,6 +465,7 @@ class SOAPService extends LookupService { value.patientID = patientInfo.patientMRN; value.pomrid = int.parse(patientInfo.pomrId!); value.allergyReactionMappingID = 1; + value.severity = value.severity ?? 1; }); } @@ -487,7 +488,6 @@ class SOAPService extends LookupService { "allergyID": allergy.allergyID, "allergyName": allergy.allergyName, "allergyTypeID": allergy.allergyTypeID, - "setupId": await sharedPref.getString(DOCTOR_SETUP_ID) }; if(isNoKnown){ @@ -510,7 +510,8 @@ class SOAPService extends LookupService { hasError = true; super.error = error; }, body: { - "listProgNotePatientAllergyDiseaseVM": [request] + "listProgNotePatientAllergyDiseaseVM": [request], + "setupId": await sharedPref.getString(DOCTOR_SETUP_ID) }); } @@ -686,9 +687,11 @@ class SOAPService extends LookupService { "appointmentNo": patient.appointmentNo, "pomrId": patient.pomrId, "patientMRN": patient.patientMRN, - "chiefComplaint": cheifComplaint + "chiefComplaint": cheifComplaint, + } - ] + ], + "setupId":await sharedPref.getString(DOCTOR_SETUP_ID) }; hasError = false; await baseAppClient.post(POST_CHIEF_COMPLAINT_VP, @@ -1403,7 +1406,8 @@ class SOAPService extends LookupService { "PatientMRN": patient.patientMRN, "PatientName": patient.firstName! + ' ' + patient.lastName!, "addedChiefComplaintCreateDtos": [], - "removedChiefComplaintIds": [chiefComplaint.chiefComplainId] + "removedChiefComplaintIds": [chiefComplaint.chiefComplainId], + "setupId": await sharedPref.getString(DOCTOR_SETUP_ID), }; hasError = false; await baseAppClient.post(UPDATE_CHIEF_COMPLAINT, @@ -1421,6 +1425,7 @@ class SOAPService extends LookupService { Map request = { "patientId": patient.patientId, "clinicId": patient.clinicId, + "setupId": await sharedPref.getString(DOCTOR_SETUP_ID), }; hasError = false; await baseAppClient.post(EPISODE_BY_CHIEF_COMPLAINT, diff --git a/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart b/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart index 9dac5c7a..6f4f348c 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; +import 'package:doctor_app_flutter/utils/extenstions_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -128,7 +129,7 @@ class _ReactionsSelectionAllergiesWidgetState groupValue: widget .mySelectedAllergy! .allergyReactionDTOs![index] - .severity, + .severity ?? 1, onChanged: (value) { widget .mySelectedAllergy! @@ -521,7 +522,7 @@ class _ReactionsSelectionAllergiesWidgetState allergyReactionMappingID:i.allergyReactionMappingID, allergyReactionID:i.allergyReactionID, allergyReactionName: i.allergyReactionName, - severity:i.severity, + severity:i.severity ??1 )); }