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

# Conflicts:
#	lib/config/config.dart
#	lib/pages/DrawerPages/family/my-family.dart
#	lib/uitl/push-notification-handler.dart
merge-update-with-lab-changes
Sultan khan 2 years ago
commit 98a2545a9b

@ -32,6 +32,7 @@ target 'Runner' do
use_modular_headers!
pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
@ -53,9 +54,34 @@ post_install do |installer|
]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
xcconfig_path = build_configuration.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end
end
end
end
post_integrate do |installer|
compiler_flags_key = 'COMPILER_FLAGS'
project_path = 'Pods/Pods.xcodeproj'
project = Xcodeproj::Project.open(project_path)
project.targets.each do |target|
target.build_phases.each do |build_phase|
if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
build_phase.files.each do |file|
if !file.settings.nil? && file.settings.key?(compiler_flags_key)
compiler_flags = file.settings[compiler_flags_key]
file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
end
end
end
end
end
project.save()
end

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@ -322,6 +322,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@ -392,6 +393,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@ -538,7 +540,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.63;
MARKETING_VERSION = 4.5.75;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -682,7 +684,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.63;
MARKETING_VERSION = 4.5.75;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -720,7 +722,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.63;
MARKETING_VERSION = 4.5.75;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-FIRAnalyticsDebugEnabled"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-v"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -20,10 +20,18 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
//var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/';
// Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -33,6 +41,12 @@ var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_PHARMACY_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
// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// // Pharmacy Pre-Production URLs
// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
@ -40,6 +54,8 @@ var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// RC API URL
var RC_BASE_URL = 'https://rc.hmg.com/';
// var RC_BASE_URL = 'https://ms.hmg.com/rc/';
var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
var GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -326,7 +342,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.8;
var VERSION_ID = 11.6;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// 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': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', '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 لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "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.",
"ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
},
"language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"},
"language-setting": {"en": "SMS, WhatsApp and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة والواتس اب وتأكيد المكالمات"},
"alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {"en": "Alert by Email", "ar": "استلام التنبيهات بالبريد الالكتروني"},
"sms-alert": {"en": "Alert by SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"},
@ -1893,4 +1893,14 @@ const Map localizedValues = {
"sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."},
"dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"},
"selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"},
"invalidEligibility": {"en": "You cannot make online payment because you are not eligible to use the provided service.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة."},
"invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."},
"continueCash": {"en": "Continue as cash", "ar": "تواصل نقدا"},
"updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"},
"downloadReport": {"en": "Download Report", "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 IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai';
const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown';

@ -16,6 +16,8 @@ class PatientLabOrders {
int gender;
String genderDescription;
String invoiceNo;
String invoiceNo_VP;
String invoiceType;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
@ -35,6 +37,7 @@ class PatientLabOrders {
String setupID;
List<String> speciality;
bool isLiveCareAppointment;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -68,7 +71,10 @@ class PatientLabOrders {
this.projectNameN,
this.qR,
this.setupID,
this.speciality,this.isLiveCareAppointment});
this.invoiceNo_VP,
this.invoiceType,
this.speciality,
this.isLiveCareAppointment});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -103,8 +109,10 @@ class PatientLabOrders {
projectNameN = json['ProjectNameN'];
qR = json['QR'];
setupID = json['SetupID'];
invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {
@ -143,6 +151,7 @@ class PatientLabOrders {
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] = this.invoiceNo_VP;
return data;
}
}
@ -151,8 +160,7 @@ class PatientLabOrdersList {
String filterName = "";
List<PatientLabOrders> patientLabOrdersList = List();
PatientLabOrdersList(
{this.filterName, PatientLabOrders patientDoctorAppointment}) {
PatientLabOrdersList({this.filterName, PatientLabOrders patientDoctorAppointment}) {
patientLabOrdersList.add(patientDoctorAppointment);
}
}

@ -1,5 +1,7 @@
class RequestPatientLabSpecialResult {
String invoiceNo;
String invoiceNoVP;
String invoiceType;
String orderNo;
String setupID;
String projectID;
@ -20,26 +22,30 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult(
{this.invoiceNo,
this.orderNo,
this.setupID,
this.projectID,
this.clinicID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
this.invoiceNoVP,
this.invoiceType,
this.orderNo,
this.setupID,
this.projectID,
this.clinicID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo'];
invoiceNo = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderNo = json['OrderNo'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
@ -62,6 +68,8 @@ class RequestPatientLabSpecialResult {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderNo'] = this.orderNo;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;

@ -23,8 +23,12 @@ class RequestSendLabReportEmail {
String doctorName;
String projectID;
String invoiceNo;
String invoiceNoVP;
String invoiceType;
String orderDate;
String orderNo;
bool isDownload;
int doctorID;
RequestSendLabReportEmail(
{this.versionID,
@ -51,8 +55,12 @@ class RequestSendLabReportEmail {
this.doctorName,
this.projectID,
this.invoiceNo,
this.invoiceNoVP,
this.invoiceType,
this.orderDate,
this.orderNo});
this.orderNo,
this.isDownload,
this.doctorID});
RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
@ -79,8 +87,12 @@ class RequestSendLabReportEmail {
doctorName = json['DoctorName'];
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
invoiceNoVP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
isDownload = json['IsDownload'];
doctorID = json['DoctorID'];
}
Map<String, dynamic> toJson() {
@ -109,8 +121,12 @@ class RequestSendLabReportEmail {
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
data['IsDownload'] = this.isDownload;
data['DoctorID'] = this.doctorID;
return data;
}
}

@ -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;
}
}

@ -0,0 +1,15 @@
class VidaPlusProjectListModel {
int projectID;
VidaPlusProjectListModel({this.projectID});
VidaPlusProjectListModel.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;
}
}

@ -3,9 +3,11 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class FinalRadiology {
String setupID;
int projectID;
Null patientID;
dynamic patientID;
int invoiceLineItemNo;
int invoiceNo;
dynamic invoiceNo_VP;
String invoiceType;
int doctorID;
int clinicID;
DateTime orderDate;
@ -49,6 +51,8 @@ class FinalRadiology {
this.patientID,
this.invoiceLineItemNo,
this.invoiceNo,
this.invoiceNo_VP,
this.invoiceType,
this.doctorID,
this.clinicID,
this.orderDate,
@ -83,7 +87,8 @@ class FinalRadiology {
this.reportDataTextString,
this.speciality,
this.isCVI,
this.isRadMedicalReport,this.isLiveCareAppointment});
this.isRadMedicalReport,
this.isLiveCareAppointment});
FinalRadiology.fromJson(Map<String, dynamic> json) {
try {
@ -92,6 +97,8 @@ class FinalRadiology {
patientID = json['PatientID'];
invoiceLineItemNo = json['InvoiceLineItemNo'];
invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
orderDate = DateUtil.convertStringToDate(json['OrderDate']);
@ -125,10 +132,9 @@ class FinalRadiology {
isLiveCareAppointment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString'];
// speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
} catch (e) {
print(e);
}
@ -141,6 +147,8 @@ class FinalRadiology {
data['PatientID'] = this.patientID;
data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['OrderDate'] = this.orderDate;
@ -185,7 +193,7 @@ class FinalRadiologyList {
List<FinalRadiology> finalRadiologyList = List();
FinalRadiologyList({this.filterName, this.finalRadiologyList});
// {
// finalRadiologyList.add(finalRadiology);
// }
// {
// finalRadiologyList.add(finalRadiology);
// }
}

@ -6,6 +6,8 @@ class RequestSendRadReportEmail {
String doctorName;
String generalid;
int invoiceNo;
int invoiceNo_VP;
String invoiceType;
String iPAdress;
bool isDentalAllowedBackend;
int languageID;
@ -35,6 +37,8 @@ class RequestSendRadReportEmail {
this.doctorName,
this.generalid,
this.invoiceNo,
this.invoiceNo_VP,
this.invoiceType,
this.iPAdress,
this.isDentalAllowedBackend,
this.languageID,
@ -63,6 +67,8 @@ class RequestSendRadReportEmail {
doctorName = json['DoctorName'];
generalid = json['generalid'];
invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
@ -94,6 +100,8 @@ class RequestSendRadReportEmail {
data['DoctorName'] = this.doctorName;
data['generalid'] = this.generalid;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;

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

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

@ -8,8 +8,10 @@ class AppointmentRateService extends BaseService {
List<AppoitmentRated> appointmentRatedList = List();
AppointmentDetails appointmentDetails;
Future getIsLastAppointmentRatedList() async {
Future getIsLastAppointmentRatedList(int languageID) async {
hasError = false;
Map<String, dynamic> bodyData = Map();
bodyData['LanguageID'] = languageID;
await baseAppClient.post(IS_LAST_APPOITMENT_RATED, onSuccess: (dynamic response, int statusCode) {
appointmentRatedList.clear();
response['IsLastAppoitmentRatedList'].forEach((appoint) {
@ -18,7 +20,7 @@ class AppointmentRateService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body: bodyData);
}
Future getAppointmentDetails() async {

@ -73,13 +73,30 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = (languageID == 'ar' ? 1 : 2);
if (body.containsKey('LanguageID')) {
if(body['LanguageID'] != null) {
//change this line because language issue happened on dental
body['LanguageID'] = body['LanguageID'] =='ar' ? "1" : body['LanguageID'] =='en' ? '2' : body['LanguageID'];
} else {
body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
}
} else {
// body['LanguageID'] = (languageID.toString().toLowerCase() == 'ar' ? 1 : 2);
body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
}
// body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
// body['isVidaPlus'] = true;
body['Latitude'] = await AppSharedPreferences().getDouble(USER_LAT);
body['Longitude'] = await AppSharedPreferences().getDouble(USER_LONG);
double lat = await AppSharedPreferences().getDouble(USER_LAT);
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')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
@ -89,7 +106,11 @@ class BaseAppClient {
: 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('PatientType')) {
@ -149,7 +170,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
// body['PatientID'] = 4767370; //3844083
// body['PatientID'] = 1231755; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -158,11 +179,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
// if (AppGlobal.isNetworkDebugEnabled) {
if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url");
final jsonBody = json.encode(body);
print(jsonBody);
// }
print(jsonBody);
}
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -51,13 +51,14 @@ class HospitalService extends BaseService {
}
}
Future getHospitals({bool isResBasedOnLoc = true, bool isAdvancePayment = false}) async {
Future getHospitals(int languageID, {bool isResBasedOnLoc = true, bool isAdvancePayment = false}) async {
if (isResBasedOnLoc) await _getCurrentLocation();
Map<String, dynamic> body = Map();
body['Latitude'] = await this.sharedPref.getDouble(USER_LAT);
body['Longitude'] = await this.sharedPref.getDouble(USER_LONG);
body['IsOnlineCheckIn'] = isResBasedOnLoc;
body['IsAdvancePayment'] = isAdvancePayment;
body['LanguageID'] = languageID;
await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) {
_hospitals.clear();

@ -11,9 +11,11 @@ class PatientSickLeaveService extends BaseService {
await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS,
onSuccess: (response, statusCode) async {
sickLeaveList.clear();
response['List_SickLeave'].forEach((sickLeave) {
sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
if(response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) {
response['List_SickLeave'].forEach((sickLeave) {
sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -148,4 +148,5 @@ class AskDoctorService extends BaseService {
}, body: body);
return Future.value(localRes);
}
}

@ -11,6 +11,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List();
String labReportPDF = "";
Future getPatientLabOrdersList() async {
hasError = false;
Map<String, dynamic> body = Map();
@ -32,11 +34,16 @@ class LabsService extends BaseService {
List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String invoiceType, String orderNo, String setupID, bool isVidaPlus}) async {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.invoiceType = invoiceType;
_requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID;
@ -51,10 +58,12 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson());
}
Future getPatientLabResult({PatientLabOrders patientLabOrder}) async {
Future getPatientLabResult({PatientLabOrders patientLabOrder, bool isVidaPlus}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
body['InvoiceType'] = patientLabOrder.invoiceType;
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
@ -171,10 +180,11 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, bool isVidaPlus}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
@ -194,9 +204,11 @@ class LabsService extends BaseService {
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj}) async {
Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isVidaPlus, bool isDownload = false}) async {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID;
_requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
_requestSendLabReportEmail.invoiceType = patientLabOrder.invoiceType;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = userObj.firstName + " " + userObj.lastName;
@ -208,8 +220,15 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID;
_requestSendLabReportEmail.orderNo = patientLabOrder.orderNo;
_requestSendLabReportEmail.orderNo = patientLabOrder.orderNo;
_requestSendLabReportEmail.isDownload = isDownload;
_requestSendLabReportEmail.doctorID = patientLabOrder.doctorID;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
if (isDownload) {
labReportPDF = response['LabReportsPDFContent'];
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendLabReportEmail.toJson());

@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/model/radiology/request_send_rad_report_email.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -9,12 +8,16 @@ class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List();
String url = '';
Future getRadImageURL({int invoiceNo, int lineItem, int projectId}) async {
bool isRadiologyVIDAPlus = false;
Future getRadImageURL({int invoiceNo, String invoiceType, int lineItem, int projectId, bool isVidaPlus}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo;
body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
body['InvoiceType'] = invoiceType;
await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
@ -28,9 +31,18 @@ class RadiologyService extends BaseService {
hasError = false;
await baseAppClient.post(GET_PATIENT_ORDERS, onSuccess: (dynamic response, int statusCode) {
finalRadiologyList.clear();
response['FinalRadiologyList'].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
// response['FinalRadiologyList'].forEach((radiology) {
if (response['FinalRadiologyList'] != null && response['FinalRadiologyList'].length != 0) {
isRadiologyVIDAPlus = false;
response['FinalRadiologyList'].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
} else {
isRadiologyVIDAPlus = true;
response['FinalRadiologyListAPI'].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -56,6 +68,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.projectID = finalRadiology.projectID;
_requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription;
_requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo;
_requestSendRadReportEmail.invoiceNo_VP = finalRadiology.invoiceNo_VP;
_requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo;
_requestSendRadReportEmail.setupID = finalRadiology.setupID;
_requestSendRadReportEmail.doctorName = finalRadiology.doctorName;
@ -67,6 +80,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.radResult = finalRadiology.reportData;
_requestSendRadReportEmail.to = userObj.emailAddress;
_requestSendRadReportEmail.dateofBirth = userObj.dateofBirth;
_requestSendRadReportEmail.invoiceType = finalRadiology.invoiceType;
hasError = false;
await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {

@ -29,7 +29,7 @@ class ReportsService extends BaseService {
}
Future getInPatientReports() async {
RequestReports _requestReportsInpatient = RequestReports(isReport: true, encounterType: 2, requestType: 2, patientOutSA: 0, projectID: 0);
RequestReports _requestReportsInpatient = RequestReports(isReport: true, encounterType: 2, requestType: 1, patientOutSA: 0, projectID: 0);
hasError = false;
await baseAppClient.post(REPORTS, onSuccess: (dynamic response, int statusCode) {
inpatientReportsList.clear();
@ -137,7 +137,7 @@ class ReportsService extends BaseService {
body['ProjectID'] = projectID;
body['Remarks'] = "";
body['ProcedureId'] = "";
body['RequestType'] = 2;
body['RequestType'] = 1;
body['Source'] = 2;
body['Status'] = 1;
body['CreatedBy'] = 102;

@ -1,19 +1,42 @@
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/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PrivilegeService extends BaseService {
List<PrivilegeModel> privilegeModelList = List();
List<PrivilegeModel> privilegeModelList = [];
List<VidaPlusProjectListModel> vidaPlusProjectListModel = [];
List<HMCProjectListModel> hMCProjectListModel = [];
List<ProjectDetailListModel> projectDetailListModel = [];
Future getPrivilege() async {
Map<String, dynamic> body = Map();
body['PatientType'] = 4;
await baseAppClient.post(GET_PRIVILEGE,
onSuccess: (dynamic response, int statusCode) {
body['LanguageID'] = 1;
await baseAppClient.post(GET_PRIVILEGE, onSuccess: (dynamic response, int statusCode) {
response['ServicePrivilegeList'].forEach((item) {
privilegeModelList.add(PrivilegeModel.fromJson(item));
});
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((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) {
hasError = true;
super.error = error;

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

@ -12,10 +12,10 @@ class AppointmentRateViewModel extends BaseViewModel {
AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails;
Future getIsLastAppointmentRatedList() async {
Future getIsLastAppointmentRatedList(int languageID) async {
isHaveAppointmentNotRate = false;
setState(ViewState.Busy);
await _appointmentRateService.getIsLastAppointmentRatedList();
await _appointmentRateService.getIsLastAppointmentRatedList(languageID);
if (_appointmentRateService.hasError) {
error = _appointmentRateService.error;
setState(ViewState.Error);

@ -20,10 +20,10 @@ class EdOnlineViewModel extends BaseViewModel {
ErPatientShareModel get erPatientShareModel => _edOnlineServices.erPatientShareModel;
Future getHospitals() async {
Future getHospitals(int languageID) async {
if(_hospitalService.hospitals.isEmpty){
setState(ViewState.Busy);
await _hospitalService.getHospitals();
await _hospitalService.getHospitals(languageID);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);

@ -50,19 +50,19 @@ class AmRequestViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getAmRequestOrders() async {
Future getAmRequestOrders(int languageID) async {
setState(ViewState.Busy);
await _amService.getAllTransportationOrders();
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
getHospitals();
getHospitals(languageID);
}
Future getHospitals() async {
Future getHospitals(int languageID) async {
setState(ViewState.Busy);
await _hospitalService.getHospitals(isResBasedOnLoc: false);
await _hospitalService.getHospitals(languageID, isResBasedOnLoc: false);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);

@ -10,9 +10,9 @@ class HospitalViewModel extends BaseViewModel {
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
Future getHospitals() async {
Future getHospitals(int languageID) async {
setState(ViewState.Busy);
await _hospitalService.getHospitals();
await _hospitalService.getHospitals(languageID);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);

@ -20,6 +20,8 @@ class LabsViewModel extends BaseViewModel {
List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<TimeSeriesSales2> timeSeries = [];
String get labReportPDF => _labsService.labReportPDF;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
@ -46,7 +48,7 @@ class LabsViewModel extends BaseViewModel {
List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
)
.toList();
if (patientLabOrdersHospital.length != 0) {
@ -72,9 +74,15 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = List();
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID}) async {
getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String invoiceType, String orderNo, String setupID, bool isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
invoiceType: invoiceType,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
setupID: setupID,
isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -83,9 +91,9 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabResult({PatientLabOrders patientLabOrder}) async {
getPatientLabResult({PatientLabOrders patientLabOrder, bool isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder);
await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder, isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -107,9 +115,9 @@ class LabsViewModel extends BaseViewModel {
}
}
getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, bool isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure);
await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure, isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@ -135,11 +143,14 @@ class LabsViewModel extends BaseViewModel {
}
}
sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj);
sendLabReportEmail({PatientLabOrders patientLabOrder, String mes, AuthenticatedUser userObj, bool isVidaPlus, bool isDownload = false}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload);
if (_labsService.hasError) {
error = _labsService.error;
} else
AppToast.showSuccessToast(message: mes);
} else {
if (isDownload) {} else {
AppToast.showSuccessToast(message: mes);
}
}
}
}

@ -70,9 +70,9 @@ class MyBalanceViewModel extends BaseViewModel {
}
}
Future getHospitals({bool isAdvancePayment = false}) async {
Future getHospitals(int languageID, {bool isAdvancePayment = false}) async {
setState(ViewState.Busy);
await _hospitalService.getHospitals(isAdvancePayment: isAdvancePayment);
await _hospitalService.getHospitals(languageID, isAdvancePayment: isAdvancePayment);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);

@ -18,9 +18,14 @@ class RadiologyViewModel extends BaseViewModel {
List<FinalRadiologyList> get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital;
bool _isRadiologyVIDAPlus = false;
bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus;
void getPatientRadOrders() async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders();
_isRadiologyVIDAPlus = _radiologyService.isRadiologyVIDAPlus;
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);
@ -43,9 +48,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url;
getRadImageURL({int invoiceNo, int lineItem, int projectId}) async {
getRadImageURL({int invoiceNo, String invoiceType, int lineItem, int projectId, bool isVidaPlus}) async {
setState(ViewState.Busy);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus);
if (_radiologyService.hasError) {
error = _radiologyService.error;
setState(ViewState.Error);

@ -4,7 +4,10 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.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/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
@ -15,8 +18,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
var isAppArabic = false;
class ProjectViewModel extends BaseViewModel {
class ProjectViewModel extends BaseViewModel {
GAnalytics get analytics => locator<GAnalytics>();
// Platform Bridge
@ -39,10 +42,14 @@ class ProjectViewModel extends BaseViewModel {
double _latitude;
double _longitude;
RegisterInfoResponse _registerInfo =RegisterInfoResponse();
RegisterInfoResponse _registerInfo = RegisterInfoResponse();
double get latitude => _latitude;
double get longitude => _longitude;
RegisterInfoResponse get registerInfo=> _registerInfo;
RegisterInfoResponse get registerInfo => _registerInfo;
dynamic get searchValue => searchvalue;
Locale get appLocal => _appLocale;
@ -54,9 +61,17 @@ class ProjectViewModel extends BaseViewModel {
bool isLoginChild = false;
List<PrivilegeModel> privilegeRootUser = List();
List<PrivilegeModel> privilegeChildUser = List();
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = List();
List<HMCProjectListModel> _hMCProjectListModel = [];
List<ProjectDetailListModel> _projectDetailListModel = [];
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<PrivilegeModel> get privileges =>
isLoginChild ? privilegeChildUser : privilegeChildUser;
List<HMCProjectListModel> get hMCProjectListModel => _hMCProjectListModel;
List<ProjectDetailListModel> get projectDetailListModel => _projectDetailListModel;
List<LaserBodyPart> selectedBodyPartList = [];
@ -64,9 +79,7 @@ class ProjectViewModel extends BaseViewModel {
ProjectViewModel() {
loadSharedPrefLanguage();
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
@ -89,8 +102,7 @@ class ProjectViewModel extends BaseViewModel {
}
Future loadSharedPrefLanguage() async {
currentLanguage =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);
isAppArabic = _isArabic = currentLanguage == 'ar';
notifyListeners();
@ -121,6 +133,21 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners();
}
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
setProjectsDetailList(List<ProjectDetailListModel> projectDetailListModel) {
_projectDetailListModel = projectDetailListModel;
notifyListeners();
}
setHMCProjectList(List<HMCProjectListModel> hMCProjectListModel) {
_hMCProjectListModel = hMCProjectListModel;
notifyListeners();
}
setPrivilege({privilegeList, bool isLoginChild = false}) {
List<PrivilegeModel> privilege = List();
@ -166,8 +193,9 @@ class ProjectViewModel extends BaseViewModel {
searchvalue = data;
notifyListeners();
}
setRegisterData(RegisterInfoResponse data){
_registerInfo =data;
setRegisterData(RegisterInfoResponse data) {
_registerInfo = data;
notifyListeners();
}
}

@ -70,7 +70,7 @@ class _MyApp extends State<MyApp> {
// var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans';
// Re-enable once going live
if (Platform.isAndroid) checkForUpdate();
// if (Platform.isAndroid) checkForUpdate();
ThemeNotifier(defaultTheme());
super.initState();

@ -15,7 +15,7 @@ class CheckActivationCodeReq {
bool isSilentLogin;
double versionID;
int channel;
int languageID;
// int languageID;
String iPAdress;
String generalid;
int patientOutSA;
@ -41,7 +41,7 @@ class CheckActivationCodeReq {
this.isSilentLogin,
this.versionID,
this.channel,
this.languageID,
// this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
@ -68,7 +68,7 @@ class CheckActivationCodeReq {
isSilentLogin = json['IsSilentLogin'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
// languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
@ -96,7 +96,7 @@ class CheckActivationCodeReq {
data['IsSilentLogin'] = this.isSilentLogin;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
// data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;

@ -1,7 +1,7 @@
class GetAllSharedRecordsByStatusReq {
double versionID;
int channel;
int languageID;
// int languageID;
String iPAdress;
String generalid;
int patientOutSA;
@ -17,7 +17,7 @@ class GetAllSharedRecordsByStatusReq {
GetAllSharedRecordsByStatusReq(
{this.versionID,
this.channel,
this.languageID,
// this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
@ -33,7 +33,7 @@ class GetAllSharedRecordsByStatusReq {
GetAllSharedRecordsByStatusReq.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
// languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
@ -51,7 +51,7 @@ class GetAllSharedRecordsByStatusReq {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
// data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;

@ -1,6 +1,6 @@
class AncillaryOrdersListModel {
List<AncillaryOrderList> ancillaryOrderList;
Null errCode;
dynamic errCode;
String message;
int patientID;
String patientName;
@ -32,7 +32,7 @@ class AncillaryOrdersListModel {
errCode = json['ErrCode'];
message = json['Message'];
patientID = json['PatientID'];
patientName = json['PatientName'];
patientName = json['PatientName'] != null ? json['PatientName'] : "";
patientType = json['PatientType'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
@ -83,7 +83,7 @@ class AncillaryOrderList {
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
clinicID = json['ClinicID'];
clinicName = json['ClinicName'];
clinicName = json['ClinicName'] != null ? json['ClinicName'] : "";
doctorID = json['DoctorID'];
doctorName = json['DoctorName'];
orderDate = json['OrderDate'];

@ -0,0 +1,18 @@
class AncillaryOrdersProcedureList {
int procedureID;
String procedureDescription;
AncillaryOrdersProcedureList({this.procedureID, this.procedureDescription});
AncillaryOrdersProcedureList.fromJson(Map<String, dynamic> json) {
procedureID = json['ProcedureID'];
procedureDescription = json['ProcedureDescription'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProcedureID'] = this.procedureID;
data['ProcedureDescription'] = this.procedureDescription;
return data;
}
}

@ -41,6 +41,7 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
HospitalsModel selectedHospital;
final GlobalKey projectDropdownKey = GlobalKey();
bool isLocationSelected = false;
ProjectViewModel projectViewModel;
static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
@ -74,7 +75,7 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
description: TranslationBase.of(context).infoCMC,
@ -360,10 +361,11 @@ class _NewCMCStepThreePageState extends State<NewCMCStepThreePage> {
}
getProjectsList() {
int languageID = projectViewModel.isArabic ? 1 : 2;
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
List<HospitalsModel> projectsListLocal = [];
service.getProjectsList(context).then((res) {
service.getProjectsList(languageID, context).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
res['ListProject'].forEach((v) {

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart';
@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../dialogs/select_city_dialog.dart';
@ -436,9 +438,10 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
}
void getAllProjects() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
service.getProjectsList(context).then((res) {
service.getProjectsList(languageID, context).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
res['ListProject'].forEach((v) {

@ -2,11 +2,13 @@ import 'dart:io';
import "package:collection/collection.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/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_orders_proc_list.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -23,6 +25,7 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
@ -46,10 +49,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
List<AncillaryOrderProcDetailsList> selectedProcList = [];
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = [];
String tamaraPaymentStatus;
String tamaraOrderID;
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
getAncillaryOrderDetails();
});
super.initState();
}
@ -57,12 +65,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
super.dispose();
}
void getAncillaryOrderDetails(AnciallryOrdersViewModel model) {
void getAncillaryOrderDetails() {
GifLoaderDialogUtils.showMyDialog(context);
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((value) {
addToSelectedProcedures(model);
AncillaryOrdersService ancillaryOrdersService = new AncillaryOrdersService();
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);
}).catchError((err) {
AppToast.showErrorToast(message: err.toString());
GifLoaderDialogUtils.hideDialog(context);
});
}
@ -72,79 +89,74 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
projectViewModel = Provider.of(context);
localContext = context;
AppGlobal.context = context;
return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) {
// getAncillaryOrderDetails(model);
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((value) {
addToSelectedProcedures(model);
});
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).anicllaryOrders,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: model.ancillaryListsDetails.length > 0
? Column(children: [
getPatientInfo(model),
getAncillaryDetails(model),
])
: getNoDataWidget(context),
),
bottomSheet: model.ancillaryListsDetails.length > 0
? Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
),
padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15),
width: double.infinity,
// color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
_amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue() + " " + TranslationBase.of(context).sar, isBold: true, isTotal: true),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
selectedProcList.length > 0 && getTotalValue() != "0.00"
? () {
makePayment(model);
}
: null,
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
],
),
return AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).anicllaryOrders,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: _ancillaryProcLists.isNotEmpty
? Column(
children: [
getPatientInfo(),
getAncillaryDetails(),
],
)
: Container(),
: getNoDataWidget(context),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
),
padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15),
width: double.infinity,
// color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
_amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue() + " " + TranslationBase.of(context).sar, isBold: true, isTotal: true),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
selectedProcList.length > 0
? () {
if (getTotalValue() != "0.00") {
makePayment();
} else {
autoGenerateInvoice();
}
}
: null,
color: selectedProcList.length > 0 ? CustomColors.green : CustomColors.grey2,
disabledColor: CustomColors.grey2,
),
],
),
),
);
}
@ -179,7 +191,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
);
}
Widget getPatientInfo(AnciallryOrdersViewModel model) {
Widget getPatientInfo() {
return Padding(
child: Column(
children: [
@ -272,7 +284,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
model.ancillaryListsDetails[0].appointmentNo.toString(),
_ancillaryProcLists[0].appointmentNo.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -295,7 +307,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList[0].orderNo.toString(),
_ancillaryProcLists[0].ancillaryOrderProcDetailsList[0].orderNo.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -320,7 +332,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
mWidth(3),
Expanded(
child: Text(
model.ancillaryListsDetails[0].companyName.toString(),
_ancillaryProcLists[0].companyName.toString(),
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.w600,
@ -345,7 +357,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
),
mWidth(3),
Text(
model.ancillaryListsDetails[0].insurancePolicyNo.toString(),
_ancillaryProcLists[0].insurancePolicyNo.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
@ -365,8 +377,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
);
}
Widget getAncillaryDetails(model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
Widget getAncillaryDetails() {
Map newMap = groupBy(_ancillaryProcLists[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap));
}
@ -488,21 +500,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
return tableRow;
}
makePayment(AnciallryOrdersViewModel model) {
makePayment() {
showDraggableDialog(
context,
PaymentMethod(
onSelectedMethod: (String method, [String selectedInstallmentPlan]) {
selectedPaymentMethod = method;
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()),
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);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID);
@ -524,10 +536,10 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
// Need to get new Service ID from Ayman for Ancillary Tamara
"",
context,
model.ancillaryListsDetails[0].appointmentDate,
model.ancillaryListsDetails[0].appointmentNo,
model.ancillaryListsDetails[0].clinicID,
model.ancillaryListsDetails[0].doctorID,
_ancillaryProcLists[0].appointmentDate,
_ancillaryProcLists[0].appointmentNo,
_ancillaryProcLists[0].clinicID,
_ancillaryProcLists[0].doctorID,
selectedInstallmentPlan);
}
@ -571,7 +583,6 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
} else {
checkPaymentStatus(appo);
}
}
checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) {
@ -633,18 +644,21 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.HIS_createAdvancePayment(
appo,
widget.projectID.toString(),
res['Amount'],
res['Fort_id'],
res['PaymentMethod'],
projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.patientID,
localContext)
// List<AncillaryOrdersProcedureList> ancillaryOrdersProcedureList = [];
// selectedProcList.forEach((element) {
// ancillaryOrdersProcedureList.add(new AncillaryOrdersProcedureList(procedureID: num.parse(element.procedureID), procedureDescription: element.procedureName));
// });
service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, projectViewModel.user.patientID, localContext,
isAncillaryOrder: true)
.then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, widget.projectID)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
0,
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(localContext);
AppToast.showErrorToast(message: err);
@ -665,7 +679,6 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
autoGenerateInvoice() {
List<dynamic> selectedProcListAPI = [];
Map<dynamic, dynamic> selectedProcListAPIMap;
selectedProcList.forEach((element) {
selectedProcListAPI.add({
@ -675,6 +688,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
});
});
GifLoaderDialogUtils.showMyDialog(localContext);
DoctorsListService service = new DoctorsListService();
service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, localContext).then((res) {
GifLoaderDialogUtils.hideDialog(localContext);
@ -709,16 +724,18 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
}
}
addToSelectedProcedures(AnciallryOrdersViewModel model) {
if (model.ancillaryListsDetails.isNotEmpty) {
addToSelectedProcedures() {
if (_ancillaryProcLists.isNotEmpty) {
selectedProcList.clear();
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((element) {
if (!isProcedureDisabled(element)) {
selectedProcList.add(element);
}
});
setState(() {});
if (_ancillaryProcLists[0].ancillaryOrderProcDetailsList.isNotEmpty) {
_ancillaryProcLists[0].ancillaryOrderProcDetailsList.forEach((element) {
if (!isProcedureDisabled(element)) {
selectedProcList.add(element);
}
});
} else {}
}
setState(() {});
}
String getInsuranceText(value) {

@ -32,10 +32,11 @@ class BariatricsPage extends StatefulWidget {
class _BariatricsPageState extends State<BariatricsPage> {
DiseasesByClinic _selectedDisease;
ProjectViewModel projectProvider;
@override
Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
projectProvider = Provider.of(context);
return BaseView<BariatricsViewModel>(
onModelReady: (model) => model.getClinicCategory(),
@ -139,6 +140,7 @@ class _BariatricsPageState extends State<BariatricsPage> {
}
callDoctorsSearchAPI() {
int languageID = projectProvider.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -148,7 +150,7 @@ class _BariatricsPageState extends State<BariatricsPage> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service.getDoctorsList(108, 0, false, context).then((res) {
service.getDoctorsList(108, 0, false, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -1,8 +1,8 @@
import 'dart:collection';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
class ResultPage extends StatefulWidget {
final double finalResult;
@ -137,6 +138,7 @@ class _ResultPageState extends State<ResultPage> {
}
callDoctorsSearchAPI() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -146,7 +148,7 @@ class _ResultPageState extends State<ResultPage> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service.getDoctorsList(108, 0, false, context).then((res) {
service.getDoctorsList(108, 0, false, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart';
@ -31,11 +33,13 @@ class ConfirmPaymentPage extends StatelessWidget {
MyInAppBrowser browser;
AuthenticatedUser authenticatedUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
ProjectViewModel projectViewModel;
ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser});
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
void showSMSDialog() {
showDialog(
context: context,
@ -250,8 +254,13 @@ class ConfirmPaymentPage extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);

@ -59,6 +59,10 @@ class _BookConfirmState extends State<BookConfirm> {
AppSharedPreferences sharedPref = new AppSharedPreferences();
bool isInsured = false;
bool isEligible = false;
bool isCash = false;
@override
void initState() {
// widget.authUser = new AuthenticatedUser();
@ -331,9 +335,9 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
Future.delayed(new Duration(milliseconds: 500), () {
checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
// getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
// getToDoCount();
// checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context);
getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
});
widget.service.logDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, decodedLogs, res['AppointmentNo'], context).then((res) {
@ -437,13 +441,41 @@ class _BookConfirmState extends State<BookConfirm> {
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
String errorMsg = "";
GifLoaderDialogUtils.showMyDialog(context);
widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0;
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
if(res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
}
isInsured = res["IsInsured"];
isEligible = res["IsEligible"];
isCash = res["IsCash"];
if (isCash) {
navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash);
} else {
if (isInsured && isEligible) {
navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash);
} else {
if (isInsured && !isEligible) {
errorMsg = TranslationBase.of(context).invalidEligibility;
} else {
errorMsg = TranslationBase.of(context).invalidInsurance;
}
ConfirmDialog dialog = new ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: errorMsg,
okText: TranslationBase.of(context).updateInsuranceText,
cancelText: TranslationBase.of(context).continueCash,
okFunction: () => {openUpdateInsurance()},
cancelFunction: () => {continueAsCash(docObject, appointmentNo)});
dialog.showAlertDialog(context);
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);
@ -458,7 +490,7 @@ class _BookConfirmState extends State<BookConfirm> {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
navigateToBookSuccess(context, docObject, widget.patientShareResponse, false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
@ -522,7 +554,7 @@ class _BookConfirmState extends State<BookConfirm> {
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);
this.sharedPref.remove(IS_LIVECARE_APPOINTMENT);
Navigator.push(
@ -534,6 +566,7 @@ class _BookConfirmState extends State<BookConfirm> {
appoDateFormatted: widget.appoDateFormatted,
appoTimeFormatted: widget.selectedTime,
dateTime: getDateTime(),
isCash: isCash,
),
),
);

@ -1,6 +1,5 @@
import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -8,6 +7,8 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.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/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -18,6 +19,7 @@ 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/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -37,8 +39,9 @@ class BookSuccess extends StatefulWidget {
String appoDateFormatted;
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
_BookSuccessState createState() => _BookSuccessState();
@ -46,6 +49,7 @@ class BookSuccess extends StatefulWidget {
class _BookSuccessState extends State<BookSuccess> {
AppSharedPreferences sharedPref = AppSharedPreferences();
// AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
@ -155,25 +159,54 @@ class _BookSuccessState extends State<BookSuccess> {
Widget _getQRButtons() {
return Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.all(14),
height: MediaQuery.of(context).size.height * 0.18,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xFF60686b),
elevation: 0,
onPressed: () {
// navigateToQR(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
Row(
children: [
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: CustomColors.green,
elevation: 0,
onPressed: () {
GifLoaderDialogUtils.showMyDialog(context);
getAppoQR(context);
},
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,51 +219,85 @@ class _BookSuccessState extends State<BookSuccess> {
child: Container(
color: CustomColors.appBackgroudGreyColor,
margin: EdgeInsets.all(14),
height: 45.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startPaymentProcess();
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true);
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
),
),
mWidth(7),
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
height: widget.isCash ? 150.0 : 50,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startPaymentProcess();
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true);
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
),
),
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
navigateToHome(context);
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
mWidth(7),
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
navigateToHome(context);
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),
),
),
],
),
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(),
],
),
),
@ -775,7 +842,13 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);

@ -75,10 +75,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
languageID: languageID,
isDoctorNameSearch: widget.isDoctorNameSearch,
onSelectedMethod: widget.onSelectedMethod,
)..logAnalytics = (){
final info = widget.searchInfo;
locator<GAnalytics>().appointment.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
},
)..logAnalytics = () {
final info = widget.searchInfo;
locator<GAnalytics>()
.appointment
.book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]);
},
);
},
separatorBuilder: (BuildContext context, int index) {
@ -207,11 +209,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}
continueDentalPlan() {
int languageID = projectViewModel.isArabic ? 1 : 2;
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
int appoTime = 0;
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) {
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, languageID, context, isContinueDentalPlan: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
dentalProceduresModel = DentalProceduresModel.fromJson(res);
@ -254,10 +257,11 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}
getChiefComplaintsList() {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) {
service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -1,7 +1,10 @@
import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.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/models/Appointments/AppoimentAllHistoryResultList.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/date_uitl.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/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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/new_design/doctor_header.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_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@ -43,6 +51,10 @@ class _QRCodeState extends State<QRCode> {
bool _supportsNFC = false;
BuildContext _context;
ProjectViewModel projectViewModel;
LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel;
@override
void initState() {
// TODO: implement initState
@ -50,13 +62,9 @@ class _QRCodeState extends State<QRCode> {
// _bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
startNFCScan();
});
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// startNFCScan();
// });
super.initState();
}
@ -65,7 +73,7 @@ class _QRCodeState extends State<QRCode> {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
sendNfcCheckInRequest(nfcId, 1);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
@ -75,9 +83,36 @@ 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
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
_context = context;
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
@ -111,78 +146,127 @@ class _QRCodeState extends State<QRCode> {
onTap: () {},
onRatingAndReviewTap: () {},
),
InkWell(
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);
});
},
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
)),
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
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(
color: CustomColors.appBackgroudGreyColor,
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,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startNFCScan();
},
child: Text(TranslationBase.of(context).scanNFC,
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
),
),
],
// bottomSheet: Container(
// color: CustomColors.appBackgroudGreyColor,
// 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,
// child: CustomTextButton(
// backgroundColor: CustomColors.green,
// elevation: 0,
// onPressed: () {
// startNFCScan();
// },
// child: Text(TranslationBase.of(context).scanNFC,
// style: TextStyle(
// fontSize: 18.0,
// color: Colors.white,
// )),
// ),
// ),
// ),
// ],
// ),
// ),
);
}
List<Widget> getCheckInOptionsList(BuildContext context) {
List<Widget> optionsList = [];
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(80) && _supportsNFC) {
startNFCScan();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).scanNFC,
imagePath: 'contactless.svg',
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 {
@ -258,12 +342,12 @@ class _QRCodeState extends State<QRCode> {
return docSpeciality;
}
sendNfcCheckInRequest(String nfcId) {
sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context);
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);
GifLoaderDialogUtils.hideDialog(context);

@ -27,8 +27,9 @@ class BookReminderPage extends StatefulWidget {
String appoDateFormatted;
String appoTimeFormatted;
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
_BookReminderPageState createState() => _BookReminderPageState();
@ -184,8 +185,8 @@ class _BookReminderPageState extends State<BookReminderPage> {
),
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () async {
print(widget.patientShareResponse.appointmentNo);
showReminderDialog(
@ -215,10 +216,17 @@ class _BookReminderPageState extends State<BookReminderPage> {
Future navigateToBookSuccess(BuildContext context) async {
Navigator.push(
context,
FadePage(
page:
BookSuccess(docObject: widget.docObject, patientShareResponse: widget.patientShareResponse, appoDateFormatted: widget.appoDateFormatted, appoTimeFormatted: widget.appoTimeFormatted)));
context,
FadePage(
page: BookSuccess(
docObject: widget.docObject,
patientShareResponse: widget.patientShareResponse,
appoDateFormatted: widget.appoDateFormatted,
appoTimeFormatted: widget.appoTimeFormatted,
isCash: widget.isCash,
),
),
);
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {

@ -376,10 +376,11 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
}
getCurrentLanguage() async {
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() {
this.language = languageID;
});
this.language = projectViewModel.isArabic ? "ar" : "en";
// var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// setState(() {
// this.language = languageID;
// });
}
}

@ -204,6 +204,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
}
callDoctorsSearchAPI() {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -214,7 +215,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
DoctorsListService service = new DoctorsListService();
projectViewModel.selectedBodyPartList = _selectedBodyPartList;
service.getDoctorsList(253, 0, false, context).then((res) {
service.getDoctorsList(253, 0, false, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -499,10 +499,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
getProjectsList() {
int languageID = projectViewModel.isArabic ? 1 : 2;
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
service
.getProjectsList(context)
.getProjectsList(languageID, context)
.then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
@ -572,6 +573,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
callDoctorsSearchAPI(int clinicID) {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -581,7 +583,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -609,6 +611,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
nearestAppo = false;
isProjectLoaded = false;
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);

@ -90,13 +90,14 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}
getDoctorsList(BuildContext context) {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getDoctorsListByName(doctorNameController.text, context).then((res) {
service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) {
// GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
@ -6,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
// ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget {
@ -60,12 +62,13 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
}
getChiefComplaintsList() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
service.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD, widget.listDentalChiefComplain.projectID, context).then((res) {
service.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD, widget.listDentalChiefComplain.projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']);

@ -183,10 +183,11 @@ class DoctorView extends StatelessWidget {
}
getDoctorsProfile(context, DoctorList docObject, {isAppo}) {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorProfileList> docProfileList = [];
DoctorsListService service = new DoctorsListService();
service.getDoctorsProfile(docObject.doctorID, docObject.clinicID, docObject.projectID, context).then((res) {
service.getDoctorsProfile(docObject.doctorID, docObject.clinicID, docObject.projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) {

@ -126,7 +126,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
value: item,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text(item.projectName), getCovidTestTypeImage(item)],
children: [Text(item.projectName ?? ""), getCovidTestTypeImage(item)],
),
);
}).toList(),

@ -402,8 +402,12 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString());
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString());
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);

@ -451,20 +451,20 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
refreshFamily(context) async {
await sharedPref.remove(FAMILY_FILE);
await checkUserData();
await sharedPref.remove(FAMILY_FILE);
await checkUserData();
}
switchUser(user, context) {
GifLoaderDialogUtils.showMyDialog(context);
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
// this
// .familyFileProvider
// .silentLoggin(user)
// .then((value) => loginAfter(value, context));
// Utils.showProgressDialog(context);
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) {
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) {
print("err:$err");
AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
@ -528,9 +528,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.acceptRejectFamily(request).then((value) async{
await refreshFamily(context);
this.familyFileProvider.acceptRejectFamily(request).then((value) async {
await refreshFamily(context);
GifLoaderDialogUtils.hideDialog(context);
});
}
@ -540,7 +539,6 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
// var data2 = AuthenticatedUser.fromJson(await this.sharedPref.getObject(MAIN_USER));
await getFamilyFiles();
this.user = data;
setState(() {
@ -562,19 +560,19 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
try {
if (familySharedRecords == null) {
familySharedRecords = await familyFileProvider.getSharedRecordByStatus();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
familySharedRecords = await familyFileProvider.getSharedRecordByStatus(languageID);
}
sentRecordsList =[];
familySharedRecordsList =[];
sentRecordsList = [];
familySharedRecords.getAllSharedRecordsByStatusList.forEach((element) {
if (element.status == 3) {
familySharedRecordsList.add(element);
}
sentRecordsList.add(element);
});
approvedRecordsList =[];
pendingRecordsList =[];
approvedRecordsList = [];
pendingRecordsList = [];
GetAllSharedRecordsByStatusResponse pendingAndApprovedRecords = await getUserViewRequest();
pendingAndApprovedRecords.getAllSharedRecordsByStatusList.forEach((element) {
@ -586,7 +584,6 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
});
} catch (ex) {
familySharedRecords = GetAllSharedRecordsByStatusResponse(getAllSharedRecordsByStatusList: []);
}
GifLoaderDialogUtils.hideDialog(context);

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

@ -40,7 +40,7 @@ class _AmbulanceReqState extends State<AmbulanceReq> with SingleTickerProviderSt
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(),
onModelReady: (model) => model.getAmRequestOrders(projectViewModel.isArabic ? 1 : 2),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
showNewAppBarTitle: true,

@ -33,7 +33,7 @@ class _EdOnlineSelectedHospitalPageState extends State<EdOnlineSelectedHospitalP
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<EdOnlineViewModel>(
onModelReady: (model) => model.getHospitals(),
onModelReady: (model) => model.getHospitals(projectViewModel.isArabic ? 1 : 2),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
body: SingleChildScrollView(

@ -592,12 +592,16 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate);
await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id, params).then((value) {
Result<UnmodifiableListView<Event>> events = value;
events.data.forEach((element) {
if (element.title.contains(widget.appo.doctorNameObj)) calendarUtils.deleteEvent(calendarUtils.calendars[0], element);
try {
await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id, params).then((value) {
Result<UnmodifiableListView<Event>> events = value;
events.data.forEach((element) {
if (element.title.contains(widget.appo.doctorNameObj)) calendarUtils.deleteEvent(calendarUtils.calendars[0], element);
});
});
});
} catch (ex) {
print(ex);
}
}
cancelAppointment() {

@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.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/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_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -52,6 +54,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
int _currentPage = 0;
ToDoCountProviderModel toDoProvider;
@override
void initState() {
filterType = FilterType.Clinic;
@ -72,6 +76,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myAppointmentsList,
isShowAppBar: true,
@ -168,6 +173,19 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
print(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) {
@ -371,6 +389,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}),
isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
projectID: _appointmentResult.projectID,
// billNo: _appointmentResult.invoiceNo,
profileUrl: _appointmentResult.doctorImageURL,
subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName,
@ -378,7 +397,9 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate),
isSortByClinic: _isSortByClinic,
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),
remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED)
? _appointmentResult.remaniningHoursTocanPay

@ -38,6 +38,7 @@ class BookedButtons {
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "hosp_location.svg",
"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,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "reminder_icon.png",
"icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "location_icon.png",
"icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "check-in.png",
"icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList",
}
];

@ -29,6 +29,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -73,7 +74,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
shrinkWrap: true,
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) && 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(
onTap: shouldEnable
? null
@ -87,6 +92,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
hasBadge: true,
isEnable: !shouldEnable,
imgColor: Color(0xff28323A),
isPngImage: appoButtonsList[index].icon.contains(".png") ? true : false,
),
);
},
@ -461,7 +467,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
askYourDoc() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.isAllowedToAskDoctor(widget.appo.doctorID, context).then((res) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
service.isAllowedToAskDoctor(widget.appo.doctorID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['PatientDoctorAppointmentResultList']);
if (res['PatientDoctorAppointmentResultList'].length != 0) {
@ -477,9 +484,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
getCallRequestType() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getCallRequestType(context).then((res) {
service.getCallRequestType(languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
List<AskDocRequestType> requestData = new List<AskDocRequestType>();
res['ListReqTypes'].forEach((element) {
@ -522,9 +530,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
sendAskDocRequest(int requestType) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendAskDocCallRequest(widget.appo, requestType.toString(), context).then((res) {
service.sendAskDocCallRequest(widget.appo, requestType.toString(), languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully");
@ -582,16 +592,51 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel.isLogin) {
if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
}
// if (model.count != 0) {
getPatientAppointmentHistoryWithAppo();
// } else {
// AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
// }
} else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: widget.appo,
)));
}
}
getPatientAppointmentHistoryWithAppo() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
service.getPatientAppointmentHistoryWithAppoNo(widget.appo.appointmentNo, languageID).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 {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err);
});
}
rateAppointment() {
widget.browser = new MyInAppBrowser();
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';

@ -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/landing/landing_page.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/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -51,12 +52,13 @@ class ToDo extends StatefulWidget {
List<AncillaryOrdersListModel> ancillaryLists = [];
List<OBGyneProcedureListResponse> obGyneAppoList = [];
var languageID;
MyInAppBrowser browser;
bool isShowAppBar = true;
Function onBackClick;
bool isFromMyAppointments;
AppoitmentAllHistoryResultList appointment;
ToDo({@required this.isShowAppBar, this.onBackClick});
ToDo({@required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment});
@override
_ToDoState createState() => _ToDoState();
@ -79,6 +81,11 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
bool dataLoaded = false;
bool isInsured = false;
bool isEligible = false;
bool isCash = false;
MyInAppBrowser browser;
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
@ -539,12 +546,18 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
performNextAction(AppoitmentAllHistoryResultList appo) {
switch (appo.nextAction) {
case 0:
// getAppoQR(context, appo);
break;
case 10:
confirmAppointment(appo);
break;
case 15:
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingPaymentPending);
break;
case 20:
// getPatientShare(context, appo);
checkPatientNphiesEligibility(context, appo);
getPatientShare(context, appo);
// checkPatientNphiesEligibility(context, appo);
break;
case 30:
getAppoQR(context, appo);
@ -829,6 +842,10 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
});
}
dataLoaded = true;
if (widget.isFromMyAppointments) {
performNextAction(widget.appointment);
widget.isFromMyAppointments = false;
}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
@ -838,7 +855,19 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.hideDialog(context);
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) {
@ -889,6 +918,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
String errorMsg = "";
DoctorsListService service = new DoctorsListService();
if (appo.isLiveCareAppointment) {
getLiveCareAppointmentPatientShare(context, service, appo);
@ -896,8 +926,35 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse);
if (res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);
}
isInsured = res["IsInsured"];
isEligible = res["IsEligible"];
isCash = res["IsCash"];
if (isCash) {
openPaymentDialog(appo, widget.patientShareResponse);
} else {
if (isInsured && isEligible) {
openPaymentDialog(appo, widget.patientShareResponse);
} else {
if (isInsured && !isEligible) {
errorMsg = TranslationBase.of(context).invalidEligibility;
} else {
errorMsg = TranslationBase.of(context).invalidInsurance;
}
ConfirmDialog dialog = new ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: errorMsg,
okText: TranslationBase.of(context).updateInsuranceText,
cancelText: TranslationBase.of(context).continueCash,
okFunction: () => {openUpdateInsurance()},
cancelFunction: () => {continueAsCash(appo)});
dialog.showAlertDialog(context);
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
@ -932,23 +989,23 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
FlutterNfcKit.nfcAvailability.then((value) {
if (value == NFCAvailability.available) {
PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj;
patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
patientShareResponse.projectName = appo.projectName;
patientShareResponse.appointmentDate = appo.appointmentDate;
patientShareResponse.appointmentNo = appo.appointmentNo;
patientShareResponse.clinicID = appo.clinicID;
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
});
// FlutterNfcKit.nfcAvailability.then((value) {
// if (value == NFCAvailability.available) {
// PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj;
patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
patientShareResponse.projectName = appo.projectName;
patientShareResponse.appointmentDate = appo.appointmentDate;
patientShareResponse.appointmentNo = appo.appointmentNo;
patientShareResponse.clinicID = appo.clinicID;
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
// } else {
// Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
// }
// });
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
DoctorsListService service = new DoctorsListService();
@ -972,7 +1029,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse),
child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse, isCashPatient: isCash),
),
);
},
@ -994,9 +1051,9 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
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,
"Appointment check in",
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
@ -1007,7 +1064,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
widget.browser,
browser,
appo.isLiveCareAppointment,
"2",
appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
@ -1038,7 +1095,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
browser.close();
MyInAppBrowser.isPaymentDone = true;
return;
}
@ -1048,7 +1105,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
browser.close();
MyInAppBrowser.isPaymentDone = false;
return;
}
@ -1181,7 +1238,14 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo, res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, appo.projectID)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo,
res['OnlineCheckInAppointments'][0]);
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);

@ -3,20 +3,24 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.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/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
class PaymentDialog extends StatefulWidget {
AppoitmentAllHistoryResultList appo;
PatientShareResponse patientShareResponse;
bool isCashPatient;
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
_PaymentDialogState createState() => _PaymentDialogState();
@ -31,84 +35,118 @@ class _PaymentDialogState extends State<PaymentDialog> {
//height: 550.0,
width: 450.0,
padding: EdgeInsets.all(21),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: <Widget>[
Text(
TranslationBase.of(context).invoiceDetails,
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.w600,
letterSpacing: -1.14,
color: Color(0xff2B353E),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
TranslationBase.of(context).invoiceDetails,
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.w600,
letterSpacing: -1.14,
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(getDate(widget.appo.appointmentDate), style: getTextStyle()),
Text(widget.appo.projectName, style: getTextStyle()),
Divider(
color: Colors.grey,
),
Table(
children: [
TableRow(decoration: BoxDecoration(), children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())),
]),
],
),
Divider(color: Colors.grey),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
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(widget.appo.projectName, style: getTextStyle()),
Divider(
color: Colors.grey,
),
),
getPaymentMethods(),
SizedBox(height: 12),
Text(
TranslationBase.of(context).appoPaymentConfirm,
style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56),
),
SizedBox(height: 12),
Container(
alignment: Alignment.center,
child: Row(
// direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).cancel_nocaps,
() {
Navigator.pop(context, null);
},
color: CustomColors.accentColor,
textColor: Colors.white,
Table(
children: [
TableRow(decoration: BoxDecoration(), children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())),
]),
],
),
Divider(color: Colors.grey),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
),
),
getPaymentMethods(),
SizedBox(height: 12),
Text(
TranslationBase.of(context).appoPaymentConfirm,
style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56),
),
SizedBox(height: 12),
Container(
alignment: Alignment.center,
child: Row(
// direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).cancel_nocaps,
() {
Navigator.pop(context, null);
},
color: CustomColors.accentColor,
textColor: Colors.white,
),
),
),
mWidth(10.0),
Expanded(
child: DefaultButton(
TranslationBase.of(context).confirm,
() {
Navigator.pop(context, widget.patientShareResponse);
},
color: CustomColors.green,
textColor: Colors.white,
mWidth(10.0),
Expanded(
child: DefaultButton(
TranslationBase.of(context).confirm,
() {
Navigator.pop(context, widget.patientShareResponse);
},
color: CustomColors.green,
textColor: Colors.white,
),
),
),
],
],
),
),
),
]),
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(),
],
),
),
);
}

@ -218,17 +218,17 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
inputWidget(TranslationBase.of(context).subject, "", titleController),
SizedBox(height: 12),
inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () async {
// if (Platform.isAndroid) {
// if (await PermissionService.isMicrophonePermissionEnabled()) {
// openSpeechReco();
// } else {
// Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
// openSpeechReco();
// });
// }
// } else {
// openSpeechReco();
// }
if (Platform.isAndroid) {
if (await PermissionService.isMicrophonePermissionEnabled()) {
openSpeechReco();
} else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
openSpeechReco();
});
}
} else {
openSpeechReco();
}
}),
SizedBox(height: 12),
InkWell(
@ -340,7 +340,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
});
}
},
color: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) ? Color(0xffEAEAEA) : Color(0xffD02127),
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),
@ -405,8 +405,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
color: Color(0xff575757),
letterSpacing: -0.56,
),
// suffixIconConstraints: BoxConstraints(minWidth: 50),
// suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
@ -517,25 +517,25 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
return;
}
// openSpeechReco() async {
// new RoboSearch(context: context).showAlertDialog(context);
// _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// if (available) {
// speech.listen(
// onResult: resultListener,
// listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
// }
//
openSpeechReco() async {
new RoboSearch(context: context).showAlertDialog(context);
_currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// if (available) {
// speech.listen(
// onResult: resultListener,
// listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
}
// void errorListener(SpeechRecognitionError error) {
// event.setValue({"searchText": 'null'});
// //SpeechToText.closeAlertDialog(context);
// print(error);
// SpeechToText.closeAlertDialog(context);
// print(error);
// }
void statusListener(String status) {
@ -561,9 +561,9 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
}
}
// Future<void> initSpeechState() async {
// bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
// print(hasSpeech);
// if (!mounted) return;
// }
Future<void> initSpeechState() async {
// bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
// print(hasSpeech);
// if (!mounted) return;
}
}

@ -132,24 +132,33 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
),
Padding(
padding: const EdgeInsets.all(18.0),
child: 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,
child:
Text(TranslationBase.of(context).habibCallCenter,
style: TextStyle(
fontSize: 16,
letterSpacing: -0.48,
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,
// ),
),
SizedBox(
height: 25.0,

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

@ -59,9 +59,9 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
isScrollable: false,
indicatorWeight: 3.0,
indicatorColor: CustomColors.accentColor,
labelColor: Theme.of(context).primaryColor,
labelColor: CustomColors.textDarkColor,
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
unselectedLabelColor: CustomColors.textDarkColor,
tabs: <Widget>[
Container(
child: Center(
@ -167,7 +167,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate> with SingleTickerProv
Container(
margin: EdgeInsets.only(top: 6.5, left: 2.0),
child: Text(
model.insuranceUpdate[index].statusDescription,
model.insuranceUpdate[index].statusDescription ?? "",
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,

@ -417,7 +417,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1,
child: InkWell(
onTap: () {
if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick();
if (projectViewModel.havePrivilege(100))
widget.onPharmacyClick();
},
child: Stack(children: [
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/pharmacyModule/pharmacy_module_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/material.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 'landing_page_pharmcy.dart';
@ -48,7 +51,9 @@ class _HomePageState2 extends State<HomePage2> {
widget.onLoginClick();
},
onPharmacyClick: () {
getPharmacyToken(model);
// getPharmacyToken(model);
Uri uri = Uri.parse(PHARMACY_REDIRECT_URL);
launchUrl(uri, mode: LaunchMode.externalApplication);
},
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/service/AuthenticatedUserObject.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/models/Appointments/toDoCountProviderModel.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/landing/home_page_2.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/services/authentication/auth_provider.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/others/app_scaffold_widget.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -71,6 +74,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
int currentTab = 0;
PageController pageController;
@ -294,7 +298,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
familyFileProvider.getSharedRecordByStatus();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
familyFileProvider.getSharedRecordByStatus(languageID);
}
});
@ -636,21 +641,37 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void checkUserStatus(token) async {
await PushNotificationHandler.getInstance().isAndroidPermissionGranted();
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
// authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
}
}),
authService.getDashboard().then((value) async {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
}
});
if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).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);
} else {

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -209,7 +210,9 @@ class ServicesView extends StatelessWidget {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} 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');
} else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew()));

@ -102,25 +102,25 @@ class _clinic_listState extends State<ClinicList> {
});
}
});
getLanguageID();
super.initState();
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
getLanguageID();
return Container(
child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList(),
);
}
void startLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2;
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
@ -183,9 +183,10 @@ class _clinic_listState extends State<ClinicList> {
}
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
int languageID = projectViewModel.isArabic ? 1 : 2;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {
@ -504,7 +505,8 @@ class _clinic_listState extends State<ClinicList> {
}
getLanguageID() async {
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
languageID = projectViewModel.isArabic ? "ar" : "en";
// languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
}
getLiveCareClinicsList() {
@ -757,11 +759,12 @@ class _clinic_listState extends State<ClinicList> {
}
void startScheduleLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2;
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
service.getLiveCareScheduledDoctorList(context, selectedClinicID, languageID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

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

@ -256,7 +256,7 @@ class _Login extends State<Login> {
sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
GifLoaderDialogUtils.showMyDialog(context);
authService.checkPatientAuthentication(request).then((value) {
if (value['UserAccountIsActivated']) {
// if (value['UserAccountIsActivated']) {
if (value['isSMSSent']) {
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']);
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request);
@ -267,17 +267,17 @@ class _Login extends State<Login> {
this.checkActivationCode();
}
}
} else {
ConfirmDialog activationDialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).accountDeactivatedMsg,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () => {ConfirmDialog.closeAlertDialog(context), this.activatePatientFile()},
cancelFunction: () => {});
GifLoaderDialogUtils.hideDialog(context);
activationDialog.showAlertDialog(context);
}
// } else {
// ConfirmDialog activationDialog = new ConfirmDialog(
// context: context,
// confirmMessage: TranslationBase.of(context).accountDeactivatedMsg,
// okText: TranslationBase.of(context).yes,
// cancelText: TranslationBase.of(context).no,
// okFunction: () => {ConfirmDialog.closeAlertDialog(context), this.activatePatientFile()},
// cancelFunction: () => {});
// GifLoaderDialogUtils.hideDialog(context);
// activationDialog.showAlertDialog(context);
// }
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
@ -345,34 +345,45 @@ class _Login extends State<Login> {
authenticatedUserObject.user = result.list;
projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
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);
});
GifLoaderDialogUtils.hideDialog(context);
getToDoCount();
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
// appointmentRateViewModel
// .getIsLastAppointmentRatedList()
// .then((value) => {
// 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/countries_list.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/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -704,31 +705,42 @@ class _RegisterInfo extends State<RegisterInfo> {
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
}
})
.catchError((err) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) {
getToDoCount();
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
if (appointmentRateViewModel.isHaveAppointmentNotRate) {
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(isFromRegistration: true),
),
(r) => false);
} 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(
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);
}
}).catchError((err) {
print(err);
//GifLoaderDialogUtils.hideDialog(context);
});

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -22,7 +23,7 @@ class AllergiesPage extends StatelessWidget {
baseViewModel: model,
description: TranslationBase.of(context).infoAllergies,
imagesInfo: imagesInfo,
body: ListView.builder(
body: model.allergies.isNotEmpty ? ListView.builder(
itemCount: model.allergies.length,
itemBuilder: (context, index) => Container(
margin: EdgeInsets.all(15),
@ -54,7 +55,7 @@ class AllergiesPage extends StatelessWidget {
],
),
),
),
) : getNoDataWidget(context),
),
);
}

@ -60,6 +60,7 @@ class AskDoctorPage extends StatelessWidget {
itemBuilder: (context, _index) {
DoctorList _doctor = _doctorList[_index];
DoctorList doctorList = DoctorList(
date: _doctor.date,
projectID: _doctor.projectID,
setupID: _doctor.setupID,
clinicID: _doctor.clinicID,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -27,7 +28,7 @@ class DoctorResponse extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 65,
height: 16,
),
AppExpandableNotifier(
headerWidget: Padding(
@ -61,14 +62,18 @@ class DoctorResponse extends StatelessWidget {
return InkWell(
onTap: () {
///go to page ViewDoctorResponsesPage
Navigator.push(
context,
FadePage(
page: ViewDoctorResponsesPage(
doctorResponse: doctor,
if (doctor.transactions != null && doctor.transactions.isNotEmpty) {
Navigator.push(
context,
FadePage(
page: ViewDoctorResponsesPage(
doctorResponse: doctor,
),
),
),
);
);
} else {
Utils.showErrorToast("There are no doctor responses for this request.");
}
},
child: Container(
height: 100,

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

@ -67,7 +67,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
projectViewModel = Provider.of(context);
return BaseView<MyBalanceViewModel>(
onModelReady: (model) {
model.getHospitals(isAdvancePayment: true);
model.getHospitals(projectViewModel.isArabic ? 1 : 2, isAdvancePayment: true);
model.getFamilyFiles();
},
builder: (_, model, w) => AppScaffold(

@ -468,7 +468,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType,
widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context)
.then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);
addAdvancedNumberRequest(
Utils.isVidaPlusProject(projectViewModel, widget.advanceModel.hospitalsModel.iD)
? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
: res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
0,
appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);

@ -106,7 +106,7 @@ class MyBalancePage extends StatelessWidget {
),
),
Text(
TranslationBase.of(context).sar,
projectViewModel.user.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
@ -157,7 +157,7 @@ class MyBalancePage extends StatelessWidget {
),
),
Text(
amount.toStringAsFixed(2) + " " + TranslationBase.of(context).sar,
amount.toStringAsFixed(2) + " " + (projectViewModel.user.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar),
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,

@ -1,13 +1,22 @@
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/laboratory_result_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
class LaboratoryResultPage extends StatefulWidget {
@ -25,11 +34,14 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLaboratoryResult(
invoiceNo: widget.patientLabOrders.invoiceNo,
clinicID: widget.patientLabOrders.clinicID,
projectID: widget.patientLabOrders.projectID,
orderNo: widget.patientLabOrders.orderNo,
setupID: widget.patientLabOrders.setupID),
invoiceNo: widget.patientLabOrders.invoiceNo,
invoiceType: widget.patientLabOrders.invoiceType,
clinicID: widget.patientLabOrders.clinicID,
projectID: widget.patientLabOrders.projectID,
orderNo: widget.patientLabOrders.orderNo,
setupID: widget.patientLabOrders.setupID,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)),
),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: widget.patientLabOrders.doctorName,
@ -37,27 +49,73 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
body: ListView.builder(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(bottom: 12),
itemBuilder: (context, index) => LaboratoryResultWidget(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user);
GifLoaderDialogUtils.hideDialog(context);
},
billNo: widget.patientLabOrders.invoiceNo,
// details: model.patientLabSpecialResult[index].resultDataHTML,
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders,
body: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
physics: BouncingScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(bottom: 12),
itemBuilder: (context, index) => LaboratoryResultWidget(
onTap: () async {
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)));
GifLoaderDialogUtils.hideDialog(context);
},
billNo: widget.patientLabOrders.invoiceNo,
// details: model.patientLabSpecialResult[index].resultDataHTML,
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders,
),
itemCount: 1,
),
SizedBox(
height: 120.0,
)
],
),
itemCount: 1,
),
// bottomSheet: Container(
// color: Colors.white,
// height: MediaQuery.of(context).size.height * 0.081,
// width: double.infinity,
// padding: EdgeInsets.all(12.0),
// child: Column(
// children: <Widget>[
// Container(
// width: MediaQuery.of(context).size.width * 0.9,
// child: DefaultButton(
// TranslationBase.of(context).downloadReport,
// () async {
// 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);
// GifLoaderDialogUtils.hideDialog(context);
// try {
// String path = await _createFileFromString(model.labReportPDF, "pdf");
// OpenFilex.open(path);
// } catch (ex) {
// AppToast.showErrorToast(message: "Cannot open file.");
// }
// },
// textColor: Colors.white,
// ),
// ),
// ],
// ),
// ),
),
);
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
String getSpecialResults(LabsViewModel model) {
String labResults = "";
model.patientLabSpecialResult.forEach((element) {

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -49,7 +50,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
baseViewModel: model,
body: ListView.separated(
body: model.sickLeaveList.isNotEmpty ? ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21),
@ -69,7 +70,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
showConfirmMessage(model, index);
},
),
),
) : getNoDataWidget(context),
),
);
}

