diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e96daef0..d1c52f7a 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -541,4 +541,5 @@ const Map> localizedValues = { 'physicalSystemExamination': {'en': "Physical/System Examination", 'ar':" الفحص البدني / النظام" }, 'searchExamination': {'en': "Search Examination", 'ar':"فحص البحث" }, 'addExamination': {'en': "Add Examination", 'ar':"اضافه" }, + 'doc': {'en': "Doc :", 'ar':" د: " }, }; diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index ebb282ef..e3daf6e9 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -246,6 +246,14 @@ class SOAPViewModel extends BaseViewModel { setState(ViewState.Idle); } + String getAllergicNames(){ + String allergiesString=''; + patientAllergiesList.forEach((element) { + allergiesString += element.allergyDiseaseName+' , '; + }); + return allergiesString; + } + Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async { setState(ViewState.Busy); await _SOAPService.getPatientHistories(getHistoryReqModel, isFirst: isFirst); diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index e6b5dbd5..0cfd0b6f 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -558,6 +558,7 @@ class TranslationBase { String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode]; String get searchExamination => localizedValues['searchExamination'][locale.languageCode]; String get addExamination => localizedValues['addExamination'][locale.languageCode]; + String get doc => localizedValues['doc'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/patient-page-header-widget.dart b/lib/widgets/patients/profile/patient-page-header-widget.dart index f4de0615..a6c47a7f 100644 --- a/lib/widgets/patients/profile/patient-page-header-widget.dart +++ b/lib/widgets/patients/profile/patient-page-header-widget.dart @@ -12,7 +12,6 @@ import 'package:flutter/material.dart'; class PatientPageHeaderWidget extends StatelessWidget { final PatiantInformtion patient; - String allergiesString=''; PatientPageHeaderWidget(this.patient); @override @@ -26,9 +25,7 @@ class PatientPageHeaderWidget extends StatelessWidget { doctorID: '', editedBy: ''); await model.getPatientAllergy(generalGetReqForSOAP); - model.patientAllergiesList.forEach((element) { - allergiesString += element.allergyDiseaseName+' , '; - }); + }, builder: (_, model, w) => Container( child: Column( @@ -85,11 +82,11 @@ class PatientPageHeaderWidget extends StatelessWidget { ), NetworkBaseView( baseViewModel: model, - child: AppText( - "ALLERGIC TO: $allergiesString", + child: model.patientAllergiesList.isNotEmpty ?AppText( + "ALLERGIC TO: "+model.getAllergicNames(), color: Color(0xFFB9382C), fontWeight: FontWeight.bold, - ), + ) : AppText(''), ), ], ), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index a614ddb4..d3ea6048 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -94,7 +94,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).previewHealth, nameLine2: TranslationBase.of(context).summaryReport, icon: 'radiology-1.png'), - if (selectedPatientType != 0 && selectedPatientType != 5) + if (selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 7) PatientProfileButton( key: key, patient: patient, 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 10bfc120..0cec0609 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -41,7 +41,6 @@ class _UpdateAssessmentPageState extends State { bool isAssessmentExpand = false; @override Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; return BaseView( onModelReady: (model) async{ @@ -152,12 +151,10 @@ class _UpdateAssessmentPageState extends State { model: model); }, readOnly: true, - // hintColor: Colors.black, suffixIcon: EvaIcons.plusCircleOutline, suffixIconColor: AppGlobal .appPrimaryColor, fontWeight: FontWeight.w600, - // controller: messageController, validator: (value) { if (value == null) return TranslationBase @@ -217,7 +214,7 @@ class _UpdateAssessmentPageState extends State { MainAxisAlignment.start, children: [ AppText( - "Appointment #: ", + TranslationBase.of(context).appointmentNo, fontWeight: FontWeight .bold, fontSize: 16, @@ -250,7 +247,7 @@ class _UpdateAssessmentPageState extends State { MainAxisAlignment.start, children: [ AppText( - "Type : ", + TranslationBase.of(context).type +':', fontWeight: FontWeight .bold, fontSize: 16, @@ -270,7 +267,7 @@ class _UpdateAssessmentPageState extends State { MainAxisAlignment.start, children: [ AppText( - "Doc : ", + TranslationBase.of(context).doc, fontWeight: FontWeight .bold, fontSize: 16, @@ -671,7 +668,7 @@ class _AddAssessmentDetailsState extends State { height: 10, ), AppButton( - title: "Add".toUpperCase(), + title: (widget.isUpdate?TranslationBase.of(context).update:TranslationBase.of(context).add).toUpperCase(), loading: model.state == ViewState.BusyLocal, onPressed: () async { widget.mySelectedAssessment.remark = diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart index 0c8bece6..550a36ca 100644 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_objective_page.dart @@ -397,10 +397,10 @@ class _UpdateObjectivePageState extends State { widget.changePageViewIndex(2); } } else { - helpers.showErrorToast(TranslationBase.of(context).requiredMsg); - } + widget.changePageViewIndex(2); - widget.changePageViewIndex(2); + // helpers.showErrorToast(TranslationBase.of(context).requiredMsg); + } } removeExamination(MasterKeyModel masterKey) { 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 a91447d6..b8ceea79 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -51,8 +51,6 @@ class _UpdatePlanPageState extends State { @override Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - return BaseView( onModelReady: (model) async { GetGetProgressNoteReqModel getGetProgressNoteReqModel = @@ -287,13 +285,13 @@ class _UpdatePlanPageState extends State { appointmentNo: widget.patientInfo.appointmentNo, planNote: progressNoteController.text, doctorID: '', editedBy: ''); - // if(model.patientProgressNoteList.isEmpty){ + if(model.patientProgressNoteList.isEmpty){ await model.postProgressNote(postProgressNoteRequestModel); - // }else { - // await model.patchProgressNote(postProgressNoteRequestModel); - // - // } + }else { + await model.patchProgressNote(postProgressNoteRequestModel); + + } if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error);