Merge branch 'development_v3.3' of http://34.17.52.79/Haroon6138/diplomatic-quarter into development_v3.3

# Conflicts:
#	pubspec.yaml
merge-update-with-lab-changes
Faiz Hashmi 2 years ago
commit d3b4f37c73

@ -38,6 +38,8 @@ var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
var PHARMACY_REDIRECT_URL = 'https://bit.ly/AlhabibPharmacy';
// Pharmacy VidaPlus URLs // Pharmacy VidaPlus URLs
// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
@ -337,7 +339,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.9; var VERSION_ID = 11.4;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -182,7 +182,7 @@ const Map localizedValues = {
'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'}, 'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC or QR Code to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وقم بالمسح الضوئي عبر NFC أو رمز الاستجابة السريعة لتسجيل الوصول'},
'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'}, 'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"},
@ -791,7 +791,7 @@ const Map localizedValues = {
"Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.", "Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.",
"ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
}, },
"language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"}, "language-setting": {"en": "SMS, WhatsApp and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة والواتس اب وتأكيد المكالمات"},
"alert": {"en": "Alerts", "ar": "التنبيهات"}, "alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {"en": "Alert by Email", "ar": "استلام التنبيهات بالبريد الالكتروني"}, "email-alert": {"en": "Alert by Email", "ar": "استلام التنبيهات بالبريد الالكتروني"},
"sms-alert": {"en": "Alert by SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"}, "sms-alert": {"en": "Alert by SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"},
@ -1899,4 +1899,8 @@ const Map localizedValues = {
"updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"},
"downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"},
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please make sure that you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
}; };

@ -43,3 +43,4 @@ const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST'; const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai'; const REGISTER_INFO_DUBAI ='register-info-dubai';
const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown';

@ -17,6 +17,7 @@ class PatientLabOrders {
String genderDescription; String genderDescription;
String invoiceNo; String invoiceNo;
String invoiceNo_VP; String invoiceNo_VP;
String invoiceType;
bool isActiveDoctorProfile; bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall; bool isDoctorAllowVedioCall;
bool isExecludeDoctor; bool isExecludeDoctor;
@ -36,6 +37,7 @@ class PatientLabOrders {
String setupID; String setupID;
List<String> speciality; List<String> speciality;
bool isLiveCareAppointment; bool isLiveCareAppointment;
PatientLabOrders( PatientLabOrders(
{this.actualDoctorRate, {this.actualDoctorRate,
this.clinicDescription, this.clinicDescription,
@ -70,7 +72,9 @@ class PatientLabOrders {
this.qR, this.qR,
this.setupID, this.setupID,
this.invoiceNo_VP, this.invoiceNo_VP,
this.speciality,this.isLiveCareAppointment}); this.invoiceType,
this.speciality,
this.isLiveCareAppointment});
PatientLabOrders.fromJson(Map<String, dynamic> json) { PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
@ -106,6 +110,7 @@ class PatientLabOrders {
qR = json['QR']; qR = json['QR'];
setupID = json['SetupID']; setupID = json['SetupID'];
invoiceNo_VP = json['invoiceNo_VP']; invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment']; isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<String>();
} }
@ -146,7 +151,7 @@ class PatientLabOrders {
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment; data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] =this.invoiceNo_VP; data['invoiceNo_VP'] = this.invoiceNo_VP;
return data; return data;
} }
} }
@ -155,8 +160,7 @@ class PatientLabOrdersList {
String filterName = ""; String filterName = "";
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
PatientLabOrdersList( PatientLabOrdersList({this.filterName, PatientLabOrders patientDoctorAppointment}) {
{this.filterName, PatientLabOrders patientDoctorAppointment}) {
patientLabOrdersList.add(patientDoctorAppointment); patientLabOrdersList.add(patientDoctorAppointment);
} }
} }

