From 498c6c00af3c62a818ef69c899432137c3af97f0 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 10 Feb 2021 15:13:14 +0200 Subject: [PATCH] fix minor issue bugs (DA-273, DA-361, DA-362, DA-363) --- lib/core/service/patient-doctor-referral-service.dart | 6 +++--- lib/core/service/patient-ucaf-service.dart | 4 ++-- lib/models/patient/patiant_info_model.dart | 6 +++++- .../profile/referral/my-referral-detail-screen.dart | 2 ++ .../patients/profile/PatientHeaderWidgetNoAvatar.dart | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 77af017c..813fef35 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -198,9 +198,9 @@ class PatientReferralService extends LookupService { Map body = Map(); body['PatientMRN'] = pendingReferral.patientID; - body['AppointmentNo'] = pendingReferral.sourceAppointmentNo; - body['SetupID'] = pendingReferral.sourceSetupID; - body['ProjectID'] = pendingReferral.sourceProjectId; + body['AppointmentNo'] = pendingReferral.targetAppointmentNo; + body['SetupID'] = pendingReferral.targetSetupID; + body['ProjectID'] = pendingReferral.targetProjectId; body['IsAccepted'] = isAccepted; body['PatientName'] = pendingReferral.patientName; body['ReferralResponse'] = pendingReferral.remarksFromSource; diff --git a/lib/core/service/patient-ucaf-service.dart b/lib/core/service/patient-ucaf-service.dart index 429e78a9..90a45ee2 100644 --- a/lib/core/service/patient-ucaf-service.dart +++ b/lib/core/service/patient-ucaf-service.dart @@ -106,8 +106,8 @@ class UcafService extends LookupService { hasError = false; Map body = Map(); body['PatientMRN'] = patient.patientMRN; - // body['AppointmentNo'] = patient.appointmentNo; - // body['EpisodeID'] = patient.episodeNo; + body['AppointmentNo'] = patient.appointmentNo; + body['EpisodeID'] = patient.episodeNo; await baseAppClient.post (GET_ORDER_PROCEDURE, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 3547a73d..ceb84175 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -54,6 +54,7 @@ class PatiantInformtion { String genderDescription; String nursingStationName; String startTime; + String visitType; PatiantInformtion({ this.list, @@ -105,7 +106,9 @@ class PatiantInformtion { this.genderInt, this.isSigned, this.medicationOrders, - this.nationality,this.patientMRN + this.nationality, + this.patientMRN, + this.visitType, }); factory PatiantInformtion.fromJson(Map json) => @@ -159,6 +162,7 @@ class PatiantInformtion { medicationOrders :json['medicationOrders'], nationality :json['nationality']??json['NationalityNameN'], patientMRN :json['patientMRN'] ?? json['PatientMRN'], + visitType :json['visitType'] ?? json['visitType'], ); } 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 f1f3c918..8a919709 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -157,6 +157,7 @@ class MyReferralDetailScreen extends StatelessWidget { } else { DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept); Navigator.pop(context); + Navigator.pop(context); } }, ), @@ -180,6 +181,7 @@ class MyReferralDetailScreen extends StatelessWidget { } else { DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject); Navigator.pop(context); + Navigator.pop(context); } }, ), diff --git a/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart b/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart index 1f1c4079..aef7a161 100644 --- a/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart +++ b/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart @@ -43,7 +43,7 @@ class PatientHeaderWidgetNoAvatar extends StatelessWidget { ], ), AppText( - "NEW VISIT", + patient.visitType ?? "", fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 2.0, ),