Conflicts:
	ios/Flutter/.last_build_id
	lib/config/config.dart
	lib/config/localized_values.dart
	lib/config/shared_pref_kay.dart
	lib/core/service/client/base_app_client.dart
	lib/core/service/medical/prescriptions_service.dart
	lib/core/viewModels/project_view_model.dart
	lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
	lib/pages/BookAppointment/BookConfirm.dart
	lib/pages/BookAppointment/DoctorProfile.dart
	lib/pages/DrawerPages/family/my-family.dart
	lib/pages/MyAppointments/MyAppointments.dart
	lib/pages/MyAppointments/models/ArrivedButtons.dart
	lib/pages/MyAppointments/widgets/AppointmentActions.dart
	lib/pages/MyAppointments/widgets/AppointmentCardView.dart
	lib/pages/ToDoList/ToDo.dart
	lib/pages/feedback/send_feedback_page.dart
	lib/pages/insurance/insurance_approval_screen.dart
	lib/pages/insurance/insurance_card_screen.dart
	lib/pages/landing/home_page.dart
	lib/pages/landing/landing_page.dart
	lib/pages/login/confirm-login.dart
	lib/pages/login/login.dart
	lib/pages/medical/balance/my_balance_page.dart
	lib/pages/medical/labs/laboratory_result_page.dart
	lib/pages/medical/labs/labs_home_page.dart
	lib/pages/medical/medical_profile_page.dart
	lib/pages/medical/patient_sick_leave_page.dart
	lib/pages/medical/prescriptions/prescription_details_page.dart
	lib/pages/medical/prescriptions/prescription_items_page.dart
	lib/pages/medical/radiology/radiology_details_page.dart
	lib/pages/medical/radiology/radiology_home_page.dart
	lib/pages/medical/reports/report_home_page.dart
	lib/pages/medical/reports/reports_page.dart
	lib/pages/pharmacies/pharmacies_list_screen.dart
	lib/pages/settings/profile_setting.dart
	lib/services/authentication/auth_provider.dart
	lib/uitl/translations_delegate_base.dart
	lib/widgets/buttons/floatingActionButton.dart
	lib/widgets/data_display/medical/LabResult/LabResultWidget.dart
	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
	lib/widgets/data_display/medical/doctor_card.dart
	lib/widgets/drawer/app_drawer_widget.dart
	lib/widgets/others/app_scaffold_widget.dart
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit aa89a05f1d

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -38,9 +38,12 @@ const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionR
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
/// ///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
@ -100,6 +103,8 @@ const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_G
///Reports ///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
@ -205,11 +210,11 @@ 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 = 2; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 2; const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = ""; var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 1;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";

@ -76,10 +76,18 @@ const Map localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'}, 'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, 'cancelAppoMsg': {
'en': 'Are you sure you want to cancel this appointment?',
'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'
},
'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'},
'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'}, 'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'},
"book-success-confirm-more-24-1-2": {
"en":
"The online payment process will be available 24 hours before the appointment.",
"ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."
},
'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'}, 'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'},
'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'}, 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'},
'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'}, 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'},
@ -101,27 +109,54 @@ const Map localizedValues = {
'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'}, 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'}, 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
"welcome": {"en": "Welcome", "ar": "مرحبا"}, "welcome": {"en": "Welcome", "ar": "مرحبا"},
"welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"}, "welcome_text": {
'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'}, "en": "Dr. Sulaiman Al Habib Mobile Application",
"ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"
},
'welcome_text2': {
'en': 'Have you visited AlHabib Medical Group before? ',
'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'
},
'yes': {'en': 'Yes', 'ar': 'نعم'}, 'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'}, 'no': {'en': 'No', 'ar': 'لا'},
"logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."}, "logintyperadio": {
"en": "Choose from below options to login to your medical file.",
"ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."
},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"}, "registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"}, "nationalID": {
"en": "Enter the Identification Number",
"ar": "أدخل رقم الهوية الوطنية او الاقامة"
},
"national-id": {"en": "National ID", "ar": "رقم الهوية"}, "national-id": {"en": "National ID", "ar": "رقم الهوية"},
"fileNo": {"en": "File Number", "ar": "رقم الملف"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "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": "نسيت رقم الملف"}, "forgotFileNoTitle": {
"en": "Forgot medical file Number",
"ar": "نسيت رقم الملف"
},
"enter-national-id": {"en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"}, "enter-national-id": {
"profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"}, "en": "Please enter mobile number and identification number",
"ar": "الرجاء إدخال رقم الجوال ورقم الهوية"
},
"profile-info": {
"en": "Please enter profile information",
"ar": "الرجاء إدخال معلومات الملف الشخصي"
},
"submit": {"en": "Submit", "ar": "ارسال"}, "submit": {"en": "Submit", "ar": "ارسال"},
"forgot-desc": {"en": "Enter the mobile number to receive the Medical file Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"}, "forgot-desc": {
"en": "Enter the mobile number to receive the Medical file Number via SMS",
"ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"
},
"dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"}, "dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"},
"hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"}, "hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"},
"gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"}, "gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"},
"verify-login-with": {"en": "Please choose one of the following options to verify", "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"}, "verify-login-with": {
"en": "Please choose one of the following options to verify",
"ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"
},
"register-user": {"en": "Register", "ar": "تسجيل"}, "register-user": {"en": "Register", "ar": "تسجيل"},
"verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"},
"verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"},
@ -130,18 +165,32 @@ const Map localizedValues = {
"last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
"last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"verify-fingerprint": { "verify-fingerprint": {
"en": "To activate the fingerprint login service, please verify data by using one of the following options.", "en":
"ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" "To activate the fingerprint login service, please verify data by using one of the following options.",
"ar":
"لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
}, },
'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'}, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'}, 'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدلايات'},
'searchMedicineHere': {'en': 'Search Medicine Here', 'ar': 'ابحث عن الدواء هنا'}, 'searchMedicineHere': {
'en': 'Search Medicine Here',
'ar': 'ابحث عن الدواء هنا'
},
'description': {'en': 'Description', 'ar': 'الوصف'}, 'description': {'en': 'Description', 'ar': 'الوصف'},
'price': {'en': 'Price', 'ar': 'السعر'}, 'price': {'en': 'Price', 'ar': 'السعر'},
'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'}, 'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنكة ان تجده في'},
'pleaseEnterMedicineName': {'en': 'Please Enter Medicine Name', 'ar': 'الرجائ ادخال اسم الدواء'}, 'pleaseEnterMedicineName': {
"verification_message": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, 'en': 'Please Enter Medicine Name',
"validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"}, 'ar': 'الرجائ ادخال اسم الدواء'
},
"verification_message": {
"en": "Please enter the Verification Code sent to",
"ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى"
},
"validation_message": {
"en": "The verification code expires in",
"ar": "تنتهي صلاحية رمز التحقق خلال"
},
"arabic-change": {"en": "عربي", "ar": "English"}, "arabic-change": {"en": "عربي", "ar": "English"},
"notification": {"en": "Notifications", "ar": "إشعارات"}, "notification": {"en": "Notifications", "ar": "إشعارات"},
"app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"}, "app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"},
@ -149,31 +198,80 @@ const Map localizedValues = {
"before": {"en": "Before", "ar": "قبل"}, "before": {"en": "Before", "ar": "قبل"},
"minute": {"en": "Minutes", "ar": "دقيقة"}, "minute": {"en": "Minutes", "ar": "دقيقة"},
"hour": {"en": "Hour", "ar": "ساعة"}, "hour": {"en": "Hour", "ar": "ساعة"},
"reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"}, "reminderSuccess": {
"patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "en": "The reminder has been added successfully",
"ar": "يضاف التذكير بنجاح"
},
"patientShareToDo": {
"en": "Amount before tax: ",
"ar": "المبلغ قبل الضريبة:"
},
"patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"},
"patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, "patientShareTotalToDo": {
"en": "Total amount Due: ",
"ar": "المبلغ الإجمالي المستحق:"
},
'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'},
'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, 'noNeedToWaitInLine': {
'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, 'en': 'No need to stand in line.',
'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, 'ar': 'لا داعي للوقوف في الطابور.'
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, },
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, 'useQRAppoAttend': {
'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'}, 'en': 'Use the QR code to register the appointment attendance.',
'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'
},
'passQRAppoAttend': {
'en':
'Pass the QR code through the attendance devices available in the Hospital.',
'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'
},
'sitWaitingQR': {
'en': 'Sit in the waiting rooms until called by the nurse.',
'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'
},
'attendRegisterCode': {
'en': 'Attendance registration code',
'ar': 'رمز تسجيل الحضور'
},
'scanQRHospital': {
'en': 'Scan above QR Code to Check-In on the Machine in Hospital',
'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'
},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, "EmailSentSuccessfully": {
"en": "Email Sent Successfully",
"ar": "تم إرسال البريد الإلكتروني بنجاح"
},
"close": {"en": "Close", "ar": "مغلق"}, "close": {"en": "Close", "ar": "مغلق"},
"booked": {"en": "Booked", "ar": "محجوز"}, "booked": {"en": "Booked", "ar": "محجوز"},
"confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"},
"arrived": {"en": "Arrived", "ar": "تم الحضور"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"},
"payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, "payNowBookSuccess": {
"payNowBookSuccesstext1": {"en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"}, "en": "Pay now via Al Habib App",
"payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"}, "ar": "ادفع الآن عبر تطبيق الحبيب"
},
"payNowBookSuccesstext1": {
"en": "Pay Now using online payment service From secure payment gateways",
"ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"
},
"payNowBookSuccesstext2": {
"en": "You can also Pay Later via online payment Or in Hospital",
"ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"
},
'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'}, 'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'},
'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, 'askDocNotAllowed': {
"more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"}, 'en': 'This service will be available for last 15 days doctor Visit only',
'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'
},
"more-verify": {
"en": "More Verification Options",
"ar": "المزيد من خيارات التحقق"
},
"welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"}, "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
"account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"}, "account-info": {
"en": "Would you like to login with current username?",
"ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"
},
"another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"}, "another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"},
"next": {"en": "Next", "ar": 'التالى'}, "next": {"en": "Next", "ar": 'التالى'},
"first-name": {"en": "First Name", "ar": "الاسم الأول"}, "first-name": {"en": "First Name", "ar": "الاسم الأول"},
@ -184,7 +282,10 @@ const Map localizedValues = {
"preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"}, "preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"},
"english": {"en": "English", "ar": "الإنجليزية"}, "english": {"en": "English", "ar": "الإنجليزية"},
"arabic": {"en": "Arabic", "ar": "العربية"}, "arabic": {"en": "Arabic", "ar": "العربية"},
"locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"}, "locations-register": {
"en": "Where do you want to create this file?",
"ar": "أين تريد فتح هذا الملف؟"
},
"ksa": {"en": "KSA", "ar": "السعودية"}, "ksa": {"en": "KSA", "ar": "السعودية"},
"dubai": {"en": "Dubai", "ar": "دبي"}, "dubai": {"en": "Dubai", "ar": "دبي"},
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"}, "enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
@ -214,7 +315,7 @@ const Map localizedValues = {
"reject-view": {"en": "Reject", "ar": "رفض"}, "reject-view": {"en": "Reject", "ar": "رفض"},
"delete-view": {"en": "Delete", "ar": "حذف"}, "delete-view": {"en": "Delete", "ar": "حذف"},
// "my-family": {"en": "MY FAMILY", "ar": "عائلتي"}, // "my-family": {"en": "MY FAMILY", "ar": "عائلتي"},
"approvals": {"en": "Approvals", "ar": "موفقات التأمين"}, "approvals": {"en": "Approvals", "ar": "موافقات التأمين"},
"approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "}, "approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "},
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "}, "receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "},
@ -223,7 +324,10 @@ const Map localizedValues = {
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"}, "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
"totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, "totalApproval": {
"en": "Total approval unused",
"ar": "اجمالي الموافقات الغير مستخدمة"
},
"category": {"en": "Category: ", "ar": "الفئة"}, "category": {"en": "Category: ", "ar": "الفئة"},
"expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"},
"patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"}, "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"},
@ -235,6 +339,19 @@ const Map localizedValues = {
"remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"}, "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
"myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'}, "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'},
"register-info-family": {
"en": "How would like to add the new member?",
"ar": "كيف ترغب باضافة العضو الجديد؟"
},
"remove-family-member": {
"en": "Remove this member?",
"ar": "إزالة ملف العضو؟"
},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي'},
"myMedicalFileSubTitle": {
"en": "All your medical records",
'ar': 'جميع سجلاتك الطبية'
},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'},
@ -281,9 +398,18 @@ const Map localizedValues = {
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"}, "requestA": {"en": "Request:", "ar": "اسعاف"},
"MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoBookedAppointments": {
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "en": "No Booked Appointments",
"noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"}, "ar": "لا توجد مواعيد محجوزة"
},
"NoConfirmedAppointments": {
"en": "No Confirmed Appointments",
"ar": "لا توجد مواعيد مؤكدة"
},
"noArrivedAppointments": {
"en": "No Arrived Appointments",
"ar": "لم تصل المواعيد"
},
"MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"}, "MyAppointmentsList": {"en": "List", "ar": "قائمة بمواعدي"},
"Radiology": {"en": "Radiology", "ar": "الأشعة"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"},
"RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"},
@ -333,16 +459,25 @@ const Map localizedValues = {
"LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"}, "LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"},
"BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
"Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, "Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"History": {"en": "History", "ar": "السجل"}, "History": {"en": "History", "ar": "السجلات"},
"OrderNo": {"en": "Order No", "ar": "رقم الطلب"}, "OrderNo": {"en": "Order No", "ar": "رقم الطلب"},
"OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"}, "OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"},
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
"MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
"km": {"en": "KMs:", "ar": "كم"}, "km": {"en": "KMs:", "ar": "كم"},
"PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, "PatientHealthSummaryReport": {
"ToViewTheTermsAndConditions": {"en": "To View The Terms And Conditions Report", "ar": " عرض الشروط والأحكام "}, "en": "Patient Health Summary Report",
"ar": " ملخص التقارير الشهرية"
},
"ToViewTheTermsAndConditions": {
"en": "To View The Terms And Conditions Report",
"ar": " عرض الشروط والأحكام "
},
"ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, "ClickHere": {"en": "Click here", "ar": "أنقر هنا"},
"IAgreeToTheTermsAndConditions": {"en": "I agree to the terms and conditions ", "ar": "أوافق على الشروط والاحكام "}, "IAgreeToTheTermsAndConditions": {
"en": "I agree to the terms and conditions ",
"ar": "أوافق على الشروط والاحكام "
},
"IAgreeToTheTermsAndConditionsSubtitle": { "IAgreeToTheTermsAndConditionsSubtitle": {
"en": "I agree to the terms and conditions ", "en": "I agree to the terms and conditions ",
"ar": "ar":
@ -351,8 +486,14 @@ const Map localizedValues = {
"Save": {"en": "Save", "ar": "حفظ "}, "Save": {"en": "Save", "ar": "حفظ "},
"UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "},
"UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"},
"CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "تحقق من توافر اللقاح"}, "CHECK_VACCINE_AVAILABILITY": {
"MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"}, "en": "CHECK VACCINE AVAILABILITY",
"ar": "تحقق من توافر اللقاح"
},
"MyVaccinesAvailability": {
"en": "MyVaccinesAvailability",
"ar": "توفر لقاحي"
},
"PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"},
"PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, "PaymentOnline": {"en": "Service", "ar": "الالكتروني"},
"OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"},
@ -360,6 +501,9 @@ const Map localizedValues = {
"BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"}, "BalanceAmount": {"en": "Balance Amount", "ar": "رصيدالحساب"},
"TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"}, "TotalBalance": {"en": "Total Balance", "ar": "الرصيد الكلي"},
"CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"}, "CreateAdvancedPayment": {"en": "Create Advanced Payment", "ar": "إنشاء دفعة مقدمة"},
"BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"},
"TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"},
"CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"},
"AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"},
"AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"}, "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for you account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"},
"FileNumber": {"en": "File Number", "ar": "رقم الملف"}, "FileNumber": {"en": "File Number", "ar": "رقم الملف"},
@ -376,8 +520,14 @@ const Map localizedValues = {
"DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"}, "DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"},
"MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"},
"Ok": {"en": "Ok", "ar": "حسنا"}, "Ok": {"en": "Ok", "ar": "حسنا"},
"TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires In", "ar": "تنتهي صلاحية رمز التحقق في"}, "TheVerificationCodeExpiresIn": {
"PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"}, "en": "The Verification Code Expires In",
"ar": "تنتهي صلاحية رمز التحقق في"
},
"PleaseEnterTheVerificationCode": {
"en": "Please enter the verification code send to",
"ar": "الرجاء إدخال رمز التحقق المرسل إلى"
},
"EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"}, "EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"},
"Measurements": {"en": "Measurements", "ar": "قياسات"}, "Measurements": {"en": "Measurements", "ar": "قياسات"},
"Classes": {"en": "Classes", "ar": "نظارات"}, "Classes": {"en": "Classes", "ar": "نظارات"},
@ -400,8 +550,10 @@ const Map localizedValues = {
"DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"},
"AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"},
"reminderDes": { "reminderDes": {
"en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", "en":
"ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" "Please select treatment start day and time to be notified when it\'s time to take the medicine",
"ar":
" يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"
}, },
"StartDay": {"en": "Start Day", "ar": "يوم البداية"}, "StartDay": {"en": "Start Day", "ar": "يوم البداية"},
"EndDay": {"en": "End Day", "ar": "يوم الانتهاء"}, "EndDay": {"en": "End Day", "ar": "يوم الانتهاء"},
@ -411,12 +563,24 @@ const Map localizedValues = {
"DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"}, "DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"},
"New": {"en": "New", "ar": "جديد"}, "New": {"en": "New", "ar": "جديد"},
"All": {"en": "All", "ar": "الكل"}, "All": {"en": "All", "ar": "الكل"},
"QuestionHere": {"en": "Enter the question here...", "ar": "اضف الاستفسار هنا"}, "QuestionHere": {
"ViewDoctorResponses": {"en": "View Doctor Responses", "ar": "الاطلاع على ردود الأطباء"}, "en": "Enter the question here...",
"ar": "اضف الاستفسار هنا"
},
"ViewDoctorResponses": {
"en": "View Doctor Responses",
"ar": "الاطلاع على ردود الأطباء"
},
"ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"}, "ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"},
"ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"}, "ServiceInformationTitle": {
"en": "Service Information",
"ar": "معلومات الخدمة"
},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"}, "ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
"HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "}, "HomeHealthCare": {
"en": "Home Health Care",
"ar": " الرعاية الصحية المنزلية "
},
"HomeHealthCareText": { "HomeHealthCareText": {
"en": "en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
@ -426,26 +590,59 @@ const Map localizedValues = {
"LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"}, "LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"},
"OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"}, "OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"},
"info-lab": { "info-lab": {
"en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.", "en":
"ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية." "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
"ar":
"خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
}, },
"info-radiology": { "info-radiology": {
"en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", "en":
"ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
"ar":
"خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
}, },
"TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"}, "TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"},
"Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"}, "Beforeusing": {
"accept": {"en": "I read and accept Terms of Service and Privacy Policy", "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"}, "en": "Before using the checkup, please read Terms of Service.",
"data-safe-info": {"en": "Information that you provide is anonymous and not shared with anyone.", "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"}, "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"
},
"accept": {
"en": "I read and accept Terms of Service and Privacy Policy",
"ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"
},
"data-safe-info": {
"en":
"Information that you provide is anonymous and not shared with anyone.",
"ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"
},
"data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"}, "data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"},
"informational": {"en": "Checkup is for informational purposes and is not a qualified medical opinion", "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"}, "informational": {
"not-use-in-emerbency": {"en": "Do not use in emergencies.", "ar": "لا تستخدم في حالات الطوارئ"}, "en":
"not-use-in-emerbency-details": {"en": "In case of health emergency, ", "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"}, "Checkup is for informational purposes and is not a qualified medical opinion",
"not-use-in-emerbency-details-call": {"en": "call the nearest emergency number immediately", "ar": " اتصل بأقرب رقم للطوارئ على الفور"}, "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"
"check-diagnosis": {"en": "Checkup is not a diagnosis.", "ar": "الفحص ليس تشخيص."}, },
"not-use-in-emerbency": {
"en": "Do not use in emergencies.",
"ar": "لا تستخدم في حالات الطوارئ"
},
"not-use-in-emerbency-details": {
"en": "In case of health emergency, ",
"ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"
},
"not-use-in-emerbency-details-call": {
"en": "call the nearest emergency number immediately",
"ar": " اتصل بأقرب رقم للطوارئ على الفور"
},
"check-diagnosis": {
"en": "Checkup is not a diagnosis.",
"ar": "الفحص ليس تشخيص."
},
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
"loginToUseService": {"en": "You need to login to use this service", "ar": "هذة الخدمة تتطلب تسجيل الدخول"}, "loginToUseService": {
"en": "You need to login to use this service",
"ar": "هذة الخدمة تتطلب تسجيل الدخول"
},
// pharmacy module // pharmacy module
"medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"}, "medicationRefill": {"en": "MEDICATION REFILL", "ar": "إعادة تعبئة الدواء"},
@ -536,15 +733,19 @@ const Map localizedValues = {
}, },
"info-allergies": { "info-allergies": {
"en": "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", "en":
"ar": "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." "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": "الاجازات المرضية"}, "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"},
"info-sick-leaves": { "info-sick-leaves": {
"en": "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", "en":
"ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" "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": { "info-sick-leave-points": {
"en": [ "en": [
@ -554,12 +755,20 @@ const Map localizedValues = {
"Branch that patient take the vaccination form.", "Branch that patient take the vaccination form.",
"Sending a report of vaccinations to the email. ", "Sending a report of vaccinations to the email. ",
], ],
"ar": ["اسم الطبيب", "تاريخ الاجازة.", "عدد ايام الاجازة.", "الفرع الذي تم اصدار الاجازة منه.", "ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."] "ar": [
"اسم الطبيب",
"تاريخ الاجازة.",
"عدد ايام الاجازة.",
"الفرع الذي تم اصدار الاجازة منه.",
"ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."
]
}, },
"info-approvals": { "info-approvals": {
"en": "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", "en":
"ar": "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:",
"ar":
"خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:"
}, },
"info-approval-points": { "info-approval-points": {
@ -577,18 +786,37 @@ const Map localizedValues = {
"info-month-report": { "info-month-report": {
"en": "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.", "Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.",
"ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." "ar":
"خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
},
"language-setting": {
"en": "SMS and Confirmation Calls Language",
"ar": "لغة الرسائل القصيرة و الاتصال الآلي"
}, },
"language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"},
"alert": {"en": "Alerts", "ar": "التنبيهات"}, "alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {"en": "Alert By Email", "ar": "استلام التنبيهات بالبريد الالكتروني"}, "email-alert": {
"sms-alert": {"en": "Alert By SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"}, "en": "Alert By Email",
"ar": "استلام التنبيهات بالبريد الالكتروني"
},
"sms-alert": {
"en": "Alert By SMS",
"ar": "استلام التنبيهات بالرسائل القصيرة"
},
"contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"}, "contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"},
"emrg-name": {"en": "Emergency Contact Name", "ar": "اسم للتواصل في حالة الطوارئ"}, "emrg-name": {
"emrg-no": {"en": "Emergency Contact Number", "ar": "رقم للتواصل في حالة الطوارئ"}, "en": "Emergency Contact Name",
"ar": "اسم للتواصل في حالة الطوارئ"
},
"emrg-no": {
"en": "Emergency Contact Number",
"ar": "رقم للتواصل في حالة الطوارئ"
},
"modes": {"en": "Modes", "ar": "الاوضاع"}, "modes": {"en": "Modes", "ar": "الاوضاع"},
"vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"}, "vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"},
"blind-modes": {"en": "Modes for Partially Blind", "ar": "تأثيرات لدعم ضعاف البصر"}, "blind-modes": {
"en": "Modes for Partially Blind",
"ar": "تأثيرات لدعم ضعاف البصر"
},
"invert-theme": {"en": "Invert", "ar": "ألوان سلبية"}, "invert-theme": {"en": "Invert", "ar": "ألوان سلبية"},
"off-theme": {"en": "Off", "ar": "إيقاف"}, "off-theme": {"en": "Off", "ar": "إيقاف"},
"dim-theme": {"en": "Dim", "ar": "ضوء خافت"}, "dim-theme": {"en": "Dim", "ar": "ضوء خافت"},
@ -605,8 +833,14 @@ const Map localizedValues = {
"LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
"Service": {"en": "Service", "ar": "خدمة"}, "Service": {"en": "Service", "ar": "خدمة"},
"HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, "HealthWeatherIndicators": {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '}, "en": "Health Weather Indicators",
'ar': ' مؤشرات الطقس الصحية '
},
"HealthTipsBasedOnCurrentWeather": {
"en": "Health Tips Based On Current Weather",
'ar': ' نصائح صحية على أساس الطقس الحالي '
},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
@ -627,28 +861,42 @@ const Map localizedValues = {
"send": {"en": "Send", "ar": "أرسل"}, "send": {"en": "Send", "ar": "أرسل"},
"status": {"en": "Status", "ar": "الحالة"}, "status": {"en": "Status", "ar": "الحالة"},
"like-to-hear": { "like-to-hear": {
"en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", "en":
"ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar":
"يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
}, },
"subject": {"en": "Subject", "ar": "الموضوع"}, "subject": {"en": "Subject", "ar": "الموضوع"},
"message": {"en": "Message", "ar": "رسالة"}, "message": {"en": "Message", "ar": "رسالة"},
"empty-subject": {"en": "Please enter the subject", "ar": "يرجى ادخال الموضوع"}, "empty-subject": {
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"}, "en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الرسالة"},
"select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"}, "select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"},
"complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"}, "complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"},
"complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"}, "complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
},
"question": {"en": "Question", "ar": "سؤال"}, "question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"}, "compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "إقتراح"}, "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"},
"select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"}, "select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
},
"number": {"en": "Number", "ar": "الرقم"}, "number": {"en": "Number", "ar": "الرقم"},
"not-classified": {"en": "Not classified", "ar": "غير محدد"}, "not-classified": {"en": "Not classified", "ar": "غير محدد"},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"}, "selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"}, "reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, "searchItemError": {
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "}, "en": "Item name should be more than 3 character ",
"ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"
},
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"wantConnectHmgNetwork": { "wantConnectHmgNetwork": {
"en": "Dear customer there is no internet access, Do you want to connect with HMG network to use our app, make sure you are in range of HMG network", "en": "Dear customer there is no internet access, Do you want to connect with HMG network to use our app, make sure you are in range of HMG network",
@ -656,4 +904,272 @@ const Map localizedValues = {
}, },
"failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"}, "failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"},
"offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"value": {"en": "Value", "ar": "القيمة"},
"range": {"en": "Range", "ar": "المدى"},
"out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"},
"in-patient": {"en": "In Patient", "ar": "تنويم"},
"report": {"en": "Radiology Report", "ar": "تقرير الاشعة"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
"send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"},
"appoSurvey": {"en": "Survey", "ar": "إستبيان"},
"appoSurveySubtitle": {"en": "Survey", "ar": "إستبيان"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"},
"doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"},
"good": {"en": "Good", "ar": "جيد"},
"v-good": {"en": "Very Good", "ar": "جيد جدا"},
"excellent": {"en": "Excellent", "ar": "ممتاز"},
"average": {"en": "Average", "ar": "متوسط"},
"below-average": {"en": "Below Average", "ar": "أقل من المتوسط"},
"info-signs": {
"en":
"This service allows you to view all vital signs were performed in the Habib Medical Group, e.x (height, weight, body mass index, heart rate, etc.) as well shows some statistics charts.",
"ar":
"خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ..) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر."
},
"info-advance-payment": {
"en":
"This service designed so that you can deposit an amount in advance either in your account or in someone else's account with Al Habib Medical Group.",
"ar":
"تم تصميم هذه الخدمة حتى تتمكن من دفع مبلغ مقدما او تحت الحساب سواء في حسابك او في حساب شخص اخر لدى مجموعة الحبيب الطبية."
},
"info-my-balance": {
"en": "This service allows you to check your balance in all branchs",
"ar": "هذه الخدمه تتيح لك الاطلاع رصيدك في كل الفروع"
},
"er-contant": {
"en":
"This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.",
"ar":
"تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي."
},
"er": {"en": "ER", "ar": "الطوارىء"},
"transportation-Service": {"en": "Ambulance Request", "ar": "طلب نقل اسعاف"},
"info-ambulance": {
"en":
"Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services",
"ar":
"عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى"
},
"RRT-transport-heading": {
"en": "Select Transportation Method",
"ar": "حدد طريقة النقل"
},
"sar": {"en": "SR", "ar": "ر.س"},
"RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"},
"to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"},
"from-hospital": {"en": "From Hospital", "ar": "من المستشفى"},
"one-direc": {"en": "One Way", "ar": "ذهاب"},
"two-direc": {"en": "Two Ways", "ar": "ذهاب وعودة"},
"pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"},
"pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"},
"inside-home": {"en": "Inside Home", "ar": "داخل المنزل"},
"have-appo": {"en": "Do you have an appointment?", "ar": "هل لديك موعد؟"},
"dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"},
"select-all": {
"en": "Please select all fields",
"ar": "يرجى تحديد جميع الحقول"
},
"select-map": {"en": "Select From Map", "ar": "حدد من الخريطة"},
"no-appointment": {
"en": "You don't have any appointments yet",
"ar": "ليس لديك أي مواعيد حتى الآن"
},
"patient-share": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"},
"patient-share-tax": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"},
"patient-share-total": {
"en": "Total amount payable: ",
"ar": "المبلغ الإجمالي المستحق:"
},
"select-ambulate": {"en": "Select Ambulate", "ar": "بحاجة للتنقل بواسطة"},
"wheelchair": {"en": "Wheelchair", "ar": "كرسي متحرك"},
"walker": {"en": "Walker", "ar": "مشاية"},
"stretcher": {"en": "Stretcher", "ar": "نقالة"},
"none": {"en": "None", "ar": "لا شيء"},
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
"transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"},
"directions": {"en": "Directions", "ar": "الاتجاهات"},
"info-my-appointments": {
"en":
"This service allows you to see all the appointment you have visited in Al Habib Medical Group, and through this service:",
"ar":
"خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:"
},
"info-todo": {
"en":
"This service is designed to enable you to have a quick link to the list of tasks that need to be done",
"ar":
"هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها"
},
"family-info": {
"en":
"Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
"ar":
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
},
"update-succ": {
"en": "Successfully updated profile",
"ar": "تم تحديث البيانات بنجاح"
},
"dental-complains": {"en": "Symptoms", "ar": "الأعراض"},
"empty-result": {
"en": "There is no search results found",
"ar": "لايوجد نتائج"
},
"no-booked-appointment": {
"en": "No booked appointments",
"ar": "لا يوجد مواعيد محجوزة"
},
"no-confirmed-appointment": {
"en": "No confirmed appointments",
"ar": "لا توجد مواعيد مؤكدة"
},
"no-arrived-appointment": {
"en": "No arrived appointments",
"ar": "لا يوجد مواعيد"
},
"upcoming-empty": {
"en": "You do not have any Todo actions yet.",
"ar": "ليس لديك أي إجراءات الآن."
},
"upcoming-timeLeft": {
"en": "time left for appointment",
"ar": "الوقت المتبقي للموعد"
},
"covid-test-all-services": {
"en": "Covid-19 Drive-Thru Test",
"ar": "فحص كورونا من داخل السيارة"
},
"pharmacy": {"en": "Pharmacy", "ar": "الصيدلية"},
"ereferral": {"en": "E-Referral", "ar": "طلب التحويل"},
"child-vaccine": {"en": "Child Vaccines", "ar": "تطعيمات الأطفال"},
"calculators": {"en": "Health Calculators", "ar": "الحاسبات الصحية"},
"converters": {"en": "Health Converter", "ar": "تحويل القياسات"},
"h2o": {"en": "Water Tracker", "ar": "حساب كمية الماء"},
"v-tour": {"en": "Virtual Tour", "ar": "جولة إفتراضية"},
"hmg-news": {"en": "HMG News", "ar": "أخبار المجموعة"},
"blood-d": {"en": "Blood Donation", "ar": "تبرع بالدم"},
"symptomCheckerTitle": {"en": "Symptom Checker", "ar": "مدقق الأعراض"},
"latest-news": {"en": "Latest News", "ar": "أحدث الأخبار"},
"our-location": {"en": "Our Locations", "ar": "موقعنا"},
"pharmacies": {"en": "Pharmacies", "ar": "الصيدليات"},
"hospitals": {"en": "Hospitals", "ar": "المستشفيات"},
"wallet": {"en": "Wallet", "ar": "محفظة نقود"},
"hmg": {"en": "Al Habib", "ar": "الحبيب"},
"requested": {"en": "Requested", "ar": "مطلوب"},
"ready": {"en": "Ready", "ar": "جاهز"},
"completed": {"en": "Completed", "ar": "مكتمل"},
"cancelled": {"en": "Cancelled", "ar": "ملغى"},
"request-medical-report": {
"en": "Request medical report",
"ar": "طلب تقرير طبي"
},
"insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"},
'details': {'en': 'Details', 'ar': 'التفاصيل'},
"age": {"en": "Age", "ar": "العمر"},
"active-insurence": {"en": "Active", "ar": "نشطة"},
"not-active": {"en": "Not Active", "ar": "غير نشط"},
"card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"},
"Dr": {"en": "Dr. ", "ar": "الدكتور."},
"empty": {"en": "You do not have any records.", "ar": "ليس لديك أي سجلات"},
"last-visit": {
"en": "How was your last visit with doctor?",
"ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"
},
"tap-title": {"en": "Please rate the doctor", "ar": "يرجى تقييم الطبيب"},
"later": {"en": "Later", "ar": "لاحقاً"},
"sendSuc": {
"en": "A copy has been sent to the email",
"ar": "تم إرسال نسخة إلى البريد الإلكتروني"
},
"instructions": {
"en":
"You can now talk directly to the appointments department by chat or request a call back",
"ar":
"يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال"
},
"instructions-pharmacies": {
"en":
"You can now talk directly to the pharmacist by chat or request a call back",
"ar":
"يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال"
},
"select-hospital": {"en": "Choose Hospital", "ar": "اختر المستشفى"},
"start": {"en": "Start", "ar": "ابدأ"},
"info-chat": {
"en":
"This service allows you to chat with customer service directly without the need to call.",
"ar":
"المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً."
},
"last-appointment": {
"en": "How was your appointment?",
"ar": "كيف كان موعدك الطبي ؟"
},
"rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"},
"fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"},
"rate": {"en": "Rate", "ar": "تقييم"},
"send-email": {
"en": "Send a copy of this report to the email",
"ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"
},
"update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"},
"booked-success": {
"en": "The appointment has been successfully booked.",
"ar": "لقد تم حجز الموعد بنجاح"
},
"appo-reminder-select-option-30": {
"en": "Before 30 Mins",
"ar": "قبل 30 دقيقة"
},
"appo-reminder-select-option-60": {
"en": "Before 1 Hour",
"ar": "قبل ساعة واحدة"
},
"appo-reminder-select-option-90": {
"en": "Before 1 Hour and 30 mins",
"ar": "قبل ساعة و 30 دقيقة"
},
"appo-reminder-select-option-120": {
"en": "Before 2 Hours",
"ar": "قبل ساعتين"
},
"noDataAvailable": {
"en": "No data available",
"ar": " لا يوجد بيانات متاحة "
},
"thename": {"en": "The Name", "ar": "الاسم"},
"noSearchResult": {"en": "No Search Result", "ar": "لا توجد نتيجة بحث"},
"selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"},
"gallery": {"en": "Gallery", "ar": "معرض الصور"},
"camera": {"en": "Camera", "ar": "كاميرا"},
"med-report": {
"en": "Medical Reports",
"ar": "التقارير الطبية"
},
"new-med-report": {
"en": "Requests",
"ar": "الطلبات"
},
"requestReport":{
"en":"Request a report",
"ar":" طلب تقرير"
},
"confirm-msg-report": {
"en": "Request for medical report?",
"ar": "طلب تقرير طبي؟"
},
"successSendReport": {
"en": "The request has been submitted successfully",
"ar": "تم تنفيذ طلبك بنجاح"
},
}; };

