Implemented checks for InPatient CR

Dev_3.3_InPatient_CR
haroon amjad 1 year ago
parent dd79b1dfca
commit a9ae44ca89

@ -325,7 +325,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.7; var VERSION_ID = 10.8;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -606,7 +606,7 @@ var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi';
// Check If InPatient API // Check If InPatient API
var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo';
var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/chekIsPatientAdmitted'; var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest';
// Get General Instructions API // Get General Instructions API
var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions';

@ -1928,4 +1928,5 @@ const Map localizedValues = {
"copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"}, "copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"},
"paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"}, "paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"},
"copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"}, "copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"},
"proErrorMessage": {"en": "Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call <insert number here>", "ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>"},
}; };

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -37,8 +38,10 @@ class ProjectViewModel extends BaseViewModel {
bool isLogin = false; bool isLogin = false;
int laserSelectionDuration; int laserSelectionDuration;
bool isPatientAdmitted = false; bool isPatientAdmitted = false;
bool patientHasAdmissionRequest = false;
int inPatientProjectID = 0; int inPatientProjectID = 0;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
double _latitude; double _latitude;
double _longitude; double _longitude;
@ -121,6 +124,11 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
setPatientHasAdmissionRequest(bool hasAdmissionRequest) {
this.patientHasAdmissionRequest = hasAdmissionRequest;
notifyListeners();
}
setInPatientProjectID(int projectID) { setInPatientProjectID(int projectID) {
this.inPatientProjectID = projectID; this.inPatientProjectID = projectID;
notifyListeners(); notifyListeners();
@ -131,6 +139,11 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
setInPatientAdmissionRequest(GetAdmissionRequestInfoResponseModel _getAdmissionRequestInfoResponseModel) {
this.getAdmissionRequestInfoResponseModel = _getAdmissionRequestInfoResponseModel;
notifyListeners();
}
setPrivilegeModelList({List<PrivilegeModel> privilege}) { setPrivilegeModelList({List<PrivilegeModel> privilege}) {
this.isLoginChild = isLoginChild; this.isLoginChild = isLoginChild;
privilegeRootUser = privilege; privilegeRootUser = privilege;

@ -0,0 +1,79 @@
class GetAdmissionRequestInfoResponseModel {
int admissionRequestNo;
String clinicName;
String doctorName;
String expectedAdmissionDate;
List<MedicaLInstructions> medicalInstructions;
dynamic medicalInstructionsXML;
String medicalRemarks;
int projectId;
String projectName;
String setupId;
GetAdmissionRequestInfoResponseModel(
{this.admissionRequestNo,
this.clinicName,
this.doctorName,
this.expectedAdmissionDate,
this.medicalInstructions,
this.medicalInstructionsXML,
this.medicalRemarks,
this.projectId,
this.projectName,
this.setupId});
GetAdmissionRequestInfoResponseModel.fromJson(Map<String, dynamic> json) {
admissionRequestNo = json['admissionRequestNo'];
clinicName = json['clinicName'];
doctorName = json['doctorName'];
expectedAdmissionDate = json['expectedAdmissionDate'];
if (json['medicaLInstructions'] != null) {
medicalInstructions = <MedicaLInstructions>[];
json['medicaLInstructions'].forEach((v) {
medicalInstructions.add(new MedicaLInstructions.fromJson(v));
});
}
medicalInstructionsXML = json['medicalInstructionsXML'];
medicalRemarks = json['medicalRemarks'];
projectId = json['projectId'];
projectName = json['projectName'];
setupId = json['setupId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['admissionRequestNo'] = this.admissionRequestNo;
data['clinicName'] = this.clinicName;
data['doctorName'] = this.doctorName;
data['expectedAdmissionDate'] = this.expectedAdmissionDate;
if (this.medicalInstructions != null) {
data['medicaLInstructions'] =
this.medicalInstructions.map((v) => v.toJson()).toList();
}
data['medicalInstructionsXML'] = this.medicalInstructionsXML;
data['medicalRemarks'] = this.medicalRemarks;
data['projectId'] = this.projectId;
data['projectName'] = this.projectName;
data['setupId'] = this.setupId;
return data;
}
}
class MedicaLInstructions {
String description;
int parameterCode;
MedicaLInstructions({this.description, this.parameterCode});
MedicaLInstructions.fromJson(Map<String, dynamic> json) {
description = json['description'];
parameterCode = json['parameterCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['description'] = this.description;
data['parameterCode'] = this.parameterCode;
return data;
}
}

@ -8,14 +8,17 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart';
import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart';
import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; import '../../models/InPatientServices/get_medical_instructions_response_model.dart';
@ -61,26 +64,10 @@ class InPatientServicesHome extends StatelessWidget {
List<Widget> getInPatientServicesList(BuildContext context) { List<Widget> getInPatientServicesList(BuildContext context) {
List<Widget> serviceList = List(); List<Widget> serviceList = List();
// serviceList.add(
// InkWell(
// onTap: () {
// // Navigator.push(context, FadePage(page: AdvancePaymentPage()));
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).admissionGeneral,
// imagePath: 'admission.svg',
// subTitle: TranslationBase.of(context).consent,
// width: 50.0,
// height: 40.0,
// isInPatient: true,
// ),
// ),
// );
serviceList.add( serviceList.add(
InkWell( InkWell(
onTap: () { onTap: () {
openGeneralInstructions(context); if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openGeneralInstructions(context);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).generalInstructionsTitle, title: TranslationBase.of(context).generalInstructionsTitle,
@ -89,6 +76,7 @@ class InPatientServicesHome extends StatelessWidget {
width: 50.0, width: 50.0,
height: 40.0, height: 40.0,
isInPatient: true, isInPatient: true,
isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(),
), ),
), ),
); );
@ -96,7 +84,7 @@ class InPatientServicesHome extends StatelessWidget {
serviceList.add( serviceList.add(
InkWell( InkWell(
onTap: () { onTap: () {
openMedicalInstructions(context); if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openMedicalInstructions(context);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medicalInstructionsTitle, title: TranslationBase.of(context).medicalInstructionsTitle,
@ -105,6 +93,7 @@ class InPatientServicesHome extends StatelessWidget {
width: 50.0, width: 50.0,
height: 40.0, height: 40.0,
isInPatient: true, isInPatient: true,
isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(),
), ),
), ),
); );
@ -112,7 +101,11 @@ class InPatientServicesHome extends StatelessWidget {
serviceList.add( serviceList.add(
InkWell( InkWell(
onTap: () { onTap: () {
if (projectViewModel.isPatientAdmitted) {
Navigator.push(context, FadePage(page: MealPlanPage())); Navigator.push(context, FadePage(page: MealPlanPage()));
} else {
AppToast.showErrorToast(message: "This service is only available to admitted patients");
}
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).mealPlanTitle, title: TranslationBase.of(context).mealPlanTitle,
@ -121,7 +114,7 @@ class InPatientServicesHome extends StatelessWidget {
width: 50.0, width: 50.0,
height: 40.0, height: 40.0,
isInPatient: true, isInPatient: true,
), isEnable: projectViewModel.isPatientAdmitted),
), ),
); );
@ -193,7 +186,7 @@ class InPatientServicesHome extends StatelessWidget {
serviceList.add( serviceList.add(
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: HelpPRO())); checkCurrentTime(context);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: "Help", title: "Help",
@ -311,4 +304,30 @@ class InPatientServicesHome extends StatelessWidget {
print(err); print(err);
}); });
} }
void checkCurrentTime(BuildContext context) {
print(DateTime.now().hour);
print(DateTime.now().minute);
if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) {
Navigator.push(context, FadePage(page: HelpPRO()));
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).proErrorMessage,
okText: TranslationBase.of(context).callNow,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), launchUrl(Uri.parse("tel://" + "011 525 9553"))},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
}
bool checkAdmissionRequestDate() {
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate));
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours);
if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) {
return false;
}
return true;
}
} }