@ -1,12 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -19,14 +19,20 @@ import 'package:url_launcher/url_launcher.dart';
class RadiologyDetailsPage extends StatelessWidget {
final FinalRadiology finalRadiology;
bool isRadiologyVidaPlus;
RadiologyDetailsPage({Key key, this.finalRadiology});
RadiologyDetailsPage({Key key, this.finalRadiology, this.isRadiologyVidaPlus});
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getRadImageURL(projectId: finalRadiology.projectID, lineItem: finalRadiology.invoiceLineItemNo, invoiceNo: finalRadiology.invoiceNo),
onModelReady: (model) => model.getRadImageURL(
invoiceType: finalRadiology.invoiceType,
projectId: finalRadiology.projectID,
lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP : finalRadiology.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID)),
builder: (_, model, widget) => AppScaffold(
appBarTitle: TranslationBase.of(context).report,
isShowAppBar: true,
@ -45,7 +51,7 @@ class RadiologyDetailsPage extends StatelessWidget {
finalRadiology.doctorID,
finalRadiology.doctorImageURL,
finalRadiology.speciality,
finalRadiology.invoiceNo.toString(),
Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP.toString() : finalRadiology.invoiceNo.toString(),
finalRadiology.projectName,
finalRadiology.orderDate,
null,

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -78,12 +79,14 @@ class RadiologyHomePage extends StatelessWidget {
FadePage(
page: RadiologyDetailsPage(
finalRadiology: radiology,
isRadiologyVidaPlus: Utils.isVidaPlusProject(projectViewModel, radiology.projectID),
),
),
),
isInOutPatient: radiology.isInOutPatient,
name: TranslationBase.of(context).dr + " " + radiology.doctorName,
billNo: radiology.invoiceNo.toString(),
billNo: Utils.isVidaPlusProject(projectViewModel, radiology.projectID) ? radiology.invoiceNo_VP.toString() : radiology.invoiceNo.toString(),
// billNo: radiology.invoiceNo_VP.toString(),
profileUrl: radiology.doctorImageURL,
subName: _isSortByClinic ? radiology.projectName : radiology.clinicDescription,
isLiveCareAppointment: radiology.isLiveCareAppointment,

@ -70,74 +70,73 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
body: Container(
child: Column(
children: [
TabBar(
controller: _tabController_new,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
onTap: (int value) {
print(value);
setState(() {});
},
tabs: [
Text(
TranslationBase.of(context).outpatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).inPatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
],
),
// TabBar(
// controller: _tabController_new,
// indicatorWeight: 3.0,
// indicatorSize: TabBarIndicatorSize.tab,
// labelColor: Color(0xff2B353E),
// unselectedLabelColor: Color(0xff575757),
// labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
// labelStyle: TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.48,
// ),
// unselectedLabelStyle: TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.48,
// ),
// onTap: (int value) {
// print(value);
// setState(() {});
// },
// tabs: [
// Text(
// TranslationBase.of(context).outpatient,
// style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// ),
// Text(
// TranslationBase.of(context).inPatient,
// style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// ),
// ],
// ),
if (model.user != null)
Expanded(
child:
TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController_new,
children: <Widget>[
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController_new,
children: <Widget>[
Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(21),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
myRadioButton(TranslationBase.of(context).requested, 0),
myRadioButton(TranslationBase.of(context).ready, 1),
myRadioButton(TranslationBase.of(context).cancelled, 2),
],
),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(21),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
myRadioButton(TranslationBase.of(context).requested, 0),
myRadioButton(TranslationBase.of(context).ready, 1),
myRadioButton(TranslationBase.of(context).cancelled, 2),
],
),
),
Expanded(
child: IndexedStack(
index: _currentPage,
children: [
ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
],
),
)
],
),
Expanded(
child: IndexedStack(
index: _currentPage,
children: [
ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
],
),
)
],
),
),
// InPatient Medical Reports
Container(
),
// InPatient Medical Reports
Container(
child: model.admissionsMedicalReportList.isNotEmpty
? Column(
children: [
@ -249,20 +248,21 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
if (projectViewModel.havePrivilege(21)
// && _tabController_new.index == 0
)
Padding(
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
() => Navigator.push(
context,
FadePage(
page: MedicalReports(),
),
).then((value) {
model.getReports();
}),
),
)
if (_tabController_new.index == 0)
Padding(
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
() => Navigator.push(
context,
FadePage(
page: MedicalReports(),
),
).then((value) {
model.getReports();
}),
),
)
],
),
),