@ -21,3 +21,7 @@ const THEME_VALUE = 'is_vibration';
const MAIN_USER = 'main-user'; const MAIN_USER = 'main-user';
const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited'; const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited';
const HMG_GEOFENCES = 'hmg-geo-fences'; const HMG_GEOFENCES = 'hmg-geo-fences';
const WEATHER = 'weather';
const BLOOD_TYPE = 'blood-type';
const NOTIFICATION_COUNT = 'notification-count';

@ -0,0 +1,88 @@
class LabOrderResult {
String description;
dynamic femaleInterpretativeData;
int gender;
int lineItemNo;
dynamic maleInterpretativeData;
dynamic notes;
String packageID;
int patientID;
String projectID;
String referanceRange;
String resultValue;
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
dynamic superVerifiedOn;
String testCode;
String uOM;
String verifiedOn;
String verifiedOnDateTime;
LabOrderResult(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabOrderResult.fromJson(Map<String, dynamic> json) {
description = json['Description'];
femaleInterpretativeData = json['FemaleInterpretativeData'];
gender = json['Gender'];
lineItemNo = json['LineItemNo'];
maleInterpretativeData = json['MaleInterpretativeData'];
notes = json['Notes'];
packageID = json['PackageID'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
referanceRange = json['ReferanceRange'];
resultValue = json['ResultValue'];
sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn'];
setupID = json['SetupID'];
superVerifiedOn = json['SuperVerifiedOn'];
testCode = json['TestCode'];
uOM = json['UOM'];
verifiedOn = json['VerifiedOn'];
verifiedOnDateTime = json['VerifiedOnDateTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
data['Gender'] = this.gender;
data['LineItemNo'] = this.lineItemNo;
data['MaleInterpretativeData'] = this.maleInterpretativeData;
data['Notes'] = this.notes;
data['PackageID'] = this.packageID;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ReferanceRange'] = this.referanceRange;
data['ResultValue'] = this.resultValue;
data['SampleCollectedOn'] = this.sampleCollectedOn;
data['SampleReceivedOn'] = this.sampleReceivedOn;
data['SetupID'] = this.setupID;
data['SuperVerifiedOn'] = this.superVerifiedOn;
data['TestCode'] = this.testCode;
data['UOM'] = this.uOM;
data['VerifiedOn'] = this.verifiedOn;
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
return data;
}
}

@ -1,9 +1,9 @@
class LabResult { class LabResult {
String description; String description;
Null femaleInterpretativeData; dynamic femaleInterpretativeData;
int gender; int gender;
int lineItemNo; int lineItemNo;
Null maleInterpretativeData; dynamic maleInterpretativeData;
String notes; String notes;
String packageID; String packageID;
int patientID; int patientID;
@ -13,11 +13,11 @@ class LabResult {
String sampleCollectedOn; String sampleCollectedOn;
String sampleReceivedOn; String sampleReceivedOn;
String setupID; String setupID;
Null superVerifiedOn; dynamic superVerifiedOn;
String testCode; String testCode;
String uOM; String uOM;
String verifiedOn; String verifiedOn;
Null verifiedOnDateTime; dynamic verifiedOnDateTime;
LabResult( LabResult(
{this.description, {this.description,
@ -92,8 +92,7 @@ class LabResultList {
String filterName = ""; String filterName = "";
List<LabResult> patientLabResultList = List(); List<LabResult> patientLabResultList = List();
LabResultList( LabResultList({this.filterName, LabResult lab}) {
{this.filterName, LabResult lab}) {
patientLabResultList.add(lab); patientLabResultList.add(lab);
} }
} }

@ -11,14 +11,14 @@ class AuthenticatedUserObject {
getUser(); getUser();
} }
getUser() async { getUser({bool getUser = false}) async {
if (user == null) { if (getUser) {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
} else if (user == null) {
var userData = await sharedPref.getObject(USER_PROFILE); var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData); if (userData != null) user = AuthenticatedUser.fromJson(userData);
} }
// var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = user != null;
} }
logout() async { logout() async {

@ -2,7 +2,9 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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';
@ -21,15 +23,21 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onFailure: (String error, int statusCode) {}, /// onFailure: (String error, int statusCode) {},
/// body: Map(); /// body: Map();
/// ///
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient { class BaseAppClient {
post(String endPoint, {Map<String, dynamic> body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false}) async { post(String endPoint,
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false}) async {
String url = BASE_URL + endPoint; String url = BASE_URL + endPoint;
try { try {
//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 = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID = await sharedPref.getString(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')
@ -40,15 +48,8 @@ class BaseAppClient {
} }
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = body.containsKey('LanguageID') body['LanguageID'] = languageID == 'ar' ? 1 : 2;
? 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;
@ -59,11 +60,12 @@ class BaseAppClient {
: PATIENT_OUT_SA; : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') body['isDentalAllowedBackend'] =
? body['isDentalAllowedBackend'] != null body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] ? body['isDentalAllowedBackend'] != null
: IS_DENTAL_ALLOWED_BACKEND ? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND; : IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
} }
body['DeviceTypeID'] = DeviceTypeID; body['DeviceTypeID'] = DeviceTypeID;
@ -86,9 +88,10 @@ class BaseAppClient {
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID']; body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token); body['SessionID'] = getSessionId(token);
} }
} }
@ -97,7 +100,12 @@ class BaseAppClient {
var ss = json.encode(body); var ss = json.encode(body);
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.post(url.trim(),
body: json.encode(body),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -117,19 +125,24 @@ class BaseAppClient {
} else if (parsed['Result'] == 'OK') { } else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { } else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
await logout(); await logout();
//helpers.showErrorToast('Your session expired Please login agian'); //helpers.showErrorToast('Your session expired Please login agian');
} else { } else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }
@ -138,77 +151,31 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) { } catch (e) {
print(e); //print(e);
onFailure(e.toString(), -1); //
} if (e is String) {
} onFailure(e.toString(), -1);
get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams}) async {
String url = BASE_URL + endPoint;
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
}
print("URL : $url");
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed, statusCode);
}
} else {
onFailure('Please Check The Internet Connection', -1);
}
}
simpleGet(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams}) async {
String url = fullUrl;
var haveParams = (queryParams != null);
if (haveParams) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
print("URL Query String: $url");
}
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else { } else {
onSuccess(response.body.toString(), statusCode); onFailure('Failed to connect to the server', -1);
} }
} else {
onFailure('Please Check The Internet Connection', -1);
} }
} }
logout() async { logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false; Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }
String getSessionId(String id) { String getSessionId(String id) {
///return id.replaceAll(RegExp('/[^\w\s]/'), ''); ///return id.replaceAll(RegExp('/[^\w\s]/'), '');
// return id.replaceAll(RegExp('/[^a-zA-Z ]'), ''); return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
} }
static defaultHttpParameters() async { static defaultHttpParameters() async {

@ -8,6 +8,7 @@ class LiveChatService extends BaseService {
List<GetPatientICProjectsModel> LivechatModelList = List(); List<GetPatientICProjectsModel> LivechatModelList = List();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['body']
Future getAllLiveChatOrders() async { Future getAllLiveChatOrders() async {
hasError = false; hasError = false;

@ -13,14 +13,13 @@ class HospitalService extends BaseService {
double _longitude; double _longitude;
_getCurrentLocation() async { _getCurrentLocation() async {
await getLastKnownPosition().then((value) { await Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude; _latitude = value.latitude;
_longitude = value.longitude; _longitude = value.longitude;
}).catchError((e) { }).catchError((e) {
_longitude = 0; _longitude = 0;
_latitude = 0; _latitude = 0;
}); });
// currentLocation = LatLng(position.latitude, position.longitude);
} }
Future getHospitals() async { Future getHospitals() async {

@ -21,7 +21,11 @@ class PatientSickLeaveService extends BaseService {
} }
sendSickLeaveEmail( sendSickLeaveEmail(
{int requestNo, String projectName, String doctorName, int projectID,String setupID}) async { {int requestNo,
String projectName,
String doctorName,
int projectID,
String setupID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -33,8 +37,8 @@ class PatientSickLeaveService extends BaseService {
body['PatientName'] = user.firstName + " " + user.firstName; body['PatientName'] = user.firstName + " " + user.firstName;
body['ProjectName'] = projectName; body['ProjectName'] = projectName;
body['DoctorName'] = doctorName; body['DoctorName'] = doctorName;
body['ProjectID'] = 12; body['ProjectID'] = projectID;
body['SetupID'] = 12; body['SetupID'] = setupID;
await baseAppClient await baseAppClient
.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {}, .post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
@ -32,6 +33,7 @@ class LabsService extends BaseService {
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List(); List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult( Future getLaboratoryResult(
{String projectID, {String projectID,
@ -68,6 +70,7 @@ class LabsService extends BaseService {
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();
labResultList.clear();
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
labResultList.add(LabResult.fromJson(lab)); labResultList.add(LabResult.fromJson(lab));
}); });
@ -77,6 +80,28 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
body['OrderNo'] = patientLabOrder.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;
await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT,
onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail(); RequestSendLabReportEmail();
@ -97,7 +122,7 @@ class LabsService extends BaseService {
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
AppToast.showSuccessToast(message: 'A copy has been sent to the email');
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -57,20 +57,31 @@ class PrescriptionsService extends BaseService {
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport( Future getPrescriptionReport(
{int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async { {Prescriptions prescriptions}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = projectId; _requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = clinicID; _requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = setupID; _requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = episodeID; _requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(GET_PRESCRIPTION_REPORT,
await baseAppClient.post(prescriptions.isInOutPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { prescriptionReportEnhList.clear();
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); if(prescriptions.isInOutPatient){
}); response['ListPRM'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -67,7 +67,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.patientName = user.firstName + " " + user.lastName; _requestSendRadReportEmail.patientName = user.firstName + " " + user.lastName;
_requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo; _requestSendRadReportEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendRadReportEmail.projectName = finalRadiology.projectName; _requestSendRadReportEmail.projectName = finalRadiology.projectName;
_requestSendRadReportEmail.radResult = 'asd'; //finalRadiology.reportData; _requestSendRadReportEmail.radResult = finalRadiology.reportData;
_requestSendRadReportEmail.to = user.emailAddress; _requestSendRadReportEmail.to = user.emailAddress;
_requestSendRadReportEmail.dateofBirth = user.dateofBirth; _requestSendRadReportEmail.dateofBirth = user.dateofBirth;

@ -9,11 +9,11 @@ class ReportsService extends BaseService {
List<AppointmentHistory> appointHistoryList = List(); List<AppointmentHistory> appointHistoryList = List();
String userAgreementContent = ""; String userAgreementContent = "";
RequestReports _requestReports = RequestReports( RequestReports _requestReports = RequestReports(
isReport: true, isReport: true,
encounterType: 1, encounterType: 1,
requestType: 1, requestType: 1,
patientOutSA: 0, patientOutSA: 0,
); );
Future getReports() async { Future getReports() async {
hasError = false; hasError = false;
@ -56,22 +56,18 @@ class ReportsService extends BaseService {
}, body: Map<String, dynamic>()); }, body: Map<String, dynamic>());
} }
Future updatePatientHealthSummaryReport({bool isSummary}) async { Future updatePatientHealthSummaryReport({bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>(); Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary; body['RSummaryReport'] = isSummary;
hasError = false; hasError = false;
await baseAppClient.post(UPDATE_HEALTH_TERMS, await baseAppClient.post(UPDATE_HEALTH_TERMS,
onSuccess: (dynamic response, int statusCode) { 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: body);
}, body: body);
} }
Future insertRequestForMedicalReport( Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async { AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
@ -96,4 +92,44 @@ class ReportsService extends BaseService {
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
Future sendEmailForMedicalReport(
String projectName,
String clinicName,
String doctorName,
String requestDate,
String invoiceNo,
int projectID,
String stamp,
String setupID) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['SetupID'] = setupID;
body['PrintDate'] = requestDate;
body['ProcedureID'] = "05005009";
body['Reporttype'] = "MEDICAL REPORT";
body['stamp'] = stamp;
body['To'] = user.emailAddress;
body['DateofBirth'] = user.dateofBirth;
body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientMobileNumber'] = user.mobileNumber;
body['PatientName'] = user.firstName + " " + user.lastName;
body['ProjectName'] = projectName;
body['ClinicName'] = clinicName;
body['ProjectID'] = projectID;
body['InvoiceNo'] = invoiceNo;
body['PrintedByName'] = user.firstName + " " + user.lastName;
dynamic response;
hasError = false;
await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL,
onSuccess: (dynamic res, int statusCode) {
response = res;
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return response;
}
} }

@ -5,14 +5,14 @@ import '../base_service.dart';
class VitalSignService extends BaseService { class VitalSignService extends BaseService {
List<VitalSignResModel> vitalSignResModelList = List(); List<VitalSignResModel> vitalSignResModelList = List();
Map<String, dynamic> body = Map();
String weightKg = ""; String weightKg = "";
String heightCm = ""; String heightCm = "";
String bloadType = ""; String bloadType = "";
Future getPatientRadOrders({int appointmentNo, int projectID}) async { Future getPatientRadOrders({int appointmentNo, int projectID}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map();
if (appointmentNo != null && projectID != null) { if (appointmentNo != null && projectID != null) {
body['TransNo'] = appointmentNo; body['TransNo'] = appointmentNo;
body['ProjectID'] = projectID; body['ProjectID'] = projectID;

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:geolocator/geolocator.dart';
class PharmacyService extends BaseService { class PharmacyService extends BaseService {
List<PharmaciesModel> _medicineItem = List(); List<PharmaciesModel> _medicineItem = List();
@ -59,10 +60,29 @@ class PharmacyService extends BaseService {
projectID: 15, projectID: 15,
); );
double _latitude=0;
double _longitude=0;
_getCurrentLocation() async {
await Geolocator.getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
}
Future getMedicineList({String drugName}) async { Future getMedicineList({String drugName}) async {
hasError = false; hasError = false;
_requestGetPharmaciesModel.pHRItemName = drugName; await _getCurrentLocation();
try { Map<String,dynamic> body = Map();
body['PHR_itemName'] = drugName;
body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true;
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
await baseAppClient.post(GET_PHARMCY_ITEMS, await baseAppClient.post(GET_PHARMCY_ITEMS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_medicineItem.clear(); _medicineItem.clear();
@ -72,15 +92,18 @@ class PharmacyService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestGetPharmaciesModel.toJson()); }, body: body);
} catch (error) {
throw error;
}
} }
Future getPharmaciesList({int itemID}) async { Future getPharmaciesList({int itemID}) async {
_pharmaciesListModel.itemID = itemID;
try { await _getCurrentLocation();
Map<String,dynamic> body = Map();
body['ItemID'] = itemID;
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
await baseAppClient.post(GET_PHARMACY_LIST, await baseAppClient.post(GET_PHARMACY_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_pharmaciesList.clear(); _pharmaciesList.clear();
@ -91,9 +114,7 @@ class PharmacyService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _pharmaciesListModel.toJson()); }, body:body);
} catch (error) {
throw error;
}
} }
} }

@ -33,7 +33,7 @@ class BaseViewModel extends ChangeNotifier {
//authenticatedUserObject.getUser(); //authenticatedUserObject.getUser();
user = authenticatedUserObject.user; user = authenticatedUserObject.user;
this.isLogin = authenticatedUserObject.isLogin; this.isLogin = authenticatedUserObject.isLogin;
_getUser();
} }
_getUser() async { _getUser() async {

@ -21,59 +21,8 @@ class FeedbackViewModel extends BaseViewModel {
FeedbackService _feedbackService = locator<FeedbackService>(); FeedbackService _feedbackService = locator<FeedbackService>();
List<COCItem> get cOCItemList => _feedbackService.cOCItemList; List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
MessageType messageType = MessageType.NON;
MessageType messageTypeDialog = MessageType.NON;
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) {
messageTypeDialog = messageType;
notifyListeners();
}
setMessageType(MessageType messageType) {
this.messageType = messageType;
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
break;
case MessageType.ComplaintWithoutAppointment:
break;
case MessageType.Question:
break;
case MessageType.Compliment:
break;
case MessageType.Suggestion:
break;
case MessageType.NON:
break;
}
notifyListeners();
}
List<AppointmentHistory> get appointHistoryList => List<AppointmentHistory> get appointHistoryList =>
_feedbackService.appointHistoryList; _feedbackService.appointHistoryList;
@ -93,11 +42,9 @@ class FeedbackViewModel extends BaseViewModel {
if (_feedbackService.hasError) { if (_feedbackService.hasError) {
error = _feedbackService.error; error = _feedbackService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
setMessageType(MessageType.NON);
return false; return false;
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
setMessageType(MessageType.NON);
return true; return true;
} }
} }

@ -1,9 +1,11 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -12,6 +14,9 @@ class LabsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic; FilterType filterType = FilterType.Clinic;
LabsService _labsService = locator<LabsService>(); LabsService _labsService = locator<LabsService>();
List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
List<PatientLabOrdersList> _patientLabOrdersListClinic = List(); List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List(); List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
@ -105,43 +110,54 @@ class LabsViewModel extends BaseViewModel {
getPatientLabResult({PatientLabOrders patientLabOrder}) async { getPatientLabResult({PatientLabOrders patientLabOrder}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabResult( await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder);
patientLabOrder: patientLabOrder
);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_labsService.labResultList.forEach((element) { _labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = List<LabResultList> patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
labResultLists
.where((elementClinic) =>
elementClinic.filterName == element.testCode)
.toList();
if (patientLabOrdersClinic.length != 0) { if (patientLabOrdersClinic.length != 0) {
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList var value= labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList
.add(element); .where((e) => e.sampleCollectedOn== element.sampleCollectedOn && e.resultValue ==element.resultValue ).toList();
if(value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element);
} else { } else {
labResultLists.add(LabResultList( labResultLists.add(LabResultList(filterName: element.testCode, lab: element));
filterName: element.testCode,
lab: element));
} }
}); });
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
sendLabReportEmail({PatientLabOrders patientLabOrder}) async {
getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder); await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder,procedure: procedure);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
bool isShouldClear = false;
if(_labsService.labOrdersResultsList.length==1)
{
labOrdersResultsList.forEach((element) {
if(element.resultValue.contains('/') ||element.resultValue.contains('*' )|| element.resultValue.isEmpty )
isShouldClear = true;
});}
if(isShouldClear)
_labsService.labOrdersResultsList.clear();
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
sendLabReportEmail({PatientLabOrders patientLabOrder,String mes}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder);
if (_labsService.hasError) {
error = _labsService.error;
}else
AppToast.showSuccessToast(message: mes);
}
} }

@ -119,6 +119,7 @@ class PrescriptionsViewModel extends BaseViewModel {
int patientID, int patientID,
String clinicName, String clinicName,
String doctorName, String doctorName,
String mes,
int projectID}) async { int projectID}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail( await _prescriptionsService.sendPrescriptionEmail(
@ -128,7 +129,7 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
} else { } else {
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail'); AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -80,7 +80,7 @@ class RadiologyViewModel extends BaseViewModel {
} }
sendRadReportEmail( sendRadReportEmail(
{FinalRadiology finalRadiology}) async { {FinalRadiology finalRadiology,String mes}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _radiologyService.sendRadReportEmail( await _radiologyService.sendRadReportEmail(
finalRadiology: finalRadiology finalRadiology: finalRadiology
@ -89,7 +89,7 @@ class RadiologyViewModel extends BaseViewModel {
error = _radiologyService.error; error = _radiologyService.error;
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
} else { } else {
AppToast.showSuccessToast(message: 'A copy has been sent to the email'); AppToast.showSuccessToast(message: mes);
} }
setState(ViewState.Idle); setState(ViewState.Idle);
} }

@ -69,7 +69,7 @@ class ReportsViewModel extends BaseViewModel {
} }
insertRequestForMedicalReport(AppointmentHistory appointmentHistory)async{ insertRequestForMedicalReport(AppointmentHistory appointmentHistory,String mes)async{
setState(ViewState.Busy); setState(ViewState.Busy);
await _reportsService.insertRequestForMedicalReport(appointmentHistory); await _reportsService.insertRequestForMedicalReport(appointmentHistory);
if (_reportsService.hasError) { if (_reportsService.hasError) {
@ -77,7 +77,7 @@ class ReportsViewModel extends BaseViewModel {
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
AppToast.showSuccessToast(message: 'The order was send '); AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -23,9 +23,11 @@ class PharmacyViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
//_pharmacyService.clearPharmaciesList();
} }
clearMedicineSearch(){
_pharmacyService.clearMedicineList();
}
Future getMedicine({String name}) async { Future getMedicine({String name}) async {
hasError = false; hasError = false;
_pharmacyService.clearMedicineList(); _pharmacyService.clearMedicineList();

@ -4,7 +4,6 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
@ -24,7 +23,9 @@ class ProjectViewModel extends BaseViewModel {
bool isError = false; bool isError = false;
String error = ''; String error = '';
dynamic searchvalue; dynamic searchvalue;
bool isLogin = false; bool isLogin
= false;
dynamic get searchValue => searchvalue; dynamic get searchValue => searchvalue;
@ -57,7 +58,7 @@ class ProjectViewModel extends BaseViewModel {
}); });
} }
void loadSharedPrefLanguage() async { Future loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage); _appLocale = Locale(currentLanguage);
_isArabic = currentLanguage == 'ar'; _isArabic = currentLanguage == 'ar';

@ -2,11 +2,15 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier { class ToDoCountProviderModel with ChangeNotifier {
int _count; int _count;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count; int get count => _count == null ? 0 : _count;
void setState(int count) { bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge) {
_count = count; _count = count;
_isShowBadge = isShowBadge;
notifyListeners(); notifyListeners();
} }
} }

@ -25,7 +25,7 @@ class GetAllSharedRecordsByStatusResponse {
dynamic successMsgN; dynamic successMsgN;
dynamic doctorInformationList; dynamic doctorInformationList;
List<GetAllSharedRecordsByStatusList> getAllPendingRecordsList; List<GetAllSharedRecordsByStatusList> getAllPendingRecordsList;
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList; List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList = List();
List<GetAllSharedRecordsByStatusList> getResponseFileList; List<GetAllSharedRecordsByStatusList> getResponseFileList;
bool isHMGPatient; bool isHMGPatient;
bool isLoginSuccessfully; bool isLoginSuccessfully;
@ -92,7 +92,7 @@ class GetAllSharedRecordsByStatusResponse {
this.successMsgN, this.successMsgN,
this.doctorInformationList, this.doctorInformationList,
this.getAllPendingRecordsList, this.getAllPendingRecordsList,
this.getAllSharedRecordsByStatusList, this.getAllSharedRecordsByStatusList ,
this.getResponseFileList, this.getResponseFileList,
this.isHMGPatient, this.isHMGPatient,
this.isLoginSuccessfully, this.isLoginSuccessfully,

@ -2,9 +2,11 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -14,8 +16,8 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:provider/provider.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 'BookSuccess.dart'; import 'BookSuccess.dart';
@ -43,6 +45,8 @@ class BookConfirm extends StatefulWidget {
} }
class _BookConfirmState extends State<BookConfirm> { class _BookConfirmState extends State<BookConfirm> {
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
@ -54,6 +58,7 @@ class _BookConfirmState extends State<BookConfirm> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
@ -236,7 +241,7 @@ class _BookConfirmState extends State<BookConfirm> {
), ),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text( child: Text(
TranslationBase.of(context).date + TranslationBase.of(context).date +
": " + ": " +
@ -320,7 +325,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
"Gender: " + TranslationBase.of(context).gender + ": " +
widget.authUser.genderDescription, widget.authUser.genderDescription,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -330,7 +335,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0), margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text( child: Text(
"Age: " + widget.authUser.age.toString(), TranslationBase.of(context).age + ": " + widget.authUser.age.toString(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -418,12 +423,13 @@ class _BookConfirmState extends State<BookConfirm> {
context) context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 1800), () { Future.delayed(new Duration(milliseconds: 500), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject); docObject.projectID, docObject);
getToDoCount();
}); });
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -471,9 +477,10 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 1800), () { Future.delayed(new Duration(milliseconds: 500), () {
getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], getLiveCareAppointmentPatientShare(context, res['AppointmentNo'],
docObject.clinicID, docObject.projectID, docObject); docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
}); });
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -499,10 +506,23 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
} }
getPatientShare(context, String appointmentNo, int clinicID, int projectID, getPatientShare(context, String appointmentNo, int clinicID, int projectID,

@ -166,6 +166,173 @@ class _BookSuccessState extends State<BookSuccess> {
], ],
), ),
), ),
bottomNavigationBar: getBottomContainer(),
);
}
Widget getBottomContainer() {
switch (widget.patientShareResponse.nextAction) {
case 0:
return Container();
break;
case 10:
return _getConfirmAppoButtons();
break;
case 15:
return _getPaymentPendingAppo();
break;
case 20:
return _getPayNowButtons();
break;
case 30:
return _getQRButtons();
break;
case 50:
return _getConfirmAppoButtons();
break;
}
}
Widget _getQRButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getPayNowButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getConfirmAppoButtons() {
return Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 5.0),
height: MediaQuery.of(context).size.height * 0.15,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
); );
} }
@ -239,8 +406,7 @@ class _BookSuccessState extends State<BookSuccess> {
_getBulletPoint("1"), _getBulletPoint("1"),
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Text( child: Text(TranslationBase.of(context).upcomingConfirm,
"Please confirm the appointment to avoid the cancellation",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
@ -264,7 +430,7 @@ class _BookSuccessState extends State<BookSuccess> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Text( child: Text(
"The online payment process will be available 24 hours before the appointment.", TranslationBase.of(context).upcomingConfirmMore,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
@ -278,67 +444,6 @@ class _BookSuccessState extends State<BookSuccess> {
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
child: Image.asset("assets/images/new-design/payment-method.png"), child: Image.asset("assets/images/new-design/payment-method.png"),
), ),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.32,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo =
widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
], ],
); );
} }
@ -462,52 +567,6 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
], ],
); );
} }
@ -763,34 +822,34 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
Container( // Container(
alignment: Alignment.bottomCenter, // alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18, // height: MediaQuery.of(context).size.height * 0.18,
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ // children: <Widget>[
ButtonTheme( // ButtonTheme(
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), // borderRadius: BorderRadius.circular(10.0),
), // ),
minWidth: MediaQuery.of(context).size.width * 0.7, // minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, // height: 45.0,
child: RaisedButton( // child: RaisedButton(
color: new Color(0xFF60686b), // color: new Color(0xFF60686b),
textColor: Colors.white, // textColor: Colors.white,
disabledTextColor: Colors.white, // disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), // disabledColor: new Color(0xFFbcc2c4),
onPressed: () { // onPressed: () {
// navigateToQR(context); // // navigateToQR(context);
getAppoQR(context); // getAppoQR(context);
}, // },
child: Text(TranslationBase.of(context).viewQR.toUpperCase(), // child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)), // style: TextStyle(fontSize: 18.0)),
), // ),
), // ),
], // ],
), // ),
), // ),
], ],
); );
} }