@ -78,7 +78,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (projectViewModel.isPatientAdmitted) { if (projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest) {
initialiseInPatientHmgServices(false); initialiseInPatientHmgServices(false);
} else { } else {
initialiseHmgServices(false); initialiseHmgServices(false);
@ -274,7 +274,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
], ],
), ),
), ),
projectViewModel.isPatientAdmitted projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest
? Column( ? Column(
children: [ children: [
Padding( Padding(
@ -289,7 +289,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: AspectRatio( child: AspectRatio(
aspectRatio: 2.15, aspectRatio: 2.15,
child: ServicesView( child: ServicesView(
new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false), 23, true)), new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false),
23,
true)),
), ),
), ),
Expanded( Expanded(

@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authent
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/login/register_new.dart'; import 'package:diplomaticquarterapp/pages/login/register_new.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -674,25 +675,31 @@ class _ConfirmLogin extends State<ConfirmLogin> {
checkIfIsInPatient() { checkIfIsInPatient() {
bool isAdmitted = false; bool isAdmitted = false;
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) { service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted']; isAdmitted = res['isAdmitted'];
hasAdmissionRequest = res['hasAdmissionRequests'];
print("IS ADMITTED: $isAdmitted"); print("IS ADMITTED: $isAdmitted");
if (res['isAdmitted'] == true) { print("Has Admission Request: $hasAdmissionRequest");
print("INPATIENT!!!"); if (isAdmitted) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectViewModel.setIsPatientAdmitted(true);
if (res['PatientAdmittedInformation'].length != 0) { if (res['PatientAdmittedInformation'].length != 0) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']);
} else {
projectViewModel.setInPatientProjectID(15);
}
projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel);
} else { projectViewModel.setIsPatientAdmitted(true);
print("OUTPATIENT!!!"); }
projectViewModel.setIsPatientAdmitted(false); }
if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectViewModel.setPatientHasAdmissionRequest(true);
}
} }
} else {} } else {}
}); });

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -395,25 +397,31 @@ class _Login extends State<Login> {
checkIfIsInPatient() { checkIfIsInPatient() {
bool isAdmitted = false; bool isAdmitted = false;
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) { service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted']; isAdmitted = res['isAdmitted'];
hasAdmissionRequest = res['hasAdmissionRequests'];
print("IS ADMITTED: $isAdmitted"); print("IS ADMITTED: $isAdmitted");
if (res['isAdmitted'] == true) { print("Has Admission Request: $hasAdmissionRequest");
print("INPATIENT!!!"); if (isAdmitted) {
projectViewModel.setIsPatientAdmitted(true);
if (res['PatientAdmittedInformation'].length != 0) { if (res['PatientAdmittedInformation'].length != 0) {
getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]);
projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']);
projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel);
} else { projectViewModel.setIsPatientAdmitted(true);
projectViewModel.setInPatientProjectID(15); }
}
if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectViewModel.setPatientHasAdmissionRequest(true);
} }
} else {
print("OUTPATIENT!!!");
projectViewModel.setIsPatientAdmitted(false);
} }
} else {} } else {}
}); });

@ -2933,6 +2933,7 @@ class TranslationBase {
String get copyLink => localizedValues["copyLink"][locale.languageCode]; String get copyLink => localizedValues["copyLink"][locale.languageCode];
String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode];
String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode];
String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode];
} }

Loading…
Cancel
Save