From cc7c5af1d0bd71c67e317ea83abada9f75881aa3 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 4 Apr 2021 12:21:33 +0300 Subject: [PATCH 1/2] 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, From 46fffe56b663935c7fc1560b21e3b246b8cb4aa1 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 4 Apr 2021 13:00:44 +0300 Subject: [PATCH 2/2] small changes --- .../profile/vital_sign/vital_sign_details_screen.dart | 6 ++++++ ...atient_profile_header_with_appointment_card_app_bar.dart | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 3dd45782..ffe08225 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sig import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; 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/transitions/fade_page.dart'; @@ -38,6 +39,11 @@ class VitalSignDetailsScreen extends StatelessWidget { builder: (_, mode, widget) => AppScaffold( isShowAppBar: false, baseViewModel: mode, + /* appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ),*/ appBarTitle: TranslationBase.of(context).vitalSign, body: mode.patientVitalSignsHistory.length > 0 ? Column( 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 62f57956..7a499010 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 @@ -64,10 +64,11 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre 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,