Merge branch 'fix_master' into 'master'

Fix master

See merge request Cloud_Solution/diplomatic-quarter!119
merge-requests/224/merge
Mohammad Aljammal 5 years ago
commit 85df92a0ca

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: 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

@ -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';
@ -124,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';
@ -178,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';
@ -236,8 +244,9 @@ const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1; const PATIENT_TYPE = 2;
const PATIENT_TYPE_ID = 1; const PATIENT_TYPE_ID = 2;
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";
@ -246,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 =
@ -354,7 +367,10 @@ const GET_ORDER_DETAIL_BY_ID =
const GET_CMC_ORDER_DETAIL_BY_ID = const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; 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 TIMER_MIN = 10; const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";

@ -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,7 +353,7 @@ 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": {
@ -348,7 +364,7 @@ const Map<String, Map<String, String>> localizedValues = {
"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,6 +674,10 @@ 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 // pharmacy module
"medicationRefill": { "medicationRefill": {
@ -701,4 +721,315 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Drag point to change your age", "en": "Drag point to change your age",
"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": " عنصر في البحث "},
}; };

@ -16,4 +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'; 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;
}
}

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

@ -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,16 @@ 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/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 +20,9 @@ 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>();
class BaseAppClient { class BaseAppClient {
post(String endPoint, post(String endPoint,
@ -28,7 +35,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.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
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 +46,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,15 +79,18 @@ 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['PatientTypeID'] != null
? user['PatientTypeID']
: 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'] =
@ -114,11 +133,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);
@ -172,7 +194,9 @@ class BaseAppClient {
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;
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();

@ -2,10 +2,13 @@ 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 +24,8 @@ 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 = "";
@ -61,8 +66,8 @@ class MyBalanceService extends BaseService {
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'] = authenticatedUserObject.user.mobileNumber;
body['ProjectID'] = user.projectID; body['ProjectID'] = authenticatedUserObject.user.projectID;
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 {
@ -143,7 +148,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,35 +48,23 @@ 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(
{int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = dischargeNo;
_requestPrescriptionReport.projectID = projectId;
_requestPrescriptionReport.clinicID = clinicID;
_requestPrescriptionReport.setupID = setupID;
_requestPrescriptionReport.episodeID = episodeID;
await baseAppClient.post(GET_PRESCRIPTION_REPORT, await baseAppClient.post(GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
@ -112,24 +79,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 +89,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 +127,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) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); 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) {
}, 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;
}
}

@ -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 {
@ -105,7 +114,8 @@ class MyBalanceViewModel extends BaseViewModel {
Future getPatientInfoByPatientIDAndMobileNumber() async { Future getPatientInfoByPatientIDAndMobileNumber() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.getPatientInfoByPatientIDAndMobileNumber(); await _myBalanceService
.getPatientInfoByPatientIDAndMobileNumber();
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);

@ -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({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo); await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID);
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);
}
}

@ -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,16 +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 more_menu_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData offer_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData prescription_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_scan_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData share_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_add_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_2 = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_3 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_4 = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medication_icon = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -43,6 +43,7 @@ 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/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/service/parmacyModule/parmacy_module_service.dart';
@ -77,6 +78,7 @@ 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';
@ -115,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());
@ -129,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());
@ -138,6 +137,7 @@ void setupLocator() {
locator.registerLazySingleton(() => DeleteBabyService()); locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService()); locator.registerLazySingleton(() => VaccinationTableService());
locator.registerLazySingleton(() => NotificationService());
locator.registerLazySingleton(() => PharmacyModuleService()); locator.registerLazySingleton(() => PharmacyModuleService());
@ -173,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());
@ -188,6 +185,7 @@ void setupLocator() {
locator.registerFactory(() => AllergiesViewModel()); locator.registerFactory(() => AllergiesViewModel());
locator.registerFactory(() => HomeHealthCareViewModel()); locator.registerFactory(() => HomeHealthCareViewModel());
locator.registerFactory(() => CMCViewModel()); locator.registerFactory(() => CMCViewModel());
locator.registerFactory(() => NotificationViewModel());

@ -1,24 +1,29 @@
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) {
return LayoutBuilder( return LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
return OrientationBuilder( return OrientationBuilder(
@ -29,6 +34,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(
@ -48,13 +55,14 @@ 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: ThemeData(
fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', fontFamily: projectProvider.isArabic? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,
@ -67,28 +75,28 @@ 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(0xffEEEEEE),
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,
backgroundColor: Color.fromRGBO(255, 255, 255, 1), backgroundColor: Colors.white,
highlightColor: Colors.grey[100].withOpacity(0.4), highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Colors.grey, primaryColor: Color(0xff40ACC9),
bottomSheetTheme: BottomSheetThemeData( bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
backgroundColor: HexColor('#E0E0E0')),
cursorColor: Colors.grey, cursorColor: Colors.grey,
cardColor: Colors.white,
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
color: Colors.grey[700], color: Color(0xff40ACC9),
brightness: Brightness.light, brightness: Brightness.dark,
elevation: 0.0, elevation: 10.0,
actionsIconTheme: IconThemeData( actionsIconTheme: IconThemeData(
color: Colors.grey[800], color: Color(0xff40ACC9),
), ),
), ),
), ),
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,61 +67,63 @@ 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,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: LiveCareHome(),
),
),
imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
title: TranslationBase.of(context).livecare,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -139,15 +148,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/al-habib_online_payment_service_icon.png', 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
),
ServicesContainer( ServicesContainer(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -162,37 +163,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/emergency_service_image.png', imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService, title: TranslationBase.of(context).emergencyService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -204,15 +175,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/family_menu_icon_red.png', 'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family', title: 'My Family',
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -224,61 +187,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/upcoming_icon_bottom_bar.png', 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -314,7 +223,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',

@ -269,7 +269,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,31 @@ 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,
widget.browser);
}
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -586,6 +605,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 +655,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 +664,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 +680,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 +837,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),

