Conflicts:
	lib/config/config.dart
merge-update-with-lab-changes
Elham Rababah 5 years ago
commit 3ef22be7da

Binary file not shown.

@ -0,0 +1,9 @@
{\rtf1\ansi\ansicpg1252\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 keyPassword=HmGsa123\
storePassword=HmGsa123}

@ -3,5 +3,6 @@
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
</manifest> </manifest>

@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE" />
</manifest> </manifest>

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

1
ios/.gitignore vendored

@ -32,3 +32,4 @@ Runner/GeneratedPluginRegistrant.*
!default.perspectivev3 !default.perspectivev3
/Runner.xcworkspace/contents.xcworkspacedata /Runner.xcworkspace/contents.xcworkspacedata
/Runner.xcodeproj/project.pbxproj /Runner.xcodeproj/project.pbxproj
/Flutter/.last_build_id

@ -0,0 +1 @@
da98d9f0c1f407e541c636e84847ac81

@ -0,0 +1,4 @@
storePassword=HmGsa123
keyPassword=HmGsa123
keyAlias=DQKey
storeFile=DQKey.jks

@ -6,8 +6,9 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Doctor ///Doctor
@ -32,7 +33,7 @@ const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults'; 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = const GET_Patient_LAB_RESULT =
'/Services/Patients.svc/REST/GetPatientLabResults'; 'Services/Patients.svc/REST/GetPatientLabResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -57,11 +58,16 @@ const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; const GET_AMBULANCE_REQUEST =
const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; const GET_PATIENT_ALL_PRES_ORDERS =
const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER =
'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -119,6 +125,10 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list //URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL =
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list //URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -141,7 +151,8 @@ const GET_PATIENT_SHARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history //URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
//URL to get patient appointment curfew history //URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
@ -172,6 +183,9 @@ const CHECK_PAYMENT_STATUS =
//URL create advance payment //URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT =
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST = const ADD_ADVANCE_NUMBER_REQUEST =
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
@ -232,6 +246,7 @@ const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1; const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
@ -240,6 +255,10 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails"; "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED = const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS =
"Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS =
@ -264,13 +283,14 @@ const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST =
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; const GET_COVID_DRIVETHRU_PAYMENT_INFO =
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_FREE_SLOTS =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
///Smartwatch Integration Services ///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD = const GET_PATIENT_LAST_RECORD =
@ -328,14 +348,29 @@ const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// pharmacy
const GET_PHARMACY_BANNER = "epharmacy/api/promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "epharmacy/api/topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "epharmacy/api/bestsellerproducts";
const GET_PHARMACY_PRODUCTs_BY_IDS = "epharmacy/api/productsbyids/";
const GET_CUSTOMERS_ADDRESSES = "epharmacy/api/Customers/";
// Home Health Care // Home Health Care
const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; const HHC_GET_ALL_SERVICES =
const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER ="Services/Patients.svc/REST/PatientER_UpdatePresOrder"; const HHC_GET_ALL_CMC_SERVICES =
const GET_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const GET_CMC_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const PATIENT_ER_UPDATE_PRES_ORDER =
const GET_CHECK_UP_ITEMS ="Services/Patients.svc/REST/GetCheckUpItems"; "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';

@ -1,4 +1,4 @@
const Map<String, Map<String, String>> localizedValues = { const Map localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'}, 'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'}, 'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
@ -109,15 +109,19 @@ const Map<String, Map<String, String>> localizedValues = {
'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'}, 'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'}, 'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'دخولتسجيل'}, 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'welcome': {'en': 'Welcome', 'ar': 'أهلا بك'}, 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
'welcome_text': { "welcome": {
'en': 'Dr. Sulaiman Al Habib Mobile Application ', "en": "Welcome",
'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك' "ar": "مرحبا"
},
"welcome_text": {
"en": "Dr. Sulaiman Al Habib Mobile Application",
"ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"
}, },
'welcome_text2': { 'welcome_text2': {
'en': 'Have you visited AlHabib Medical Group before? ', 'en': 'Have you visited AlHabib Medical Group before? ',
'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك' 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'
}, },
'yes': {'en': 'Yes', 'ar': 'نعم'}, 'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'}, 'no': {'en': 'No', 'ar': 'لا'},
@ -126,12 +130,23 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي." "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."
}, },
"registernow": {"en": "Register Now", "ar": "تسجيل الان"}, "registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": {"en": "National ID", "ar": "رقم الهوية"}, "nationalID": { "en": "Enter the Identification Number",
"ar": "أدخل رقم الهوية الوطنية او الاقامة"},
"national-id": {
"en": "National ID",
"ar": "رقم الهوية"
},
"fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"}, "forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
"forgotFileNoTitle": {
"en": "Forgot medical file Number",
"ar": "نسيت رقم الملف"
},
"enter-national-id": { "enter-national-id": {
"en": "Please enter mobile number and national ID / Iqama", "en": "Please enter mobile number and identification number",
"ar": "الرجاء إدخال رقم الجوال والهوية الوطنية / الاقامة" "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"
}, },
"profile-info": { "profile-info": {
"en": "Please enter profile information", "en": "Please enter profile information",
@ -283,6 +298,7 @@ const Map<String, Map<String, String>> localizedValues = {
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"}, "enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"}, "family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"}, "family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
"myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
"add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"}, "add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"},
"sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"}, "sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"},
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"}, "recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
@ -337,18 +353,18 @@ const Map<String, Map<String, String>> localizedValues = {
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
"myMedicalFileSubTitle": { "myMedicalFileSubTitle": {
"en": "All your medical records", "en": "All your medical records",
'ar': 'جميع سجلاتك البية' 'ar': 'جميع سجلاتك الطبية'
}, },
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": { "homeHealthCareService": {
"en": "Home Health Care Service", "en": "Home Health Care Service",
'ar': 'الرعاية الصحية المنزلية' 'ar': 'الرعاية الصحية المنزلية'
}, },
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'}, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": { "OnlinePaymentService": {
"en": "Online Payment Service", "en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني' 'ar': 'خدمة الدفع الإلكتدوني'
}, },
"OffersAndPackages": { "OffersAndPackages": {
"en": "Online transfer request", "en": "Online transfer request",
@ -409,7 +425,7 @@ const Map<String, Map<String, String>> localizedValues = {
"locationa": {"en": "location:", "ar": "الموقع"}, "locationa": {"en": "location:", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"}, "requestA": {"en": "Request:", "ar": "اسعاف"},
"MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": { "NoBookedAppointments": {
"en": "No Booked Appointments", "en": "No Booked Appointments",
"ar": "لا توجد مواعيد محجوزة" "ar": "لا توجد مواعيد محجوزة"
@ -658,7 +674,44 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "الفحص ليس تشخيص." "ar": "الفحص ليس تشخيص."
}, },
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
"loginToUseService": {
"en": "You need to login to use this service",
"ar": "هذة الخدمة تتطلب تسجيل الدخول"
},
// pharmacy module
"medicationRefill": {
"en": "MEDICATION REFILL",
"ar": "إعادة تعبئة الدواء"
},
"offersAndPromotions": {
"en": "OFFERS & SPECIAL PROMOTIONS",
"ar": "العروض والترقيات الخاصة"
},
"myPrescriptions": {
"en": "MY PRESCRIPTIONS",
"ar": "وصفاتي"
},
"searchAndScanMedication": {
"en": "SEARCH & SCAN FOR MEDICATION",
"ar": "البحث والمسح للأدوية"
},
"shopByBrands": {
"en": "Shop By Brands",
"ar": "تسوق حسب الماركات"
},
"recentlyViewed": {
"en": "Recently Viewed",
"ar": "شوهدت مؤخرا"
},
"bestSellers": {
"en": "Best Sellers",
"ar": "أفضل البائعين"
},
"deleteAllItems": {
"en": "Delete All Items",
"ar": "حذف كافة العناصر"
},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
"select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, "select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
@ -671,4 +724,412 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
}, },
"email": {"en": "Email", "ar": "البريد الالكتروني"},
"Book": {"en": "Book", "ar": "احجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
"BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
"marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"},
"general": {"en": "General", "ar": "عام"},
"profile": {"en": "Profile", "ar": "ملفي"},
"notifications": {"en": "Notifications", "ar": "إشعارات"},
"notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"},
"notificationDetailsa": {
"en": "Notification Details",
"ar": "تفاصيل الاشعار"
},
"info-my-doctor-points": {
"en": [
"View the doctor's profile and qualifications.",
"View the doctor's schedule.",
"View details of your appointments with the selected doctor.",
"Book appointment with the doctor. ",
],
"ar": [
"الاطلاع على معلومات الطبيب ومؤهلاته.",
"الاطلاع على جدول الطبيب.",
"الاطلاع على تفاصيل المواعيد التي تمت مع الطبيب.",
"حجز موعد مع الطبيب."
]
},
"info-my-doctor": {
"en":
"This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:",
"ar":
"خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:"
},
"info-prescriptions": {
"en":
"This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:",
"ar":
"خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:"
},
"info-my-prescription-points": {
"en": [
"View the duration days.",
"View the frequency timing.",
"View the doctor's remarks.",
"Add a reminder to remind you when to take medicine doses.",
"Search in AlHabib Pharmacies about the branches where medicines are available, pharmacies locations and contact numbers.",
"Ordering and delivery medications online.",
"View the prices of the drug. ",
],
"ar": [
"الاطلاع على طريقة تناول العلاج.",
"الاطلاع على مدة تناول العلاج.",
"الاطلاع على ملاحظات الطبيب.",
"اضافة منبه للتذكير بموعد تناول جرعات الادوية.",
"البحث في صيدليات الحبيب عن الفروع التي يتوفر فيها العلاج وكذلك مواقع الصيدليات وارقام الاتصال. ",
"امكانية شراء وتوصيل العلاج عن طريق الانترنت.",
"الاطلاع على اسعار الادوية المصروفة."
]
},
"info-insurance-cards": {
"en":
"This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
"ar":
"خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
"info-insurance-cards-points": {
"en": [
"Name of the insurance company.",
"Insurance category.",
"Insurance policy number.",
"The expiry date of insurance.",
"The status of the insurance card (active or inactive).",
"Details of the coverage, e.x the room category covered as well some cases covered by the insurance.",
],
"ar": [
"اسم شركة التامين.",
"فئة التامين.",
"رقم بوليصة التامين.",
"تاريخ انتهاء التامين.",
"حالة بطاقة التامين (فعالة او غير فعالة).",
"تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.",
]
},
"info-allergies": {
"en":
"This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.",
"ar":
"خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية."
},
"sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"},
"info-sick-leaves": {
"en":
"This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:",
"ar":
"الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:"
},
"info-sick-leave-points": {
"en": [
"Doctor Name",
"Sick leave date ",
"Sick leave days",
"Branch that patient take the vaccination form.",
"Sending a report of vaccinations to the email. ",
],
"ar": [
"اسم الطبيب",
"تاريخ الاجازة.",
"عدد ايام الاجازة.",
"الفرع الذي تم اصدار الاجازة منه.",
"ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."
]
},
"info-approvals": {
"en":
"This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:",
"ar":
"خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:"
},
"info-approval-points": {
"en": [
"View the total unused approvals.",
"Track the approvals status.",
],
"ar": [
"الاطلاع على اجمالي الموافقات الغير مستخدمة.",
"تتبع حالة الموافقة.",
]
},
"month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"},
"info-month-report": {
"en":
"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": "لغة الرسائل القصيرة و الاتصال الآلي"
},
"alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {
"en": "Alert By Email",
"ar": "استلام التنبيهات بالبريد الالكتروني"
},
"sms-alert": {
"en": "Alert By SMS",
"ar": "استلام التنبيهات بالرسائل القصيرة"
},
"contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"},
"emrg-name": {
"en": "Emergency Contact Name",
"ar": "اسم للتواصل في حالة الطوارئ"
},
"emrg-no": {
"en": "Emergency Contact Number",
"ar": "رقم للتواصل في حالة الطوارئ"
},
"modes": {"en": "Modes", "ar": "الاوضاع"},
"vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"},
"blind-modes": {
"en": "Modes for Partially Blind",
"ar": "تأثيرات لدعم ضعاف البصر"
},
"invert-theme": {"en": "Invert", "ar": "ألوان سلبية"},
"off-theme": {"en": "Off", "ar": "إيقاف"},
"dim-theme": {"en": "Dim", "ar": "ضوء خافت"},
"bw-theme": {"en": "Black and White", "ar": "أبيض و أسود"},
"permissions": {"en": "Permission", "ar": "الصلاحيات"},
"camera-permission": {"en": "Camera", "ar": "الكاميرا"},
"location-permission": {"en": "Location", "ar": "تحديد المواقع"},
"accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"},
"orderStatus": {"en": "Order Status", "ar": "حالة الطلب"},
"CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"},
"FindUs": {"en": "Find Us", "ar": "اين تجدنا"},
"Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
"LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
"Service": {"en": "Service", "ar": "خدمة"},
"HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"},
"DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"Period": {"en": "Period", "ar": "الفترة"},
"cm": {
"en": "CM",
"ar": "سم"
},
"kg": {
"en": "kg",
"ar": "كجم"
},
"mass": {
"en": "Mass",
"ar": "كتلة"
},
"temp-c": {
"en": "°C",
"ar": "°س"
},
"bpm": {
"en": "bpm",
"ar": "نبضة"
},
"respiration-signs": {
"en": "Respiration",
"ar": "تنفس"
},
"sys-dias": {
"en": "SBP/DBP",
"ar": "إنقباض/إنبساط"
},
"body": {
"en": "Body \n Mass",
"ar": "كتلة\nالجسم"
},
"feedback": {
"en": "Feedback",
"ar": "رأيك يهمنا"
},
"send": {
"en": "Send",
"ar": "أرسل"
},
"status": {
"en": "Status",
"ar": "الحالة"
},
"like-to-hear": {
"en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
},
"subject": {
"en": "Subject",
"ar": "الموضوع"
},
"message": {
"en": "Message",
"ar": "رسالة"
},
"empty-subject": {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"empty-message": {
"en": "Please enter message",
"ar": "يرجى ادخال الموضوع"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر المرفق"
},
"complain-appo": {
"en": "Complaint for appointment",
"ar": "شكوى على موعد"
},
"complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
},
"question": {
"en": "Question",
"ar": "سؤال"
},
"message-type": {
"en": "Message Type",
"ar": "نوع الرسالة"
},
"compliment": {
"en": "compliment",
"ar": "ثناء"
},
"suggestion": {
"en": "Suggestion",
"ar": "إقتراح"
},
"your-feedback": {
"en": "Your feedback was sent",
"ar": "إقتراح"
},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
},
"number": {
"en": "Number",
"ar": "الرقم"
},
"not-classified": {
"en": "Not classified",
"ar": "غير محدد"
},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"},
"show-more-btn": {
"en": "Flow Chart",
"ar": "النتائج التراكمية"
},
"value": {
"en": "Value",
"ar": "القيمة"
},
"range": {
"en": "Range",
"ar": "المدى"
},
"out-patient": {
"en": "Out Patient",
"ar": "عيادات خارجية"
},
"in-patient": {
"en": "In Patient",
"ar": "تنويم"
},
"report": {
"en": "Radiology Report",
"ar": "تقرير الاشعة"
},
"open-rad": {
"en": "Open Image",
"ar": "فتح صور الاشعة"
},
"send-copy": {
"en": "Email the Report",
"ar": "أرسل التقرير"
},
"vaccination": {
"en": "Vaccination",
"ar": "جدول التطعيمات"
},
"welcomeBack": {
"en": "Welcome back",
"ar": "مرحبا مرة أخرى"
},
"instructions": {
"en": "Please ensure that the email address is up-to-date and process to view the schedule",
"ar": "يرجى التأكد من صحة عنوان البريد الالكتروني و المتابعة لعرض الجدول "
},
"update-email": {
"en": "Update Email",
"ar": "تحديث البريد الالكتروني"
},
"updated-email": {
"en": "Updated email successfully",
"ar": "تم تحديث البريد الالكتروني"
},
"view-list-children": {
"en": "View List of Children",
"ar": "عرض قائمة الأطفال"
},
"add-child": {
"en": "Add New Child",
"ar": "اضافة طفل"
},
"child-name": {
"en": "Child Name",
"ar": "اسم الطفل"
},
"childDob": {
"en": "Birth Date",
"ar": "تاريخ الولادة"
},
"delete": {
"en": "Delete",
"ar": "حذف"
},
"deleted-child": {
"en": "The request was successful. The children have removed from the vaccination schedule subscription service.",
"ar": "تم حذف الطفل بنجاح"
},
"visit": {
"en": "Visit",
"ar": "زيارة"
},
"description-vaccination": {
"en": "Description",
"ar": "وصف"
},
"due-date": {
"en": "Due date",
"ar": "تاريخ الاستحقاق"
},
}; };