@ -117,23 +117,23 @@ class ReportListWidget extends StatelessWidget {
if (reportList[index].status == 2)
Row(
children: [
InkWell(
onTap: () {
getMedicalReportPDF(report);
},
child: Padding(
padding: const EdgeInsets.only(right: 11.0, left: 11.0),
child: Text(TranslationBase.of(context).viewReport,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 18 / 12,
decoration: TextDecoration.underline)),
),
),
// InkWell(
// onTap: () {
// getMedicalReportPDF(report);
// },
// child: Padding(
// padding: const EdgeInsets.only(right: 11.0, left: 11.0),
// child: Text(TranslationBase.of(context).viewReport,
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// fontStyle: FontStyle.italic,
// color: CustomColors.accentColor,
// letterSpacing: -0.48,
// height: 18 / 12,
// decoration: TextDecoration.underline)),
// ),
// ),
IconButton(
icon: Icon(Icons.email),
color: Color(0xff28323A),

@ -1,4 +1,4 @@
import 'package:badges/badges.dart';
import 'package:badges/badges.dart' as badge_import;
import 'package:diplomaticquarterapp/Constants.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
@ -95,11 +95,11 @@ class PaymentService extends StatelessWidget {
? Positioned(
left: 8,
top: 4,
child: Badge(
child: badge_import.Badge(
toAnimate: false,
elevation: 0,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
position: badge_import.BadgePosition.topEnd(),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
@ -111,11 +111,11 @@ class PaymentService extends StatelessWidget {
: Positioned(
right: 8,
top: 4,
child: Badge(
child: badge_import.Badge(
toAnimate: false,
elevation: 0,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
position: badge_import.BadgePosition.topEnd(),
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(

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

@ -1,7 +1,9 @@
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/pages/BookAppointment/widgets/DoctorView.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/rateAppointment/rate_appointment_clinic.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/utils_new.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/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RateAppointmentDoctor extends StatefulWidget {
bool isFromRegistration;
RateAppointmentDoctor({Key key, this.isFromRegistration = false}) : super(key: key);
@override
_RateAppointmentDoctorState createState() => _RateAppointmentDoctorState();
}
@ -23,9 +32,11 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
final formKey = GlobalKey<FormState>();
String note = "";
int rating = 0;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
@ -158,12 +169,46 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: DefaultButton(
TranslationBase.of(context).later,
() {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
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(
context,
FadePage(
page: LandingPage(),
),
);
} else {
Navigator.pop(
context,
// FadePage(
// page: LandingPage(),
// ),
);
}
}
},
color: CustomColors.accentColor,
textColor: Colors.white,

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.d
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_orders_proc_list.dart';
import 'package:diplomaticquarterapp/models/apple_pay_request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -33,7 +34,7 @@ class DoctorsListService extends BaseService {
String tokenID;
List<LaserBodyPart> selectedBodyPartList = [];
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -46,17 +47,16 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
// 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',
//
// "IPAdress": "10.20.10.20",
// "VersionID": req.VersionID,
// "Channel": req.Channel,
// "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
// "DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"ClinicID": clinicID,
"ProjectID": projectID,
@ -74,6 +74,7 @@ class DoctorsListService extends BaseService {
"Longitude": long != null ? long.toString() : 0,
"isDentalAllowedBackend": clinicID == 17 ? true : isContinueDentalPlan,
"IsGetNearAppointment": isNearest,
"LanguageID": languageID,
if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()),
"License": true
};
@ -88,7 +89,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getDoctorsListByName(String docName, BuildContext context) async {
Future<Map> getDoctorsListByName(String docName, int languageID, BuildContext context) async {
Map<String, dynamic> request;
double lat;
@ -104,10 +105,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
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,
@ -128,6 +127,7 @@ class DoctorsListService extends BaseService {
"IsGetNearAppointment": false,
"Latitude": lat == null ? 0.0 : lat,
"Longitude": long == null ? 0.0 : long,
"LanguageID": languageID,
"License": true
};
@ -141,12 +141,11 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getDoctorsProfile(int docID, int clinicID, int projectID, context) async {
Future<Map> getDoctorsProfile(int docID, int clinicID, int projectID, int languageID, context) async {
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,
@ -161,7 +160,8 @@ class DoctorsListService extends BaseService {
"License": true,
"IsRegistered": true,
"ProjectID": projectID,
"isDentalAllowedBackend": false
"isDentalAllowedBackend": false,
"LanguageID": languageID,
};
dynamic localRes;
@ -176,10 +176,9 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsRating(int docID, context) async {
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,
@ -227,10 +226,9 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsRatingDetails(int docID, context) async {
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,
@ -258,7 +256,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"DoctorID": docID,
@ -270,7 +268,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
@ -301,7 +298,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID, int projectID, int serviceID, BuildContext context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"DoctorID": docID,
@ -314,7 +311,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authUser.outSA,
@ -342,7 +338,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForLiveCare": false,
@ -366,7 +361,6 @@ class DoctorsListService extends BaseService {
"Age": authUser.age != null ? authUser.age : 0,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -406,7 +400,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForLiveCare": true,
@ -429,7 +422,6 @@ class DoctorsListService extends BaseService {
"GenderID": authUser.gender,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -459,7 +451,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -469,7 +460,6 @@ class DoctorsListService extends BaseService {
"IsActiveAppointment": true,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -484,7 +474,7 @@ class DoctorsListService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_PATIENT_SHARE, onSuccess: (response, statusCode) async {
localRes = response['OnlineCheckInAppointments'][0];
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
@ -518,7 +508,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -529,7 +518,6 @@ class DoctorsListService extends BaseService {
"IsForLiveCare": true,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -559,17 +547,9 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": 15,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
request = {"ProjectID": 15, "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, "PatientType": authUser.patientType};
dynamic localRes;
@ -589,11 +569,9 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": projectID,
"SetupID": setupID,
"isDentalAllowedBackend": false,
@ -613,6 +591,19 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistoryWithAppoNo(int appoNo, int languageID) async {
Map<String, dynamic> request;
request = {"IsActiveAppointment": true, "AppointmentNo": appoNo, "IsComingFromCOC": false, "LanguageID": languageID};
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 {
Map<String, dynamic> request;
@ -621,14 +612,12 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsActiveAppointment": isActiveAppointment,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -652,14 +641,13 @@ class DoctorsListService extends BaseService {
Future<Map> getPatientAppointmentCurfewHistory(bool isActiveAppointment) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsActiveAppointment": isActiveAppointment,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -688,7 +676,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -699,7 +686,6 @@ class DoctorsListService extends BaseService {
"ConfirmationBy": 102,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -735,7 +721,6 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -753,7 +738,6 @@ class DoctorsListService extends BaseService {
"DeviceType": req.DeviceType,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -784,7 +768,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -801,7 +784,6 @@ class DoctorsListService extends BaseService {
"StrAppointmentDate": DateUtil.getDateFormatted(appo.appointmentDate),
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -831,7 +813,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -841,7 +822,6 @@ class DoctorsListService extends BaseService {
"IsFollowup": patientShareResponse.isFollowup,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -871,7 +851,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -884,7 +863,6 @@ class DoctorsListService extends BaseService {
"To": to,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -912,14 +890,13 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ClientRequestID": transactionID,
"IsPharmacy": isPharma,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -957,15 +934,15 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
"AdvanceNumber_VP": advanceNumber,
"PaymentReferenceNumber": paymentReference,
"AppointmentID": appointmentID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -991,7 +968,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
@ -1006,7 +983,6 @@ class DoctorsListService extends BaseService {
"DeviceType": Platform.isIOS ? "iOS" : "Android",
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1046,12 +1022,18 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
List<String> procedureOrderIDs = [];
selectedProcListAPI.forEach((element) {
procedureOrderIDs.add(element["ProcedureID"]);
});
request = {
"RequestAncillaryOrderInvoice": [
{"MemberID": 102, "ProjectID": projectID, "AppointmentNo": appointmentID, "OrderNo": orderNo, "AncillaryOrderInvoiceProcList": selectedProcListAPI}
]
],
"ProcedureOrderIds": procedureOrderIDs
};
dynamic localRes;
await baseAppClient.post(GENERATE_ANCILLARY_ORDERS_INVOICE, onSuccess: (response, statusCode) async {
@ -1062,13 +1044,13 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Future<Map> isAllowedToAskDoctor(int docID, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForAskYourDoctor": true,
@ -1076,9 +1058,9 @@ class DoctorsListService extends BaseService {
"Top": 25,
"beforeDays": 15,
"exludType": 4,
"LanguageID": languageID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1099,18 +1081,17 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getCallRequestType(BuildContext context) async {
Future<Map> getCallRequestType(int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1119,6 +1100,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -1131,19 +1113,20 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> sendAskDocCallRequest(AppoitmentAllHistoryResultList appo, String requestType, BuildContext context) async {
Future<Map> sendAskDocCallRequest(AppoitmentAllHistoryResultList appo, String requestType, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ProjectID": appo.projectID,
"SetupID": appo.setupID,
"DoctorID": appo.doctorID,
"ClinicID": appo.clinicID,
"RequestType": requestType,
"RequestTypeID": requestType,
"PatientMobileNumber": authUser.mobileNumber,
@ -1158,7 +1141,6 @@ class DoctorsListService extends BaseService {
"EditedOn": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[0],
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1167,6 +1149,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -1185,13 +1168,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1218,7 +1200,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
@ -1226,7 +1208,6 @@ class DoctorsListService extends BaseService {
"ClinicID": clinicID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1253,7 +1234,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appo.appointmentNo,
@ -1263,7 +1244,6 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"SetupID": appo.setupID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1290,7 +1270,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentDate": appoDate,
@ -1303,7 +1283,6 @@ class DoctorsListService extends BaseService {
"SetupID": setupId,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1330,7 +1309,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ProjectID": projectID,
@ -1348,7 +1327,6 @@ class DoctorsListService extends BaseService {
},
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1368,13 +1346,14 @@ class DoctorsListService extends BaseService {
}
Future<Map> HIS_createAdvancePayment(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, dynamic patientType,
String patientName, dynamic patientID, BuildContext context) async {
String patientName, dynamic patientID, BuildContext context,
{bool isAncillaryOrder = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -1393,13 +1372,15 @@ class DoctorsListService extends BaseService {
"PaymentMethod": paymentMethodName,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"PatientTypeID": patientType,
"IsAncillaryOrder": isAncillaryOrder,
// "AncillaryProcedureList": ancillaryOrdersProcedureList,
"PatientType": patientType
};
dynamic localRes;
@ -1417,13 +1398,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1458,13 +1438,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1502,14 +1481,13 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"MedCategoryID": medCategoryId,
"MedGetStsID": medCategoryStsId,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1529,14 +1507,10 @@ class DoctorsListService extends BaseService {
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;
request = {
"AppointmentNo": appointmentNo,
"NFC_Code": nfcCode,
"ProjectID": projectId,
};
request = {"AppointmentNo": appointmentNo, "NFC_Code": nfcCode, "ProjectID": projectId, "CheckinBy": checkInBy};
dynamic localRes;
await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, onSuccess: (response, statusCode) async {
localRes = response;
@ -1801,7 +1775,6 @@ class DoctorsListService extends BaseService {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
@ -1813,7 +1786,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,

@ -155,6 +155,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes;
Map<String, dynamic> request = {};
request['IMEI'] = imei;
request['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
await new BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
}, onFailure: (String error, int statusCode) {
@ -247,7 +248,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes);
}
Future<dynamic> checkActivationCode(request, [value]) async {
Future<dynamic> checkActivationCode(request, [value]) async {
var neRequest = CheckActivationCodeReq.fromJson(request);
neRequest.activationCode = value ?? "0000";
@ -376,16 +377,14 @@ class AuthProvider with ChangeNotifier {
requestN.patientOutSA = requestN.patientobject.patientOutSA;
final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
if(nhic !=null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(
dateFormat.parse(nhic['DateOfBirth']));
if (nhic != null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject.eHealthIDField;
}
requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966';
await sharedPref.remove(USER_PROFILE);
dynamic localRes;

@ -18,19 +18,7 @@ class ClinicListService extends BaseService {
double long;
Future<Map> getClinicsList(context) async {
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
};
Map<String, dynamic> request = {};
dynamic localRes;
@ -44,22 +32,9 @@ class ClinicListService extends BaseService {
}
Future<Map> getActiveAppointmentNo(context) async {
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',
// "PatientOutSA": user.outSA,
"IsActiveAppointment": true,
// "DeviceTypeID": req.DeviceTypeID,
// "PatientType": user.patientType,
// "PatientTypeID": user.patientType,
// "SessionID": null
};
Map<String, dynamic> request = {};
request = {"IsActiveAppointment": true, "LanguageID": 1};
dynamic localRes;
@ -71,20 +46,10 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getProjectsList(context) async {
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
};
Future<Map> getProjectsList(int languageID, context) async {
Map<String, dynamic> request = {};
request = {"LanguageID": languageID};
dynamic localRes;
@ -96,7 +61,7 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getChiefComplaintsList(int clinicID, int projectID, BuildContext context, {doctorId}) async {
Future<Map> getChiefComplaintsList(int clinicID, int projectID, int languageID, BuildContext context, {doctorId}) async {
//Utils.showProgressDialog(context);
Map<String, dynamic> request;
@ -113,9 +78,9 @@ class ClinicListService extends BaseService {
"SelectedDate": "",
"SelectedTime": "",
"License": true,
"VersionID": 5.6,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
// "VersionID": 5.6,
// "Channel": 3,
"LanguageID": languageID,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"SessionID": null,
@ -137,7 +102,7 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getChiefComplaintDoctorList(int chiefComplaintID, int projectID, BuildContext context, {doctorId}) async {
Future<Map> getChiefComplaintDoctorList(int chiefComplaintID, int projectID, int languageID, BuildContext context, {doctorId}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -155,11 +120,11 @@ class ClinicListService extends BaseService {
request = {
"ChiefComplaintID": chiefComplaintID,
"ProjectID": projectID,
"VersionID": 5.6,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
// "VersionID": 5.6,
// "Channel": 3,
"LanguageID": languageID,
// "IPAdress": req.IPAdress,
// "generalid": req.generalid,
"SessionID": null,
"isDentalAllowedBackend": true,
"Latitude": lat != null ? lat.toString() : "0.0",
@ -177,14 +142,15 @@ class ClinicListService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> getCountries() async {
Map<String, dynamic> request ={};
Map<String, dynamic> request = {};
dynamic localRes;
await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save