From a11d9f60fd6dbac96cb74e5aa0a2e271f7681741 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 28 Dec 2021 15:58:53 +0200 Subject: [PATCH] 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! );