diff --git a/assets/images/Doctor_app_logo.png b/assets/images/Doctor_app_logo.png new file mode 100644 index 00000000..2de2d460 Binary files /dev/null and b/assets/images/Doctor_app_logo.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index eea62b2a..06aadac0 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -681,4 +681,11 @@ const Map> localizedValues = { 'en': "Patient Name", 'ar': "اسم المريص" }, + 'icd': {'en': "ICD", 'ar': "التصنيف الدولي للأمراض"}, + 'days': {'en': "Days", 'ar': "أيام"}, + 'months': {'en': "Months", 'ar': "أشهر"}, + 'years': {'en': "Years", 'ar': "سنين"}, + 'hr': {'en': "HR", 'ar': "س"}, + 'min': {'en': "Min", '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/service/patient-vital-signs-service.dart b/lib/core/service/patient-vital-signs-service.dart index ed6869f8..8d404e27 100644 --- a/lib/core/service/patient-vital-signs-service.dart +++ b/lib/core/service/patient-vital-signs-service.dart @@ -43,7 +43,7 @@ class VitalSignsService extends BaseService { Map body = Map(); body['PatientMRN'] = patient.patientMRN; body['AppointmentNo'] = patient.appointmentNo; - body['EpisodeID'] = patient.episodeNo; + // body['EpisodeID'] = patient.episodeNo; body['PatientTypeID'] = 1; body['PatientType'] = 1; body['DeviceTypeID'] = 1; 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/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 1a55153e..50b89148 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -616,7 +616,7 @@ class _PatientsScreenState extends State { .white, ), AppText( - " ${DateUtils.getAgeByBirthday(item.dateofBirth)}", + " ${DateUtils.getAgeByBirthday(item.dateofBirth, context)}", fontSize: 1.8 * SizeConfig 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/date-utils.dart b/lib/util/date-utils.dart index bfa406c6..af90acf6 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:flutter/cupertino.dart'; import 'package:intl/intl.dart'; class DateUtils { @@ -32,7 +34,7 @@ class DateUtils { return date; } - static String differenceBetweenDateAndCurrentInYearMonthDay(DateTime firstDate) { + static String differenceBetweenDateAndCurrentInYearMonthDay(DateTime firstDate, BuildContext context) { DateTime now = DateTime.now(); // now = now.add(Duration(days: 400, minutes: 0)); var difference = firstDate.difference(now); @@ -49,12 +51,10 @@ class DateUtils { final monthAgo = new DateTime(now.year, now.month - 1, firstDate.day); days = now.difference(monthAgo).inDays + 1; } - - - return "$days Days, $months Months, $years Years"; + return "$days ${TranslationBase.of(context).days}, $months ${TranslationBase.of(context).months}, $years ${TranslationBase.of(context).years}"; } - static String differenceBetweenDateAndCurrent(DateTime firstDate) { + static String differenceBetweenDateAndCurrent(DateTime firstDate, BuildContext context) { DateTime now = DateTime.now(); // DateTime now = nows.add(Duration(days: 400, minutes: 25, hours: 0)); var difference = now.difference(firstDate); @@ -67,10 +67,10 @@ class DateUtils { double hoursInOneDay = difference.inHours / difference.inDays; - return "$days Days, $hours HR, $minutes Min"; + return "$days ${TranslationBase.of(context).days}, $hours ${TranslationBase.of(context).hr}, $minutes ${TranslationBase.of(context).min}"; } - static String differenceBetweenServerDateAndCurrent(String str) { + static String differenceBetweenServerDateAndCurrent(String str, BuildContext context) { const start = "/Date("; const end = "+0300)"; @@ -81,7 +81,7 @@ class DateUtils { var date = new DateTime.fromMillisecondsSinceEpoch( int.parse(str.substring(startIndex + start.length, endIndex))); - return differenceBetweenDateAndCurrent(date); + return differenceBetweenDateAndCurrent(date, context); } /// get month by @@ -217,7 +217,7 @@ class DateUtils { } } - static String getAgeByBirthday(dynamic birthday){ + static String getAgeByBirthday(dynamic birthday, BuildContext context){ // https://leechy.dev/calculate-dates-diff-in-dart DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday); final now = DateTime.now(); @@ -232,7 +232,7 @@ class DateUtils { final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day); days = now.difference(monthAgo).inDays + 1; } - return "$years Yr $months Mnth $days Day"; + return "$years ${TranslationBase.of(context).years} $months ${TranslationBase.of(context).months} $days ${TranslationBase.of(context).days}"; } } diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 4d843141..fe2526bc 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]; @@ -1038,11 +1047,20 @@ class TranslationBase { localizedValues['chiefComplaintErrorMsg'][locale.languageCode]; String get ICDName => localizedValues['ICDName'][locale.languageCode]; + String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; + String get referralRemark => localizedValues['referralRemark'][locale.languageCode]; + String get icd => localizedValues['icd'][locale.languageCode]; + String get days => localizedValues['days'][locale.languageCode]; + String get hr => localizedValues['hr'][locale.languageCode]; + String get min => localizedValues['min'][locale.languageCode]; + String get months => localizedValues['months'][locale.languageCode]; + String get years => localizedValues['years'][locale.languageCode]; + String get patientName => localizedValues['patient-name'][locale.languageCode]; } diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index 4709a94a..63087cc7 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -340,14 +340,15 @@ class _LoginFormState extends State { projectIdController.text = projectsList[0]['facilityName']; }); } else { + print(res); // handel error - setState(() { - projectsList = ListProject; - }); + // setState(() { + // projectsList = ListProject; + // }); } }).catchError((err) { setState(() { - projectsList = ListProject; + print(err); }); print(err); }); @@ -386,6 +387,6 @@ class _LoginFormState extends State { getProjectsList(value); } } - _isInit = false; + //_isInit = false; } } diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index b8fcf89c..4834e412 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -117,7 +117,7 @@ class PatientProfileWidget extends StatelessWidget { height: 4, ), AppText( - "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth)/*patient.age*/}", + "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth, context)/*patient.age*/}", fontWeight: FontWeight.normal, fontSize: 1.6 * SizeConfig.textMultiplier, ), @@ -297,7 +297,7 @@ class PatientProfileWidget extends StatelessWidget { patient.createdOn != null ? DateUtils .differenceBetweenServerDateAndCurrent( - patient.createdOn) + patient.createdOn, context) : "", color: Colors.black, fontWeight: FontWeight.normal, 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(