From 783c74108b81221ae6ed64642603fe64c8408892 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 28 Jun 2021 10:52:28 +0300 Subject: [PATCH 1/3] video isRecord change --- android/app/src/main/res/layout/activity_video_call.xml | 2 +- .../profile/profile_screen/patient_profile_screen.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/res/layout/activity_video_call.xml b/android/app/src/main/res/layout/activity_video_call.xml index 8dc33094..03c55729 100644 --- a/android/app/src/main/res/layout/activity_video_call.xml +++ b/android/app/src/main/res/layout/activity_video_call.xml @@ -121,8 +121,8 @@ android:id="@+id/record_icon" android:layout_width="@dimen/local_back_icon_size" android:layout_height="@dimen/local_back_icon_size" - android:layout_gravity="center" android:scaleType="centerCrop" + android:layout_margin="5dp" android:src="@drawable/ic_record" /> diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index d8410da1..a1da7882 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -309,7 +309,7 @@ class _PatientProfileScreenState extends State with Single // .openVideo( // model.startCallRes, // patient, - // false, callConnected, // model.startCallRes.isRecording + // model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected, // callDisconnected); // }); if (isCallFinished) { @@ -349,7 +349,7 @@ class _PatientProfileScreenState extends State with Single .openVideo( model.startCallRes, patient, - /*model.startCallRes != null ? model.startCallRes.isRecording : */ true + model.startCallRes != null ? model.startCallRes.isRecording : true , callConnected, callDisconnected); }); From 1e35b70b010d716930053baf45c973f811cb2a7a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 28 Jun 2021 12:13:40 +0300 Subject: [PATCH 2/3] medical report fix --- .../PatientMedicalReportViewModel.dart | 19 +- lib/core/viewModel/base_view_model.dart | 14 +- lib/locator.dart | 2 +- .../AddVerifyMedicalReport.dart | 215 ++++++++++-------- .../medical_report/MedicalReportPage.dart | 57 +++-- 5 files changed, 168 insertions(+), 139 deletions(-) diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index 7866fa69..ac5ecdeb 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -24,19 +24,8 @@ class PatientMedicalReportViewModel extends BaseViewModel { setState(ViewState.Idle); } - bool hasOnHold() { - bool hasHold = false; - medicalReportList.forEach((element) { - if (element.status == 1) { - hasHold = true; - } - }); - - return hasHold; - } - Future getMedicalReportTemplate() async { - setState(ViewState.BusyLocal); + setState(ViewState.Busy); await _service.getMedicalReportTemplate(); if (_service.hasError) { error = _service.error; @@ -62,7 +51,7 @@ class PatientMedicalReportViewModel extends BaseViewModel { error = _service.error; setState(ViewState.ErrorLocal); } else - getMedicalReportList(patient); + await getMedicalReportList(patient); setState(ViewState.Idle); } @@ -73,7 +62,7 @@ class PatientMedicalReportViewModel extends BaseViewModel { error = _service.error; setState(ViewState.ErrorLocal); } else - getMedicalReportList(patient); + await getMedicalReportList(patient); setState(ViewState.Idle); } @@ -84,7 +73,7 @@ class PatientMedicalReportViewModel extends BaseViewModel { error = _service.error; setState(ViewState.ErrorLocal); } else - getMedicalReportList(patient); + await getMedicalReportList(patient); setState(ViewState.Idle); } } diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index 9d7032aa..794706a6 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -19,12 +19,12 @@ class BaseViewModel extends ChangeNotifier { void setState(ViewState viewState) { _state = viewState; + notifyListeners(); } Future getDoctorProfile({bool isGetProfile = false}) async { - if(isGetProfile) - { + if (isGetProfile) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (profile != null) { doctorProfile = DoctorProfileModel.fromJson(profile); @@ -46,10 +46,10 @@ class BaseViewModel extends ChangeNotifier { return doctorProfile; } } - - setDoctorProfile(DoctorProfileModel doctorProfile)async { - await sharedPref.setObj(DOCTOR_PROFILE, doctorProfile); - this.doctorProfile = doctorProfile; - notifyListeners(); + + setDoctorProfile(DoctorProfileModel doctorProfile) async { + await sharedPref.setObj(DOCTOR_PROFILE, doctorProfile); + this.doctorProfile = doctorProfile; + notifyListeners(); } } diff --git a/lib/locator.dart b/lib/locator.dart index e2c578df..d74fad8b 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -124,6 +124,6 @@ void setupLocator() { locator.registerFactory(() => PatientSearchViewModel()); locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => LiveCarePatientViewModel()); - locator.registerLazySingleton(() => PatientMedicalReportViewModel()); + locator.registerFactory(() => PatientMedicalReportViewModel()); locator.registerFactory(() => ScanQrViewModel()); } diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index 304b39ac..4a6be6c8 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -1,13 +1,10 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportPage.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -15,9 +12,27 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/html_rich_editor.d import 'package:flutter/material.dart'; import 'package:html_editor_enhanced/html_editor.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:provider/provider.dart'; class AddVerifyMedicalReport extends StatefulWidget { + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final MedicalReportModel medicalReport; + final PatientMedicalReportViewModel model; + final MedicalReportStatus status; + final String medicalNote; + + const AddVerifyMedicalReport( + {Key key, + this.patient, + this.patientType, + this.arrivalType, + this.medicalReport, + this.model, + this.status, + this.medicalNote}) + : super(key: key); + @override _AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState(); } @@ -25,121 +40,121 @@ class AddVerifyMedicalReport extends StatefulWidget { class _AddVerifyMedicalReportState extends State { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatientMedicalReportViewModel patientMedicalReportViewModel = routeArgs['model']; - PatiantInformtion patient = routeArgs['patient']; - MedicalReportStatus status = routeArgs['status'] as MedicalReportStatus; - MedicalReportModel medicalReport = routeArgs.containsKey("medicalReport") ? routeArgs['medicalReport'] : null; + String txtOfMedicalReport; return BaseView( - onModelReady: (_) => patientMedicalReportViewModel.getMedicalReportTemplate(), + onModelReady: (model) async {}, builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, - appBarTitle: status == MedicalReportStatus.ADD + appBarTitle: widget.status == MedicalReportStatus.ADD ? TranslationBase.of(context).medicalReportAdd : TranslationBase.of(context).medicalReportVerify, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - body: model.state == ViewState.BusyLocal - ? AppLoaderWidget() - : Column( - children: [ - Expanded( - child: Container( - margin: EdgeInsets.all(16), - child: Column( - children: [ - Expanded( - child: SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // if (model.medicalReportTemplate.length > 0) - HtmlRichEditor( - initialText: (medicalReport != null - ? medicalReport.reportDataHtml - : model.medicalReportTemplate[0].templateText.length > 0 - ? model.medicalReportTemplate[0].templateText - : ""), - hint: "Write the medical report ", - height: MediaQuery.of(context).size.height * 0.75, - ), - ], + body: Column( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(16), + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.medicalReportTemplate.length > 0) + HtmlRichEditor( + initialText: (widget.medicalReport != null + ? widget.medicalNote + : widget.model.medicalReportTemplate[0].templateText.length > 0 + ? widget.model.medicalReportTemplate[0].templateText + : ""), + hint: "Write the medical report ", + height: MediaQuery.of(context).size.height * 0.75, ), - ), - ), + ], ), - ], + ), ), ), - ), - Container( - padding: EdgeInsets.all(16.0), - color: Colors.white, - child: Row( - children: [ - Expanded( - child: AppButton( - title: status == MedicalReportStatus.ADD - ? TranslationBase.of(context).save - : TranslationBase.of(context).save, - color: Color(0xffEAEAEA), - fontColor: Colors.black, - // disabled: progressNoteController.text.isEmpty, - fontWeight: FontWeight.w700, - onPressed: () async { - String txtOfMedicalReport = await HtmlEditor.getText(); + ], + ), + ), + ), + Container( + padding: EdgeInsets.all(16.0), + color: Colors.white, + child: Row( + children: [ + Expanded( + child: AppButton( + title: widget.status == MedicalReportStatus.ADD + ? TranslationBase.of(context).save + : TranslationBase.of(context).save, + color: Color(0xffEAEAEA), + fontColor: Colors.black, + // disabled: progressNoteController.text.isEmpty, + fontWeight: FontWeight.w700, + onPressed: () async { + txtOfMedicalReport = await HtmlEditor.getText(); - if (txtOfMedicalReport.isNotEmpty) { - GifLoaderDialogUtils.showMyDialog(context); - medicalReport != null - ? model.updateMedicalReport( - patient, - txtOfMedicalReport, - medicalReport != null ? medicalReport.lineItemNo : null, - medicalReport != null ? medicalReport.invoiceNo : null) - : model.addMedicalReport(patient, txtOfMedicalReport); - //model.getMedicalReportList(patient); + if (txtOfMedicalReport.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + widget.medicalReport != null + ? widget.model.updateMedicalReport( + widget.patient, + txtOfMedicalReport, + widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, + widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) + : widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); + //model.getMedicalReportList(patient); - Navigator.pop(context); + Navigator.pop(context); - GifLoaderDialogUtils.hideDialog(context); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - } - }, - ), - ), - SizedBox( - width: 8, - ), - if (medicalReport != null) - Expanded( - child: AppButton( - title: status == MedicalReportStatus.ADD - ? TranslationBase.of(context).add - : TranslationBase.of(context).verify, - color: Color(0xff359846), - fontWeight: FontWeight.w700, - onPressed: () async { - GifLoaderDialogUtils.showMyDialog(context); - await model.verifyMedicalReport(patient, medicalReport); - GifLoaderDialogUtils.hideDialog(context); - Navigator.pop(context); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - }, - ), - ), - ], + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(widget.model.error); + } + } else { + DrAppToastMsg.showErrorToast("Please enter medical note"); + } + }, ), ), + SizedBox( + width: 8, + ), + if (widget.medicalReport != null) + Expanded( + child: AppButton( + title: widget.status == MedicalReportStatus.ADD + ? TranslationBase.of(context).add + : TranslationBase.of(context).verify, + color: Color(0xff359846), + fontWeight: FontWeight.w700, + onPressed: () async { + txtOfMedicalReport = await HtmlEditor.getText(); + if (txtOfMedicalReport.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport); + GifLoaderDialogUtils.hideDialog(context); + Navigator.pop(context); + if (widget.model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(widget.model.error); + } + } else { + DrAppToastMsg.showErrorToast("Please enter medical note"); + } + }, + ), + ), ], ), + ), + ], + ), )); } diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index 10cb4be6..22645520 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -40,6 +40,7 @@ class _MedicalReportPageState extends State { return BaseView( onModelReady: (model) async { await model.getMedicalReportList(patient); + await model.getMedicalReportTemplate(); }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -79,13 +80,25 @@ class _MedicalReportPageState extends State { // Helpers.showErrorToast("Please Verified the on hold report to be able to add new one"); // } else - Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { - 'patient': patient, - 'patientType': patientType, - 'arrivalType': arrivalType, - 'type': MedicalReportStatus.ADD, - 'model': model, - }); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddVerifyMedicalReport( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + model: model, + status: MedicalReportStatus.ADD, + )), + ); + + // Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { + // 'patient': patient, + // 'patientType': patientType, + // 'arrivalType': arrivalType, + // 'type': MedicalReportStatus.ADD, + // 'model': model, + // }); }, label: TranslationBase.of(context).createNewMedicalReport, ), @@ -95,13 +108,25 @@ class _MedicalReportPageState extends State { (index) => InkWell( onTap: () { if (model.medicalReportList[index].status == 1) { - Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { - 'patient': patient, - 'patientType': patientType, - 'arrivalType': arrivalType, - 'medicalReport': model.medicalReportList[index], - 'model': model, - }); + // Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { + // 'patient': patient, + // 'patientType': patientType, + // 'arrivalType': arrivalType, + // 'medicalReport': model.medicalReportList[index], + // 'model': model, + // }); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddVerifyMedicalReport( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + medicalReport: model.medicalReportList[index], + model: model, + medicalNote: model.medicalReportList[index].reportDataHtml, + )), + ); } else { Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: { 'patient': patient, @@ -138,8 +163,8 @@ class _MedicalReportPageState extends State { ), AppText( projectViewModel.isArabic - ? model.medicalReportList[index].doctorNameN - : model.medicalReportList[index].doctorName, + ? model.medicalReportList[index].doctorNameN ?? "" + : model.medicalReportList[index].doctorName ?? "", fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: Color(0xFF2E303A), From d839fd3545754b844b6fbbe9db801069c256521d Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 28 Jun 2021 12:19:02 +0300 Subject: [PATCH 3/3] outpatirnt referral changes --- .../viewModel/patient-referral-viewmodel.dart | 3 + .../referral/referred-patient-screen.dart | 13 +- .../referred_patient_detail_in-paint.dart | 195 ++++++++++-------- pubspec.lock | 14 +- 4 files changed, 128 insertions(+), 97 deletions(-) diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 0351db77..08b3feb2 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -322,6 +322,7 @@ class PatientReferralViewModel extends BaseViewModel { patient.doctorId = referredPatient.doctorID; patient.doctorName = referredPatient.doctorName; patient.patientId = referredPatient.patientID; + patient.patientMRN = referredPatient.patientID; patient.firstName = referredPatient.firstName; patient.middleName = referredPatient.middleName; patient.lastName = referredPatient.lastName; @@ -339,6 +340,8 @@ class PatientReferralViewModel extends BaseViewModel { patient.nationalityFlagURL = referredPatient.nationalityFlagURL; patient.age = referredPatient.age; patient.clinicDescription = referredPatient.clinicDescription; + patient.appointmentNo = referredPatient.appointmentNo; + return patient; } diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index c95a28d8..8dce7d60 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -12,8 +12,13 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -class ReferredPatientScreen extends StatelessWidget { +class ReferredPatientScreen extends StatefulWidget { + @override + _ReferredPatientScreenState createState() => _ReferredPatientScreenState(); +} + +class _ReferredPatientScreenState extends State { PatientType patientType = PatientType.IN_PATIENT; @override @@ -30,7 +35,9 @@ class ReferredPatientScreen extends StatelessWidget { margin: EdgeInsets.only(top: 70), child: PatientTypeRadioWidget( (patientType) async { - this.patientType = patientType; + setState(() { + this.patientType = patientType; + }); GifLoaderDialogUtils.showMyDialog(context); if (patientType == PatientType.IN_PATIENT) { await model.getMyReferredPatient(isFirstTime: false); @@ -75,7 +82,7 @@ class ReferredPatientScreen extends StatelessWidget { context, FadePage( page: ReferredPatientDetailScreen( - model.getReferredPatientItem(index)), + model.getReferredPatientItem(index), this.patientType), ), ); }, diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index b3f11c51..f6d3b8d7 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/PatientType.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; @@ -18,8 +19,9 @@ import '../../../../routes.dart'; class ReferredPatientDetailScreen extends StatelessWidget { final MyReferredPatientModel referredPatient; + final PatientType patientType; - ReferredPatientDetailScreen(this.referredPatient); + ReferredPatientDetailScreen(this.referredPatient, this.patientType); @override Widget build(BuildContext context) { @@ -74,7 +76,8 @@ class ReferredPatientDetailScreen extends StatelessWidget { .pushNamed(PATIENTS_PROFILE, arguments: { "patient": patient, "patientType": "1", - "isInpatient": true, + "isInpatient": + patientType == PatientType.IN_PATIENT, "arrivalType": "1", "from": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), @@ -93,14 +96,15 @@ class ReferredPatientDetailScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ InkWell( - onTap: (){ + onTap: () { PatiantInformtion patient = - model.getPatientFromReferral(referredPatient); + model.getPatientFromReferral(referredPatient); Navigator.of(context) .pushNamed(PATIENTS_PROFILE, arguments: { "patient": patient, "patientType": "1", - "isInpatient": true, + "isInpatient": + patientType == PatientType.IN_PATIENT, "arrivalType": "1", "from": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), @@ -236,36 +240,37 @@ class ReferredPatientDetailScreen extends StatelessWidget { ), ], ), - if(referredPatient - .frequencyDescription != null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .frequency + - ": ", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * - SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - Expanded( - child: AppText( - referredPatient - .frequencyDescription, + if (referredPatient + .frequencyDescription != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .frequency + + ": ", fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 14, - color: Color(0XFF2E303A), + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), ), - ), - ], - ), + Expanded( + child: AppText( + referredPatient + .frequencyDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 14, + color: Color(0XFF2E303A), + ), + ), + ], + ), ], ), ), @@ -303,56 +308,65 @@ class ReferredPatientDetailScreen extends StatelessWidget { ) ], ), - if(referredPatient.priorityDescription != null) - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).priority + - ": ", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - AppText( - referredPatient.priorityDescription, - fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 14, - color: Color(0XFF2E303A), - ), - ], - ), - if(referredPatient.mAXResponseTime != null) - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .maxResponseTime + - ": ", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, - color: Color(0XFF575757), - ), - Expanded( - child: AppText( - referredPatient.mAXResponseTime != null?AppDateUtils.convertDateFromServerFormat( - referredPatient.mAXResponseTime, - "dd MMM,yyyy"):'', + if (referredPatient.priorityDescription != null) + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority + + ": ", fontFamily: 'Poppins', - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w600, fontSize: - 1.8 * SizeConfig.textMultiplier, + 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + referredPatient.priorityDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 14, color: Color(0XFF2E303A), ), - ), - ], - ), + ], + ), + if (referredPatient.mAXResponseTime != null) + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .maxResponseTime + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.mAXResponseTime != + null + ? AppDateUtils + .convertDateFromServerFormat( + referredPatient + .mAXResponseTime, + "dd MMM,yyyy") + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -518,11 +532,15 @@ class ReferredPatientDetailScreen extends StatelessWidget { color: Color(0XFF2E303A), ), AppText( - referredPatient - .referredDoctorRemarks == null ?'':referredPatient - .referredDoctorRemarks.isNotEmpty - ? referredPatient.referredDoctorRemarks - : TranslationBase.of(context).notRepliedYet, + referredPatient.referredDoctorRemarks == + null + ? '' + : referredPatient.referredDoctorRemarks + .isNotEmpty + ? referredPatient + .referredDoctorRemarks + : TranslationBase.of(context) + .notRepliedYet, fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.6 * SizeConfig.textMultiplier, @@ -538,6 +556,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { ), ), ), + if (patientType == PatientType.IN_PATIENT) Container( margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: AppButton( @@ -548,9 +567,11 @@ class ReferredPatientDetailScreen extends StatelessWidget { fontSize: 1.8, hPadding: 8, vPadding: 12, - disabled: referredPatient.referredDoctorRemarks == null? true: referredPatient.referredDoctorRemarks.isNotEmpty - ? false - : true, + disabled: referredPatient.referredDoctorRemarks == null + ? true + : referredPatient.referredDoctorRemarks.isNotEmpty + ? false + : true, onPressed: () async { await model.verifyReferralDoctorRemarks(referredPatient); if (model.state == ViewState.ErrorLocal) { diff --git a/pubspec.lock b/pubspec.lock index 18379111..a408ffd5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "14.0.0" + version: "12.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.41.2" + version: "0.40.6" archive: dependency: transitive description: @@ -119,7 +119,7 @@ packages: name: build_web_compilers url: "https://pub.dartlang.org" source: hosted - version: "2.15.3" + version: "2.12.2" built_collection: dependency: transitive description: @@ -280,7 +280,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.3.12" + version: "1.3.10" date_time_picker: dependency: "direct main" description: @@ -629,7 +629,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.4" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -921,7 +921,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.1" sticky_headers: dependency: "direct main" description: @@ -1119,5 +1119,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta" + dart: ">=2.10.0 <2.11.0" flutter: ">=1.22.0 <2.0.0"