@ -1,6 +1,7 @@
class RequestPatientLabSpecialResult { class RequestPatientLabSpecialResult {
String invoiceNo; String invoiceNo;
String invoiceNoVP; String invoiceNoVP;
String invoiceType;
String orderNo; String orderNo;
String setupID; String setupID;
String projectID; String projectID;
@ -22,6 +23,7 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult( RequestPatientLabSpecialResult(
{this.invoiceNo, {this.invoiceNo,
this.invoiceNoVP, this.invoiceNoVP,
this.invoiceType,
this.orderNo, this.orderNo,
this.setupID, this.setupID,
this.projectID, this.projectID,
@ -43,6 +45,7 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) { RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNo = json['InvoiceNo_VP']; invoiceNo = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderNo = json['OrderNo']; orderNo = json['OrderNo'];
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -66,6 +69,7 @@ class RequestPatientLabSpecialResult {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP; data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderNo'] = this.orderNo; data['OrderNo'] = this.orderNo;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;

@ -24,6 +24,7 @@ class RequestSendLabReportEmail {
String projectID; String projectID;
String invoiceNo; String invoiceNo;
String invoiceNoVP; String invoiceNoVP;
String invoiceType;
String orderDate; String orderDate;
String orderNo; String orderNo;
bool isDownload; bool isDownload;
@ -55,6 +56,7 @@ class RequestSendLabReportEmail {
this.projectID, this.projectID,
this.invoiceNo, this.invoiceNo,
this.invoiceNoVP, this.invoiceNoVP,
this.invoiceType,
this.orderDate, this.orderDate,
this.orderNo, this.orderNo,
this.isDownload, this.isDownload,
@ -86,6 +88,7 @@ class RequestSendLabReportEmail {
projectID = json['ProjectID']; projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNoVP = json['InvoiceNo_VP']; invoiceNoVP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderDate = json['OrderDate']; orderDate = json['OrderDate'];
orderNo = json['OrderNo']; orderNo = json['OrderNo'];
isDownload = json['IsDownload']; isDownload = json['IsDownload'];
@ -119,6 +122,7 @@ class RequestSendLabReportEmail {
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP; data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderDate'] = this.orderDate; data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo; data['OrderNo'] = this.orderNo;
data['IsDownload'] = this.isDownload; data['IsDownload'] = this.isDownload;

@ -0,0 +1,15 @@
class HMCProjectListModel {
int projectID;
HMCProjectListModel({this.projectID});
HMCProjectListModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
return data;
}
}

@ -0,0 +1,32 @@
class ProjectDetailListModel {
int projectID;
String latitude;
String longitude;
int geofenceRadius;
String checkInQrCode;
ProjectDetailListModel(
{this.projectID,
this.latitude,
this.longitude,
this.geofenceRadius,
this.checkInQrCode});
ProjectDetailListModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
latitude = json['Latitude'];
longitude = json['Longitude'];
geofenceRadius = json['GeofenceRadius'];
checkInQrCode = json['CheckInQrCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['GeofenceRadius'] = this.geofenceRadius;
data['CheckInQrCode'] = this.checkInQrCode;
return data;
}
}

@ -7,6 +7,7 @@ class FinalRadiology {
int invoiceLineItemNo; int invoiceLineItemNo;
int invoiceNo; int invoiceNo;
dynamic invoiceNo_VP; dynamic invoiceNo_VP;
String invoiceType;
int doctorID; int doctorID;
int clinicID; int clinicID;
DateTime orderDate; DateTime orderDate;
@ -51,6 +52,7 @@ class FinalRadiology {
this.invoiceLineItemNo, this.invoiceLineItemNo,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP, this.invoiceNo_VP,
this.invoiceType,
this.doctorID, this.doctorID,
this.clinicID, this.clinicID,
this.orderDate, this.orderDate,
@ -85,7 +87,8 @@ class FinalRadiology {
this.reportDataTextString, this.reportDataTextString,
this.speciality, this.speciality,
this.isCVI, this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment}); this.isRadMedicalReport,
this.isLiveCareAppointment});
FinalRadiology.fromJson(Map<String, dynamic> json) { FinalRadiology.fromJson(Map<String, dynamic> json) {
try { try {
@ -95,6 +98,7 @@ class FinalRadiology {
invoiceLineItemNo = json['InvoiceLineItemNo']; invoiceLineItemNo = json['InvoiceLineItemNo'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP']; invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
orderDate = DateUtil.convertStringToDate(json['OrderDate']); orderDate = DateUtil.convertStringToDate(json['OrderDate']);
@ -131,7 +135,6 @@ class FinalRadiology {
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI']; isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport']; isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) { } catch (e) {
print(e); print(e);
} }
@ -145,6 +148,7 @@ class FinalRadiology {
data['InvoiceLineItemNo'] = this.invoiceLineItemNo; data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP; data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['OrderDate'] = this.orderDate; data['OrderDate'] = this.orderDate;
@ -189,7 +193,7 @@ class FinalRadiologyList {
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology> finalRadiologyList = List();
FinalRadiologyList({this.filterName, this.finalRadiologyList}); FinalRadiologyList({this.filterName, this.finalRadiologyList});
// { // {
// finalRadiologyList.add(finalRadiology); // finalRadiologyList.add(finalRadiology);
// } // }
} }

@ -7,6 +7,7 @@ class RequestSendRadReportEmail {
String generalid; String generalid;
int invoiceNo; int invoiceNo;
int invoiceNo_VP; int invoiceNo_VP;
String invoiceType;
String iPAdress; String iPAdress;
bool isDentalAllowedBackend; bool isDentalAllowedBackend;
int languageID; int languageID;
@ -37,6 +38,7 @@ class RequestSendRadReportEmail {
this.generalid, this.generalid,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP, this.invoiceNo_VP,
this.invoiceType,
this.iPAdress, this.iPAdress,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.languageID, this.languageID,
@ -66,6 +68,7 @@ class RequestSendRadReportEmail {
generalid = json['generalid']; generalid = json['generalid'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP']; invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
iPAdress = json['IPAdress']; iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend']; isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID']; languageID = json['LanguageID'];
@ -98,6 +101,7 @@ class RequestSendRadReportEmail {
data['generalid'] = this.generalid; data['generalid'] = this.generalid;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP; data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['IPAdress'] = this.iPAdress; data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;

@ -26,12 +26,12 @@ class AppoitmentRated {
String arrivedOn; String arrivedOn;
int editedBy; int editedBy;
String editedOn; String editedOn;
Null doctorName; dynamic doctorName;
String doctorNameN; String doctorNameN;
String statusDesc; String statusDesc;
String statusDescN; String statusDescN;
bool vitalStatus; bool vitalStatus;
Null vitalSignAppointmentNo; dynamic vitalSignAppointmentNo;
int episodeID; int episodeID;
String doctorTitle; String doctorTitle;
bool isAppoitmentLiveCare; bool isAppoitmentLiveCare;

@ -54,15 +54,18 @@ class AncillaryOrdersService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future getOrdersDetails(appointmentNo, orderNo, projectID) async { Future<Map> getOrdersDetails(appointmentNo, orderNo, projectID) async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['AppointmentNo_Vida'] = appointmentNo; body['AppointmentNo_Vida'] = appointmentNo;
body['OrderNo'] = orderNo; body['OrderNo'] = orderNo;
body['ProjectID'] = projectID; body['ProjectID'] = projectID;
hasError = false; hasError = false;
dynamic localRes;
await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) {
localRes = response;
_ancillaryProcLists = []; _ancillaryProcLists = [];
response['AncillaryOrderProcList'].forEach((item) { response['AncillaryOrderProcList'].forEach((item) {
ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item));
}); });
@ -70,5 +73,6 @@ class AncillaryOrdersService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
return Future.value(localRes);
} }
} }

@ -79,8 +79,11 @@ class BaseAppClient {
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
// body['isVidaPlus'] = true; // body['isVidaPlus'] = true;
body['Latitude'] = await AppSharedPreferences().getDouble(USER_LAT); double lat = await AppSharedPreferences().getDouble(USER_LAT);
body['Longitude'] = await AppSharedPreferences().getDouble(USER_LONG); double long = await AppSharedPreferences().getDouble(USER_LONG);
body['Latitude'] = lat == null ? 0.0 : lat;
body['Longitude'] = long == null ? 0.0 : long;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
@ -90,7 +93,11 @@ class BaseAppClient {
: IS_DENTAL_ALLOWED_BACKEND; : IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = Platform.isIOS ? 1 : 2; body['DeviceTypeID'] = Platform.isIOS
? 1
: await Utils.isGoogleServicesAvailable()
? 2
: 3;
if (!body.containsKey('IsPublicRequest')) { if (!body.containsKey('IsPublicRequest')) {
// if (!body.containsKey('PatientType')) { // if (!body.containsKey('PatientType')) {
@ -150,7 +157,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217; // body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; // body['MobileNo'] = "531940021";
// body['PatientID'] = 2001273; //3844083 // body['PatientID'] = 2941698; //3844083
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// Patient ID: 3027574 // Patient ID: 3027574
@ -159,11 +166,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
// if (AppGlobal.isNetworkDebugEnabled) { if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
// } }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -34,7 +34,7 @@ class LabsService extends BaseService {
List<LabResult> labResultList = List(); List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List(); List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async { Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String invoiceType, String orderNo, String setupID, bool isVidaPlus}) async {
hasError = false; hasError = false;
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
@ -42,6 +42,8 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo; _requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0"; _requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.invoiceType = invoiceType;
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID; _requestPatientLabSpecialResult.setupID = setupID;
@ -61,6 +63,7 @@ class LabsService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0"; body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo; body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
body['InvoiceType'] = patientLabOrder.invoiceType;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
@ -205,6 +208,7 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID; _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo; _requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0"; _requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
_requestSendLabReportEmail.invoiceType = patientLabOrder.invoiceType;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = userObj.firstName + " " + userObj.lastName; _requestSendLabReportEmail.patientName = userObj.firstName + " " + userObj.lastName;

@ -10,13 +10,14 @@ class RadiologyService extends BaseService {
bool isRadiologyVIDAPlus = false; bool isRadiologyVIDAPlus = false;
Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus}) async { Future getRadImageURL({int invoiceNo, String invoiceType, int lineItem, int projectId, bool isVidaPlus}) async {
hasError = false; hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo; body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0"; body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem; body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
body['InvoiceType'] = invoiceType;
await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
url = response['Data']; url = response['Data'];
@ -79,6 +80,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.radResult = finalRadiology.reportData; _requestSendRadReportEmail.radResult = finalRadiology.reportData;
_requestSendRadReportEmail.to = userObj.emailAddress; _requestSendRadReportEmail.to = userObj.emailAddress;
_requestSendRadReportEmail.dateofBirth = userObj.dateofBirth; _requestSendRadReportEmail.dateofBirth = userObj.dateofBirth;
_requestSendRadReportEmail.invoiceType = finalRadiology.invoiceType;
hasError = false; hasError = false;
await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PrivilegeService extends BaseService { class PrivilegeService extends BaseService {
List<PrivilegeModel> privilegeModelList = List(); List<PrivilegeModel> privilegeModelList = [];
List<VidaPlusProjectListModel> vidaPlusProjectListModel = List(); List<VidaPlusProjectListModel> vidaPlusProjectListModel = [];
List<HMCProjectListModel> hMCProjectListModel = [];
List<ProjectDetailListModel> projectDetailListModel = [];
Future getPrivilege() async { Future getPrivilege() async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -20,6 +24,18 @@ class PrivilegeService extends BaseService {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item)); vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
}); });
} }
if (response['HMCProjectList'].length != 0) {
response['HMCProjectList'].forEach((item) {
hMCProjectListModel.add(HMCProjectListModel.fromJson(item));
});
}
if (response['ProjectDetailList'].length != 0) {
response['ProjectDetailList'].forEach((item) {
projectDetailListModel.add(ProjectDetailListModel.fromJson(item));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -10,11 +10,10 @@ class AnciallryOrdersViewModel extends BaseViewModel {
bool hasError = false; bool hasError = false;
AncillaryOrdersService _ancillaryService = locator<AncillaryOrdersService>(); AncillaryOrdersService _ancillaryService = locator<AncillaryOrdersService>();
List<AncillaryOrdersListModel> get ancillaryLists =>
_ancillaryService.ancillaryLists;
List<AncillaryOrdersListProcListModel> get ancillaryListsDetails => List<AncillaryOrdersListModel> get ancillaryLists => _ancillaryService.ancillaryLists;
_ancillaryService.ancillaryProcLists;
List<AncillaryOrdersListProcListModel> get ancillaryListsDetails => _ancillaryService.ancillaryProcLists;
Future getOrders() async { Future getOrders() async {
hasError = false; hasError = false;
@ -30,7 +29,7 @@ class AnciallryOrdersViewModel extends BaseViewModel {
Future getOrdersDetails(appointmentNo, orderNo, projectID) async { Future getOrdersDetails(appointmentNo, orderNo, projectID) async {
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID ); await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID);
if (_ancillaryService.hasError) { if (_ancillaryService.hasError) {
error = _ancillaryService.error; error = _ancillaryService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -74,9 +74,10 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List(); List<LabResultList> labResultLists = List();
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async { getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String invoiceType, String orderNo, String setupID, bool isVidaPlus}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
invoiceType: invoiceType,
orderNo: orderNo, orderNo: orderNo,
projectID: projectID, projectID: projectID,
clinicID: clinicID, clinicID: clinicID,

@ -48,9 +48,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url; String get radImageURL => _radiologyService.url;
getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus}) async { getRadImageURL({int invoiceNo, String invoiceType, int lineItem, int projectId, bool isVidaPlus}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus); await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -4,7 +4,9 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -60,11 +62,17 @@ class ProjectViewModel extends BaseViewModel {
List<PrivilegeModel> privilegeRootUser = List(); List<PrivilegeModel> privilegeRootUser = List();
List<PrivilegeModel> privilegeChildUser = List(); List<PrivilegeModel> privilegeChildUser = List();
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = List(); List<VidaPlusProjectListModel> _vidaPlusProjectListModel = List();
List<HMCProjectListModel> _hMCProjectListModel = [];
List<ProjectDetailListModel> _projectDetailListModel = [];
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser; List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel; List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<HMCProjectListModel> get hMCProjectListModel => _hMCProjectListModel;
List<ProjectDetailListModel> get projectDetailListModel => _projectDetailListModel;
List<LaserBodyPart> selectedBodyPartList = []; List<LaserBodyPart> selectedBodyPartList = [];
StreamSubscription subscription; StreamSubscription subscription;
@ -130,6 +138,16 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
setProjectsDetailList(List<ProjectDetailListModel> projectDetailListModel) {
_projectDetailListModel = projectDetailListModel;
notifyListeners();
}
setHMCProjectList(List<HMCProjectListModel> hMCProjectListModel) {
_hMCProjectListModel = hMCProjectListModel;
notifyListeners();
}
setPrivilege({privilegeList, bool isLoginChild = false}) { setPrivilege({privilegeList, bool isLoginChild = false}) {
List<PrivilegeModel> privilege = List(); List<PrivilegeModel> privilege = List();

@ -2,6 +2,7 @@ import 'dart:io';
import "package:collection/collection.dart"; import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
@ -24,6 +25,7 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AnicllaryOrdersDetails extends StatefulWidget { class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo; final dynamic appoNo;
@ -47,10 +49,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
List<AncillaryOrderProcDetailsList> selectedProcList = []; List<AncillaryOrderProcDetailsList> selectedProcList = [];
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = [];
String tamaraPaymentStatus; String tamaraPaymentStatus;
String tamaraOrderID; String tamaraOrderID;
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
getAncillaryOrderDetails();
});
super.initState(); super.initState();
} }
@ -58,12 +65,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
super.dispose(); super.dispose();
} }
void getAncillaryOrderDetails(AnciallryOrdersViewModel model) { void getAncillaryOrderDetails() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((value) { AncillaryOrdersService ancillaryOrdersService = new AncillaryOrdersService();
addToSelectedProcedures(model); ancillaryOrdersService.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((response) {
_ancillaryProcLists = [];
selectedProcList = [];
if (response['AncillaryOrderProcList'] != null && response['AncillaryOrderProcList'].length != 0) {
response['AncillaryOrderProcList'].forEach((item) {
_ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item));
});
addToSelectedProcedures();
}
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err.toString());
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
} }
@ -73,30 +89,23 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
localContext = context; localContext = context;
AppGlobal.context = context; AppGlobal.context = context;
return BaseView<AnciallryOrdersViewModel>( return AppScaffold(
onModelReady: (model) {
// getAncillaryOrderDetails(model);
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((value) {
addToSelectedProcedures(model);
});
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).anicllaryOrders, appBarTitle: TranslationBase.of(context).anicllaryOrders,
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: model.ancillaryListsDetails.length > 0 child: _ancillaryProcLists.isNotEmpty
? Column(children: [ ? Column(
getPatientInfo(model), children: [
getAncillaryDetails(model), getPatientInfo(),
]) getAncillaryDetails(),
],
)
: getNoDataWidget(context), : getNoDataWidget(context),
), ),
bottomSheet: model.ancillaryListsDetails.length > 0 bottomSheet: Container(
? Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)),
@ -134,18 +143,20 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
SizedBox(height: 12), SizedBox(height: 12),
DefaultButton( DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(), TranslationBase.of(context).payNow.toUpperCase(),
selectedProcList.length > 0 && getTotalValue() != "0.00" selectedProcList.length > 0
? () { ? () {
makePayment(model); if (getTotalValue() != "0.00") {
makePayment();
} else {
autoGenerateInvoice();
}
} }
: null, : null,
color: CustomColors.green, color: selectedProcList.length > 0 ? CustomColors.green : CustomColors.grey2,
disabledColor: CustomColors.grey2, disabledColor: CustomColors.grey2,
), ),
], ],
), ),
)
: Container(),
), ),
); );
} }
@ -180,7 +191,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
); );
} }
Widget getPatientInfo(AnciallryOrdersViewModel model) { Widget getPatientInfo() {
return Padding( return Padding(
child: Column( child: Column(
children: [ children: [
@ -273,7 +284,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
), ),
mWidth(3), mWidth(3),
Text( Text(
model.ancillaryListsDetails[0].appointmentNo.toString(), _ancillaryProcLists[0].appointmentNo.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
@ -296,7 +307,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
), ),
mWidth(3), mWidth(3),
Text( Text(
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList[0].orderNo.toString(), _ancillaryProcLists[0].ancillaryOrderProcDetailsList[0].orderNo.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
@ -321,7 +332,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
mWidth(3), mWidth(3),
Expanded( Expanded(
child: Text( child: Text(
model.ancillaryListsDetails[0].companyName.toString(), _ancillaryProcLists[0].companyName.toString(),
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -346,7 +357,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
), ),
mWidth(3), mWidth(3),
Text( Text(
model.ancillaryListsDetails[0].insurancePolicyNo.toString(), _ancillaryProcLists[0].insurancePolicyNo.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 12,
@ -366,8 +377,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
); );
} }
Widget getAncillaryDetails(model) { Widget getAncillaryDetails() {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName); Map newMap = groupBy(_ancillaryProcLists[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap)); return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap));
} }
@ -489,21 +500,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
return tableRow; return tableRow;
} }
makePayment(AnciallryOrdersViewModel model) { makePayment() {
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;
openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan); openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, selectedInstallmentPlan);
}, },
patientShare: double.parse(getTotalValue()), patientShare: double.parse(getTotalValue()),
isFromAdvancePayment: !projectViewModel.havePrivilege(94), isFromAdvancePayment: !projectViewModel.havePrivilege(94),
)); ));
} }
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, [String selectedInstallmentPlan]) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID); transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID);
@ -525,10 +536,10 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
// Need to get new Service ID from Ayman for Ancillary Tamara // Need to get new Service ID from Ayman for Ancillary Tamara
"", "",
context, context,
model.ancillaryListsDetails[0].appointmentDate, _ancillaryProcLists[0].appointmentDate,
model.ancillaryListsDetails[0].appointmentNo, _ancillaryProcLists[0].appointmentNo,
model.ancillaryListsDetails[0].clinicID, _ancillaryProcLists[0].clinicID,
model.ancillaryListsDetails[0].doctorID, _ancillaryProcLists[0].doctorID,
selectedInstallmentPlan); selectedInstallmentPlan);
} }
@ -677,6 +688,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
}); });
}); });
GifLoaderDialogUtils.showMyDialog(localContext);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) { service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) {
GifLoaderDialogUtils.hideDialog(localContext); GifLoaderDialogUtils.hideDialog(localContext);
@ -711,16 +724,18 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
} }
} }
addToSelectedProcedures(AnciallryOrdersViewModel model) { addToSelectedProcedures() {
if (model.ancillaryListsDetails.isNotEmpty) { if (_ancillaryProcLists.isNotEmpty) {
selectedProcList.clear(); selectedProcList.clear();
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((element) { if (_ancillaryProcLists[0].ancillaryOrderProcDetailsList.isNotEmpty) {
_ancillaryProcLists[0].ancillaryOrderProcDetailsList.forEach((element) {
if (!isProcedureDisabled(element)) { if (!isProcedureDisabled(element)) {
selectedProcList.add(element); selectedProcList.add(element);
} }
}); });
setState(() {}); } else {}
} }
setState(() {});
} }
String getInsuranceText(value) { String getInsuranceText(value) {

@ -446,18 +446,19 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) { widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
projectViewModel.selectedBodyPartList.clear(); projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0; projectViewModel.laserSelectionDuration = 0;
print(res); if(res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
}
isInsured = res["IsInsured"]; isInsured = res["IsInsured"];
isEligible = res["IsEligible"]; isEligible = res["IsEligible"];
isCash = res["IsCash"]; isCash = res["IsCash"];
if (isCash) { if (isCash) {
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash);
} else { } else {
if (isInsured && isEligible) { if (isInsured && isEligible) {
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash);
} else { } else {
if (isInsured && !isEligible) { if (isInsured && !isEligible) {
errorMsg = TranslationBase.of(context).invalidEligibility; errorMsg = TranslationBase.of(context).invalidEligibility;
@ -489,7 +490,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) { widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse, false);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
@ -553,7 +554,7 @@ class _BookConfirmState extends State<BookConfirm> {
Navigator.of(context).popAndPushNamed(HOME); Navigator.of(context).popAndPushNamed(HOME);
} }
Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse) async { Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse, bool isCash) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
this.sharedPref.remove(IS_LIVECARE_APPOINTMENT); this.sharedPref.remove(IS_LIVECARE_APPOINTMENT);
Navigator.push( Navigator.push(
@ -565,6 +566,7 @@ class _BookConfirmState extends State<BookConfirm> {
appoDateFormatted: widget.appoDateFormatted, appoDateFormatted: widget.appoDateFormatted,
appoTimeFormatted: widget.selectedTime, appoTimeFormatted: widget.selectedTime,
dateTime: getDateTime(), dateTime: getDateTime(),
isCash: isCash,
), ),
), ),
); );

