From f0cd33ae433708da509bcc1f459ec45fd6637168 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 24 Jan 2021 02:31:27 +0200 Subject: [PATCH] fix issue on assessment design --- lib/config/localized_values.dart | 2 +- .../profile/patient_profile_widget.dart | 2 +- .../subjective/update_subjective_page.dart | 1 - .../soap_update/update_assessment_page.dart | 2 +- .../profile/soap_update/update_plan_page.dart | 18 +++++++---- lib/widgets/shared/app_scaffold_widget.dart | 30 ++++++++++--------- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c56f2e02..71929250 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -7,7 +7,7 @@ const Map> localizedValues = { 'theDoctor': {'en': 'Doctor', 'ar': 'الطبيب'}, 'reply': {'en': 'Reply', 'ar': 'رد'}, 'time': {'en': 'Time', 'ar': 'الوقت'}, - 'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'}, + 'fileNo': {'en': 'File No : ', 'ar': 'رقم الملف :'}, 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, 'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'}, 'mySchedule': {'en': 'Schedule', 'ar': 'جدولي'}, diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index bab7cc84..67c489e7 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -94,7 +94,7 @@ class PatientProfileWidget extends StatelessWidget { fontWeight: FontWeight.bold, ), SizedBox( - width: 20, + width: 4, ), AppText( patient.patientId.toString(), diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 184b4391..a6167c43 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -522,7 +522,6 @@ class _UpdateSubjectivePageState extends State { if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == null) postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = []; - //TODO: make static value dynamic postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add( ListHisProgNotePatientAllergyDiseaseVM( allergyDiseaseId: allergy.selectedAllergy.id, diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index e42cfcf8..e6e1a908 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -332,7 +332,7 @@ class _UpdateAssessmentPageState extends State { children: [ AppText( - "ICD: ".toUpperCase(), + "ICD : ".toUpperCase(), fontWeight: FontWeight .bold, fontSize: 16, diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index 06cbfc06..04b2b73d 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -132,7 +132,7 @@ class _UpdatePlanPageState extends State { ), Column( children: [ - if(widget.patientProgressNote==null) + if(widget.patientProgressNote.planNote == null) Container( margin: EdgeInsets.only(left: 10, right: 10, top: 15), @@ -161,7 +161,7 @@ class _UpdatePlanPageState extends State { SizedBox( height: 20, ), - if (progressNoteController.text !='') + if ( widget.patientProgressNote.planNote != null) Container( margin: EdgeInsets.only(left: 5, right: 5, top: 15), @@ -308,12 +308,16 @@ class _UpdatePlanPageState extends State { patientMRN: widget.patientInfo.patientMRN, episodeId: widget.patientInfo.episodeNo, appointmentNo: widget.patientInfo.appointmentNo, - planNote: progressNoteController.text, doctorID: '', editedBy: ''); + planNote: widget.patientProgressNote.planNote, doctorID: '', editedBy: ''); if(model.patientProgressNoteList.isEmpty){ await model.postProgressNote(postProgressNoteRequestModel); }else { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + postProgressNoteRequestModel.editedBy =doctorProfile.doctorID; await model.patchProgressNote(postProgressNoteRequestModel); } @@ -335,12 +339,12 @@ class _UpdatePlanPageState extends State { context: context, builder: (context) { return FractionallySizedBox( - heightFactor: 0.5, + heightFactor: 0.6, child: Container( child: FractionallySizedBox( widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: ListView( + // crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 16, @@ -355,6 +359,7 @@ class _UpdatePlanPageState extends State { ), Container( margin: EdgeInsets.only(left: 0, right: 0, top: 15), + child: TextFields( hintText: TranslationBase.of(context).addProgressNote, fontSize: 13.5, @@ -383,6 +388,7 @@ class _UpdatePlanPageState extends State { widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName??doctorProfile.doctorName; widget.patientProgressNote.editedByName=doctorProfile.doctorName; widget.patientProgressNote.createdOn= DateTime.now().toString() ; + widget.patientProgressNote.planNote = progressNoteController.text; setState(() { print(progressNoteController.text); }); diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 4ddd7873..d60edb9f 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -1,11 +1,12 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; + import '../../widgets/shared/app_loader_widget.dart'; import 'app_texts_widget.dart'; import 'network_base_view.dart'; @@ -64,20 +65,21 @@ class AppScaffold extends StatelessWidget { children: [body, buildAppLoaderWidget(isLoading)]) : Center( child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/images/undraw_connected_world_wuay.png", - height: 250, - ), - AppText('No Internet Connection') - ], - ), - )); + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/images/undraw_connected_world_wuay.png", + height: 250, + ), + AppText('No Internet Connection') + ], + ), + ), + ); } - Widget buildAppLoaderWidget(bool isloading) { - return isloading ? AppLoaderWidget() : Container(); + Widget buildAppLoaderWidget(bool isLoading) { + return isLoading ? AppLoaderWidget() : Container(); } }