diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index 6f51fa40..e14eb6f2 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -372,7 +372,7 @@ class _AddAssessmentDetailsState extends State { ), ), ), - bottomSheet: Container( + bottomSheet: model.state == ViewState.Busy?Container(height: 0,):Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index 47165896..4622bc94 100644 --- a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -71,6 +71,38 @@ class _UpdatePlanPageState extends State { } } + + getPatientProgressNote(model, {bool isAddProgress = false}) async { + GetGetProgressNoteReqModel getGetProgressNoteReqModel = + GetGetProgressNoteReqModel( + appointmentNo: + int.parse(widget.patientInfo.appointmentNo.toString()), + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo.toString(), + editedBy: '', + doctorID: ''); + await model.getPatientProgressNote(getGetProgressNoteReqModel); + + if (model.patientProgressNoteList.isNotEmpty) { + progressNoteController.text = Helpers.parseHtmlString( + model.patientProgressNoteList[0].planNote); + patientProgressNote.planNote = progressNoteController.text; + patientProgressNote.createdByName = + model.patientProgressNoteList[0].createdByName; + patientProgressNote.createdOn = + model.patientProgressNoteList[0].createdOn; + patientProgressNote.editedOn = + model.patientProgressNoteList[0].editedOn; + patientProgressNote.editedByName = + model.patientProgressNoteList[0].editedByName; + patientProgressNote.appointmentNo = + model.patientProgressNoteList[0].appointmentNo; + setState(() { + isAddProgress = isAddProgress; + }); + } + } + @override Widget build(BuildContext context) { return BaseView( @@ -210,22 +242,22 @@ class _UpdatePlanPageState extends State { ), Row( mainAxisAlignment: - MainAxisAlignment.spaceBetween, + MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - children: [ - AppText( - 'Condition: ', - fontSize: 12, - ), - AppText( - patientProgressNote.mName ?? - '', - fontWeight: FontWeight.w600), - ], - ), + // Row( + // children: [ + // AppText( + // 'Condition: ', + // fontSize: 12, + // ), + // AppText( + // patientProgressNote.mName ?? + // '', + // fontWeight: FontWeight.w600), + // ], + // ), AppText( patientProgressNote.createdOn != null @@ -326,21 +358,6 @@ class _UpdatePlanPageState extends State { onPressed: () async { if (progressNoteController.text.isNotEmpty) { if (isAddProgress) { - Map profile = - await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = - DoctorProfileModel.fromJson(profile); - setState(() { - patientProgressNote.createdByName = - patientProgressNote.createdByName ?? - doctorProfile.doctorName; - patientProgressNote.editedByName = - doctorProfile.doctorName; - patientProgressNote.createdOn = - DateTime.now().toString(); - patientProgressNote.planNote = - progressNoteController.text; - }); submitPlan(model); } else { Navigator.of(context).pop(); @@ -391,10 +408,35 @@ class _UpdatePlanPageState extends State { if (model.state == ViewState.ErrorLocal) { Helpers.showErrorToast(model.error); } else { - setState(() { - isAddProgress = !isAddProgress; - }); + GetGetProgressNoteReqModel getGetProgressNoteReqModel = + GetGetProgressNoteReqModel( + appointmentNo: + int.parse(widget.patientInfo.appointmentNo.toString()), + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo.toString(), + editedBy: '', + doctorID: ''); + await model.getPatientProgressNote(getGetProgressNoteReqModel); + if (model.patientProgressNoteList.isNotEmpty) { + progressNoteController.text = Helpers.parseHtmlString( + model.patientProgressNoteList[0].planNote); + patientProgressNote.planNote = progressNoteController.text; + patientProgressNote.createdByName = + model.patientProgressNoteList[0].createdByName; + patientProgressNote.createdOn = + model.patientProgressNoteList[0].createdOn; + patientProgressNote.editedOn = + model.patientProgressNoteList[0].editedOn; + patientProgressNote.editedByName = + model.patientProgressNoteList[0].editedByName; + patientProgressNote.appointmentNo = + model.patientProgressNoteList[0].appointmentNo; + + setState(() { + isAddProgress = false; + }); + } } widget.changeLoadingState(false); } else { diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart index b9eef0f5..55e36342 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart @@ -159,6 +159,9 @@ class _AddAllergiesItemState extends State { maxLines: 25, minLines: 3, hasBorder: true, + onChanged: (value){ + mySelectedAllergy.remark = value; + }, inputType: TextInputType.multiline, ), diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index d7f8f6ed..11e4fa72 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -188,6 +188,7 @@ class _AddMedicationState extends State { list: model.medicationDoseTimeList, okText: TranslationBase.of(context).ok, + selectedValue: _selectedMedicationDose, okFunction: (selectedValue) { setState(() { _selectedMedicationDose = @@ -236,6 +237,7 @@ class _AddMedicationState extends State { list: model.medicationStrengthList, okText: TranslationBase.of(context).ok, + selectedValue: _selectedMedicationStrength, okFunction: (selectedValue) { setState(() { _selectedMedicationStrength = @@ -284,6 +286,7 @@ class _AddMedicationState extends State { MasterKeyDailog dialog = MasterKeyDailog( list: model.medicationRouteList, + selectedValue: _selectedMedicationRoute, okText: TranslationBase.of(context).ok, okFunction: (selectedValue) { @@ -333,6 +336,7 @@ class _AddMedicationState extends State { list: model.medicationFrequencyList, okText: TranslationBase.of(context).ok, + selectedValue: _selectedMedicationFrequency, okFunction: (selectedValue) { setState(() { _selectedMedicationFrequency =