@ -7,6 +7,8 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
@ -17,6 +19,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -36,8 +39,9 @@ class BookSuccess extends StatefulWidget {
String appoDateFormatted; String appoDateFormatted;
String appoTimeFormatted; String appoTimeFormatted;
bool isCash;
BookSuccess({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted}); BookSuccess({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.isCash = false});
@override @override
_BookSuccessState createState() => _BookSuccessState(); _BookSuccessState createState() => _BookSuccessState();
@ -155,28 +159,57 @@ class _BookSuccessState extends State<BookSuccess> {
Widget _getQRButtons() { Widget _getQRButtons() {
return Container( return Container(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
margin: EdgeInsets.all(14),
height: MediaQuery.of(context).size.height * 0.18, height: MediaQuery.of(context).size.height * 0.18,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
ButtonTheme( Row(
children: [
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: CustomTextButton( child: CustomTextButton(
backgroundColor: Color(0xFF60686b), backgroundColor: CustomColors.green,
elevation: 0, elevation: 0,
onPressed: () { onPressed: () {
// navigateToQR(context); GifLoaderDialogUtils.showMyDialog(context);
getAppoQR(context); getAppoQR(context);
}, },
child: Text(TranslationBase.of(context).viewQR.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), child: Text(TranslationBase.of(context).checkinOptions, style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),
),
mWidth(7),
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
navigateToHome(context);
// GifLoaderDialogUtils.showMyDialog(context);
// getAppoQR(context);
},
child: Text(TranslationBase.of(context).done, style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
), ),
), ),
], ],
), ),
],
),
); );
} }
@ -186,8 +219,10 @@ class _BookSuccessState extends State<BookSuccess> {
child: Container( child: Container(
color: CustomColors.appBackgroudGreyColor, color: CustomColors.appBackgroudGreyColor,
margin: EdgeInsets.all(14), margin: EdgeInsets.all(14),
height: 45.0, height: widget.isCash ? 150.0 : 50,
child: Row( child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -233,6 +268,38 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
widget.isCash
? Column(
children: [
mHeight(10.0),
Text(
TranslationBase.of(context).cashAmountUpdateInsurance,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
),
),
mHeight(5.0),
DefaultButton(
TranslationBase.of(context).updateInsuranceText,
() {
Navigator.pop(context, null);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
color: Color(0xffEAA118),
textColor: Colors.white,
),
],
)
: Container(),
],
),
), ),
); );
} }