@ -55,7 +55,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
} }
getLanguageID() async { getLanguageID() async {
languageID = await sharedPref.getString(APP_LANGUAGE); languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
} }
getChiefComplaintsList() { getChiefComplaintsList() {

@ -40,6 +40,8 @@ class _DoctorProfileState extends State<DoctorProfile>
bool showFooterButton = false; bool showFooterButton = false;
var event = RobotProvider(); var event = RobotProvider();
AppSharedPreferences sharedPref = AppSharedPreferences();
@override @override
void initState() { void initState() {
_tabController = new TabController( _tabController = new TabController(
@ -69,6 +71,7 @@ class _DoctorProfileState extends State<DoctorProfile>
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
bottomSheet: showFooterButton bottomSheet: showFooterButton
? Container( ? Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
@ -153,7 +156,7 @@ class _DoctorProfileState extends State<DoctorProfile>
child: Text( child: Text(
"(" + "(" +
widget.doctor.noOfPatientsRate.toString() + widget.doctor.noOfPatientsRate.toString() +
" Reviews)", " " + TranslationBase.of(context).reviews + ")",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.blue[800], color: Colors.blue[800],
@ -211,7 +214,6 @@ class _DoctorProfileState extends State<DoctorProfile>
} }
getPatientData() async { getPatientData() async {
AppSharedPreferences sharedPref = AppSharedPreferences();
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
@ -222,14 +224,14 @@ class _DoctorProfileState extends State<DoctorProfile>
} }
} }
void goToBookConfirm() { void goToBookConfirm() async {
if (DocAvailableAppointments.areSlotsAvailable) { if (DocAvailableAppointments.areSlotsAvailable) {
if (widget.authUser.patientID != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
navigateToBookConfirm(context); navigateToBookConfirm(context);
} else { } else {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
confirmMessage: "You have to login to use this service", confirmMessage: TranslationBase.of(context).loginToUseService,
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {navigateToLogin()}, okFunction: () => {navigateToLogin()},

@ -151,6 +151,7 @@ class _QRCodeState extends State<QRCode> {
), ),
), ),
Container( Container(
margin: EdgeInsets.zero,
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -252,7 +253,9 @@ class _QRCodeState extends State<QRCode> {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
@ -290,9 +293,11 @@ class _QRCodeState extends State<QRCode> {
String getDoctorSpeciality(List<String> docSpecial) { String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = ""; String docSpeciality = "";
docSpecial.forEach((v) { if (docSpecial != null && docSpecial.length != 0) {
docSpeciality = docSpeciality + v + "\n"; docSpecial.forEach((v) {
}); docSpeciality = docSpeciality + v + "\n";
});
}
return docSpeciality; return docSpeciality;
} }
} }

@ -1,13 +1,14 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/timeSlot.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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
import '../../../uitl/date_uitl.dart'; import '../../../uitl/date_uitl.dart';
@ -49,6 +50,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
ScrollController _scrollController; ScrollController _scrollController;
var language;
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
@ -62,6 +65,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
}; };
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance.addPostFrameCallback((_) async {
getCurrentLanguage();
if (widget.isLiveCareAppointment) if (widget.isLiveCareAppointment)
getDoctorScheduledFreeSlots(context, widget.doctor); getDoctorScheduledFreeSlots(context, widget.doctor);
else { else {
@ -88,7 +92,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
void _onDaySelected(DateTime day, List events) { void _onDaySelected(DateTime day, List events) {
final DateFormat formatter = DateFormat('yyyy-MM-dd'); final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() { setState(() {
this.selectedDate = DateUtil.getMonthDayYearDateFormatted(day); this.selectedDate =
DateUtil.getWeekDayMonthDayYearDateFormatted(day, language);
openTimeSlotsPickerForDate(day, docFreeSlots); openTimeSlotsPickerForDate(day, docFreeSlots);
DocAvailableAppointments.selectedDate = formatter.format(day); DocAvailableAppointments.selectedDate = formatter.format(day);
print(DocAvailableAppointments.selectedDate); print(DocAvailableAppointments.selectedDate);
@ -154,7 +159,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
Widget _buildTableCalendarWithBuilders() { Widget _buildTableCalendarWithBuilders() {
return TableCalendar( return TableCalendar(
locale: 'en_US', locale: language == "en" ? 'en_US' : 'ar_SA',
calendarController: _calendarController, calendarController: _calendarController,
events: _events, events: _events,
initialCalendarFormat: CalendarFormat.month, initialCalendarFormat: CalendarFormat.month,
@ -219,9 +224,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
), ),
); );
}, },
markersBuilder: (context, date, events, holidays) { markersBuilder: (context, date, events, _) {
final children = <Widget>[]; final children = <Widget>[];
if (events.isNotEmpty) { if (events.isNotEmpty) {
children.add( children.add(
Positioned( Positioned(
@ -235,8 +239,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
return children; return children;
}, },
), ),
onDaySelected: (date, events,format) { onDaySelected: (date, event, _) {
_onDaySelected(date, events); _onDaySelected(date, event);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },
onVisibleDaysChanged: _onVisibleDaysChanged, onVisibleDaysChanged: _onVisibleDaysChanged,
@ -287,8 +291,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
setState(() { setState(() {
DocAvailableAppointments.selectedDate = dateFormatter DocAvailableAppointments.selectedDate = dateFormatter
.format(DateUtil.convertStringToDate(freeSlotsResponse[0])); .format(DateUtil.convertStringToDate(freeSlotsResponse[0]));
selectedDate = DateUtil.getMonthDayYearDateFormatted( selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(freeSlotsResponse[0])); DateUtil.convertStringToDate(freeSlotsResponse[0]), language);
selectedDateJSON = freeSlotsResponse[0]; selectedDateJSON = freeSlotsResponse[0];
}); });
openTimeSlotsPickerForDate( openTimeSlotsPickerForDate(
@ -331,11 +335,13 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
} }
getDoctorFreeSlots(context, DoctorList docObject) { getDoctorFreeSlots(context, DoctorList docObject) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, .getDoctorFreeSlots(docObject.doctorID, docObject.clinicID,
docObject.projectID, context) docObject.projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['FreeTimeSlots'].length != 0) { if (res['FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['FreeTimeSlots']; freeSlotsResponse = res['FreeTimeSlots'];
@ -350,16 +356,17 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getDoctorScheduledFreeSlots(context, DoctorList docObject) { getDoctorScheduledFreeSlots(context, DoctorList docObject) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorScheduledFreeSlots(docObject.doctorID, docObject.clinicID, .getDoctorScheduledFreeSlots(docObject.doctorID, docObject.clinicID,
docObject.projectID, docObject.serviceID, context) docObject.projectID, docObject.serviceID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['PatientER_DoctorFreeSlots'].length != 0) { if (res['PatientER_DoctorFreeSlots'].length != 0) {
freeSlotsResponse = res['PatientER_DoctorFreeSlots']; freeSlotsResponse = res['PatientER_DoctorFreeSlots'];
@ -374,8 +381,15 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }
getCurrentLanguage() async {
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() {
this.language = languageID;
});
} }
Widget _buildEventsMarker(DateTime date, List events) { Widget _buildEventsMarker(DateTime date, List events) {

@ -1,9 +1,9 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.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_svg/flutter_svg.dart';
class DoctorInformation extends StatelessWidget { class DoctorInformation extends StatelessWidget {
DoctorProfileList docProfileList; DoctorProfileList docProfileList;
DoctorInformation({@required this.docProfileList}); DoctorInformation({@required this.docProfileList});
@ -27,8 +27,8 @@ class DoctorInformation extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( SvgPicture.asset(
"assets/images/new-design/doctor_information_icon.png"), "assets/images/DQ/doctor_information_icon.svg"),
Container( Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo, child: Text(TranslationBase.of(context).docInfo,
@ -43,12 +43,21 @@ class DoctorInformation extends StatelessWidget {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
TableCell(child: _getHeadingText(TranslationBase.of(context).gender)), TableCell(
TableCell(child: _getHeadingText(TranslationBase.of(context).nationality)), child: _getHeadingText(
TranslationBase.of(context).gender)),
TableCell(
child: _getHeadingText(
TranslationBase.of(context).nationality)),
]), ]),
TableRow(children: [ TableRow(children: [
TableCell(child: _getNormalText(docProfileList.genderDescription)), TableCell(
TableCell(child: _getNormalTextWithIcon(docProfileList.nationalityName, docProfileList.nationalityFlagURL)), child: _getNormalText(
docProfileList.genderDescription)),
TableCell(
child: _getNormalTextWithIcon(
docProfileList.nationalityName,
docProfileList.nationalityFlagURL)),
]), ]),
], ],
), ),
@ -82,13 +91,14 @@ class DoctorInformation extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( SvgPicture.asset(
"assets/images/new-design/doctor_qualification_icon.png"), "assets/images/DQ/doctor_qualification_icon.svg"),
Container( Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docQualifications, child: Text(
TranslationBase.of(context).docQualifications,
style: style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)), TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
), ),
], ],
), ),
@ -146,10 +156,7 @@ class DoctorInformation extends StatelessWidget {
color: Colors.grey[700])), color: Colors.grey[700])),
Container( Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Image.network( child: Image.network(icon, width: 18.0, height: 18.0),
icon,
width: 18.0,
height: 18.0),
), ),
], ],
), ),

@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.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/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -17,7 +17,9 @@ import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;
SearchByClinic({this.clnicIds}); SearchByClinic({this.clnicIds});
@override @override
_SearchByClinicState createState() => _SearchByClinicState(); _SearchByClinicState createState() => _SearchByClinicState();
} }
@ -26,11 +28,13 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool nearestAppo = false; bool nearestAppo = false;
String dropdownValue; String dropdownValue;
String projectDropdownValue; String projectDropdownValue;
// var event = RobotProvider(); // var event = RobotProvider();
List<ListClinicCentralized> clinicsList = []; List<ListClinicCentralized> clinicsList = [];
List<HospitalsModel> projectsList = []; List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false; bool isMobileAppDentalAllow = false;
bool isLoaded = false; bool isLoaded = false;
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -47,7 +51,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Row( Row(
children: <Widget>[ children: <Widget>[
Checkbox( Checkbox(
activeColor: new Color(0xFFc5272d), activeColor: new Color(0xFF40ACC9),
value: nearestAppo, value: nearestAppo,
onChanged: (bool value) { onChanged: (bool value) {
setState(() { setState(() {
@ -77,12 +81,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
} }
}); });
}, },
// trailing: Icon(TranslationBase.of(AppGlobal.context)
// .locale
// .languageCode ==
// 'en'
// ? Icons.keyboard_arrow_right
// : Icons.keyboard_arrow_left),
title: Text(result.clinicDescription, title: Text(result.clinicDescription,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
@ -104,7 +102,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<String>(
hint: new Text("Select Clinic"), hint: new Text(TranslationBase.of(context).selectClinic),
value: dropdownValue, value: dropdownValue,
items: clinicsList.map((item) { items: clinicsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
@ -168,27 +166,21 @@ class _SearchByClinicState extends State<SearchByClinic> {
} }
getClinicsList() { getClinicsList() {
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service.getClinicsList(context).then((res) {
.getClinicsList(context) if (res['MessageStatus'] == 1) {
.then((res) { setState(() {
if (res['MessageStatus'] == 1) { isMobileAppDentalAllow = res['ISMobileAppDentalAllow'];
setState(() { res['ListClinicCentralized'].forEach((v) {
isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; clinicsList.add(new ListClinicCentralized.fromJson(v));
res['ListClinicCentralized'].forEach((v) { });
clinicsList.add(new ListClinicCentralized.fromJson(v));
});
});
} else {}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
getProjectsList();
}); });
getProjectsList();
} else {}
}).catchError((err) {
print(err);
});
} }
getProjectsList() { getProjectsList() {
@ -199,23 +191,24 @@ class _SearchByClinicState extends State<SearchByClinic> {
res['ListProject'].forEach((v) { res['ListProject'].forEach((v) {
projectsList.add(new HospitalsModel.fromJson(v)); projectsList.add(new HospitalsModel.fromJson(v));
}); });
print(projectsList.length);
}); });
GifLoaderDialogUtils.hideDialog(context);
filterClinic(); filterClinic();
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo(); SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") { if (dropdownValue == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue); searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.date = DateTime.now(); searchInfo.date = DateTime.now();
GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} else { } else {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
@ -231,6 +224,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
nearestAppo, nearestAppo,
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorList'].length != 0) { if (res['DoctorList'].length != 0) {
@ -249,17 +243,16 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList(); result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length; numAll = result.length;
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, result, numAll, arrDistance); context, doctorsList, result, numAll, arrDistance);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }
@ -296,8 +289,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1) .where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList(); .toList();
isLoaded = true; isLoaded = true;
///print(clinicsList);
} }
}); });
} }

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -82,6 +83,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
} }
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -123,7 +125,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}); });
} else {} } else {}
}); });
GifLoaderDialogUtils.hideDialog(context);
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
@ -131,8 +133,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
_onDocTextChanged(content) { _onDocTextChanged(content) {

@ -27,6 +27,7 @@ class _BranchViewState extends State<BranchView> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
isBottomBar: false, isBottomBar: false,
body: new ListView.builder( body: new ListView.builder(
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
@ -109,7 +110,7 @@ class _ExpandableListViewState extends State<ExpandableListView> {
height: 28.0, height: 28.0,
width: 30.0, width: 30.0,
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Colors.red, color: Color(0xFF40ACC9),
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: new Center( child: new Center(

@ -31,7 +31,7 @@ class CardCommon extends StatelessWidget {
child: Text(this.text, child: Text(this.text,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: new Color(0xFFc5272d), color: new Color(0xFF40ACC9),
letterSpacing: 1.0, letterSpacing: 1.0,
fontSize: 20.0)), fontSize: 20.0)),
), ),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -135,12 +136,14 @@ class DoctorView extends StatelessWidget {
} }
getDoctorsProfile(context, DoctorList docObject, {isAppo}) { getDoctorsProfile(context, DoctorList docObject, {isAppo}) {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorProfileList> docProfileList = []; List<DoctorProfileList> docProfileList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsProfile(docObject.doctorID, docObject.clinicID, .getDoctorsProfile(docObject.doctorID, docObject.clinicID,
docObject.projectID, context) docObject.projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['DoctorProfileList'].length != 0) { if (res['DoctorProfileList'].length != 0) {
res['DoctorProfileList'].forEach((v) { res['DoctorProfileList'].forEach((v) {
@ -154,7 +157,7 @@ class DoctorView extends StatelessWidget {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); });
} }
String getDate(String date) { String getDate(String date) {

@ -27,8 +27,8 @@ class _ContactUsPageState extends State<ContactUsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true,//widget.isAppbar, isShowAppBar: true,
appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).hMGServiceLabel,
isShowDecPage: false, isShowDecPage: false,
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),
@ -43,7 +43,7 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/find_us_icon.png', image: 'assets/images/new-design/find_us_icon.png',
text: "Find us", text: TranslationBase.of(context).findUs,
subText: "", subText: "",
type: 0, type: 0,
@ -52,7 +52,7 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png', image: 'assets/images/new-design/feedback_icon.png',
text: "Feedback", text: TranslationBase.of(context).feedback,
subText: "", subText: "",
type: 1), type: 1),
@ -66,21 +66,14 @@ class _ContactUsPageState extends State<ContactUsPage> {
Expanded( Expanded(
child: CardCommonContact( child: CardCommonContact(
image: 'assets/images/new-design/live_chat_icon.png', image: 'assets/images/new-design/live_chat_icon.png',
text: "Live Chat", text: TranslationBase.of(context).liveChat,
subText: "Service", subText: TranslationBase.of(context).service,
type: 2, type: 2,
), ),
), ),
Expanded( Expanded(
child: Opacity( child: Container(),
opacity: 0,
child: CardCommonContact(
image: 'assets/images/new-design/feedback_icon.png',
text: "Feedback",
subText: "",
type: 3),
),
), ),
], ],

@ -34,9 +34,11 @@ class _FindUsPageState extends State<FindUsPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FindusViewModel>( return BaseView<FindusViewModel>(
allowAny: true,
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'Locations', appBarTitle: 'Locations',
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(

@ -23,6 +23,7 @@ class _HospitalsPageState extends State<HospitalsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
// margin: EdgeInsets.only(left: 15,right: 15,top: 70), // margin: EdgeInsets.only(left: 15,right: 15,top: 70),

@ -23,6 +23,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70), margin: EdgeInsets.only(left: 15, right: 15, top: 70),

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class CardCommonContact extends StatelessWidget { class CardCommonContact extends StatelessWidget {
final image; final image;
@ -17,6 +19,7 @@ class CardCommonContact extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
navigateToSearch(context, this.type); navigateToSearch(context, this.type);
@ -45,10 +48,12 @@ class CardCommonContact extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
), ),
Container( Align(
alignment: Alignment.bottomRight, alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), child: Container(
child: Image.asset(this.image, width: 60.0, height: 60.0), margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
),
), ),
], ],
), ),

@ -348,8 +348,11 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return children; return children;
}, },
), ),
onDaySelected: (date, event,formats) { onDaySelected: (date, event, _) {
_onDaySelected(date, event,); _onDaySelected(
date,
event,
);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },
onVisibleDaysChanged: _onVisibleDaysChanged, onVisibleDaysChanged: _onVisibleDaysChanged,

@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_requ
import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart'; import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/pages/family/add-family_type.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.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';
@ -20,6 +19,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'add-family_type.dart';
class AddMember extends StatefulWidget { class AddMember extends StatefulWidget {
@override @override
_AddMember createState() => _AddMember(); _AddMember createState() => _AddMember();
@ -179,8 +180,7 @@ class _AddMember extends State<AddMember> {
request.regionID = 1; request.regionID = 1;
} }
loading(true); loading(true);
this familyFileProvider
.familyFileProvider
.insertNewMember(request) .insertNewMember(request)
.then((value) => sendActivationCode(value)); .then((value) => sendActivationCode(value));
} }
@ -189,8 +189,7 @@ class _AddMember extends State<AddMember> {
// var request = this.getCommonRequest(); // var request = this.getCommonRequest();
loading(true); loading(true);
patientShareRequestID = result['PatientShareRequestID']; patientShareRequestID = result['PatientShareRequestID'];
this familyFileProvider
.familyFileProvider
.sendActivationCode(mobileNo, countryCode, nationalIDorFile.text) .sendActivationCode(mobileNo, countryCode, nationalIDorFile.text)
.then((result) => { .then((result) => {
if (result != null && result['isSMSSent'] == true) if (result != null && result['isSMSSent'] == true)
@ -203,11 +202,13 @@ class _AddMember extends State<AddMember> {
startSMSService(type, result) { startSMSService(type, result) {
loading(false); loading(false);
new SMSOTP( SMSOTP(
context, context,
type, type,
this.mobileNo, mobileNo,
(value) => {this.checkActivationCode(value, result)}, (value) {
this.checkActivationCode(value, result);
},
() => { () => {
print('Faild..'), print('Faild..'),
}, },
@ -215,8 +216,7 @@ class _AddMember extends State<AddMember> {
} }
checkActivationCode(value, result) { checkActivationCode(value, result) {
this familyFileProvider
.familyFileProvider
.checkActivationCode( .checkActivationCode(
result['LogInTokenID'], value, nationalIDorFile.text, mobileNo) result['LogInTokenID'], value, nationalIDorFile.text, mobileNo)
.then((result) => { .then((result) => {
@ -226,8 +226,7 @@ class _AddMember extends State<AddMember> {
} }
handleFamilyRequests(id, stauts) { handleFamilyRequests(id, stauts) {
this familyFileProvider
.familyFileProvider
.acceptAndRejectRecievedRequests(id, stauts) .acceptAndRejectRecievedRequests(id, stauts)
.then((result) => { .then((result) => {
sharedPref.remove(FAMILY_FILE), sharedPref.remove(FAMILY_FILE),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
@ -19,6 +20,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
class MyFamily extends StatefulWidget { class MyFamily extends StatefulWidget {
final bool isAppbarVisible;
MyFamily({this.isAppbarVisible =true});
@override @override
_MyFamily createState() => _MyFamily(); _MyFamily createState() => _MyFamily();
} }
@ -38,65 +41,66 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
bool expandFlag = false; bool expandFlag = false;
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( // return Scaffold(
appBar: AppBar( // appBar: AppBar(
bottom: TabBar( // bottom: TabBar(
indicatorColor: Colors.red, // indicatorColor: Colors.red,
tabs: [ // tabs: [
Padding( // Padding(
padding: EdgeInsets.all(6), // padding: EdgeInsets.all(6),
child: AppText( // child: AppText(
TranslationBase.of(context).family, // TranslationBase.of(context).family,
color: Colors.white, // color: Colors.white,
)), // )),
Padding( // Padding(
padding: EdgeInsets.all(6), // padding: EdgeInsets.all(6),
child: AppText( // child: AppText(
TranslationBase.of(context).request, // TranslationBase.of(context).request,
color: Colors.white, // color: Colors.white,
)), // )),
], // ],
controller: _tabController, // controller: _tabController,
), // ),
title: AppText(TranslationBase.of(context).myFamilyFiles, //
color: Colors.white)), // ),
body: TabBarView( // body: TabBarView(
// physics: NeverScrollableScrollPhysics(), // // physics: NeverScrollableScrollPhysics(),
children: [myFamilyDetails(context), myFamilyRequest(context)], // children: [myFamilyDetails(context), myFamilyRequest(context)],
controller: _tabController), // controller: _tabController),
bottomNavigationBar: BottomBarSearch()); // );
// //bottomNavigationBar: BottomBarSearch());
// AppScaffold( return AppScaffold(
// appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
// isShowAppBar: true, isShowAppBar: widget.isAppbarVisible,
// body: SingleChildScrollView( body: SingleChildScrollView(
// child: Container( child: Container(
// height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
// width: SizeConfig.realScreenWidth, width: SizeConfig.realScreenWidth,
// padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
// child: Stack( child: Stack(
// children: <Widget>[ children: <Widget>[
// TabBar( TabBar(
// controller: _tabController, controller: _tabController,
// indicatorColor: Colors.red, indicatorColor: Colors.red,
// tabs: [ tabs: [
// Padding( Padding(
// padding: EdgeInsets.all(6), padding: EdgeInsets.all(6),
// child: Text(TranslationBase.of(context).family)), child: Text(TranslationBase.of(context).family)),
// Padding( Padding(
// padding: EdgeInsets.all(6), padding: EdgeInsets.all(6),
// child: Text(TranslationBase.of(context).request)), child: Text(TranslationBase.of(context).request)),
// ], ],
// ), ),
// TabBarView( TabBarView(
// controller: _tabController, controller: _tabController,
// children: [ children: [
// myFamilyDetails(context), myFamilyDetails(context),
// myFamilyRequest(context) myFamilyRequest(context)
// ], ],
// ) )
// ], ],
// )))); ))));
} }
Widget myFamilyDetails(context) { Widget myFamilyDetails(context) {
@ -218,22 +222,176 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
Widget myFamilyRequest(context) { Widget myFamilyRequest(context) {
return Padding( return //Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0), // padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column( // child:
children: <Widget>[ SingleChildScrollView(
// SizedBox(height: 20.0), child: Container(
RoundedContainer( height: MediaQuery.of(context).size.height,
child: ExpansionTile( margin: EdgeInsets.only(top:50),
child: Column(
children: <Widget>[
RoundedContainer(
child: ExpansionTile(
title: Text(
TranslationBase.of(context).userViewRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getUserViewRequest(), // async work
builder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
child: Text(TranslationBase.of(context)
.request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context)
.switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context)
.deleteView,
)),
],
),
Column(children: [
Row(children: [
Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Allow')),
Expanded(flex: 1, child: AppText('Reject')),
]),
Column(
children:familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child:
Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.check_circle,
color: Colors.black,
),
onPressed: () {
acceptRequest(
result, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteRequest(
result, context);
},
))
],
));
}).toList())
])
],
);
}
})
],
),
),
RoundedContainer(
child: ExpansionTile(
title: Text( title: Text(
TranslationBase.of(context).userViewRequest, TranslationBase.of(context).sentRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
), ),
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
future: getUserViewRequest(), // async work future: getSentRequest(), // async work
builder: (BuildContext context, builder: (BuildContext context,
AsyncSnapshot<dynamic> snapshot) { AsyncSnapshot<GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return SingleChildScrollView(
child: Container(
height: SizeConfig.screenHeight * .3,
child: ListView(
children: snapshot
.data.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child:
Text(result.patientName)),
Expanded(
flex: 2,
child: AppText(
result.statusDescription,
color: Colors.red,
)),
],
));
}).toList(),
)));
}
})
],
)),
RoundedContainer(
child: ExpansionTile(
title: Text(
TranslationBase.of(context).userView,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getUserViewRequest(), // async work
builder:
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) { switch (snapshot.connectionState) {
case ConnectionState.waiting: case ConnectionState.waiting:
return Padding( return Padding(
@ -253,31 +411,27 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 3, flex: 3,
child: Text(TranslationBase.of(context) child: Text(
.request)), TranslationBase.of(context).request)),
Expanded( Expanded(
flex: 2, flex: 2,
child: Text( child: Text(
TranslationBase.of(context) TranslationBase.of(context).switchUser,
.switchUser,
)), )),
Expanded( Expanded(
flex: 1, flex: 1,
child: Text( child: Text(
TranslationBase.of(context) TranslationBase.of(context).deleteView,
.deleteView,
)), )),
], ],
), ),
Column(children: [ Column(children: [
Row(children: [ Row(children: [
Expanded(flex: 3, child: AppText('Name')), Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Allow')), Expanded(flex: 1, child: AppText('Delete')),
Expanded(flex: 1, child: AppText('Reject')),
]), ]),
Column( Column(
children: snapshot children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
.data['GetAllPendingRecordsList']
.map<Widget>((result) { .map<Widget>((result) {
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -285,20 +439,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 3, flex: 3,
child: child: Text(result.patientName)),
Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.check_circle,
color: Colors.black,
),
onPressed: () {
acceptRequest(
result, context);
},
)),
Expanded( Expanded(
flex: 1, flex: 1,
child: IconButton( child: IconButton(
@ -310,7 +451,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
deleteRequest( deleteRequest(
result, context); result, context);
}, },
)) )),
], ],
)); ));
}).toList()) }).toList())
@ -320,143 +461,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
}) })
], ],
), ))
), ],
RoundedContainer( ),
child: ExpansionTile(
title: Text(
TranslationBase.of(context).sentRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getSentRequest(), // async work
builder: (BuildContext context,
AsyncSnapshot<GetAllSharedRecordsByStatusResponse>
snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return SingleChildScrollView(
child: Container(
height: SizeConfig.screenHeight * .3,
child: ListView(
children: snapshot
.data.getAllSharedRecordsByStatusList
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child:
Text(result.patientName)),
Expanded(
flex: 2,
child: AppText(
result.statusDescription,
color: Colors.red,
)),
],
));
}).toList(),
)));
}
})
],
)),
RoundedContainer(
child: ExpansionTile(
title: Text(
TranslationBase.of(context).userView,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
children: <Widget>[
FutureBuilder(
future: getUserViewRequest(), // async work
builder:
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(
padding: EdgeInsets.only(top: 50),
child: Text('Loading....'));
default:
if (snapshot.hasError)
return Padding(
padding: EdgeInsets.all(10),
child: Text('No data found'));
else
return Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
child: Text(
TranslationBase.of(context).request)),
Expanded(
flex: 2,
child: Text(
TranslationBase.of(context).switchUser,
)),
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).deleteView,
)),
],
),
Column(children: [
Row(children: [
Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Delete')),
]),
Column(
children: snapshot
.data['GetAllPendingRecordsList']
.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deleteRequest(
result, context);
},
)),
],
));
}).toList())
])
],
);
}
})
],
))
],
), ),
); );
} }
@ -512,17 +519,19 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
switchUser(user, context) { switchUser(user, context) {
Utils.showProgressDialog(context); GifLoaderDialogUtils.showMyDialog(context);
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user) .silentLoggin(user)
.then((value) => loginAfter(value, context)); .then((value) => loginAfter(value, context));
} }
loginAfter(result, context) { loginAfter(result, context) async{
Utils.hideProgressDialog(); GifLoaderDialogUtils.hideDialog(context);
var familyFile = await sharedPref.getObject(FAMILY_FILE);
result = CheckActivationCode.fromJson(result); result = CheckActivationCode.fromJson(result);
this.sharedPref.clear(); this.sharedPref.clear();
this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);

@ -0,0 +1,103 @@
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart';
class NotificationsDetailsPage extends StatelessWidget {
final GetNotificationsResponseModel notification;
NotificationsDetailsPage({this.notification});
getDateForm(String date) {
DateTime d = DateUtil.convertStringToDate(date);
String monthName = DateUtil.getMonth(d.month).toString();
TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
String minute = timeOfDay.minute < 10
? timeOfDay.minute.toString().padLeft(2, '0')
: timeOfDay.minute.toString();
String hour = '${timeOfDay.hourOfPeriod}:$minute';
if (timeOfDay.period == DayPeriod.am) {
hour = hour + "AM";
} else {
{
hour = hour + "PM";
}
}
return monthName + ',${d.day},${d.year}, $hour';
}
@override
Widget build(BuildContext context) {
return BaseView<NotificationViewModel>(
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).notificationDetails,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
SizedBox(
height: 25,
),
Container(
// margin: EdgeInsets.only(left: 30),
width: double.infinity,
color: Colors.grey[400],
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
getDateForm(notification.createdOn),
fontSize: 16,
),
),
),
SizedBox(
height: 15,
),
if (notification.messageTypeData.length != 0)
FractionallySizedBox(
widthFactor: 0.9,
child: Image.network(notification.messageTypeData,
loadingBuilder: (BuildContext context, Widget child,
ImageChunkEvent loadingProgress) {
if (loadingProgress == null) return child;
return Center(
child: SizedBox(
width: 40.0,
height: 40.0,
child: AppCircularProgressIndicator(),
),
);
},
fit: BoxFit
.fill) //Image.network(notification.messageTypeData),
),
SizedBox(
height: 15,
),
Row(
children: [
Expanded(
child: Center(
child: Texts(notification.message),
),
),
],
),
],
),
),
),
),
),
);
}
}

