Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into fix_master

 Conflicts:
	assets/app_icons/config.json
	assets/app_icons/fonts/DQIcons.ttf
	lib/config/config.dart
	lib/config/shared_pref_kay.dart
	lib/d_q_icons_icons.dart
	lib/locator.dart
	lib/pages/landing/home_page.dart
	lib/pages/landing/landing_page.dart
	lib/pages/rateAppointment/rate_appointment_doctor.dart
	lib/uitl/utils.dart
	lib/widgets/others/app_scaffold_widget.dart
merge-requests/224/merge
Mohammad Aljammal 4 years ago
commit 0d098def04

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

1
ios/.gitignore vendored

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

@ -6,8 +6,9 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Doctor
@ -32,7 +33,7 @@ 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_RESULT =
'/Services/Patients.svc/REST/GetPatientLabResults';
'Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -124,6 +125,10 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL =
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -178,6 +183,9 @@ const CHECK_PAYMENT_STATUS =
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT =
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST =
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
@ -236,8 +244,9 @@ const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;
const PATIENT_TYPE = 2;
const PATIENT_TYPE_ID = 2;
var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
@ -246,6 +255,10 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS =
"Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS =
@ -354,7 +367,10 @@ const GET_ORDER_DETAIL_BY_ID =
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";

@ -1,4 +1,4 @@
const Map<String, Map<String, String>> localizedValues = {
const Map localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
@ -109,15 +109,19 @@ const Map<String, Map<String, String>> localizedValues = {
'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'دخولتسجيل'},
'welcome': {'en': 'Welcome', 'ar': 'أهلا بك'},
'welcome_text': {
'en': 'Dr. Sulaiman Al Habib Mobile Application ',
'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك'
'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
"welcome": {
"en": "Welcome",
"ar": "مرحبا"
},
"welcome_text": {
"en": "Dr. Sulaiman Al Habib Mobile Application",
"ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"
},
'welcome_text2': {
'en': 'Have you visited AlHabib Medical Group before? ',
'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك'
'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'
},
'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'},
@ -126,12 +130,23 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."
},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": {"en": "National ID", "ar": "رقم الهوية"},
"nationalID": { "en": "Enter the Identification Number",
"ar": "أدخل رقم الهوية الوطنية او الاقامة"},
"national-id": {
"en": "National ID",
"ar": "رقم الهوية"
},
"fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
"forgotFileNoTitle": {
"en": "Forgot medical file Number",
"ar": "نسيت رقم الملف"
},
"enter-national-id": {
"en": "Please enter mobile number and national ID / Iqama",
"ar": "الرجاء إدخال رقم الجوال والهوية الوطنية / الاقامة"
"en": "Please enter mobile number and identification number",
"ar": "الرجاء إدخال رقم الجوال ورقم الهوية"
},
"profile-info": {
"en": "Please enter profile information",
@ -283,6 +298,7 @@ const Map<String, Map<String, String>> localizedValues = {
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
"myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
"add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"},
"sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"},
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
@ -337,7 +353,7 @@ const Map<String, Map<String, String>> localizedValues = {
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
"myMedicalFileSubTitle": {
"en": "All your medical records",
'ar': 'جميع سجلاتك البية'
'ar': 'جميع سجلاتك الطبية'
},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": {
@ -348,7 +364,7 @@ const Map<String, Map<String, String>> localizedValues = {
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": {
"en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني'
'ar': 'خدمة الدفع الإلكتدوني'
},
"OffersAndPackages": {
"en": "Online transfer request",
@ -409,7 +425,7 @@ const Map<String, Map<String, String>> localizedValues = {
"locationa": {"en": "location:", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"},
"MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
"MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": {
"en": "No Booked Appointments",
"ar": "لا توجد مواعيد محجوزة"
@ -658,6 +674,10 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "الفحص ليس تشخيص."
},
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
"loginToUseService": {
"en": "You need to login to use this service",
"ar": "هذة الخدمة تتطلب تسجيل الدخول"
},
// pharmacy module
"medicationRefill": {
@ -701,4 +721,315 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك"
},
"email": {"en": "Email", "ar": "البريد الالكتروني"},
"Book": {"en": "Book", "ar": "احجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
"BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
"marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"},
"general": {"en": "General", "ar": "عام"},
"profile": {"en": "Profile", "ar": "ملفي"},
"notifications": {"en": "Notifications", "ar": "إشعارات"},
"notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"},
"notificationDetailsa": {
"en": "Notification Details",
"ar": "تفاصيل الاشعار"
},
"info-my-doctor-points": {
"en": [
"View the doctor's profile and qualifications.",
"View the doctor's schedule.",
"View details of your appointments with the selected doctor.",
"Book appointment with the doctor. ",
],
"ar": [
"الاطلاع على معلومات الطبيب ومؤهلاته.",
"الاطلاع على جدول الطبيب.",
"الاطلاع على تفاصيل المواعيد التي تمت مع الطبيب.",
"حجز موعد مع الطبيب."
]
},
"info-my-doctor": {
"en":
"This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:",
"ar":
"خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:"
},
"info-prescriptions": {
"en":
"This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:",
"ar":
"خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:"
},
"info-my-prescription-points": {
"en": [
"View the duration days.",
"View the frequency timing.",
"View the doctor's remarks.",
"Add a reminder to remind you when to take medicine doses.",
"Search in AlHabib Pharmacies about the branches where medicines are available, pharmacies locations and contact numbers.",
"Ordering and delivery medications online.",
"View the prices of the drug. ",
],
"ar": [
"الاطلاع على طريقة تناول العلاج.",
"الاطلاع على مدة تناول العلاج.",
"الاطلاع على ملاحظات الطبيب.",
"اضافة منبه للتذكير بموعد تناول جرعات الادوية.",
"البحث في صيدليات الحبيب عن الفروع التي يتوفر فيها العلاج وكذلك مواقع الصيدليات وارقام الاتصال. ",
"امكانية شراء وتوصيل العلاج عن طريق الانترنت.",
"الاطلاع على اسعار الادوية المصروفة."
]
},
"info-insurance-cards": {
"en":
"This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
"ar":
"خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
"info-insurance-cards-points": {
"en": [
"Name of the insurance company.",
"Insurance category.",
"Insurance policy number.",
"The expiry date of insurance.",
"The status of the insurance card (active or inactive).",
"Details of the coverage, e.x the room category covered as well some cases covered by the insurance.",
],
"ar": [
"اسم شركة التامين.",
"فئة التامين.",
"رقم بوليصة التامين.",
"تاريخ انتهاء التامين.",
"حالة بطاقة التامين (فعالة او غير فعالة).",
"تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.",
]
},
"info-allergies": {
"en":
"This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.",
"ar":
"خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية."
},
"sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"},
"info-sick-leaves": {
"en":
"This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:",
"ar":
"الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:"
},
"info-sick-leave-points": {
"en": [
"Doctor Name",
"Sick leave date ",
"Sick leave days",
"Branch that patient take the vaccination form.",
"Sending a report of vaccinations to the email. ",
],
"ar": [
"اسم الطبيب",
"تاريخ الاجازة.",
"عدد ايام الاجازة.",
"الفرع الذي تم اصدار الاجازة منه.",
"ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."
]
},
"info-approvals": {
"en":
"This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:",
"ar":
"خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:"
},
"info-approval-points": {
"en": [
"View the total unused approvals.",
"Track the approvals status.",
],
"ar": [
"الاطلاع على اجمالي الموافقات الغير مستخدمة.",
"تتبع حالة الموافقة.",
]
},
"month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"},
"info-month-report": {
"en":
"Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.",
"ar":
"خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
},
"language-setting": {
"en": "SMS and Confirmation Calls Language",
"ar": "لغة الرسائل القصيرة و الاتصال الآلي"
},
"alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {
"en": "Alert By Email",
"ar": "استلام التنبيهات بالبريد الالكتروني"
},
"sms-alert": {
"en": "Alert By SMS",
"ar": "استلام التنبيهات بالرسائل القصيرة"
},
"contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"},
"emrg-name": {
"en": "Emergency Contact Name",
"ar": "اسم للتواصل في حالة الطوارئ"
},
"emrg-no": {
"en": "Emergency Contact Number",
"ar": "رقم للتواصل في حالة الطوارئ"
},
"modes": {"en": "Modes", "ar": "الاوضاع"},
"vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"},
"blind-modes": {
"en": "Modes for Partially Blind",
"ar": "تأثيرات لدعم ضعاف البصر"
},
"invert-theme": {"en": "Invert", "ar": "ألوان سلبية"},
"off-theme": {"en": "Off", "ar": "إيقاف"},
"dim-theme": {"en": "Dim", "ar": "ضوء خافت"},
"bw-theme": {"en": "Black and White", "ar": "أبيض و أسود"},
"permissions": {"en": "Permission", "ar": "الصلاحيات"},
"camera-permission": {"en": "Camera", "ar": "الكاميرا"},
"location-permission": {"en": "Location", "ar": "تحديد المواقع"},
"accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"},
"orderStatus": {"en": "Order Status", "ar": "حالة الطلب"},
"CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"},
"FindUs": {"en": "Find Us", "ar": "اين تجدنا"},
"Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"},
"LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"},
"Service": {"en": "Service", "ar": "خدمة"},
"HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'},
"HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '},
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"},
"DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"Period": {"en": "Period", "ar": "الفترة"},
"cm": {
"en": "CM",
"ar": "سم"
},
"kg": {
"en": "kg",
"ar": "كجم"
},
"mass": {
"en": "Mass",
"ar": "كتلة"
},
"temp-c": {
"en": "°C",
"ar": "°س"
},
"bpm": {
"en": "bpm",
"ar": "نبضة"
},
"respiration-signs": {
"en": "Respiration",
"ar": "تنفس"
},
"sys-dias": {
"en": "SBP/DBP",
"ar": "إنقباض/إنبساط"
},
"body": {
"en": "Body \n Mass",
"ar": "كتلة\nالجسم"
},
"feedback": {
"en": "Feedback",
"ar": "رأيك يهمنا"
},
"send": {
"en": "Send",
"ar": "أرسل"
},
"status": {
"en": "Status",
"ar": "الحالة"
},
"like-to-hear": {
"en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة"
},
"subject": {
"en": "Subject",
"ar": "الموضوع"
},
"message": {
"en": "Message",
"ar": "رسالة"
},
"empty-subject": {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"empty-message": {
"en": "Please enter message",
"ar": "يرجى ادخال الموضوع"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر المرفق"
},
"complain-appo": {
"en": "Complaint for appointment",
"ar": "شكوى على موعد"
},
"complain-without-appo": {
"en": "Complaint without appointment",
"ar": "شكوى بدون موعد"
},
"question": {
"en": "Question",
"ar": "سؤال"
},
"message-type": {
"en": "Message Type",
"ar": "نوع الرسالة"
},
"compliment": {
"en": "compliment",
"ar": "ثناء"
},
"suggestion": {
"en": "Suggestion",
"ar": "إقتراح"
},
"your-feedback": {
"en": "Your feedback was sent",
"ar": "إقتراح"
},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
},
"number": {
"en": "Number",
"ar": "الرقم"
},
"not-classified": {
"en": "Not classified",
"ar": "غير محدد"
},
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
};

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

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

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

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

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

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

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

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

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

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

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

