|
|
|
|
@ -86,9 +86,9 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
openPatientGeneralConsent();
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).generalInstructionsTitle,
|
|
|
|
|
title: TranslationBase.of(context).generalConsentTitle,
|
|
|
|
|
imagePath: 'general_instructions.svg',
|
|
|
|
|
subTitle: TranslationBase.of(context).consent,
|
|
|
|
|
subTitle: TranslationBase.of(context).generalConsentSubTitle,
|
|
|
|
|
width: 50.0,
|
|
|
|
|
height: 40.0,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
@ -278,7 +278,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
ClinicListService service = new ClinicListService();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) {
|
|
|
|
|
print(res["PatientHasDischargeMedicineList"].length);
|
|
|
|
|
setState(() {
|
|
|
|
|
if (res["PatientHasDischargeMedicineList"].length != 0) {
|
|
|
|
|
isReceivePrescriptionEnabled = true;
|
|
|
|
|
@ -311,7 +310,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
service.getBirthNotification(projectViewModel.user.patientID!, projectViewModel.isArabic ? 1 : 2, context).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
print(res['birthNotification']);
|
|
|
|
|
Navigator.push(context, FadePage(page: BirthNotification()));
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res["endUserMessage"]);
|
|
|
|
|
@ -335,7 +333,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(res['generalInstructions']);
|
|
|
|
|
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -356,7 +353,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(res['MedicalInstruction']);
|
|
|
|
|
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -380,7 +376,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
.then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
if (res['responseInpatient'] != null) {
|
|
|
|
|
if (res['responseInpatient'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'].length != 0) {
|
|
|
|
|
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
|
|
|
|
|
@ -398,8 +394,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
@ -415,8 +409,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|