@ -0,0 +1,148 @@
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
// ignore: must_be_immutable
class NotificationsPage extends StatelessWidget {
getDateForm(String date) {
DateTime d = DateUtil.convertStringToDate(date);
String monthName = DateUtil.getMonth(d.month).toString();
TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute);
String minute = timeOfDay.minute < 10
? timeOfDay.minute.toString().padLeft(2, '0')
: timeOfDay.minute.toString();
String hour = '${timeOfDay.hourOfPeriod}:$minute';
if (timeOfDay.period == DayPeriod.am) {
hour = hour + "AM";
} else {
{
hour = hour + "PM";
}
}
//DayPeriod.am
return monthName + ',${d.day},${d.year}, $hour';
}
int currentIndex = 0;
@override
Widget build(BuildContext context) {
var prescriptionReport;
return BaseView<NotificationViewModel>(
onModelReady: (model) {
GetNotificationsRequestModel getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
model.getNotifications(getNotificationsRequestModel, context);
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).notifications,
baseViewModel: model,
body: ListView(
children: model.notifications
.map(
(notification) => InkWell(
onTap: () async {
if(!notification.isRead)
model.markAsRead(notification.id);
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
NotificationsDetailsPage(
notification: notification,
)));
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 5, left: 10, right: 10, bottom: 5),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: notification.isRead
? Colors.grey[200]
: Theme.of(context).primaryColor,
width: 0.5),
),
child: Row(
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(getDateForm(notification.createdOn)),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
child: Texts(notification.message)),
if (notification.messageType == "image")
Icon(FontAwesomeIcons.images)
],
),
SizedBox(
height: 5,
),
],
),
),
),
SizedBox(
width: 15,
),
],
),
),
),
)
.toList()
..add(
InkWell(
onTap: () async {
GifLoaderDialogUtils.showMyDialog(
context);
currentIndex++;
GetNotificationsRequestModel
getNotificationsRequestModel =
new GetNotificationsRequestModel(
currentPage: currentIndex,
pagingSize: 14,
notificationStatusID: 2);
await model.getNotifications(getNotificationsRequestModel,context);
GifLoaderDialogUtils.hideDialog(
context);
},
child: Center(
child: Image.asset('assets/images/notf.png'),
),
),
)),
),
);
}
}

