From 405a363e2854af505af6a5ba6e60ef3c3455465c Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 28 Jun 2021 17:32:50 +0300 Subject: [PATCH 1/3] referral change --- .../viewModel/patient-referral-viewmodel.dart | 8 +-- .../patient-referral-item-widget.dart | 49 +++++++++++++------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 2e3a6605..4240e848 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -303,13 +303,13 @@ class PatientReferralViewModel extends BaseViewModel { String getReferralStatusNameByCode(int statusCode, BuildContext context) { switch (statusCode) { case 1: - return TranslationBase.of(context).pending /*referralStatusHold*/; + return TranslationBase.of(context).referralStatusHold /*pending*/; case 2: - return TranslationBase.of(context).accepted /*referralStatusActive*/; + return TranslationBase.of(context).referralStatusActive /* accepted*/; case 4: - return TranslationBase.of(context).rejected /*referralStatusCancelled*/; + return TranslationBase.of(context).referralStatusCancelled /*rejected*/; case 46: - return TranslationBase.of(context).accepted /*referralStatusCompleted*/; + return TranslationBase.of(context).referralStatusCompleted /*accepted*/; case 63: return TranslationBase.of(context).rejected /*referralStatusNotSeen*/; default: diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index a898e39c..6d573cc4 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -44,7 +44,9 @@ class PatientReferralItemWidget extends StatelessWidget { this.doctorAvatar, this.referralDoctorName, this.clinicDescription, - this.infoIcon,this.isReferralClinic=false,this.referralClinic}); + this.infoIcon, + this.isReferralClinic = false, + this.referralClinic}); @override Widget build(BuildContext context) { @@ -58,9 +60,13 @@ class PatientReferralItemWidget extends StatelessWidget { child: CardWithBgWidget( bgColor: referralStatusCode == 1 ? Color(0xffc4aa54) - : referralStatusCode == 46 || referralStatusCode == 2 + : referralStatusCode == 2 ? Colors.green[700] - : Colors.red[700], + : referralStatusCode == 46 + ? Colors.green[900] + : referralStatusCode == 4 + ? Colors.red[700] + : Colors.red[900], hasBorder: false, widget: Container( // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), @@ -78,9 +84,13 @@ class PatientReferralItemWidget extends StatelessWidget { fontWeight: FontWeight.w700, color: referralStatusCode == 1 ? Color(0xffc4aa54) - : referralStatusCode == 46 || referralStatusCode == 2 + : referralStatusCode == 2 ? Colors.green[700] - : Colors.red[700], + : referralStatusCode == 46 + ? Colors.green[900] + : referralStatusCode == 4 + ? Colors.red[700] + : Colors.red[900], ), AppText( referredDate, @@ -158,7 +168,10 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - isSameBranch ? TranslationBase.of(context).referredFrom :TranslationBase.of(context).refClinic, + isSameBranch + ? TranslationBase.of(context) + .referredFrom + : TranslationBase.of(context).refClinic, fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.7 * SizeConfig.textMultiplier, @@ -166,7 +179,13 @@ class PatientReferralItemWidget extends StatelessWidget { ), Expanded( child: AppText( - !isReferralClinic? isSameBranch ? TranslationBase.of(context).sameBranch : TranslationBase.of(context).otherBranch: " "+referralClinic, + !isReferralClinic + ? isSameBranch + ? TranslationBase.of(context) + .sameBranch + : TranslationBase.of(context) + .otherBranch + : " " + referralClinic, fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -217,7 +236,7 @@ class PatientReferralItemWidget extends StatelessWidget { ), Expanded( child: AppText( - remark??"", + remark ?? "", fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -261,13 +280,13 @@ class PatientReferralItemWidget extends StatelessWidget { }, )) : Container( - child: Image.asset( - patientGender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, - ), - ), + child: Image.asset( + patientGender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), ), ), Expanded( From 4c8f79c87e92c1302e80f6d8575f6ba67422c45f Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 28 Jun 2021 17:58:50 +0300 Subject: [PATCH 2/3] Fix medical report issues --- .../medical_report/PatientMedicalReportService.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart index 01a09592..dfb9c3ae 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -15,9 +15,8 @@ class PatientMedicalReportService extends BaseService { body['AdmissionNo'] = patient.admissionNo; body['SetupID'] = doctorProfile.setupID; body['ProjectID'] = doctorProfile.projectID; - + medicalReportList = []; await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { - medicalReportList.clear(); if (response['DAPP_ListMedicalReportList'] != null) { response['DAPP_ListMedicalReportList'].forEach((v) { medicalReportList.add(MedicalReportModel.fromJson(v)); From eb40cc819d15a3632b6c15c16aebbcca5311ef83 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 30 Jun 2021 10:51:42 +0300 Subject: [PATCH 3/3] fix video call --- lib/models/livecare/start_call_res.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index e3c1a54f..44921d5f 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -24,7 +24,7 @@ class StartCallRes { isAuthenticated = json['IsAuthenticated']; messageStatus = json['MessageStatus']; appointmentNo = json['AppointmentNo']; - isRecording = json['isRecording']; + isRecording = json['IsRecordedSession'] ?? false; } Map toJson() { @@ -35,7 +35,7 @@ class StartCallRes { data['IsAuthenticated'] = this.isAuthenticated; data['MessageStatus'] = this.messageStatus; data['AppointmentNo'] = this.appointmentNo; - data['isRecording'] = this.isRecording; + data['IsRecordedSession'] = this.isRecording ?? false; return data; } }