@ -1,11 +1,14 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; 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/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.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/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_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/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';
@ -42,23 +45,14 @@ class _DoctorProfileState extends State<DoctorProfile>
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
_tabController = new TabController( _tabController = new TabController(
length: 2, length: 2,
vsync: this, vsync: this,
initialIndex: widget.isOpenAppt == true ? 1 : 0); initialIndex: widget.isOpenAppt == true ? 1 : 0);
// event.controller.stream.listen((p) {
// if (p['clinic_id'] != null &&
// p['doctor_id'] != null &&
// p['project_id'] != null) {
// setState(() {
// // need to take the data from here
// // dropdownValue = p['clinic_id'];
// });
// }
// });
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
widget.doctor.speciality = widget.docProfileList.specialty; widget.doctor.speciality = widget.docProfileList.specialty;
@ -150,19 +144,26 @@ class _DoctorProfileState extends State<DoctorProfile>
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
), ),
Container( InkWell(
margin: EdgeInsets.only(top: 5.0), onTap: () {
alignment: Alignment.center, getDoctorRatingsDetails();
child: Text( },
"(" + child: Container(
widget.doctor.noOfPatientsRate.toString() + margin: EdgeInsets.only(top: 5.0),
" " + TranslationBase.of(context).reviews + ")", alignment: Alignment.center,
style: TextStyle( child: Text(
fontSize: 14.0, "(" +
color: Colors.blue[800], widget.docProfileList.noOfPatientsRate.toString() +
letterSpacing: 1.0, " " +
decoration: TextDecoration.underline, TranslationBase.of(context).reviews +
)), ")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
@ -213,6 +214,281 @@ class _DoctorProfileState extends State<DoctorProfile>
); );
} }
getDoctorRatings() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRating(widget.doctor.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['NotesDoctorRatingList']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.getDoctorsRatingDetails(widget.doctor.doctorID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
doctorDetailsList.clear();
res['DoctorRatingDetailsList'].forEach((v) {
doctorDetailsList.add(new DoctorRateDetails.fromJson(v));
});
showRatingDialog(doctorDetailsList);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 400.0,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white,
child: Column(
children: [
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(TranslationBase.of(context).doctorRating,
style: TextStyle(
fontSize: 22.0, color: Colors.white))),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(
this
.widget
.doctor
.actualDoctorRate
.ceilToDouble()
.toString(),
style: TextStyle(
fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
this.widget.doctor.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
this.widget.doctor.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).below_average,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 40.0,
child: RaisedButton(
elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
),
),
],
),
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.widget.docProfileList.noOfPatientsRate) * 100;
return width;
}
getPatientData() async { getPatientData() async {
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = var data =

@ -36,7 +36,7 @@ class _SearchResultsState extends State<SearchResults> {
...List.generate( ...List.generate(
widget.patientDoctorAppointmentListHospital.length, widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
isExpand: index == 1 ? true : false, // isExpand: index == 0 ? true : false,
title: widget.patientDoctorAppointmentListHospital[index] title: widget.patientDoctorAppointmentListHospital[index]
.filterName + .filterName +
" - " + " - " +

@ -178,7 +178,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
holidayStyle: TextStyle().copyWith(color: Colors.blue[800]), holidayStyle: TextStyle().copyWith(color: Colors.blue[800]),
), ),
daysOfWeekStyle: DaysOfWeekStyle( daysOfWeekStyle: DaysOfWeekStyle(
weekendStyle: TextStyle().copyWith(color: Colors.blue[600]), weekendStyle: TextStyle().copyWith(color: Colors.black, fontSize: 14.0),
weekdayStyle: TextStyle().copyWith(color: Colors.black, fontSize: 14.0),
), ),
headerStyle: HeaderStyle( headerStyle: HeaderStyle(
centerHeaderTitle: true, centerHeaderTitle: true,
@ -190,7 +191,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController), opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController),
child: Container( child: Container(
margin: const EdgeInsets.all(4.0), margin: const EdgeInsets.all(4.0),
padding: const EdgeInsets.only(top: 5.0, left: 6.0), padding: const EdgeInsets.only(top: 5.0, left: 5.0),
color: Colors.transparent, color: Colors.transparent,
width: 0, width: 0,
height: 0, height: 0,
@ -380,6 +381,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}); });
} }

@ -1,5 +1,6 @@
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:diplomaticquarterapp/widgets/others/app_expandable_notifier.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';
@ -13,31 +14,28 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Card( AppExpandableNotifier(
shape: RoundedRectangleBorder( headerWidget: Container(
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_information_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
), ),
child: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_information_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo,
style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
),
Container( Container(
padding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 10.0), padding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 10.0),
child: Table( child: Table(
@ -78,34 +76,31 @@ class DoctorInformation extends StatelessWidget {
], ],
), ),
), ),
Card( // ),
shape: RoundedRectangleBorder( AppExpandableNotifier(
borderRadius: BorderRadius.circular(10), headerWidget: Container(
margin: EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_qualification_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docQualifications,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
), ),
child: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_qualification_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(
TranslationBase.of(context).docQualifications,
style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
_getNormalText(docProfileList.doctorProfileInfo) _getNormalText(docProfileList.doctorProfileInfo)
], ],
@ -123,7 +118,6 @@ class DoctorInformation extends StatelessWidget {
return Text(text, return Text(text,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[800])); color: Colors.grey[800]));
@ -133,11 +127,9 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text(text, child: Text(text,
maxLines: 16,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])),
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.grey[700])),
); );
} }
@ -150,10 +142,7 @@ class DoctorInformation extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Text(text.trim(), Text(text.trim(),
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])),
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
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(icon, width: 18.0, height: 18.0), child: Image.network(icon, width: 18.0, height: 18.0),

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.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/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -216,6 +216,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<String> arrDistance = []; List<String> arrDistance = [];
List<String> result; List<String> result;
int numAll; int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList( .getDoctorsList(
@ -228,23 +231,48 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorList'].length != 0) { if (res['DoctorList'].length != 0) {
print(res['DoctorList']); // print(res['DoctorList']);
doctorsList.clear(); doctorsList.clear();
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
// arr.add(new DoctorList.fromJson(v).projectName);
// arrDistance.add(new DoctorList.fromJson(v)
// .projectDistanceInKiloMeters
// .toString());
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
arr.add(new DoctorList.fromJson(v).projectName); if (doctorByHospital.length != 0) {
arrDistance.add(new DoctorList.fromJson(v) _patientDoctorAppointmentListHospital[
.projectDistanceInKiloMeters _patientDoctorAppointmentListHospital
.toString()); .indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
}); });
} else {} } else {}
}); });
result = LinkedHashSet<String>.from(arr).toList(); result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length; numAll = result.length;
// navigateToSearchResults(
// context, doctorsList, result, numAll, arrDistance);
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, result, numAll, arrDistance); context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -267,17 +295,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
} }
Future navigateToSearchResults( Future navigateToSearchResults(
context, docList, result, numAll, resultDistance) async {
Navigator.push(
context, context,
MaterialPageRoute( List<DoctorList> docList,
builder: (context) => BranchView( List<PatientDoctorAppointmentList>
doctorsList: docList, patientDoctorAppointmentListHospital) async {
result: result, Navigator.push(
num: numAll, context,
resultDistance: resultDistance), MaterialPageRoute(
), builder: (context) => SearchResults(
).then((value) { isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital))).then((value) {
getProjectsList(); getProjectsList();
}); });
} }

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_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/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -27,13 +31,14 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LiveChatViewModel>( return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(), onModelReady: (model) => model.getLiveChatRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -43,11 +48,11 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 20, height: 70,
), ),
Container( Container(
width: double.infinity, width: double.infinity,
height: 200, height: 230,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage(
@ -56,10 +61,29 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Column(
'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', crossAxisAlignment: CrossAxisAlignment.start,
color: Colors.white, children: [
textAlign: TextAlign.start, SizedBox(
height: projectViewModel.isArabic? 10:20,
),
Texts(
TranslationBase.of(context).instructions,
color: Colors.white,
textAlign: TextAlign.start,
),
SizedBox(
height:projectViewModel.isArabic? 8:25,
),
Texts(
TranslationBase.of(context)
.selectHospitalDec +
" :",
color: Colors.white,
fontWeight: FontWeight.w700,
textAlign: TextAlign.start,
),
],
), ),
), ),
), ),
@ -91,7 +115,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5)), Radius.circular(5)),
color: tappedIndex == index color: tappedIndex == index
? Colors.red ? Theme.of(context).primaryColor
: Colors.white, : Colors.white,
), ),
child: Padding( child: Padding(
@ -104,8 +128,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
onTap: () { onTap: () {
setState(() { setState(() {
tappedIndex = index; tappedIndex = index;
chat = chat = "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
"http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}";
}); });
}, },
child: Row( child: Row(
@ -135,7 +158,8 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
.black, .black,
textAlign: TextAlign textAlign: TextAlign
.center, .center,
))), //model.cOCItemList[index].cOCTitl ))),
//model.cOCItemList[index].cOCTitl
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
@ -171,18 +195,19 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Center( child: Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.07,
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: SecondaryButton(
label: 'ٍStart', label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
disabled: chat.isEmpty,
onTap: () { onTap: () {
print("chat=" + chat);
launch(chat); launch(chat);
}, },
), ),

@ -1,6 +1,8 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -16,9 +18,15 @@ class LiveChatPage extends StatefulWidget {
class _LiveChatPageState extends State<LiveChatPage> class _LiveChatPageState extends State<LiveChatPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
} }
@ -33,7 +41,10 @@ class _LiveChatPageState extends State<LiveChatPage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Locations', imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,
appBarTitle: TranslationBase.of(context).service,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -71,25 +82,22 @@ class _LiveChatPageState extends State<LiveChatPage>
isScrollable: true, isScrollable: true,
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Theme.of(context).primaryColor,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: Texts(' Hospitals '), child: Texts(TranslationBase.of(context).hospitals),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: Texts(' Pharmacies '), child: Texts(TranslationBase.of(context).pharmacies),
), ),
), ),
], ],

@ -1,12 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_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/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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: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:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -28,10 +31,11 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LiveChatViewModel>( return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
@ -43,12 +47,9 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
Container( Container(
width: double.infinity, width: double.infinity,
height: 200, height: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(''), fit: BoxFit.cover),
),
child: Texts( child: Texts(
'You can now talk directly to the pharmacist by chat or request a call back', TranslationBase.of(context).instructionsPharmacies,
color: Colors.black, color: Colors.black,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -63,20 +64,20 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Center( child: Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.87,
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
label: 'ٍStart', label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () { onTap: () {
print("chat=" + chat); print("chat=" + chat);
chat = chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1"; "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic? 1:2}";
launch(chat); launch(chat);
}, },
), ),

@ -81,7 +81,7 @@ class _FindUsPageState extends State<FindUsPage>
//indicatorSize: TabBarIndicatorSize.label, //indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),

@ -116,9 +116,9 @@ class _HospitalsPageState extends State<HospitalsPage> {
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: [ children: [
IconButton( IconButton(
// icon: Icon(Icons.location_on,color: Colors.red,), icon: Icon(Icons.location_on,color: Theme.of(context).primaryColor,size: 35,),
icon: new Image.asset( // icon: new Image.asset(
'assets/images/new-design/navigate.png'), // 'assets/images/new-design/navigate.png'),
tooltip: '', tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
@ -139,9 +139,9 @@ class _HospitalsPageState extends State<HospitalsPage> {
}, },
), ),
IconButton( IconButton(
// icon: Icon(Icons.phone,color: Colors.red,), icon: Icon(Icons.phone,color: Theme.of(context).primaryColor,size: 35,),
icon: new Image.asset( // icon: new Image.asset(
'assets/images/new-design/call.png'), // 'assets/images/new-design/call.png'),
tooltip: '', tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {

@ -140,13 +140,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
child: Row( child: Row(
children: [ children: [
IconButton( IconButton(
// icon: Icon( icon: Icon(Icons.location_on,color: Theme.of(context).primaryColor,size: 35,),
// Icons
// .location_on,
// color: Colors.red,
// ),
icon: new Image.asset(
'assets/images/new-design/navigate.png'),
tooltip: '', tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {
@ -163,21 +157,15 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
.findusPharmaciesModelList[ .findusPharmaciesModelList[
index] index]
.locationName); .locationName);
// _volume += 10;
}); });
}, },
), ),
IconButton( IconButton(
// icon: Icon( icon: Icon(Icons.phone,color: Theme.of(context).primaryColor,size: 35,),
// Icons.phone,
// color: Colors.red,
// ),
icon: new Image.asset(
'assets/images/new-design/call.png'),
tooltip: 'I', tooltip: 'I',
onPressed: () { onPressed: () {
setState(() { setState(() {
// _volume += 10;
launch("tel://" + launch("tel://" +
widget widget
.findusPharmaciesModelList[ .findusPharmaciesModelList[

@ -2,6 +2,7 @@ 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/data_display/text.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'; import 'package:provider/provider.dart';
@ -34,19 +35,16 @@ class CardCommonContact extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(this.text, child: Texts(this.text,
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
style: TextStyle( color:Theme.of(context).primaryColor,
color: new Color(0xFFc5272d), fontWeight: FontWeight.w700,
letterSpacing: 1.0, fontSize: 20.0),
fontSize: 20.0)),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Text(this.subText, child: Texts(this.subText,
overflow: TextOverflow.clip, color: Colors.black, fontSize: 15.0),
style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
), ),
Align( Align(
alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight, alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight,

@ -27,7 +27,7 @@ class AddFamilyMemberType extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/habib-logo.png', 'assets/images/DQ/dq_logo_icon.png',
height: 80, height: 80,
width: 80, width: 80,
), ),

@ -1,9 +1,21 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'
as list;
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -18,64 +30,155 @@ import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:provider/provider.dart';
class MyFamily extends StatefulWidget { class MyFamily extends StatefulWidget {
final bool isAppbarVisible; final bool isAppbarVisible;
MyFamily({this.isAppbarVisible =true});
MyFamily({this.isAppbarVisible = true});
@override @override
_MyFamily createState() => _MyFamily(); _MyFamily createState() => _MyFamily();
} }
class _MyFamily extends State<MyFamily> with TickerProviderStateMixin { class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
List<ImagesInfo> imagesInfo = List();
final familyFileProvider = FamilyFilesProvider(); final familyFileProvider = FamilyFilesProvider();
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
var userID; var userID;
TabController _tabController; TabController _tabController;
int _tabIndex = 0;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel;
AuthenticatedUser user;
VitalSignService _vitalSignService = locator<VitalSignService>();
var isVaiable = false;
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: 0); _tabController = new TabController(length: 2, vsync: this, initialIndex: 0);
checkUserData();
super.initState(); super.initState();
} }
bool expandFlag = false; bool expandFlag = false;
Widget build(BuildContext context) { Widget build(BuildContext context) {
// return Scaffold( imagesInfo.add(
// appBar: AppBar( ImagesInfo(
// bottom: TabBar( imageEn:
// indicatorColor: Colors.red, 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
// tabs: [ imageAr:
// Padding( 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
// padding: EdgeInsets.all(6), );
// child: AppText(
// TranslationBase.of(context).family, imagesInfo.add(
// color: Colors.white, ImagesInfo(
// )), imageEn:
// Padding( 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
// padding: EdgeInsets.all(6), imageAr:
// child: AppText( 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
// TranslationBase.of(context).request, );
// color: Colors.white, projectViewModel = Provider.of(context);
// )), return AppScaffold(
// ], appBarTitle: TranslationBase.of(context).myFamilyFiles,
// controller: _tabController, isShowAppBar: widget.isAppbarVisible,
// ), imagesInfo: imagesInfo,
// description: TranslationBase.of(context).familyInfo,
// ), body: Scaffold(
// body: TabBarView( extendBodyBehindAppBar: true,
// // physics: NeverScrollableScrollPhysics(), appBar: PreferredSize(
// children: [myFamilyDetails(context), myFamilyRequest(context)], preferredSize: Size.fromHeight(65.0),
// controller: _tabController), child: Stack(
// ); children: <Widget>[
// //bottomNavigationBar: BottomBarSearch()); Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92,
// 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).family),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).request),
),
),
],
),
),
),
),
],
),
),
body: Column(
children: <Widget>[
Expanded(
child: (user != null && projectViewModel.isLogin)
? TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
myFamilyDetails(context),
myFamilyRequest(context)
],
)
: Container(child: AppText('Loading..')),
)
],
),
),
);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: widget.isAppbarVisible, isShowAppBar: widget.isAppbarVisible,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight * .9,
width: SizeConfig.realScreenWidth, width: SizeConfig.realScreenWidth,
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
child: Stack( child: Stack(
@ -84,12 +187,13 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
controller: _tabController, controller: _tabController,
indicatorColor: Colors.red, indicatorColor: Colors.red,
tabs: [ tabs: [
Padding( Tab(
padding: EdgeInsets.all(6), // padding: EdgeInsets.all(6),
child: Text(TranslationBase.of(context).family)), child: AppText(TranslationBase.of(context).family)),
Padding( Tab(
padding: EdgeInsets.all(6), // padding: EdgeInsets.all(6),
child: Text(TranslationBase.of(context).request)), child:
AppText(TranslationBase.of(context).request)),
], ],
), ),
TabBarView( TabBarView(
@ -106,7 +210,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Widget myFamilyDetails(context) { Widget myFamilyDetails(context) {
return Container( return Container(
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
margin: EdgeInsets.fromLTRB(20.0, 0, 20.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 25.0, 20.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -125,7 +229,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Text("No data found")); child: Text(
TranslationBase.of(context).noDataAvailable));
else else
return Padding( return Padding(
padding: EdgeInsets.only(top: 50), padding: EdgeInsets.only(top: 50),
@ -223,13 +328,13 @@ 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: // child:
SingleChildScrollView( SingleChildScrollView(
child: Container( child: Container(
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
margin: EdgeInsets.only(top:50), margin: EdgeInsets.only(top: 65),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
child: ExpansionTile( child: ExpansionTile(
@ -251,40 +356,60 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Text('No data found')); child: Text(TranslationBase.of(context)
.noDataAvailable));
else else
return Column( return Column(
children: [ children: [
Row( // Padding(padding: EdgeInsets.only(left:10, right:10),
mainAxisAlignment: // child:
MainAxisAlignment.spaceBetween, // Row(
children: <Widget>[ // mainAxisAlignment:
Expanded( // MainAxisAlignment.spaceBetween,
flex: 3, // children: <Widget>[
child: Text(TranslationBase.of(context) // Expanded(
.request)), // flex: 3,
Expanded( // child: Text(TranslationBase.of(context)
flex: 2, // .request)),
child: Text( // Expanded(
TranslationBase.of(context) // flex: 2,
.switchUser, // child: Text(
)), // TranslationBase.of(context)
Expanded( // .switchUser,
flex: 1, // )),
child: Text( // Expanded(
TranslationBase.of(context) // flex: 1,
.deleteView, // child: Text(
)), // TranslationBase.of(context)
], // .deleteView,
), // )),
// ],
// )),
Column(children: [ Column(children: [
Row(children: [ Padding(
Expanded(flex: 3, child: AppText('Name')), padding: EdgeInsets.only(
Expanded(flex: 1, child: AppText('Allow')), left: 10, right: 10),
Expanded(flex: 1, child: AppText('Reject')), child: Row(children: [
]), Expanded(
flex: 3,
child: AppText(
TranslationBase.of(context)
.theName)),
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context)
.allowView)),
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context)
.rejectView)),
])),
Column( Column(
children:familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList children: familyFileProvider
.allSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList
.map<Widget>((result) { .map<Widget>((result) {
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -302,8 +427,10 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
acceptRequest( acceptRemoveRequest(
result, context); result.iD,
3,
context);
}, },
)), )),
Expanded( Expanded(
@ -314,8 +441,10 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
deleteRequest( acceptRemoveRequest(
result, context); result.iD,
4,
context);
}, },
)) ))
], ],
@ -350,12 +479,25 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Text('No data found')); child: Text(TranslationBase.of(context)
.noDataAvailable));
else else
return SingleChildScrollView( return Container(
child: Container( height: SizeConfig.screenHeight * .3,
height: SizeConfig.screenHeight * .3, child: SingleChildScrollView(
child: ListView( child: Column(
children: [
Padding(
padding: EdgeInsets.only(
left: 10, right: 10),
child: Row(children: [
Expanded(
flex: 3,
child: AppText(
TranslationBase.of(context)
.theName))
])),
Column(
children: snapshot children: snapshot
.data.getAllSharedRecordsByStatusList .data.getAllSharedRecordsByStatusList
.map<Widget>((result) { .map<Widget>((result) {
@ -365,18 +507,25 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 3, flex: 3,
child: child: Text(
Text(result.patientName)), result.patientName)),
Expanded( Expanded(
flex: 2, flex: 2,
child: AppText( child: AppText(
result.statusDescription, result.statusDescription,
color: Colors.red, color: result.status == 3
? Colors.green
: result.status == 2
? Colors
.yellow[800]
: Colors.red,
)), )),
], ],
)); ));
}).toList(), }).toList(),
))); )
],
)));
} }
}) })
], ],
@ -390,8 +539,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
future: getUserViewRequest(), // async work future: getUserViewRequest(), // async work
builder: builder: (BuildContext context,
(BuildContext context, AsyncSnapshot<dynamic> snapshot) { AsyncSnapshot<dynamic> snapshot) {
switch (snapshot.connectionState) { switch (snapshot.connectionState) {
case ConnectionState.waiting: case ConnectionState.waiting:
return Padding( return Padding(
@ -401,59 +550,59 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding( return Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Text('No data found')); child: Text(TranslationBase.of(context)
.noDataAvailable));
else else
return Column( return Column(
children: [ 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: [ Column(children: [
Row(children: [ Padding(
Expanded(flex: 3, child: AppText('Name')), padding:
Expanded(flex: 1, child: AppText('Delete')), EdgeInsets.only(left: 10, right: 10),
]), child: Row(children: [
Expanded(
flex: 3,
child: AppText(
TranslationBase.of(context)
.theName)),
Expanded(
flex: 1,
child: AppText(
TranslationBase.of(context)
.deleteView)),
])),
Column( Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList children: familyFileProvider
.allSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList
.map<Widget>((result) { .map<Widget>((result) {
return Padding( return result.status == 3
padding: EdgeInsets.all(10), ? Padding(
child: Row( padding: EdgeInsets.all(10),
children: <Widget>[ child: Row(
Expanded( children: <Widget>[
flex: 3, Expanded(
child: Text(result.patientName)), flex: 3,
Expanded( child: AppText(
flex: 1, result.patientName)),
child: IconButton( Expanded(
icon: Icon( flex: 1,
Icons.delete, child: IconButton(
color: Colors.black, icon: Icon(
), Icons.delete,
onPressed: () { color: Colors.black,
deleteRequest( ),
result, context); onPressed: () {
}, deactivateRequest(
)), result.iD,
], 5,
)); context);
},
)),
],
))
: Container(
child: AppText(isAvailable()));
}).toList()) }).toList())
]) ])
], ],
@ -468,13 +617,24 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
); );
} }
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async { String isAvailable() {
if (await sharedPref.getObject(FAMILY_FILE) != null) { if (isVaiable == false) {
// print(await sharedPref.getObject(FAMILY_FILE)); this.isVaiable = true;
return Future.value(GetAllSharedRecordsByStatusResponse.fromJson( return TranslationBase.of(context).noDataAvailable;
await sharedPref.getObject(FAMILY_FILE)));
} else { } else {
return familyFileProvider.getSharedRecordByStatus(); return "";
}
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {
if (user != null) {
if (await sharedPref.getObject(FAMILY_FILE) != null) {
// print(await sharedPref.getObject(FAMILY_FILE));
return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(
await sharedPref.getObject(FAMILY_FILE)));
} else {
return familyFileProvider.getSharedRecordByStatus();
}
} }
} }
@ -514,25 +674,50 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
refreshFamily(context) { refreshFamily(context) {
sharedPref.remove(FAMILY_FILE); //sharedPref.remove(FAMILY_FILE);
(context as Element).reassemble(); setState(() {
sharedPref.remove(FAMILY_FILE);
});
} }
switchUser(user, context) { switchUser(user, context) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
// this
// .familyFileProvider
// .silentLoggin(user)
// .then((value) => loginAfter(value, context));
// Utils.showProgressDialog(context);
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user) .silentLoggin(user is AuthenticatedUser ? null : user,
.then((value) => loginAfter(value, context)); mainUser: user is AuthenticatedUser)
.then((value) {
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
loginAfter(value, context);
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
Navigator.of(context).pop();
});
} }
loginAfter(result, context) async{ loginAfter(result, context) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
var currentLang = await sharedPref.getString(APP_LANGUAGE);
result = list.CheckActivationCode.fromJson(result);
var familyFile = await sharedPref.getObject(FAMILY_FILE); var familyFile = await sharedPref.getObject(FAMILY_FILE);
result = CheckActivationCode.fromJson(result); var mainUser = await sharedPref.getObject(MAIN_USER);
this.sharedPref.clear(); this.sharedPref.clear();
this.sharedPref.setObject(FAMILY_FILE, familyFile); if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true;
}
this.sharedPref.setString(APP_LANGUAGE, currentLang);
this.sharedPref.setObject(MAIN_USER, mainUser);
//sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']);
this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(FAMILY_FILE, familyFile);
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);
//this.checkIfUserAgreedBefore(result), //this.checkIfUserAgreedBefore(result),
@ -541,6 +726,35 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
); );
} }
deleteRequest(result, context) {} deactivateRequest(ID, status, context) {
acceptRequest(result, context) {} GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.deactivateFamily(request).then((value) =>
{GifLoaderDialogUtils.hideDialog(context), refreshFamily(context)});
}
acceptRemoveRequest(ID, status, context) {
GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.acceptRejectFamily(request).then((value) =>
{GifLoaderDialogUtils.hideDialog(context), refreshFamily(context)});
}
checkUserData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data2 = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(MAIN_USER));
print(data2);
setState(() {
this.user = data;
});
}
}
} }

