From b735a69a4f0e7c699e2326713017a557abdee9f4 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 7 Apr 2021 16:53:01 +0300 Subject: [PATCH 1/2] bug fixes --- .../referral/my-referral-detail-screen.dart | 1 + .../referral/my-referral-patient-screen.dart | 8 ++---- .../patient-referral-item-widget.dart | 28 +++++++++++-------- ...ent-profile-header-new-design-app-bar.dart | 2 +- .../patient-profile-header-new-design.dart | 2 +- ..._profile_header_with_appointment_card.dart | 2 +- ..._header_with_appointment_card_app_bar.dart | 2 +- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index a4510907..d1800285 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -17,6 +17,7 @@ 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/borderedButton.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index e6cccf48..986cf54f 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widg import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import '../../../../routes.dart'; @@ -74,11 +75,8 @@ class MyReferralPatientScreen extends StatelessWidget { 'referral': model.pendingReferral[index] }); }, - child: Icon( - Icons.info_outline, - color: Colors.black, - size: 30, - ), + child: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), ), ), ), diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 1404f9af..1ce84387 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -463,36 +463,41 @@ class PatientReferralItemWidget extends StatelessWidget { width: 30, height: 30, margin: EdgeInsets.only( - left: projectViewModel.isArabic ? 10 : 10 /*10:85*/, - right: projectViewModel.isArabic ? 10 : 10 /*85:10*/, + left: + projectViewModel.isArabic ? 10 : 10 /*10:85*/, + right: + projectViewModel.isArabic ? 10 : 10 /*85:10*/, top: 5), decoration: BoxDecoration( shape: BoxShape.rectangle, border: Border( - bottom: - BorderSide(color: Colors.grey[400], width: 2.5), - left: - BorderSide(color: Colors.grey[400], width: 2.5), + bottom: BorderSide( + color: Colors.grey[400], width: 2.5), + left: BorderSide( + color: Colors.grey[400], width: 2.5), )), ), Expanded( flex: 4, child: Container( - margin: EdgeInsets.only(left: 10, top: 25, right : 10, bottom: 0), + margin: EdgeInsets.only( + left: 10, top: 25, right: 10, bottom: 0), child: Column( children: [ RichText( text: TextSpan( style: TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, + fontSize: + 2.0 * SizeConfig.textMultiplier, color: Colors.black), children: [ TextSpan( text: TranslationBase.of(context) - .referralDoctor + + .referralDoctor + " : ", style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), + fontSize: 14, + fontFamily: 'Poppins')), TextSpan( text: referralDoctorName, style: TextStyle( @@ -511,8 +516,7 @@ class PatientReferralItemWidget extends StatelessWidget { Container( width: double.infinity, alignment: Alignment.centerRight, - child: Icon(FontAwesomeIcons.arrowRight, - size: 25, color: Colors.black)) + child: infoIcon ?? Container()) ], ), // onTap: onTap, diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index d49798f4..3ac6888e 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -116,7 +116,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget fontFamily: 'Poppins', fontSize: 12, ), - arrivalType == '1' + arrivalType == '1'|| patient.arrivedOn == null ? AppText( patient.startTime != null ? patient.startTime diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 4f96ac67..1716c7ee 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -116,7 +116,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { fontFamily: 'Poppins', fontSize: 12, ), - arrivalType == '1' + arrivalType == '1' || patient.arrivedOn == null ? AppText( patient.startTime != null ? patient.startTime diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart index 61cb7b52..beb247a9 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart @@ -150,7 +150,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { 'Poppins', fontSize: 12, ), - arrivalType == '1' + arrivalType == '1' || patient.arrivedOn == null ? AppText( patient.startTime != null diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index d63754df..a00ae6ef 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -150,7 +150,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre 'Poppins', fontSize: 12, ), - arrivalType == '1' + arrivalType == '1' || patient.arrivedOn == null ? AppText( patient.startTime != null From 583e06c5f21c4ccdf5330c6a02560c4abbb7133c Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 7 Apr 2021 18:00:00 +0300 Subject: [PATCH 2/2] re-design --- .../profile/profile_medical_info_widget.dart | 141 ++++++------------ .../profile_medical_info_widget_search.dart | 68 ++++----- .../objective/update_objective_page.dart | 62 ++++---- 3 files changed, 116 insertions(+), 155 deletions(-) diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 6b9c5015..3dc153e4 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -43,34 +43,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget { childAspectRatio: 1 / 1.0, crossAxisCount: 3, children: [ - /*if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - isDisable: patient.episodeNo != 0 ? true : false, - nameLine1: TranslationBase.of(context).createNew, - nameLine2: TranslationBase.of(context).episode, - route: CREATE_EPISODE, - onTap: () async { - PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( - appointmentNo: patient.appointmentNo, - patientMRN: patient.patientMRN); - await model.postEpisode(postEpisodeReqModel); - patient.episodeNo = model.episodeID; - Navigator.of(context).pushNamed(CREATE_EPISODE, - arguments: {'patient': patient}); - }, - isLoading: model.state == ViewState.BusyLocal, - icon: 'create-episod.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - isDisable: patient.episodeNo == 0 ? true : false, - nameLine1: TranslationBase.of(context).update, - nameLine2: TranslationBase.of(context).episode, - route: UPDATE_EPISODE, - icon: 'modilfy-episode.png'),*/ if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -89,61 +61,38 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: LAB_RESULT, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), + route: MEDICAL_FILE, + nameLine1: TranslationBase.of(context).previewHealth, + nameLine2: TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: TranslationBase.of(context).previewHealth, - nameLine2: TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - if (selectedPatientType != 0 && - selectedPatientType != 5 && - selectedPatientType != 7) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), + route: LAB_RESULT, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_ADMISSION_REQUEST, - isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), - // (int.parse(patientType) == 7 || int.parse(patientType) == 6) - // ? PatientProfileButton( - // key: key, - // patient: patient, - // patientType: patientType, - // arrivalType: arrivalType, - // route: ORDER_PRESCRIPTION, - // nameLine1: TranslationBase.of(context).orders, - // nameLine2: TranslationBase.of(context).prescription, - // icon: 'patient/order_prescription.png') - // : PatientProfileButton( - // key: key, - // patient: patient, - // patientType: patientType, - // arrivalType: arrivalType, - // route: ORDER_PRESCRIPTION_HISTORY, - // nameLine1: TranslationBase.of(context).orders, - // nameLine2: TranslationBase.of(context).prescription, - // icon: 'patient/order_prescription.png'), + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), PatientProfileButton( key: key, patient: patient, @@ -169,11 +118,10 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).myReferral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -201,29 +149,34 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + route: REFER_PATIENT_TO_DOCTOR, + isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).myReferral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + route: PATIENT_ADMISSION_REQUEST, + isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'patient/admission_req.png'), + if (selectedPatientType != 0 && + selectedPatientType != 5 && + selectedPatientType != 7) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), ], ), ); diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index c49c4576..41ec8f77 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -39,19 +39,21 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + icon: 'patient/vital_signs.png'), PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), + route: MEDICAL_FILE, + nameLine1: TranslationBase.of(context).previewHealth, + nameLine2: TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, @@ -66,19 +68,19 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - from: from, - to: to, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), - // PatientProfileButton( - // key: key, - // patient: patient, - // route: PATIENT_ADMISSION_REQUEST, - // nameLine1: TranslationBase.of(context).admission, - // nameLine2: TranslationBase.of(context).request, - // icon: 'heartbeat.png'), + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), (int.parse(patientType) == 7 || int.parse(patientType) == 6) ? PatientProfileButton( key: key, @@ -103,19 +105,10 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: TranslationBase.of(context).previewHealth, - nameLine2: TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), PatientProfileButton( key: key, patient: patient, @@ -125,6 +118,13 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), + // PatientProfileButton( + // key: key, + // patient: patient, + // route: PATIENT_ADMISSION_REQUEST, + // nameLine1: TranslationBase.of(context).admission, + // nameLine2: TranslationBase.of(context).request, + // icon: 'heartbeat.png'), PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart index 9a8146f5..e8c3b831 100644 --- a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart @@ -134,7 +134,7 @@ class _UpdateObjectivePageState extends State { HeaderBodyExpandableNotifier( headerWidget: Row( mainAxisAlignment: - MainAxisAlignment.spaceBetween, + MainAxisAlignment.spaceBetween, children: [ Row( children: [ @@ -142,7 +142,7 @@ class _UpdateObjectivePageState extends State { "${TranslationBase.of(context).physicalSystemExamination}", fontFamily: 'Poppins', fontSize: - SizeConfig.textMultiplier * 2.0, + SizeConfig.textMultiplier * 2.0, fontWeight: isSysExaminationExpand ? FontWeight.w700 : FontWeight.normal, @@ -158,7 +158,7 @@ class _UpdateObjectivePageState extends State { onTap: () { setState(() { isSysExaminationExpand = - !isSysExaminationExpand; + !isSysExaminationExpand; }); }, child: Icon(isSysExaminationExpand @@ -176,7 +176,7 @@ class _UpdateObjectivePageState extends State { padding: EdgeInsets.symmetric( vertical: 8, horizontal: 8.0), margin: - EdgeInsets.symmetric(vertical: 8), + EdgeInsets.symmetric(vertical: 8), decoration: BoxDecoration( border: Border.all( color: Colors.grey.shade400, @@ -188,33 +188,33 @@ class _UpdateObjectivePageState extends State { ), child: Row( mainAxisAlignment: - MainAxisAlignment.spaceBetween, + MainAxisAlignment.spaceBetween, crossAxisAlignment: - CrossAxisAlignment.center, + CrossAxisAlignment.center, children: [ Expanded( child: Column( - crossAxisAlignment: + crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${TranslationBase.of(context).addExamination}", - fontSize: SizeConfig + children: [ + AppText( + "${TranslationBase.of(context).addExamination}", + fontSize: SizeConfig .textMultiplier * - 1.8, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - AppText( - "${TranslationBase.of(context).searchHere}", - fontSize: SizeConfig + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + AppText( + "${TranslationBase.of(context).searchHere}", + fontSize: SizeConfig .textMultiplier * - 1.8, - color: Colors.grey.shade700, - fontWeight: FontWeight.bold, - ), - ], - )), + 1.8, + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + ), + ], + )), Icon( Icons.add_box_rounded, size: 25, @@ -223,7 +223,7 @@ class _UpdateObjectivePageState extends State { ), ), ), - /* ...List.generate( + /* ...List.generate( widget.mySelectedExamination.length, (index) => Container( child: ExaminationIitemCard( @@ -278,8 +278,16 @@ class _UpdateObjectivePageState extends State { child: AppButton( title: TranslationBase.of(context).next, loading: model.state == ViewState.BusyLocal, - color: HexColor("#A5A5A5"), - fontColor: HexColor("#5A5A5A"), + color: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 + ? HexColor("#D02127") + : HexColor("#A5A5A5"), + fontColor: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"), + disabled: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 + ? false + : true, fontWeight: FontWeight.bold, onPressed: () async { await submitUpdateObjectivePage(model);