ER Online CheckIn & InPatient CR implemented

merge-update-with-lab-changes
haroon amjad 1 year ago
parent 42dbe066fd
commit 6a555ace41

@ -1964,6 +1964,12 @@ const Map localizedValues = {
"admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"}, "admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"},
"dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"},
"selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"},
"onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"},
"assistYou": {"en": "How we may assist you?", "ar": "كيف يمكننا مساعدتك؟"},
"receive": {"en": "Receive", "ar": "تجهيز"},
"PRO": {"en": "PRO", "ar": "علاقات المرضى"},
"patientRelationOffice": {"en": "Patient Relation Office", "ar": "علاقات المرضى"},
"roomNo": {"en": "Room No.", "ar": "رقم الغرفة"},
"invalidEligibility": { "invalidEligibility": {
"en": "You cannot make online payment because you are not eligible to use the provided service.", "en": "You cannot make online payment because you are not eligible to use the provided service.",
"ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة." "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة."
@ -2016,4 +2022,5 @@ const Map localizedValues = {
"continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."}, "continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."},
"agreeText": {"en": "Agree", "ar": "أوافق"}, "agreeText": {"en": "Agree", "ar": "أوافق"},
"ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done.", "ar": "لقد تم تسجيل وصولك للطوارئ عبر الإنترنت بنجاح."}, "ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done.", "ar": "لقد تم تسجيل وصولك للطوارئ عبر الإنترنت بنجاح."},
}; };

@ -1,25 +1,25 @@
class EROnlineCheckInPaymentDetailsResponse { class EROnlineCheckInPaymentDetailsResponse {
num cashPrice; num? cashPrice;
num cashPriceTax; num? cashPriceTax;
num cashPriceWithTax; num? cashPriceWithTax;
int companyId; int? companyId;
String companyName; String? companyName;
num companyShareWithTax; num? companyShareWithTax;
Null errCode; dynamic errCode;
int groupID; int? groupID;
String insurancePolicyNo; String? insurancePolicyNo;
String message; String? message;
String patientCardID; String? patientCardID;
num patientShare; num? patientShare;
num patientShareWithTax; num? patientShareWithTax;
num patientTaxAmount; num? patientTaxAmount;
int policyId; int? policyId;
String policyName; String? policyName;
String procedureId; String? procedureId;
String procedureName; String? procedureName;
Null setupID; dynamic setupID;
int statusCode; int? statusCode;
String subPolicyNo; String? subPolicyNo;
EROnlineCheckInPaymentDetailsResponse( EROnlineCheckInPaymentDetailsResponse(
{this.cashPrice, {this.cashPrice,

@ -21,10 +21,10 @@ class EROnlineCheckInBookAppointment extends StatefulWidget {
} }
class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppointment> with SingleTickerProviderStateMixin { class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppointment> with SingleTickerProviderStateMixin {
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
List<HospitalsModel> projectsList = []; List<HospitalsModel> projectsList = [];
final GlobalKey projectDropdownKey = GlobalKey(); final GlobalKey projectDropdownKey = GlobalKey();
HospitalsModel selectedHospital; HospitalsModel? selectedHospital;
String projectDropdownValue = ""; String projectDropdownValue = "";
@override @override
@ -85,13 +85,13 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
items: projectsList.map((item) { items: projectsList.map((item) {
return new DropdownMenuItem<HospitalsModel>( return new DropdownMenuItem<HospitalsModel>(
value: item, value: item,
child: new Text(item.name), child: new Text(item.name!),
); );
}).toList(), }).toList(),
onChanged: (newValue) async { onChanged: (newValue) async {
setState(() { setState(() {
selectedHospital = newValue; selectedHospital = newValue;
projectDropdownValue = newValue.mainProjectID.toString(); projectDropdownValue = newValue!.mainProjectID.toString();
}); });
}, },
), ),
@ -145,9 +145,9 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
context, context,
FadePage( FadePage(
page: EROnlineCheckInPaymentDetails( page: EROnlineCheckInPaymentDetails(
projectID: selectedHospital.iD, projectID: selectedHospital!.iD,
isERBookAppointment: true, isERBookAppointment: true,
projectName: selectedHospital.name, projectName: selectedHospital!.name ?? "",
), ),
), ),
); );
@ -183,21 +183,21 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
} }
void openDropdown(GlobalKey key) { void openDropdown(GlobalKey key) {
GestureDetector detector; GestureDetector? detector;
void searchForGestureDetector(BuildContext element) { void searchForGestureDetector(BuildContext element) {
element.visitChildElements((element) { element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) { if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget; detector = element.widget as GestureDetector?;
return false; // return false;
} else { } else {
searchForGestureDetector(element); searchForGestureDetector(element);
} }
return true; // return true;
}); });
} }
searchForGestureDetector(key.currentContext); searchForGestureDetector(key.currentContext!);
assert(detector != null); assert(detector != null);
detector.onTap(); detector!.onTap!();
} }
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart'; import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart'; import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart';
@ -26,7 +27,7 @@ class EROnlineCheckInHomePage extends StatefulWidget {
} }
class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with SingleTickerProviderStateMixin { class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with SingleTickerProviderStateMixin {
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
bool _supportsNFC = false; bool _supportsNFC = false;
bool isPatientArrived = false; bool isPatientArrived = false;
@ -34,7 +35,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
// checkIfPatientHasArrived(); // checkIfPatientHasArrived();
checkPatientERAdvanceBalance(); if (projectViewModel.isLogin) checkPatientERAdvanceBalance();
}); });
super.initState(); super.initState();
} }
@ -48,9 +49,11 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).emergency + " ${TranslationBase.of(context).checkinOptions}", appBarTitle: TranslationBase.of(context).emergency + " ${TranslationBase.of(context).checkinOptions}",
isShowDecPage: false, isShowDecPage: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
description: TranslationBase.of(context).HHCNotAuthMsg,
imagesInfo: [ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')],
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Padding( child: Padding(
@ -273,7 +276,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: 80, height: projectViewModel.isLogin ? 80 : 1,
color: CustomColors.white, color: CustomColors.white,
padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0), padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0),
child: isPatientArrived child: isPatientArrived
@ -445,5 +448,4 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
} }
} }