@ -1,7 +1,10 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -15,8 +18,12 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
@ -24,6 +31,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class QRCode extends StatefulWidget { class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
@ -43,6 +51,10 @@ class _QRCodeState extends State<QRCode> {
bool _supportsNFC = false; bool _supportsNFC = false;
BuildContext _context; BuildContext _context;
ProjectViewModel projectViewModel;
LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel;
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
@ -55,7 +67,7 @@ class _QRCodeState extends State<QRCode> {
}); });
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
startNFCScan(); // startNFCScan();
}); });
super.initState(); super.initState();
@ -65,7 +77,7 @@ class _QRCodeState extends State<QRCode> {
Future.delayed(const Duration(milliseconds: 500), () { Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () { Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId); sendNfcCheckInRequest(nfcId, 1);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment); locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
}); });
}, onCancel: () { }, onCancel: () {
@ -75,9 +87,33 @@ class _QRCodeState extends State<QRCode> {
}); });
} }
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan())?.rawContent;
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode, 2);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
} else {}
}
startLocationCheckIn() async {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude), double.parse(projectDetailListModel.longitude)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode, 3);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
_context = context; _context = context;
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn, appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true, isShowAppBar: true,
@ -111,32 +147,7 @@ class _QRCodeState extends State<QRCode> {
onTap: () {}, onTap: () {},
onRatingAndReviewTap: () {}, onRatingAndReviewTap: () {},
), ),
InkWell( Container(
child: Container(
margin: EdgeInsets.only(top: 30.0),
padding: EdgeInsets.all(8),
child: SvgPicture.asset(
"assets/images/nfc/contactless.svg",
width: 80.0,
height: 80.0,
),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, child: Text(TranslationBase.of(context).scanQRHospital,
@ -146,43 +157,115 @@ class _QRCodeState extends State<QRCode> {
letterSpacing: -0.48, letterSpacing: -0.48,
)), )),
), ),
mHeight(21),
Padding(
padding: EdgeInsets.only(left: 21, right: 21),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: checkInOptionsList.length,
itemBuilder: (BuildContext context, int index) {
return checkInOptionsList[index];
},
), ),
],
), ),
], ],
), ),
), ),
bottomSheet: Container( // bottomSheet: Container(
color: CustomColors.appBackgroudGreyColor, // color: CustomColors.appBackgroudGreyColor,
padding: EdgeInsets.all(21), // padding: EdgeInsets.all(21),
// // height: 45.0,
// child: Row(
// children: [
// Expanded(
// flex: 1,
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// height: 45.0, // height: 45.0,
child: Row( // child: CustomTextButton(
children: [ // backgroundColor: CustomColors.green,
Expanded( // elevation: 0,
flex: 1, // onPressed: () {
child: ButtonTheme( // startNFCScan();
shape: RoundedRectangleBorder( // },
borderRadius: BorderRadius.circular(10.0), // child: Text(TranslationBase.of(context).scanNFC,
), // style: TextStyle(
height: 45.0, // fontSize: 18.0,
child: CustomTextButton( // color: Colors.white,
backgroundColor: CustomColors.green, // )),
elevation: 0, // ),
onPressed: () { // ),
// ),
// ],
// ),
// ),
);
}
List<Widget> getCheckInOptionsList(BuildContext context) {
List<Widget> optionsList = [];
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(80)) {
startNFCScan(); startNFCScan();
}
}, },
child: Text(TranslationBase.of(context).scanNFC, child: MedicalProfileItem(
style: TextStyle( title: TranslationBase.of(context).scanNFC,
fontSize: 18.0, imagePath: 'contactless.svg',
color: Colors.white, subTitle: "",
)), isEnable: projectViewModel.havePrivilege(80),
width: 80.0,
height: 80.0,
), ),
), ),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(79)) {
startQRCodeScan();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).pharmaLiveCareScanQR,
imagePath: 'qr_code.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(79),
width: 80.0,
height: 80.0,
), ),
], ),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(102)) {
startLocationCheckIn();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).checkInViaLocation,
imagePath: 'location.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(102),
width: 70.0,
height: 70.0,
), ),
), ),
); );
return optionsList;
} }
sendEmail() async { sendEmail() async {
@ -258,12 +341,12 @@ class _QRCodeState extends State<QRCode> {
return docSpeciality; return docSpeciality;
} }
sendNfcCheckInRequest(String nfcId) { sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, context).then((res) { service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, checkInBy, context).then((res) {
print(res); print(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -27,8 +27,9 @@ class BookReminderPage extends StatefulWidget {
String appoDateFormatted; String appoDateFormatted;
String appoTimeFormatted; String appoTimeFormatted;
DateTime dateTime; DateTime dateTime;
bool isCash;
BookReminderPage({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.dateTime}); BookReminderPage({@required this.patientShareResponse, @required this.docObject, @required this.appoDateFormatted, @required this.appoTimeFormatted, this.dateTime, this.isCash = false});
@override @override
_BookReminderPageState createState() => _BookReminderPageState(); _BookReminderPageState createState() => _BookReminderPageState();
@ -217,8 +218,15 @@ class _BookReminderPageState extends State<BookReminderPage> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: page: BookSuccess(
BookSuccess(docObject: widget.docObject, patientShareResponse: widget.patientShareResponse, appoDateFormatted: widget.appoDateFormatted, appoTimeFormatted: widget.appoTimeFormatted))); docObject: widget.docObject,
patientShareResponse: widget.patientShareResponse,
appoDateFormatted: widget.appoDateFormatted,
appoTimeFormatted: widget.appoTimeFormatted,
isCash: widget.isCash,
),
),
);
} }
Future<Map<Permission, PermissionStatus>> requestPermissions() async { Future<Map<Permission, PermissionStatus>> requestPermissions() async {

@ -79,6 +79,16 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
letterSpacing: -0.64, letterSpacing: -0.64,
), ),
), ),
SizedBox(height: 18),
Text(
widget.notification.message.trim(),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.48,
),
),
if (widget.notification.notificationType == "2") if (widget.notification.notificationType == "2")
Padding( Padding(
padding: const EdgeInsets.only(top: 18), padding: const EdgeInsets.only(top: 18),
@ -103,15 +113,15 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
}, fit: BoxFit.fill), }, fit: BoxFit.fill),
), ),
SizedBox(height: 18), SizedBox(height: 18),
Text( // Text(
widget.notification.message.trim(), // widget.notification.message.trim(),
style: TextStyle( // style: TextStyle(
fontSize: 12, // fontSize: 12,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
color: Color(0xff575757), // color: Color(0xff575757),
letterSpacing: -0.48, // letterSpacing: -0.48,
), // ),
), // ),
], ],
), ),
); );