@ -16,3 +16,7 @@ const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING'; const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
const IS_SEARCH_APPO = 'is-search-appo'; const IS_SEARCH_APPO = 'is-search-appo';
const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment'; const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';
const IS_VIBRATION = 'is_vibration';
const THEME_VALUE = 'is_vibration';
const MAIN_USER = 'main-user';
const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited';

@ -16,7 +16,9 @@ class InsuranceCardModel {
int patientType; int patientType;
String groupName; String groupName;
String companyName; String companyName;
int companyID;
String subCategoryDesc; String subCategoryDesc;
int subCategoryID;
String patientCardID; String patientCardID;
String insurancePolicyNumber; String insurancePolicyNumber;
bool isActive; bool isActive;
@ -25,6 +27,7 @@ class InsuranceCardModel {
InsuranceCardModel({ InsuranceCardModel({
this.insurancePolicyNumber, this.insurancePolicyNumber,
this.subCategoryDesc, this.subCategoryDesc,
this.subCategoryID,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
@ -40,6 +43,7 @@ class InsuranceCardModel {
this.patientType, this.patientType,
this.groupName, this.groupName,
this.companyName, this.companyName,
this.companyID,
this.patientCardID, this.patientCardID,
this.isActive, this.isActive,
this.cardValidTo this.cardValidTo
@ -50,6 +54,7 @@ class InsuranceCardModel {
insurancePolicyNumber = json['InsurancePolicyNo']; insurancePolicyNumber = json['InsurancePolicyNo'];
patientCardID = json['PatientCardID']; patientCardID = json['PatientCardID'];
companyName = json['CompanyName']; companyName = json['CompanyName'];
companyID = json['CompanyID'];
groupName = json['GroupName']; groupName = json['GroupName'];
versionID = json['VersionID']; versionID = json['VersionID'];
channel = json['Channel']; channel = json['Channel'];
@ -65,6 +70,7 @@ class InsuranceCardModel {
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
subCategoryDesc = json['SubCategoryDesc']; subCategoryDesc = json['SubCategoryDesc'];
subCategoryID = json["SubCategoryID"];
cardValidTo = json['CardValidTo']; cardValidTo = json['CardValidTo'];
} }

@ -86,3 +86,14 @@ class LabResult {
return data; return data;
} }
} }
class LabResultList {
String filterName = "";
List<LabResult> patientLabResultList = List();
LabResultList(
{this.filterName, LabResult lab}) {
patientLabResultList.add(lab);
}
}

@ -8,6 +8,9 @@ class AdvanceModel {
String email; String email;
String note; String note;
String depositorName; String depositorName;
String mobileNumber;
String patientName;
int projectID;
CitiesModel citiessModel; CitiesModel citiessModel;
AdvanceModel( AdvanceModel(
@ -17,5 +20,8 @@ class AdvanceModel {
this.hospitalsModel, this.hospitalsModel,
this.fileNumber, this.fileNumber,
this.depositorName, this.depositorName,
this.mobileNumber,
this.patientName,
this.projectID,
this.citiessModel}); this.citiessModel});
} }

@ -0,0 +1,22 @@
class GetNotificationsRequestModel {
int notificationStatusID;
int pagingSize;
int currentPage;
GetNotificationsRequestModel(
{this.notificationStatusID, this.pagingSize, this.currentPage});
GetNotificationsRequestModel.fromJson(Map<String, dynamic> json) {
notificationStatusID = json['NotificationStatusID'];
pagingSize = json['pagingSize'];
currentPage = json['currentPage'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['NotificationStatusID'] = this.notificationStatusID;
data['pagingSize'] = this.pagingSize;
data['currentPage'] = this.currentPage;
return data;
}
}

@ -0,0 +1,96 @@
class GetNotificationsResponseModel {
int id;
int recordId;
int patientID;
bool projectOutSA;
String deviceType;
String deviceToken;
String message;
String messageType;
String messageTypeData;
dynamic videoURL;
bool isQueue;
String isQueueOn;
String createdOn;
String createdBy;
String notificationType;
bool isSent;
String isSentOn;
bool isRead;
String isReadOn;
int channelID;
int projectID;
GetNotificationsResponseModel(
{this.id,
this.recordId,
this.patientID,
this.projectOutSA,
this.deviceType,
this.deviceToken,
this.message,
this.messageType,
this.messageTypeData,
this.videoURL,
this.isQueue,
this.isQueueOn,
this.createdOn,
this.createdBy,
this.notificationType,
this.isSent,
this.isSentOn,
this.isRead,
this.isReadOn,
this.channelID,
this.projectID});
GetNotificationsResponseModel.fromJson(Map<String, dynamic> json) {
id = json['Id'];
recordId = json['RecordId'];
patientID = json['PatientID'];
projectOutSA = json['ProjectOutSA'];
deviceType = json['DeviceType'];
deviceToken = json['DeviceToken'];
message = json['Message'];
messageType = json['MessageType'];
messageTypeData = json['MessageTypeData'];
videoURL = json['VideoURL'];
isQueue = json['IsQueue'];
isQueueOn = json['IsQueueOn'];
createdOn = json['CreatedOn'];
createdBy = json['CreatedBy'];
notificationType = json['NotificationType'];
isSent = json['IsSent'];
isSentOn = json['IsSentOn'];
isRead = json['IsRead'];
isReadOn = json['IsReadOn'];
channelID = json['ChannelID'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Id'] = this.id;
data['RecordId'] = this.recordId;
data['PatientID'] = this.patientID;
data['ProjectOutSA'] = this.projectOutSA;
data['DeviceType'] = this.deviceType;
data['DeviceToken'] = this.deviceToken;
data['Message'] = this.message;
data['MessageType'] = this.messageType;
data['MessageTypeData'] = this.messageTypeData;
data['VideoURL'] = this.videoURL;
data['IsQueue'] = this.isQueue;
data['IsQueueOn'] = this.isQueueOn;
data['CreatedOn'] = this.createdOn;
data['CreatedBy'] = this.createdBy;
data['NotificationType'] = this.notificationType;
data['IsSent'] = this.isSent;
data['IsSentOn'] = this.isSentOn;
data['IsRead'] = this.isRead;
data['IsReadOn'] = this.isReadOn;
data['ChannelID'] = this.channelID;
data['ProjectID'] = this.projectID;
return data;
}
}

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

@ -0,0 +1,85 @@
class Addresses {
String id;
String firstName;
String lastName;
String email;
String company;
int countryId;
String country;
String stateProvinceId;
String city;
String address1;
String address2;
String zipPostalCode;
String phoneNumber;
String faxNumber;
String customerAttributes;
String createdOnUtc;
String province;
String latLong;
Addresses(
{this.id,
this.firstName,
this.lastName,
this.email,
this.company,
this.countryId,
this.country,
this.stateProvinceId,
this.city,
this.address1,
this.address2,
this.zipPostalCode,
this.phoneNumber,
this.faxNumber,
this.customerAttributes,
this.createdOnUtc,
this.province,
this.latLong});
Addresses.fromJson(Map<String, dynamic> json) {
id = json['id'];
firstName = json['first_name'];
lastName = json['last_name'];
email = json['email'];
company = json['company'];
countryId = json['country_id'];
country = json['country'];
stateProvinceId = json['state_province_id'];
city = json['city'];
address1 = json['address1'];
address2 = json['address2'];
zipPostalCode = json['zip_postal_code'];
phoneNumber = json['phone_number'];
faxNumber = json['fax_number'];
customerAttributes = json['customer_attributes'];
createdOnUtc = json['created_on_utc'];
province = json['province'];
latLong = json['lat_long'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['email'] = this.email;
data['company'] = this.company;
data['country_id'] = this.countryId;
data['country'] = this.country;
data['state_province_id'] = this.stateProvinceId;
data['city'] = this.city;
data['address1'] = this.address1;
data['address2'] = this.address2;
data['zip_postal_code'] = this.zipPostalCode;
data['phone_number'] = this.phoneNumber;
data['fax_number'] = this.faxNumber;
data['customer_attributes'] = this.customerAttributes;
data['created_on_utc'] = this.createdOnUtc;
data['province'] = this.province;
data['lat_long'] = this.latLong;
return data;
}
}

@ -0,0 +1,128 @@
class Customer {
String fileNumber;
String iqamaNumber;
int isOutSa;
int patientType;
String gender;
String birthDate;
String phone;
String countryCode;
String yahalaAccountno;
String billingAddress;
String shippingAddress;
String id;
String username;
String email;
String firstName;
String lastName;
String languageId;
String adminComment;
String isTaxExempt;
String hasShoppingCartItems;
String active;
String deleted;
String isSystemAccount;
String systemName;
String lastIpAddress;
String createdOnUtc;
String lastLoginDateUtc;
String lastActivityDateUtc;
String registeredInStoreId;
Customer(
{this.fileNumber,
this.iqamaNumber,
this.isOutSa,
this.patientType,
this.gender,
this.birthDate,
this.phone,
this.countryCode,
this.yahalaAccountno,
this.billingAddress,
this.shippingAddress,
this.id,
this.username,
this.email,
this.firstName,
this.lastName,
this.languageId,
this.adminComment,
this.isTaxExempt,
this.hasShoppingCartItems,
this.active,
this.deleted,
this.isSystemAccount,
this.systemName,
this.lastIpAddress,
this.createdOnUtc,
this.lastLoginDateUtc,
this.lastActivityDateUtc,
this.registeredInStoreId});
Customer.fromJson(Map<String, dynamic> json) {
fileNumber = json['file_number'];
iqamaNumber = json['iqama_number'];
isOutSa = json['is_out_sa'];
patientType = json['patient_type'];
gender = json['gender'];
birthDate = json['birth_date'];
phone = json['phone'];
countryCode = json['country_code'];
yahalaAccountno = json['yahala_accountno'];
billingAddress = json['billing_address'];
shippingAddress = json['shipping_address'];
id = json['id'];
username = json['username'];
email = json['email'];
firstName = json['first_name'];
lastName = json['last_name'];
languageId = json['language_id'];
adminComment = json['admin_comment'];
isTaxExempt = json['is_tax_exempt'];
hasShoppingCartItems = json['has_shopping_cart_items'];
active = json['active'];
deleted = json['deleted'];
isSystemAccount = json['is_system_account'];
systemName = json['system_name'];
lastIpAddress = json['last_ip_address'];
createdOnUtc = json['created_on_utc'];
lastLoginDateUtc = json['last_login_date_utc'];
lastActivityDateUtc = json['last_activity_date_utc'];
registeredInStoreId = json['registered_in_store_id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['file_number'] = this.fileNumber;
data['iqama_number'] = this.iqamaNumber;
data['is_out_sa'] = this.isOutSa;
data['patient_type'] = this.patientType;
data['gender'] = this.gender;
data['birth_date'] = this.birthDate;
data['phone'] = this.phone;
data['country_code'] = this.countryCode;
data['yahala_accountno'] = this.yahalaAccountno;
data['billing_address'] = this.billingAddress;
data['shipping_address'] = this.shippingAddress;
data['id'] = this.id;
data['username'] = this.username;
data['email'] = this.email;
data['first_name'] = this.firstName;
data['last_name'] = this.lastName;
data['language_id'] = this.languageId;
data['admin_comment'] = this.adminComment;
data['is_tax_exempt'] = this.isTaxExempt;
data['has_shopping_cart_items'] = this.hasShoppingCartItems;
data['active'] = this.active;
data['deleted'] = this.deleted;
data['is_system_account'] = this.isSystemAccount;
data['system_name'] = this.systemName;
data['last_ip_address'] = this.lastIpAddress;
data['created_on_utc'] = this.createdOnUtc;
data['last_login_date_utc'] = this.lastLoginDateUtc;
data['last_activity_date_utc'] = this.lastActivityDateUtc;
data['registered_in_store_id'] = this.registeredInStoreId;
return data;
}
}

@ -0,0 +1,98 @@
import 'PharmacyImageObject.dart';
class Manufacturer {
String id;
String name;
String namen;
// List<LocalizedNames> localizedNames;
String description;
int manufacturerTemplateId;
String metaKeywords;
String metaDescription;
String metaTitle;
int pageSize;
String pageSizeOptions;
String priceRanges;
bool published;
bool deleted;
int displayOrder;
String createdOnUtc;
String updatedOnUtc;
PharmacyImageObject image;
Manufacturer(
{this.id,
this.name,
this.namen,
// this.localizedNames,
this.description,
this.manufacturerTemplateId,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
this.pageSize,
this.pageSizeOptions,
this.priceRanges,
this.published,
this.deleted,
this.displayOrder,
this.createdOnUtc,
this.updatedOnUtc,
this.image});
Manufacturer.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
namen = json['namen'];
// if (json['localized_names'] != null) {
// localizedNames = new List<LocalizedNames>();
// json['localized_names'].forEach((v) {
// localizedNames.add(new LocalizedNames.fromJson(v));
// });
// }
description = json['description'];
manufacturerTemplateId = json['manufacturer_template_id'];
metaKeywords = json['meta_keywords'];
metaDescription = json['meta_description'];
metaTitle = json['meta_title'];
pageSize = json['page_size'];
pageSizeOptions = json['page_size_options'];
priceRanges = json['price_ranges'];
published = json['published'];
deleted = json['deleted'];
displayOrder = json['display_order'];
createdOnUtc = json['created_on_utc'];
updatedOnUtc = json['updated_on_utc'];
image = json['image'] != null
? new PharmacyImageObject.fromJson(json['image'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['namen'] = this.namen;
// if (this.localizedNames != null) {
// data['localized_names'] =
// this.localizedNames.map((v) => v.toJson()).toList();
// }
data['description'] = this.description;
data['manufacturer_template_id'] = this.manufacturerTemplateId;
data['meta_keywords'] = this.metaKeywords;
data['meta_description'] = this.metaDescription;
data['meta_title'] = this.metaTitle;
data['page_size'] = this.pageSize;
data['page_size_options'] = this.pageSizeOptions;
data['price_ranges'] = this.priceRanges;
data['published'] = this.published;
data['deleted'] = this.deleted;
data['display_order'] = this.displayOrder;
data['created_on_utc'] = this.createdOnUtc;
data['updated_on_utc'] = this.updatedOnUtc;
if (this.image != null) {
data['image'] = this.image.toJson();
}
return data;
}
}

@ -0,0 +1,27 @@
class PharmacyImageObject {
int id;
int position;
String src;
String thumb;
String attachment;
PharmacyImageObject({this.id, this.position, this.src, this.thumb, this.attachment});
PharmacyImageObject.fromJson(Map<String, dynamic> json) {
id = json['id'];
position = json['position'];
src = json['src'];
thumb = json['thumb'];
attachment = json['attachment'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['position'] = this.position;
data['src'] = this.src;
data['thumb'] = this.thumb;
data['attachment'] = this.attachment;
return data;
}
}

@ -0,0 +1,149 @@
import 'PharmacyImageObject.dart';
import 'Reviews.dart';
class PharmacyProduct {
String id;
String name;
String namen;
String shortDescription;
String fullDescription;
String fullDescriptionn;
int approvedRatingSum;
int approvedTotalReviews;
String sku;
bool isRx;
String rxMessage;
String rxMessagen;
int stockQuantity;
String stockAvailability;
String stockAvailabilityn;
bool allowBackInStockSubscriptions;
int orderMinimumQuantity;
int orderMaximumQuantity;
double price;
double oldPrice;
String discountName;
String discountNamen;
String discountPercentage;
int displayOrder;
List<int> discountIds;
List<Reviews> reviews;
List<PharmacyImageObject> images;
PharmacyProduct(
{this.id,
this.name,
this.namen,
this.shortDescription,
this.fullDescription,
this.fullDescriptionn,
this.approvedRatingSum,
this.approvedTotalReviews,
this.sku,
this.isRx,
this.rxMessage,
this.rxMessagen,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.price,
this.oldPrice,
this.discountName,
this.discountNamen,
this.discountPercentage,
this.displayOrder,
this.discountIds,
this.reviews,
this.images});
PharmacyProduct.fromJson(Map<String, dynamic> json) {
try {
id = json['id'];
name = json['name'];
namen = json['namen'];
shortDescription = json['short_description'];
fullDescription = json['full_description'];
fullDescriptionn = json['full_descriptionn'];
approvedRatingSum = json['approved_rating_sum'];
approvedTotalReviews = json['approved_total_reviews'];
sku = json['sku'];
isRx = json['is_rx'];
rxMessage = json['rx_message'];
rxMessagen = json['rx_messagen'];
stockQuantity = json['stock_quantity'];
stockAvailability = json['stock_availability'];
stockAvailabilityn = json['stock_availabilityn'];
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity'];
price = json['price'];
oldPrice = json['old_price'];
discountName = json['discount_name'];
discountNamen = json['discount_namen'];
discountPercentage = json['discount_percentage'];
displayOrder = json['display_order'];
if (json['discount_ids'] != null) {
discountIds = new List<int>();
json['discount_ids'].forEach((v) {
discountIds.add(v);
});
}
if (json['reviews'] != null) {
reviews = new List<Reviews>();
json['reviews'].forEach((v) {
reviews.add(new Reviews.fromJson(v));
});
}
if (json['images'] != null) {
images = new List<PharmacyImageObject>();
json['images'].forEach((v) {
images.add(new PharmacyImageObject.fromJson(v));
});
}
} catch (e) {
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['namen'] = this.namen;
data['short_description'] = this.shortDescription;
data['full_description'] = this.fullDescription;
data['full_descriptionn'] = this.fullDescriptionn;
data['approved_rating_sum'] = this.approvedRatingSum;
data['approved_total_reviews'] = this.approvedTotalReviews;
data['sku'] = this.sku;
data['is_rx'] = this.isRx;
data['rx_message'] = this.rxMessage;
data['rx_messagen'] = this.rxMessagen;
data['stock_quantity'] = this.stockQuantity;
data['stock_availability'] = this.stockAvailability;
data['stock_availabilityn'] = this.stockAvailabilityn;
data['allow_back_in_stock_subscriptions'] =
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['price'] = this.price;
data['old_price'] = this.oldPrice;
data['discount_name'] = this.discountName;
data['discount_namen'] = this.discountNamen;
data['discount_percentage'] = this.discountPercentage;
data['display_order'] = this.displayOrder;
if (this.discountIds != String) {
data['discount_ids'] = this.discountIds.map((v) => v).toList();
}
if (this.reviews != String) {
data['reviews'] = this.reviews.map((v) => v.toJson()).toList();
}
if (this.images != String) {
data['images'] = this.images.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -0,0 +1,82 @@
import '../pharmacies/Customer.dart';
class Reviews {
int id;
int position;
int reviewId;
int customerId;
int productId;
int storeId;
bool isApproved;
String title;
String reviewText;
Null replyText;
int rating;
int helpfulYesTotal;
int helpfulNoTotal;
String createdOnUtc;
Customer customer;
Null product;
Reviews(
{this.id,
this.position,
this.reviewId,
this.customerId,
this.productId,
this.storeId,
this.isApproved,
this.title,
this.reviewText,
this.replyText,
this.rating,
this.helpfulYesTotal,
this.helpfulNoTotal,
this.createdOnUtc,
this.customer,
this.product});
Reviews.fromJson(Map<String, dynamic> json) {
id = json['id'];
position = json['position'];
reviewId = json['review_id'];
customerId = json['customer_id'];
productId = json['product_id'];
storeId = json['store_id'];
isApproved = json['is_approved'];
title = json['title'];
reviewText = json['review_text'];
replyText = json['reply_text'];
rating = json['rating'];
helpfulYesTotal = json['helpful_yes_total'];
helpfulNoTotal = json['helpful_no_total'];
createdOnUtc = json['created_on_utc'];
customer = json['customer'] != null
? new Customer.fromJson(json['customer'])
: null;
product = json['product'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['position'] = this.position;
data['review_id'] = this.reviewId;
data['customer_id'] = this.customerId;
data['product_id'] = this.productId;
data['store_id'] = this.storeId;
data['is_approved'] = this.isApproved;
data['title'] = this.title;
data['review_text'] = this.reviewText;
data['reply_text'] = this.replyText;
data['rating'] = this.rating;
data['helpful_yes_total'] = this.helpfulYesTotal;
data['helpful_no_total'] = this.helpfulNoTotal;
data['created_on_utc'] = this.createdOnUtc;
if (this.customer != null) {
data['customer'] = this.customer.toJson();
}
data['product'] = this.product;
return data;
}
}

@ -1,6 +1,6 @@
class PharmacyPrescriptions { class PharmacyPrescriptions {
String expiryDate; String expiryDate;
double sellingPrice; dynamic sellingPrice;
int quantity; int quantity;
int itemID; int itemID;
int locationID; int locationID;

@ -82,7 +82,7 @@ class RequestPrescriptionReport {
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo; // data['DischargeNo'] = this.dischargeNo;
return data; return data;
} }
} }

@ -14,6 +14,7 @@ class RequestPrescriptionReportEnh {
int patientType; int patientType;
int appointmentNo; int appointmentNo;
String setupID; String setupID;
int dischargeNo;
int episodeID; int episodeID;
int clinicID; int clinicID;
int projectID; int projectID;
@ -36,7 +37,7 @@ class RequestPrescriptionReportEnh {
this.setupID, this.setupID,
this.episodeID, this.episodeID,
this.clinicID, this.clinicID,
this.projectID}); this.projectID,this.dischargeNo});
RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) { RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID']; versionID = json['VersionID'];
@ -79,6 +80,7 @@ class RequestPrescriptionReportEnh {
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo;
return data; return data;
} }
} }

@ -5,13 +5,13 @@ class AppointmentDetails {
int appointmentNo; int appointmentNo;
int clinicID; int clinicID;
int doctorID; int doctorID;
String startTime; dynamic startTime;
String endTime; dynamic endTime;
String appointmentDate; dynamic appointmentDate;
String clinicName; dynamic clinicName;
String doctorImageURL; dynamic doctorImageURL;
String doctorName; dynamic doctorName;
String projectName; dynamic projectName;
AppointmentDetails( AppointmentDetails(
{this.setupID, {this.setupID,

@ -17,8 +17,8 @@ class AuthenticatedUserObject {
if (userData != null) user = AuthenticatedUser.fromJson(userData); if (userData != null) user = AuthenticatedUser.fromJson(userData);
} }
var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID); // var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = isLogin != null; this.isLogin = user != null;
} }
logout() async { logout() async {

@ -2,12 +2,17 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
import '../../../locator.dart';
import '../../../routes.dart'; import '../../../routes.dart';
import '../AuthenticatedUserObject.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -16,6 +21,10 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onSuccess: (dynamic response, int statusCode) {}, /// onSuccess: (dynamic response, int statusCode) {},
/// onFailure: (String error, int statusCode) {}, /// onFailure: (String error, int statusCode) {},
/// body: Map(); /// body: Map();
///
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient { class BaseAppClient {
post(String endPoint, post(String endPoint,
@ -28,7 +37,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); await sharedPref.getString(APP_LANGUAGE);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
@ -39,7 +48,16 @@ class BaseAppClient {
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'ar'
? 1
: 2;
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA') body['PatientOutSA'] = body.containsKey('PatientOutSA')
@ -63,21 +81,24 @@ class BaseAppClient {
body['PatientType'] = body.containsKey('PatientType') body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] != null
? body['PatientType'] ? body['PatientType']
: PATIENT_TYPE : user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE; : PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null ? body['PatientTypeID'] != null
? body['PatientTypeID'] ? body['PatientTypeID']
: PATIENT_TYPE_ID :user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID']; body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID;//getSessionId(token); body['SessionID'] = SESSION_ID; //getSessionId(token);
} }
} }
@ -114,11 +135,14 @@ class BaseAppClient {
onFailure( onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode); statusCode);
logout();
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) { parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
} else { } else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
@ -139,9 +163,44 @@ class BaseAppClient {
} }
} }
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams}) async {
String url = BASE_URL + endPoint;
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
}
print("URL : $url");
if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode);
}
} else {
onFailure('Please Check The Internet Connection', -1);
}
}
logout() async { logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
_vitalSignService.weightKg ="";
_vitalSignService.heightCm="";
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }
String getSessionId(String id) { String getSessionId(String id) {

@ -1,5 +1,4 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
@ -45,8 +44,7 @@ class FeedbackService extends BaseService {
if (appointHistory != null) { if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo; body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate);
DateUtil.convertDateToString(appointHistory.appointmentDate);
body['ClinicID'] = appointHistory.clinicID; body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName; body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID; body['DoctorID'] = appointHistory.doctorID;

@ -31,48 +31,9 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear(); _cardUpdated.clear();
} }
InsuranceCardModel _insuranceCardModel = InsuranceCardModel(
channel: 3,
deviceTypeID: 2,
generalid: "Cs2020@2016\$2958",
iPAdress: "10.20.10.20",
isDentalAllowedBackend: false,
languageID: 1,
patientID: 1231755,
patientOutSA: 0,
patientType: 1,
patientTypeID: 1,
sessionID: "uoKFXSLUwEaHYPwKZNA",
tokenID: "@dm!n",
versionID: 5.5,
);
InsuranceUpdateModel _insuranceUpdateModel = InsuranceUpdateModel(
channel: 3,
deviceTypeID: 2,
generalid: "Cs2020@2016\$2958",
iPAdress: "10.20.10.20",
isDentalAllowedBackend: false,
patientID: 1231755,
patientType: 1,
versionID: 5.5,
languageID: 2,
patientOutSA: 0,
sessionID: "ENRSJBKXnzCuuVQ",
);
InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel( InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
versionID: 5.5,
channel: 3,
languageID: LANGUAGE_ID,
iPAdress: "10.20.10.20",
generalid: "Cs2020@2016\$2958",
patientOutSA: 0,
sessionID: "DypNmtMkivzURHjeYg",
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: "@dm!n",
patientTypeID: 1, patientTypeID: 1,
patientType: 1, patientType: 1,
eXuldAPPNO: 0, eXuldAPPNO: 0,
@ -89,21 +50,22 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _insuranceCardModel.toJson()); }, body: Map());
} }
Future getInsuranceUpdate() async { Future getInsuranceUpdate() async {
hasError = false; hasError = false;
// _cardList.clear(); _cardList.clear();
await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) { response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item)); _cardUpdated.add(InsuranceUpdateModel.fromJson(item));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _insuranceUpdateModel.toJson()); }, body: Map());
} }
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({int appointmentNo}) async {
@ -163,4 +125,15 @@ class InsuranceCardService extends BaseService {
throw error; throw error;
} }
} }
Future getInsuranceDetails(data) async{
dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
localRes = response['List_InsuranceCheckList'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
return Future.value(localRes);
}
} }