@ -34,19 +34,19 @@ class EROnlineCheckInPaymentDetails extends StatefulWidget {
bool isERBookAppointment = false; bool isERBookAppointment = false;
String projectName = ""; String projectName = "";
EROnlineCheckInPaymentDetails({@required this.projectID, @required this.isERBookAppointment, @required this.projectName}); EROnlineCheckInPaymentDetails({required this.projectID, required this.isERBookAppointment, required this.projectName});
@override @override
State<EROnlineCheckInPaymentDetails> createState() => _EROnlineCheckInPaymentDetailsState(); State<EROnlineCheckInPaymentDetails> createState() => _EROnlineCheckInPaymentDetailsState();
} }
class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDetails> with SingleTickerProviderStateMixin { class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDetails> with SingleTickerProviderStateMixin {
ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
EROnlineCheckInPaymentDetailsResponse erOnlineCheckInPaymentDetailsResponse; EROnlineCheckInPaymentDetailsResponse? erOnlineCheckInPaymentDetailsResponse;
String selectedPaymentMethod; String? selectedPaymentMethod;
String selectedInstallmentPlan; String? selectedInstallmentPlan;
String transID = ""; String transID = "";
MyInAppBrowser browser; late MyInAppBrowser browser;
@override @override
void initState() { void initState() {
@ -109,7 +109,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
), ),
mWidth(3), mWidth(3),
Text( Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
@ -278,7 +278,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(), child: getPaymentMethods(),
), ),
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar, _amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar,
isBold: true, isTotal: true), isBold: true, isTotal: true),
SizedBox(height: 12), SizedBox(height: 12),
DefaultButton( DefaultButton(
@ -300,7 +300,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
showDraggableDialog( showDraggableDialog(
context, context,
PaymentMethod( PaymentMethod(
onSelectedMethod: (String method, [String selectedInstallmentPlan]) { onSelectedMethod: (String method, [String? selectedInstallmentPlan]) {
selectedPaymentMethod = method; selectedPaymentMethod = method;
this.selectedInstallmentPlan = selectedInstallmentPlan; this.selectedInstallmentPlan = selectedInstallmentPlan;
if (selectedPaymentMethod == "ApplePay") { if (selectedPaymentMethod == "ApplePay") {
@ -309,25 +309,25 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
} else { } else {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.projectID; appo.projectID = widget.projectID;
openPayment(selectedPaymentMethod, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, null); openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, AppoitmentAllHistoryResultList());
} }
} else { } else {
openPayment(selectedPaymentMethod, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, null); openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, AppoitmentAllHistoryResultList());
} }
}, },
patientShare: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, patientShare: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
isFromAdvancePayment: false, isFromAdvancePayment: false,
), ),
); );
} }
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID); transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!);
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "ER Online Check-In Payment", transID, widget.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, browser.openPaymentBrowser(amount, "ER Online Check-In Payment", transID, widget.projectID.toString(), authenticatedUser.emailAddress!, paymentMethod, authenticatedUser.patientType,
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", null); authenticatedUser.firstName!, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -357,7 +357,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
} }
void startApplePay() async { void startApplePay() async {
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID); transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!);
print("TransactionID: $transID"); print("TransactionID: $transID");
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
@ -365,9 +365,9 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest();
PayfortProjectDetailsRespModel payfortProjectDetailsRespModel; PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel;
await context.read<PayfortViewModel>().getProjectDetailsForPayfort(projectId: widget.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) { await context.read<PayfortViewModel>().getProjectDetailsForPayfort(projectId: widget.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) {
payfortProjectDetailsRespModel = value; payfortProjectDetailsRespModel = value!;
}); });
applePayInsertRequest.clientRequestID = transID; applePayInsertRequest.clientRequestID = transID;
@ -376,7 +376,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com";
applePayInsertRequest.customerID = projectViewModel.user.patientID; applePayInsertRequest.customerID = projectViewModel.user.patientID;
applePayInsertRequest.customerName = projectViewModel.user.firstName + " " + projectViewModel.user.lastName; applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!;
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN);
applePayInsertRequest.doctorID = 0; applePayInsertRequest.doctorID = 0;
@ -392,7 +392,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
applePayInsertRequest.liveServiceID = "0"; applePayInsertRequest.liveServiceID = "0";
applePayInsertRequest.latitude = "0.0"; applePayInsertRequest.latitude = "0.0";
applePayInsertRequest.longitude = "0.0"; applePayInsertRequest.longitude = "0.0";
applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString(); applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString();
applePayInsertRequest.isSchedule = "0"; applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
@ -403,22 +403,22 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
applePayInsertRequest.isMobSDK = true; applePayInsertRequest.isMobSDK = true;
applePayInsertRequest.merchantReference = transID; applePayInsertRequest.merchantReference = transID;
applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel.merchantIdentifier; applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier;
applePayInsertRequest.commandType = "PURCHASE"; applePayInsertRequest.commandType = "PURCHASE";
applePayInsertRequest.signature = payfortProjectDetailsRespModel.signature; applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature;
applePayInsertRequest.accessCode = payfortProjectDetailsRespModel.accessCode; applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode;
applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel.shaRequest; applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest;
applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel.shaResponse; applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse;
applePayInsertRequest.returnURL = ""; applePayInsertRequest.returnURL = "";
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName + " " + projectViewModel.user.lastName, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "ER Online Check-In Payment", orderDescription: "ER Online Check-In Payment",
orderAmount: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, orderAmount: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
@ -428,7 +428,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID, result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
checkPaymentStatus(AppoitmentAllHistoryResultList()); checkPaymentStatus(AppoitmentAllHistoryResultList());
}, },
@ -497,7 +497,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = paymentRes['Fort_id'].toString(); String paymentReference = paymentRes['Fort_id'].toString();
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), paymentRes['Amount'], paymentRes['Fort_id'], paymentRes['PaymentMethod'], projectViewModel.user.patientType, service.HIS_createAdvancePayment(appo, widget.projectID.toString(), paymentRes['Amount'], paymentRes['Fort_id'], paymentRes['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, context) projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, projectViewModel.user.patientID, context)
.then((res) { .then((res) {
addAdvancedNumberRequest( addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, widget.projectID) Utils.isVidaPlusProject(projectViewModel, widget.projectID)

@ -241,18 +241,18 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
void checkDischargeMedications(BuildContext context) { void checkDischargeMedications(BuildContext context) {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
// service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) { service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) {
// print(res["PatientHasDischargeMedicineList"].length); print(res["PatientHasDischargeMedicineList"].length);
// setState(() { setState(() {
// if (res["PatientHasDischargeMedicineList"].length != 0) { if (res["PatientHasDischargeMedicineList"].length != 0) {
// isReceivePrescriptionEnabled = true; isReceivePrescriptionEnabled = true;
// } }
// }); });
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// }).catchError((err) { }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// print(err); print(err);
// }); });
} }
void callReceivePrescriptionAPI(BuildContext context) { void callReceivePrescriptionAPI(BuildContext context) {
@ -298,6 +298,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
print(res['generalInstructions']); print(res['generalInstructions']);
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).noGeneralInstructions); AppToast.showErrorToast(message: TranslationBase.of(context).noGeneralInstructions);
} }
}).catchError((err) { }).catchError((err) {

@ -60,6 +60,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
@ -73,13 +74,20 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
// hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); // hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
// hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); // hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin));
projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin));
} }
@override @override
@ -350,7 +358,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length, itemCount: hmgServices.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); return ServicesView(hmgServices[index], index, true, projectViewModel,
isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false);
}, },
), ),
), ),

