From 8a6a68cdfe8f667d968b562f7ad8956161eba96f Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 12:51:12 +0200 Subject: [PATCH 1/5] fix app bar --- .../patient_profile_app_bar_model.dart | 9 +- lib/screens/live_care/end_call_screen.dart | 17 +-- .../special_lab_result_details_page.dart | 11 +- .../MedicalReportDetailPage.dart | 7 +- .../patient-referral-item-widget.dart | 112 +++++++----------- .../profile/patient-profile-app-bar.dart | 66 +++++------ 6 files changed, 110 insertions(+), 112 deletions(-) diff --git a/lib/models/patient/profile/patient_profile_app_bar_model.dart b/lib/models/patient/profile/patient_profile_app_bar_model.dart index 97862aaa..9b157b0c 100644 --- a/lib/models/patient/profile/patient_profile_app_bar_model.dart +++ b/lib/models/patient/profile/patient_profile_app_bar_model.dart @@ -1,3 +1,6 @@ + +import 'dart:ui'; + import '../patiant_info_model.dart'; class PatientProfileAppBarModel { @@ -21,6 +24,8 @@ class PatientProfileAppBarModel { bool? isFromLabResult; Stream ?videoCallDurationStream; + VoidCallback? onPressed; + PatientProfileAppBarModel( {this.height = 0.0, @@ -40,7 +45,7 @@ class PatientProfileAppBarModel { this.visitDate, this.clinic, this.isAppointmentHeader = false, - this.isFromLabResult =false, this.videoCallDurationStream}); + this.isFromLabResult =false, this.videoCallDurationStream, this.onPressed}); PatientProfileAppBarModel.fromJson(Map json) { height = json['height']; @@ -62,6 +67,7 @@ class PatientProfileAppBarModel { isAppointmentHeader = json['isAppointmentHeader']; isFromLabResult = json['isFromLabResult']; videoCallDurationStream = json['videoCallDurationStream']; + onPressed = json['onPressed']; } @@ -86,6 +92,7 @@ class PatientProfileAppBarModel { data['isAppointmentHeader'] = this.isAppointmentHeader; data['isFromLabResult'] = this.isFromLabResult; data['videoCallDurationStream'] = this.videoCallDurationStream; + data['onPressed'] = this.onPressed; return data; } } diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 56bf327c..251367c9 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -210,17 +210,20 @@ class _EndCallScreenState extends State { appBarTitle: TranslationBase.of(context).patientProfile!, backgroundColor: Theme.of(context).scaffoldBackgroundColor, isShowAppBar: true, - appBar: PatientProfileAppBar(patient, onPressed: () { - Navigator.pop(context); - }, + patientProfileAppBarModel: PatientProfileAppBarModel( + patient: patient, isInpatient: isInpatient, height: (patient!.patientStatusType != null && - patient!.patientStatusType == 43) + patient!.patientStatusType == 43) ? 210 : isDischargedPatient - ? 240 - : 0, - isDischargedPatient: isDischargedPatient), + ? 240 + : 0, + onPressed: () { + Navigator.pop(context); + } , + isDischargedPatient: isDischargedPatient + ), body: Container( height: !isSearchAndOut ? isDischargedPatient diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart index e338635a..e5e37f97 100644 --- a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart +++ b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -22,9 +23,15 @@ class SpecialLabResultDetailsPage extends StatelessWidget { baseViewModel: model, isShowAppBar: true, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - appBar: PatientProfileAppBar( - patient, + // appBar: PatientProfileAppBar( + // patient, + // ), + patientProfileAppBarModel: PatientProfileAppBarModel( + patient: patient, ), + + + body: Container( child: SingleChildScrollView( child: Column( diff --git a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart index c22511af..6e6a04eb 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/base_view_model.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/models/patient/profile/patient_profile_app_bar_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; @@ -31,8 +32,10 @@ class MedicalReportDetailPage extends StatelessWidget { baseViewModel: model, isShowAppBar: true, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - appBar: PatientProfileAppBar( - patient, + + + patientProfileAppBarModel: PatientProfileAppBarModel( + patient: patient, ), body: Container( child: SingleChildScrollView( diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index e3e784d5..8eca7a93 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -108,15 +108,13 @@ class PatientReferralItemWidget extends StatelessWidget { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - child: AppText( - patientName!, - fontSize: 16.0, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - fontFamily: 'Poppins', - letterSpacing: -0.64, - ), + AppText( + patientName!, + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + letterSpacing: -0.64, ), SizedBox( width: 0, @@ -148,34 +146,23 @@ class PatientReferralItemWidget extends StatelessWidget { Expanded( child: Column( children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - CustomRow( - label: - TranslationBase.of(context).fileNumber!, - value: patientID!, - ), - ], + CustomRow( + label: + TranslationBase.of(context).fileNumber!, + value: patientID!, ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRow( - label: isSameBranch + CustomRow( + label: isSameBranch + ? TranslationBase.of(context) + .referredFrom! + : TranslationBase.of(context).refClinic!, + value: !isReferralClinic! + ? isSameBranch ? TranslationBase.of(context) - .referredFrom! - : TranslationBase.of(context).refClinic!, - value: !isReferralClinic! - ? isSameBranch - ? TranslationBase.of(context) - .sameBranch! - : TranslationBase.of(context) - .otherBranch! - : " " + referralClinic!, - ), - ], + .sameBranch! + : TranslationBase.of(context) + .otherBranch! + : " " + referralClinic!, ), ], ), @@ -205,15 +192,9 @@ class PatientReferralItemWidget extends StatelessWidget { ) ], ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRow( - label: TranslationBase.of(context).remarks! + " : ", - value: remark ?? "", - ), - ], + CustomRow( + label: TranslationBase.of(context).remarks! + " : ", + value: remark ?? "", ), Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -256,33 +237,30 @@ class PatientReferralItemWidget extends StatelessWidget { ), ), ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only( - left: 10, top: 25, right: 10, bottom: 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ + Container( + margin: EdgeInsets.only( + left: 10, top: 25, right: 10, bottom: 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + referralDoctorName ?? "", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 14.0, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + if (clinicDescription != null) AppText( - referralDoctorName ?? "", + clinicDescription??"", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 14.0, - color: Color(0xff2E303A), - letterSpacing: -0.56, + fontSize: 10.0, + color: Color(0xff575757), + letterSpacing: -0.4, ), - if (clinicDescription != null) - AppText( - clinicDescription??"", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 10.0, - color: Color(0xff575757), - letterSpacing: -0.4, - ), - ], - ), + ], ), ), ], diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index b7a0709f..d25b007f 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -34,12 +34,12 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final String? clinic; final bool? isAppointmentHeader; final bool? isFromLabResult; - final VoidCallback? onPressed; + // final VoidCallback? onPressed; PatientProfileAppBar(this.patient, { this.patientProfileAppBarModel, this.isFromLabResult = false, - this.onPressed, + // this.onPressed, this.height=0, this.isInpatient = false, this.isDischargedPatient = false, @@ -96,7 +96,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { icon: Icon(Icons.arrow_back_ios), color: Color(0xFF2B353E), //Colors.black, onPressed: () { - if (onPressed != null) onPressed!(); + if (patientProfileAppBarModel!.onPressed != null) patientProfileAppBarModel!.onPressed!(); Navigator.pop(context); }, ), @@ -417,8 +417,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { label: !isPrescriptions! ? 'Result Date:' : 'Prescriptions Date ', - value: - '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}', + value: AppDateUtils.getDayMonthYearDateFormatted( + patientProfileAppBarModel!.appointmentDate! ) ), ]), ), @@ -438,34 +438,34 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { @override Size get preferredSize => Size( double.maxFinite, - height! == 0 - ? isInpatient - ? (isFromLabResult! ? 210 : 200) - : isAppointmentHeader! - ? 290 - : SizeConfig.isHeightVeryShort - ? 137 - : SizeConfig.isHeightShort - ? 190 - : SizeConfig.heightMultiplier * - (SizeConfig.isWidthLarge ? 25 : 20) - : height! - // TODO Elham*2 - // patientProfileAppBarModel!.height == 0 - // ? patientProfileAppBarModel!.isAppointmentHeader! - // ? 270 - // : ((localPatient!.appointmentDate!.isNotEmpty) - // ? patientProfileAppBarModel!.isFromLabResult! - // ? 190 - // : 170 - // : localPatient!.admissionDate != null - // ? patientProfileAppBarModel!.isFromLabResult! - // ? 190 - // : 170 - // : patientProfileAppBarModel!.isDischargedPatient! - // ? 240 - // : 130) - // : patientProfileAppBarModel!.height! + // height! == 0 + // ? isInpatient + // ? (isFromLabResult! ? 210 : 200) + // : isAppointmentHeader! + // ? 290 + // : SizeConfig.isHeightVeryShort + // ? 137 + // : SizeConfig.isHeightShort + // ? 190 + // : SizeConfig.heightMultiplier * + // (SizeConfig.isWidthLarge ? 25 : 20) + // : height! + // // TODO Elham*2 + patientProfileAppBarModel!.height == 0 + ? patientProfileAppBarModel!.isAppointmentHeader! + ? 270 + : ((patientProfileAppBarModel!.patient!.appointmentDate!.isNotEmpty) + ? patientProfileAppBarModel!.isFromLabResult! + ? 190 + : 200 + : patientProfileAppBarModel!.patient!.admissionDate != null + ? patientProfileAppBarModel!.isFromLabResult! + ? 190 + : 170 + : patientProfileAppBarModel!.isDischargedPatient! + ? 240 + : 130) + : patientProfileAppBarModel!.height! ); } From c35e24219cd787b7663aaba4968e7f74316c83a2 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 14:31:23 +0200 Subject: [PATCH 2/5] fix app bar --- .../profile/patient-profile-app-bar.dart | 78 +++++-------------- 1 file changed, 21 insertions(+), 57 deletions(-) diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index d25b007f..2c7ee7ad 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -16,46 +16,10 @@ import 'large_avatar.dart'; class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion? patient; final PatientProfileAppBarModel? patientProfileAppBarModel; - final double? height; - final bool isInpatient; - final bool isDischargedPatient; - final bool isFromLiveCare; - - final String? doctorName; - final String? branch; - final DateTime? appointmentDate; - final String? profileUrl; - final String? invoiceNO; - final String? orderNo; - final bool? isPrescriptions; - final bool? isMedicalFile; - final String? episode; - final String? visitDate; - final String? clinic; - final bool? isAppointmentHeader; - final bool? isFromLabResult; - // final VoidCallback? onPressed; PatientProfileAppBar(this.patient, { this.patientProfileAppBarModel, - this.isFromLabResult = false, - // this.onPressed, - this.height=0, - this.isInpatient = false, - this.isDischargedPatient = false, - this.isFromLiveCare = false, - this.doctorName, - this.branch, - this.appointmentDate, - this.profileUrl, - this.invoiceNO, - this.orderNo, - this.isPrescriptions=false, - this.isMedicalFile =false, - this.episode, - this.visitDate, - this.clinic, - this.isAppointmentHeader= false}); + }); PatiantInformtion? localPatient; @override @@ -284,11 +248,11 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { HeaderRow( label: TranslationBase.of(context).age! + " : ", value: - "${AppDateUtils.getAgeByBirthday(localPatient!.patientDetails != null ? localPatient!.patientDetails!.dateofBirth ?? "" : localPatient!.dateofBirth ?? "", context, isServerFormat: !isFromLiveCare)}", + "${AppDateUtils.getAgeByBirthday(localPatient!.patientDetails != null ? localPatient!.patientDetails!.dateofBirth ?? "" : localPatient!.dateofBirth ?? "", context, isServerFormat: !patientProfileAppBarModel!.isFromLiveCare!)}", ), if (localPatient!.appointmentDate != null && localPatient!.appointmentDate!.isNotEmpty && - !isFromLabResult!) + !patientProfileAppBarModel!.isFromLabResult!) HeaderRow( label: TranslationBase.of(context).appointmentDate! + " : ", @@ -320,7 +284,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { if (localPatient!.admissionDate != null) HeaderRow( label: "${TranslationBase.of(context).numOfDays}: ", - value: isDischargedPatient && + value: patientProfileAppBarModel!.isDischargedPatient! && localPatient!.dischargeDate != null ? "${AppDateUtils.getDateTimeFromServerFormat(localPatient!.dischargeDate!).difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}" : "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(localPatient!.admissionDate!)).inDays + 1}", @@ -374,7 +338,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - '${TranslationBase.of(context).dr}$doctorName', + '${TranslationBase.of(context).dr}${patientProfileAppBarModel!.doctorName}', color: Color(0xFF2E303A), fontWeight: FontWeight.w700, fontSize: SizeConfig @@ -382,39 +346,39 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { 3.5, isCopyable: true, ), - if (orderNo != null && !isPrescriptions!) + if (patientProfileAppBarModel!.orderNo != null && !(patientProfileAppBarModel!.isPrescriptions!)) HeaderRow( label: 'Order No: ', - value: orderNo ?? '', + value: patientProfileAppBarModel!.orderNo ?? '', ), - if (invoiceNO != null && !isPrescriptions!) + if (patientProfileAppBarModel!.invoiceNO != null && !(patientProfileAppBarModel!.isPrescriptions!)) HeaderRow( label: 'Invoice: ', - value: invoiceNO ?? "", + value: patientProfileAppBarModel!.invoiceNO ?? "", ), - if (branch != null) + if (patientProfileAppBarModel!.branch != null) HeaderRow( label: 'Branch: ', - value: branch ?? '', + value: patientProfileAppBarModel!.branch ?? '', ), - if (clinic != null) + if (patientProfileAppBarModel!.clinic != null) HeaderRow( label: 'Clinic: ', - value: clinic ?? '', + value: patientProfileAppBarModel!.clinic ?? '', ), - if (isMedicalFile! && episode != null) + if (patientProfileAppBarModel!.isMedicalFile! && patientProfileAppBarModel!.episode != null) HeaderRow( label: 'Episode: ', - value: episode ?? '', + value: patientProfileAppBarModel!.episode ?? '', ), - if (isMedicalFile! && visitDate != null) + if (patientProfileAppBarModel!.isMedicalFile! && patientProfileAppBarModel!.visitDate != null) HeaderRow( label: 'Visit Date: ', - value: visitDate ?? '', + value: patientProfileAppBarModel!.visitDate ?? '', ), - if (!isMedicalFile!) + if (!(patientProfileAppBarModel!.isMedicalFile!)) HeaderRow( - label: !isPrescriptions! + label: !(patientProfileAppBarModel!.isPrescriptions!) ? 'Result Date:' : 'Prescriptions Date ', value: AppDateUtils.getDayMonthYearDateFormatted( @@ -460,8 +424,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { : 200 : patientProfileAppBarModel!.patient!.admissionDate != null ? patientProfileAppBarModel!.isFromLabResult! - ? 190 - : 170 + ? 210 + : 200 : patientProfileAppBarModel!.isDischargedPatient! ? 240 : 130) From 193aed65045c9db9865fbcc46bf2531c542194b8 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 14:41:23 +0200 Subject: [PATCH 3/5] fix button size --- .../patients/profile/UCAF/ucaf_pager_screen.dart | 2 -- .../profile_screen/patient_profile_screen.dart | 4 ++-- .../profile/referral/my-referral-detail-screen.dart | 2 -- .../referral/referral_patient_detail_in-paint.dart | 1 - .../referral/referred_patient_detail_in-paint.dart | 1 - .../RegisterConfirmationPatientPage.dart | 2 -- .../register_patient/RegisterPatientPage.dart | 4 ---- .../register_patient/RegisterSearchPatientPage.dart | 2 -- .../patients/register_patient/VerifyMethodPage.dart | 2 -- .../patients/profile/patient-profile-app-bar.dart | 13 ------------- 10 files changed, 2 insertions(+), 31 deletions(-) diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index acaf3a98..54cdc6c3 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -183,7 +183,6 @@ class _UCAFPagerScreenState extends State borderColor: Colors.white, color: Colors.white, fontColor: Color(0xFFB8382B), - fontSize: 2.2, onPressed: () { Navigator.of(context).popUntil((route) { return route.settings.name == PATIENTS_PROFILE; @@ -205,7 +204,6 @@ class _UCAFPagerScreenState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 2.0, onPressed: () { model.saveUCAFOnTap(); }, 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 21c964a5..0ababe81 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -253,7 +253,7 @@ class _PatientProfileScreenState extends State radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 1.6, + // fontSize: 1.6, icon: Image.asset( "assets/images/create-episod.png", color: Colors.white, @@ -289,7 +289,7 @@ class _PatientProfileScreenState extends State radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 1.6, + // fontSize: 1.6, icon: Image.asset( "assets/images/modilfy-episode.png", color: Colors.white, 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 be7cbd91..73817fec 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -378,7 +378,6 @@ class MyReferralDetailScreen extends StatelessWidget { title: TranslationBase.of(context).accept, color: Color(0xFF4BA821), fontColor: Colors.white, - fontSize: 1.6, hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, @@ -406,7 +405,6 @@ class MyReferralDetailScreen extends StatelessWidget { title: TranslationBase.of(context).reject, color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 1.6, hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index fb694a0d..7fe93958 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -484,7 +484,6 @@ class ReferralPatientDetailScreen extends StatelessWidget { color: Colors.red[700], fontColor: Colors.white, fontWeight: FontWeight.w700, - fontSize: 1.8, hPadding: 8, vPadding: 12, onPressed: () async { 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 04cf6a1d..ae2e4fad 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 @@ -557,7 +557,6 @@ class ReferredPatientDetailScreen extends StatelessWidget { color: Colors.red[700], fontColor: Colors.white, fontWeight: FontWeight.w700, - fontSize: 1.8, hPadding: 8, vPadding: 12, disabled: referredPatient.referredDoctorRemarks == null diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index 08cec4a0..d0d211fb 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -363,7 +363,6 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, onPressed: () { Navigator.of(context).pop(); }, @@ -383,7 +382,6 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFB8382B), color: Color(0xFFB8382B), fontColor: Colors.white, - fontSize: 2.0, onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index 5a65146c..ecea3188 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -143,7 +143,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, onPressed: () { Navigator.of(context).pop(); }, @@ -163,7 +162,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFF359846), color: Color(0xFF359846), fontColor: Colors.white, - fontSize: 2.0, onPressed: () {}, ), ), @@ -186,7 +184,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, onPressed: () { Navigator.of(context).pop(); }, @@ -206,7 +203,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - fontSize: 2.0, onPressed: () { changePageViewIndex(_currentIndex + 1); }, diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 975ef30e..96378773 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -283,7 +283,6 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, onPressed: () { Navigator.of(context).pop(); }, @@ -303,7 +302,6 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFB8382B), color: Color(0xFFB8382B), fontColor: Colors.white, - fontSize: 2.0, onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index c60b5012..31c882f3 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -440,7 +440,6 @@ class _ActivationPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - fontSize: 2.2, onPressed: () { Navigator.of(context).pop(); }, @@ -460,7 +459,6 @@ class _ActivationPageState extends State { borderColor: Color(0xFFB8382B), color: HexColor("#D02127"), fontColor: Colors.white, - fontSize: 2.0, onPressed: () async { GifLoaderDialogUtils.showMyDialog(context); await widget.model.checkActivationCode( diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index 2c7ee7ad..d362a8bb 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -402,19 +402,6 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { @override Size get preferredSize => Size( double.maxFinite, - // height! == 0 - // ? isInpatient - // ? (isFromLabResult! ? 210 : 200) - // : isAppointmentHeader! - // ? 290 - // : SizeConfig.isHeightVeryShort - // ? 137 - // : SizeConfig.isHeightShort - // ? 190 - // : SizeConfig.heightMultiplier * - // (SizeConfig.isWidthLarge ? 25 : 20) - // : height! - // // TODO Elham*2 patientProfileAppBarModel!.height == 0 ? patientProfileAppBarModel!.isAppointmentHeader! ? 270 From 3d76ae694905f5fe4ee3c100617e3ca1cfc18479 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 14:48:57 +0200 Subject: [PATCH 4/5] fix search --- .../shared/text_fields/app_text_field_custom_serach.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart index a32588db..24ae8ea5 100644 --- a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart +++ b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart @@ -55,7 +55,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { onPressed: () {}, ), controller: searchController, - onChanged: (value)=>onChangeFun, + onChanged: (value){onChangeFun!(value);}, onFieldSubmitted: ()=>onFieldSubmitted, validationError: validationError), if (positionedChild != null) From a11d9f60fd6dbac96cb74e5aa0a2e271f7681741 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 15:58:53 +0200 Subject: [PATCH 5/5] fix app profile --- .../procedure/procedure_service.dart | 2 +- lib/core/viewModel/procedure_View_model.dart | 2 +- .../profile/patient-profile-app-bar.dart | 23 ++++++++++--------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/core/service/patient_medical_file/procedure/procedure_service.dart b/lib/core/service/patient_medical_file/procedure/procedure_service.dart index 3ce2375e..6c51b288 100644 --- a/lib/core/service/patient_medical_file/procedure/procedure_service.dart +++ b/lib/core/service/patient_medical_file/procedure/procedure_service.dart @@ -107,7 +107,7 @@ class ProcedureService extends BaseService { }, body: _procedureTempleteDetailsRequestModel.toJson()); } - Future getProcedure({int? mrn, required int appointmentNo}) async { + Future getProcedure({int? mrn}) async { _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel( patientMRN: mrn, ); diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 4de6bbe3..a2c34d3b 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -66,7 +66,7 @@ class ProcedureViewModel extends BaseViewModel { //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _procedureService.getProcedure(mrn: mrn, appointmentNo: appointmentNo!); + await _procedureService.getProcedure(mrn: mrn); if (_procedureService.hasError) { error = _procedureService.error!; if (patientType == "7") diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index d362a8bb..28ba6bda 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -12,7 +12,7 @@ import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; import 'large_avatar.dart'; - +import 'package:flutter_svg/svg.dart'; class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion? patient; final PatientProfileAppBarModel? patientProfileAppBarModel; @@ -133,11 +133,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { child: Container( width: SizeConfig.getTextMultiplierBasedOnWidth() * 20, height: SizeConfig.getTextMultiplierBasedOnWidth() * 20, - child: Image.asset( - gender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, + child: SvgPicture.asset( + gender == 1?"assets/images/svgs/male avatar.svg":"assets/images/svgs/female avatar.svg", + width: 30, + height: 30, ), ), ), @@ -362,9 +361,11 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { value: patientProfileAppBarModel!.branch ?? '', ), if (patientProfileAppBarModel!.clinic != null) - HeaderRow( - label: 'Clinic: ', - value: patientProfileAppBarModel!.clinic ?? '', + Container( + child: HeaderRow( + label: 'Clinic: ', + value: patientProfileAppBarModel!.clinic ?? '', + ), ), if (patientProfileAppBarModel!.isMedicalFile! && patientProfileAppBarModel!.episode != null) HeaderRow( @@ -412,10 +413,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { : patientProfileAppBarModel!.patient!.admissionDate != null ? patientProfileAppBarModel!.isFromLabResult! ? 210 - : 200 + : patientProfileAppBarModel!.isMedicalFile!?650:200 : patientProfileAppBarModel!.isDischargedPatient! ? 240 - : 130) + : 190) : patientProfileAppBarModel!.height! );