@ -3,10 +3,6 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPr
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BloodPressureService extends BaseService { class BloodPressureService extends BaseService {

@ -1,12 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart';

@ -9,10 +9,12 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LabsService extends BaseService { class LabsService extends BaseService {
RequestPatientLabOrders _requestPatientLabOrders = RequestPatientLabOrders();
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList() async { Future getPatientLabOrdersList() async {
hasError = false;
Map<String,dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_Patient_LAB_ORDERS, await baseAppClient.post(GET_Patient_LAB_ORDERS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear(); patientLabOrdersList.clear();
@ -22,7 +24,7 @@ class LabsService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPatientLabOrders.toJson()); }, body: body);
} }
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
@ -39,7 +41,7 @@ class LabsService extends BaseService {
hasError = false; hasError = false;
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo; //'1800296522';//; _requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
@ -59,10 +61,10 @@ class LabsService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo; body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo; body['OrderNo'] = patientLabOrder.orderNo;
body['Procedure'] = "U/A"; body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID; body['ClinicID'] = patientLabOrder.clinicID;
//TODO Check the res
await baseAppClient.post(GET_Patient_LAB_RESULT, await baseAppClient.post(GET_Patient_LAB_RESULT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();

@ -1,11 +1,12 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
@ -21,6 +22,9 @@ class MyBalanceService extends BaseService {
String logInTokenID; String logInTokenID;
String verificationCode; String verificationCode;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
@ -56,13 +60,14 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
getPatientInfoByPatientIDAndMobileNumber() async { getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['MobileNo'] = user.mobileNumber; body['MobileNo'] = advanceModel.mobileNumber;
body['ProjectID'] = user.projectID; body['ProjectID'] = advanceModel.hospitalsModel.iD;
body['PatientID'] = advanceModel.fileNumber;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER, await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
@ -76,7 +81,7 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
sendActivationCodeForAdvancePayment({int patientID,int projectID}) async { sendActivationCodeForAdvancePayment({int patientID, int projectID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -106,9 +111,8 @@ class MyBalanceService extends BaseService {
body['LogInTokenID'] = logInTokenID; body['LogInTokenID'] = logInTokenID;
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT, await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
super.error = error; super.error = error;
@ -143,7 +147,7 @@ class MyBalanceService extends BaseService {
await sharedPref.getObject(FAMILY_FILE)); await sharedPref.getObject(FAMILY_FILE));
return getAllSharedRecordsByStatusResponse; return getAllSharedRecordsByStatusResponse;
} else { } else {
return getSharedRecordByStatus(); return await getSharedRecordByStatus();
} }
} }
} }

@ -22,12 +22,6 @@ class MyDoctorService extends BaseService {
channel: 3, channel: 3,
deviceTypeID: 2, deviceTypeID: 2,
doctorID: 2477, doctorID: 2477,
iPAdress: '10.20.10.20',
languageID: 2,
patientOutSA: 0,
sessionID: 'CvsUFeJkyLDnFQqw',
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false); isDentalAllowedBackend: false);
Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async { Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async {
@ -52,18 +46,6 @@ class MyDoctorService extends BaseService {
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile( RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
license: true, license: true,
isRegistered: true, isRegistered: true,
projectID: 12,
clinicID: 501,
patientID: 1231755,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'nstatCtNEmuwxeuVAOUmw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
); );
Future getDoctorProfileAndRating( Future getDoctorProfileAndRating(
@ -87,7 +69,7 @@ class MyDoctorService extends BaseService {
}, body: _requestDoctorProfile.toJson()); }, body: _requestDoctorProfile.toJson());
///GET DOCTOR RATING ///GET DOCTOR RATING
//_requestDoctorRating.doctorID = doctorId; _requestDoctorRating.doctorID = doctorId;
await baseAppClient.post(GET_DOCTOR_RATING, await baseAppClient.post(GET_DOCTOR_RATING,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]); doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]);

@ -11,40 +11,17 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescripti
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService { class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = List(); List<Prescriptions> prescriptionsList = List();
RequestPrescriptions _requestPrescriptions = RequestPrescriptions(
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
List<PrescriptionsOrder> prescriptionsOrderList = List(); List<PrescriptionsOrder> prescriptionsOrderList = List();
RequestPrescriptionsOrders _requestPrescriptionsOrders =
RequestPrescriptionsOrders(
patientID: 1231755,
patientOutSA: 0,
versionID: 5.5,
channel: 3,
languageID: 1,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false,
deviceTypeID: 2);
Future getPrescriptions() async { Future getPrescriptions() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(PRESCRIPTIONS, await baseAppClient.post(PRESCRIPTIONS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear(); prescriptionsList.clear();
@ -54,10 +31,12 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptions.toJson()); }, body: body);
} }
Future getPrescriptionsOrders() async { Future getPrescriptionsOrders() async {
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionsOrderList.clear(); prescriptionsOrderList.clear();
@ -69,41 +48,39 @@ class PrescriptionsService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptionsOrders.toJson()); }, body: body);
} }
RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport _requestPrescriptionReport =
RequestPrescriptionReport( RequestPrescriptionReport(
appointmentNo: 0, appointmentNo: 0, isDentalAllowedBackend: false);
channel: 3,
clinicID: 4,
deviceTypeID: 2,
dischargeNo: 2018003246,
episodeID: 0,
iPAdress: '10.20.10.20',
languageID: 1,
patientID: 1231755,
patientOutSA: 0,
patientType: 1,
patientTypeID: 1,
projectID: 12,
sessionID: 'wgKuHpsPsEuLnlJhAYCQ',
tokenID: '@dm!n',
setupID: "91877",
versionID: 5.5,
generalid: 'Cs2020@2016\$2958',
isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport({int dischargeNo}) async { Future getPrescriptionReport(
{Prescriptions prescriptions}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
await baseAppClient.post(GET_PRESCRIPTION_REPORT, _requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(prescriptions.isInOutPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { prescriptionReportEnhList.clear();
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); if(prescriptions.isInOutPatient){
}); response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -112,24 +89,7 @@ class PrescriptionsService extends BaseService {
RequestSendPrescriptionEmail _requestSendPrescriptionEmail = RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail( RequestSendPrescriptionEmail(
versionID: 5.5, isDentalAllowedBackend: false,);
languageID: 2,
channel: 3,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'twIUmHfOHqFdDfVcyw',
isDentalAllowedBackend: false,
deviceTypeID: 2,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1,
to: 'aljammalzmohammad@outlook.com',
dateofBirth: '/Date(536743800000+0300)/',
patientIditificationNum: '2344670985',
patientMobileNumber: '537503378',
patientName: 'TAMER FANASHEH',
setupID: '91877');
Future sendPrescriptionEmail(String appointmentDate, int patientID, Future sendPrescriptionEmail(String appointmentDate, int patientID,
String clinicName, String doctorName, int projectID) async { String clinicName, String doctorName, int projectID) async {
@ -139,28 +99,25 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.clinicName = clinicName; _requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName; _requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID; _requestSendPrescriptionEmail.projectID = projectID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
_requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
_requestSendPrescriptionEmail.patientName = user.firstName +" "+ user.lastName;
_requestSendPrescriptionEmail.setupID = user.setupID;
hasError = false; hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestSendPrescriptionEmail.toJson()); }, body: _requestSendPrescriptionEmail.toJson());
} }
RequestGetListPharmacyForPrescriptions RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
requestGetListPharmacyForPrescriptions =
RequestGetListPharmacyForPrescriptions(
latitude: 0, latitude: 0,
longitude: 0, longitude: 0,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'HGNerTUSXhpaHXBg',
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
deviceTypeID: 2,
); );
List<PharmacyPrescriptions> pharmacyPrescriptionsList = List(); List<PharmacyPrescriptions> pharmacyPrescriptionsList = List();
@ -180,44 +137,85 @@ class PrescriptionsService extends BaseService {
}, body: requestGetListPharmacyForPrescriptions.toJson()); }, body: requestGetListPharmacyForPrescriptions.toJson());
} }
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
RequestPrescriptionReportEnh(isDentalAllowedBackend: false,);
RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh( List<PrescriptionReportEnh> prescriptionReportEnhList = List();
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: '10.20.10.20',
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'bQQdesEKpyYKTFMVNeg',
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1,
setupID: '91877',
appointmentNo: 5926390,
episodeID: 140251928,
clinicID: 25,
projectID: 12
); Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;
}
} else {
if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
isInPatient = element.isInOutPatient;///call inpGetPrescriptionReport
}
}
});
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder})async{
hasError = false; hasError = false;
// _requestPrescriptionReportEnh.appointmentNo = int.parse(prescriptionsOrder.appointmentNo);
// _requestPrescriptionReportEnh.patientID = prescriptionsOrder.projectID;
await baseAppClient.post(GET_PRESCRIPTION_REPORT_ENH, await baseAppClient.post(isInPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
if(isInPatient){
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
}
Future updatePressOrder({@required int presOrderID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = presOrderID;
body['EditedBy'] = user.patientID;
body['RejectionReason'] = '';
body['PresOrderStatus'] = 4;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestPrescriptionReportEnh.toJson()); }, body: body);
} }
} }