@ -1,11 +1,17 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.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/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_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'widgets/AppointmentActions.dart'; import 'widgets/AppointmentActions.dart';
@ -26,46 +32,51 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
static TabController _tabController; static TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false;
super.initState(); super.initState();
} }
@override @override
void dispose() { void dispose() {
// TODO: implement dispose
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
AppointmentDetails.showFooterButton = false;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.appo.doctorNameObj, appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true, isShowAppBar: true,
bottomSheet: AppointmentDetails.showFooterButton bottomSheet: AppointmentDetails.showFooterButton
? Container( ? Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 50.0, height: 50.0,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: goToBookConfirm, onPressed: goToBookConfirm,
child: Text(TranslationBase.of(context).bookNow, child: Text(TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
) )
: null, : null,
body: Container( body: Container(
color: new Color(0xFFf6f6f6), color: new Color(0xFFf6f6f6),
@ -88,7 +99,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), margin:
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
widget.appo.doctorTitle + widget.appo.doctorTitle +
@ -103,7 +115,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text(widget.appo.clinicName, child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[900], color: Colors.grey[900],
@ -123,19 +135,37 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
), ),
InkWell(
onTap: () {
getDoctorRatingsDetails();
},
child: Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
),
Container( Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
"(" + DateUtil.convertStringToDate(
widget.appo.noOfPatientsRate.toString() + widget.appo.appointmentDate),
" Reviews)", projectViewModel.isArabic ? "ar" : "en")),
style: TextStyle( ),
fontSize: 14.0, Container(
color: Colors.blue[800], alignment: Alignment.center,
letterSpacing: 1.0, child: Text(widget.appo.startTime.substring(0, 5)),
decoration: TextDecoration.underline,
)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
@ -171,8 +201,14 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: TabBarView( child: TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
children: [ children: [
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton), AppointmentActions(
DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment) appo: widget.appo,
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
], ],
controller: _tabController, controller: _tabController,
), ),
@ -207,7 +243,292 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
selectedTime: DocAvailableAppointments.selectedTime))); selectedTime: DocAvailableAppointments.selectedTime)));
} }
getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appo.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
doctorDetailsList.clear();
res['DoctorRatingDetailsList'].forEach((v) {
doctorDetailsList.add(new DoctorRateDetails.fromJson(v));
});
showRatingDialog(doctorDetailsList);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 400.0,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white,
child: Column(
children: [
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(
TranslationBase.of(context).doctorRating,
style: TextStyle(
fontSize: 22.0, color: Colors.white))),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(
this
.widget
.appo
.actualDoctorRate
.ceilToDouble()
.toString(),
style: TextStyle(
fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
this.widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
this.widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).v_good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context)
.below_average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 40.0),
child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 40.0,
child: RaisedButton(
elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(
TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
),
),
],
),
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.widget.appo.noOfPatientsRate) * 100;
return width;
}
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString();
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + " ";
});
return docSpeciality;
}
DoctorList getDoctorObject() { DoctorList getDoctorObject() {
DoctorList docObj = new DoctorList(); DoctorList docObj = new DoctorList();

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -27,6 +29,10 @@ class MyAppointments extends StatefulWidget {
List(); List();
List<PatientAppointmentList> _patientArrivedAppointmentListHospital = List(); List<PatientAppointmentList> _patientArrivedAppointmentListHospital = List();
List<PatientAppointmentList> _patientBookedAppointmentListClinic = List();
List<PatientAppointmentList> _patientConfirmedAppointmentListClinic = List();
List<PatientAppointmentList> _patientArrivedAppointmentListClinic = List();
@override @override
_MyAppointmentsState createState() => _MyAppointmentsState(); _MyAppointmentsState createState() => _MyAppointmentsState();
} }
@ -40,12 +46,28 @@ class _MyAppointmentsState extends State<MyAppointments>
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
List<ImagesInfo> imagesInfo = List();
FilterType filterType;
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
filterType = FilterType.Clinic;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory(); if (Provider.of<ProjectViewModel>(context, listen: false).isLogin)
getPatientAppointmentHistory();
}); });
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/1.png'));
super.initState(); super.initState();
} }
@ -54,6 +76,8 @@ class _MyAppointmentsState extends State<MyAppointments>
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myAppointments, appBarTitle: TranslationBase.of(context).myAppointments,
isShowAppBar: true, isShowAppBar: true,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMyAppointments,
body: Container( body: Container(
child: Column(children: [ child: Column(children: [
TabBar( TabBar(
@ -68,17 +92,55 @@ class _MyAppointmentsState extends State<MyAppointments>
color: Colors.grey[600], color: Colors.grey[600],
thickness: 0.5, thickness: 0.5,
), ),
Expanded( Row(
child: new TabBarView( children: <Widget>[
physics: NeverScrollableScrollPhysics(), Expanded(
children: [ flex: 1,
isDataLoaded ? getBookedAppointments() : Container(), child: InkWell(
isDataLoaded ? getConfirmedAppointments() : Container(), onTap: () => setFilterType(FilterType.Clinic),
isDataLoaded ? getArrivedAppointments() : Container() child: ListTile(
], title: Text(TranslationBase.of(context).clinic),
controller: _tabController, leading: Radio(
), value: FilterType.Clinic,
groupValue: filterType,
activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) {
setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => setFilterType(FilterType.Hospital),
child: ListTile(
title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: filterType,
activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) => setFilterType(value),
),
),
),
)
],
), ),
isDataLoaded
? Expanded(
child: new TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
getBookedAppointments(),
getConfirmedAppointments(),
getArrivedAppointments()
],
controller: _tabController,
),
)
: Container(),
]), ]),
), ),
); );
@ -96,24 +158,30 @@ class _MyAppointmentsState extends State<MyAppointments>
widget._patientConfirmedAppointmentListHospital.clear(); widget._patientConfirmedAppointmentListHospital.clear();
widget._patientArrivedAppointmentListHospital.clear(); widget._patientArrivedAppointmentListHospital.clear();
widget._patientBookedAppointmentListClinic.clear();
widget._patientConfirmedAppointmentListClinic.clear();
widget._patientArrivedAppointmentListClinic.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) { GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.hideDialog(context); setState(() {
setState(() { if (res['MessageStatus'] == 1) {
// setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
// isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v)); .add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
sortAppointmentList(); sortAppointmentList();
openAppointmentsTab();
isDataLoaded = true;
} else {} } else {}
}); // });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
isDataLoaded = true;
});
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -150,11 +218,31 @@ class _MyAppointmentsState extends State<MyAppointments>
}); });
widget.bookedAppoList.forEach((element) { widget.bookedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientBookedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientBookedAppointmentListClinic[widget
._patientBookedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientBookedAppointmentListClinic.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientBookedAppointmentListHospital widget._patientBookedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -167,16 +255,39 @@ class _MyAppointmentsState extends State<MyAppointments>
.add(element); .add(element);
} else { } else {
widget._patientBookedAppointmentListHospital.add(PatientAppointmentList( widget._patientBookedAppointmentListHospital.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element)); filterName: element.projectName,
patientDoctorAppointment: element));
} }
}); });
widget.confirmedAppoList.forEach((element) { widget.confirmedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientConfirmedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientConfirmedAppointmentListClinic[widget
._patientConfirmedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientConfirmedAppointmentListClinic.add(
PatientAppointmentList(
filterName: element.clinicName,
patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientConfirmedAppointmentListHospital widget._patientConfirmedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -190,17 +301,37 @@ class _MyAppointmentsState extends State<MyAppointments>
} else { } else {
widget._patientConfirmedAppointmentListHospital.add( widget._patientConfirmedAppointmentListHospital.add(
PatientAppointmentList( PatientAppointmentList(
filterName: element.clinicName, filterName: element.projectName,
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
}); });
widget.arrivedAppoList.forEach((element) { widget.arrivedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientArrivedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientArrivedAppointmentListClinic[widget
._patientArrivedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientArrivedAppointmentListClinic.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientArrivedAppointmentListHospital widget._patientArrivedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -214,9 +345,11 @@ class _MyAppointmentsState extends State<MyAppointments>
} else { } else {
widget._patientArrivedAppointmentListHospital.add( widget._patientArrivedAppointmentListHospital.add(
PatientAppointmentList( PatientAppointmentList(
filterName: element.clinicName, filterName: element.projectName,
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
openAppointmentsTab();
}); });
} }
@ -230,11 +363,11 @@ class _MyAppointmentsState extends State<MyAppointments>
} else if (flag == 3) { } else if (flag == 3) {
_tabController.index = 2; _tabController.index = 2;
} else { } else {
if (widget._patientBookedAppointmentListHospital.length != 0) { if (widget._patientBookedAppointmentListClinic.length != 0) {
_tabController.index = 0; _tabController.index = 0;
} else if (widget._patientConfirmedAppointmentListHospital.length != 0) { } else if (widget._patientConfirmedAppointmentListClinic.length != 0) {
_tabController.index = 1; _tabController.index = 1;
} else if (widget._patientArrivedAppointmentListHospital.length != 0) { } else if (widget._patientArrivedAppointmentListClinic.length != 0) {
_tabController.index = 2; _tabController.index = 2;
return; return;
} }
@ -250,24 +383,42 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientBookedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientBookedAppointmentListClinic.length
: widget._patientBookedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientBookedAppointmentListHospital[index] ? widget
.filterName, ._patientBookedAppointmentListClinic[index]
.filterName
: widget
._patientBookedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientBookedAppointmentListHospital[index] ? widget
.patientDoctorAppointmentList ._patientBookedAppointmentListClinic[index]
.map((doctor) { .patientDoctorAppointmentList
return AppointmentCard( .map((doctor) {
appo: doctor, return AppointmentCard(
onReloadAppointmentHistory: appo: doctor,
getPatientAppointmentHistory, onReloadAppointmentHistory:
); getPatientAppointmentHistory,
}).toList(), );
}).toList()
: widget
._patientBookedAppointmentListHospital[
index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)), )),
) )
], ],
@ -283,7 +434,7 @@ class _MyAppointmentsState extends State<MyAppointments>
"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("No Booked Appointments", child: Text(TranslationBase.of(context).noBookedAppo,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -305,24 +456,43 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientConfirmedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientConfirmedAppointmentListClinic.length
: widget
._patientConfirmedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientConfirmedAppointmentListHospital[index] ? widget
.filterName, ._patientConfirmedAppointmentListClinic[index]
.filterName
: widget
._patientConfirmedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientConfirmedAppointmentListHospital[index] ? widget
.patientDoctorAppointmentList ._patientConfirmedAppointmentListClinic[index]
.map((doctor) { .patientDoctorAppointmentList
return AppointmentCard( .map((doctor) {
appo: doctor, return AppointmentCard(
onReloadAppointmentHistory: appo: doctor,
getPatientAppointmentHistory, onReloadAppointmentHistory:
); getPatientAppointmentHistory,
}).toList(), );
}).toList()
: widget
._patientConfirmedAppointmentListHospital[
index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)), )),
) )
], ],
@ -338,8 +508,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(TranslationBase.of(context).noConfirmedAppo,
TranslationBase.of(context).noConfirmedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -359,24 +528,38 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientArrivedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientArrivedAppointmentListClinic.length
: widget._patientArrivedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientArrivedAppointmentListHospital[index] ? widget._patientArrivedAppointmentListClinic[index]
.filterName, .filterName
: widget._patientArrivedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientArrivedAppointmentListHospital[index] ? widget._patientArrivedAppointmentListClinic[index]
.patientDoctorAppointmentList .patientDoctorAppointmentList
.map((doctor) { .map((doctor) {
return AppointmentCard( return AppointmentCard(
appo: doctor, appo: doctor,
onReloadAppointmentHistory: onReloadAppointmentHistory:
getPatientAppointmentHistory, getPatientAppointmentHistory,
); );
}).toList(), }).toList()
: widget
._patientArrivedAppointmentListHospital[index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
), ),
), ),
) )
@ -393,15 +576,20 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: child: Text(TranslationBase.of(context).noArrivedAppo,
Text(TranslationBase.of(context).noArrivedAppointments, style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, )),
)),
), ),
], ],
), ),
), ),
); );
} }
setFilterType(FilterType filterType) {
setState(() {
this.filterType = filterType;
});
}
} }

@ -3,33 +3,33 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons { class ArrivedButtons {
static var buttons = [ static var buttons = [
{ // {
"title": "Arrived", // "title": TranslationBase.of(AppGlobal.context).arrived,
"subtitle": "Status", // "subtitle": TranslationBase.of(AppGlobal.context).status,
"icon": "assets/images/new-design/waiting-room.png", // "icon": "assets/images/new-design/waiting-room.png",
"caller": "openReschedule" // "caller": "openReschedule"
}, // },
{ {
"title": "Medicines", "title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": "Prescriptions", "subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
"icon": "assets/images/new-design/medicine_prescriptions_icon.png", "icon": "assets/images/new-design/medicine_prescriptions_icon.png",
"caller": "prescriptions" "caller": "prescriptions"
}, },
{ {
"title": "Radiology", "title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": "Services", "subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
"icon": "assets/images/new-design/radiology_service_icon.png", "icon": "assets/images/new-design/radiology_service_icon.png",
"caller": "radiology" "caller": "radiology"
}, },
{ {
"title": "Lab", "title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": "Result", "subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
"icon": "assets/images/new-design/lab_result_icon.png", "icon": "assets/images/new-design/lab_result_icon.png",
"caller": "labResult" "caller": "labResult"
}, },
{ {
"title": "Vital Signs", "title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": "Values", "subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": "assets/images/new-design/vital_signs.png", "icon": "assets/images/new-design/vital_signs.png",
"caller": "VitalSigns" "caller": "VitalSigns"
}, },
@ -40,20 +40,20 @@ class ArrivedButtons {
"caller": "insertComplaint" "caller": "insertComplaint"
}, },
{ {
"title": "Insurance", "title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": "Approvals", "subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png", "icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance" "caller": "Insurance"
}, },
{ {
"title": "Ask Your", "title": TranslationBase.of(AppGlobal.context).askDoctor,
"subtitle": "Doctor", "subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
"icon": "assets/images/new-design/ask_doctor_icon.png", "icon": "assets/images/new-design/ask_doctor_icon.png",
"caller": "askDoc" "caller": "askDoc"
}, },
{ {
"title": "Survey", "title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": "Service", "subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": "assets/images/new-design/survey.png", "icon": "assets/images/new-design/survey.png",
"caller": "Survey" "caller": "Survey"
} }

@ -1,7 +1,10 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
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/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
@ -14,9 +17,11 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.d
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
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/services/clinic_services/get_clinic_service.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -24,6 +29,7 @@ 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:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget { class AppointmentActions extends StatefulWidget {
@ -44,6 +50,8 @@ class AppointmentActions extends StatefulWidget {
class _AppointmentActionsState extends State<AppointmentActions> { class _AppointmentActionsState extends State<AppointmentActions> {
List<AppoDetailsButton> appoButtonsList = []; List<AppoDetailsButton> appoButtonsList = [];
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
_getAppointmentActionButtons(); _getAppointmentActionButtons();
@ -52,8 +60,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2; final double itemHeight = projectViewModel.isArabic
? ((size.height - kToolbarHeight - 24) * 0.5) / 2
: ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return Container( return Container(
@ -72,51 +84,62 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: () { onTap: () {
_handleButtonClicks(e); _handleButtonClicks(e);
}, },
child: Container( child: Column(
height: 100.0, mainAxisSize: MainAxisSize.max,
margin: EdgeInsets.all(9.0), children: [
decoration: BoxDecoration( Container(
boxShadow: [ // height: 100.0,
BoxShadow( margin: EdgeInsets.all(7.0),
color: Colors.grey[400], padding: EdgeInsets.only(bottom: 4.0),
blurRadius: 2.0, decoration: BoxDecoration(
spreadRadius: 0.0) boxShadow: [
], BoxShadow(
borderRadius: BorderRadius.circular(10), color: Colors.grey[400],
color: Colors.white), blurRadius: 2.0,
child: Column( spreadRadius: 0.0)
crossAxisAlignment: CrossAxisAlignment.start, ],
mainAxisSize: MainAxisSize.min, borderRadius: BorderRadius.circular(10),
children: <Widget>[ color: Colors.white),
Container( child: Column(
margin: crossAxisAlignment: CrossAxisAlignment.start,
EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), mainAxisSize: MainAxisSize.max,
child: Text(e.title, children: <Widget>[
overflow: TextOverflow.clip, Container(
style: TextStyle( margin:
color: new Color(0xFF40ACC9), EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
letterSpacing: 1.0, child: Text(e.title,
fontSize: 20.0)), overflow: TextOverflow.clip,
), style: TextStyle(
Container( color: new Color(0xFF40ACC9),
margin: letterSpacing: 1.0,
EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), fontSize: 18.0)),
child: Text(e.subtitle, ),
overflow: TextOverflow.clip, Container(
style: TextStyle( margin:
color: Colors.black, EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
letterSpacing: 1.0, child: Text(e.subtitle,
fontSize: 15.0)), overflow: TextOverflow.clip,
), style: TextStyle(
Container( color: Colors.black,
alignment: Alignment.bottomRight, letterSpacing: 1.0,
margin: fontSize: 15.0)),
EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0), ),
child: Image.asset(e.icon, Container(
width: 45.0, height: 45.0), alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(
10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(
0.0, 7.0, 10.0, 8.0),
child: Image.asset(e.icon,
width: 45.0, height: 45.0),
),
],
), ),
], ),
), ],
), ),
)) ))
.toList(), .toList(),
@ -175,6 +198,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
openAppointmentRadiology(); openAppointmentRadiology();
break; break;
case "labResult":
openAppointmentLabResults();
break;
case "prescriptions": case "prescriptions":
openPrescriptionReport(); openPrescriptionReport();
break; break;
@ -357,6 +384,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
getToDoCount();
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
@ -368,6 +396,49 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
openAppointmentLabResults() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders();
service
.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
widget.appo.projectID, widget.appo.clinicID, context)
.then((res) {
print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo =
res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo =
res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.projectID = widget.appo.projectID.toString();
print(patientLabOrders.invoiceNo);
print(patientLabOrders.orderNo);
navigateToLabResults(patientLabOrders);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
openAppointmentRadiology() { openAppointmentRadiology() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -376,11 +447,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context) .getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']); if (res['FinalRadiologyList'] != null) {
finalRadiology = print(res['FinalRadiologyList']);
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]); finalRadiology =
print(finalRadiology.reportData); new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
navigateToRadiologyDetails(finalRadiology); print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -394,19 +469,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
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); GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) { if (res['ListPRM'].length != 0) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); res['ListPRM'].forEach((report) {
}); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
print(prescriptionReportEnhList.length); });
if (prescriptionReportEnhList.length != 0) { print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport( navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: "Sorry there is no data"); AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}); });
} }
@ -423,6 +497,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
appo: widget.appo))); appo: widget.appo)));
} }
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {});
}
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async { Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
Navigator.push( Navigator.push(
context, context,

@ -1,6 +1,12 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import '../AppointmentDetails.dart'; import '../AppointmentDetails.dart';
@ -19,6 +25,7 @@ class AppointmentCard extends StatefulWidget {
class _ApointmentCardState extends State<AppointmentCard> { class _ApointmentCardState extends State<AppointmentCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return InkWell( return InkWell(
onTap: () { onTap: () {
navigateToAppointmentDetails(context, widget.appo); navigateToAppointmentDetails(context, widget.appo);
@ -42,7 +49,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
fit: BoxFit.fill, height: 60.0, width: 60.0), fit: BoxFit.fill, height: 60.0, width: 60.0),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.57, width: MediaQuery.of(context).size.width * 0.61,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -73,7 +80,12 @@ class _ApointmentCardState extends State<AppointmentCard> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(getDate(widget.appo.appointmentDate).trim(), child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")
.trim(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -97,13 +109,38 @@ class _ApointmentCardState extends State<AppointmentCard> {
Container( Container(
transform: transform:
Matrix4.translationValues(15.0, -40.0, 0.0), Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset( child: projectViewModel.isArabic
"assets/images/new-design/arrow.png", ? Image.asset(
width: 25.0, "assets/images/new-design/arrow_menu_black-ar.png",
height: 25.0), width: 25.0,
height: 25.0)
: Image.asset(
"assets/images/new-design/arrow_menu_black-en.png",
width: 25.0,
height: 25.0),
), ),
], ],
), ),
(widget.appo.patientStatusType == AppointmentType.BOOKED ||
widget.appo.patientStatusType ==
AppointmentType.CONFIRMED)
? Container(
child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch +
(widget.appo.remaniningHoursTocanPay * 1000) *
60,
widgetBuilder: (_, CurrentRemainingTime time) {
return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color: Color(0xff40ACC9)));
},
),
)
: Container(),
], ],
), ),
), ),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomRadio extends StatefulWidget { class CustomRadio extends StatefulWidget {
@ -21,17 +22,23 @@ class CustomRadioState extends State<CustomRadio> {
void initState() { void initState() {
super.initState(); super.initState();
if (widget.requestData != null) { WidgetsBinding.instance.addPostFrameCallback((_) {
widget.requestData.forEach((element) { if (widget.requestData != null) {
sampleData.add( widget.requestData.forEach((element) {
new RadioModel(false, element.description, element.parameterCode)); sampleData.add(new RadioModel(
}); false, element.description, element.parameterCode));
} else { });
sampleData.add(new RadioModel(false, "Before 30 Mins", 30)); } else {
sampleData.add(new RadioModel(false, 'Before 1 Hour', 60)); sampleData.add(new RadioModel(
sampleData.add(new RadioModel(false, 'Before 2 Hours', 120)); false, TranslationBase.of(context).appoReminder30, 30));
sampleData.add(new RadioModel(false, 'Before 4 Hours', 240)); sampleData.add(new RadioModel(
} false, TranslationBase.of(context).appoReminder60, 60));
sampleData.add(new RadioModel(
false, TranslationBase.of(context).appoReminder90, 90));
sampleData.add(new RadioModel(
false, TranslationBase.of(context).appoReminder120, 120));
}
});
} }
@override @override
@ -96,7 +103,7 @@ class RadioItem extends StatelessWidget {
), ),
), ),
new Container( new Container(
margin: new EdgeInsets.only(left: 15.0), margin: new EdgeInsets.only(left: 15.0, right: 15.0),
child: new Text(_item.text, style: TextStyle(fontSize: 16.0)), child: new Text(_item.text, style: TextStyle(fontSize: 16.0)),
), ),
], ],

@ -27,19 +27,18 @@ class _ReminderDialogState extends State<ReminderDialog> {
shape: shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.57, // height: MediaQuery.of(context).size.height * 0.57,
width: 450.0, width: 450.0,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(20.0), margin: EdgeInsets.all(20.0),
child: Text(TranslationBase.of(context).setReminder, child: Text(TranslationBase.of(context).setReminder,
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: "Open-Sans-Bold")),
), ),
Container( Container(
transform: Matrix4.translationValues(0.0, -30.0, 0.0), transform: Matrix4.translationValues(0.0, -30.0, 0.0),
@ -61,13 +60,12 @@ class _ReminderDialogState extends State<ReminderDialog> {
child: Text(TranslationBase.of(context).confirm, child: Text(TranslationBase.of(context).confirm,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: 'Open-Sans-Bold')),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0), margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0, bottom: 20.0),
child: OutlineButton( child: OutlineButton(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)), borderRadius: BorderRadius.circular(10.0)),
@ -81,8 +79,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
child: Text(TranslationBase.of(context).cancel_nocaps, child: Text(TranslationBase.of(context).cancel_nocaps,
style: TextStyle( style: TextStyle(
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: 'Open-Sans-Bold')),
), ),
), ),
]), ]),

