CR Implementation completed.

dev_3.16.3_Lab_CheckIn_6718
haroon amjad 1 year ago
parent 53996bdb39
commit 7a1690e4ec

@ -1800,7 +1800,8 @@ const Map localizedValues = {
"ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"},
"successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."},
"pharmacyLiveCare": {"en": "Pharmacy LiveCare", "ar": "لايف كير صيدلية"},
"ancillaryOrderPaymentSuccess": {"en": "Your payment for selected orders has been made successfully.", "ar": "تم سداد دفعتك للطلبات المحددة بنجاح."},
"ancillaryOrderPaymentSuccess": {"en": "Your payment for selected orders has been made successfully. Please Check-In once you arrive into the hospital.", "ar": "لقد تم الدفع بنجاح للطلبات المحددة. يرجى تسجيل الدخول بمجرد وصولك إلى المستشفى.."},
"ancillaryOrderCheckInSuccess": {"en": "Your Check-In for selected ancillary order has been done successfully. Please proceed to the waiting area. Your Queue No. is: ", "ar": "لقد تم تسجيل وصولك بنجاح للطلب الإضافي المحدد. يرجى الانتقال إلى منطقة الانتظار. رقم صف الانتظار الخاص بك هو: "},
"connectTitle": {"en": "Connect", "ar": "تواصل"},
"connectSubtitle": {"en": "With us", "ar": "معنا"},
"covidConsent": {

@ -10,11 +10,21 @@ class AncillaryOrdersListModel {
String? setupID;
int? statusCode;
AncillaryOrdersListModel({this.ancillaryOrderList, this.errCode, this.message, this.patientID, this.patientName, this.patientType, this.projectID, this.projectName, this.setupID, this.statusCode});
AncillaryOrdersListModel(
{this.ancillaryOrderList,
this.errCode,
this.message,
this.patientID,
this.patientName,
this.patientType,
this.projectID,
this.projectName,
this.setupID,
this.statusCode});
AncillaryOrdersListModel.fromJson(Map<String, dynamic> json) {
if (json['AncillaryOrderList'] != null) {
ancillaryOrderList = [];
ancillaryOrderList = <AncillaryOrderList>[];
json['AncillaryOrderList'].forEach((v) {
ancillaryOrderList!.add(new AncillaryOrderList.fromJson(v));
});
@ -22,7 +32,7 @@ class AncillaryOrdersListModel {
errCode = json['ErrCode'];
message = json['Message'];
patientID = json['PatientID'];
patientName = json['PatientName'] != null ? json['PatientName'] : "";
patientName = json['PatientName'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
@ -33,7 +43,8 @@ class AncillaryOrdersListModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.ancillaryOrderList != null) {
data['AncillaryOrderList'] = this.ancillaryOrderList!.map((v) => v.toJson()).toList();
data['AncillaryOrderList'] =
this.ancillaryOrderList!.map((v) => v.toJson()).toList();
}
data['ErrCode'] = this.errCode;
data['Message'] = this.message;
@ -49,42 +60,224 @@ class AncillaryOrdersListModel {
}
class AncillaryOrderList {
List<AncillaryProcedureListModels>? ancillaryProcedureListModels;
String? appointmentDate;
int? appointmentNo;
int? clinicID;
String? clinicName;
int? doctorID;
String? doctorName;
bool? isCheckInAllow;
bool? isQueued;
String? orderDate;
int? orderNo;
bool? isAllowCheckIn;
String? procedureIDs;
AncillaryOrderList({this.appointmentDate, this.appointmentNo, this.clinicID, this.clinicName, this.doctorID, this.doctorName, this.orderDate, this.orderNo, this.isAllowCheckIn, this.procedureIDs});
AncillaryOrderList(
{this.ancillaryProcedureListModels,
this.appointmentDate,
this.appointmentNo,
this.clinicID,
this.clinicName,
this.doctorID,
this.doctorName,
this.isCheckInAllow,
this.isQueued,
this.orderDate,
this.orderNo});
AncillaryOrderList.fromJson(Map<String, dynamic> json) {
if (json['AncillaryProcedureListModels'] != null) {
ancillaryProcedureListModels = <AncillaryProcedureListModels>[];
json['AncillaryProcedureListModels'].forEach((v) {
ancillaryProcedureListModels!
.add(new AncillaryProcedureListModels.fromJson(v));
});
}
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'] != null ? json['ClinicName'] : "";
clinicName = json['ClinicName'];
doctorID = json['DoctorID'];
doctorName = json['DoctorName'];
isCheckInAllow = json['IsCheckInAllow'];
isQueued = json['IsQueued'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
isAllowCheckIn = json['IsCheckInAllow'];
procedureIDs = json['ProcedureIds'] != null ? json['ProcedureIds'] : "";
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.ancillaryProcedureListModels != null) {
data['AncillaryProcedureListModels'] =
this.ancillaryProcedureListModels!.map((v) => v.toJson()).toList();
}
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
data['ClinicID'] = this.clinicID;
data['ClinicName'] = this.clinicName;
data['DoctorID'] = this.doctorID;
data['DoctorName'] = this.doctorName;
data['IsCheckInAllow'] = this.isCheckInAllow;
data['IsQueued'] = this.isQueued;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
return data;
}
}
class AncillaryProcedureListModels {
int? ancillaryProcedureId;
int? appointmentNo;
int? approvalLineItemNo;
int? createdBy;
String? createdOn;
int? editedBy;
String? editedOn;
bool? isActive;
int? orderLineItemNo;
int? orderNo;
int? patientID;
String? procedureID;
int? projectID;
AncillaryProcedureListModels(
{this.ancillaryProcedureId,
this.appointmentNo,
this.approvalLineItemNo,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.isActive,
this.orderLineItemNo,
this.orderNo,
this.patientID,
this.procedureID,
this.projectID});
AncillaryProcedureListModels.fromJson(Map<String, dynamic> json) {
ancillaryProcedureId = json['AncillaryProcedureId'];
appointmentNo = json['AppointmentNo'];
approvalLineItemNo = json['ApprovalLineItemNo'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
isActive = json['IsActive'];
orderLineItemNo = json['OrderLineItemNo'];
orderNo = json['OrderNo'];
patientID = json['PatientID'];
procedureID = json['ProcedureID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AncillaryProcedureId'] = this.ancillaryProcedureId;
data['AppointmentNo'] = this.appointmentNo;
data['ApprovalLineItemNo'] = this.approvalLineItemNo;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['IsActive'] = this.isActive;
data['OrderLineItemNo'] = this.orderLineItemNo;
data['OrderNo'] = this.orderNo;
data['PatientID'] = this.patientID;
data['ProcedureID'] = this.procedureID;
data['ProjectID'] = this.projectID;
return data;
}
}
// class AncillaryOrdersListModel {
// List<AncillaryOrderList>? ancillaryOrderList;
// dynamic errCode;
// String? message;
// int? patientID;
// String? patientName;
// int? patientType;
// int? projectID;
// String? projectName;
// String? setupID;
// int? statusCode;
//
// AncillaryOrdersListModel({this.ancillaryOrderList, this.errCode, this.message, this.patientID, this.patientName, this.patientType, this.projectID, this.projectName, this.setupID, this.statusCode});
//
// AncillaryOrdersListModel.fromJson(Map<String, dynamic> json) {
// if (json['AncillaryOrderList'] != null) {
// ancillaryOrderList = [];
// json['AncillaryOrderList'].forEach((v) {
// ancillaryOrderList!.add(new AncillaryOrderList.fromJson(v));
// });
// }
// errCode = json['ErrCode'];
// message = json['Message'];
// patientID = json['PatientID'];
// patientName = json['PatientName'] != null ? json['PatientName'] : "";
// patientType = json['PatientType'];
// projectID = json['ProjectID'];
// projectName = json['ProjectName'];
// setupID = json['SetupID'];
// statusCode = json['StatusCode'];
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// if (this.ancillaryOrderList != null) {
// data['AncillaryOrderList'] = this.ancillaryOrderList!.map((v) => v.toJson()).toList();
// }
// data['ErrCode'] = this.errCode;
// data['Message'] = this.message;
// data['PatientID'] = this.patientID;
// data['PatientName'] = this.patientName;
// data['PatientType'] = this.patientType;
// data['ProjectID'] = this.projectID;
// data['ProjectName'] = this.projectName;
// data['SetupID'] = this.setupID;
// data['StatusCode'] = this.statusCode;
// return data;
// }
// }
//
// class AncillaryOrderList {
// String? appointmentDate;
// int? appointmentNo;
// int? clinicID;
// String? clinicName;
// int? doctorID;
// String? doctorName;
// String? orderDate;
// int? orderNo;
// bool? isAllowCheckIn;
// String? procedureIDs;
//
// AncillaryOrderList({this.appointmentDate, this.appointmentNo, this.clinicID, this.clinicName, this.doctorID, this.doctorName, this.orderDate, this.orderNo, this.isAllowCheckIn, this.procedureIDs});
//
// AncillaryOrderList.fromJson(Map<String, dynamic> json) {
// appointmentDate = json['AppointmentDate'];
// appointmentNo = json['AppointmentNo'];
// clinicID = json['ClinicID'];
// clinicName = json['ClinicName'] != null ? json['ClinicName'] : "";
// doctorID = json['DoctorID'];
// doctorName = json['DoctorName'];
// orderDate = json['OrderDate'];
// orderNo = json['OrderNo'];
// isAllowCheckIn = json['IsCheckInAllow'];
// procedureIDs = json['ProcedureIds'] != null ? json['ProcedureIds'] : "";
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// data['AppointmentDate'] = this.appointmentDate;
// data['AppointmentNo'] = this.appointmentNo;
// data['ClinicID'] = this.clinicID;
// data['ClinicName'] = this.clinicName;
// data['DoctorID'] = this.doctorID;
// data['DoctorName'] = this.doctorName;
// data['OrderDate'] = this.orderDate;
// data['OrderNo'] = this.orderNo;
// return data;
// }
// }

@ -887,7 +887,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
showAlertDialog(dynamic invoiceNo, dynamic projectID) {
AlertDialogBox(
context: context,
confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess + invoiceNo.toString(),
confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess,
okText: TranslationBase.of(context).ok,
okFunction: () {
AlertDialogBox.closeAlertDialog(context);

@ -44,6 +44,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/bottom_sheet.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
@ -453,7 +454,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate),
isSortByClinic: true,
isAllowCheckInAncillary: ancillaryLists[0].ancillaryOrderList![index].isAllowCheckIn!,
isAllowCheckInAncillary: ancillaryLists[0].ancillaryOrderList![index].isCheckInAllow!,
onAncillaryCheckInTap: () {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.doctorTitle = TranslationBase.of(context).dr.toString();
@ -468,7 +469,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
appo.actualDoctorRate = 0;
appo.noOfPatientsRate = 0;
navigateToQR(context, "", new PatientShareResponse(), appo, true);
ShowAncillaryOrderOnlineCheckInBottomSheet(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID!);
},
);
},
@ -1179,7 +1180,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShareResponse.clinicID = appo.clinicID;
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo, false);
navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
// } else {
// Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
@ -1193,7 +1194,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
});
}
Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment, bool isAncillaryOrderCheckIn) async {
ShowAncillaryOrderOnlineCheckInBottomSheet(AncillaryOrderList ancillaryOrderList, int projectID) {
showMyBottomSheet(context,
callBackFunc: () {},
child: Padding(
@ -1210,8 +1211,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GridView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 12),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 12),
children: [
attendanceMethod(TranslationBase.of(context).scanNFC, "assets/images/nfc/contactless.svg", true, () {
if (_supportsNFC) {
@ -1219,6 +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);
// getProjectIDFromNFC(nfcId, true);
// Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails()));
});
@ -1235,28 +1237,28 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
print(onlineCheckInQRCode);
autoGenerateInvoice(ancillaryOrderList, projectID);
// getProjectIDFromNFC(onlineCheckInQRCode, true);
// sendNfcCheckInRequest(onlineCheckInQRCode, 2);
} else {}
}),
attendanceMethod(TranslationBase.of(context).checkInViaLocation, "assets/images/new/services/location.svg", true, () {})
attendanceMethod(TranslationBase.of(context).checkInViaLocation, "assets/images/new/services/location.svg", true, () {
startLocationCheckIn(ancillaryOrderList, projectID);
})
],
),
],
),
));
}
// Navigator.push(context, FadePage(page: QRCode(patientShareResponse: patientShareResponse, appoQR: appoQR, appointment: appintment, isAncillaryOrderCheckIn: isAncillaryOrderCheckIn)))
// .then((value) {
// if (isAncillaryOrderCheckIn) {
// Utils.showErrorToast("isAncillaryOrderCheckIn");
// } else {
// getPatientAppointmentHistory();
// }
// });
Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment) async {
Navigator.push(context, FadePage(page: QRCode(patientShareResponse: patientShareResponse, appoQR: appoQR, appointment: appintment))).then((value) {
getPatientAppointmentHistory();
});
}
startLocationCheckIn() async {
startLocationCheckIn(AncillaryOrderList ancillaryOrderList, int projectID) async {
GifLoaderDialogUtils.showMyDialog(context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
@ -1265,6 +1267,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
GifLoaderDialogUtils.hideDialog(context);
autoGenerateInvoice(ancillaryOrderList, projectID);
// sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2);
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -1678,6 +1681,42 @@ 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]['InvoiceNo']);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
showAlertDialog(dynamic queueNo) {
AlertDialogBox(
context: context,
confirmMessage: TranslationBase.of(context).ancillaryOrderCheckInSuccess + queueNo.toString(),
okText: TranslationBase.of(context).ok,
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
}).showAlertDialog(context);
}
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
@ -1699,27 +1738,27 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => InkWell(
onTap: () {
Navigator.pop(context);
onPress();
},
child: Container(
decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.darkGreyColor, 1),
clipBehavior: Clip.antiAlias,
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: SvgPicture.asset(image, color: Colors.black, alignment: Alignment.topLeft)),
Text(
title,
style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold),
onTap: () {
Navigator.pop(context);
onPress();
},
child: Container(
decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.darkGreyColor, 1),
clipBehavior: Clip.antiAlias,
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: SvgPicture.asset(image, color: Colors.black, alignment: Alignment.topLeft)),
Text(
title,
style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold),
),
// title.toText17(isBold: true, color: Colors.white),
],
),
// title.toText17(isBold: true, color: Colors.white),
],
),
),
);
),
);
ancillaryOrdersDetails(item, projectId) {
Navigator.push(

@ -3044,7 +3044,7 @@ class TranslationBase {
String get download => localizedValues["download"][locale.languageCode];
String get share => localizedValues["share"][locale.languageCode];
String get ancillaryOrderCheckInSuccess => localizedValues["ancillaryOrderCheckInSuccess"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save