@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -52,6 +54,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
int _currentPage = 0; int _currentPage = 0;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
filterType = FilterType.Clinic; filterType = FilterType.Clinic;
@ -72,6 +76,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myAppointmentsList, appBarTitle: TranslationBase.of(context).myAppointmentsList,
isShowAppBar: true, isShowAppBar: true,
@ -168,6 +173,19 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}); });
getToDoCount();
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);
});
} }
bool isConfirmed(AppoitmentAllHistoryResultList appo) { bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@ -371,6 +389,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}), }),
isInOutPatient: _appointmentResult.isInOutPatient, isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj, name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
projectID: _appointmentResult.projectID,
// billNo: _appointmentResult.invoiceNo, // billNo: _appointmentResult.invoiceNo,
profileUrl: _appointmentResult.doctorImageURL, profileUrl: _appointmentResult.doctorImageURL,
subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName, subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName,
@ -378,7 +397,9 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate), date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate),
isSortByClinic: _isSortByClinic, isSortByClinic: _isSortByClinic,
rating: _appointmentResult.actualDoctorRate + 0.0, rating: _appointmentResult.actualDoctorRate + 0.0,
appointmentTime: _appointmentResult.isLiveCareAppointment ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) : _appointmentResult.startTime.substring(0, 5), appointmentTime: _appointmentResult.isLiveCareAppointment
? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5)
: _appointmentResult.startTime.substring(0, 5),
// appointmentTime: _appointmentResult.startTime.substring(0, 5), // appointmentTime: _appointmentResult.startTime.substring(0, 5),
remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED)
? _appointmentResult.remaniningHoursTocanPay ? _appointmentResult.remaniningHoursTocanPay

@ -38,6 +38,7 @@ class BookedButtons {
"subtitle": TranslationBase.of(AppGlobal.context).location, "subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "hosp_location.svg", "icon": "hosp_location.svg",
"caller": "navigateToProject", "caller": "navigateToProject",
} },
{"title": TranslationBase.of(AppGlobal.context).online, "subtitle": TranslationBase.of(AppGlobal.context).payment, "icon": "online_payment.svg", "caller": "goToTodoList"}
]; ];
} }

@ -30,19 +30,19 @@ class BookedButtonsAllowCheckIn {
{ {
"title": TranslationBase.of(AppGlobal.context).add, "title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder, "subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "reminder_icon.png", "icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder", "caller": "addReminder",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).hospital, "title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location, "subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "location_icon.png", "icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject", "caller": "navigateToProject",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).online, "title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment, "subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "check-in.png", "icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList", "caller": "goToTodoList",
} }
]; ];

@ -29,6 +29,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -73,7 +74,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (context, index) { itemBuilder: (context, index) {
// bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule"); // bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc")); bool shouldEnable = (((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule") ||
(widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
widget.appo.clinicID == 10 &&
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
return InkWell( return InkWell(
onTap: shouldEnable onTap: shouldEnable
? null ? null
@ -87,6 +92,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
hasBadge: true, hasBadge: true,
isEnable: !shouldEnable, isEnable: !shouldEnable,
imgColor: Color(0xff28323A), imgColor: Color(0xff28323A),
isPngImage: appoButtonsList[index].icon.contains(".png") ? true : false,
), ),
); );
}, },
@ -582,14 +588,48 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) { navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel.isLogin) { if (widget.projectViewModel.isLogin) {
if (model.count != 0) { // if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); getPatientAppointmentHistoryWithAppo();
// } else {
// AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
// }
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: widget.appo,
)));
}
} }
getPatientAppointmentHistoryWithAppo() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistoryWithAppoNo(widget.appo.appointmentNo).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList.fromJson(res['AppoimentAllHistoryResultList'][0]);
Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: appo,
),
),
);
} else { } else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err);
});
} }
rateAppointment() { rateAppointment() {

@ -20,6 +20,7 @@ import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -51,12 +52,13 @@ class ToDo extends StatefulWidget {
List<AncillaryOrdersListModel> ancillaryLists = []; List<AncillaryOrdersListModel> ancillaryLists = [];
List<OBGyneProcedureListResponse> obGyneAppoList = []; List<OBGyneProcedureListResponse> obGyneAppoList = [];
var languageID; var languageID;
MyInAppBrowser browser;
bool isShowAppBar = true; bool isShowAppBar = true;
Function onBackClick; Function onBackClick;
bool isFromMyAppointments;
AppoitmentAllHistoryResultList appointment;
ToDo({@required this.isShowAppBar, this.onBackClick}); ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
@override @override
_ToDoState createState() => _ToDoState(); _ToDoState createState() => _ToDoState();
@ -82,6 +84,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
bool isInsured = false; bool isInsured = false;
bool isEligible = false; bool isEligible = false;
bool isCash = false; bool isCash = false;
MyInAppBrowser browser;
@override @override
void initState() { void initState() {
@ -543,9 +546,15 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
performNextAction(AppoitmentAllHistoryResultList appo) { performNextAction(AppoitmentAllHistoryResultList appo) {
switch (appo.nextAction) { switch (appo.nextAction) {
case 0:
// getAppoQR(context, appo);
break;
case 10: case 10:
confirmAppointment(appo); confirmAppointment(appo);
break; break;
case 15:
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingPaymentPending);
break;
case 20: case 20:
getPatientShare(context, appo); getPatientShare(context, appo);
// checkPatientNphiesEligibility(context, appo); // checkPatientNphiesEligibility(context, appo);
@ -833,6 +842,10 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}); });
} }
dataLoaded = true; dataLoaded = true;
if (widget.isFromMyAppointments) {
performNextAction(widget.appointment);
widget.isFromMyAppointments = false;
}
}); });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
@ -842,7 +855,19 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err); err != null ?? AppToast.showErrorToast(message: err);
}); });
// getAncillaryOrders(); getToDoCount();
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);
});
} }
checkPatientNphiesEligibility(context, AppoitmentAllHistoryResultList appo) { checkPatientNphiesEligibility(context, AppoitmentAllHistoryResultList appo) {
@ -901,7 +926,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) { service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
}
isInsured = res["IsInsured"]; isInsured = res["IsInsured"];
isEligible = res["IsEligible"]; isEligible = res["IsEligible"];
isCash = res["IsCash"]; isCash = res["IsCash"];
@ -962,9 +989,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShareResponse.projectID = appo.projectID; patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup; patientShareResponse.isFollowup = appo.isFollowup;
FlutterNfcKit.nfcAvailability.then((value) { // FlutterNfcKit.nfcAvailability.then((value) {
if (value == NFCAvailability.available) { // if (value == NFCAvailability.available) {
PatientShareResponse patientShareResponse = new PatientShareResponse(); // PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj; patientShareResponse.doctorNameObj = appo.doctorNameObj;
patientShareResponse.doctorSpeciality = appo.doctorSpeciality; patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
patientShareResponse.projectName = appo.projectName; patientShareResponse.projectName = appo.projectName;
@ -975,10 +1002,10 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShareResponse.isFollowup = appo.isFollowup; patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo); navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo); projectViewModel.analytics.todoList.to_do_list_check_in(appo);
} else { // } else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported); // Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
} // }
}); // });
projectViewModel.analytics.todoList.to_do_list_check_in(appo); projectViewModel.analytics.todoList.to_do_list_check_in(appo);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -1002,7 +1029,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse), child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse, isCashPatient: isCash),
), ),
); );
}, },
@ -1024,9 +1051,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
} }
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) { openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
widget.browser.openPaymentBrowser( browser.openPaymentBrowser(
amount, amount,
"Appointment check in", "Appointment check in",
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
@ -1037,7 +1064,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
authenticatedUser.firstName, authenticatedUser.firstName,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser, browser,
appo.isLiveCareAppointment, appo.isLiveCareAppointment,
"2", "2",
appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
@ -1068,7 +1095,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") { // if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.successURLS.forEach((element) { MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) { if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close(); browser.close();
MyInAppBrowser.isPaymentDone = true; MyInAppBrowser.isPaymentDone = true;
return; return;
} }
@ -1078,7 +1105,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") { // if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.errorURLS.forEach((element) { MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) { if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close(); browser.close();
MyInAppBrowser.isPaymentDone = false; MyInAppBrowser.isPaymentDone = false;
return; return;
} }

@ -3,20 +3,24 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class PaymentDialog extends StatefulWidget { class PaymentDialog extends StatefulWidget {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
bool isCashPatient;
final Function onPaymentMethodSelected; final Function onPaymentMethodSelected;
PaymentDialog({@required this.appo, @required this.onPaymentMethodSelected, this.patientShareResponse}); PaymentDialog({@required this.appo, @required this.onPaymentMethodSelected, this.patientShareResponse, this.isCashPatient = false});
@override @override
_PaymentDialogState createState() => _PaymentDialogState(); _PaymentDialogState createState() => _PaymentDialogState();
@ -31,7 +35,10 @@ class _PaymentDialogState extends State<PaymentDialog> {
//height: 550.0, //height: 550.0,
width: 450.0, width: 450.0,
padding: EdgeInsets.all(21), padding: EdgeInsets.all(21),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: <Widget>[ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text( Text(
TranslationBase.of(context).invoiceDetails, TranslationBase.of(context).invoiceDetails,
style: TextStyle( style: TextStyle(
@ -41,7 +48,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
color: Color(0xff2B353E), color: Color(0xff2B353E),
), ),
), ),
Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600,letterSpacing: -0.64)), Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)),
Text(getDate(widget.appo.appointmentDate), style: getTextStyle()), Text(getDate(widget.appo.appointmentDate), style: getTextStyle()),
Text(widget.appo.projectName, style: getTextStyle()), Text(widget.appo.projectName, style: getTextStyle()),
Divider( Divider(
@ -108,7 +115,38 @@ class _PaymentDialogState extends State<PaymentDialog> {
], ],
), ),
), ),
]), widget.isCashPatient
? Column(
children: [
mHeight(10.0),
Text(
TranslationBase.of(context).cashAmountUpdateInsurance,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
),
),
mHeight(5.0),
DefaultButton(
TranslationBase.of(context).updateInsuranceText,
() {
Navigator.pop(context, null);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
color: Color(0xffEAA118),
textColor: Colors.white,
),
],
)
: Container(),
],
),
), ),
); );
} }