@ -1,14 +1,18 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.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/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/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
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/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -18,7 +22,10 @@ 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: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_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
class ToDo extends StatefulWidget { class ToDo extends StatefulWidget {
@ -27,6 +34,10 @@ class ToDo extends StatefulWidget {
var languageID; var languageID;
MyInAppBrowser browser; MyInAppBrowser browser;
bool isShowAppBar = true;
ToDo({@required this.isShowAppBar});
@override @override
_ToDoState createState() => _ToDoState(); _ToDoState createState() => _ToDoState();
} }
@ -38,19 +49,34 @@ class _ToDoState extends State<ToDo> {
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
List<ImagesInfo> imagesInfo = List();
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
widget.patientShareResponse = new PatientShareResponse(); widget.patientShareResponse = new PatientShareResponse();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (authenticatedUserObject.isLogin) getPatientAppointmentHistory(); if (authenticatedUserObject.isLogin) getPatientData();
}); });
super.initState(); super.initState();
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo,
isShowAppBar: widget.isShowAppBar,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -85,11 +111,15 @@ class _ToDoState extends State<ToDo> {
height: 20.0), height: 20.0),
Container( Container(
margin: margin:
EdgeInsets.only(left: 5.0, right: 20.0), EdgeInsets.only(left: 10.0, right: 10.0),
child: Text( child: Text(
getDate(widget DateUtil.getWeekDayMonthDayYearDateFormatted(
.appoList[index].appointmentDate), DateUtil.convertStringToDate(widget
style: TextStyle(fontSize: 11.0)), .appoList[index].appointmentDate),
projectViewModel.isArabic
? "ar"
: "en") + " " + widget.appoList[index].startTime.substring(0, 5),
style: TextStyle(fontSize: 10.0)),
), ),
widget.appoList[index].isLiveCareAppointment widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset( ? SvgPicture.asset(
@ -117,7 +147,7 @@ class _ToDoState extends State<ToDo> {
: "-", : "-",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
maxLines: 2, maxLines: 2,
style: TextStyle(fontSize: 11.0)), style: TextStyle(fontSize: 10.0)),
), ),
], ],
), ),
@ -197,6 +227,28 @@ class _ToDoState extends State<ToDo> {
), ),
], ],
), ),
Container(
child: CountdownTimer(
endTime: DateTime.now()
.millisecondsSinceEpoch +
(widget.appoList[index]
.remaniningHoursTocanPay *
1000) *
60,
widgetBuilder:
(_, CurrentRemainingTime time) {
return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(
context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color:
Color(0xff40ACC9)));
},
),
),
], ],
), ),
), ),
@ -426,7 +478,8 @@ class _ToDoState extends State<ToDo> {
} }
getLanguageID() async { getLanguageID() async {
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() { setState(() {
widget.languageID = languageID; widget.languageID = languageID;
}); });
@ -473,6 +526,19 @@ class _ToDoState extends State<ToDo> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -488,17 +554,14 @@ class _ToDoState extends State<ToDo> {
}); });
} else {} } else {}
}); });
widget.appoList.forEach((element) { getToDoCount();
print(element.isLiveCareAppointment);
print(element.nextAction);
});
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); err != null ?? AppToast.showErrorToast(message: err);
}); });
} }
@ -606,6 +669,9 @@ class _ToDoState extends State<ToDo> {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser);
} }
@ -663,8 +729,8 @@ class _ToDoState extends State<ToDo> {
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, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context) res['Fort_id'], res['PaymentMethod'], context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
@ -696,6 +762,19 @@ class _ToDoState extends State<ToDo> {
}); });
} }
getPatientData() async {
AppSharedPreferences sharedPref = AppSharedPreferences();
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
setState(() {
print(data);
authUser = data;
});
getPatientAppointmentHistory();
}
}
Future navigateToPaymentMethod( Future navigateToPaymentMethod(
context, context,
PatientShareResponse patientShareResponse, PatientShareResponse patientShareResponse,

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
@ -31,6 +32,41 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bool isShowListAppointHistory = true; bool isShowListAppointHistory = true;
String message; String message;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
MessageType messageType = MessageType.NON;
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;
}
setMessageType(MessageType messageType) {
setState(() {
this.messageType = messageType;
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -55,7 +91,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
child: Texts( child: Texts(
TranslationBase.of(context).likeToHear, TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center, textAlign: TextAlign.center,
variant: 'body2Link',
), ),
), ),
InkWell( InkWell(
@ -75,9 +110,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Container( Container(
child: Texts( child: Texts(
model.getSelected(context), getSelected(context),
variant: 'bodyText', variant: 'bodyText',
), ),
margin: EdgeInsets.only(left: 10,right: 10), margin: EdgeInsets.only(left: 10,right: 10),
@ -91,7 +125,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
), ),
), ),
if (appointHistory != null && model.messageType == if (appointHistory != null && messageType ==
MessageType.ComplaintOnAnAppointment) MessageType.ComplaintOnAnAppointment)
InkWell( InkWell(
onTap: () { onTap: () {
@ -167,12 +201,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
), ),
), ),
if (model.messageType == if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 &&
MessageType.ComplaintOnAnAppointment &&
model.appointHistoryList.length != 0 &&
isShowListAppointHistory) isShowListAppointHistory)
Container( Container(
height: MediaQuery.of(context).size.height * 0.4, height: model.appointHistoryList.length>2?MediaQuery.of(context).size.height * 0.25:MediaQuery.of(context).size.height * 0.15,
child: ListView.builder( child: ListView.builder(
itemCount: model.appointHistoryList.length, itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => InkWell( itemBuilder: (context, index) => InkWell(
@ -285,7 +317,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
hintColor: Colors.black, hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
validator: (value) { validator: (value) {
if (value == null) if (value.isEmpty)
return TranslationBase.of(context).emptySubject; return TranslationBase.of(context).emptySubject;
else else
return null; return null;
@ -303,7 +335,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
minLines: 13, minLines: 13,
controller: messageController, controller: messageController,
validator: (value) { validator: (value) {
if (value == null) if (value.isEmpty)
return TranslationBase.of(context).emptyMessage; return TranslationBase.of(context).emptyMessage;
else else
return null; return null;
@ -376,7 +408,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
)), )),
SizedBox( SizedBox(
height: 30, height: 45,
), ),
], ],
), ),
@ -396,14 +428,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () { onTap: () {
final form = formKey.currentState; final form = formKey.currentState;
if (form.validate()) if (model.messageType != MessageType.NON) if (form.validate()) if (messageType != MessageType.NON)
model model
.sendCOCItem( .sendCOCItem(
title: titleController.text, title: titleController.text,
attachment: images.length > 0 ? images[0] : "", attachment: images.length > 0 ? images[0] : "",
details: messageController.text, details: messageController.text,
cOCTypeName: getCOCName(model), cOCTypeName: getCOCName(),
appointHistory: model.messageType == appointHistory:messageType ==
MessageType.ComplaintOnAnAppointment MessageType.ComplaintOnAnAppointment
? appointHistory ? appointHistory
: null) : null)
@ -414,7 +446,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
messageController.text = ""; messageController.text = "";
images = []; images = [];
}); });
model.setMessageType(MessageType.NON); setMessageType(MessageType.NON);
AppToast.showSuccessToast( AppToast.showSuccessToast(
message: TranslationBase.of(context).yourFeedback); message: TranslationBase.of(context).yourFeedback);
} else { } else {
@ -433,8 +465,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
); );
} }
String getCOCName(FeedbackViewModel model) { String getCOCName() {
switch (model.messageType) { switch (messageType) {
case MessageType.ComplaintOnAnAppointment: case MessageType.ComplaintOnAnAppointment:
return "1"; return "1";
break; break;
@ -462,15 +494,18 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
showDialog( showDialog(
context: context, context: context,
child: FeedbackTypeDialog( child: FeedbackTypeDialog(
messageTypeDialog: messageType,
onValueSelected: (MessageType value) { onValueSelected: (MessageType value) {
if (value == MessageType.ComplaintOnAnAppointment) { if (value == MessageType.ComplaintOnAnAppointment) {
GifLoaderDialogUtils.showMyDialog(context);
model.getPatentAppointmentHistory().then((value) { model.getPatentAppointmentHistory().then((value) {
GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
appointHistory = null; appointHistory = null;
}); });
}); });
} }
model.setMessageType(value); setMessageType(value);
}, },
)); ));
} }
@ -478,14 +513,30 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
class FeedbackTypeDialog extends StatefulWidget { class FeedbackTypeDialog extends StatefulWidget {
final Function(MessageType) onValueSelected; final Function(MessageType) onValueSelected;
final MessageType messageTypeDialog;
const FeedbackTypeDialog({Key key, this.onValueSelected}) : super(key: key); const FeedbackTypeDialog({Key key, this.onValueSelected, this.messageTypeDialog=MessageType.NON}) : super(key: key);
@override @override
State createState() => new FeedbackTypeDialogState(); State createState() => new FeedbackTypeDialogState();
} }
class FeedbackTypeDialogState extends State<FeedbackTypeDialog> { class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
MessageType messageTypeDialog = MessageType.NON;
setMessageDialogType(MessageType messageType) {
setState(() {
messageTypeDialog = messageType;
});
}
@override
void initState() {
messageTypeDialog = widget.messageTypeDialog;
super.initState();
}
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
builder: (_, model, widge) => SimpleDialog( builder: (_, model, widge) => SimpleDialog(
@ -507,16 +558,16 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => model.setMessageDialogType( onTap: () => setMessageDialogType(
MessageType.ComplaintOnAnAppointment), MessageType.ComplaintOnAnAppointment),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).complainAppo), title: Texts(TranslationBase.of(context).complainAppo),
leading: Radio( leading: Radio(
value: MessageType.ComplaintOnAnAppointment, value: MessageType.ComplaintOnAnAppointment,
groupValue: model.messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), setMessageDialogType(value),
), ),
), ),
), ),
@ -531,16 +582,16 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => model.setMessageDialogType( onTap: () => setMessageDialogType(
MessageType.ComplaintWithoutAppointment), MessageType.ComplaintWithoutAppointment),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).complainWithoutAppo), title: Texts(TranslationBase.of(context).complainWithoutAppo),
leading: Radio( leading: Radio(
value: MessageType.ComplaintWithoutAppointment, value: MessageType.ComplaintWithoutAppointment,
groupValue: model.messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), setMessageDialogType(value),
), ),
), ),
), ),
@ -556,15 +607,15 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () =>
model.setMessageDialogType(MessageType.Question), setMessageDialogType(MessageType.Question),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).question), title: Texts(TranslationBase.of(context).question),
leading: Radio( leading: Radio(
value: MessageType.Question, value: MessageType.Question,
groupValue: model.messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), setMessageDialogType(value),
), ),
), ),
), ),
@ -580,15 +631,15 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () =>
model.setMessageDialogType(MessageType.Compliment), setMessageDialogType(MessageType.Compliment),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).compliment), title: Texts(TranslationBase.of(context).compliment),
leading: Radio( leading: Radio(
value: MessageType.Compliment, value: MessageType.Compliment,
groupValue: model.messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), setMessageDialogType(value),
), ),
), ),
), ),
@ -604,15 +655,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () =>
model.setMessageDialogType(MessageType.Suggestion), setMessageDialogType(MessageType.Suggestion),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).suggestion), title: Texts(TranslationBase.of(context).suggestion),
leading: Radio( leading: Radio(
value: MessageType.Suggestion, value: MessageType.Suggestion,
groupValue: model.messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
model.setMessageDialogType(value),
), ),
), ),
), ),
@ -644,7 +694,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context).cancel, TranslationBase.of(context).cancel,
color: Colors.red, color: Theme.of(context).primaryColor,
), ),
), ),
), ),
@ -660,7 +710,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.onValueSelected(model.messageTypeDialog); widget.onValueSelected(messageTypeDialog);
Navigator.pop(context); Navigator.pop(context);
}, },
child: Padding( child: Padding(

@ -14,7 +14,6 @@ class StatusFeedbackPage extends StatefulWidget {
} }
class _StatusFeedbackPageState extends State<StatusFeedbackPage> { class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
@ -23,64 +22,85 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false, isShowDecPage: false,
body: Container( body: model.cOCItemList.isNotEmpty
margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ), ? Container(
padding: EdgeInsets.all(15.0), margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
child: ListView.builder( padding: EdgeInsets.all(15.0),
itemCount: model.cOCItemList.length, child: ListView.builder(
itemBuilder: (context, index) => Container( itemCount: model.cOCItemList.length,
decoration: BoxDecoration( itemBuilder: (context, index) => Container(
shape: BoxShape.rectangle, decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 0.5), shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(5)), border: Border.all(color: Colors.white, width: 0.5),
color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(5)),
), color: Colors.white,
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 8,),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
), ),
Expanded( margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts('${model.cOCItemList[index].status}'), SizedBox(
Texts( height: 8,
'${model.cOCItemList[index].date}',
variant: 'overline',
), ),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
'${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number +
' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
'${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
),
],
),
),
],
),
Texts('${model.cOCItemList[index].formType}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
], ],
), ),
), ),
], )),
), )
Texts('${model.cOCItemList[index].formType}'), : Container(
Divider(height: 4.5,color: Colors.grey[500],) child: Center(
child: Column(
children: [
SizedBox(height: MediaQuery.of(context).size.height*0.4,),
Image.asset('assets/images/comments.png',width: 80,height: 80,),
SizedBox(height: 15,),
Texts(TranslationBase.of(context).noSearchResult),
], ],
), ),
), ),
)), ),
),
), ),
); );
} }

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -18,8 +20,20 @@ class InsuranceApproval extends StatefulWidget {
} }
class _InsuranceApprovalState extends State<InsuranceApproval> { class _InsuranceApprovalState extends State<InsuranceApproval> {
List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: widget.appointmentNo != null onModelReady: widget.appointmentNo != null
? (model) => ? (model) =>
@ -32,6 +46,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
appBarTitle: TranslationBase.of(context).approvals, appBarTitle: TranslationBase.of(context).approvals,
description: TranslationBase.of(context).infoApprovals, description: TranslationBase.of(context).infoApprovals,
infoList: TranslationBase.of(context).infoApprovalPoints, infoList: TranslationBase.of(context).infoApprovalPoints,
imagesInfo: imagesInfo,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -48,27 +63,24 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Text( Texts(
TranslationBase.of(context).totalApproval, TranslationBase.of(context).totalApproval,
style: TextStyle(
color: Color(0xff60688B), color: Color(0xff60688B),
fontSize: 19.0, fontSize: 19.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
),
), ),
if (model.insuranceApproval.length > 0) if (model.insuranceApproval.length > 0)
Container( Container(
width: SizeConfig.widthMultiplier * 18.0, width: 60,
height: SizeConfig.heightMultiplier * 2.8, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffC5272D), color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(19.0)), borderRadius: BorderRadius.circular(19.0)),
child: Center( child: Center(
child: Text( child: Texts(
model.insuranceApproval[0].unUsedCount model.insuranceApproval[0].unUsedCount
.toString(), .toString(),
style: TextStyle( color: Colors.white, fontSize: 17.0,
color: Colors.white, fontSize: 19.0),
), ),
)) ))
], ],
@ -87,29 +99,21 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
model.insuranceApproval[index] model.insuranceApproval[index].patientDescription == "In Patient"
.patientDescription ==
"In Patient"
? Container( ? Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffB8372C), color: Theme.of(context).primaryColor,
borderRadius: borderRadius:
BorderRadius.circular( BorderRadius.circular(
16.0)), 16.0)),
width: 95.0, width: 115.0,
padding: padding:
EdgeInsets.only(left: 11.5), EdgeInsets.only(left: 11.5),
child: Text( child: Center(
model.insuranceApproval[index] child: Texts(
.patientDescription == TranslationBase.of(context).inPatient,
null color: Colors.white,
? '' ),
: model
.insuranceApproval[
index]
.patientDescription,
style: TextStyle(
color: Colors.white),
), ),
) )
: Container( : Container(
@ -118,41 +122,31 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
borderRadius: borderRadius:
BorderRadius.circular( BorderRadius.circular(
16.0)), 16.0)),
width: 95.0, width: 115.0,
padding: padding:
EdgeInsets.only(left: 11.5), EdgeInsets.only(left: 11.5),
child: Text( child: Center(
model.insuranceApproval[index] child: Texts(
.patientDescription == TranslationBase.of(context).outpatient,
null color: Colors.white,
? '' ),
: model
.insuranceApproval[
index]
.patientDescription,
style: TextStyle(
color: Colors.white),
), ),
), ),
Padding( Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 10.0), vertical: 10.0),
child: Text( child: Texts(
model.insuranceApproval[index] model.insuranceApproval[index]
.clinicName, .clinicName,
style: TextStyle( fontSize: 20.0,
fontSize: 20.0, color: Color(0xff60686B),
color: Color(0xff60686B), fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600,
),
), ),
), ),
Text( Texts(
model.insuranceApproval[index] model.insuranceApproval[index]
.doctorName, .doctorName,
style: TextStyle( fontSize: 17.0,
fontSize: 17.0,
fontStyle: FontStyle.italic),
), ),
], ],
), ),
@ -165,45 +159,53 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Row(
TranslationBase.of(context) children: [
.approvalNo + Texts(
model.insuranceApproval[index] TranslationBase.of(context).approvalNo,
.approvalNo fontSize: 18.0,
.toString(), ),
style: TextStyle( Texts(model.insuranceApproval[index].approvalNo.toString(),
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,),
), ],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 25.0, height: 25.0,
thickness: 1.0, thickness: 1.0,
), ),
Text( Row(
TranslationBase.of(context) children: [
.procedureStatus + Texts(
model.insuranceApproval[index] TranslationBase.of(context).procedureStatus ,
.approvalStatusDescption, fontSize: 17.5,
style: TextStyle( ),
SizedBox(width: 12,),
Texts(
model.insuranceApproval[index].approvalStatusDescption,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 17.5), fontSize: 17.5,
),
],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 25.0, height: 25.0,
thickness: 1.0, thickness: 1.0,
), ),
Text( Row(
TranslationBase.of(context) children: [
.unusedCount + Texts(
model.insuranceApproval[index] TranslationBase.of(context).unusedCount,
.unUsedCount
.toString(),
style: TextStyle(
fontSize: 17.5, fontSize: 17.5,
fontWeight: FontWeight.w600), ),
Texts(
model.insuranceApproval[index].unUsedCount.toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
@ -222,13 +224,10 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
// fontSize: 17.5, // fontSize: 17.5,
// fontWeight: FontWeight.w600), // fontWeight: FontWeight.w600),
// ), // ),
Text( Texts(
TranslationBase.of(context) TranslationBase.of(context).companyName,
.companyName,
style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 17.5, fontSize: 17.5,
),
), ),
Divider( Divider(
@ -236,32 +235,42 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 25.0, height: 25.0,
thickness: 1.0, thickness: 1.0,
), ),
Text( Row(
TranslationBase.of(context) children: [
.receiptOn + Texts(
convertDateFormat(model TranslationBase.of(context).receiptOn ,
.insuranceApproval[index] fontSize: 17.5,
.rceiptOn), fontWeight: FontWeight.w600,
style: TextStyle(
fontSize: 17.5, ),
fontWeight: FontWeight.w600, Texts(
), convertDateFormat(model.insuranceApproval[index].rceiptOn),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 25.0, height: 25.0,
thickness: 1.0, thickness: 1.0,
), ),
Text( Row(
TranslationBase.of(context) children: [
.expiryDate + Texts(
convertDateFormat(model TranslationBase.of(context).expiryDate,
.insuranceApproval[index] fontSize: 17.5,
.expiryDate), fontWeight: FontWeight.w600,
style: TextStyle(
fontSize: 17.5, ),
fontWeight: FontWeight.w600, Texts(
), convertDateFormat(model.insuranceApproval[index].expiryDate),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -24,11 +25,19 @@ class InsuranceCard extends StatefulWidget {
@override @override
_InsuranceCardState createState() => _InsuranceCardState(); _InsuranceCardState createState() => _InsuranceCardState();
} }
//TODO fix it
class _InsuranceCardState extends State<InsuranceCard> { class _InsuranceCardState extends State<InsuranceCard> {
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>(); InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsurance(), onModelReady: (model) => model.getInsurance(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
@ -39,6 +48,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
appBarTitle: TranslationBase.of(context).insuranceCards, appBarTitle: TranslationBase.of(context).insuranceCards,
description: TranslationBase.of(context).infoInsuranceCards, description: TranslationBase.of(context).infoInsuranceCards,
infoList: TranslationBase.of(context).infoInsuranceCardsPoints, infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo,
body: Container( body: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004, left: SizeConfig.screenWidth * 0.004,
@ -74,16 +84,16 @@ class _InsuranceCardState extends State<InsuranceCard> {
padding: EdgeInsets.all(14), padding: EdgeInsets.all(14),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.grey,width: 0.2), border: Border.all(
borderRadius: BorderRadius.all(Radius.circular(2)), color: Colors.grey, width: 0.2),
boxShadow: [ borderRadius:
BoxShadow( BorderRadius.all(Radius.circular(2)),
color: Colors.white70, boxShadow: [
), BoxShadow(
color: Colors.white70,
] ),
), ]),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -91,6 +101,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
TranslationBase.of(context).companyName + TranslationBase.of(context).companyName +
model.insurance[index].companyName, model.insurance[index].companyName,
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.w700,
), ),
Divider( Divider(
color: Colors.black, color: Colors.black,
@ -98,45 +109,59 @@ class _InsuranceCardState extends State<InsuranceCard> {
thickness: 0.5, thickness: 0.5,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Text( Texts(
TranslationBase.of(context).category + TranslationBase.of(context).category +": "+
model.insurance[index].subCategoryDesc, model.insurance[index]
style: TextStyle(fontSize: 18.5), .subCategoryDesc,
fontSize: 18.5,
), ),
Text( Row(
TranslationBase.of(context).expirationDate + children: [
convertDateFormat( Texts(
model.insurance[index].cardValidTo), TranslationBase.of(context)
style: TextStyle(fontSize: 18.5), .expirationDate +": "+
convertDateFormat(model
.insurance[index].cardValidTo),
fontSize: 18.5,
),
Expanded(
child: Column(
children: <Widget>[
model.insurance[index].isActive == true
? Texts(
TranslationBase.of(context)
.activeInsurence,
color: Colors.green,
fontWeight: FontWeight.w900,
fontSize: 17.9)
: Texts(
TranslationBase.of(context)
.notActive,
color: Colors.red,
fontWeight: FontWeight.w900,
fontSize: 17.9)
],
),
),
],
), ),
Text( Texts(
TranslationBase.of(context).patientCard + TranslationBase.of(context)
model.insurance[index].patientCardID, .patientCard +": "+
style: TextStyle(fontSize: 18.5),
),
Text(
TranslationBase.of(context).policyNumber +
model model
.insurance[index].insurancePolicyNumber, .insurance[index].patientCardID,
style: TextStyle(fontSize: 18.5), fontSize: 18.5,
),
Texts(
TranslationBase.of(context)
.policyNumber +" "+
model.insurance[index]
.insurancePolicyNumber,
fontSize: 18.5,
), ),
],
),
Column(
children: <Widget>[
model.insurance[index].isActive == true
? Text('Active',
style: TextStyle(
color: Colors.green,
fontWeight: FontWeight.w900,
fontSize: 17.9))
: Text('Not Active',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.w900,
fontSize: 17.9))
], ],
), ),
SizedBox( SizedBox(
@ -146,8 +171,11 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container( Container(
color: Colors.transparent, color: Colors.transparent,
child: SecondaryButton( child: SecondaryButton(
onTap:()=>{ getDetails(model.insurance[index])}, onTap: () => {
label: TranslationBase.of(context).seeDetails, getDetails(model.insurance[index])
},
label: TranslationBase.of(context)
.seeDetails,
textColor: Colors.white, textColor: Colors.white,
), ),
width: double.infinity, width: double.infinity,
@ -155,8 +183,6 @@ class _InsuranceCardState extends State<InsuranceCard> {
], ],
), ),
), ),
], ],
), ),
], ],
@ -186,13 +212,13 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString(); return newDate.toString();
} }
getDetails(data){
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => { _insuranceCardService.getInsuranceDetails(data).then((value) => {
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
Navigator.push(context, Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value[0]['CheckList']))) FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
});
});
} }
} }

@ -1,35 +1,29 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.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/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:html/dom.dart' as dom; import 'package:html/dom.dart' as dom;
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class InsuranceCardDetails extends StatefulWidget { class InsuranceCardDetails extends StatelessWidget {
final String data; final String data;
InsuranceCardDetails({this.data}); InsuranceCardDetails({this.data});
@override
_InsuranceCardInsuranceCardDetailsState createState() => _InsuranceCardInsuranceCardDetailsState();
}
//TODO fix it
class _InsuranceCardInsuranceCardDetailsState extends State<InsuranceCardDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return return AppScaffold(
AppScaffold( isShowAppBar: true,
isShowAppBar: true, appBarTitle: TranslationBase.of(context).cardDetail,
body: Center(
body: Center( child: SingleChildScrollView(
child: SingleChildScrollView(
child: Html( child: Html(
data:widget.data, data: data,
) ),
) ),
), ),
); );
} }
} }

@ -1,14 +1,16 @@
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
class InsuranceUpdate extends StatefulWidget { class InsuranceUpdate extends StatefulWidget {
@override @override
@ -18,6 +20,7 @@ class InsuranceUpdate extends StatefulWidget {
class _InsuranceUpdateState extends State<InsuranceUpdate> class _InsuranceUpdateState extends State<InsuranceUpdate>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@override @override
void initState() { void initState() {
@ -30,12 +33,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
_tabController.dispose(); _tabController.dispose();
} }
//TODO implement update card
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsuranceUpdated(), onModelReady: (model) => model.getInsuranceUpdated(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBarTitle: 'Insurance Cards', appBarTitle: TranslationBase.of(context).insurCards,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(
@ -63,7 +67,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
isScrollable: true, isScrollable: true,
indicatorWeight: 4.0, indicatorWeight: 4.0,
indicatorColor: Colors.red, indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.symmetric( labelPadding: EdgeInsets.symmetric(
horizontal: 13.0, vertical: 2.0), horizontal: 13.0, vertical: 2.0),
@ -72,13 +76,14 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts('Card'), child: Texts(TranslationBase.of(context)
.updateInsuranceSubtitle),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts('History'), child: Texts(TranslationBase.of(context).history),
), ),
), ),
], ],
@ -97,83 +102,194 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
Container( Container(
child: ListView.builder( child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, ? ListView.builder(
itemBuilder: (BuildContext context, int index) { itemCount: model.getAllSharedRecordsByStatusResponse
return Container( .getAllSharedRecordsByStatusList.length,
margin: EdgeInsets.all(10.0), itemBuilder: (BuildContext context, int index) {
child: Card( return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), ? Container(
color: Colors.white, margin: EdgeInsets.all(10.0),
shape: RoundedRectangleBorder( child: Card(
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.fromLTRB(
), 8.0, 16.0, 8.0, 8.0),
child: Container( color: Colors.white,
width: MediaQuery.of(context).size.width, shape: RoundedRectangleBorder(
padding: EdgeInsets.all(10.0), borderRadius:
child: Row( BorderRadius.circular(10),
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0, left: 10.0, right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index].patientName,
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight: FontWeight.w500,
letterSpacing: 1.0)),
Text(
'File No.' +
model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index].patientID.toString(),
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight: FontWeight.w500,
letterSpacing: 1.0)),
],
), ),
), child: Container(
), width:
Expanded( MediaQuery.of(context).size.width,
flex: 2, padding: EdgeInsets.all(10.0),
child: Container( child: Row(
// height: MediaQuery.of(context).size.height * 0.12, crossAxisAlignment:
margin: EdgeInsets.only(top: 2.0), CrossAxisAlignment.start,
child: Column( mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Expanded(
child: SecondaryButton( flex: 3,
label: 'Update', child: Container(
small: true, margin: EdgeInsets.only(
textColor: Colors.white, top: 2.0,
// color: Colors.grey, left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
), ),
//height: 45, if (false)
// width:90 Expanded(
), flex: 2,
], child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
],
),
), ),
), ),
) )
], : Container();
})
: Container(
height: 80,
margin: EdgeInsets.all(10.0),
child: Column(
children: [
SizedBox(height: 65,),
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
model.user.firstName+" "+model.user.lastName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model.user.patientID.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
), ),
), if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
],
), ),
); ),
}), ],
),
),
), ),
Container( Container(
child: ListView.builder( child: ListView.builder(
@ -210,35 +326,40 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text("TAMER FANASHEH ", Texts(
style: TextStyle( model.user.firstName +
fontSize: 14.0, " " +
color: Colors.black, model.user.lastName,
fontWeight: fontSize: 14,
FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 1.0)), color: Colors.black,
Text( ),
'File No.' + SizedBox(
model height: 8,
.insuranceUpdate[ ),
index] Texts(
.patientID TranslationBase.of(context)
.toString(), .fileno +
style: TextStyle( ": " +
fontSize: 14.0, model
color: Colors.black, .insuranceUpdate[
fontWeight: index]
FontWeight.w500, .patientID
letterSpacing: 1.0)), .toString(),
Text( fontSize: 14,
model.insuranceUpdate[index] fontWeight: FontWeight.w500,
.createdOn, color: Colors.black,
style: TextStyle( ),
fontSize: 14.0, SizedBox(
color: Colors.black, height: 8,
fontWeight: ),
FontWeight.w500, Texts(
letterSpacing: 1.0)), model.insuranceUpdate[index]
.createdOn,
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.black,
),
], ],
), ),
), ),
@ -246,7 +367,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(
// height: MediaQuery.of(context).size.height * 0.12,
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -257,15 +377,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 13.5, left: 2.0), top: 13.5, left: 2.0),
child: Text( child: Texts(
model model.insuranceUpdate[index]
.insuranceUpdate[ .statusDescription,
index] textAlign: TextAlign.center,
.statusDescription, fontSize: 12,
textAlign: color: Colors.black,
TextAlign.center, ),
style: TextStyle(
fontSize: 12.0)),
), ),
], ],
), ),
@ -288,4 +406,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
), ),
); );
} }
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getInsuranceDetails(data).then((value) => {
GifLoaderDialogUtils.hideDialog(context),
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
});
}
} }

