From 629bab2b44226a8f02495834cad7074c53c5387f Mon Sep 17 00:00:00 2001 From: "taha.alam" Date: Thu, 5 Dec 2024 10:38:16 +0300 Subject: [PATCH] WD: Physical examination screen changes and create progress note changes. --- .../soap/SOAP_service.dart | 2 +- .../assessment/add_diagnosis.dart | 18 ++-- .../assessment/update_assessment_page.dart | 24 +++--- .../assessment/widget/edit_diagnosis.dart | 15 +++- .../assessment/widget/enter_diagnosis.dart | 25 ++++-- .../assessment/widget/favotite_diagnosis.dart | 1 + .../objective/list_of_examination.dart | 1 + .../plan/widget/ProgressNoteItem.dart | 9 +- .../plan/widget/list_of_notes.dart | 2 +- .../widgets/SoapDetailItem.dart | 85 ++++++++++--------- 10 files changed, 104 insertions(+), 78 deletions(-) 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..c2ded5ba 100644 --- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart +++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart @@ -1255,7 +1255,7 @@ class SOAPService extends LookupService { Map request = { "planNote": note, "PatientMRN": patient.patientMRN, - "EpisodeID": patient.episodeNo, + "EpisodeID": patient.pomrId, "CreatedByName": patient.doctorName, "CreatedBy": patient.doctorId, "Speciality": clinicID, diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/add_diagnosis.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/add_diagnosis.dart index d7399d58..49740fe4 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/add_diagnosis.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/add_diagnosis.dart @@ -62,21 +62,23 @@ class _AddDiagnosisState extends State controller: _tabController, tabs: [ Tab( - child: AppText( + child: Text( TranslationBase.of(context).mappedDiagnosis, - color: Color(0xFF6D6D6D), - fontSize: 14, - fontWeight: FontWeight.w600, - letterSpacing: -0.56, + style:TextStyle( + color: Color(0xFF6D6D6D), + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ) ), ), Tab( - child: AppText( + child: Text( TranslationBase.of(context).favoriteDiagnosis, - color: Color(0xFF6D6D6D), + style: TextStyle(color: Color(0xFF6D6D6D), fontSize: 14, fontWeight: FontWeight.w600, - letterSpacing: -0.56, + letterSpacing: -0.56,) ), ), ], diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/update_assessment_page.dart index 347deec6..91121ece 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/update_assessment_page.dart @@ -107,31 +107,33 @@ class _UpdateAssessmentPageState extends State ), SizedBox( - height: 56, + height: 64, child: TabBar( indicatorColor: Color(0xFFD02127), unselectedLabelColor: Color(0xFF6D6D6D), labelColor: Color(0xFF2B353E), tabs: [ Tab( - child: AppText( + child: Text( TranslationBase.of(context) .currentDiagnosis, + style: TextStyle( color: Color(0xFF6D6D6D), fontSize: 14, fontWeight: FontWeight.w600, - letterSpacing: -0.56, + letterSpacing: -0.56,) ), ), Tab( - child: AppText( - TranslationBase.of(context) - .previousDiagnosis, - color: Color(0xFF6D6D6D), - fontSize: 14, - fontWeight: FontWeight.w600, - letterSpacing: -0.56, - ), + child: Text( + TranslationBase.of(context) + .previousDiagnosis, + style: TextStyle( + color: Color(0xFF6D6D6D), + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56,) + ) ) ], controller: _tabController, diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/edit_diagnosis.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/edit_diagnosis.dart index 63b178b8..1ceea811 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/edit_diagnosis.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/edit_diagnosis.dart @@ -127,16 +127,25 @@ class _EditDiagnosisState extends State { ); }, onChanged: (value) { - if (value != null) _onTextChanged(value); + + }, + onFieldSubmitted: () { + + }, + onEditingComplete: (){ + if(filteredSearchController.text.isEmpty) return; + _onStopped(filteredSearchController.text); }, - onFieldSubmitted: () {}, suffixIcon: IconButton( icon: Icon( Icons.search, color: Color(0xff2B353E), size: 30, ), - onPressed: () {}, + onPressed: () { + if(filteredSearchController.text.isEmpty) return; + _onStopped(filteredSearchController.text); + }, ), ), Positioned( diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/enter_diagnosis.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/enter_diagnosis.dart index c7f93308..ea870eb9 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/enter_diagnosis.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/enter_diagnosis.dart @@ -42,13 +42,13 @@ class _EnterDiagnosisState extends State { SearchDiagnosis? selectedDiagnosis; void _onTextChanged(String text) { - if (_tTimer != null) { - _tTimer!.cancel(); - } - if(text.isEmpty) return; - _tTimer = Timer(Duration(milliseconds: 500), () { - _onStopped(text); - }); + // if (_tTimer != null) { + // _tTimer!.cancel(); + // } + // if(text.isEmpty) return; + // _tTimer = Timer(Duration(milliseconds: 500), () { + // _onStopped(text); + // }); } void _onStopped(String searchText) async { @@ -94,16 +94,23 @@ class _EnterDiagnosisState extends State { ); }, onChanged: (value) { - if (value != null) _onTextChanged(value); + }, onFieldSubmitted: () {}, + onEditingComplete: (){ + if(filteredSearchController.text.isEmpty) return; + _onStopped(filteredSearchController.text); + }, suffixIcon: IconButton( icon: Icon( Icons.search, color: Color(0xff2B353E), size: 30, ), - onPressed: () {}, + onPressed: () { + if(filteredSearchController.text.isEmpty) return; + _onStopped(filteredSearchController.text); + }, ), ), Positioned( diff --git a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/favotite_diagnosis.dart b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/favotite_diagnosis.dart index 7a08886b..1756aa38 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/favotite_diagnosis.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/assessment/widget/favotite_diagnosis.dart @@ -66,6 +66,7 @@ class _FavoriteDiagnosisState extends State { }); }, builder: (_, model, w) => AppScaffold( + isShowAppBar: false, body: SingleChildScrollView( child: Padding( padding: diff --git a/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart b/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart index 38f716c7..4f7ae541 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/objective/list_of_examination.dart @@ -29,6 +29,7 @@ class ListOfExamination extends StatelessWidget { /// the action is [SoapDetailItemActions] }, status: 'active', + showActions: false, ), separatorBuilder: (_, __) => Divider(), itemCount: listOfSelection.length), diff --git a/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/ProgressNoteItem.dart b/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/ProgressNoteItem.dart index 09e6d6a3..cbabae2b 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/ProgressNoteItem.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/ProgressNoteItem.dart @@ -7,14 +7,15 @@ class ProgressNoteItem extends StatelessWidget { final String type; final String speciality; final String Notes; - final String status; + // final String status; const ProgressNoteItem( {super.key, required this.type, required this.speciality, required this.Notes, - required this.status}); + // required this.status + }); @override Widget build(BuildContext context) => Column( @@ -68,8 +69,8 @@ class ProgressNoteItem extends StatelessWidget { ), ], ), - Align( - alignment: Alignment.topRight, child: Status(status: status)) + // Align( + // alignment: Alignment.topRight, child: Status(status: status)) ], ), SizedBox( diff --git a/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/list_of_notes.dart b/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/list_of_notes.dart index d74ab0c3..1f5d2c81 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/list_of_notes.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/plan/widget/list_of_notes.dart @@ -12,7 +12,7 @@ class ListOfNotes extends StatelessWidget{ child: ListView.separated( physics: NeverScrollableScrollPhysics(), shrinkWrap: true, - itemBuilder: (_, index) =>ProgressNoteItem(type: 'Doctor Note', speciality: "Internal Medicine", Notes: "Some lines of note for the progress ", status: "stable"), + itemBuilder: (_, index) =>ProgressNoteItem(type: notes[index].progressNotesTypesName ?? '', speciality: notes[index].specialityName ?? '', Notes: notes[index].progressNote?? ''), separatorBuilder: (_, __) => Divider(), itemCount: notes.length), ); diff --git a/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart b/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart index 0e391584..3ba16bef 100644 --- a/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart +++ b/lib/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart @@ -84,51 +84,54 @@ class SoapDetailItem extends StatelessWidget { SizedBox( height: 16, ), - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => - onSoapDetailActionClicked(SoapDetailItemActions.EDIT), - child: SoapDetailItemActionsView( - icon: 'assets/images/svgs/edit.svg', - fontColor: Color(0XFF2B353E), - text: TranslationBase.of(context).edit, + Visibility( + visible: showActions, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => + onSoapDetailActionClicked(SoapDetailItemActions.EDIT), + child: SoapDetailItemActionsView( + icon: 'assets/images/svgs/edit.svg', + fontColor: Color(0XFF2B353E), + text: TranslationBase.of(context).edit, + ), ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => - onSoapDetailActionClicked(SoapDetailItemActions.RESOLVE), - child: SoapDetailItemActionsView( - icon: 'assets/images/svgs/resolve.svg', - fontColor: Color(0XFF359846), - text: TranslationBase.of(context).resolve, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => + onSoapDetailActionClicked(SoapDetailItemActions.RESOLVE), + child: SoapDetailItemActionsView( + icon: 'assets/images/svgs/resolve.svg', + fontColor: Color(0XFF359846), + text: TranslationBase.of(context).resolve, + ), ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => - onSoapDetailActionClicked(SoapDetailItemActions.AUDIT), - child: SoapDetailItemActionsView( - icon: 'assets/images/svgs/audit.svg', - fontColor: Color(0XFF2B353E), - text: TranslationBase.of(context).audit, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => + onSoapDetailActionClicked(SoapDetailItemActions.AUDIT), + child: SoapDetailItemActionsView( + icon: 'assets/images/svgs/audit.svg', + fontColor: Color(0XFF2B353E), + text: TranslationBase.of(context).audit, + ), ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => - onSoapDetailActionClicked(SoapDetailItemActions.REMOVE), - child: SoapDetailItemActionsView( - icon: 'assets/images/svgs/delete.svg', - fontColor: Color(0XFFD02127), - text: TranslationBase.of(context).delete, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => + onSoapDetailActionClicked(SoapDetailItemActions.REMOVE), + child: SoapDetailItemActionsView( + icon: 'assets/images/svgs/delete.svg', + fontColor: Color(0XFFD02127), + text: TranslationBase.of(context).delete, + ), ), - ), - ], + ], + ), ) ], ),