|
|
|
|
@ -1220,7 +1220,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
|
print(nfcId);
|
|
|
|
|
autoGenerateInvoice(ancillaryOrderList, projectID);
|
|
|
|
|
generateQueueNumber(ancillaryOrderList, projectID);
|
|
|
|
|
// getProjectIDFromNFC(nfcId, true);
|
|
|
|
|
// Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails()));
|
|
|
|
|
});
|
|
|
|
|
@ -1237,7 +1237,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
|
|
|
|
|
if (onlineCheckInQRCode != "") {
|
|
|
|
|
print(onlineCheckInQRCode);
|
|
|
|
|
autoGenerateInvoice(ancillaryOrderList, projectID);
|
|
|
|
|
generateQueueNumber(ancillaryOrderList, projectID);
|
|
|
|
|
// getProjectIDFromNFC(onlineCheckInQRCode, true);
|
|
|
|
|
// sendNfcCheckInRequest(onlineCheckInQRCode, 2);
|
|
|
|
|
} else {}
|
|
|
|
|
@ -1267,7 +1267,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
print(dist);
|
|
|
|
|
if (dist <= projectDetailListModel.geofenceRadius!) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
autoGenerateInvoice(ancillaryOrderList, projectID);
|
|
|
|
|
generateQueueNumber(ancillaryOrderList, projectID);
|
|
|
|
|
// sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2);
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -1681,23 +1681,16 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
autoGenerateInvoice(AncillaryOrderList ancillaryOrderList, int projectID) {
|
|
|
|
|
List<dynamic> selectedProcListAPI = [];
|
|
|
|
|
|
|
|
|
|
ancillaryOrderList.ancillaryProcedureListModels!.forEach((element) {
|
|
|
|
|
selectedProcListAPI.add({
|
|
|
|
|
"ApprovalLineItemNo": element.approvalLineItemNo,
|
|
|
|
|
"OrderLineItemNo": element.orderLineItemNo,
|
|
|
|
|
"ProcedureID": element.procedureID,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
generateQueueNumber(AncillaryOrderList ancillaryOrderList, int projectID) {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
service.autoGenerateAncillaryOrdersInvoice(ancillaryOrderList.orderNo, projectID, ancillaryOrderList.appointmentNo, selectedProcListAPI, projectViewModel.isArabic ? 1 : 2, context).then((res) {
|
|
|
|
|
service
|
|
|
|
|
.getLabQueueNumber(projectID, projectViewModel.authenticatedUserObject.user.patientID!, Utils.isVidaPlusProject(projectViewModel, projectID), ancillaryOrderList.orderNo.toString(),
|
|
|
|
|
ancillaryOrderList.orderNo.toString())
|
|
|
|
|
.then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
showAlertDialog(res['AncillaryOrderInvoiceList'][0]['PatientCallNo']);
|
|
|
|
|
showAlertDialog(res['QLineResponse']['PatientCallNo']);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
@ -1705,6 +1698,30 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// autoGenerateInvoice(AncillaryOrderList ancillaryOrderList, int projectID) {
|
|
|
|
|
// List<dynamic> selectedProcListAPI = [];
|
|
|
|
|
//
|
|
|
|
|
// ancillaryOrderList.ancillaryProcedureListModels!.forEach((element) {
|
|
|
|
|
// selectedProcListAPI.add({
|
|
|
|
|
// "ApprovalLineItemNo": element.approvalLineItemNo,
|
|
|
|
|
// "OrderLineItemNo": element.orderLineItemNo,
|
|
|
|
|
// "ProcedureID": element.procedureID,
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
//
|
|
|
|
|
// DoctorsListService service = new DoctorsListService();
|
|
|
|
|
// service.autoGenerateAncillaryOrdersInvoice(ancillaryOrderList.orderNo, projectID, ancillaryOrderList.appointmentNo, selectedProcListAPI, projectViewModel.isArabic ? 1 : 2, context).then((res) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// showAlertDialog(res['AncillaryOrderInvoiceList'][0]['PatientCallNo']);
|
|
|
|
|
// }).catchError((err) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// AppToast.showErrorToast(message: err);
|
|
|
|
|
// print(err);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
showAlertDialog(dynamic queueNo) {
|
|
|
|
|
AlertDialogBox(
|
|
|
|
|
context: context,
|
|
|
|
|
|