@ -29,6 +29,10 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import '../../widgets/data_display/medical/LabResult/LineChartCurved.dart';
import '../../locator.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
final Function goToMyProfile; final Function goToMyProfile;
@ -39,10 +43,16 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
@ -679,7 +689,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
SizedBox( SizedBox(
height: 120, height: 130,
) )
], ],
), ),

@ -35,7 +35,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
import 'home_page.dart'; import 'home_page.dart';
@ -54,16 +54,21 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
PageController pageController; PageController pageController;
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
var notificationCount = ''; var notificationCount = '';
var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider(); final authService = new AuthProvider();
var event = RobotProvider(); var event = RobotProvider();
void _requestIOSPermissions() { void _requestIOSPermissions() {
flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions( flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions(
alert: true, alert: true,
badge: true, badge: true,
sound: true, sound: true,
@ -71,7 +76,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
bool isPageNavigated = false; bool isPageNavigated = false;
LocationUtils locationUtils;
_changeCurrentTab(int tab) { _changeCurrentTab(int tab) {
setState(() { setState(() {
currentTab = tab; currentTab = tab;
@ -93,12 +98,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print("didChangeAppLifecycleState"); print("didChangeAppLifecycleState");
print('state = $state'); print('state = $state');
AppGlobal.context = context; AppGlobal.context = context;
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
print(LandingPage.isOpenCallPage); print(LandingPage.isOpenCallPage);
if (LandingPage.isOpenCallPage) { if (LandingPage.isOpenCallPage) {
if (!isPageNavigated) { if (!isPageNavigated) {
isPageNavigated = true; isPageNavigated = true;
Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) { Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData)))
.then((value) {
isPageNavigated = false; isPageNavigated = false;
}); });
} }
@ -134,11 +145,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
HMGNetworkConnectivity(context, () { HMGNetworkConnectivity(context, () {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
PlatformBridge().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)}); PlatformBridge().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)});
}).checkAndConnectIfNoInternet(); }).checkAndConnectIfNoInternet();
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
@ -168,136 +178,154 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (results[Permission.photos].isGranted) ; if (results[Permission.photos].isGranted) ;
if (results[Permission.accessMediaLocation].isGranted) ; if (results[Permission.accessMediaLocation].isGranted) ;
if (results[Permission.calendar].isGranted) ; if (results[Permission.calendar].isGranted) ;
_firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
DEVICE_TOKEN = token;
checkUserStatus(token);
} else if (projectViewModel.isLogin) {
getNotificationCount(token);
}
}).catchError((err) {
print(err);
}); });
requestPermissions();
// });
// //
// //_firebase Background message handler // //_firebase Background message handler
Future.delayed(Duration.zero, () => setTheme());
//_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// // onMessage: (Map<String, dynamic> message) async { // onMessage: (Map<String, dynamic> message) async {
// // showDialog("onMessage: $message"); // showDialog("onMessage: $message");
// // print("onMessage: $message"); // print("onMessage: $message");
// // print(message); // print(message);
// // print(message['name']); // print(message['name']);
// // print(message['appointmentdate']); // print(message['appointmentdate']);
// // //
// // if (Platform.isIOS) { // if (Platform.isIOS) {
// // if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// // var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// // //
// // if (route != null) { // if (route != null) {
// // print(route.settings.name); // print(route.settings.name);
// // } // }
// // //
// // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// // print(myMap); // print(myMap);
// // LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// // if (!isPageNavigated) { // if (!isPageNavigated) {
// // isPageNavigated = true; // isPageNavigated = true;
// // Navigator.push( // Navigator.push(
// // context, // context,
// // MaterialPageRoute( // MaterialPageRoute(
// // builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// // incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// // .then((value) { // .then((value) {
// // isPageNavigated = false; // isPageNavigated = false;
// // }); // });
// // } // }
// // } else { // } else {
// // print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// // } // }
// // } else { // } else {
// // print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// // } // }
// // //
// // if (Platform.isAndroid) { // if (Platform.isAndroid) {
// // if (message['data'].containsKey("is_call")) { // if (message['data'].containsKey("is_call")) {
// // var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// // //
// // if (route != null) { // if (route != null) {
// // print(route.settings.name); // print(route.settings.name);
// // } // }
// // //
// // Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// // new Map<String, dynamic>.from(message['data']); // new Map<String, dynamic>.from(message['data']);
// // print(myMap); // print(myMap);
// // LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// // if (!isPageNavigated) { // if (!isPageNavigated) {
// // isPageNavigated = true; // isPageNavigated = true;
// // Navigator.push( // Navigator.push(
// // context, // context,
// // MaterialPageRoute( // MaterialPageRoute(
// // builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// // incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// // .then((value) { // .then((value) {
// // isPageNavigated = false; // isPageNavigated = false;
// // }); // });
// // } // }
// // } else { // } else {
// // print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// // } // }
// // } else { // } else {
// // print("Is Call Not Found Android"); // print("Is Call Not Found Android");
// // } // }
// // }, // },
// // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// // onLaunch: (Map<String, dynamic> message) async { // onLaunch: (Map<String, dynamic> message) async {
// // print("onLaunch: $message"); // print("onLaunch: $message");
// // showDialog("onLaunch: $message"); // showDialog("onLaunch: $message");
// // }, // },
// // onResume: (Map<String, dynamic> message) async { // onResume: (Map<String, dynamic> message) async {
// // print("onResume: $message"); // print("onResume: $message");
// // print(message); // print(message);
// // print(message['name']); // print(message['name']);
// // print(message['appointmentdate']); // print(message['appointmentdate']);
// // //
// // showDialog("onResume: $message"); // showDialog("onResume: $message");
// // //
// // if (Platform.isIOS) { // if (Platform.isIOS) {
// // if (message['is_call'] == "true") { // if (message['is_call'] == "true") {
// // var route = ModalRoute.of(context); // var route = ModalRoute.of(context);
// // //
// // if (route != null) { // if (route != null) {
// // print(route.settings.name); // print(route.settings.name);
// // } // }
// // //
// // Map<String, dynamic> myMap = // Map<String, dynamic> myMap =
// // new Map<String, dynamic>.from(message); // new Map<String, dynamic>.from(message);
// // print(myMap); // print(myMap);
// // LandingPage.isOpenCallPage = true; // LandingPage.isOpenCallPage = true;
// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// // if (!isPageNavigated) { // if (!isPageNavigated) {
// // isPageNavigated = true; // isPageNavigated = true;
// // Navigator.push( // Navigator.push(
// // context, // context,
// // MaterialPageRoute( // MaterialPageRoute(
// // builder: (context) => IncomingCall( // builder: (context) => IncomingCall(
// // incomingCallData: LandingPage.incomingCallData))) // incomingCallData: LandingPage.incomingCallData)))
// // .then((value) { // .then((value) {
// // isPageNavigated = false; // isPageNavigated = false;
// // }); // });
// // } // }
// // } else { // } else {
// // print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// // } // }
// // } else { // } else {
// // print("Is Call Not Found iOS"); // print("Is Call Not Found iOS");
// // } // }
// // }, // },
// ); // );
} }
showDialogs(String message) { showDialogs(String message) {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, confirmMessage: message, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {}, cancelFunction: () => {}); context: context,
confirmMessage: message,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {},
cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
Future<Map<Permission, PermissionStatus>> requestPermissions() async { void requestPermissions() async {
var permissionResults = [ await [
Permission.location, Permission.location,
Permission.locationAlways,
Permission.storage, Permission.storage,
Permission.camera, Permission.camera,
Permission.photos, Permission.photos,
@ -309,24 +337,64 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); var permissionsGranted = await deviceCalendarPlugin.hasPermissions();
if (permissionsGranted.isSuccess && !permissionsGranted.data) { if (permissionsGranted.isSuccess && !permissionsGranted.data) {
permissionsGranted = await deviceCalendarPlugin.requestPermissions(); permissionsGranted = await deviceCalendarPlugin.requestPermissions();
if (!permissionsGranted.isSuccess || !permissionsGranted.data) {} if (!permissionsGranted.isSuccess || !permissionsGranted.data) {
return;
}
} }
return permissionResults; }
Future<void> _scheduleNotification() async {
var scheduledNotificationDateTime =
DateTime.now().add(Duration(seconds: 5));
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
var androidPlatformChannelSpecifics = AndroidNotificationDetails(
'your other channel id',
'your other channel name',
'your other channel description',
// icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),
largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),
vibrationPattern: vibrationPattern,
enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0),
ledColor: const Color.fromARGB(255, 255, 0, 0),
ledOnMs: 1000,
ledOffMs: 500);
var iOSPlatformChannelSpecifics =
IOSNotificationDetails(sound: 'slow_spring_board.aiff');
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.schedule(
// 0,
// 'scheduled title',
// 'scheduled body',
// scheduledNotificationDateTime,
// platformChannelSpecifics);
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of<ProjectViewModel>(context);
themeNotifier = Provider.of<ThemeNotifier>(context);
//setTheme();
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Text( title: Text(
getText(currentTab).toUpperCase(), getText(currentTab).toUpperCase(),
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true, // bold: true,
// color: Colors.white, // color: Colors.white,
), ),
@ -381,9 +449,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SETTINGS, SETTINGS,
); );
else else
Navigator.of(context).pushNamed( login();
WELCOME_LOGIN,
);
}, //do something, }, //do something,
) )
], ],
@ -403,7 +469,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
MedicalProfilePage(), MedicalProfilePage(),
BookingOptions(), BookingOptions(),
MyFamily(isAppbarVisible: false), MyFamily(isAppbarVisible: false),
ToDo(), ToDo(isShowAppBar: false),
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar( bottomNavigationBar: BottomNavBar(
@ -438,23 +504,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
} }
} }
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); //GifLoaderDialogUtils.showMyDialog(context);
if (await sharedPref.getObject(USER_PROFILE) != null) { authService
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); .selectDeviceImei(token)
if (data != null) { .then((SelectDeviceIMEIRES value) => setUserValues(value))
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)}); .catchError((err) {
authService.getDashboard().then((value) => { //GifLoaderDialogUtils.hideDialog(context);
setState(() { });
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
})
});
}
}
} }
static Future<dynamic> myBackgroundMessageHandler(Map<String, dynamic> message) async { static Future<dynamic> myBackgroundMessageHandler(
Map<String, dynamic> message) async {
Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']); Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']);
if (message.containsKey('data')) { if (message.containsKey('data')) {
print("myBackgroundMessageHandler Inside"); print("myBackgroundMessageHandler Inside");
@ -470,6 +531,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
void setUserValues(value) async { void setUserValues(value) async {
//GifLoaderDialogUtils.hideDialog(context);
sharedPref.setObject(IMEI_USER_DATA, value); sharedPref.setObject(IMEI_USER_DATA, value);
} }
@ -478,4 +541,36 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}
getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)});
authService.getDashboard().then((value) => {
setState(() {
notificationCount = value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
});
}
}
}
} }

@ -4,12 +4,16 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.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/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -20,13 +24,14 @@ import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.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 ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
@override @override
@ -69,11 +74,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
int fingrePrintBefore; int fingrePrintBefore;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel = AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
@ -85,6 +91,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).confirm, appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true, isShowAppBar: true,
@ -262,6 +269,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
authenticateUser(type, isActive) { authenticateUser(type, isActive) {
GifLoaderDialogUtils.showMyDialog(context);
if (type == 2 || type == 3) { if (type == 2 || type == 3) {
fingrePrintBefore = type; fingrePrintBefore = type;
} }
@ -308,7 +316,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
req.logInTokenID = ""; req.logInTokenID = "";
var request = CheckPatientAuthenticationReq.fromJson(req.toJson()); var request = CheckPatientAuthenticationReq.fromJson(req.toJson());
GifLoaderDialogUtils.showMyDialog(context);
sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
authService authService
@ -369,66 +376,45 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true); stickyAuth: true);
if (authenticated == true) { if (authenticated == true) {
if (user != null && (user.logInType == 2 || user.logInType == 3)) {
if(user.logInType==2 || user.logInType ==3){ this.checkActivationCode();
this.checkActivationCode(); } else {
}else{ var request = this.getCommonRequest(type: type);
var request = this.getCommonRequest(type: type); this.getMobileInfo(request);
this.getMobileInfo(request); }
}
} }
} }
} }
getMobileInfo(request) { getMobileInfo(request) {
this // GifLoaderDialogUtils.showMyDialog(context);
.authService this.authService.getLoginInfo(request).then((result) {
.getLoginInfo(request) GifLoaderDialogUtils.hideDialog(context);
.then((result) => { if (result['SMSLoginRequired'] == false) {
if (result['SMSLoginRequired'] == false) this.loginTokenID = result.logInTokenID;
{ this.patientOutSA = result.patientOutSA;
this.loginTokenID = result.logInTokenID, // sms for register the biometric
this.patientOutSA = result.patientOutSA, if (result.isSMSSent) {
// sms for register the biometric this.onlySMSBox = false;
if (result.isSMSSent) //this.button();
{ } else {
this.onlySMSBox = false, checkActivationCode();
//this.button(); }
} } else {
else if (result['IsAuthenticated'] == true) {
{checkActivationCode()} setState(() {
} isMoreOption = true;
else this.onlySMSBox = true;
{ // this.fingrePrintBefore = true;
if (result['IsAuthenticated'] == true) });
{ }
setState(() { }
isMoreOption = true; }).catchError((err) {
this.onlySMSBox = true; GifLoaderDialogUtils.hideDialog(context);
// this.fingrePrintBefore = true;
}),
//sharedPref.setBool(ONLY_SMS, true),
// this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
//this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE);
// this.cs.confirmLogin();
//this.button();
}
// else
// {
// // this.cs.presentAlert(result.ErrorEndUserMessage);
// }
}
})
.catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
setUser() async {}
setDefault() async { setDefault() async {
if (await sharedPref.getObject(IMEI_USER_DATA) != null) if (await sharedPref.getObject(IMEI_USER_DATA) != null)
user = SelectDeviceIMEIRES.fromJson( user = SelectDeviceIMEIRES.fromJson(
@ -460,7 +446,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
this.deviceToken = await sharedPref.getString(PUSH_TOKEN); this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN) ? await sharedPref.getInt(LAST_LOGIN)
: user.logInType !=null ? user.logInType : null; : user != null
? user.logInType
: null;
//this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
} }
@ -514,7 +502,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.then((result) => { .then((result) => {
if (result is Map) if (result is Map)
{ {
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
if (this.registerd_data != null && if (this.registerd_data != null &&
this.registerd_data.isRegister == true) this.registerd_data.isRegister == true)
@ -525,8 +512,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
else else
{ {
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false, result.list.isFamily = false,
userData = result.list, userData = result.list,
// sharedPref.setString(
// BLOOD_TYPE, result['PatientBloodType']),
sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list), sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID, loginTokenID = result.logInTokenID,
@ -551,7 +541,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
checkIfUserAgreedBefore(CheckActivationCode result) { checkIfUserAgreedBefore(CheckActivationCode result) {
print(result);
if (result.isNeedUserAgreement == true) { if (result.isNeedUserAgreement == true) {
//move to agreement page. //move to agreement page.
} else { } else {
@ -568,12 +557,53 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}); });
} }
goToHome() { getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
goToHome() {
authenticatedUserObject.isLogin = true; authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
Navigator.of(context).pushNamed(HOME); getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
// GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
}
})
.catchError((err) {
print(err);
//GifLoaderDialogUtils.hideDialog(context);
});
// SMSOTP.showLoadingDialog(context, false),
} }
loading(flag) { loading(flag) {
@ -755,7 +785,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
bool checkIfBiometricAvailable(BiometricType biometricType) { bool checkIfBiometricAvailable(BiometricType biometricType) {
bool isAvailable = false; bool isAvailable = false;
if(_availableBiometrics != null) { if (_availableBiometrics != null) {
for (var i = 0; i < _availableBiometrics.length; i++) { for (var i = 0; i < _availableBiometrics.length; i++) {
if (biometricType == _availableBiometrics[i]) isAvailable = true; if (biometricType == _availableBiometrics[i]) isAvailable = true;
} }

@ -14,159 +14,168 @@ class LoginType extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
body: Padding( body: SingleChildScrollView(
padding: EdgeInsets.all(20), child: Container(
child: Column( padding:
children: <Widget>[ EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
Expanded( height: SizeConfig.realScreenHeight * .9,
flex: 4, width: SizeConfig.realScreenWidth,
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, Expanded(
children: <Widget>[ flex: 4,
Image.asset( child: Column(
'assets/images/DQ/dq_logo_icon.png', // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
height: 90, crossAxisAlignment: CrossAxisAlignment.start,
width: 90,
),
AppText(
TranslationBase.of(context).logintypeRadio,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start,
marginBottom: 20.0,
marginTop: 20.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Image.asset(
child: InkWell( 'assets/images/DQ/dq_logo_icon.png',
onTap: () => { height: 90,
LoginType.loginType = 1, width: 90,
Navigator.of(context) ),
.pushNamed(LOGIN_PAGE) AppText(
}, TranslationBase.of(context).logintypeRadio,
child: RoundedContainer( fontSize: SizeConfig.textMultiplier * 3.5,
borderColor: Colors.grey, textAlign: TextAlign.start,
showBorder: true, marginBottom: 20.0,
child: Padding( marginTop: 20.0,
padding: EdgeInsets.fromLTRB( ),
20, 10, 20, 10), Row(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: children: <Widget>[
MainAxisAlignment.center, Expanded(
children: <Widget>[ child: InkWell(
Image.asset( onTap: () => {
'assets/images/id_card_icon.png', LoginType.loginType = 1,
height: SizeConfig Navigator.of(context)
.imageSizeMultiplier * .pushNamed(LOGIN_PAGE)
12, },
width: SizeConfig child: RoundedContainer(
.imageSizeMultiplier * borderColor: Colors.grey,
15, showBorder: true,
), child: Padding(
SizedBox( padding: EdgeInsets.fromLTRB(
height: 20, 20, 10, 20, 10),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/id_card_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.idNo,
fontSize: SizeConfig
.textMultiplier *
2,
fontWeight: FontWeight.bold,
)
],
), ),
AppText( )))),
TranslationBase.of(context) Expanded(
.idNo, child: InkWell(
fontSize: onTap: () => {
SizeConfig.textMultiplier * LoginType.loginType = 2,
Navigator.of(context)
.pushNamed(LOGIN_PAGE)
},
child: RoundedContainer(
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding: EdgeInsets.fromLTRB(
25, 10, 25, 10),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/my_file_white_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.fileNo,
fontSize: SizeConfig
.textMultiplier *
2, 2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
], ],
), ),
)))), ))))
Expanded( ],
),
SizedBox(
height: 25,
),
Divider(
color: Colors.grey,
height: 2,
),
Center(
child: InkWell( child: InkWell(
onTap: () => { onTap: () => {
LoginType.loginType = 2,
Navigator.of(context) Navigator.of(context)
.pushNamed(LOGIN_PAGE) .pushNamed(FORGOT_PASSWORD)
}, },
child: RoundedContainer( child: AppText(
borderColor: Colors.grey, TranslationBase.of(context)
showBorder: true, .forgotPassword,
child: Padding( fontSize:
padding: EdgeInsets.fromLTRB( SizeConfig.textMultiplier * 2.5,
25, 10, 25, 10), marginTop: 20.0,
child: Column( underline: true)))
children: <Widget>[ ]),
Image.asset( ),
'assets/images/my_file_white_icon.png', Expanded(
height: SizeConfig flex: 1,
.imageSizeMultiplier * child: Column(
12, mainAxisAlignment: MainAxisAlignment.end,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.fileNo,
fontSize:
SizeConfig.textMultiplier *
2,
fontWeight: FontWeight.bold,
)
],
),
))))
],
),
SizedBox(height: 25,),
Divider(
color: Colors.grey,
height: 2,
),
Center(
child: InkWell(
onTap: () => {
Navigator.of(context)
.pushNamed(FORGOT_PASSWORD)
},
child: AppText(
TranslationBase.of(context).forgotPassword,
fontSize: SizeConfig.textMultiplier * 2.5,
marginTop: 20.0,
underline: true)))
]),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Divider(
color: Colors.grey,
height: 2,
),
SizedBox(height: 10,),
Row(
children: <Widget>[ children: <Widget>[
Divider(
Expanded( color: Colors.grey,
child: DefaultButton( height: 2,
TranslationBase.of(context).registerNow, ),
() => { SizedBox(
Navigator.of(context).pushNamed( height: 10,
REGISTER, ),
) Row(
}, children: <Widget>[
)), Expanded(
child: DefaultButton(
TranslationBase.of(context).registerNow,
() => {
Navigator.of(context).pushNamed(
REGISTER,
)
},
)),
],
),
], ],
), ))
], ],
)) ))));
],
)));
} }
} }

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -11,6 +12,7 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -26,7 +28,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
@override @override
@ -50,6 +51,7 @@ class _Login extends State<Login> {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
@ -66,6 +68,7 @@ class _Login extends State<Login> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
@ -93,22 +96,24 @@ class _Login extends State<Login> {
onNumberChange: (value) => onNumberChange: (value) =>
{mobileNo = value, validateForm()}, {mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value), onCountryChange: (value) => countryCode = value),
Container( Directionality(
child: TextFields( textDirection: TextDirection.ltr,
fontWeight: FontWeight.normal, child: Container(
controller: nationalIDorFile, child: TextFields(
onChanged: (value) => {validateForm()}, fontWeight: FontWeight.normal,
prefixIcon: Icon( controller: nationalIDorFile,
loginType == 1 onChanged: (value) => {validateForm()},
? Icons.chrome_reader_mode prefixIcon: Icon(
: Icons.receipt, loginType == 1
color: Color(0xFF40ACC9)), ? Icons.chrome_reader_mode
padding: EdgeInsets.only( : Icons.receipt,
top: 20, bottom: 20, left: 10, right: 10), color: Color(0xFF40ACC9)),
hintText: loginType == 1 padding: EdgeInsets.only(
? TranslationBase.of(context).nationalID top: 20, bottom: 20, left: 10, right: 10),
: TranslationBase.of(context).fileNo, hintText: loginType == 1
)) ? TranslationBase.of(context).nationalID
: TranslationBase.of(context).fileNo,
)))
], ],
), ),
), ),
@ -121,7 +126,9 @@ class _Login extends State<Login> {
color: Colors.grey, color: Colors.grey,
height: 2, height: 2,
), ),
SizedBox(height: 10,), SizedBox(
height: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -151,18 +158,14 @@ class _Login extends State<Login> {
} }
void validateForm() { void validateForm() {
//TODO fix login if (util.validateIDBox(nationalIDorFile.text, loginType) == true &&
if (util.validateIDBox(nationalIDorFile.text, loginType) ==
true /*&&
mobileNo.length >= 9 */
&&
util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = false;
}); });
} else { } else {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = true;
}); });
} }
} }
@ -208,15 +211,13 @@ class _Login extends State<Login> {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
ConfirmDialog.closeAlertDialog(context), ConfirmDialog.closeAlertDialog(context),
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
REGISTER, REGISTER,
), ),
}, },
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
}); });
// SMSOTP.showLoadingDialog(context, false), // SMSOTP.showLoadingDialog(context, false),
} }
@ -240,21 +241,24 @@ class _Login extends State<Login> {
request['PatientID'] = int.parse(nationalIDorFile.text); request['PatientID'] = int.parse(nationalIDorFile.text);
} }
// request.isRegister = false; // request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) => { this.authService.checkActivationCode(request, code).then((result) async{
result = CheckActivationCode.fromJson(result), sharedPref.remove(FAMILY_FILE);
result.list.isFamily =false, result = CheckActivationCode.fromJson(result);
this.sharedPref.setObject(USER_PROFILE, result.list), result.list.isFamily = false;
this.sharedPref.setObject(MAIN_USER, result.list), // this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setString(TOKEN, result.authenticationTokenID), this.sharedPref.setObject(MAIN_USER, result.list);
authenticatedUserObject.getUser(), this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
// authenticatedUserObject.user = AuthenticatedUser.fromJson(result.list), this.sharedPref.setString(TOKEN, result.authenticationTokenID);
authenticatedUserObject.isLogin = true, await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel.isLogin = true, authenticatedUserObject.isLogin = true;
projectViewModel.isLogin = true, appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {
getToDoCount(),
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
if (appointmentRateViewModel.isHaveAppointmentNotRate) if (appointmentRateViewModel.isHaveAppointmentNotRate)
{ {
@ -278,11 +282,24 @@ class _Login extends State<Login> {
.catchError((err) { .catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}), });
// SMSOTP.showLoadingDialog(context, false),
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
// showLoader(bool isTrue) { // showLoader(bool isTrue) {
// setState(() { // setState(() {
// isLoading = isTrue; // isLoading = isTrue;

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.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/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';
@ -12,14 +13,20 @@ import 'package:hexcolor/hexcolor.dart';
import 'advance_payment_page.dart'; import 'advance_payment_page.dart';
class MyBalancePage extends StatelessWidget { class MyBalancePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png'));
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getPatientAdvanceBalanceAmount(), onModelReady: (model) => model.getPatientAdvanceBalanceAmount(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).myBalances, appBarTitle: TranslationBase.of(context).myBalances,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMyBalance,
body: Container( body: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.all(12),
child: Column( child: Column(
@ -38,21 +45,22 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#B61422'), color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(
TranslationBase.of(context).totalBalance, '${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar,
color: Colors.white, color: Colors.white,
bold: true,
), ),
Texts( Texts(
'${model.totalAdvanceBalanceAmount ?? 0} SAR', TranslationBase.of(context).totalBalance,
color: Colors.white, color: Colors.white,
bold: true,
), ),
], ],
), ),
@ -74,12 +82,13 @@ class MyBalancePage extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts(model.patientAdvanceBalanceAmountList[index]
.projectDescription),
Texts( Texts(
'${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} SAR', '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} '+TranslationBase.of(context).sar,
bold: true, bold: true,
), ),
Texts(model.patientAdvanceBalanceAmountList[index]
.projectDescription),
], ],
), ),
), ),

@ -1,36 +1,50 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/laboratory_result_widget.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/laboratory_result_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class LaboratoryResultPage extends StatelessWidget { class LaboratoryResultPage extends StatefulWidget {
final PatientLabOrders patientLabOrders; final PatientLabOrders patientLabOrders;
LaboratoryResultPage({Key key, this.patientLabOrders}); LaboratoryResultPage({Key key, this.patientLabOrders});
@override
_LaboratoryResultPageState createState() => _LaboratoryResultPageState();
}
class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLaboratoryResult( onModelReady: (model) => model.getLaboratoryResult(
invoiceNo: patientLabOrders.invoiceNo, invoiceNo: widget.patientLabOrders.invoiceNo,
clinicID: patientLabOrders.clinicID, clinicID: widget.patientLabOrders.clinicID,
projectID: patientLabOrders.projectID, projectID: widget.patientLabOrders.projectID,
orderNo: patientLabOrders.orderNo), orderNo: widget.patientLabOrders.orderNo),
builder: (_, model, widget) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Laboratory result', appBarTitle: TranslationBase.of(context).labResults,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(
body: ListView.builder( body: ListView.builder(
itemBuilder: (context, index) => LaboratoryResultWidget( itemBuilder: (context, index) => LaboratoryResultWidget(
onTap: () => model.sendLabReportEmail(patientLabOrder: patientLabOrders), onTap: ()async {
billNo: patientLabOrders.invoiceNo, GifLoaderDialogUtils.showMyDialog(context);
await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders,mes: TranslationBase.of(context).sendSuc);
GifLoaderDialogUtils.hideDialog(context);
},
billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML, details: model.patientLabSpecialResult[index].resultDataHTML,
orderNo: patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: patientLabOrders, patientLabOrder: widget.patientLabOrders,
), ),
itemCount: model.patientLabSpecialResult.length, itemCount: model.patientLabSpecialResult.length,
), ),

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,12 +11,17 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'laboratory_result_page.dart'; import 'laboratory_result_page.dart';
class LabsHomePage extends StatelessWidget { class LabsHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo =List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png'));
return BaseView<LabsViewModel>( return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLabs(), onModelReady: (model) => model.getLabs(),
builder: (context, LabsViewModel model, widget) => AppScaffold( builder: (context, LabsViewModel model, widget) => AppScaffold(
@ -22,6 +29,7 @@ class LabsHomePage extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
description: TranslationBase.of(context).infoLab, description: TranslationBase.of(context).infoLab,
appBarTitle: TranslationBase.of(context).labOrders, appBarTitle: TranslationBase.of(context).labOrders,
imagesInfo: imagesInfo,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
@ -40,7 +48,7 @@ class LabsHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -57,7 +65,7 @@ class LabsHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) => onChanged: (FilterType value) =>
model.setFilterType(value), model.setFilterType(value),
), ),
@ -86,10 +94,10 @@ class LabsHomePage extends StatelessWidget {
), ),
),isInOutPatient: labOrder.isInOutPatient, ),isInOutPatient: labOrder.isInOutPatient,
name: labOrder.doctorName, name: labOrder.doctorName,
billNo: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL, profileUrl: labOrder.doctorImageURL,
subName: TranslationBase.of(context).billNo+' ${labOrder.invoiceNo}', subName: labOrder.projectName,
date: DateUtil.getMonthDayYearDateFormatted( date: projectViewModel.isArabic?DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate):DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
labOrder.orderDate),
); );
}).toList(), }).toList(),
), ),