@ -133,31 +133,32 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
Padding( Padding(
padding: const EdgeInsets.all(18.0), padding: const EdgeInsets.all(18.0),
child: child:
// Text(TranslationBase.of(context).habibCallCenter, Text(TranslationBase.of(context).habibCallCenter,
// style: TextStyle( style: TextStyle(
// fontSize: 16, fontSize: 16,
// letterSpacing: -0.48, letterSpacing: -0.48,
// fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// ),
// ),
DefaultButton(
TranslationBase.of(context).updateInsuranceManually,
() {
Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: UpdateInsuranceManually(
patientIdentificationNo: widget.identificationNo,
patientMobileNumber: widget.mobileNo,
patientID: num.parse(widget.fileNo),
),
), ),
);
},
textColor: Colors.white,
color: CustomColors.accentColor,
), ),
// DefaultButton(
// TranslationBase.of(context).updateInsuranceManually,
// () {
// Navigator.pop(context);
// Navigator.push(
// context,
// FadePage(
// page: UpdateInsuranceManually(
// patientIdentificationNo: widget.identificationNo,
// patientMobileNumber: widget.mobileNo,
// patientID: num.parse(widget.fileNo),
// ),
// ),
// );
// },
// textColor: Colors.white,
// color: CustomColors.accentColor,
// ),
), ),
SizedBox( SizedBox(
height: 25.0, height: 25.0,

@ -184,24 +184,24 @@ class InsurancePage extends StatelessWidget {
void updateManually(BuildContext context, String errorMsg, String patientIdentificationID, int patientID, String mobileNumber) { void updateManually(BuildContext context, String errorMsg, String patientIdentificationID, int patientID, String mobileNumber) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
// confirmMessage: errorMsg + ". " + TranslationBase.of(context).habibCallCenter, confirmMessage: errorMsg + ". " + TranslationBase.of(context).habibCallCenter,
// okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
// cancelText: TranslationBase.of(context).cancel, cancelText: TranslationBase.of(context).cancel,
confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog, // confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog,
okText: TranslationBase.of(context).yes, // okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no, // cancelText: TranslationBase.of(context).no,
okFunction: () => { okFunction: () => {
Navigator.pop(context), Navigator.pop(context),
Navigator.push( // Navigator.push(
context, // context,
FadePage( // FadePage(
page: UpdateInsuranceManually( // page: UpdateInsuranceManually(
patientIdentificationNo: patientIdentificationID, // patientIdentificationNo: patientIdentificationID,
patientID: patientID, // patientID: patientID,
patientMobileNumber: mobileNumber, // patientMobileNumber: mobileNumber,
), // ),
), // ),
), // ),
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);

@ -59,9 +59,9 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
isScrollable: false, isScrollable: false,
indicatorWeight: 3.0, indicatorWeight: 3.0,
indicatorColor: CustomColors.accentColor, indicatorColor: CustomColors.accentColor,
labelColor: Theme.of(context).primaryColor, labelColor: CustomColors.textDarkColor,
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey, unselectedLabelColor: CustomColors.textDarkColor,
tabs: <Widget>[ tabs: <Widget>[
Container( Container(
child: Center( child: Center(

@ -417,7 +417,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick(); if (projectViewModel.havePrivilege(100))
widget.onPharmacyClick();
}, },
child: Stack(children: [ child: Stack(children: [
Container( Container(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -11,6 +12,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher_string.dart';
import 'fragments/home_page_fragment2.dart'; import 'fragments/home_page_fragment2.dart';
import 'landing_page_pharmcy.dart'; import 'landing_page_pharmcy.dart';
@ -48,7 +51,9 @@ class _HomePageState2 extends State<HomePage2> {
widget.onLoginClick(); widget.onLoginClick();
}, },
onPharmacyClick: () { onPharmacyClick: () {
getPharmacyToken(model); // getPharmacyToken(model);
Uri uri = Uri.parse(PHARMACY_REDIRECT_URL);
launchUrl(uri, mode: LaunchMode.externalApplication);
}, },
onMedicalFileClick: () { onMedicalFileClick: () {
widget.onMedicalFileClick(); widget.onMedicalFileClick();

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -17,6 +18,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart'; import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@ -36,6 +38,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -71,6 +74,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver { class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider(); var authProvider = new AuthProvider();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
int currentTab = 0; int currentTab = 0;
PageController pageController; PageController pageController;
@ -636,12 +640,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void checkUserStatus(token) async { void checkUserStatus(token) async {
await PushNotificationHandler.getInstance().isAndroidPermissionGranted(); await PushNotificationHandler.getInstance().isAndroidPermissionGranted();
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); // authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) async {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
@ -649,7 +653,22 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
} }
}), });
if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) {
appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) async {
if (appointmentRateViewModel.isHaveAppointmentNotRate) {
await AppSharedPreferences().setBool(IS_LAST_APPOINTMENT_RATE_SHOWN, true);
Navigator.push(
context,
FadePage(
page: RateAppointmentDoctor(),
),
);
}
}).catchError((err) {
print(err);
});
}
}); });
} }
projectViewModel.analytics.setUser(data); projectViewModel.analytics.setUser(data);

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -209,7 +210,9 @@ class ServicesView extends StatelessWidget {
Navigator.push(context, FadePage(page: CMCPage())); Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup'); locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) { } else if (hmgServices.action == 5) {
getPharmacyToken(context); // getPharmacyToken(context);
Uri uri = Uri.parse(PHARMACY_REDIRECT_URL);
launchUrl(uri, mode: LaunchMode.externalApplication);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy'); locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (hmgServices.action == 6) { } else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew())); Navigator.push(context, FadePage(page: MedicalProfilePageNew()));

@ -43,7 +43,8 @@ class ConfirmLogin extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final fromRegistration; final fromRegistration;
final bool isDubai; final bool isDubai;
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key);
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai = false}) : super(key: key);
@override @override
_ConfirmLogin createState() => _ConfirmLogin(); _ConfirmLogin createState() => _ConfirmLogin();
@ -386,7 +387,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
request.sMSSignature = await SMSOTP.getSignature(); request.sMSSignature = await SMSOTP.getSignature();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (healthId != null || widget.isDubai) { if (healthId != null || widget.isDubai) {
if(!widget.isDubai){ if (!widget.isDubai) {
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
} }
request.healthId = healthId; request.healthId = healthId;
@ -568,7 +569,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var request = this.getCommonRequest().toJson(); var request = this.getCommonRequest().toJson();
dynamic res; dynamic res;
if (healthId != null || widget.isDubai) { if (healthId != null || widget.isDubai) {
if(!widget.isDubai) { if (!widget.isDubai) {
request['DOB'] = dob; request['DOB'] = dob;
} }
request['HealthId'] = healthId; request['HealthId'] = healthId;
@ -694,36 +695,16 @@ class _ConfirmLogin extends State<ConfirmLogin> {
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
// getToDoCount(); GifLoaderDialogUtils.hideDialog(context);
getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( FadePage(
page: LandingPage(), page: LandingPage(),
), ),
(r) => false) (r) => false);
},
insertIMEI()
})
.catchError((err) {
print(err);
});
} }
loading(flag) { loading(flag) {

@ -345,34 +345,45 @@ class _Login extends State<Login> {
authenticatedUserObject.user = result.list; authenticatedUserObject.user = result.list;
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel GifLoaderDialogUtils.hideDialog(context);
.getIsLastAppointmentRatedList()
.then((value) => { getToDoCount();
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( FadePage(
page: LandingPage(), page: LandingPage(),
), ),
(r) => false) (r) => false);
}
}) // appointmentRateViewModel
.catchError((err) { // .getIsLastAppointmentRatedList()
print(err); // .then((value) => {
GifLoaderDialogUtils.hideDialog(context); // getToDoCount(),
}); // GifLoaderDialogUtils.hideDialog(context),
// if (appointmentRateViewModel.isHaveAppointmentNotRate)
// {
// Navigator.pushAndRemoveUntil(
// context,
// FadePage(
// page: RateAppointmentDoctor(),
// ),
// (r) => false)
// }
// else
// {
// Navigator.pushAndRemoveUntil(
// context,
// FadePage(
// page: LandingPage(),
// ),
// (r) => false)
// }
// })
// .catchError((err) {
// print(err);
// GifLoaderDialogUtils.hideDialog(context);
// });
}); });
} }

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
@ -704,31 +705,41 @@ class _RegisterInfo extends State<RegisterInfo> {
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) {
.getIsLastAppointmentRatedList() getToDoCount();
.then((value) => { GifLoaderDialogUtils.hideDialog(AppGlobal.context);
getToDoCount(), if (appointmentRateViewModel.isHaveAppointmentNotRate) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( FadePage(
page: RateAppointmentDoctor(), page: RateAppointmentDoctor(isFromRegistration: true),
), ),
(r) => false) (r) => false);
} } else {
else ConfirmDialog dialog = new ConfirmDialog(
{ context: context,
confirmMessage: TranslationBase.of(context).validInsurance,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () {
ConfirmDialog.closeAlertDialog(context);
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( MaterialPageRoute(builder: (context) => LandingPage()),
page: LandingPage(), (Route<dynamic> route) => false,
), );
(r) => false) Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
cancelFunction: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
});
dialog.showAlertDialog(context);
} }
}) }).catchError((err) {
.catchError((err) {
print(err); print(err);
//GifLoaderDialogUtils.hideDialog(context); //GifLoaderDialogUtils.hideDialog(context);
}); });

