diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 103fe51e..1bb96d84 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1287,4 +1287,8 @@ const Map localizedValues = { "en": "If you have a card / Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان" }, + "liveCare": { + "en": "Live Care", + "ar": "لايف كير" + }, }; diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index 26daaff0..3c49b80a 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -34,7 +34,7 @@ class PatientLabOrders { String qR; String setupID; List speciality; - + bool isLiveCareAppointment; PatientLabOrders( {this.actualDoctorRate, this.clinicDescription, @@ -68,7 +68,7 @@ class PatientLabOrders { this.projectNameN, this.qR, this.setupID, - this.speciality}); + this.speciality,this.isLiveCareAppointment}); PatientLabOrders.fromJson(Map json) { actualDoctorRate = json['ActualDoctorRate']; @@ -103,6 +103,7 @@ class PatientLabOrders { projectNameN = json['ProjectNameN']; qR = json['QR']; setupID = json['SetupID']; + isLiveCareAppointment = json['IsLiveCareAppointment']; // speciality = json['Speciality'].cast(); } @@ -141,6 +142,7 @@ class PatientLabOrders { data['QR'] = this.qR; data['SetupID'] = this.setupID; data['Speciality'] = this.speciality; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; return data; } } diff --git a/lib/core/model/prescriptions/Prescriptions.dart b/lib/core/model/prescriptions/Prescriptions.dart index 1362f1c2..0169010f 100644 --- a/lib/core/model/prescriptions/Prescriptions.dart +++ b/lib/core/model/prescriptions/Prescriptions.dart @@ -27,6 +27,7 @@ class Prescriptions { bool isDoctorAllowVedioCall; bool isExecludeDoctor; bool isInOutPatient; + bool isLiveCareAppointment; String isInOutPatientDescription; String isInOutPatientDescriptionN; bool isInsurancePatient; @@ -68,7 +69,7 @@ class Prescriptions { this.nationalityFlagURL, this.noOfPatientsRate, this.qR, - this.speciality}); + this.speciality,this.isLiveCareAppointment}); Prescriptions.fromJson(Map json) { setupID = json['SetupID']; @@ -103,6 +104,7 @@ class Prescriptions { nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; qR = json['QR']; + isLiveCareAppointment = json['IsLiveCareAppointment']; // speciality = json['Speciality'].cast(); } @@ -141,6 +143,7 @@ class Prescriptions { data['NoOfPatientsRate'] = this.noOfPatientsRate; data['QR'] = this.qR; data['Speciality'] = this.speciality; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; return data; } } diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index 2efe4481..ed47b51d 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -41,6 +41,7 @@ class FinalRadiology { List speciality; bool isCVI; bool isRadMedicalReport; + bool isLiveCareAppointment; FinalRadiology( {this.setupID, @@ -82,7 +83,7 @@ class FinalRadiology { this.reportDataTextString, this.speciality, this.isCVI, - this.isRadMedicalReport}); + this.isRadMedicalReport,this.isLiveCareAppointment}); FinalRadiology.fromJson(Map json) { try { @@ -121,11 +122,13 @@ class FinalRadiology { orderNo = json['OrderNo']; projectName = json['ProjectName']; qR = json['QR']; + isLiveCareAppointment = json['IsLiveCareAppointment']; reportDataHTML = json['ReportDataHTML']; reportDataTextString = json['ReportDataTextString']; // speciality = json['Speciality'].cast(); isCVI = json['isCVI']; isRadMedicalReport = json['isRadMedicalReport']; + } catch (e) { print(e); } diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart index ff73e1da..6811a552 100644 --- a/lib/core/model/sick_leave/sick_leave.dart +++ b/lib/core/model/sick_leave/sick_leave.dart @@ -32,6 +32,7 @@ class SickLeave { String projectName; String qR; List speciality; + bool isLiveCareAppointment; SickLeave( {this.setupID, @@ -64,7 +65,7 @@ class SickLeave { this.patientName, this.projectName, this.qR, - this.speciality}); + this.speciality,this.isLiveCareAppointment}); SickLeave.fromJson(Map json) { setupID = json['SetupID']; @@ -97,6 +98,7 @@ class SickLeave { patientName = json['PatientName']; projectName = json['ProjectName']; qR = json['QR']; + isLiveCareAppointment = json['IsLiveCareAppointment']; if(json['Speciality']!=null) speciality = json['Speciality'].cast(); } diff --git a/lib/core/viewModels/medical/vital_sign_view_model.dart b/lib/core/viewModels/medical/vital_sign_view_model.dart index f534140f..b2110187 100644 --- a/lib/core/viewModels/medical/vital_sign_view_model.dart +++ b/lib/core/viewModels/medical/vital_sign_view_model.dart @@ -11,7 +11,15 @@ class VitalSignViewModel extends BaseViewModel { List get vitalSignResModelList => _vitalSignService.vitalSignResModelList; - getPatientRadOrders({int appointmentNo, int projectID}) async { + String heightCm = "0"; + String weightKg = "0"; + String bodyMax = "0"; + String temperatureCelcius = "0"; + String hartRat = "0"; + String respirationBeatPerMinute = "0"; + String bloodPressure = "0 / 0"; + + getPatientVitalSign({int appointmentNo, int projectID}) async { setState(ViewState.Busy); if (appointmentNo != null && projectID != null) { @@ -23,7 +31,41 @@ class VitalSignViewModel extends BaseViewModel { if (_vitalSignService.hasError) { error = _vitalSignService.error; setState(ViewState.Error); - } else + } else { + _vitalSignService.vitalSignResModelList.forEach((element) { + if (heightCm == "0" || heightCm == null || heightCm == 'null') { + heightCm = element.heightCm.toString(); + } + if (weightKg == "0" || weightKg == null || weightKg == 'null') { + weightKg = element.weightKg.toString(); + } + if (bodyMax == "0" || + bodyMax == null || + bodyMax == 'null') { + bodyMax = element.bodyMassIndex.toString(); + } + if (temperatureCelcius == "0" || + temperatureCelcius == null || + temperatureCelcius == 'null') { + temperatureCelcius = element.temperatureCelcius.toString(); + } + if (hartRat == "0" || hartRat == null || hartRat == 'null') { + hartRat = element.pulseBeatPerMinute.toString(); + } + if (respirationBeatPerMinute == "0" || + respirationBeatPerMinute == null || + respirationBeatPerMinute == 'null') { + respirationBeatPerMinute = + element.respirationBeatPerMinute.toString(); + } + if (bloodPressure == "0 / 0" || + bloodPressure == null || + bloodPressure == 'null') { + bloodPressure = element.bloodPressure.toString(); + } + }); + setState(ViewState.Idle); + } } } diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart index 20eace25..045f759e 100644 --- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -50,6 +50,7 @@ class AppoitmentAllHistoryResultList { bool isExecludeDoctor; int isFollowup; bool isLiveCareAppointment; + bool isInOutPatient; bool isMedicalReportRequested; bool isOnlineCheckedIN; String latitude; @@ -188,6 +189,7 @@ class AppoitmentAllHistoryResultList { isExecludeDoctor = json['IsExecludeDoctor']; isFollowup = json['IsFollowup']; isLiveCareAppointment = json['IsLiveCareAppointment']; + isInOutPatient = json['IsInOutPatient']; isMedicalReportRequested = json['IsMedicalReportRequested']; isOnlineCheckedIN = json['IsOnlineCheckedIN']; latitude = json['Latitude']; @@ -259,6 +261,7 @@ class AppoitmentAllHistoryResultList { data['IsExecludeDoctor'] = this.isExecludeDoctor; data['IsFollowup'] = this.isFollowup; data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['IsInOutPatient'] = this.isInOutPatient; data['IsMedicalReportRequested'] = this.isMedicalReportRequested; data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; data['Latitude'] = this.latitude; diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart index b3839834..c4299e33 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart @@ -55,110 +55,157 @@ class _ApointmentCardState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ + Container( + width: projectViewModel.isArabic ? 27 : 20, + height: projectViewModel.isArabic ? 165 : 140, + decoration: BoxDecoration( + //Colors.red[900] Color(0xff404545) + color: widget.appo.isLiveCareAppointment + ? Color(0xff404545) + : !widget.appo.isInOutPatient + ? Colors.red[900] + : Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + ), + ), + child: RotatedBox( + quarterTurns: 3, + child: Center( + child: Text( + widget.appo.isLiveCareAppointment + ? TranslationBase.of(context) + .liveCare + .toUpperCase() + : !widget.appo.isInOutPatient + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), + style: TextStyle(color: Colors.white), + ), + )), + ), + SizedBox(width: 8,), ClipRRect( borderRadius: BorderRadius.circular(100.0), child: Image.network(widget.appo.doctorImageURL, fit: BoxFit.fill, height: 60.0, width: 60.0), ), - Container( - width: MediaQuery.of(context).size.width * 0.61, - margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - widget.appo.doctorTitle + - " " + - widget.appo.doctorNameObj, - style: TextStyle( - fontSize: 14.0, - color: Colors.grey[700], - letterSpacing: 1.0)), - Container( - margin: EdgeInsets.only(top: 3.0), - child: Text(widget.appo.clinicName, - style: TextStyle( - fontSize: 12.0, - color: Colors.grey[600], - letterSpacing: 1.0)), - ), - Container( - margin: EdgeInsets.only(top: 3.0), - child: Text(widget.appo.projectName, - style: TextStyle( - fontSize: 12.0, - color: Colors.grey[600], - letterSpacing: 1.0)), - ), - Container( - margin: EdgeInsets.only(top: 3.0, bottom: 3.0), - child: Text( - DateUtil.getWeekDayMonthDayYearDateFormatted( - DateUtil.convertStringToDate( - widget.appo.appointmentDate), - projectViewModel.isArabic ? "ar" : "en") - .trim(), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width * 0.61, + margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.appo.doctorTitle + + " " + + widget.appo.doctorNameObj, style: TextStyle( - fontSize: 12.0, - color: Colors.grey[600], + fontSize: 14.0, + color: Colors.grey[700], letterSpacing: 1.0)), - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.max, - children: [ - RatingBar.readOnly( - initialRating: - widget.appo.actualDoctorRate.toDouble(), - size: 20.0, - filledColor: Colors.yellow[700], - emptyColor: Colors.grey[500], - isHalfAllowed: true, - halfFilledIcon: Icons.star_half, - filledIcon: Icons.star, - emptyIcon: Icons.star, - ), - Container( - transform: - Matrix4.translationValues(15.0, -40.0, 0.0), - child: projectViewModel.isArabic - ? Image.asset( - "assets/images/new-design/arrow_menu_black-ar.png", - width: 25.0, - height: 25.0) - : Image.asset( - "assets/images/new-design/arrow_menu_black-en.png", - width: 25.0, - height: 25.0), - ), - ], - ), - (widget.appo.patientStatusType == AppointmentType.BOOKED || - widget.appo.patientStatusType == - AppointmentType.CONFIRMED) - ? Container( - child: CountdownTimer( - controller: new CountdownTimerController( - endTime: - DateTime.now().millisecondsSinceEpoch + - (widget.appo.remaniningHoursTocanPay * - 1000) * - 60), - widgetBuilder: (_, CurrentRemainingTime time) { - return time != null - ? Text( - '${time.days}:${time.hours}:${time.min}:${time.sec} ' + - TranslationBase.of(context) - .upcomingTimeLeft, - style: TextStyle( - fontSize: 12.0, - color: Color(0xff40ACC9))) - : Container(); - }, - ), - ) - : Container(), - ], + Container( + margin: EdgeInsets.only(top: 3.0), + child: Text(widget.appo.clinicName, + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 3.0), + child: Text(widget.appo.projectName, + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 3.0, bottom: 3.0), + child: Text( + DateUtil.getWeekDayMonthDayYearDateFormatted( + DateUtil.convertStringToDate( + widget.appo.appointmentDate), + projectViewModel.isArabic ? "ar" : "en") + .trim(), + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + RatingBar.readOnly( + initialRating: + widget.appo.actualDoctorRate.toDouble(), + size: 20.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + Container( + transform: + Matrix4.translationValues(15.0, -40.0, 0.0), + child: projectViewModel.isArabic + ? Image.asset( + "assets/images/new-design/arrow_menu_black-ar.png", + width: 25.0, + height: 25.0) + : Image.asset( + "assets/images/new-design/arrow_menu_black-en.png", + width: 25.0, + height: 25.0), + ), + ], + ), + (widget.appo.patientStatusType == AppointmentType.BOOKED || + widget.appo.patientStatusType == + AppointmentType.CONFIRMED) + ? Container( + child: CountdownTimer( + controller: new CountdownTimerController( + endTime: + DateTime.now().millisecondsSinceEpoch + + (widget.appo.remaniningHoursTocanPay * + 1000) * + 60), + widgetBuilder: (_, CurrentRemainingTime time) { + return time != null + ? Text( + '${time.days}:${time.hours}:${time.min}:${time.sec} ' + + TranslationBase.of(context) + .upcomingTimeLeft, + style: TextStyle( + fontSize: 12.0, + color: Color(0xff40ACC9))) + : Container(); + }, + ), + ) + : Container(), + ], + ), ), ), ], diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 5d23fe65..0b3695a0 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -97,6 +97,7 @@ class LabsHomePage extends StatelessWidget { billNo: ' ${labOrder.invoiceNo}', profileUrl: labOrder.doctorImageURL, subName: labOrder.projectName, + isLiveCareAppointment: labOrder.isLiveCareAppointment, date: projectViewModel.isArabic?DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate):DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), ); }).toList(), diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index debc4f42..f09b8832 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -45,6 +45,7 @@ class _PatientSickLeavePageState extends State { child: ListView.builder( itemCount: model.sickLeaveList.length, itemBuilder: (context, index) => DoctorCard( + isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, name: model.sickLeaveList[index].doctorName, date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate), profileUrl: model.sickLeaveList[index].doctorImageURL, diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart index 22896dad..30bfa13e 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart @@ -24,7 +24,6 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget { appBarTitle: TranslationBase.of(context).orderDetails, baseViewModel: model, body: SingleChildScrollView( - physics: BouncingScrollPhysics(), child: Container( margin: EdgeInsets.all(15.0), child: Column( @@ -118,7 +117,8 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget { ], ), ), - ) + ), + SizedBox(height: 120,) ], ), ), diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart index ee5fc453..79c7b7ff 100644 --- a/lib/pages/medical/prescriptions/prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_page.dart @@ -91,7 +91,8 @@ class PrescriptionsPage extends StatelessWidget { profileUrl: prescriptions.doctorImageURL, rat: prescriptions.actualDoctorRate.toDouble(), subName: prescriptions.name, - isInOutPatient: prescriptions.isInOutPatient, + isInOutPatient: prescriptions.isInOutPatient, + isLiveCareAppointment: prescriptions.isLiveCareAppointment, date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), ), ); diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart index 70304876..b1b82f93 100644 --- a/lib/pages/medical/radiology/radiology_home_page.dart +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -94,6 +94,7 @@ class RadiologyHomePage extends StatelessWidget { ), child: DoctorCard( isInOutPatient: radiology.isInOutPatient, + isLiveCareAppointment: radiology.isLiveCareAppointment, name: radiology.doctorName, profileUrl: radiology.doctorImageURL, billNo: '${radiology.invoiceNo}', diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart index 619c805f..18b1ca08 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -28,9 +28,9 @@ class VitalSignDetailsScreen extends StatelessWidget { imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-vital-signs/ar/1.png')); return BaseView( onModelReady: appointmentNo != null && projectID != null - ? (model) => model.getPatientRadOrders( + ? (model) => model.getPatientVitalSign( appointmentNo: appointmentNo, projectID: projectID) - : (model) => model.getPatientRadOrders(), + : (model) => model.getPatientVitalSign(), builder: (_, mode, widget) => AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).vitalSigns, @@ -58,11 +58,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).height, icon: DQIcons.height, - lastVal: mode - .vitalSignResModelList[ - mode.vitalSignResModelList.length - 1] - .heightCm - .toString(), + lastVal: mode.heightCm, unit: TranslationBase.of(context).cm, ), ), @@ -82,11 +78,7 @@ class VitalSignDetailsScreen extends StatelessWidget { des: TranslationBase.of(context).weight, icon: DQIcons.weight_scale, unit: TranslationBase.of(context).kg, - lastVal: mode - .vitalSignResModelList[ - mode.vitalSignResModelList.length - 1] - .weightKg - .toString(), + lastVal: mode.weightKg, ), ), ], @@ -108,9 +100,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).body, icon: DQIcons.bmi, - lastVal: mode - .vitalSignResModelList[ mode.vitalSignResModelList.length - 1].pulseBeatPerMinute - .toString(), + lastVal: mode.bodyMax, unit: TranslationBase.of(context).mass, ), ), @@ -130,9 +120,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).temperature, icon: DQIcons.thermometer, - lastVal: mode - .vitalSignResModelList[ mode.vitalSignResModelList.length - 1].temperatureCelcius - .toString(), + lastVal: mode.temperatureCelcius, unit: TranslationBase.of(context).tempC, ), ), @@ -155,11 +143,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).heart, icon: DQIcons.heart, - lastVal: mode - .vitalSignResModelList[ - mode.vitalSignResModelList.length - 1] - .pulseBeatPerMinute - .toString(), + lastVal: mode.hartRat, unit: TranslationBase.of(context).bpm, ), ), @@ -178,11 +162,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).respirationRate, icon: DQIcons.outline, - lastVal: mode - .vitalSignResModelList[ - mode.vitalSignResModelList.length - 1] - .respirationBeatPerMinute - .toString(), + lastVal: mode.respirationBeatPerMinute, unit: TranslationBase.of(context).respirationSigns, ), ), @@ -205,11 +185,7 @@ class VitalSignDetailsScreen extends StatelessWidget { child: VitalSignItem( des: TranslationBase.of(context).bloodPressure, icon: DQIcons.blood_pressure, - lastVal: mode - .vitalSignResModelList[ - mode.vitalSignResModelList.length - 1] - .bloodPressure - .toString(), + lastVal: mode.bloodPressure, unit: TranslationBase.of(context).sysDias, ), ), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 2cbee1df..1f1a7172 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -883,6 +883,7 @@ class TranslationBase { String get range => localizedValues['range'][locale.languageCode]; String get outpatient => localizedValues['out-patient'][locale.languageCode]; String get inPatient => localizedValues['in-patient'][locale.languageCode]; + String get liveCare => localizedValues['liveCare'][locale.languageCode]; String get report => localizedValues['report'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart index 0fe387e8..0e0b27ae 100644 --- a/lib/widgets/data_display/medical/doctor_card.dart +++ b/lib/widgets/data_display/medical/doctor_card.dart @@ -19,6 +19,7 @@ class DoctorCard extends StatelessWidget { final Function onTap; final Function onEmailTap; final bool isInOutPatient; + final bool isLiveCareAppointment; DoctorCard( {this.name, @@ -29,7 +30,8 @@ class DoctorCard extends StatelessWidget { this.billNo, this.onTap, this.onEmailTap, - this.isInOutPatient}); + this.isInOutPatient, + this.isLiveCareAppointment = false}); @override Widget build(BuildContext context) { @@ -53,12 +55,19 @@ class DoctorCard extends StatelessWidget { Row( children: [ Container( - width:projectViewModel.isArabic? 27:20, - height: date == null ? projectViewModel.isArabic? 185 :100 : 180, + width: projectViewModel.isArabic ? 27 : 20, + height: date == null + ? projectViewModel.isArabic + ? 185 + : 100 + : 180, decoration: BoxDecoration( - color: !isInOutPatient + //Colors.red[900] Color(0xff404545) + color: isLiveCareAppointment ? Color(0xff404545) - : Theme.of(context).primaryColor, + : !isInOutPatient + ? Colors.red[900] + : Theme.of(context).primaryColor, borderRadius: BorderRadius.only( topLeft: projectViewModel.isArabic ? Radius.circular(0) @@ -66,21 +75,29 @@ class DoctorCard extends StatelessWidget { bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), - topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0), - bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), ), ), child: RotatedBox( quarterTurns: 3, child: Center( child: Text( - !isInOutPatient + isLiveCareAppointment ? TranslationBase.of(context) - .inPatient + .liveCare .toUpperCase() - : TranslationBase.of(context) - .outpatient - .toUpperCase(), + : !isInOutPatient + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -96,7 +113,7 @@ class DoctorCard extends StatelessWidget { Expanded( flex: 1, child: LargeAvatar( - name:name, + name: name, url: profileUrl, ), ), @@ -108,23 +125,22 @@ class DoctorCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context).dr+" "+ name, + TranslationBase.of(context).dr + + " " + + name, bold: true, ), Texts( subName, - ), if (billNo != null) Row( children: [ Texts( '${TranslationBase.of(context).billNo}: ', - ), Texts( billNo, - ) ], ),