@ -1,10 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PatientSickLeavePage extends StatefulWidget { class PatientSickLeavePage extends StatefulWidget {
@override @override
@ -12,8 +16,15 @@ class PatientSickLeavePage extends StatefulWidget {
} }
class _PatientSickLeavePageState extends State<PatientSickLeavePage> { class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
return BaseView<PatientSickLeaveViewMode>( return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(), onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -21,6 +32,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
appBarTitle: TranslationBase.of(context).sickLeaves, appBarTitle: TranslationBase.of(context).sickLeaves,
description: TranslationBase.of(context).infoSickLeaves, description: TranslationBase.of(context).infoSickLeaves,
infoList: TranslationBase.of(context).infoSickLeavePoints, infoList: TranslationBase.of(context).infoSickLeavePoints,
imagesInfo: imagesInfo,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.all(12),
@ -33,16 +45,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
profileUrl: model.sickLeaveList[index].doctorImageURL, profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName, subName: model.sickLeaveList[index].projectName,
isInOutPatient: isInOutPatient: model.sickLeaveList[index].isInOutPatient,
model.sickLeaveList[index].isInOutPatient,
onEmailTap: () { onEmailTap: () {
model.sendSickLeaveEmail( showConfirmMessage(model, index);
message: TranslationBase.of(context).emailSentSuccessfully, // model.sendSickLeaveEmail(
requestNo: model.sickLeaveList[index].requestNo, // message: TranslationBase.of(context).emailSentSuccessfully,
doctorName: model.sickLeaveList[index].doctorName, // requestNo: model.sickLeaveList[index].requestNo,
projectName: model.sickLeaveList[index].projectName, // doctorName: model.sickLeaveList[index].doctorName,
setupID: model.sickLeaveList[index].setupID, // projectName: model.sickLeaveList[index].projectName,
projectID: model.sickLeaveList[index].projectID); // setupID: model.sickLeaveList[index].setupID,
// projectID: model.sickLeaveList[index].projectID);
}, },
), ),
), ),
@ -50,4 +62,22 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
), ),
); );
} }
void showConfirmMessage(PatientSickLeaveViewMode model, int index) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () {
model.sendSickLeaveEmail(
message: TranslationBase.of(context).emailSentSuccessfully,
requestNo: model.sickLeaveList[index].requestNo,
doctorName: model.sickLeaveList[index].doctorName,
projectName: model.sickLeaveList[index].projectName,
setupID: model.sickLeaveList[index].setupID,
projectID: model.sickLeaveList[index].projectID);
},
),
);
}
} }

@ -105,22 +105,29 @@ class PrescriptionDetailsPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).way))), child: Center(
child: Texts(TranslationBase.of(context).way))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).average))), child: Center(
child:
Texts(TranslationBase.of(context).average))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).dailyDoses))), child: Center(
child: Texts(
TranslationBase.of(context).dailyDoses))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 30, height: 30,
width: double.infinity, width: double.infinity,
child: Center(child: Texts(TranslationBase.of(context).period))), child: Center(
child:
Texts(TranslationBase.of(context).period))),
], ],
), ),
TableRow( TableRow(
@ -136,7 +143,8 @@ class PrescriptionDetailsPage extends StatelessWidget {
height: 50, height: 50,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: Text(prescriptionReport.frequencyN))), child:
Text(prescriptionReport.frequencyN ?? ''))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 50, height: 50,
@ -174,7 +182,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts(prescriptionReport.remarks), Texts(prescriptionReport.remarks ?? ''),
], ],
), ),
), ),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
@ -11,6 +12,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions prescriptions;
@ -20,68 +23,163 @@ class PrescriptionItemsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID,episodeID: prescriptions.episodeID), model.getPrescriptionReport(prescriptions: prescriptions),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions, appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
height: MediaQuery.of(context).size.height * 0.8, height: MediaQuery.of(context).size.height * 0.8,
child: ListView.builder( child: Column(
itemBuilder: (context, index) => InkWell( children: [
onTap: () => Navigator.push( if (!prescriptions.isInOutPatient)
context, ...List.generate(
FadePage( model.prescriptionReportList.length,
page: PrescriptionDetailsPage( (index) => InkWell(
prescriptionReport: model.prescriptionReportList[index], onTap: () => Navigator.push(
), context,
), FadePage(
), page: PrescriptionDetailsPage(
child: Container( prescriptionReport:
width: double.infinity, model.prescriptionReportList[index],
margin: EdgeInsets.only(top: 10, left: 10, right: 10), ),
padding: EdgeInsets.all(8.0), ),
decoration: BoxDecoration( ),
color: Colors.white, child: Container(
borderRadius: BorderRadius.all( width: double.infinity,
Radius.circular(10.0), margin:
), EdgeInsets.only(top: 10, left: 10, right: 10),
border: Border.all(color: Colors.grey[200], width: 0.5), padding: EdgeInsets.all(8.0),
), decoration: BoxDecoration(
child: Row( color: Colors.white,
children: <Widget>[ borderRadius: BorderRadius.all(
ClipRRect( Radius.circular(10.0),
borderRadius: BorderRadius.all(Radius.circular(5)), ),
child: Image.network( border: Border.all(
model.prescriptionReportList[index].imageSRCUrl, color: Colors.grey[200], width: 0.5),
fit: BoxFit.cover, ),
width: 60, child: Row(
height: 70, children: <Widget>[
ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index]
.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(model
.prescriptionReportList[index]
.itemDescription
.isNotEmpty
? model.prescriptionReportList[index]
.itemDescription
: model.prescriptionReportList[index]
.itemDescriptionN)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
))
else
...List.generate(
model.prescriptionReportEnhList.length,
(index) => InkWell(
onTap: () {
PrescriptionReport prescriptionReport =
PrescriptionReport(
imageSRCUrl: model
.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model
.prescriptionReportEnhList[index]
.itemDescription,
itemDescriptionN: model
.prescriptionReportEnhList[index]
.itemDescription,
routeN:
model.prescriptionReportEnhList[index].route,
frequency: model
.prescriptionReportEnhList[index].frequency,
frequencyN: model
.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model
.prescriptionReportEnhList[index]
.doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID:
model.prescriptionReportEnhList[index].itemID,
remarks: model
.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
),
),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
],
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
), ),
), ),
Expanded( ),
child: Padding( )
padding: const EdgeInsets.all(8.0), ],
child: Center(
child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty?
model.prescriptionReportList[index].itemDescription :model
.prescriptionReportList[index].itemDescriptionN)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
),
itemCount: model.prescriptionReportList.length,
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.23, height: MediaQuery.of(context).size.height * 0.12,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -90,25 +188,41 @@ class PrescriptionItemsPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
label: TranslationBase.of(context).sendCopy, label: TranslationBase.of(context).sendCopy,
onTap: () => model.sendPrescriptionEmail( onTap: () {
appointmentDate: prescriptions.appointmentDate, showConfirmMessage(context,model);
patientID: prescriptions.patientID, },
clinicName: prescriptions.companyName,
doctorName: prescriptions.doctorName,
projectID: prescriptions.projectID),
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
), ),
), ),
Container( if (false)
width: MediaQuery.of(context).size.width * 0.8, Container(
child: Button( width: MediaQuery.of(context).size.width * 0.8,
label:TranslationBase.of(context).resendOrder, child: Button(
backgroundColor: Colors.green[200], label: TranslationBase.of(context).resendOrder,
)) backgroundColor: Colors.green[200],
))
], ],
), ),
), ),
), ),
); );
} }
void showConfirmMessage(BuildContext context, PrescriptionsViewModel model) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () {
model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate,
patientID: prescriptions.patientID,
clinicName: prescriptions.companyName,
doctorName: prescriptions.doctorName,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID);
},
),
);
}
} }

@ -33,9 +33,17 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}'), Container(
width: double.infinity,
decoration: BoxDecoration(
color: prescriptionsOrder.status==3 ?Colors.red:prescriptionsOrder.status==2? Colors.green: Colors.grey,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}',color: Colors.white,),
)),
SizedBox( SizedBox(
height: 5, height: 15,
), ),
Table( Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(
@ -60,17 +68,17 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
height: 50, height: 70,
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Texts('${prescriptionsOrder.iD}'), child: Texts('${prescriptionsOrder.iD}'),
), ),
), ),
Container( Container(
height: 50, height: 70,
color: Colors.white, color: Colors.white,
child: Center( child: Center(
child: Texts('${prescriptionsOrder.createdOn}'), child: Texts('${prescriptionsOrder.createdOn.year}-${prescriptionsOrder.createdOn.day}-${prescriptionsOrder.createdOn.day} ${prescriptionsOrder.createdOn.hour}:${prescriptionsOrder.createdOn.minute}'),
), ),
), ),
]) ])

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsHistoryPage extends StatelessWidget { class PrescriptionsHistoryPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel; final PrescriptionsViewModel prescriptionsViewModel;
@ -15,6 +17,8 @@ class PrescriptionsHistoryPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
baseViewModel: prescriptionsViewModel, baseViewModel: prescriptionsViewModel,
body: ListView.builder( body: ListView.builder(
@ -41,9 +45,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Texts(
DateUtil.getDayMonthYearHourMinuteDateFormatted( DateUtil.getDayMonthYearHourMinuteDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn),
prescriptionsViewModel
.prescriptionsHistory[index].createdOn),
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
), ),
SizedBox( SizedBox(

@ -78,7 +78,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -37,7 +37,7 @@ class PrescriptionsPage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value); prescriptionsViewModel.setFilterType(value);
}, },
@ -55,7 +55,7 @@ class PrescriptionsPage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: prescriptionsViewModel.filterType, groupValue: prescriptionsViewModel.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
prescriptionsViewModel.setFilterType(value); prescriptionsViewModel.setFilterType(value);
}, },

@ -2,7 +2,10 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_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/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -21,42 +24,63 @@ class RadiologyDetailsPage extends StatelessWidget {
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo), invoiceNo: finalRadiology.invoiceNo),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBarTitle: 'Radiology Report', appBarTitle: TranslationBase.of(context).report,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Text('${finalRadiology.reportData}',textAlign: TextAlign.center,), Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.center,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.start,
fontSize: 17,
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
)
], ],
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.2, height: finalRadiology.dIAPACSURL != ""
? MediaQuery.of(context).size.height * 0.2
: MediaQuery.of(context).size.height * 0.15,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Divider(), Divider(),
if (finalRadiology.dIAPACSURL != "")
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
launch(model.radImageURL);
},
label: TranslationBase.of(context).openRad,
backgroundColor: Colors.grey[800],
),
),
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
onTap: () { onTap: () {
launch(model.radImageURL); showConfirmMessage(
finalRadiology: finalRadiology, model: model);
}, },
label: 'Open Radio Image', label: TranslationBase.of(context).sendCopyRad,
backgroundColor: Colors.grey[800],
),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () => model.sendRadReportEmail(
finalRadiology: finalRadiology),
label: 'Send Copy',
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
backgroundColor: Colors.red[800], backgroundColor: Theme.of(context).primaryColor,
), ),
) )
], ],
@ -64,4 +88,19 @@ class RadiologyDetailsPage extends StatelessWidget {
)), )),
); );
} }
void showConfirmMessage(
{FinalRadiology finalRadiology, RadiologyViewModel model}) {
showDialog(
context: AppGlobal.context,
child: ConfirmSendEmailDialog(
email: model.user.emailAddress,
onTapSendEmail: () {
model.sendRadReportEmail(
mes: TranslationBase.of(AppGlobal.context).sendSuc,
finalRadiology: finalRadiology);
},
),
);
}
} }

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_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/pages/medical/radiology/radiology_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -10,10 +12,15 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RadiologyHomePage extends StatelessWidget { class RadiologyHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/1.png'));
return BaseView<RadiologyViewModel>( return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -21,6 +28,7 @@ class RadiologyHomePage extends StatelessWidget {
appBarTitle: TranslationBase.of(context).radiology, appBarTitle: TranslationBase.of(context).radiology,
baseViewModel: model, baseViewModel: model,
description: TranslationBase.of(context).infoRadiology, description: TranslationBase.of(context).infoRadiology,
imagesInfo: imagesInfo,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView( child: ListView(
@ -38,7 +46,7 @@ class RadiologyHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -56,7 +64,7 @@ class RadiologyHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -85,11 +93,12 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
child: DoctorCard( child: DoctorCard(
isInOutPatient: radiology.isInOutPatient,
name: radiology.doctorName, name: radiology.doctorName,
profileUrl: radiology.doctorImageURL, profileUrl: radiology.doctorImageURL,
subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}', billNo: '${radiology.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted( subName: '${radiology.projectName}',
radiology.orderDate), date: projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(radiology.orderDate):DateUtil.getMonthDayYearDateFormatted(radiology.orderDate),
), ),
); );
}).toList(), }).toList(),

@ -1,5 +1,6 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart';
@ -20,6 +21,7 @@ class HomeReportPage extends StatefulWidget {
class _HomeReportPageState extends State<HomeReportPage> class _HomeReportPageState extends State<HomeReportPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
@ -35,15 +37,29 @@ class _HomeReportPageState extends State<HomeReportPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/1.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png'));
return BaseView<ReportsViewModel>( return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getReports(), //model.getPrescriptions(), onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthReport, appBarTitle: TranslationBase.of(context).newMedReport,
description: TranslationBase.of(context).infoMonthReport, description: TranslationBase.of(context).infoMonthReport,
baseViewModel: model, baseViewModel: model,
//bottomSheet: Container(), imagesInfo: imagesInfo,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -82,32 +98,34 @@ class _HomeReportPageState extends State<HomeReportPage>
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts('Requested'), child: Texts(TranslationBase.of(context).requested,fontSize: 12,),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts('Ready'), child: Texts(TranslationBase.of(context).ready,fontSize: 12,),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts('Completed'), child:
Texts(TranslationBase.of(context).completed,fontSize: 11,),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.22, width: MediaQuery.of(context).size.width * 0.15,
child: Center( child: Center(
child: Texts('Cancelled'), child:
Texts(TranslationBase.of(context).cancelled,fontSize: 12,),
), ),
), ),
], ],
@ -127,20 +145,26 @@ class _HomeReportPageState extends State<HomeReportPage>
children: <Widget>[ children: <Widget>[
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderRequestList, reportList: model.reportsOrderRequestList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderReadyList, reportList: model.reportsOrderReadyList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderCompletedList, reportList: model.reportsOrderCompletedList,
emailAddress: model.user.emailAddress
), ),
ReportListWidget( ReportListWidget(
reportList: model.reportsOrderCanceledList, reportList: model.reportsOrderCanceledList,
emailAddress: model.user.emailAddress
), ),
], ],
), ),
), ),
SizedBox(height: 110,) SizedBox(
height: 110,
)
], ],
), ),
bottomSheet: Container( bottomSheet: Container(
@ -148,7 +172,7 @@ class _HomeReportPageState extends State<HomeReportPage>
height: 90, height: 90,
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: Button( child: Button(
label: 'Resend order & deliver', label: TranslationBase.of(context).requestMedicalReport,
backgroundColor: Colors.grey[800], backgroundColor: Colors.grey[800],
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,

@ -1,13 +1,22 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart'; import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ReportListWidget extends StatelessWidget { class ReportListWidget extends StatelessWidget {
final List<Reports> reportList; final List<Reports> reportList;
final String emailAddress;
ReportListWidget({@required this.reportList}); ReportListWidget({@required this.reportList, this.emailAddress});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -16,7 +25,8 @@ class ReportListWidget extends StatelessWidget {
itemBuilder: (context, index) => Padding( itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
width: double.infinity,margin: EdgeInsets.only(left: 8,right: 8,top: 3), width: double.infinity,
margin: EdgeInsets.only(left: 8, right: 8, top: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all(color: Colors.white, width: 2), border: Border.all(color: Colors.white, width: 2),
@ -40,15 +50,39 @@ class ReportListWidget extends StatelessWidget {
flex: 4, flex: 4,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: [
SizedBox(height: 12,), Column(
Texts(reportList[index].projectName), crossAxisAlignment: CrossAxisAlignment.start,
Texts(reportList[index].clinicDescription), children: <Widget>[
Texts('invoice No: ${reportList[index].invoiceNo}'), SizedBox(
SizedBox(height: 12,), height: 12,
),
Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription),
Texts(TranslationBase.of(context).invoiceNo +
': ${reportList[index].invoiceNo}'),
SizedBox(height: 12),
],
),
reportList[index].status == 2
? Container(
margin:
EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell(
onTap: () {
showConfirmMessage(reportList[index]);
// sendReportEmail(reportList[index]);
},
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
size: 35.0,
),
),
)
: Container(),
], ],
), ),
), ),
@ -61,4 +95,39 @@ class ReportListWidget extends StatelessWidget {
), ),
); );
} }
void showConfirmMessage(Reports report) {
showDialog(
context: AppGlobal.context,
child: ConfirmSendEmailDialog(
email: emailAddress,
onTapSendEmail: () {
sendReportEmail(report);
},
),
);
}
sendReportEmail(Reports report) {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<ReportsService>();
_reportsService
.sendEmailForMedicalReport(
report.projectName,
report.clinicDescription,
report.doctorName,
DateUtil.convertDateToString(report.requestDate),
report.invoiceNo.toString(),
report.projectID,
DateUtil.convertDateToString(report.requestDate),
report.setupId)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showSuccessToast(
message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(err);
});
}
} }

@ -1,33 +1,37 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_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/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MedicalReports extends StatelessWidget { class MedicalReports extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void confirmBox(AppointmentHistory model, ReportsViewModel reportsViewModel) { void confirmBox(
AppointmentHistory model, ReportsViewModel reportsViewModel) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmDialog( child: ConfirmDialog(
appointmentHistory: model, appointmentHistory: model,
onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model), onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model,TranslationBase.of(context).successSendReport),
), ),
); );
} }
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ReportsViewModel>( return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getPatentAppointmentHistory(), onModelReady: (model) => model.getPatentAppointmentHistory(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Medical Reports', appBarTitle: TranslationBase.of(context).medReport,
body: ListView.builder( body: ListView.builder(
itemCount: model.appointHistoryList.length, itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => Padding( itemBuilder: (context, index) => Padding(
@ -68,8 +72,12 @@ class MedicalReports extends StatelessWidget {
), ),
Texts(model.appointHistoryList[index].projectName), Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName), Texts(model.appointHistoryList[index].clinicName),
Texts(DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)), Texts(projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(totalAverage: model.appointHistoryList[index].actualDoctorRate.toDouble(), forceStars: true), StarRating(
totalAverage: model
.appointHistoryList[index].actualDoctorRate
.toDouble(),
forceStars: true),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -80,13 +88,15 @@ class MedicalReports extends StatelessWidget {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => confirmBox(model.appointHistoryList[index], model), onTap: () =>
confirmBox(model.appointHistoryList[index], model),
child: Container( child: Container(
width: 80, width: 85,
height: 50, height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black54, color: Colors.black54,
border: Border.all(color: Colors.transparent, width: 2), border:
Border.all(color: Colors.transparent, width: 2),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.0), Radius.circular(8.0),
@ -94,7 +104,7 @@ class MedicalReports extends StatelessWidget {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'Request', TranslationBase.of(context).requestReport,
fontSize: 12, fontSize: 12,
color: Colors.white, color: Colors.white,
), ),
@ -129,13 +139,13 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Text('Confirm'), title: Texts(TranslationBase.of(context).confirm),
children: <Widget>[ children: <Widget>[
Container( Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Texts('Request a medical report'), Texts(TranslationBase.of(context).confirmMsgReport),
SizedBox( SizedBox(
height: 5.0, height: 5.0,
), ),
@ -158,7 +168,7 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts(
'cancel', TranslationBase.of(context).cancel,
color: Colors.red, color: Colors.red,
), ),
), ),
@ -182,7 +192,7 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Texts(
'ok', TranslationBase.of(context).ok,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),

@ -0,0 +1,217 @@
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class LineChartCurved extends StatelessWidget {
final String title;
final List<TimeSeriesSales2> timeSeries;
final int indexes;
LineChartCurved({this.title, this.timeSeries, this.indexes});
List<int> xAxixs = List();
List<double> yAxixs = List();
@override
Widget build(BuildContext context) {
getXaxix();
getYaxix();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 4,
),
Text(
title,
style: TextStyle(
color: Colors.black,
fontSize: 32,
fontWeight: FontWeight.bold,
letterSpacing: 2),
textAlign: TextAlign.center,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
const SizedBox(
height: 10,
),
],
),
],
),
),
);
}
getXaxix() {
for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexes * index;
if (mIndex < timeSeries.length) {
xAxixs.add(mIndex);
}
}
}
getYaxix() {
int indexess= (timeSeries.length*0.30).toInt();
for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexess * index;
if (mIndex < timeSeries.length) {
yAxixs.add(timeSeries[mIndex].sales);
}
}
}
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white,
),
touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontSize: 10,
),
rotateAngle:-65,
//rotateAngle:-65,
margin: 22,
getTitles: (value) {
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0)
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == timeSeries.length - 1)
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
getTitles: (value) {
// if (timeSeries.length < 10) {
// return '${value.toInt()}';
// } else {
// if (value == getMinY())
// return '${value.toInt()}';
// if (value == getMaxY())
// return '${value.toInt()}';
// if (yAxixs.contains(value)) {
// return '${value.toInt()}';
// }
// return '';
// }
return '${value.toInt()}';
},
margin: 12,
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
),
minX: 0,
maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY()+0.3,
minY: getMinY(),
lineBarsData: getData(context),
);
}
double getMaxY() {
double max = 0;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble() ;
}
double getMinY() {
double min = timeSeries[0].sales;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
int value = min.toInt();
return value.toDouble();
}
List<LineChartBarData> getData(context) {
List<FlSpot> spots = List();
for (int index = 0; index < timeSeries.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries[index].sales));
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
return [
lineChartBarData1,
];
}
}

@ -101,7 +101,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
des: TranslationBase.of(context).body, des: TranslationBase.of(context).body,
icon: DQIcons.bmi, icon: DQIcons.bmi,
lastVal: mode lastVal: mode
.vitalSignResModelList[0].pulseBeatPerMinute .vitalSignResModelList[ mode.vitalSignResModelList.length - 1].pulseBeatPerMinute
.toString(), .toString(),
unit: TranslationBase.of(context).mass, unit: TranslationBase.of(context).mass,
), ),
@ -123,7 +123,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
des: TranslationBase.of(context).temperature, des: TranslationBase.of(context).temperature,
icon: DQIcons.thermometer, icon: DQIcons.thermometer,
lastVal: mode lastVal: mode
.vitalSignResModelList[0].temperatureCelcius .vitalSignResModelList[ mode.vitalSignResModelList.length - 1].temperatureCelcius
.toString(), .toString(),
unit: TranslationBase.of(context).tempC, unit: TranslationBase.of(context).tempC,
), ),
@ -149,7 +149,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
icon: DQIcons.heart, icon: DQIcons.heart,
lastVal: mode lastVal: mode
.vitalSignResModelList[ .vitalSignResModelList[
mode.vitalSignResModelList.length - 1] mode.vitalSignResModelList.length - 1]
.pulseBeatPerMinute .pulseBeatPerMinute
.toString(), .toString(),
unit: TranslationBase.of(context).bpm, unit: TranslationBase.of(context).bpm,
@ -172,7 +172,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
icon: DQIcons.outline, icon: DQIcons.outline,
lastVal: mode lastVal: mode
.vitalSignResModelList[ .vitalSignResModelList[
mode.vitalSignResModelList.length - 1] mode.vitalSignResModelList.length - 1]
.respirationBeatPerMinute .respirationBeatPerMinute
.toString(), .toString(),
unit: TranslationBase.of(context).respirationSigns, unit: TranslationBase.of(context).respirationSigns,
@ -199,7 +199,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
icon: DQIcons.blood_pressure, icon: DQIcons.blood_pressure,
lastVal: mode lastVal: mode
.vitalSignResModelList[ .vitalSignResModelList[
mode.vitalSignResModelList.length - 1] mode.vitalSignResModelList.length - 1]
.bloodPressure .bloodPressure
.toString(), .toString(),
unit: TranslationBase.of(context).sysDias, unit: TranslationBase.of(context).sysDias,