@ -27,7 +27,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AskDoctorViewModel>( return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.getQuestionTypes(), // onModelReady: (model) => model.getQuestionTypes(),
onModelReady: (model) => model.getCallRequestTypeLOVs(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).requestType, appBarTitle: TranslationBase.of(context).requestType,

@ -35,6 +35,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLaboratoryResult( onModelReady: (model) => model.getLaboratoryResult(
invoiceNo: widget.patientLabOrders.invoiceNo, invoiceNo: widget.patientLabOrders.invoiceNo,
invoiceType: widget.patientLabOrders.invoiceType,
clinicID: widget.patientLabOrders.clinicID, clinicID: widget.patientLabOrders.clinicID,
projectID: widget.patientLabOrders.projectID, projectID: widget.patientLabOrders.projectID,
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
@ -75,34 +76,34 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
], ],
), ),
), ),
bottomSheet: Container( // bottomSheet: Container(
color: Colors.white, // color: Colors.white,
height: MediaQuery.of(context).size.height * 0.081, // height: MediaQuery.of(context).size.height * 0.081,
width: double.infinity, // width: double.infinity,
padding: EdgeInsets.all(12.0), // padding: EdgeInsets.all(12.0),
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: MediaQuery.of(context).size.width * 0.9, // width: MediaQuery.of(context).size.width * 0.9,
child: DefaultButton( // child: DefaultButton(
TranslationBase.of(context).downloadReport, // TranslationBase.of(context).downloadReport,
() async { // () async {
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true); // await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
try { // try {
String path = await _createFileFromString(model.labReportPDF, "pdf"); // String path = await _createFileFromString(model.labReportPDF, "pdf");
OpenFilex.open(path); // OpenFilex.open(path);
} catch (ex) { // } catch (ex) {
AppToast.showErrorToast(message: "Cannot open file."); // AppToast.showErrorToast(message: "Cannot open file.");
} // }
}, // },
textColor: Colors.white, // textColor: Colors.white,
), // ),
), // ),
], // ],
), // ),
), // ),
), ),
); );
} }

@ -28,6 +28,7 @@ class RadiologyDetailsPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<RadiologyViewModel>( return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getRadImageURL( onModelReady: (model) => model.getRadImageURL(
invoiceType: finalRadiology.invoiceType,
projectId: finalRadiology.projectID, projectId: finalRadiology.projectID,
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP : finalRadiology.invoiceNo, invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP : finalRadiology.invoiceNo,

@ -191,11 +191,17 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).later, TranslationBase.of(context).later,
() { () {
Navigator.pushReplacement( // Navigator.pushReplacement(
// context,
// FadePage(
// page: LandingPage(),
// ),
// );
Navigator.pop(
context,
);
Navigator.pop(
context, context,
FadePage(
page: LandingPage(),
),
); );
}, },
color: CustomColors.accentColor, color: CustomColors.accentColor,

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
@ -9,12 +11,19 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RateAppointmentDoctor extends StatefulWidget { class RateAppointmentDoctor extends StatefulWidget {
bool isFromRegistration;
RateAppointmentDoctor({Key key, this.isFromRegistration = false}) : super(key: key);
@override @override
_RateAppointmentDoctorState createState() => _RateAppointmentDoctorState(); _RateAppointmentDoctorState createState() => _RateAppointmentDoctorState();
} }
@ -23,9 +32,11 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
String note = ""; String note = "";
int rating = 0; int rating = 0;
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AppointmentRateViewModel>( return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
@ -158,12 +169,46 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).later, TranslationBase.of(context).later,
() { () {
if(widget.isFromRegistration) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).validInsurance,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () {
ConfirmDialog.closeAlertDialog(context);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
cancelFunction: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
});
dialog.showAlertDialog(context);
} else {
if(projectViewModel.isLoginChild) {
Navigator.pushReplacement( Navigator.pushReplacement(
context, context,
FadePage( FadePage(
page: LandingPage(), page: LandingPage(),
), ),
); );
} else {
Navigator.pop(
context,
// FadePage(
// page: LandingPage(),
// ),
);
}
}
}, },
color: CustomColors.accentColor, color: CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,

@ -48,16 +48,16 @@ class DoctorsListService extends BaseService {
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); // Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, // "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", // "IPAdress": "10.20.10.20",
"VersionID": req.VersionID, // "VersionID": req.VersionID,
"Channel": req.Channel, // "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', // "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, // "DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
"ClinicID": clinicID, "ClinicID": clinicID,
"ProjectID": projectID, "ProjectID": projectID,
@ -614,6 +614,19 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientAppointmentHistoryWithAppoNo(int appoNo) async {
Map<String, dynamic> request;
request = {"IsActiveAppointment": true, "AppointmentNo": appoNo, "IsComingFromCOC": false};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async { Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async {
Map<String, dynamic> request; Map<String, dynamic> request;
@ -1540,13 +1553,14 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> sendCheckinNfcRequest(int appointmentNo, String nfcCode, int projectId, BuildContext context) async { Future<Map> sendCheckinNfcRequest(int appointmentNo, String nfcCode, int projectId, int checkInBy, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
request = { request = {
"AppointmentNo": appointmentNo, "AppointmentNo": appointmentNo,
"NFC_Code": nfcCode, "NFC_Code": nfcCode,
"ProjectID": projectId, "ProjectID": projectId,
"CheckinBy": checkInBy
}; };
dynamic localRes; dynamic localRes;
await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, onSuccess: (response, statusCode) async { await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, onSuccess: (response, statusCode) async {
@ -1843,6 +1857,4 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -18,19 +18,7 @@ class ClinicListService extends BaseService {
double long; double long;
Future<Map> getClinicsList(context) async { Future<Map> getClinicsList(context) async {
Map<String, dynamic> request; Map<String, dynamic> request = {};
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
};
dynamic localRes; dynamic localRes;
@ -44,21 +32,10 @@ class ClinicListService extends BaseService {
} }
Future<Map> getActiveAppointmentNo(context) async { Future<Map> getActiveAppointmentNo(context) async {
Map<String, dynamic> request; Map<String, dynamic> request = {};
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = { request = {
// "LanguageID": languageID == 'ar' ? 1 : 2,
// "IPAdress": "10.20.10.20",
// "VersionID": req.VersionID,
// "Channel": req.Channel,
// "generalid": 'Cs2020@2016\$2958',
// "PatientOutSA": user.outSA,
"IsActiveAppointment": true, "IsActiveAppointment": true,
// "DeviceTypeID": req.DeviceTypeID,
// "PatientType": user.patientType,
// "PatientTypeID": user.patientType,
// "SessionID": null
}; };
dynamic localRes; dynamic localRes;
@ -72,19 +49,7 @@ class ClinicListService extends BaseService {
} }
Future<Map> getProjectsList(context) async { Future<Map> getProjectsList(context) async {
Map<String, dynamic> request; Map<String, dynamic> request = {};
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null
};
dynamic localRes; dynamic localRes;
@ -113,9 +78,9 @@ class ClinicListService extends BaseService {
"SelectedDate": "", "SelectedDate": "",
"SelectedTime": "", "SelectedTime": "",
"License": true, "License": true,
"VersionID": 5.6, // "VersionID": 5.6,
"Channel": 3, // "Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2, // "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958", "generalid": "Cs2020@2016\$2958",
"SessionID": null, "SessionID": null,
@ -155,11 +120,11 @@ class ClinicListService extends BaseService {
request = { request = {
"ChiefComplaintID": chiefComplaintID, "ChiefComplaintID": chiefComplaintID,
"ProjectID": projectID, "ProjectID": projectID,
"VersionID": 5.6, // "VersionID": 5.6,
"Channel": 3, // "Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2, // "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress, // "IPAdress": req.IPAdress,
"generalid": req.generalid, // "generalid": req.generalid,
"SessionID": null, "SessionID": null,
"isDentalAllowedBackend": true, "isDentalAllowedBackend": true,
"Latitude": lat != null ? lat.toString() : "0.0", "Latitude": lat != null ? lat.toString() : "0.0",

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -32,8 +33,8 @@ class _SplashScreenState extends State<SplashScreen> {
super.initState(); super.initState();
Timer( Timer(
Duration(seconds: 1, milliseconds: 500), Duration(seconds: 1, milliseconds: 500),
() { () async {
loadPrivilege().then((value) { await loadPrivilege().then((value) {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => LandingPage(), builder: (BuildContext context) => LandingPage(),
@ -42,11 +43,6 @@ class _SplashScreenState extends State<SplashScreen> {
}); });
}, },
); );
AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
} }
/// load the Privilege from service /// load the Privilege from service
@ -55,11 +51,17 @@ class _SplashScreenState extends State<SplashScreen> {
ProjectViewModel projectProvider = Provider.of<ProjectViewModel>(context, listen: false); ProjectViewModel projectProvider = Provider.of<ProjectViewModel>(context, listen: false);
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel); projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel);
projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel);
projectProvider.setProjectsDetailList(_privilegeService.projectDetailListModel);
AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch
AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en"); AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false); var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
PushNotificationHandler(context).init(); // Asyncronously PushNotificationHandler(context).init(); // Asyncronously
AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
} }
@override @override

@ -303,9 +303,11 @@ class PushNotificationHandler {
onToken(token); onToken(token);
}); });
if(Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) { FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value); print("Push APNS getToken: " + value);
}); });
}
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
} }
@ -336,7 +338,7 @@ class PushNotificationHandler {
onToken(String token) async { onToken(String token) async {
print("Push Notification Token: " + token); print("Push Notification Token: " + token);
AppSharedPreferences().setString(PUSH_TOKEN, token); await AppSharedPreferences().setString(PUSH_TOKEN, token);
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
} }

@ -2908,6 +2908,10 @@ class TranslationBase {
String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode];
String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; String get downloadReport => localizedValues["downloadReport"][locale.languageCode];
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode];
String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode];
} }