@ -1,15 +1,19 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.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/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:provider/provider.dart';
class MyAppointments extends StatefulWidget { class MyAppointments extends StatefulWidget {
List<AppoitmentAllHistoryResultList> appoList = []; List<AppoitmentAllHistoryResultList> appoList = [];
@ -33,11 +37,15 @@ class _MyAppointmentsState extends State<MyAppointments>
bool isDataLoaded = false; bool isDataLoaded = false;
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
WidgetsBinding.instance WidgetsBinding.instance.addPostFrameCallback((_) {
.addPostFrameCallback((_) => getPatientAppointmentHistory()); if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory();
});
super.initState(); super.initState();
} }
@ -77,14 +85,21 @@ class _MyAppointmentsState extends State<MyAppointments>
} }
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
widget.appoList.clear(); widget.appoList.clear();
widget.bookedAppoList.clear(); widget.bookedAppoList.clear();
widget.confirmedAppoList.clear(); widget.confirmedAppoList.clear();
widget.arrivedAppoList.clear(); widget.arrivedAppoList.clear();
widget._patientBookedAppointmentListHospital.clear();
widget._patientConfirmedAppointmentListHospital.clear();
widget._patientArrivedAppointmentListHospital.clear();
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length); print(res['AppoimentAllHistoryResultList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
@ -100,11 +115,11 @@ class _MyAppointmentsState extends State<MyAppointments>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
Navigator.of(context).pop(); Navigator.of(context).pop();
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
bool isConfirmed(AppoitmentAllHistoryResultList appo) { bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@ -228,91 +243,57 @@ class _MyAppointmentsState extends State<MyAppointments>
Widget getBookedAppointments() { Widget getBookedAppointments() {
return Container( return Container(
child: Container(
child: widget.bookedAppoList.length != 0 child: widget.bookedAppoList.length != 0
? new ListView.builder( ? SingleChildScrollView(
itemCount: widget.bookedAppoList.length, physics: BouncingScrollPhysics(),
itemBuilder: (context, i) { child: Column(
return AppointmentCard( children: <Widget>[
appo: widget.bookedAppoList[i], ...List.generate(
onReloadAppointmentHistory: getPatientAppointmentHistory, widget._patientBookedAppointmentListHospital.length,
); (index) => AppExpandableNotifier(
}, title: widget
._patientBookedAppointmentListHospital[index]
.filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget
._patientBookedAppointmentListHospital[index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)),
)
],
),
) )
: Container( : Container(
child: Center( child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
// Image.asset( Image.asset(
// "assets/images/new-design/noAppointmentIcon.png"), "assets/images/new-design/noAppointmentIcon.png"),
// Container( Container(
// margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
// child: Text(TranslationBase.of(context).noBookedAppointments, child: Text("No Booked Appointments",
// style: TextStyle( style: TextStyle(
// fontSize: 16.0, fontSize: 16.0,
// )), )),
// ), ),
Container( ],
margin: EdgeInsets.only(top: 10.0), ),
child: Container( ),
child: widget.bookedAppoList.length != 0 ),
? SingleChildScrollView( ),
physics: BouncingScrollPhysics(), );
child: Column(
children: <Widget>[
...List.generate(
widget._patientBookedAppointmentListHospital
.length,
(index) => AppExpandableNotifier(
title: widget
._patientBookedAppointmentListHospital[
index]
.filterName,
bodyWidget: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: widget
._patientBookedAppointmentListHospital[
index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)),
)
],
),
)
: Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
"assets/images/new-design/noAppointmentIcon.png"),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("No Booked Appointments",
style: TextStyle(
fontSize: 16.0,
)),
),
],
),
),
),
),
)
],
))));
} }
Widget getConfirmedAppointments() { Widget getConfirmedAppointments() {

@ -18,12 +18,12 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_p
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget { class AppointmentActions extends StatefulWidget {
@ -94,7 +94,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
child: Text(e.title, child: Text(e.title,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: new Color(0xFFc5272d), color: new Color(0xFF40ACC9),
letterSpacing: 1.0, letterSpacing: 1.0,
fontSize: 20.0)), fontSize: 20.0)),
), ),
@ -351,49 +351,49 @@ class _AppointmentActionsState extends State<AppointmentActions> {
cancelAppointment() { cancelAppointment() {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.cancelAppointment(widget.appo, context).then((res) {
.cancelAppointment(widget.appo, context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { print(res);
print(res); if (res['MessageStatus'] == 1) {
if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); Navigator.of(context).pop();
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}) }).catchError((err) {
.catchError((err) { GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}) });
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.of(context).pop();
});
} }
openAppointmentRadiology() { openAppointmentRadiology() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology(); FinalRadiology finalRadiology = new FinalRadiology();
service service
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context) .getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']); print(res['FinalRadiologyList']);
finalRadiology = finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]); new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData); print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology); navigateToRadiologyDetails(finalRadiology);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
openPrescriptionReport() { openPrescriptionReport() {
GifLoaderDialogUtils.showMyDialog(context);
List<PrescriptionReportEnh> prescriptionReportEnhList = List(); List<PrescriptionReportEnh> prescriptionReportEnhList = List();
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) { service.getPatientPrescriptionReports(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) { res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
}); });
@ -405,10 +405,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
AppToast.showErrorToast(message: "Sorry there is no data"); AppToast.showErrorToast(message: "Sorry there is no data");
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToMedicinePrescriptionReport( Future navigateToMedicinePrescriptionReport(
@ -463,8 +463,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
askYourDoc() { askYourDoc() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.isAllowedToAskDoctor(widget.appo.doctorID, context).then((res) { service.isAllowedToAskDoctor(widget.appo.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['PatientDoctorAppointmentResultList']); print(res['PatientDoctorAppointmentResultList']);
if (res['PatientDoctorAppointmentResultList'].length != 0) { if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType(); getCallRequestType();
@ -473,15 +475,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
message: TranslationBase.of(context).askDocNotAllowed); message: TranslationBase.of(context).askDocNotAllowed);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getCallRequestType() { getCallRequestType() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getCallRequestType(context).then((res) { service.getCallRequestType(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
List<AskDocRequestType> requestData = new List<AskDocRequestType>(); List<AskDocRequestType> requestData = new List<AskDocRequestType>();
res['ListReqTypes'].forEach((element) { res['ListReqTypes'].forEach((element) {
requestData.add(new AskDocRequestType.fromJson(element)); requestData.add(new AskDocRequestType.fromJson(element));
@ -490,9 +494,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
showAskDocRequestDialog(requestData); showAskDocRequestDialog(requestData);
}); });
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
showAskDocRequestDialog(List<AskDocRequestType> requestData) { showAskDocRequestDialog(List<AskDocRequestType> requestData) {
@ -525,28 +529,32 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
sendAskDocRequest(int requestType) { sendAskDocRequest(int requestType) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.sendAskDocCallRequest(widget.appo, requestType.toString(), context) .sendAskDocCallRequest(widget.appo, requestType.toString(), context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully"); AppToast.showSuccessToast(message: "Request Sent Successfully");
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
confirmAppointment() { confirmAppointment() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, .confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
widget.appo.projectID, widget.appo.isLiveCareAppointment, context) widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -554,9 +562,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
navigateToInsuranceApprovals(int appoNo) { navigateToInsuranceApprovals(int appoNo) {

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -7,10 +9,10 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dar
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/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';
@ -18,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ToDo extends StatefulWidget { class ToDo extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
@ -34,13 +35,15 @@ class _ToDoState extends State<ToDo> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser; AuthenticatedUser authUser;
AuthProvider authProvider = new AuthProvider(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
widget.patientShareResponse = new PatientShareResponse(); widget.patientShareResponse = new PatientShareResponse();
WidgetsBinding.instance WidgetsBinding.instance.addPostFrameCallback((_) {
.addPostFrameCallback((_) => getPatientAppointmentHistory()); if (authenticatedUserObject.isLogin) getPatientAppointmentHistory();
});
super.initState(); super.initState();
} }
@ -82,7 +85,7 @@ class _ToDoState extends State<ToDo> {
height: 20.0), height: 20.0),
Container( Container(
margin: margin:
EdgeInsets.only(left: 5.0, right: 25.0), EdgeInsets.only(left: 5.0, right: 20.0),
child: Text( child: Text(
getDate(widget getDate(widget
.appoList[index].appointmentDate), .appoList[index].appointmentDate),
@ -106,7 +109,14 @@ class _ToDoState extends State<ToDo> {
TranslationBase.of(context) TranslationBase.of(context)
.liveCareAppo, .liveCareAppo,
style: TextStyle(fontSize: 12.0)) style: TextStyle(fontSize: 12.0))
: Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-", : Text(
widget.appoList[index].projectName !=
null
? widget
.appoList[index].projectName
: "-",
overflow: TextOverflow.clip,
maxLines: 2,
style: TextStyle(fontSize: 11.0)), style: TextStyle(fontSize: 11.0)),
), ),
], ],
@ -253,7 +263,7 @@ class _ToDoState extends State<ToDo> {
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.red[600], color: new Color(0xFF40ACC9),
decoration: decoration:
TextDecoration.underline)), TextDecoration.underline)),
), ),
@ -416,7 +426,7 @@ class _ToDoState extends State<ToDo> {
} }
getLanguageID() async { getLanguageID() async {
var languageID = await sharedPref.getString(APP_LANGUAGE); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() { setState(() {
widget.languageID = languageID; widget.languageID = languageID;
}); });
@ -464,8 +474,10 @@ class _ToDoState extends State<ToDo> {
} }
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistory(true, context).then((res) { service.getPatientAppointmentHistory(true, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
@ -485,26 +497,30 @@ class _ToDoState extends State<ToDo> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getPatientShare(context, AppoitmentAllHistoryResultList appo) { getPatientShare(context, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, .getPatientShare(appo.appointmentNo.toString(), appo.clinicID,
appo.projectID, context) appo.projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse); openPaymentDialog(appo, widget.patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getAppoQR(context, AppoitmentAllHistoryResultList appo) { getAppoQR(context, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
PatientShareResponse patientShareResponse = new PatientShareResponse(); PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj; patientShareResponse.doctorNameObj = appo.doctorNameObj;
@ -518,12 +534,13 @@ class _ToDoState extends State<ToDo> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.generateAppointmentQR(patientShareResponse, context).then((res) { service.generateAppointmentQR(patientShareResponse, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
navigateToQR(context, res['AppointmentQR'], patientShareResponse); navigateToQR(context, res['AppointmentQR'], patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToQR( Future navigateToQR(
@ -620,6 +637,7 @@ class _ToDoState extends State<ToDo> {
} }
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.checkPaymentStatus( .checkPaymentStatus(
@ -627,8 +645,7 @@ class _ToDoState extends State<ToDo> {
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
context) context)
.then((res) { .then((res) {
print("Printing Payment Status Reponse!!!!"); GifLoaderDialogUtils.hideDialog(context);
print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') { if (paymentInfo == 'Success') {
createAdvancePayment(res, appo); createAdvancePayment(res, appo);
@ -636,18 +653,20 @@ class _ToDoState extends State<ToDo> {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
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, res['Amount'], res['Fort_id'], res['PaymentMethod'], context) appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest( addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
@ -656,23 +675,25 @@ class _ToDoState extends State<ToDo> {
appo); appo);
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( GifLoaderDialogUtils.hideDialog(context);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); });
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) { String appointmentID, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.addAdvancedNumberRequest( .addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, context) advanceNumber, paymentReference, appointmentID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
getAppoQR(context, appo); getAppoQR(context, appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToPaymentMethod( Future navigateToPaymentMethod(
@ -705,51 +726,46 @@ class _ToDoState extends State<ToDo> {
} }
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.isLiveCareAppointment, context) appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); if (res['MessageStatus'] == 1) {
getPatientAppointmentHistory(); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else { if (appo.isLiveCareAppointment) {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); insertLiveCareVIDARequest(appo);
} } else {
}) getPatientAppointmentHistory();
.catchError((err) { }
print(err); } else {
}) AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
.showProgressBar( }
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) }).catchError((err) {
.then((value) { GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment) { print(err);
insertLiveCareVIDARequest(appo); });
} else {
getPatientAppointmentHistory();
}
});
} }
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context) appo.serviceID, appo.doctorID, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); if (res['MessageStatus'] == 1) {
} else { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); getPatientAppointmentHistory();
} } else {
}) AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
.catchError((err) { }
print(err); }).catchError((err) {
}) print(err);
.showProgressBar( GifLoaderDialogUtils.hideDialog(context);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
getPatientAppointmentHistory();
});
} }
} }

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class PaymentMethod extends StatefulWidget { class PaymentMethod extends StatefulWidget {
@override @override
@ -93,35 +94,6 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
), ),
// Expanded(
// child: Container(
// child: InkWell(
// onTap: () {
// updateSelectedPaymentMethod("SADAD");
// },
// child: Card(
// elevation: 3.0,
// margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
// color: Colors.white,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10),
// side: selectedPaymentMethod == "SADAD"
// ? BorderSide(
// color: Colors.green, width: 5.0)
// : BorderSide(
// color: Colors.transparent, width: 0.0),
// ),
// child: Container(
// height: 120.0,
// padding: EdgeInsets.all(7.0),
// width: MediaQuery.of(context).size.width * 0.45,
// child: Image.asset(
// "assets/images/new-design/sadad.png"),
// ),
// ),
// ),
// ),
// ),
], ],
), ),
), ),
@ -195,9 +167,44 @@ class _PaymentMethodState extends State<PaymentMethod> {
margin: EdgeInsets.only(top: 25.0), margin: EdgeInsets.only(top: 25.0),
child: Flex( child: Flex(
direction: Axis.horizontal, direction: Axis.horizontal,
children: <Widget>[], children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "ApplePay"
? BorderSide(
color: Colors.green, width: 5.0)
: BorderSide(
color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(20.0),
child: SvgPicture.asset(
"assets/images/new-design/applepay.svg"),
),
),
),
),
),
Expanded(
child: Container(),
),
],
), ),
), ),
SizedBox(
height: 150.0,
),
], ],
), ),
), ),

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

Loading…
Cancel
Save