@ -12,19 +12,8 @@ class ReportsMonthlyService extends BaseService {
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: "10.20.10.20",
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ',
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
deviceTypeID: 2, );
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;

@ -12,19 +12,8 @@ class ReportsService extends BaseService {
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
versionID: 5.5,
channel: 3,
languageID: 2,
iPAdress: "10.20.10.20",
generalid: 'Cs2020@2016\$2958',
patientOutSA: 0, patientOutSA: 0,
sessionID: 'KIbLoqkytuKJEWECHQ', );
isDentalAllowedBackend: false,
deviceTypeID: 2,
patientID: 1231755,
tokenID: '@dm!n',
patientTypeID: 1,
patientType: 1);
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;

@ -0,0 +1,40 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class NotificationService extends BaseService {
List<GetNotificationsResponseModel> notificationsList = List();
Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async {
hasError = false;
await baseAppClient.post(PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS,
onSuccess: (dynamic response, int statusCode) {
if(getNotificationsRequestModel.currentPage ==0)
notificationsList.clear();
response['List_GetAllNotificationsFromPool'].forEach((appoint) {
notificationsList.add(GetNotificationsResponseModel.fromJson(appoint));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: getNotificationsRequestModel.toJson());
}
Future markAsRead(MarkMessageAsReadRequestModel markMessageAsReadRequestModel ) async {
hasError = false;
await baseAppClient.post(PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ,
onSuccess: (dynamic response, int statusCode) {
updateNotification(markMessageAsReadRequestModel.notificationPoolID);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: markMessageAsReadRequestModel.toJson());
}
updateNotification(id) {
int index = notificationsList.indexWhere((element) => element.id == id);
notificationsList[index].isRead = true;
}
}

@ -0,0 +1,29 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class OrderPreviewService extends BaseService{
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
List<Addresses> addresses = List();
Future getBannerListList() async {
hasError = false;
try {
await baseAppClient.get(GET_CUSTOMERS_ADDRESSES,
onSuccess: (dynamic response, int statusCode) {
addresses.clear();
response['customers'][0]['addresses'].forEach((item) {
addresses.add(Addresses.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
}

@ -0,0 +1,97 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PharmacyModuleService extends BaseService {
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
List<PharmacyImageObject> bannerItems = List();
List<Manufacturer> manufacturerList = List();
List<PharmacyProduct> bestSellerProducts = List();
List<PharmacyProduct> lastVisitedProducts = List();
Future getBannerListList() async {
hasError = false;
try {
await baseAppClient.get(GET_PHARMACY_BANNER,
onSuccess: (dynamic response, int statusCode) {
bannerItems.clear();
response['images'].forEach((item) {
bannerItems.add(PharmacyImageObject.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
Future getTopManufacturerList() async {
Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try {
await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER,
onSuccess: (dynamic response, int statusCode) {
manufacturerList.clear();
response['manufacturer'].forEach((item) {
manufacturerList.add(Manufacturer.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams);
} catch (error) {
throw error;
}
}
Future getBestSellerProducts() async {
Map<String, String> queryParams = {
'fields':
'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews',
};
try {
await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT,
onSuccess: (dynamic response, int statusCode) {
bestSellerProducts.clear();
response['products'].forEach((item) {
bestSellerProducts.add(PharmacyProduct.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams);
} catch (error) {
throw error;
}
}
Future getLastVisitedProducts() async {
String lastVisited = "";
if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) !=
null) {
lastVisited =
await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS);
try {
await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited",
onSuccess: (dynamic response, int statusCode) {
lastVisitedProducts.clear();
response['products'].forEach((item) {
lastVisitedProducts.add(PharmacyProduct.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
} catch (error) {
throw error;
}
}
}
}

@ -30,6 +30,9 @@ class BaseViewModel extends ChangeNotifier {
} }
BaseViewModel() { BaseViewModel() {
//authenticatedUserObject.getUser();
user = authenticatedUserObject.user;
this.isLogin = authenticatedUserObject.isLogin;
_getUser(); _getUser();
} }

@ -10,7 +10,7 @@ class DashboardViewModel extends BaseViewModel {
String bloadType = ""; String bloadType = "";
getPatientRadOrders() async { getPatientRadOrders() async {
if (!isLogin && _vitalSignService.weightKg.isEmpty) { if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy); setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders(); await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) { if (_vitalSignService.hasError) {

@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import '../../../locator.dart'; import '../../../locator.dart';
@ -22,7 +24,31 @@ class FeedbackViewModel extends BaseViewModel {
MessageType messageType = MessageType.NON; MessageType messageType = MessageType.NON;
MessageType messageTypeDialog = MessageType.NON; MessageType messageTypeDialog = MessageType.NON;
String selected = "not selected";
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
return TranslationBase.of(context).complainAppo;
break;
case MessageType.ComplaintWithoutAppointment:
return TranslationBase.of(context).complainWithoutAppo;
break;
case MessageType.Question:
return TranslationBase.of(context).question;
break;
case MessageType.Compliment:
return TranslationBase.of(context).compliment;
break;
case MessageType.Suggestion:
return TranslationBase.of(context).suggestion;
break;
case MessageType.NON:
return TranslationBase.of(context).notClassified;
break;
}
return TranslationBase.of(context).notClassified;
}
setMessageDialogType(MessageType messageType) { setMessageDialogType(MessageType messageType) {
messageTypeDialog = messageType; messageTypeDialog = messageType;
@ -33,19 +59,14 @@ class FeedbackViewModel extends BaseViewModel {
this.messageType = messageType; this.messageType = messageType;
switch (messageType) { switch (messageType) {
case MessageType.ComplaintOnAnAppointment: case MessageType.ComplaintOnAnAppointment:
selected = "Complaint on an appointment";
break; break;
case MessageType.ComplaintWithoutAppointment: case MessageType.ComplaintWithoutAppointment:
selected = "Complaint without appointment";
break; break;
case MessageType.Question: case MessageType.Question:
selected = "Question";
break; break;
case MessageType.Compliment: case MessageType.Compliment:
selected = "Compliment";
break; break;
case MessageType.Suggestion: case MessageType.Suggestion:
selected = "Suggestion";
break; break;
case MessageType.NON: case MessageType.NON:
break; break;

@ -65,11 +65,12 @@ class InsuranceViewModel extends BaseViewModel {
} }
Future getFamilyFiles() async { Future getFamilyFiles() async {
await _insuranceCardService.getFamilyFiles(); await _insuranceCardService.getSharedRecordByStatus();
if (_insuranceCardService.hasError) { if (_insuranceCardService.hasError) {
error = _insuranceCardService.error; error = _insuranceCardService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -82,6 +82,8 @@ class LabsViewModel extends BaseViewModel {
List<LabResult> get labResultList => _labsService.labResultList; List<LabResult> get labResultList => _labsService.labResultList;
List<LabResultList> labResultLists = List();
getLaboratoryResult( getLaboratoryResult(
{String projectID, {String projectID,
int clinicID, int clinicID,
@ -110,6 +112,24 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic =
labResultLists
.where((elementClinic) =>
elementClinic.filterName == element.testCode)
.toList();
if (patientLabOrdersClinic.length != 0) {
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
} else {
labResultLists.add(LabResultList(
filterName: element.testCode,
lab: element));
}
});
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -14,7 +14,6 @@ class MedicalViewModel extends BaseViewModel {
getAppointmentHistory() async { getAppointmentHistory() async {
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy); setState(ViewState.Busy);
if (_medicalService.appoitmentAllHistoryResultList.length == 0)
await _medicalService.getAppointmentHistory(); await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) { if (_medicalService.hasError) {
error = _medicalService.error; error = _medicalService.error;

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
@ -25,11 +26,15 @@ class MyBalanceViewModel extends BaseViewModel {
_myBalanceService.patientAdvanceBalanceAmountList; _myBalanceService.patientAdvanceBalanceAmountList;
//======================== //========================
BloodDonationService _bloodDonationService =locator<BloodDonationService>(); BloodDonationService _bloodDonationService = locator<BloodDonationService>();
List<CitiesModel> get CitiesModelList => _bloodDonationService.CitiesModelList;
BloodDetailsService _bloodDetailsService =locator<BloodDetailsService>();
List<List_BloodGroupDetailsModel> get BloodDetailsModelList => _bloodDetailsService.BloodModelList;//_bloodDonationService.CitiesModelList;
List<CitiesModel> get CitiesModelList =>
_bloodDonationService.CitiesModelList;
BloodDetailsService _bloodDetailsService = locator<BloodDetailsService>();
List<List_BloodGroupDetailsModel> get BloodDetailsModelList =>
_bloodDetailsService
.BloodModelList; //_bloodDonationService.CitiesModelList;
//=========================== //===========================
@ -44,8 +49,8 @@ class MyBalanceViewModel extends BaseViewModel {
PatientInfoAndMobileNumber get patientInfoAndMobileNumber => PatientInfoAndMobileNumber get patientInfoAndMobileNumber =>
_myBalanceService.patientInfoAndMobileNumber; _myBalanceService.patientInfoAndMobileNumber;
String get logInTokenID => _myBalanceService.logInTokenID; String get logInTokenID => _myBalanceService.logInTokenID;
String get verificationCode => _myBalanceService.verificationCode; String get verificationCode => _myBalanceService.verificationCode;
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {
@ -68,6 +73,7 @@ class MyBalanceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
//============== //==============
Future getCities() async { Future getCities() async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -79,9 +85,11 @@ class MyBalanceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getBlood() async { Future getBlood() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _bloodDetailsService .getAllBloodOrders();; await _bloodDetailsService.getAllBloodOrders();
;
if (_bloodDetailsService.hasError) { if (_bloodDetailsService.hasError) {
error = _bloodDetailsService.error; error = _bloodDetailsService.error;
@ -89,6 +97,7 @@ class MyBalanceViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
//=============== //===============
Future getPatientInfoByPatientID({String id}) async { Future getPatientInfoByPatientID({String id}) async {
@ -103,9 +112,10 @@ class MyBalanceViewModel extends BaseViewModel {
} }
} }
Future getPatientInfoByPatientIDAndMobileNumber() async { Future getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.getPatientInfoByPatientIDAndMobileNumber(); await _myBalanceService
.getPatientInfoByPatientIDAndMobileNumber(advanceModel);
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -115,9 +125,11 @@ class MyBalanceViewModel extends BaseViewModel {
} }
} }
Future sendActivationCodeForAdvancePayment({int patientID,int projectID}) async { Future sendActivationCodeForAdvancePayment(
{int patientID, int projectID}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.sendActivationCodeForAdvancePayment(patientID: patientID,projectID: projectID); await _myBalanceService.sendActivationCodeForAdvancePayment(
patientID: patientID, projectID: projectID);
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -126,9 +138,12 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future checkActivationCodeForAdvancePayment({String activationCode}) async {
Future checkActivationCodeForAdvancePayment(
{String activationCode, String patientMobileNumber}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.checkActivationCodeForAdvancePayment(activationCode: activationCode); await _myBalanceService.checkActivationCodeForAdvancePayment(
activationCode: activationCode);
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -139,7 +154,7 @@ class MyBalanceViewModel extends BaseViewModel {
Future getFamilyFiles() async { Future getFamilyFiles() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.getFamilyFiles(); await _myBalanceService.getSharedRecordByStatus();
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import '../../../core/enum/filter_type.dart'; import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart'; import '../../../core/enum/viewstate.dart';
@ -102,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
getPrescriptionReport({int dischargeNo}) async { getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo); await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -157,4 +158,16 @@ class PrescriptionsViewModel extends BaseViewModel {
} }
} }
Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
await getPrescriptions();
}
}
} }

@ -0,0 +1,40 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart';
import 'package:diplomaticquarterapp/core/service/notifications_service.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class NotificationViewModel extends BaseViewModel {
NotificationService _notificationService = locator<NotificationService>();
List<GetNotificationsResponseModel> get notifications =>
_notificationService.notificationsList;
Future getNotifications(
GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async {
if(getNotificationsRequestModel.currentPage == 0)
setState(ViewState.Busy);
await _notificationService
.getAllNotifications(getNotificationsRequestModel);
if (_notificationService.hasError) {
error = _notificationService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future markAsRead(id) async {
// setState(ViewState.Busy);
MarkMessageAsReadRequestModel markMessageAsReadRequestModel =
new MarkMessageAsReadRequestModel(notificationPoolID: id);
await _notificationService.markAsRead(markMessageAsReadRequestModel);
setState(ViewState.Idle);
}
}

@ -0,0 +1,8 @@
import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class OrderPreviewViewModel extends BaseViewModel {
OrderPreviewService _orderService = locator<OrderPreviewService>();
}

@ -0,0 +1,73 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart';
class PharmacyModuleViewModel extends BaseViewModel {
PharmacyModuleService _pharmacyService = locator<PharmacyModuleService>();
List<PharmacyImageObject> get bannerList => _pharmacyService.bannerItems;
List<Manufacturer> get manufacturerList => _pharmacyService.manufacturerList;
List<PharmacyProduct> get bestSellerProduct =>
_pharmacyService.bestSellerProducts;
List<PharmacyProduct> get lastVisitedProducts =>
_pharmacyService.lastVisitedProducts;
Future getPharmacyHomeData() async {
setState(ViewState.Busy);
await _pharmacyService.getBannerListList();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getTopManufacturerList();
}
}
List<String> getBannerImagesUrl() {
List<String> images = List();
images.add('assets/images/pharmacy_module/pharmacy_logo_green.png');
_pharmacyService.bannerItems.forEach((element) {
images.add(element.src);
});
return images;
}
_getTopManufacturerList() async {
await _pharmacyService.getTopManufacturerList();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getBestSellerProducts();
}
}
_getBestSellerProducts() async {
await _pharmacyService.getBestSellerProducts();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
_getLastVisitedProducts();
}
}
_getLastVisitedProducts() async {
await _pharmacyService.getLastVisitedProducts();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
}

@ -10,19 +10,26 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
class ProjectViewModel extends BaseViewModel { class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale; Locale _appLocale = Locale('ar');
String currentLanguage = 'en'; String currentLanguage = 'ar';
bool _isArabic = false; bool _isArabic = false;
bool isInternetConnection = true; bool isInternetConnection = true;
bool isLoading = false; bool isLoading = false;
bool isError = false; bool isError = false;
String error = ''; String error = '';
dynamic searchvalue; dynamic searchvalue;
bool isLogin
= false;
dynamic get searchValue => searchvalue; dynamic get searchValue => searchvalue;
Locale get appLocal => _appLocale; Locale get appLocal => _appLocale;
LocaleType get localeType => isArabic? LocaleType.en:LocaleType.ar; LocaleType get localeType => isArabic ? LocaleType.en : LocaleType.ar;
bool get isArabic => _isArabic; bool get isArabic => _isArabic;
// BaseViewModel baseViewModel = locator<BaseViewModel>() // BaseViewModel baseViewModel = locator<BaseViewModel>()
StreamSubscription subscription; StreamSubscription subscription;
@ -48,11 +55,10 @@ class ProjectViewModel extends BaseViewModel {
} }
void loadSharedPrefLanguage() async { void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_LANGUAGE); currentLanguage =
_appLocale = Locale(currentLanguage ?? 'en'); await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_isArabic = currentLanguage != null _appLocale = Locale(currentLanguage);
? currentLanguage == 'ar' ? true : false _isArabic = currentLanguage == 'ar';
: true;
notifyListeners(); notifyListeners();
} }

@ -1,11 +1,11 @@
import 'dart:convert'; import 'dart:convert';
import 'package:barcode_scan_fix/barcode_scan.dart';
// import 'package:barcode_scan/platform_wrapper.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart'; import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart'; import '../../locator.dart';
class QrViewModel extends BaseViewModel { class QrViewModel extends BaseViewModel {
@ -15,25 +15,25 @@ class QrViewModel extends BaseViewModel {
readQr() async { readQr() async {
//TODO fix the barcode scan //TODO fix the barcode scan
// var result = await BarcodeScanner.scan(); String result = await BarcodeScanner.scan();
// var data = json.decode(result.rawContent); var data = json.decode(result);
// var qRParkingID = data['QRParkingID']; var qRParkingID = data['QRParkingID'];
// setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
// await _qrService.getQRParkingByID(qRParkingID); await _qrService.getQRParkingByID(qRParkingID);
// if (_qrService.hasError) { if (_qrService.hasError) {
// error = _qrService.error; error = _qrService.error;
// setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
// } else { } else {
// if (_qrService.qRParkingList.length > 0) { if (_qrService.qRParkingList.length > 0) {
// qrParkingModel = _qrService.qRParkingList[0]; qrParkingModel = _qrService.qRParkingList[0];
// await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel); await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
// isSavePark = true; isSavePark = true;
// setState(ViewState.Idle); setState(ViewState.Idle);
// } else { } else {
// error = "Invalid Qr Code"; error = "Invalid Qr Code";
// setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
// } }
// } }
} }
getIsSaveParking() async { getIsSaveParking() async {

@ -30,4 +30,13 @@ class DQIcons {
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -42,7 +42,11 @@ import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/radiology_service.dart';
import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/vital_sign_service.dart'; import 'core/service/medical/vital_sign_service.dart';
import 'core/service/parmacyModule/order-preview-service.dart';
import 'core/service/notifications_service.dart';
import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'core/service/parmacyModule/parmacy_module_service.dart';
import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart';
import 'core/viewModels/blooddonation/blood_details_view_model.dart'; import 'core/viewModels/blooddonation/blood_details_view_model.dart';
@ -74,10 +78,13 @@ import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart'; import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart'; import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/medical/weight_pressure_view_model.dart'; import 'core/viewModels/medical/weight_pressure_view_model.dart';
import 'core/viewModels/notifications_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart'; import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart'; import 'core/service/pharmacies_service.dart';
import 'core/service/insurance_service.dart'; import 'core/service/insurance_service.dart';
import 'core/viewModels/insurance_card_View_model.dart'; import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'core/viewModels/qr_view_model.dart'; import 'core/viewModels/qr_view_model.dart';
import 'core/viewModels/vaccine_view_model.dart'; import 'core/viewModels/vaccine_view_model.dart';
import 'core/service/vaccine_service.dart'; import 'core/service/vaccine_service.dart';
@ -110,8 +117,6 @@ void setupLocator() {
locator.registerLazySingleton(() => EReferralService()); locator.registerLazySingleton(() => EReferralService());
locator.registerLazySingleton(() => HomeHealthCareService()); locator.registerLazySingleton(() => HomeHealthCareService());
locator.registerLazySingleton(() => CMCService()); locator.registerLazySingleton(() => CMCService());
locator.registerLazySingleton(() => PatientSickLeaveService()); locator.registerLazySingleton(() => PatientSickLeaveService());
locator.registerLazySingleton(() => MyBalanceService()); locator.registerLazySingleton(() => MyBalanceService());
locator.registerLazySingleton(() => BloodSugarService()); locator.registerLazySingleton(() => BloodSugarService());
@ -124,7 +129,6 @@ void setupLocator() {
locator.registerLazySingleton(() => FindusService()); locator.registerLazySingleton(() => FindusService());
locator.registerLazySingleton(() => LiveChatService()); locator.registerLazySingleton(() => LiveChatService());
locator.registerLazySingleton(() => H2OService()); locator.registerLazySingleton(() => H2OService());
locator.registerLazySingleton(() => BloodDonationService()); locator.registerLazySingleton(() => BloodDonationService());
locator.registerLazySingleton(() => BloodDetailsService()); locator.registerLazySingleton(() => BloodDetailsService());
locator.registerLazySingleton(() => ChildVaccinesService()); locator.registerLazySingleton(() => ChildVaccinesService());
@ -132,9 +136,12 @@ void setupLocator() {
locator.registerLazySingleton(() => CreteNewBabyService()); locator.registerLazySingleton(() => CreteNewBabyService());
locator.registerLazySingleton(() => DeleteBabyService()); locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService());
locator.registerLazySingleton(() => NotificationService());
locator.registerLazySingleton(() => VaccinationTableService()); locator.registerLazySingleton(() => PharmacyModuleService());
locator.registerLazySingleton(() => OrderPreviewService());
/// View Model /// View Model
@ -166,9 +173,6 @@ void setupLocator() {
locator.registerFactory(() => ChildVaccinesViewModel()); locator.registerFactory(() => ChildVaccinesViewModel());
locator.registerFactory(() => UserInformationViewModel()); locator.registerFactory(() => UserInformationViewModel());
locator.registerFactory(() => VaccinationTableViewModel()); locator.registerFactory(() => VaccinationTableViewModel());
locator.registerFactory(() => AddNewChildViewModel()); locator.registerFactory(() => AddNewChildViewModel());
locator.registerFactory(() => H2OViewModel()); locator.registerFactory(() => H2OViewModel());
locator.registerFactory(() => BloodSugarViewMode()); locator.registerFactory(() => BloodSugarViewMode());
@ -177,8 +181,15 @@ void setupLocator() {
locator.registerFactory(() => EyeViewModel()); locator.registerFactory(() => EyeViewModel());
locator.registerFactory(() => ActiveMedicationsViewModel()); locator.registerFactory(() => ActiveMedicationsViewModel());
locator.registerFactory(() => AskDoctorViewModel()); locator.registerFactory(() => AskDoctorViewModel());
locator.registerFactory(() => AllergiesViewModel()); locator.registerFactory(() => AllergiesViewModel());
locator.registerFactory(() => HomeHealthCareViewModel()); locator.registerFactory(() => HomeHealthCareViewModel());
locator.registerFactory(() => CMCViewModel()); locator.registerFactory(() => CMCViewModel());
locator.registerFactory(() => NotificationViewModel());
locator.registerFactory(() => PharmacyModuleViewModel());
locator.registerFactory(() => OrderPreviewViewModel());
} }

@ -1,24 +1,30 @@
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
import 'core/viewModels/project_view_model.dart'; import 'core/viewModels/project_view_model.dart';
import 'locator.dart'; import 'locator.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
void main() async { void main() async {
setupLocator(); setupLocator();
runApp(MyApp()); runApp(ChangeNotifierProvider<ThemeNotifier>(
create: (context) => ThemeNotifier(defaultTheme), child: MyApp() ));
} }
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
/// static final _myTabbedPageKey = new GlobalKey<_LandingPageState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final themeNotifier = Provider.of<ThemeNotifier>(context);
return LayoutBuilder( return LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
return OrientationBuilder( return OrientationBuilder(
@ -29,6 +35,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider<ProjectViewModel>( ChangeNotifierProvider<ProjectViewModel>(
create: (context) => ProjectViewModel(), create: (context) => ProjectViewModel(),
), ),
ChangeNotifierProvider<ToDoCountProviderModel>(
create: (context) => ToDoCountProviderModel()),
ChangeNotifierProvider<SearchProvider>( ChangeNotifierProvider<SearchProvider>(
create: (context) => SearchProvider()), create: (context) => SearchProvider()),
ChangeNotifierProvider.value( ChangeNotifierProvider.value(
@ -41,6 +49,7 @@ class MyApp extends StatelessWidget {
], ],
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Diplomatic Quarter App', title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal, locale: projectProvider.appLocal,
@ -48,13 +57,15 @@ class MyApp extends StatelessWidget {
TranslationBaseDelegate(), TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate, GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
], ],
supportedLocales: [ supportedLocales: [
const Locale('ar', ''), // Arabic const Locale('ar', ''), // Arabic
const Locale('en', ''), // English const Locale('en', ''), // English
], ],
theme: ThemeData( //theme: themeNotifier.getTheme(),
fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', theme:ThemeData(
fontFamily:projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,
@ -67,7 +78,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: HexColor('#E9E9E9'), // Colors.grey[100], scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey, textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white, canvasColor: Colors.white,
@ -88,7 +99,7 @@ class MyApp extends StatelessWidget {
), ),
), ),
), ),
initialRoute: HOME, initialRoute: SPLASH,
routes: routes, routes: routes,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
), ),

@ -0,0 +1,12 @@
import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier {
int _count;
int get count => _count == null ? 0 : _count;
void setState(int count) {
_count = count;
notifyListeners();
}
}

@ -60,6 +60,7 @@ class AuthenticatedUser {
dynamic strDateofBirth; dynamic strDateofBirth;
dynamic tempAddress; dynamic tempAddress;
dynamic zipCode; dynamic zipCode;
dynamic isFamily;
// dynamic patientPayType; // dynamic patientPayType;
// dynamic patientType; // dynamic patientType;
// dynamic status; // dynamic status;
@ -123,6 +124,7 @@ class AuthenticatedUser {
this.strDateofBirth, this.strDateofBirth,
this.tempAddress, this.tempAddress,
this.zipCode, this.zipCode,
this.isFamily
}); });
AuthenticatedUser.fromJson(Map<String, dynamic> json) { AuthenticatedUser.fromJson(Map<String, dynamic> json) {
@ -190,6 +192,7 @@ class AuthenticatedUser {
strDateofBirth = json['StrDateofBirth']; strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress']; tempAddress = json['TempAddress'];
zipCode = json['ZipCode']; zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -255,7 +258,7 @@ class AuthenticatedUser {
data['StrDateofBirth'] = this.strDateofBirth; data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress; data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode; data['ZipCode'] = this.zipCode;
data['IsFamily'] = this.isFamily;
return data; return data;
} }
} }

@ -2,7 +2,7 @@ class CheckActivationCodeReq {
int patientMobileNumber; int patientMobileNumber;
String mobileNo; String mobileNo;
String deviceToken; String deviceToken;
int projectOutSA; bool projectOutSA;
int loginType; int loginType;
String zipCode; String zipCode;
bool isRegister; bool isRegister;

@ -76,6 +76,9 @@ class Patientobject {
String firstName; String firstName;
String middleName; String middleName;
String lastName; String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
dynamic strDateofBirth; dynamic strDateofBirth;
String dateofBirth; String dateofBirth;
int gender; int gender;
@ -93,8 +96,11 @@ class Patientobject {
this.mobileNumber, this.mobileNumber,
this.patientOutSA, this.patientOutSA,
this.firstName, this.firstName,
this.middleName, this.middleName,
this.lastName, this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.strDateofBirth, this.strDateofBirth,
this.dateofBirth, this.dateofBirth,
this.gender, this.gender,
@ -114,6 +120,9 @@ class Patientobject {
firstName = json['FirstName']; firstName = json['FirstName'];
middleName = json['MiddleName']; middleName = json['MiddleName'];
lastName = json['LastName']; lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
strDateofBirth = json['StrDateofBirth']; strDateofBirth = json['StrDateofBirth'];
dateofBirth = json['DateofBirth']; dateofBirth = json['DateofBirth'];
gender = json['Gender']; gender = json['Gender'];
@ -136,6 +145,9 @@ class Patientobject {
data['FirstName'] = this.firstName; data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName; data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName; data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['StrDateofBirth'] = this.strDateofBirth; data['StrDateofBirth'] = this.strDateofBirth;
data['DateofBirth'] = this.dateofBirth; data['DateofBirth'] = this.dateofBirth;
data['Gender'] = this.gender; data['Gender'] = this.gender;

@ -2,7 +2,7 @@ class SendActivationRequest {
int patientMobileNumber; int patientMobileNumber;
String mobileNo; String mobileNo;
String deviceToken; String deviceToken;
int projectOutSA; bool projectOutSA;
int loginType; int loginType;
String zipCode; String zipCode;
bool isRegister; bool isRegister;

@ -1,68 +1,68 @@
class GetAllSharedRecordsByStatusResponse { class GetAllSharedRecordsByStatusResponse {
Null date; dynamic date;
int languageID; int languageID;
int serviceName; int serviceName;
Null time; dynamic time;
Null androidLink; dynamic androidLink;
Null authenticationTokenID; dynamic authenticationTokenID;
Null data; dynamic data;
bool dataw; bool dataw;
int dietType; int dietType;
Null errorCode; dynamic errorCode;
Null errorEndUserMessage; dynamic errorEndUserMessage;
Null errorEndUserMessageN; dynamic errorEndUserMessageN;
Null errorMessage; dynamic errorMessage;
int errorType; int errorType;
int foodCategory; int foodCategory;
Null iOSLink; dynamic iOSLink;
bool isAuthenticated; bool isAuthenticated;
int mealOrderStatus; int mealOrderStatus;
int mealType; int mealType;
int messageStatus; int messageStatus;
int numberOfResultRecords; int numberOfResultRecords;
Null patientBlodType; dynamic patientBlodType;
Null successMsg; dynamic successMsg;
Null successMsgN; dynamic successMsgN;
Null doctorInformationList; dynamic doctorInformationList;
Null getAllPendingRecordsList; List<GetAllSharedRecordsByStatusList> getAllPendingRecordsList;
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList; List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList;
Null getResponseFileList; List<GetAllSharedRecordsByStatusList> getResponseFileList;
bool isHMGPatient; bool isHMGPatient;
bool isLoginSuccessfully; bool isLoginSuccessfully;
bool isNeedUpdateIdintificationNo; bool isNeedUpdateIdintificationNo;
bool kioskSendSMS; bool kioskSendSMS;
Null list; dynamic list;
Null listAskHabibMobileLoginInfo; dynamic listAskHabibMobileLoginInfo;
Null listAskHabibPatientFile; dynamic listAskHabibPatientFile;
Null listMergeFiles; dynamic listMergeFiles;
Null listMobileLoginInfo; dynamic listMobileLoginInfo;
Null listPatientCount; dynamic listPatientCount;
Null logInTokenID; dynamic logInTokenID;
Null mohemmPrivilegeList; dynamic mohemmPrivilegeList;
int pateintID; int pateintID;
Null patientBloodType; dynamic patientBloodType;
Null patientERDriverFile; dynamic patientERDriverFile;
Null patientERDriverFileList; dynamic patientERDriverFileList;
bool patientHasFile; bool patientHasFile;
Null patientMergedIDs; dynamic patientMergedIDs;
bool patientOutSA; bool patientOutSA;
int patientShareRequestID; int patientShareRequestID;
int patientType; int patientType;
int projectIDOut; int projectIDOut;
Null returnMessage; dynamic returnMessage;
bool sMSLoginRequired; bool sMSLoginRequired;
Null servicePrivilegeList; dynamic servicePrivilegeList;
Null sharePatientName; dynamic sharePatientName;
Null verificationCode; dynamic verificationCode;
Null email; dynamic email;
Null errorList; dynamic errorList;
bool hasFile; bool hasFile;
bool isActiveCode; bool isActiveCode;
bool isMerged; bool isMerged;
bool isNeedUserAgreement; bool isNeedUserAgreement;
bool isSMSSent; bool isSMSSent;
Null memberList; dynamic memberList;
Null message; dynamic message;
int statusCode; int statusCode;
GetAllSharedRecordsByStatusResponse( GetAllSharedRecordsByStatusResponse(
@ -133,78 +133,92 @@ class GetAllSharedRecordsByStatusResponse {
this.statusCode}); this.statusCode});
GetAllSharedRecordsByStatusResponse.fromJson(Map<String, dynamic> json) { GetAllSharedRecordsByStatusResponse.fromJson(Map<String, dynamic> json) {
date = json['Date']; try {
languageID = json['LanguageID']; date = json['Date'];
serviceName = json['ServiceName']; languageID = json['LanguageID'];
time = json['Time']; serviceName = json['ServiceName'];
androidLink = json['AndroidLink']; time = json['Time'];
authenticationTokenID = json['AuthenticationTokenID']; androidLink = json['AndroidLink'];
data = json['Data']; authenticationTokenID = json['AuthenticationTokenID'];
dataw = json['Dataw']; data = json['Data'];
dietType = json['DietType']; dataw = json['Dataw'];
errorCode = json['ErrorCode']; dietType = json['DietType'];
errorEndUserMessage = json['ErrorEndUserMessage']; errorCode = json['ErrorCode'];
errorEndUserMessageN = json['ErrorEndUserMessageN']; errorEndUserMessage = json['ErrorEndUserMessage'];
errorMessage = json['ErrorMessage']; errorEndUserMessageN = json['ErrorEndUserMessageN'];
errorType = json['ErrorType']; errorMessage = json['ErrorMessage'];
foodCategory = json['FoodCategory']; errorType = json['ErrorType'];
iOSLink = json['IOSLink']; foodCategory = json['FoodCategory'];
isAuthenticated = json['IsAuthenticated']; iOSLink = json['IOSLink'];
mealOrderStatus = json['MealOrderStatus']; isAuthenticated = json['IsAuthenticated'];
mealType = json['MealType']; mealOrderStatus = json['MealOrderStatus'];
messageStatus = json['MessageStatus']; mealType = json['MealType'];
numberOfResultRecords = json['NumberOfResultRecords']; messageStatus = json['MessageStatus'];
patientBlodType = json['PatientBlodType']; numberOfResultRecords = json['NumberOfResultRecords'];
successMsg = json['SuccessMsg']; patientBlodType = json['PatientBlodType'];
successMsgN = json['SuccessMsgN']; successMsg = json['SuccessMsg'];
doctorInformationList = json['DoctorInformation_List']; successMsgN = json['SuccessMsgN'];
getAllPendingRecordsList = json['GetAllPendingRecordsList']; doctorInformationList = json['DoctorInformation_List'];
if (json['GetAllSharedRecordsByStatusList'] != null) { // getAllPendingRecordsList = json['GetAllPendingRecordsList'];
getAllSharedRecordsByStatusList =
new List<GetAllSharedRecordsByStatusList>(); if (json['GetAllPendingRecordsList'] != null) {
json['GetAllSharedRecordsByStatusList'].forEach((v) { getAllSharedRecordsByStatusList = new List<GetAllSharedRecordsByStatusList>();
getAllSharedRecordsByStatusList json['GetAllPendingRecordsList'].forEach((v) {
.add(new GetAllSharedRecordsByStatusList.fromJson(v)); getAllSharedRecordsByStatusList
}); .add(new GetAllSharedRecordsByStatusList.fromJson(v));
});
}
if (json['GetAllSharedRecordsByStatusList'] != null) {
getAllSharedRecordsByStatusList = new List<GetAllSharedRecordsByStatusList>();
json['GetAllSharedRecordsByStatusList'].forEach((v) {
getAllSharedRecordsByStatusList
.add(new GetAllSharedRecordsByStatusList.fromJson(v));
});
}
getResponseFileList = json['GetResponseFileList'];
isHMGPatient = json['IsHMGPatient'];
isLoginSuccessfully = json['IsLoginSuccessfully'];
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
kioskSendSMS = json['KioskSendSMS'];
list = json['List'];
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
listMergeFiles = json['List_MergeFiles'];
listMobileLoginInfo = json['List_MobileLoginInfo'];
listPatientCount = json['List_PatientCount'];
logInTokenID = json['LogInTokenID'];
mohemmPrivilegeList = json['MohemmPrivilege_List'];
pateintID = json['PateintID'];
patientBloodType = json['PatientBloodType'];
patientERDriverFile = json['PatientER_DriverFile'];
patientERDriverFileList = json['PatientER_DriverFileList'];
patientHasFile = json['PatientHasFile'];
patientMergedIDs = json['PatientMergedIDs'];
patientOutSA = json['PatientOutSA'];
patientShareRequestID = json['PatientShareRequestID'];
patientType = json['PatientType'];
projectIDOut = json['ProjectIDOut'];
returnMessage = json['ReturnMessage'];
sMSLoginRequired = json['SMSLoginRequired'];
servicePrivilegeList = json['ServicePrivilege_List'];
sharePatientName = json['SharePatientName'];
verificationCode = json['VerificationCode'];
email = json['email'];
errorList = json['errorList'];
hasFile = json['hasFile'];
isActiveCode = json['isActiveCode'];
isMerged = json['isMerged'];
isNeedUserAgreement = json['isNeedUserAgreement'];
isSMSSent = json['isSMSSent'];
memberList = json['memberList'];
message = json['message'];
statusCode = json['statusCode'];
}catch (e){
var asd ="";
print(e);
} }
getResponseFileList = json['GetResponseFileList'];
isHMGPatient = json['IsHMGPatient'];
isLoginSuccessfully = json['IsLoginSuccessfully'];
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
kioskSendSMS = json['KioskSendSMS'];
list = json['List'];
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
listMergeFiles = json['List_MergeFiles'];
listMobileLoginInfo = json['List_MobileLoginInfo'];
listPatientCount = json['List_PatientCount'];
logInTokenID = json['LogInTokenID'];
mohemmPrivilegeList = json['MohemmPrivilege_List'];
pateintID = json['PateintID'];
patientBloodType = json['PatientBloodType'];
patientERDriverFile = json['PatientER_DriverFile'];
patientERDriverFileList = json['PatientER_DriverFileList'];
patientHasFile = json['PatientHasFile'];
patientMergedIDs = json['PatientMergedIDs'];
patientOutSA = json['PatientOutSA'];
patientShareRequestID = json['PatientShareRequestID'];
patientType = json['PatientType'];
projectIDOut = json['ProjectIDOut'];
returnMessage = json['ReturnMessage'];
sMSLoginRequired = json['SMSLoginRequired'];
servicePrivilegeList = json['ServicePrivilege_List'];
sharePatientName = json['SharePatientName'];
verificationCode = json['VerificationCode'];
email = json['email'];
errorList = json['errorList'];
hasFile = json['hasFile'];
isActiveCode = json['isActiveCode'];
isMerged = json['isMerged'];
isNeedUserAgreement = json['isNeedUserAgreement'];
isSMSSent = json['isSMSSent'];
memberList = json['memberList'];
message = json['message'];
statusCode = json['statusCode'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -287,7 +301,7 @@ class GetAllSharedRecordsByStatusList {
int responseID; int responseID;
int regionID; int regionID;
int status; int status;
Null isActive; dynamic isActive;
String editedOn; String editedOn;
String createdOn; String createdOn;
String emaiLAddress; String emaiLAddress;

@ -10,9 +10,10 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.da
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -29,6 +31,11 @@ import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AllHabibMedicalService extends StatefulWidget { class AllHabibMedicalService extends StatefulWidget {
//TODO
final Function goToMyProfile;
AllHabibMedicalService({Key key, this.goToMyProfile});
@override @override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();
} }
@ -60,47 +67,58 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
Container( Container(
margin: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 190, height: 150,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage('assets/images/timeline_bg.png'), image: ExactAssetImage('assets/images/Weather_img.png'),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), borderRadius: BorderRadius.circular(8.0)),
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0), padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Column( child: Row(
mainAxisAlignment: MainAxisAlignment.center, children: [
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ mainAxisAlignment: MainAxisAlignment.center,
Text( crossAxisAlignment: CrossAxisAlignment.start,
'Health Weather Indicators', children: [
style: TextStyle( Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
color: Colors.white, color: Colors.white,
fontSize: 22.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), Texts(
SizedBox( TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
height: 35.0,
),
Text(
'Health Tips Based On Current Weather',
style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 14,
), ),
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,),
Texts(
TranslationBase.of(context).moreDetails,
color: Colors.white,
decoration: TextDecoration.underline,
),
],
), ),
]), )
],
),
), ),
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () {
context, Navigator.pop(context);
FadePage( widget.goToMyProfile();
page: MedicalProfilePage(), },
),
),
imageLocation: imageLocation:
'assets/images/new-design/my_file_bottom_bar.png', 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
@ -314,7 +332,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: ParkingPage(), page: FindUsPage(),
), ),
), ),
imageLocation: 'assets/images/new-design/find_us_icon.png', imageLocation: 'assets/images/new-design/find_us_icon.png',

@ -213,6 +213,9 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser);
} }
@ -269,7 +272,7 @@ class ConfirmPaymentPage extends StatelessWidget {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
service service
.createAdvancePayment(appo, res['Amount'], res['Fort_id'], .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context) res['PaymentMethod'], AppGlobal.context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);

@ -6,12 +6,14 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.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/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/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget { class ConfirmSMSDialog extends StatefulWidget {
@ -97,6 +99,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
builder: (_, model, w) => Dialog( builder: (_, model, w) => Dialog(
elevation: 0.6, elevation: 0.6,
@ -107,20 +110,18 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
Container( Container(
width: double.infinity, width: double.infinity,
height: 40, height: 40,
color: Colors.grey[700], color: Theme.of(context).primaryColor,
child: Row( child: Stack(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Center(
flex: 4, child: Texts(
child: Center(
child: Texts(
'SMS', 'SMS',
color: Colors.white, color: Colors.white,
textAlign: TextAlign.center, textAlign: TextAlign.center,
))), ),
Expanded( ),
flex: 1, Positioned(child: Container(
child: InkWell( child: InkWell(
onTap: () => Navigator.pop(context), onTap: () => Navigator.pop(context),
child: Container( child: Container(
@ -131,8 +132,12 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
color: Colors.grey[900], color: Colors.grey[900],
)), )),
), ),
),
left: projectViewModel.isArabic? 2:0,
right: projectViewModel.isArabic? 0:2,
) )
], ],
), ),
), ),
Image.asset( Image.asset(

@ -3,10 +3,12 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -100,7 +102,7 @@ class _BookConfirmState extends State<BookConfirm> {
fit: BoxFit.fill, height: 70.0, width: 70.0), fit: BoxFit.fill, height: 70.0, width: 70.0),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.6, width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -302,7 +304,7 @@ class _BookConfirmState extends State<BookConfirm> {
width: 60.0), width: 60.0),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.6, width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -382,8 +384,10 @@ class _BookConfirmState extends State<BookConfirm> {
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) { BuildContext context) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) { service.cancelAppointment(appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () { Future.delayed(new Duration(milliseconds: 1500), () {
if (!widget.isLiveCareAppointment) { if (!widget.isLiveCareAppointment) {
@ -397,11 +401,12 @@ class _BookConfirmState extends State<BookConfirm> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( GifLoaderDialogUtils.hideDialog(context);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); });
} }
insertAppointment(context, DoctorList docObject) { insertAppointment(context, DoctorList docObject) {
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service widget.service
.insertAppointment( .insertAppointment(
@ -421,6 +426,7 @@ class _BookConfirmState extends State<BookConfirm> {
docObject.projectID, docObject); docObject.projectID, docObject);
}); });
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@ -445,11 +451,11 @@ class _BookConfirmState extends State<BookConfirm> {
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
insertLiveCareScheduledAppointment(context, DoctorList docObject) { insertLiveCareScheduledAppointment(context, DoctorList docObject) {
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service widget.service
.insertLiveCareScheduleAppointment( .insertLiveCareScheduleAppointment(
@ -470,6 +476,7 @@ class _BookConfirmState extends State<BookConfirm> {
docObject.clinicID, docObject.projectID, docObject); docObject.clinicID, docObject.projectID, docObject);
}); });
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@ -507,13 +514,16 @@ class _BookConfirmState extends State<BookConfirm> {
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
navigateToHome(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getLiveCareAppointmentPatientShare(context, String appointmentNo, getLiveCareAppointmentPatientShare(context, String appointmentNo,
int clinicID, int projectID, DoctorList docObject) { int clinicID, int projectID, DoctorList docObject) {
GifLoaderDialogUtils.hideDialog(context);
widget.service widget.service
.getLiveCareAppointmentPatientShare( .getLiveCareAppointmentPatientShare(
appointmentNo, clinicID, projectID, context) appointmentNo, clinicID, projectID, context)
@ -522,9 +532,11 @@ class _BookConfirmState extends State<BookConfirm> {
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
navigateToHome(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
String getTime(DateTime dateTime) { String getTime(DateTime dateTime) {
@ -579,8 +591,13 @@ class _BookConfirmState extends State<BookConfirm> {
} }
} }
Future navigateToHome(context) async {
Navigator.of(context).popAndPushNamed(HOME);
}
Future navigateToBookSuccess(context, DoctorList docObject, Future navigateToBookSuccess(context, DoctorList docObject,
PatientShareResponse patientShareResponse) async { PatientShareResponse patientShareResponse) async {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(

@ -8,10 +8,12 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'QRCode.dart'; import 'QRCode.dart';
@ -21,6 +23,8 @@ class BookSuccess extends StatefulWidget {
DoctorList docObject; DoctorList docObject;
MyInAppBrowser browser; MyInAppBrowser browser;
final ChromeSafariBrowser chromeBrowser =
new MyChromeSafariBrowser(new MyInAppBrowser());
String appoDateFormatted; String appoDateFormatted;
String appoTimeFormatted; String appoTimeFormatted;
@ -78,12 +82,14 @@ class _BookSuccessState extends State<BookSuccess> {
width: 80.0), width: 80.0),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.62,
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Text(widget.docObject.projectName, Text(widget.docObject.projectName,
overflow: TextOverflow.clip,
style: _getTextStyling()), style: _getTextStyling()),
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
@ -93,6 +99,7 @@ class _BookSuccessState extends State<BookSuccess> {
Container( Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0), margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text(widget.docObject.clinicName, child: Text(widget.docObject.clinicName,
overflow: TextOverflow.clip,
style: _getTextStyling()), style: _getTextStyling()),
), ),
Container( Container(
@ -101,6 +108,7 @@ class _BookSuccessState extends State<BookSuccess> {
widget.appoDateFormatted + widget.appoDateFormatted +
", " + ", " +
widget.appoTimeFormatted, widget.appoTimeFormatted,
overflow: TextOverflow.clip,
style: _getTextStyling()), style: _getTextStyling()),
), ),
Container( Container(
@ -110,7 +118,7 @@ class _BookSuccessState extends State<BookSuccess> {
widget.docObject.doctorTitle + widget.docObject.doctorTitle +
" " + " " +
widget.docObject.name, widget.docObject.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.clip,
style: _getTextStyling()), style: _getTextStyling()),
), ),
], ],
@ -230,9 +238,10 @@ class _BookSuccessState extends State<BookSuccess> {
children: <Widget>[ children: <Widget>[
_getBulletPoint("1"), _getBulletPoint("1"),
Container( Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text( child: Text(
"Please confirm the appointment to avoid the cancellation", "Please confirm the appointment to avoid the cancellation",
overflow: TextOverflow.fade, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
], ],
@ -294,7 +303,8 @@ class _BookSuccessState extends State<BookSuccess> {
appo.appointmentNo = appo.appointmentNo =
widget.patientShareResponse.appointmentNo; widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID; appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID; appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo); confirmAppointment(appo);
}, },
@ -314,7 +324,7 @@ class _BookSuccessState extends State<BookSuccess> {
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFFc5272d), color: new Color(0xFF40ACC9),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
@ -340,8 +350,8 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.confirmAppointment( .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context) appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -483,7 +493,7 @@ class _BookSuccessState extends State<BookSuccess> {
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFFc5272d), color: new Color(0xFF40ACC9),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
@ -541,22 +551,34 @@ class _BookSuccessState extends State<BookSuccess> {
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
double amount, double amount,
PatientShareResponse patientShareResponse, PatientShareResponse patientShareResponse,
AppoitmentAllHistoryResultList appo) { AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser( if (paymentMethod == "ApplePay") {
onExitCallback: onBrowserExit, await widget.chromeBrowser.open(
appo: appo, url: "https://flutter.dev/",
onLoadStartCallback: onBrowserLoadStart); options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions(
widget.browser.openPaymentBrowser( addDefaultShareMenuItem: false),
amount, ios: IOSSafariOptions(barCollapsingEnabled: true)));
"Appointment check in", } else {
Utils.getAppointmentTransID( widget.browser = new MyInAppBrowser(
appo.projectID, appo.clinicID, appo.appointmentNo), onExitCallback: onBrowserExit,
appo.projectID.toString(), appo: appo,
authenticatedUser.emailAddress, onLoadStartCallback: onBrowserLoadStart);
paymentMethod,
authenticatedUser, widget.browser.openPaymentBrowser(
widget.browser); amount,
"Appointment check in",
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
appo.projectID.toString(),
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
widget.browser);
}
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -586,6 +608,31 @@ class _BookSuccessState extends State<BookSuccess> {
} }
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.checkPaymentStatus( .checkPaymentStatus(
@ -611,8 +658,8 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
service service
.createAdvancePayment( .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
appo, res['Amount'], res['Fort_id'], res['PaymentMethod'], context) res['Fort_id'], res['PaymentMethod'], context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest( addAdvancedNumberRequest(
@ -620,9 +667,10 @@ class _BookSuccessState extends State<BookSuccess> {
paymentReference, paymentReference,
appo.appointmentNo.toString()); appo.appointmentNo.toString());
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
addAdvancedNumberRequest( addAdvancedNumberRequest(
@ -635,9 +683,10 @@ class _BookSuccessState extends State<BookSuccess> {
print(res); print(res);
getAppoQR(context); getAppoQR(context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Widget _getQRAppo() { Widget _getQRAppo() {
@ -791,11 +840,13 @@ class _BookSuccessState extends State<BookSuccess> {
.generateAppointmentQR(widget.patientShareResponse, context) .generateAppointmentQR(widget.patientShareResponse, context)
.then((res) { .then((res) {
print(res); print(res);
GifLoaderDialogUtils.hideDialog(context);
navigateToQR(context, res['AppointmentQR']); navigateToQR(context, res['AppointmentQR']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToQR(context, String appoQR) async { Future navigateToQR(context, String appoQR) async {

@ -31,6 +31,7 @@ class _BookingOptionsState extends State<BookingOptions> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
body: Container( body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),

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

Loading…
Cancel
Save