From 723b4326ca904a44ce4266771ee0a474d06758fb Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Fri, 23 Apr 2021 22:31:31 +0300 Subject: [PATCH] add sick leave to inpatient --- lib/screens/sick-leave/add-sickleave.dart | 2 +- .../profile_medical_info_widget_in_patient.dart | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index dd980f33..822cffb9 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -29,7 +29,7 @@ class AddSickLeavScreen extends StatelessWidget { final routeArgs = ModalRoute.of(context).settings.arguments as Map; patient = routeArgs['patient']; return BaseView( - onModelReady: (model) => model.getSickLeave(patient.patientMRN), + onModelReady: (model) => model.getSickLeave(patient.patientMRN??patient.patientId), builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index 88811e1a..5fc9cf19 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; @@ -166,6 +167,15 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { nameLine1: "Discharge", nameLine2: "Summery", icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'patient/patient_sick_leave.png'), ], ), );