@ -10,6 +10,7 @@ import 'package:connectivity/connectivity.dart';
import 'package:crypto/crypto.dart' as crypto; import 'package:crypto/crypto.dart' as crypto;
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
@ -45,6 +46,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_api_availability/google_api_availability.dart'; import 'package:google_api_availability/google_api_availability.dart';
import 'dart:math' show asin, cos, pi, pow, sin, sqrt;
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; // import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -294,7 +296,8 @@ class Utils {
)); ));
} }
medical.add(InkWell( medical.add(
InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
@ -302,7 +305,8 @@ class Utils {
subTitle: TranslationBase.of(context).radiologySubtitle, subTitle: TranslationBase.of(context).radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7), isEnable: projectViewModel.havePrivilege(7),
), ),
)); ),
);
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
@ -782,6 +786,24 @@ class Utils {
return false; return false;
} }
static double distance(double lat1, double lon1, double lat2, double lon2) {
const r = 6372.8; // Earth radius in kilometers
final dLat = _toRadians(lat2 - lat1);
final dLon = _toRadians(lon2 - lon1);
final lat1Radians = _toRadians(lat1);
final lat2Radians = _toRadians(lat2);
final a = _haversin(dLat) + cos(lat1Radians) * cos(lat2Radians) * _haversin(dLon);
final c = 2 * asin(sqrt(a));
return r * c;
}
static double _toRadians(double degrees) => degrees * pi / 180;
static double _haversin(double radians) => pow(sin(radians / 2), 2);
static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) { static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -820,10 +842,27 @@ class Utils {
return isVidaPlus; return isVidaPlus;
} }
static String generateSignature() { static bool isHMCProject(ProjectViewModel projectViewModel, int projectID) {
bool isHMCProject = false;
projectViewModel.hMCProjectListModel.forEach((element) {
if (element.projectID == projectID) {
isHMCProject = true;
}
});
return isHMCProject;
}
static ProjectDetailListModel getProjectDetailObj(ProjectViewModel projectViewModel, int projectID) {
ProjectDetailListModel projectDetailListModel;
projectViewModel.projectDetailListModel.forEach((element) {
if (element.projectID == projectID) {
projectDetailListModel = element;
}
});
return projectDetailListModel;
} }
static String generateSignature() {}
} }
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) { Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -32,6 +33,7 @@ class DoctorCard extends StatelessWidget {
final String vaccineName; final String vaccineName;
final bool isSickLeave; final bool isSickLeave;
final int sickLeaveStatus; final int sickLeaveStatus;
final int projectID;
DoctorCard( DoctorCard(
{this.name, {this.name,
@ -51,7 +53,8 @@ class DoctorCard extends StatelessWidget {
this.vaccineName = "", this.vaccineName = "",
this.isParentAppointment = false, this.isParentAppointment = false,
this.isSickLeave = false, this.isSickLeave = false,
this.sickLeaveStatus = 0}); this.sickLeaveStatus = 0,
this.projectID = 0});
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@ -87,7 +90,9 @@ class DoctorCard extends StatelessWidget {
decoration: isShowInOutPatient decoration: isShowInOutPatient
? BoxDecoration( ? BoxDecoration(
//Colors.red[900] Color(0xff404545) //Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment color: Utils.isHMCProject(projectViewModel, projectID)
? Color(0xff3FACC8)
: isLiveCareAppointment
? Color(0xff2E303A) ? Color(0xff2E303A)
: !isInOutPatient : !isInOutPatient
? Color(0xffD02127) ? Color(0xffD02127)

@ -51,8 +51,8 @@ class MedicalProfileItem extends StatelessWidget {
) )
: SvgPicture.asset( : SvgPicture.asset(
"assets/images/new/services/$imagePath", "assets/images/new/services/$imagePath",
height: SizeConfig.widthMultiplier * 7, height: height != null ? height : SizeConfig.widthMultiplier * 7,
width: SizeConfig.widthMultiplier * 7, width: width != null ? width : SizeConfig.widthMultiplier * 7,
color: imgColor, color: imgColor,
), ),
mFlex(2), mFlex(2),

@ -99,9 +99,9 @@ class Mdialog extends StatelessWidget {
cancelFunction(); cancelFunction();
}, },
child: Container( child: Container(
decoration: containerRadius(CustomColors.lightGreyColor, 12), decoration: containerRadius(CustomColors.accentColor, 12),
padding: EdgeInsets.only(top: 8,bottom: 8), padding: EdgeInsets.only(top: 8,bottom: 8),
child: Center(child: Texts(cancelText, variant: "caption3")), child: Center(child: Texts(cancelText, variant: "caption3", color: CustomColors.white,)),
), ),
), ),
), ),
@ -110,7 +110,7 @@ class Mdialog extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: okFunction, onTap: okFunction,
child: Container( child: Container(
decoration: containerRadius(CustomColors.accentColor, 12), decoration: containerRadius(CustomColors.green, 12),
padding: EdgeInsets.only(top: 8,bottom: 8), padding: EdgeInsets.only(top: 8,bottom: 8),
child: Center( child: Center(
child: Texts( child: Texts(

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.5.028+4050028 version: 4.5.73+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -57,8 +57,8 @@ dependencies:
shared_preferences: ^2.0.0 shared_preferences: ^2.0.0
# flutter_flexible_toast: ^0.1.4 # flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8 fluttertoast: ^8.0.8
firebase_messaging: ^14.1.0 firebase_messaging: 14.1.0
firebase_analytics: ^10.0.5 firebase_analytics: 10.0.5
# Progress bar # Progress bar
@ -100,7 +100,7 @@ dependencies:
location: ^4.3.0 location: ^4.3.0
# Qr code Scanner # Qr code Scanner
# barcode_scan_fix: ^1.0.2 # barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.2.2 barcode_scan2: 4.2.2
# Rating Stars # Rating Stars
rating_bar: ^0.2.0 rating_bar: ^0.2.0
@ -139,10 +139,10 @@ dependencies:
# TEMPORAL FIX for https://github.com/builttoroam/device_calendar/issues/507 # TEMPORAL FIX for https://github.com/builttoroam/device_calendar/issues/507
# device_calendar: ^4.3.1 # device_calendar: ^4.3.1
# device_calendar: # device_calendar:
# git: # git:
# url: https://github.com/builttoroam/device_calendar.git # url: https://github.com/builttoroam/device_calendar.git
# ref: develop # ref: develop
#Handle Geolocation #Handle Geolocation
geolocator: ^9.0.2 geolocator: ^9.0.2
@ -178,7 +178,7 @@ dependencies:
wifi: ^0.1.5 wifi: ^0.1.5
vibration: ^1.7.3 vibration: ^1.7.3
flutter_nfc_kit: ^3.3.1 flutter_nfc_kit: 3.3.1
geofencing: ^0.1.0 geofencing: ^0.1.0
@ -187,7 +187,7 @@ dependencies:
in_app_update: ^3.0.0 in_app_update: ^3.0.0
# in_app_review: ^2.0.6 in_app_review: 2.0.3
badges: ^2.0.1 badges: ^2.0.1
flutter_app_icon_badge: ^2.0.0 flutter_app_icon_badge: ^2.0.0

Loading…
Cancel
Save