@ -2,12 +2,16 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
import '../../../locator.dart';
import '../../../routes.dart';
import '../AuthenticatedUserObject.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -16,6 +20,9 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onSuccess: (dynamic response, int statusCode) {},
/// onFailure: (String error, int statusCode) {},
/// body: Map();
///
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
class BaseAppClient {
post(String endPoint,
@ -28,7 +35,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@ -39,7 +46,16 @@ class BaseAppClient {
}
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'ar'
? 1
: 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
@ -63,15 +79,18 @@ class BaseAppClient {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null
? body['PatientType']
: PATIENT_TYPE
: user['PatientType'] != null
? user['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: PATIENT_TYPE_ID
: user['PatientTypeID'] != null
? user['PatientTypeID']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
body['PatientID'] =
@ -114,11 +133,14 @@ class BaseAppClient {
onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout();
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
} else {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
@ -172,7 +194,9 @@ class BaseAppClient {
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE);
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}
String getSessionId(String id) {

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

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

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

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

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

@ -2,10 +2,13 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
@ -21,6 +24,8 @@ class MyBalanceService extends BaseService {
String logInTokenID;
String verificationCode;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
getPatientAdvanceBalanceAmount() async {
hasError = false;
super.error = "";
@ -61,8 +66,8 @@ class MyBalanceService extends BaseService {
super.error = "";
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['MobileNo'] = user.mobileNumber;
body['ProjectID'] = user.projectID;
body['MobileNo'] = authenticatedUserObject.user.mobileNumber;
body['ProjectID'] = authenticatedUserObject.user.projectID;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
onSuccess: (response, statusCode) async {
@ -143,7 +148,7 @@ class MyBalanceService extends BaseService {
await sharedPref.getObject(FAMILY_FILE));
return getAllSharedRecordsByStatusResponse;
} else {
return getSharedRecordByStatus();
return await getSharedRecordByStatus();
}
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -30,16 +30,13 @@ class DQIcons {
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData more_menu_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData offer_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData prescription_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_scan_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData share_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_add_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wishlist_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_2 = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_3 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData bg_4 = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medication_icon = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

@ -43,6 +43,7 @@ import 'core/service/medical/radiology_service.dart';
import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/vital_sign_service.dart';
import 'core/service/parmacyModule/order-preview-service.dart';
import 'core/service/notifications_service.dart';
import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'core/service/parmacyModule/parmacy_module_service.dart';
@ -77,6 +78,7 @@ import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/medical/weight_pressure_view_model.dart';
import 'core/viewModels/notifications_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart';
import 'core/service/insurance_service.dart';
@ -115,8 +117,6 @@ void setupLocator() {
locator.registerLazySingleton(() => EReferralService());
locator.registerLazySingleton(() => HomeHealthCareService());
locator.registerLazySingleton(() => CMCService());
locator.registerLazySingleton(() => PatientSickLeaveService());
locator.registerLazySingleton(() => MyBalanceService());
locator.registerLazySingleton(() => BloodSugarService());
@ -129,7 +129,6 @@ void setupLocator() {
locator.registerLazySingleton(() => FindusService());
locator.registerLazySingleton(() => LiveChatService());
locator.registerLazySingleton(() => H2OService());
locator.registerLazySingleton(() => BloodDonationService());
locator.registerLazySingleton(() => BloodDetailsService());
locator.registerLazySingleton(() => ChildVaccinesService());
@ -138,6 +137,7 @@ void setupLocator() {
locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService());
locator.registerLazySingleton(() => NotificationService());
locator.registerLazySingleton(() => PharmacyModuleService());
@ -173,9 +173,6 @@ void setupLocator() {
locator.registerFactory(() => ChildVaccinesViewModel());
locator.registerFactory(() => UserInformationViewModel());
locator.registerFactory(() => VaccinationTableViewModel());
locator.registerFactory(() => AddNewChildViewModel());
locator.registerFactory(() => H2OViewModel());
locator.registerFactory(() => BloodSugarViewMode());
@ -188,6 +185,7 @@ void setupLocator() {
locator.registerFactory(() => AllergiesViewModel());
locator.registerFactory(() => HomeHealthCareViewModel());
locator.registerFactory(() => CMCViewModel());
locator.registerFactory(() => NotificationViewModel());

@ -1,24 +1,29 @@
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'config/size_config.dart';
import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
void main() async {
setupLocator();
runApp(MyApp());
runApp(ChangeNotifierProvider<ThemeNotifier>(
create: (context) => ThemeNotifier(defaultTheme), child: MyApp() ));
}
class MyApp extends StatelessWidget {
/// static final _myTabbedPageKey = new GlobalKey<_LandingPageState>();
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
return OrientationBuilder(
@ -29,6 +34,8 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider<ProjectViewModel>(
create: (context) => ProjectViewModel(),
),
ChangeNotifierProvider<ToDoCountProviderModel>(
create: (context) => ToDoCountProviderModel()),
ChangeNotifierProvider<SearchProvider>(
create: (context) => SearchProvider()),
ChangeNotifierProvider.value(
@ -48,13 +55,14 @@ class MyApp extends StatelessWidget {
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
theme: ThemeData(
fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans',
fontFamily: projectProvider.isArabic? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
@ -67,28 +75,28 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: HexColor('#E9E9E9'), // Colors.grey[100],
scaffoldBackgroundColor: Color(0xffEEEEEE),
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
backgroundColor: Colors.white,
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: HexColor('#E0E0E0')),
primaryColor: Color(0xff40ACC9),
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
cursorColor: Colors.grey,
cardColor: Colors.white,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey[700],
brightness: Brightness.light,
elevation: 0.0,
color: Color(0xff40ACC9),
brightness: Brightness.dark,
elevation: 10.0,
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
color: Color(0xff40ACC9),
),
),
),
initialRoute: HOME,
initialRoute: SPLASH,
routes: routes,
debugShowCheckedModeBanner: false,
),

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

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

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

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

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

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

@ -10,9 +10,10 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.da
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -29,6 +31,11 @@ import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class AllHabibMedicalService extends StatefulWidget {
//TODO
final Function goToMyProfile;
AllHabibMedicalService({Key key, this.goToMyProfile});
@override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();
}
@ -60,61 +67,63 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
shrinkWrap: true,
children: [
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
height: 190,
height: 150,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage('assets/images/timeline_bg.png'),
fit: BoxFit.cover,
),
),
image: DecorationImage(
image: ExactAssetImage('assets/images/Weather_img.png'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(8.0)),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Health Weather Indicators',
style: TextStyle(
child: Row(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
color: Colors.white,
fontSize: 22.0,
fontWeight: FontWeight.w600,
),
),
SizedBox(
height: 35.0,
),
Text(
'Health Tips Based On Current Weather',
style: TextStyle(
Texts(
TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
color: Colors.white,
fontSize: 14,
),
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Image.asset('assets/images/Weather_ico.png',width: 80,height: 80,),
Texts(
TranslationBase.of(context).moreDetails,
color: Colors.white,
decoration: TextDecoration.underline,
),
],
),
]),
)
],
),
),
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: MedicalProfilePage(),
),
),
onTap: () {
Navigator.pop(context);
widget.goToMyProfile();
},
imageLocation:
'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: LiveCareHome(),
),
),
imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
title: TranslationBase.of(context).livecare,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -139,15 +148,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
),
ServicesContainer(
onTap: () {
Navigator.push(
@ -162,37 +163,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -204,15 +175,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -224,61 +187,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -314,7 +223,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
page: FindUsPage(),
),
),
imageLocation: 'assets/images/new-design/find_us_icon.png',

@ -269,7 +269,7 @@ class ConfirmPaymentPage extends StatelessWidget {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service
.createAdvancePayment(appo, res['Amount'], res['Fort_id'],
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context)
.then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -24,7 +24,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container(
height: 510.0,
height: 550.0,
width: 450.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

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

Loading…
Cancel
Save