|
|
@ -17,6 +17,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
@ -28,6 +30,7 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
|
|
|
@ -540,7 +543,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
confirmAppointment(appo);
|
|
|
|
confirmAppointment(appo);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 20:
|
|
|
|
case 20:
|
|
|
|
getPatientShare(context, appo);
|
|
|
|
// getPatientShare(context, appo);
|
|
|
|
|
|
|
|
checkPatientNphiesEligibility(context, appo);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 30:
|
|
|
|
case 30:
|
|
|
|
getAppoQR(context, appo);
|
|
|
|
getAppoQR(context, appo);
|
|
|
@ -837,6 +841,53 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
// getAncillaryOrders();
|
|
|
|
// getAncillaryOrders();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkPatientNphiesEligibility(context, AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
service.checkPatientNphiesEligibility(appo.projectID).then((res) {
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
if (res["isNphiesMatchedWithVida"]) {
|
|
|
|
|
|
|
|
getPatientShare(context, appo);
|
|
|
|
|
|
|
|
// getToDoCount();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
|
|
|
isDissmissable: false,
|
|
|
|
|
|
|
|
context: context,
|
|
|
|
|
|
|
|
confirmMessage: res['ErrorEndUserMessage'],
|
|
|
|
|
|
|
|
okText: "Update insurance",
|
|
|
|
|
|
|
|
cancelText: "Continue as cash",
|
|
|
|
|
|
|
|
okFunction: () => {openUpdateInsurance()},
|
|
|
|
|
|
|
|
cancelFunction: () => {continueAsCash(appo)});
|
|
|
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
print(err);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void openUpdateInsurance() {
|
|
|
|
|
|
|
|
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void continueAsCash(AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
service.convertPatientToCash(appo.projectID).then((res) {
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
|
|
|
getPatientShare(context, appo);
|
|
|
|
|
|
|
|
// getToDoCount();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
print(err);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
|
|
|
|
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
if (appo.isLiveCareAppointment) {
|
|
|
|
if (appo.isLiveCareAppointment) {
|
|
|
@ -1119,7 +1170,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
error_type: res['Response_Message']);
|
|
|
|
error_type: res['Response_Message']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catchError((err) {
|
|
|
|
}).catchError((err) {
|
|
|
|
if(mounted) GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
if (mounted) GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
print(err);
|
|
|
|
print(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|