@ -1,9 +1,12 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/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:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class VitalSignDetailsWidget extends StatefulWidget { class VitalSignDetailsWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList; final List<VitalSignResModel> vitalList;
@ -21,6 +24,7 @@ class VitalSignDetailsWidget extends StatefulWidget {
class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> { class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
@ -38,7 +42,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
border: TableBorder.symmetric( border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), inside: BorderSide(width: 2.0, color: Colors.grey[300]),
), ),
children: fullData(), children: fullData(projectViewModel),
), ),
], ],
), ),
@ -46,20 +50,21 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
); );
} }
List<TableRow> fullData() { List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#515B5D'), color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
), ),
child: Center( child: Center(
child: Texts( child: Texts(
widget.title1, TranslationBase.of(context).date,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -69,9 +74,10 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#515B5D'), color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0), topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
), ),
), ),
child: Center( child: Center(
@ -81,32 +87,34 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
) )
])); ]));
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
tableRow.add(TableRow(children: [ var data = vital.toJson()[widget.viewKey];
Container( if (data != 0)
child: Container( tableRow.add(TableRow(children: [
padding: EdgeInsets.all(10), Container(
color: Colors.white, child: Container(
child: Center( padding: EdgeInsets.all(10),
child: Texts( color: Colors.white,
'${DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', child: Center(
textAlign: TextAlign.center, child: Texts(
'${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate.weekday) : DateUtil.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate.month) : DateUtil.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
),
), ),
), ),
), ),
), Container(
Container( child: Container(
child: Container( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), color: Colors.white,
color: Colors.white, child: Center(
child: Center( child: Texts(
child: Texts( '${vital.toJson()[widget.viewKey]}',
'${vital.toJson()[widget.viewKey]}', textAlign: TextAlign.center,
textAlign: TextAlign.center, ),
), ),
), ),
), ),
), ]));
]));
}); });
return tableRow; return tableRow;
} }

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart'; import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart';
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class VitalSignItemDetailsScreen extends StatelessWidget { class VitalSignItemDetailsScreen extends StatelessWidget {
final VitalSignDetails pageKey; final VitalSignDetails pageKey;
@ -15,43 +17,56 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
switch (pageKey) { switch (pageKey) {
case VitalSignDetails.BodyMeasurements: case VitalSignDetails.BodyMeasurements:
VSchart = [ VSchart = [
{ {
'name': 'Height', 'name': 'Height',
'nameAr': 'الطول',
'title1': 'Date', 'title1': 'Date',
'title2': 'Cm', 'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm', 'viewKey': 'HeightCm',
}, },
{ {
'name': 'Weight Kg', 'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date', 'title1': 'Date',
'title2': 'Kg', 'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg', 'viewKey': 'WeightKg',
}, },
{ {
'name': 'BodyMassIndex', 'name': 'Body Mass Index',
'nameAr': 'مؤشر كتلة الجسم',
'title1': 'Date', 'title1': 'Date',
'title2': 'BodyMass', 'title2': 'BodyMass',
'title2Ar': 'كتلة الجسم',
'viewKey': 'BodyMassIndex', 'viewKey': 'BodyMassIndex',
}, },
{ {
'name': 'HeadCircumCm', 'name': 'Head Circum Cm',
'nameAr': 'محيط رأس سم',
'title1': 'Date', 'title1': 'Date',
'title2': 'Cm', 'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeadCircumCm', 'viewKey': 'HeadCircumCm',
}, },
{ {
'name': 'Ideal Body Weight (Lbs)', 'name': 'Ideal Body Weight (Lbs)',
'nameAr': 'وزن الجسم المثالي (رطل)',
'title1': 'Date', 'title1': 'Date',
'title2': 'Ideal Weight', 'title2': 'Ideal Weight',
'title2Ar': 'الوزن المثالي',
'viewKey': 'IdealBodyWeightLbs', 'viewKey': 'IdealBodyWeightLbs',
}, },
{ {
'name': 'LeanBodyWeightLbs (Lbs)', 'name': 'Lean Body WeightLbs (Lbs)',
'nameAr': 'رطل وزن الجسم النحيل (رطل)',
'title1': 'Date', 'title1': 'Date',
'title2': 'Lean Weight', 'title2': 'Lean Weight',
'title2Ar': 'وزن خفيف',
'viewKey': 'LeanBodyWeightLbs', 'viewKey': 'LeanBodyWeightLbs',
} }
]; ];
@ -61,9 +76,11 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
case VitalSignDetails.Temperature: case VitalSignDetails.Temperature:
VSchart = [ VSchart = [
{ {
'name': 'Temperature In Celcius', 'name': 'Temperature In Celsius',
'nameAr': 'درجة الحرارة بالدرجة المئوية',
'title1': 'Date', 'title1': 'Date',
'title2': 'C', 'title2': 'C',
'title2Ar': 'ْس',
'viewKey': 'TemperatureCelcius', 'viewKey': 'TemperatureCelcius',
}, },
]; ];
@ -73,8 +90,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Pulse Beat Per Minute', 'name': 'Pulse Beat Per Minute',
'nameAr': 'نبضة نبضة في الدقيقة',
'title1': 'Date', 'title1': 'Date',
'title2': 'Minute', 'title2': 'Minute',
'title2Ar': 'دقيقة',
'viewKey': 'PulseBeatPerMinute', 'viewKey': 'PulseBeatPerMinute',
}, },
]; ];
@ -84,8 +103,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Respiration Beat Per Minute', 'name': 'Respiration Beat Per Minute',
'nameAr': 'ضربات التنفس في الدقيقة',
'title1': 'Date', 'title1': 'Date',
'title2': 'Beat Per Minute', 'title2': 'Beat Per Minute',
'title2Ar': 'نفس في الدقيقة',
'viewKey': 'RespirationBeatPerMinute', 'viewKey': 'RespirationBeatPerMinute',
}, },
]; ];
@ -95,14 +116,18 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Blood Pressure Higher', 'name': 'Blood Pressure Higher',
'nameAr': 'ضغط الدم الإنقباض',
'title1': 'Date', 'title1': 'Date',
'title2': 'Minute', 'title2': 'Minute',
'title2Ar': 'الإنقباض',
'viewKey': 'BloodPressureHigher', 'viewKey': 'BloodPressureHigher',
}, },
{ {
'name': 'Blood Pressure Lower', 'name': 'Blood Pressure Lower',
'nameAr': 'ضغط الدم الإنبساط',
'title1': 'Date', 'title1': 'Date',
'title2': 'Minute', 'title2': 'Minute',
'title2Ar': 'الإنبساط',
'viewKey': 'BloodPressureLower', 'viewKey': 'BloodPressureLower',
} }
]; ];
@ -112,8 +137,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Respiration Rate', 'name': 'Respiration Rate',
'nameAr': 'معدل التنفس',
'title1': 'Date', 'title1': 'Date',
'title2': 'bpm', 'title2': 'bpm',
'title2Ar': 'نفس',
'viewKey': 'RespirationBeatPerMinute', 'viewKey': 'RespirationBeatPerMinute',
}, },
]; ];
@ -123,8 +150,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'FIO2', 'name': 'FIO2',
'nameAr': 'معدل النبض بالدقيقة',
'title1': 'Date', 'title1': 'Date',
'title2': 'bpm', 'title2': 'bpm',
'title2Ar': 'نبضة',
'viewKey': 'PulseBeatPerMinute', 'viewKey': 'PulseBeatPerMinute',
}, },
]; ];
@ -134,8 +163,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'PainScore', 'name': 'PainScore',
'nameAr': 'نقاط الألم',
'title1': 'Date', 'title1': 'Date',
'title2': 'Cm', 'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'PainScore', 'viewKey': 'PainScore',
}, },
]; ];
@ -145,8 +176,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Weight Kg', 'name': 'Weight Kg',
'nameAr': 'الوزن كجم',
'title1': 'Date', 'title1': 'Date',
'title2': 'Kg', 'title2': 'Kg',
'title2Ar': 'كجم',
'viewKey': 'WeightKg', 'viewKey': 'WeightKg',
}, },
]; ];
@ -157,8 +190,10 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
VSchart = [ VSchart = [
{ {
'name': 'Height Cm', 'name': 'Height Cm',
'nameAr': 'الطول سم',
'title1': 'Date', 'title1': 'Date',
'title2': 'Cm', 'title2': 'Cm',
'title2Ar': 'سم',
'viewKey': 'HeightCm', 'viewKey': 'HeightCm',
}, },
]; ];
@ -177,9 +212,9 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
return vitalListTemp.length != 0 return vitalListTemp.length != 0
? VitalSingChartAndDetials( ? VitalSingChartAndDetials(
vitalList: vitalList, vitalList: vitalList,
name: chartInfo['name'], name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'],
title1: chartInfo['title1'], title1: chartInfo['title1'],
title2: chartInfo['title2'], title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'],
viewKey: chartInfo['viewKey']) viewKey: chartInfo['viewKey'])
: Container(); : Container();
}).toList(), }).toList(),

@ -6,6 +6,8 @@ import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
import 'LineChartCurved.dart';
class VitalSingChartAndDetials extends StatelessWidget { class VitalSingChartAndDetials extends StatelessWidget {
VitalSingChartAndDetials({ VitalSingChartAndDetials({
Key key, Key key,
@ -21,31 +23,18 @@ class VitalSingChartAndDetials extends StatelessWidget {
final String viewKey; final String viewKey;
final String title1; final String title1;
final String title2; final String title2;
List<TimeSeriesSales> timeSeriesData = []; List<TimeSeriesSales2> timeSeriesData = [];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
generateData();
return Column( return Column(
children: <Widget>[ children: <Widget>[
AppExpandableNotifier( AppExpandableNotifier(
headerWidget: AppTimeSeriesChart( isExpand: true,
seriesList: generateData(), headerWidget: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,),
chartName: name,
startDate: DateTime(
vitalList[vitalList.length - 1]
.vitalSignDate
.year,
vitalList[vitalList.length - 1]
.vitalSignDate
.month +
3,
vitalList[vitalList.length - 1]
.vitalSignDate
.day),
endDate: vitalList[0].vitalSignDate,
),
bodyWidget: VitalSignDetailsWidget( bodyWidget: VitalSignDetailsWidget(
vitalList: vitalList.reversed.toList(), vitalList: vitalList,
title1: title1, title1: title1,
title2: title2, title2: title2,
viewKey: viewKey, viewKey: viewKey,
@ -59,24 +48,16 @@ class VitalSingChartAndDetials extends StatelessWidget {
if (vitalList.length > 0) { if (vitalList.length > 0) {
vitalList.forEach( vitalList.forEach(
(element) { (element) {
if( element.toJson()[viewKey]?.toInt()!=0)
timeSeriesData.add( timeSeriesData.add(
TimeSeriesSales( TimeSeriesSales2(
new DateTime(element.vitalSignDate.year, new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day),
element.vitalSignDate.month, element.vitalSignDate.day), element.toJson()[viewKey].toDouble(),
element.toJson()[viewKey]?.toInt(),
), ),
); );
}, },
); );
} }
return [ return timeSeriesData.reversed.toList();
new charts.Series<TimeSeriesSales, DateTime>(
id: 'Sales',
colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
domainFn: (TimeSeriesSales sales, _) => sales.time,
measureFn: (TimeSeriesSales sales, _) => sales.sales,
data: timeSeriesData,
)
];
} }
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -50,11 +51,17 @@ class PaymentService extends StatelessWidget {
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Image.asset( SizedBox(
'assets/images/al-habib_online_payment_service_icon.png', height: 12,
fit: BoxFit.fill, ),
height: 55, Container(
width: double.infinity, margin: EdgeInsets.only(left: 10, right: 10),
child: Image.asset(
'assets/images/online_payment_icon.png',
fit: BoxFit.fill,
height: 55,
width: double.infinity,
),
), ),
], ],
), ),
@ -62,36 +69,43 @@ class PaymentService extends StatelessWidget {
), ),
), ),
Expanded( Expanded(
child: Container( child: InkWell(
margin: EdgeInsets.all(5.0), onTap: () =>
padding: EdgeInsets.all(9), Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))),
decoration: BoxDecoration( child: Container(
color: Colors.white, margin: EdgeInsets.all(5.0),
borderRadius: BorderRadius.circular(8.0), padding: EdgeInsets.all(9),
shape: BoxShape.rectangle), decoration: BoxDecoration(
child: Column( color: Colors.white,
crossAxisAlignment: CrossAxisAlignment.start, borderRadius: BorderRadius.circular(8.0),
children: [ shape: BoxShape.rectangle),
Texts( child: Column(
TranslationBase.of(context).onlineCheckIn, crossAxisAlignment: CrossAxisAlignment.start,
color: HexColor('#B61422'), children: [
bold: true, Texts(
), TranslationBase.of(context).onlineCheckIn,
Texts( color: HexColor('#B61422'),
TranslationBase.of(context).appointment, bold: true,
fontSize: 14, ),
fontWeight: FontWeight.normal, Texts(
), TranslationBase.of(context).appointment,
Align( fontSize: 14,
alignment: projectViewModel.isArabic fontWeight: FontWeight.normal,
? Alignment.centerRight ),
: Alignment.centerLeft, SizedBox(
child: Image.asset( height: 12,
'assets/images/al-habib_online_payment_service_icon.png', ),
height: 55, Align(
alignment: !projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/device_icon.png',
height: 55,
),
), ),
), ],
], ),
), ),
), ),
) )
@ -124,12 +138,15 @@ class PaymentService extends StatelessWidget {
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
SizedBox(
height: 12,
),
Align( Align(
alignment: projectViewModel.isArabic alignment: !projectViewModel.isArabic
? Alignment.centerRight ? Alignment.centerRight
: Alignment.centerLeft, : Alignment.centerLeft,
child: Image.asset( child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png', 'assets/images/new-design/check-in.png',
height: 55, height: 55,
), ),
), ),

@ -21,6 +21,8 @@ class MedicineSearch extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>( return BaseView<PharmacyViewModel>(
allowAny: true,
onModelReady: (model) => model.clearMedicineSearch(),
builder: (BuildContext context, PharmacyViewModel model, Widget child) => builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold( AppScaffold(
baseViewModel: model, baseViewModel: model,

@ -1,20 +1,19 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; import 'dart:convert';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import '../base/base_view.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/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'dart:typed_data'; import 'package:flutter/cupertino.dart';
import 'dart:convert'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../base/base_view.dart';
class PharmaciesList extends StatelessWidget { class PharmaciesList extends StatelessWidget {
final int medicineID; final int medicineID;
final String imageURL; final String imageURL;
@ -25,11 +24,14 @@ class PharmaciesList extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>( return BaseView<PharmacyViewModel>(
allowAny: true,
onModelReady: (model) => model.getPharmacies(id: medicineID), onModelReady: (model) => model.getPharmacies(id: medicineID),
builder: (BuildContext context, PharmacyViewModel model, Widget child) => builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaciesList, appBarTitle: TranslationBase.of(context).pharmaciesList,
baseViewModel: model, baseViewModel: model,
isShowAppBar: true,
isShowDecPage: false,
body: Container( body: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
child: ListView( child: ListView(
@ -146,7 +148,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell( child: InkWell(
child: Icon( child: Icon(
Icons.phone, Icons.phone,
color: Colors.red, color: Theme.of(context).primaryColor,
), ),
onTap: () => launch("tel://" + onTap: () => launch("tel://" +
model.pharmacyList[index].phoneNumber), model.pharmacyList[index].phoneNumber),
@ -157,7 +159,7 @@ class PharmaciesList extends StatelessWidget {
child: InkWell( child: InkWell(
child: Icon( child: Icon(
Icons.local_pharmacy, Icons.local_pharmacy,
color: Colors.red, color: Theme.of(context).primaryColor,
), ),
onTap: () { onTap: () {
MapsLauncher.launchCoordinates( MapsLauncher.launchCoordinates(

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -72,7 +73,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 25, height: 25,
), ),
Texts( Texts(
'How would you rate your last visit to the Clinic', TranslationBase.of(context).lastAppointment,
bold: true, bold: true,
color: Colors.black, color: Colors.black,
), ),
@ -122,7 +123,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
), ),
Center( Center(
child: Texts( child: Texts(
'Please rate the Clinic', TranslationBase.of(context).rateClinic,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
SizedBox( SizedBox(
@ -145,7 +146,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: Container( child: Container(
key: ValueKey<int>(rating), key: ValueKey<int>(rating),
child: IconButton( child: IconButton(
iconSize: 55.0, iconSize: 45.0,
onPressed: () { onPressed: () {
setState(() { setState(() {
rating = index + 1; rating = index + 1;
@ -206,7 +207,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
message: 'please rate the clinic'); message: 'please rate the clinic');
} }
}, },
label: "Rate", label: TranslationBase.of(context).submit,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
@ -224,7 +225,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
); );
}, },
child: Texts( child: Texts(
'Later', TranslationBase.of(context).later,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: HexColor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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';
@ -39,7 +40,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
headline6: headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Text('Rate'), title: Text(TranslationBase.of(context).rate),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return IconButton( return IconButton(
@ -60,10 +61,10 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 25, height: 25, //5598
), ),
Texts( Texts(
'How would you rate your last visit to the doctor', TranslationBase.of(context).lastVisit,
bold: true, bold: true,
color: Colors.black, color: Colors.black,
), ),
@ -93,7 +94,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
height: 22, height: 22,
), ),
Texts( Texts(
model.appointmentDetails.doctorName, TranslationBase.of(context).dr + " " + model.appointmentDetails.doctorName,
bold: true, bold: true,
), ),
SizedBox( SizedBox(
@ -114,7 +115,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
), ),
Center( Center(
child: Texts( child: Texts(
'Please rate the doctor', TranslationBase.of(context).tapTitle,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
SizedBox( SizedBox(
@ -137,7 +138,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Container( child: Container(
key: ValueKey<int>(rating), key: ValueKey<int>(rating),
child: IconButton( child: IconButton(
iconSize: 55.0, iconSize: 45.0,
onPressed: () { onPressed: () {
setState(() { setState(() {
rating = index + 1; rating = index + 1;
@ -161,15 +162,15 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
Form( Form(
key: formKey, key: formKey,
child: TextFields( child: TextFields(
hintText: "Notes", hintText: TranslationBase.of(context).notes,
minLines: 4, minLines: 4,
maxLines: 4, maxLines: 4,
validator: (value) { // validator: (value) {
if (value.isEmpty) // if (value.isEmpty)
return 'Please enter your note'; // return 'Please enter your note';
else if (rating == 0) return 'Rating cannot be \"0\"'; // else if (rating == 0) return 'Rating cannot be \"0\"';
return null; // return null;
}, // },
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
note = value; note = value;
@ -204,7 +205,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
); );
} }
}, },
label: "Next", label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
@ -222,7 +223,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
); );
}, },
child: Texts( child: Texts(
'Later', TranslationBase.of(context).later,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: HexColor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,

@ -1,24 +1,42 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class ProfileSettings extends StatefulWidget { class ProfileSettings extends StatefulWidget {
@override @override
_ProfileSettings createState() => _ProfileSettings(); _ProfileSettings createState() => _ProfileSettings();
} }
class _ProfileSettings extends State<ProfileSettings> class _ProfileSettings extends State<ProfileSettings>
with TickerProviderStateMixin { with TickerProviderStateMixin {
bool smsAlert = true;
bool emailAlert = true;
int language = 1;
final authService = new AuthProvider();
TextEditingController emergencyContact = new TextEditingController();
TextEditingController emailController = new TextEditingController();
TextEditingController emergencyContactName = new TextEditingController();
@override
void initState() {
Future.delayed(new Duration(seconds: 0), () {
getSettings(context);
});
super.initState();
}
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool isVibration = true;
var language = 1;
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) => {},
builder: (_, model, wi) => Container( builder: (_, model, wi) => Container(
child: child:
ListView(scrollDirection: Axis.vertical, children: <Widget>[ ListView(scrollDirection: Axis.vertical, children: <Widget>[
@ -62,7 +80,9 @@ class _ProfileSettings extends State<ProfileSettings>
value: 2, value: 2,
groupValue: language, groupValue: language,
onChanged: (value) { onChanged: (value) {
language = value; setState(() {
language = value;
});
}, },
) )
], ],
@ -79,7 +99,9 @@ class _ProfileSettings extends State<ProfileSettings>
value: 1, value: 1,
groupValue: language, groupValue: language,
onChanged: (value) { onChanged: (value) {
language = value; setState(() {
language = value;
});
}, },
) )
], ],
@ -97,10 +119,10 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emailAlert), AppText(TranslationBase.of(context).emailAlert),
Switch( Switch(
value: isVibration, value: emailAlert,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
isVibration = value; emailAlert = value;
}); });
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
@ -117,10 +139,10 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).smsAlert), AppText(TranslationBase.of(context).smsAlert),
Switch( Switch(
value: isVibration, value: smsAlert,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
isVibration = value; smsAlert = value;
}); });
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
@ -141,7 +163,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).email), AppText(TranslationBase.of(context).email),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emailController,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -156,7 +178,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyName), AppText(TranslationBase.of(context).emergencyName),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emergencyContactName,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -171,7 +193,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyContact), AppText(TranslationBase.of(context).emergencyContact),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emergencyContact,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
), ),
@ -186,11 +208,46 @@ class _ProfileSettings extends State<ProfileSettings>
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).submit, TranslationBase.of(context).submit,
() { () {
// print(mobileNo.text); saveSettings();
}, },
)), )),
], ],
)) ))
]))); ])));
} }
getSettings(context) {
GifLoaderDialogUtils.showMyDialog(context);
authService.getSettings().then((result) => {
GifLoaderDialogUtils.hideDialog(context),
setValue(result["PateintInfoForUpdateList"][0])
});
}
setValue(value) {
setState(() {
this.language = int.parse(value["PreferredLanguage"]);
this.emailAlert = value["IsEmailAlertRequired"];
this.smsAlert = value["IsSMSAlertRequired"];
this.emailController.text = value["EmailAddress"];
this.emergencyContact.text = value["EmergencyContactNo"];
this.emergencyContactName.text = value["EmergencyContactName"];
});
}
saveSettings() {
GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["EmailAddress"] = this.emailController.text;
request["EmergencyContactName"] = this.emergencyContactName.text;
request["EmergencyContactNo"] = this.emergencyContact.text;
request["IsEmailAlertRequired"] = this.emailAlert;
request["IsSMSAlertRequired"] = this.smsAlert;
request["PreferredLanguage"] = this.language.toString();
authService.saveSettings(request).then((result) => {
AppToast.showSuccessToast(
message: TranslationBase.of(context).profileUpdate),
GifLoaderDialogUtils.hideDialog(context)
});
}
} }

@ -1021,6 +1021,44 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"ProjectID": projID,
"ClinicID": clinicID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"TokenID": "@dm!n",
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPatientPrescriptionReports( Future<Map> getPatientPrescriptionReports(
AppoitmentAllHistoryResultList appo, BuildContext context) async { AppoitmentAllHistoryResultList appo, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;

@ -24,27 +24,39 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
AppGlobal appGlobal = new AppGlobal(); AppGlobal appGlobal = new AppGlobal();
const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; const String INSERT_DEVICE_IMEI =
const String SELECT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI'; 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI';
const String CHECK_PATIENT_AUTH = 'Services/Authentication.svc/REST/CheckPatientAuthentication'; const String SELECT_DEVICE_IMEI =
'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String CHECK_PATIENT_AUTH =
'Services/Authentication.svc/REST/CheckPatientAuthentication';
const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo'; const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo';
const SEND_ACTIVATION_CODE = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType'; const SEND_ACTIVATION_CODE =
const CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCode'; 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
const FORGOT_PASSWORD = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; const CHECK_ACTIVATION_CODE =
const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration"; 'Services/Authentication.svc/REST/CheckActivationCode';
const FORGOT_PASSWORD =
'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo';
const CHECK_PATIENT_FOR_REGISTRATION =
"Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo"; const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo";
const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration';
const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo'; const LOGGED_IN_USER_URL =
'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo';
const FORGOT_PATIENT_ID = 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; const FORGOT_PATIENT_ID =
'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate';
const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo';
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
bool isLoading = true; bool isLoading = true;
dynamic authenticatedUser; dynamic authenticatedUser;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthProvider() { AuthProvider() {
getUserAuthentication(); getUserAuthentication();
@ -98,7 +110,8 @@ class AuthProvider with ChangeNotifier {
var lastLogin = lstLogin; //await sharedPref.getInt( var lastLogin = lstLogin; //await sharedPref.getInt(
// LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); // LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
var request = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var request =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var newRequest = INSERTDeviceIMEIRequest(); var newRequest = INSERTDeviceIMEIRequest();
var imei = await sharedPref.getString(PUSH_TOKEN); var imei = await sharedPref.getString(PUSH_TOKEN);
@ -120,7 +133,8 @@ class AuthProvider with ChangeNotifier {
newRequest.tokenID = await sharedPref.getString(TOKEN); newRequest.tokenID = await sharedPref.getString(TOKEN);
// } // }
await new BaseAppClient().post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(INSERT_DEVICE_IMEI,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -137,33 +151,40 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request['IMEI'] = imei; request['IMEI'] = imei;
await new BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(SELECT_DEVICE_IMEI,
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]); onSuccess: (dynamic response, int statusCode) {
localRes = SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); return Future.value(null);
//throw error;
} }
} }
Future<dynamic> checkPatientAuthentication(CheckPatientAuthenticationReq request) async { Future<dynamic> checkPatientAuthentication(
CheckPatientAuthenticationReq request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = LANGUAGE_ID; request.languageID = LANGUAGE_ID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(CHECK_PATIENT_AUTH,
localRes = response; onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) { localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
throw error; throw error;
}, body: request.toJson()); //throw error;
return Future.value(localRes); }
} }
Future<dynamic> getLoginInfo(request) async { Future<dynamic> getLoginInfo(request) async {
@ -177,7 +198,8 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(GET_MOBILE_INFO, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(GET_MOBILE_INFO,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -196,7 +218,8 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(SEND_ACTIVATION_CODE,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -213,23 +236,26 @@ class AuthProvider with ChangeNotifier {
neRequest.channel = CHANNEL; neRequest.channel = CHANNEL;
neRequest.iPAdress = IP_ADDRESS; neRequest.iPAdress = IP_ADDRESS;
neRequest.generalid = GENERAL_ID; neRequest.generalid = GENERAL_ID;
neRequest.languageID = LANGUAGE_ID; // neRequest.languageID = LANGUAGE_ID;
neRequest.deviceTypeID = DeviceTypeID; neRequest.deviceTypeID = DeviceTypeID;
neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1; neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1;
neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true;
neRequest.isDentalAllowedBackend = false; neRequest.isDentalAllowedBackend = false;
neRequest.deviceToken = null; neRequest.deviceToken = null;
neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false; neRequest.forRegisteration =
neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister = false; neRequest.isRegister = false;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(CHECK_ACTIVATION_CODE,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
return Future.value(error); return Future.value(error);
// throw error; // throw error;
}, body: neRequest.toJson()); }, body: neRequest.toJson());
sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
throw error; throw error;
@ -239,11 +265,11 @@ class AuthProvider with ChangeNotifier {
AuthenticatedUser getAuthenticatedUser() { AuthenticatedUser getAuthenticatedUser() {
this.isLogin = true; this.isLogin = true;
authenticatedUser = authenticatedUserObject.user;
return authenticatedUser; return authenticatedUser;
} }
Future<dynamic> checkPatientForRegisteration(CheckPatientForRegistration request) async { Future<dynamic> checkPatientForRegisteration(
CheckPatientForRegistration request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
@ -254,7 +280,8 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -277,7 +304,8 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_USER_STATUS, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(CHECK_USER_STATUS,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -300,7 +328,8 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(REGISTER_USER,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -312,17 +341,21 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future registeredAuthenticatedUser(AuthenticatedUser user, deviceToken, lat, long) async { Future registeredAuthenticatedUser(
AuthenticatedUser user, deviceToken, lat, long) async {
var request = new RegisteredAuthenticatedUserRequest(); var request = new RegisteredAuthenticatedUserRequest();
request.deviceToken = deviceToken; request.deviceToken = deviceToken;
request.voipToken = ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false); request.voipToken =
""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false);
request.deviceType = DeviceTypeID.toString(); request.deviceType = DeviceTypeID.toString();
request.patientMobileNumber = '0' + user.mobileNumber; request.patientMobileNumber = '0' + user.mobileNumber;
request.nationalID = user.patientIdentificationNo; request.nationalID = user.patientIdentificationNo;
request.gender = user.gender; request.gender = user.gender;
request.patientID = user.patientID; request.patientID = user.patientID;
request.patientOutSA = user.outSA; request.patientOutSA = user.outSA;
request.loginType = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1; request.loginType = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN)
: 1;
request.mACAddress = '00:00:00:00:00:00'; request.mACAddress = '00:00:00:00:00:00';
request.latitude = lat; request.latitude = lat;
request.longitude = long; request.longitude = long;
@ -330,7 +363,8 @@ class AuthProvider with ChangeNotifier {
request.patientTypeID = 2; request.patientTypeID = 2;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(LOGGED_IN_USER_URL, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(LOGGED_IN_USER_URL,
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -344,7 +378,8 @@ class AuthProvider with ChangeNotifier {
Future<Map> sendPatientIDSMS(mobileNo, context) async { Future<Map> sendPatientIDSMS(mobileNo, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -365,7 +400,8 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(FORGOT_PATIENT_ID, onSuccess: (response, statusCode) async { await new BaseAppClient().post(FORGOT_PATIENT_ID,
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -386,7 +422,8 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(FORGOT_PASSWORD, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(FORGOT_PASSWORD,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -412,7 +449,44 @@ class AuthProvider with ChangeNotifier {
request["PatientType"] = 1; request["PatientType"] = 1;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DASHBOARD, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(DASHBOARD,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
// throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
throw error;
//return Future.value(error);
}
}
getSettings() async {
dynamic localRes;
try {
await new BaseAppClient().post(PROFILE_SETTING,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
// throw error;
}, body: {});
return Future.value(localRes);
} catch (error) {
throw error;
//return Future.value(error);
}
}
Future saveSettings(request) async {
dynamic localRes;
try {
await new BaseAppClient().post(SAVE_SETTING,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;

@ -293,7 +293,7 @@ class FamilyFilesProvider with ChangeNotifier {
AppToast.showErrorToast(message: error); AppToast.showErrorToast(message: error);
throw error; throw error;
}, body: request); }, body: request);
sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']);
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);

@ -27,7 +27,7 @@ class _SplashScreenState extends State<SplashScreen> {
Timer( Timer(
Duration(seconds: 1, milliseconds: 500), Duration(seconds: 1, milliseconds: 500),
() { () {
getUserData().then((value) { Provider.of<ProjectViewModel>(context, listen: false).loadSharedPrefLanguage().then((value) {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => LandingPage(), builder: (BuildContext context) => LandingPage(),
@ -39,13 +39,7 @@ class _SplashScreenState extends State<SplashScreen> {
} }
Future getUserData() async { Future getUserData() async {
var data = await sharedPref.getObject(USER_PROFILE); Provider.of<ProjectViewModel>(context, listen: false).loadSharedPrefLanguage();
if (data != null) {
AuthenticatedUser userData = AuthenticatedUser.fromJson(data);
Provider.of<ProjectViewModel>(context, listen: false).isLogin = true;
authenticatedUserObject.isLogin = true;
authenticatedUserObject.user = userData;
}
} }
@override @override

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

Loading…
Cancel
Save