diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 09562b9f..b56b6aa9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -56,7 +56,7 @@ const Map> localizedValues = { "myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"}, "myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"}, "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, - "inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"}, + "inPatientAll": {"en": "All Patients", "ar": "المرضى المنومين"}, "operations": {"en": "Operations", "ar": "عمليات"}, "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, "searchMedicineDashboard": { diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index e81ce9b3..a09736e2 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -59,6 +59,8 @@ class PharmaciesItemsRequestModel { data['SessionID'] = this.sessionID; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['DeviceTypeID'] = this.deviceTypeID; + //TODO Elham* fix it later + data['VersionID'] = 40; return data; } } diff --git a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart index 51c5b35b..1064036f 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -167,93 +167,95 @@ class PatientSickLeaveScreen extends StatelessWidget { SizedBox( width: 10, ), - Column( - children: [ - CustomRow( - label: TranslationBase.of( - context) - .daysSickleave , - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: (item.sickLeaveDays - .toString() != - null && - item.sickLeaveDays - .toString() != - "null") - ? item.sickLeaveDays - .toString() - : item.noOfDays - .toString(), - ), - CustomRow( - label: TranslationBase.of( - context) - .startDate + - ' ' ?? - "", - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: AppDateUtils - .getDayMonthYearDateFormatted( - item.startDate.contains( - "/Date(") - ? AppDateUtils - .convertStringToDate( - item - .startDate) - : DateTime.parse( - item.startDate), + Expanded( + child: Column( + children: [ + CustomRow( + label: TranslationBase.of( + context) + .daysSickleave , + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: (item.sickLeaveDays + .toString() != + null && + item.sickLeaveDays + .toString() != + "null") + ? item.sickLeaveDays + .toString() + : item.noOfDays + .toString(), ), - ), - CustomRow( - label: TranslationBase.of( - context) - .endDate + - ' ' ?? - "", - labelSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.3, - valueSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 4, - value: AppDateUtils - .getDayMonthYearDateFormatted( - item.startDate.contains( - "/Date(") - ? AppDateUtils - .convertStringToDate( - item.endDate ?? - "") - .add( - Duration( - days: item - .noOfDays ?? - item.sickLeaveDays), - ) - : DateTime.parse( - item.startDate ?? - "") - .add( - Duration( - days: - item.noOfDays ?? - ""), - ), + CustomRow( + label: TranslationBase.of( + context) + .startDate + + ' ' ?? + "", + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: AppDateUtils + .getDayMonthYearDateFormatted( + item.startDate.contains( + "/Date(") + ? AppDateUtils + .convertStringToDate( + item + .startDate) + : DateTime.parse( + item.startDate), + ), ), - ), - ], - crossAxisAlignment: - CrossAxisAlignment.start, + CustomRow( + label: TranslationBase.of( + context) + .endDate + + ' ' ?? + "", + labelSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.3, + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4, + value: AppDateUtils + .getDayMonthYearDateFormatted( + item.startDate.contains( + "/Date(") + ? AppDateUtils + .convertStringToDate( + item.endDate ?? + "") + .add( + Duration( + days: item + .noOfDays ?? + item.sickLeaveDays), + ) + : DateTime.parse( + item.startDate ?? + "") + .add( + Duration( + days: + item.noOfDays ?? + ""), + ), + ), + ), + ], + crossAxisAlignment: + CrossAxisAlignment.start, + ), ), ], ), diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index b59824b0..39514817 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -100,7 +100,7 @@ class _OutPatientsScreenState extends State { appBarTitle: "Search Patient", isShowAppBar: true, appBar: PatientSearchHeader( - title: "My Out patient", + title: TranslationBase.of(context).myOutPatient, ), baseViewModel: model, body: Column( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 41686ead..554a4209 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -261,8 +261,7 @@ class _PatientMakeInPatientReferralScreenState attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -278,7 +277,6 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); }, ); showDialog( @@ -316,8 +314,8 @@ class _PatientMakeInPatientReferralScreenState TranslationBase.of(context) .clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog( @@ -334,7 +332,7 @@ class _PatientMakeInPatientReferralScreenState DrAppToastMsg.showErrorToast( model.error); } - }); + }, ); showDialog( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index e9ba4770..40325374 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -174,7 +174,7 @@ class _PatientMakeReferralScreenState extends State { fontWeight: FontWeight.w700, color: HexColor("#359846"), onPressed: () async { - setState(() async { + await locator().logEvent( eventCategory: "Refer Patient", eventAction: "Submit Refer", @@ -203,7 +203,7 @@ class _PatientMakeReferralScreenState extends State { } else { doctorError = null; } - }); + if (appointmentDate == null || _selectedBranch == null || _selectedClinic == null || @@ -309,8 +309,8 @@ class _PatientMakeReferralScreenState extends State { attributeName: 'facilityName', attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedBranch = selectedValue; _selectedClinic = null; _selectedDoctor = null; @@ -322,7 +322,7 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); + }, ); showDialog( @@ -358,8 +358,8 @@ class _PatientMakeReferralScreenState extends State { usingSearch: true, hintSearchText: TranslationBase.of(context).clinicSearch, okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { + okFunction: (selectedValue) async { + _selectedDoctor = null; _selectedClinic = selectedValue; GifLoaderDialogUtils.showMyDialog(context); @@ -373,7 +373,6 @@ class _PatientMakeReferralScreenState extends State { if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } - }); }, ); showDialog( diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index d0416539..0910c1c1 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -117,20 +117,20 @@ class VitalSingChartBloodPressure extends StatelessWidget { (element) { DateTime elementDate = AppDateUtils.getDateTimeFromServerFormat(element.createdOn); - if (element.toJson()[viewKey1]?.toInt() != 0) + if (element.toJson()[viewKey1]?.toInt() != 0 && element.toJson()[viewKey1]?.toInt() != null) timeSeriesData1.add( TimeSeriesSales2( new DateTime( elementDate.year, elementDate.month, elementDate.day), - element.toJson()[viewKey1].toDouble(), + element.toJson()[viewKey1]?.toDouble(), ), ); - if (element.toJson()[viewKey2]?.toInt() != 0) + if (element.toJson()[viewKey2]?.toInt() != 0 && element.toJson()[viewKey2]?.toInt() != null) timeSeriesData2.add( TimeSeriesSales2( new DateTime( elementDate.year, elementDate.month, elementDate.day), - element.toJson()[viewKey2].toDouble(), + element.toJson()[viewKey2]?.toDouble(), ), ); },