From cc7c5af1d0bd71c67e317ea83abada9f75881aa3 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 4 Apr 2021 12:21:33 +0300 Subject: [PATCH] referral details fix bugs --- lib/config/config.dart | 5 +---- lib/core/service/base/base_service.dart | 6 +++--- lib/core/viewModel/patient-referral-viewmodel.dart | 3 +-- .../referral/my-referral-detail-screen.dart | 14 ++++++++------ .../profile/patient-profile-header-new-design.dart | 3 ++- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 06768cbc..f402bea2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -121,7 +121,7 @@ const GET_DASHBOARD = const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; const ARRIVED_PATIENT_URL = - 'Services/DoctorApplication.svc/REST/PatientArrivalList​'; + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; @@ -143,9 +143,6 @@ const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; -const GET_PATIENT_ARRIVAL_LIST = - 'Services/DoctorApplication.svc/REST/PatientArrivalList'; - ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_SPECIAL_RESULT = diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index 6f4c5d1e..c97fdea9 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -38,15 +38,15 @@ class BaseService { body['To'] = date; body['PageIndex'] = 0; body['PageSize'] = 0; - if(patientMrn == -1){ + if(patientMrn != -1){ body['PatientMRN'] = patientMrn; } - if(appointmentNo == -1){ + if(appointmentNo != -1){ body['AppointmentNo'] = appointmentNo; } await baseAppClient.post( - GET_PATIENT_ARRIVAL_LIST, + ARRIVED_PATIENT_URL, onSuccess: (dynamic response, int statusCode) { patientArrivalList.clear(); diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 00ef09f6..7458456c 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -158,8 +158,7 @@ class PatientReferralViewModel extends BaseViewModel { await _referralPatientService.getPatientArrivalList(toDate, fromDate: fromDate, - patientMrn: patientMrn, - appointmentNo: appointmentNo); + patientMrn: patientMrn); if (_referralPatientService.hasError) { error = _referralPatientService.error; setState(ViewState.Error); 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 d6d9e8b6..3c2197f3 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -70,12 +70,14 @@ class MyReferralDetailScreen extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - (Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + (Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)), + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), ), model.patientArrivalList[0].patientDetails.gender == 1 ? Icon( 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 848bda41..93069432 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -42,10 +42,11 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { onPressed: () => Navigator.pop(context), ), AppText( + patient.firstName != null ? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize( - patient.lastName)), + patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, backGroundcolor: Colors.white,