|
|
|
|
@ -303,7 +303,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
confirmMessage: errorMsg,
|
|
|
|
|
okText: TranslationBase.of(context).updateInsuranceText,
|
|
|
|
|
cancelText: TranslationBase.of(context).continueCash,
|
|
|
|
|
okFunction: () => {openUpdateInsurance()},
|
|
|
|
|
okFunction: () => {openUpdateInsuranceForWalkIn()},
|
|
|
|
|
cancelFunction: () => {continueAsCashForWalkIn(widget.doctor.projectID!)});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
@ -717,7 +717,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
confirmMessage: res['ErrorEndUserMessage'],
|
|
|
|
|
okText: "Update insurance",
|
|
|
|
|
cancelText: "Continue as cash",
|
|
|
|
|
okFunction: () => {openUpdateInsurance()},
|
|
|
|
|
okFunction: () => {openUpdateInsurance(docObject, appointmentNo, false)},
|
|
|
|
|
cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
@ -727,9 +727,28 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void openUpdateInsurance() {
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
void openUpdateInsurance(DoctorList docObject, String appointmentNo, bool isLiveCareAppointment) {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
service.sendPatientUpdateRequest().then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
if (isLiveCareAppointment) {
|
|
|
|
|
getLiveCareAppointmentPatientShare(context, appointmentNo, docObject!.clinicID!, docObject.projectID!, docObject);
|
|
|
|
|
} else {
|
|
|
|
|
getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject);
|
|
|
|
|
}
|
|
|
|
|
getToDoCount();
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void continueAsCash(DoctorList docObject, String appointmentNo, bool isLiveCareAppointment) {
|
|
|
|
|
@ -753,6 +772,29 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void openUpdateInsuranceForWalkIn() {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
service.sendPatientUpdateRequest().then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
getWalkinAppointmentPatientShare();
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void continueAsCashForWalkIn(int projectID) {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
widget.service.convertPatientToCash(projectID).then((res) {
|
|
|
|
|
@ -893,6 +935,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
|
|
|
|
|
}
|
|
|
|
|
}).onError((error, stackTrace) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -913,6 +956,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
|
|
|
|
|
Future.delayed(Duration(milliseconds: 500), () {
|
|
|
|
|
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
getToDoCount();
|
|
|
|
|
getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject);
|
|
|
|
|
});
|
|
|
|
|
@ -1025,6 +1069,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
String errorMsg = "";
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
|
|
|
|
|
widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
projectViewModel.selectedBodyPartList.clear();
|
|
|
|
|
projectViewModel.laserSelectionDuration = 0;
|
|
|
|
|
if (res['OnlineCheckInAppointments'].length != 0) {
|
|
|
|
|
@ -1052,8 +1097,8 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
confirmMessage: errorMsg,
|
|
|
|
|
okText: TranslationBase.of(context).updateInsuranceText,
|
|
|
|
|
cancelText: TranslationBase.of(context).continueCash,
|
|
|
|
|
okFunction: () => {openUpdateInsurance()},
|
|
|
|
|
cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)});
|
|
|
|
|
okFunction: () => {Navigator.pop(context), openUpdateInsurance(docObject, appointmentNo, widget.patientShareResponse.isLiveCareAppointment!)},
|
|
|
|
|
cancelFunction: () => {Navigator.pop(context), continueAsCash(docObject, appointmentNo, widget.patientShareResponse.isLiveCareAppointment!)});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1095,7 +1140,7 @@ class _BookConfirmState extends State<BookConfirm> {
|
|
|
|
|
confirmMessage: errorMsg,
|
|
|
|
|
okText: TranslationBase.of(context).updateInsuranceText,
|
|
|
|
|
cancelText: TranslationBase.of(context).continueCash,
|
|
|
|
|
okFunction: () => {openUpdateInsurance()},
|
|
|
|
|
okFunction: () => {openUpdateInsurance(docObject, appointmentNo, true)},
|
|
|
|
|
cancelFunction: () => {continueAsCash(docObject, appointmentNo, true)});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
}
|
|
|
|
|
|