@ -754,7 +754,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (hasAdmissionRequest) { if (hasAdmissionRequest) {
if (res['MedicalInstruction'].length != 0) { if (res['MedicalInstruction'].length != 0) {
getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']);
projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']);
projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel);
projectViewModel.setPatientHasAdmissionRequest(true); projectViewModel.setPatientHasAdmissionRequest(true);
} }
@ -791,6 +792,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
getToDoCount(); getToDoCount();
checkIfIsInPatient();
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
.then((value) => { .then((value) => {

@ -386,6 +386,7 @@ class _Login extends State<Login> {
// ), // ),
// (r) => false); // (r) => false);
getToDoCount(); getToDoCount();
checkIfIsInPatient();
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
.then((value) => { .then((value) => {

@ -1880,7 +1880,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> autoGenerateInvoiceERClinic(int projectID, int paymentMethod, String paymentReferenceNo, num amount, String cardType, String cardNumber, String orderID, String rrn, bool isAdvanceAvailable) async { Future<Map> autoGenerateInvoiceERClinic(int? projectID, int? paymentMethod, String? paymentReferenceNo, num? amount, String? cardType, String? cardNumber, String? orderID, String? rrn, bool isAdvanceAvailable) async {
Map<String, dynamic> request; Map<String, dynamic> request;
request = { request = {
"ProjectID": projectID, "ProjectID": projectID,

@ -495,4 +495,43 @@ class ClinicListService extends BaseService {
}, body: request, isAllowAny: true); }, body: request, isAllowAny: true);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDischargeMedicationOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel) async {
Map<String, dynamic> request;
request = {
"ProjectID": getAdmissionInfoResponseModel.projectID,
"ClinicID": getAdmissionInfoResponseModel.clinicID,
"DoctorID": getAdmissionInfoResponseModel.doctorID,
"AdmissionNo": getAdmissionInfoResponseModel.admissionNo
};
// request = {
// "ProjectID": 12,
// "VersionID": 10.8,
// "Channel": 3,
// "LanguageID": 2,
// "IPAdress": "10.20.10.20",
// "generalid": "Cs2020@2016\$2958",
// "DeviceTypeID": 2,
// "PatientType": 1,
// "PatientTypeID": 1,
// "TokenID": "@dm!n",
// "PatientID": 869588,
// "PatientOutSA": 0,
// "SessionID": "rVuK3nzN4UKN0SW95un0jQ==",
// "ClinicID": 2,
// "DoctorID": "7600",
// "AdmissionNo": 2011001258
// };
dynamic localRes;
await baseAppClient.post(INPATIENT_DISCHARGE_MEDICATIONS, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request, isAllowAny: true);
return Future.value(localRes);
}
} }

@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save