diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 2de1f3d1..f70e13c8 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -674,4 +674,7 @@ const Map> localizedValues = { 'en': "Referral Remark : ", 'ar': "ملاحظة الإحالة :" }, + 'icd': {'en': "ICD", 'ar': "التصنيف الدولي للأمراض" + // 'icd': {'en': "ICD", 'ar': " " + }, }; diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 2f18540a..f452cfb6 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -32,13 +32,14 @@ class PatientReferralService extends LookupService { "Channel": 9, "TokenID": "", "SessionID": "i1UJwCTSqt", - "IsLoginForDoctorApp": true + "IsLoginForDoctorApp": true, + // "MemberID": memberID }; dynamic localRes; await baseAppClient.post(url, onSuccess: (response, statusCode) async { if (response['MessageStatus'] == 1) { - projectsList = response['ListProject']; + projectsList = response['ProjectInfo']; } else { // handel error projectsList = ListProject; diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index abe39224..b9987601 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -94,8 +94,8 @@ class PatientReferralViewModel extends BaseViewModel { DoctorProfileModel doctorProfile = await getDoctorProfile(); if (doctorProfile != null) { dynamic _selectedBranch = { - "ID": doctorProfile.projectID, - "Desciption": doctorProfile.projectName + "facilityId": doctorProfile.projectID, + "facilityName": doctorProfile.projectName }; return _selectedBranch; } diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 489c462d..0831fffe 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -284,7 +284,24 @@ class DiagnosisWidget extends StatelessWidget { fontSize: SizeConfig.textMultiplier * 2.0, ), AppText( - "${diagnosis.icdCode10ID} ${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}", + "${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + ], + ), + SizedBox( + height: 4, + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).icd}: ", + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.0, + ), + AppText( + "${diagnosis.icdCode10ID}}", fontWeight: FontWeight.normal, fontSize: SizeConfig.textMultiplier * 2.0, ), diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 0116ce46..1a9ac4fa 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -144,24 +144,31 @@ class _UCAFInputScreenState extends State { ), ], ), - Row( - children: [ - AppText( - "${TranslationBase.of(context).temperature}", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${model.patientVitalSigns.temperatureCelcius}(C), ${model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32}(F)", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, - fontWeight: FontWeight.normal, - ), - ], + SizedBox( + width: 4, + ), + Expanded( + child: Row( + children: [ + AppText( + "${TranslationBase.of(context).temperature}", + fontSize: SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + Expanded( + child: AppText( + "${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)", + fontSize: SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, + ), + ), + ], + ), ), ], ), diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 2c5311cc..04eba96e 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -74,14 +75,14 @@ class _PatientMakeReferralScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - if (model.state == ViewState.BusyLocal) + /*if (model.state == ViewState.BusyLocal) Container( color: Colors.white, width: 50, height: 50, child: AppLoaderWidget( containerColor: Colors.white, - )), + )),*/ Column( children: [ PatientPageHeaderWidget(patient), @@ -95,17 +96,16 @@ class _PatientMakeReferralScreenState extends State { model.patientReferral.length == 0 ? ReferralForm(model, screenSize) : PatientReferralItemWidget( - patientName: model.patientReferral[0].patientName, - referralStatus: "${model.patientReferral[0].referralStatus}", - isReferredTo: true, - isSameBranch: model.patientReferral[0] - .isReferralDoctorSameBranch, - referralDoctorName: - model.patientReferral[0].referredByDoctorInfo, - clinicDescription: null, - remark: - model.patientReferral[0].remarksFromSource - ), + patientName: model.patientReferral[0].patientName, + referralStatus: + "${model.patientReferral[0].referralStatus}", + isReferredTo: true, + isSameBranch: model + .patientReferral[0].isReferralDoctorSameBranch, + referralDoctorName: + model.patientReferral[0].referredByDoctorInfo, + clinicDescription: null, + remark: model.patientReferral[0].remarksFromSource), ], ), if (model.patientReferral.length == 0) @@ -124,7 +124,7 @@ class _PatientMakeReferralScreenState extends State { .makeReferral( patient, appointmentDate.toIso8601String(), - _selectedBranch['ID'], + _selectedBranch['facilityId'], _selectedClinic['ClinicID'], _selectedDoctor['DoctorID'], _remarksController.text) @@ -180,7 +180,12 @@ class _PatientMakeReferralScreenState extends State { model.getDoctorBranch().then((value) { _selectedBranch = value; if (_referTo['id'] == 1) { - model.getClinics(_selectedBranch['ID']); + GifLoaderDialogUtils.showMyDialog(context); + model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); } }); }); @@ -217,15 +222,19 @@ class _PatientMakeReferralScreenState extends State { ? () { ListSelectDialog dialog = ListSelectDialog( list: model.branchesList, - attributeName: 'Desciption', - attributeValueId: 'ID', + attributeName: 'facilityName', + attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, okFunction: (selectedValue) { setState(() { _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; - model.getClinics(_selectedBranch['ID']); + GifLoaderDialogUtils.showMyDialog(context); + model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); }); }, ); @@ -242,7 +251,7 @@ class _PatientMakeReferralScreenState extends State { decoration: textFieldSelectorDecoration( TranslationBase.of(context).branch, _selectedBranch != null - ? _selectedBranch['Desciption'] + ? _selectedBranch['facilityName'] : null, true), enabled: false, @@ -268,8 +277,12 @@ class _PatientMakeReferralScreenState extends State { setState(() { _selectedDoctor = null; _selectedClinic = selectedValue; - model.getClinicDoctors( - _selectedClinic['ClinicID'].toString()); + GifLoaderDialogUtils.showMyDialog(context); + model + .getClinicDoctors( + _selectedClinic['ClinicID'].toString()) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); }); }, ); diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index ad312625..45cd8d14 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -9,13 +10,15 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; class VitalSignDetailsScreen extends StatelessWidget { - int appointmentNo; int projectID; bool isNotOneAppointment; - VitalSignDetailsScreen({this.appointmentNo, this.projectID,this.isNotOneAppointment=true}); + + VitalSignDetailsScreen( + {this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); @override Widget build(BuildContext context) { @@ -23,10 +26,11 @@ class VitalSignDetailsScreen extends StatelessWidget { PatiantInformtion patient = routeArgs['patient']; String from = routeArgs['from']; String to = routeArgs['to']; - String imageBasePath = 'assets/images/'; + String imageBasePath = 'assets/images/'; return BaseView( - onModelReady: (model) => model.getPatientVitalSignHistory(patient, from, to), + onModelReady: (model) => + model.getPatientVitalSignHistory(patient, from, to), builder: (_, mode, widget) => AppScaffold( isShowAppBar: true, baseViewModel: mode, @@ -38,16 +42,19 @@ class VitalSignDetailsScreen extends StatelessWidget { Row( children: [ InkWell( - onTap: () =>isNotOneAppointment? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Height, - pageTitle: TranslationBase.of(context).height, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Height, + pageTitle: + TranslationBase.of(context).height, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: Container( child: VitalSignItem( des: TranslationBase.of(context).height, @@ -58,16 +65,19 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ), InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Weight, - pageTitle: TranslationBase.of(context).weight, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Weight, + pageTitle: + TranslationBase.of(context).weight, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: VitalSignItem( des: TranslationBase.of(context).weight, imagePath: "${imageBasePath}vital_weight.png", @@ -80,17 +90,20 @@ class VitalSignDetailsScreen extends StatelessWidget { Row( children: [ InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.BodyMeasurements, - pageTitle: TranslationBase.of(context) - .bodyMeasurements, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ): null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: + vitalSignDetails.BodyMeasurements, + pageTitle: TranslationBase.of(context) + .bodyMeasurements, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: VitalSignItem( des: TranslationBase.of(context).body, imagePath: "${imageBasePath}vital_body_mass.png", @@ -99,21 +112,24 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ), InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Temperature, - pageTitle: - TranslationBase.of(context).temperature, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Temperature, + pageTitle: TranslationBase.of(context) + .temperature, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: Container( child: VitalSignItem( des: TranslationBase.of(context).temperature, - imagePath: "${imageBasePath}vital_temperature.png", + imagePath: + "${imageBasePath}vital_temperature.png", lastVal: mode.temperatureCelcius, unit: TranslationBase.of(context).tempC, ), @@ -124,16 +140,19 @@ class VitalSignDetailsScreen extends StatelessWidget { Row( children: [ InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.heart, - pageTitle: TranslationBase.of(context).heart, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.heart, + pageTitle: + TranslationBase.of(context).heart, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: VitalSignItem( des: TranslationBase.of(context).heart, imagePath: "${imageBasePath}vital_heart_rate.png", @@ -142,17 +161,19 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ), InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Respiration, - pageTitle: - TranslationBase.of(context).respirationRate, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.Respiration, + pageTitle: TranslationBase.of(context) + .respirationRate, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: VitalSignItem( des: TranslationBase.of(context).respirationRate, imagePath: "${imageBasePath}vital_respiration.png", @@ -166,19 +187,23 @@ class VitalSignDetailsScreen extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ InkWell( - onTap: () => isNotOneAppointment ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.BloodPressure, - pageTitle: TranslationBase.of(context).bloodPressure, - vitalList: mode.patientVitalSignsHistory, - ), - ), - ):null, + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: vitalSignDetails.BloodPressure, + pageTitle: TranslationBase.of(context) + .bloodPressure, + vitalList: mode.patientVitalSignsHistory, + ), + ), + ) + : null, child: VitalSignItem( des: TranslationBase.of(context).bloodPressure, - imagePath: "${imageBasePath}vital_blood-pressure.png", + imagePath: + "${imageBasePath}vital_blood-pressure.png", lastVal: mode.bloodPressure, unit: TranslationBase.of(context).sysDias, ), @@ -189,7 +214,12 @@ class VitalSignDetailsScreen extends StatelessWidget { ), ) : Center( - child: AppText('No Data'), + child: AppText( + TranslationBase.of(context).vitalSignEmptyMsg, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, + ), ), ), ); diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 43a51237..a49873a7 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1013,21 +1013,30 @@ class TranslationBase { String get createdBy => localizedValues['createdBy'][locale.languageCode]; String get editedBy => localizedValues['editedBy'][locale.languageCode]; + String get currentMedications => localizedValues['currentMedications'][locale.languageCode]; + String get noItem => localizedValues['noItem'][locale.languageCode]; + String get postUcafSuccessMsg => localizedValues['postUcafSuccessMsg'][locale.languageCode]; + String get vitalSignDetailEmpty => localizedValues['vitalSignDetailEmpty'][locale.languageCode]; + String get onlyOfftimeHoliday => localizedValues['onlyOfftimeHoliday'][locale.languageCode]; + String get active => localizedValues['active'][locale.languageCode]; + String get hold => localizedValues['hold'][locale.languageCode]; + String get loading => localizedValues['loading'][locale.languageCode]; String get assessmentErrorMsg => localizedValues['assessmentErrorMsg'][locale.languageCode]; + String get examinationErrorMsg => localizedValues['examinationErrorMsg'][locale.languageCode]; @@ -1036,10 +1045,14 @@ class TranslationBase { String get chiefComplaintErrorMsg => localizedValues['chiefComplaintErrorMsg'][locale.languageCode]; + String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; + String get referralRemark => localizedValues['referralRemark'][locale.languageCode]; + + String get icd => localizedValues['icd'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index fa33a72d..b6df1f6f 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -47,8 +47,8 @@ class _ListSelectDialogState extends State { Widget continueButton = FlatButton( child: Text(this.widget.okText), onPressed: () { - this.widget.okFunction(widget.selectedValue); Navigator.of(context).pop(); + this.widget.okFunction(widget.selectedValue); }); // set up the AlertDialog AlertDialog alert = AlertDialog(