Patient eligibility change

Dev_3.3_MedicalReportCR
haroon amjad 1 year ago
parent 4dd16bde59
commit 49963911ba

@ -326,7 +326,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.8;
var VERSION_ID = 10.9;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -1893,4 +1893,7 @@ const Map localizedValues = {
"sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."},
"dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"},
"selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"},
"invalidEligibility": {"en": "You cannot make online payment because you are not eligible to use the provided service.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة."},
"invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."},
};

@ -59,6 +59,9 @@ class _BookConfirmState extends State<BookConfirm> {
AppSharedPreferences sharedPref = new AppSharedPreferences();
bool isInsured = false;
bool isEligible = false;
@override
void initState() {
// widget.authUser = new AuthenticatedUser();
@ -437,13 +440,35 @@ class _BookConfirmState extends State<BookConfirm> {
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
String errorMsg = "";
GifLoaderDialogUtils.showMyDialog(context);
widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0;
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
isInsured = res["IsInsured"];
isEligible = res["IsEligible"];
if (isInsured && isEligible) {
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
} else {
if (isInsured && !isEligible) {
errorMsg = TranslationBase.of(context).invalidEligibility;
} else {
errorMsg = TranslationBase.of(context).invalidInsurance;
}
ConfirmDialog dialog = new ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: errorMsg,
okText: "Update insurance",
cancelText: "Continue as cash",
okFunction: () => {openUpdateInsurance()},
cancelFunction: () => {continueAsCash(docObject, appointmentNo)});
dialog.showAlertDialog(context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);

@ -79,6 +79,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
bool dataLoaded = false;
bool isInsured = false;
bool isEligible = false;
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
@ -889,6 +892,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
String errorMsg = "";
DoctorsListService service = new DoctorsListService();
if (appo.isLiveCareAppointment) {
getLiveCareAppointmentPatientShare(context, service, appo);
@ -896,8 +900,28 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse);
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
isInsured = res["IsInsured"];
isEligible = res["IsEligible"];
if (isInsured && isEligible) {
openPaymentDialog(appo, widget.patientShareResponse);
} else {
if (isInsured && !isEligible) {
errorMsg = TranslationBase.of(context).invalidEligibility;
} else {
errorMsg = TranslationBase.of(context).invalidInsurance;
}
ConfirmDialog dialog = new ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: errorMsg,
okText: "Update insurance",
cancelText: "Continue as cash",
okFunction: () => {openUpdateInsurance()},
cancelFunction: () => {continueAsCash(appo)});
dialog.showAlertDialog(context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);

@ -484,7 +484,7 @@ class DoctorsListService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_PATIENT_SHARE, onSuccess: (response, statusCode) async {
localRes = response['OnlineCheckInAppointments'][0];
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);

@ -2903,6 +2903,9 @@ class TranslationBase {
String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode];
String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode];
String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode];
String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save