CCHI Policy updated

dev_3.3_CCHI
haroon amjad 8 months ago
parent 7fc47ebf34
commit 609d183930

@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
@ -625,6 +625,7 @@ var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi';
var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity';
var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany';
var PHC_REFERRAL_APPOINTMENT_STATUS = 'Services/OUTPs.svc/REST/getPHCReferralAppointmentStatuse';
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";

@ -212,12 +212,13 @@ class _BookConfirmState extends State<BookConfirm> {
disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0,
onPressed: () async {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
}
checkPHCReferralAppointmentStatus(widget.doctor);
// bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
// if (isLiveCareSchedule != null && isLiveCareSchedule) {
// insertLiveCareScheduledAppointment(context, widget.doctor);
// } else {
// insertAppointment(context, widget.doctor, widget.initialSlotDuration);
// }
},
child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)),
),
@ -227,6 +228,45 @@ class _BookConfirmState extends State<BookConfirm> {
);
}
checkPHCReferralAppointmentStatus(DoctorList docObject) {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
widget.service.checkPHCReferralAppointmentStatus(docObject.projectID, docObject.clinicID, languageID).then((res) async {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
if (res["PHCReferralAppointment"]["statusCode"] == 1) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: res['SuccessMsg'],
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () async {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
}
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
} else {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT);
if (isLiveCareSchedule != null && isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration);
}
}
} else {
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
Widget showInfo(String title, String des) {
return Container(
child: Row(
@ -329,7 +369,8 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service
.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context, null, null, null, projectViewModel)
.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context, null,
null, null, projectViewModel)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
@ -385,7 +426,10 @@ class _BookConfirmState extends State<BookConfirm> {
widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, projectViewModel.isArabic ? 1 : 2, context).then((res) {
widget.service
.insertLiveCareScheduleAppointment(
docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, projectViewModel.isArabic ? 1 : 2, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']);
@ -448,7 +492,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) {
projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0;
if(res['OnlineCheckInAppointments'].length != 0) {
if (res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
}

@ -1790,6 +1790,19 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> checkPHCReferralAppointmentStatus(int projectID, int clinicID, int languageID) async {
Map<String, dynamic> request;
request = {"ProjectID": projectID, "ClinicID": clinicID, "LanguageID": languageID};
dynamic localRes;
await baseAppClient.post(PHC_REFERRAL_APPOINTMENT_STATUS, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPayfortSDKTokenForPayment(String deviceID, String signatureValue, {bool isTest = true}) async {
Map<String, dynamic> request;
request = {"service_command": "SDK_TOKEN", "access_code": "BsM6He4FMBaZ86W64kjZ", "merchant_identifier": "ipxnRXXq", "language": "en", "device_id": deviceID, "signature": signatureValue};

Loading…
Cancel
Save