Compare commits

..

4 Commits

@ -1,11 +1,3 @@
# Translation prompt & Command
Read the context for both files & generate translations strings in the en-US.json & ar-SA.json files for the strings containing "needTranslation". Also replace the strings in the dart with the generated Strings. Also do not remove existing properties & do no generate duplicate strings in the json files
flutter3_32 pub run easy_localization:generate -O ./lib/generated -f keys -o locale_keys.g.dart --source-dir ./assets/langs
# HMG Patient App # HMG Patient App
A comprehensive Flutter-based mobile application for HMG (Habib Medical Group) patients, A comprehensive Flutter-based mobile application for HMG (Habib Medical Group) patients,

@ -160,7 +160,6 @@ dependencies {
annotationProcessor("com.github.bumptech.glide:compiler:4.16.0") annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
implementation("com.mapbox.maps:android:11.5.0") implementation("com.mapbox.maps:android:11.5.0")
implementation("com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1")
// implementation("com.mapbox.maps:android:11.4.0") // implementation("com.mapbox.maps:android:11.4.0")
// AARs // AARs

@ -21,7 +21,7 @@ class PenguinNavigator() {
val postToken = PostToken(clientID, clientKey) val postToken = PostToken(clientID, clientKey)
getToken(mContext, postToken, object : RefIdDelegate { getToken(mContext, postToken, object : RefIdDelegate {
override fun onRefByIDSuccess(PoiId: String?) { override fun onRefByIDSuccess(PoiId: String?) {
Log.e("navigateTo", "PoiId is+++++++ $refID") Log.e("navigateTo", "PoiId is+++++++ $PoiId")
PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate { PlugAndPlaySDK.navigateTo(mContext, refID, object : RefIdDelegate {
override fun onRefByIDSuccess(PoiId: String?) { override fun onRefByIDSuccess(PoiId: String?) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

@ -1,3 +0,0 @@
<svg width="15" height="23" viewBox="0 0 15 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.32806 22.32C7.33606 22.32 6.34406 22.2 5.35206 21.96C4.37606 21.736 3.48006 21.36 2.66406 20.832C1.86406 20.304 1.21606 19.616 0.720063 18.768C0.240063 17.92 6.25104e-05 16.88 6.25104e-05 15.648C6.25104e-05 14.4 0.248063 13.248 0.744063 12.192C1.25606 11.12 1.96806 10.168 2.88006 9.336C3.80806 8.488 4.90406 7.784 6.16806 7.224C7.43206 6.664 8.81606 6.264 10.3201 6.024L10.9921 8.688C9.68006 8.928 8.51206 9.256 7.48806 9.672C6.48006 10.088 5.62406 10.584 4.92006 11.16C4.23206 11.736 3.71206 12.368 3.36006 13.056C3.00806 13.76 2.83206 14.512 2.83206 15.312C2.83206 15.952 2.94406 16.504 3.16806 16.968C3.40806 17.448 3.72006 17.848 4.10406 18.168C4.48806 18.488 4.92006 18.744 5.40006 18.936C5.88006 19.128 6.37606 19.264 6.88806 19.344C7.40006 19.44 7.88006 19.488 8.32806 19.488C9.33606 19.488 10.3041 19.392 11.2321 19.2C12.1601 19.024 12.9841 18.784 13.7041 18.48L14.5201 21.024C14.1361 21.216 13.6081 21.408 12.9361 21.6C12.2641 21.808 11.5281 21.976 10.7281 22.104C9.92806 22.248 9.12806 22.32 8.32806 22.32ZM3.86406 9.24C3.27206 9.048 2.72806 8.744 2.23206 8.328C1.75206 7.912 1.36806 7.4 1.08006 6.792C0.792063 6.184 0.648063 5.512 0.648063 4.776C0.648063 3.768 0.904063 2.912 1.41606 2.208C1.92806 1.488 2.59206 0.943998 3.40806 0.575998C4.24006 0.191998 5.13606 -1.90735e-06 6.09606 -1.90735e-06C6.56006 -1.90735e-06 7.00806 0.0319982 7.44006 0.0959983C7.87206 0.159998 8.30406 0.255998 8.73606 0.383997L8.25606 3.072C7.92006 2.992 7.57606 2.928 7.22406 2.88C6.87206 2.832 6.56006 2.808 6.28806 2.808C5.72806 2.808 5.23206 2.896 4.80006 3.072C4.38406 3.248 4.05606 3.496 3.81606 3.816C3.59206 4.136 3.48006 4.512 3.48006 4.944C3.48006 5.312 3.58406 5.656 3.79206 5.976C4.01606 6.28 4.29606 6.544 4.63206 6.768C4.98406 6.992 5.35206 7.168 5.73606 7.296C6.13606 7.424 6.50406 7.496 6.84006 7.512L3.86406 9.24Z" fill="#2B353E"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

@ -1,4 +0,0 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.98978 14.0362H21.2589C22.0592 14.0362 22.7076 13.3877 22.7076 12.5874C22.7076 11.7871 22.0592 11.1387 21.2589 11.1387H1.98978C1.18949 11.1387 0.541029 11.7871 0.541029 12.5874C0.541029 13.3877 1.18949 14.0362 1.98978 14.0362Z" fill="#2E3039"/>
<path d="M14.6241 20.8879C14.9764 20.8879 15.3299 20.7598 15.6087 20.5013L22.9973 13.6488C23.2952 13.3723 23.4638 12.9835 23.4609 12.5767C23.458 12.1704 23.2847 11.7833 22.9828 11.511L15.3914 4.65838C14.7974 4.12234 13.8812 4.16928 13.3451 4.76327C12.8091 5.35726 12.856 6.27345 13.45 6.80949L19.8663 12.601L13.6384 18.3769C13.0519 18.921 13.0171 19.8378 13.5613 20.4243C13.847 20.732 14.2347 20.8879 14.6241 20.8879Z" fill="#2E3039"/>
</svg>

Before

Width:  |  Height:  |  Size: 803 B

@ -1,5 +0,0 @@
<svg width="24" height="22" viewBox="0 0 24 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7" cy="7" r="7" fill="#0B85F7" fill-opacity="0.75"/>
<circle cx="17" cy="7" r="7" fill="#18C273" fill-opacity="0.75"/>
<circle cx="12" cy="15" r="7" fill="#ED1C2B" fill-opacity="0.75"/>
</svg>

Before

Width:  |  Height:  |  Size: 301 B

@ -1,3 +0,0 @@
<svg width="12" height="21" viewBox="0 0 12 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.72994 2.25V9.24H10.3499V11.49H2.72994V18.69H11.2499V20.94H-5.83827e-05V2.02656e-06H11.2499V2.25H2.72994Z" fill="#2B353E"/>
</svg>

Before

Width:  |  Height:  |  Size: 242 B

@ -1,4 +0,0 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.0102 14.0362H2.74111C1.94082 14.0362 1.29236 13.3877 1.29236 12.5874C1.29236 11.7871 1.94082 11.1387 2.74111 11.1387H22.0102C22.8105 11.1387 23.459 11.7871 23.459 12.5874C23.459 13.3877 22.8105 14.0362 22.0102 14.0362Z" fill="#2E3039"/>
<path d="M9.3759 20.8879C9.02357 20.8879 8.67007 20.7598 8.39133 20.5013L1.0027 13.6488C0.704836 13.3723 0.536202 12.9835 0.539099 12.5767C0.541997 12.1704 0.715267 11.7833 1.01719 11.511L8.60864 4.65838C9.20263 4.12234 10.1188 4.16928 10.6549 4.76327C11.1909 5.35726 11.144 6.27345 10.55 6.80949L4.13374 12.601L10.3616 18.3769C10.9481 18.921 10.9829 19.8378 10.4387 20.4243C10.153 20.732 9.76533 20.8879 9.3759 20.8879Z" fill="#2E3039"/>
</svg>

Before

Width:  |  Height:  |  Size: 800 B

@ -408,7 +408,7 @@
"brand": "العلامة التجارية", "brand": "العلامة التجارية",
"power": "القوة", "power": "القوة",
"diameter": "القطر", "diameter": "القطر",
"remarks": "ملاحظات: ", "remarks": "ملاحظات",
"activeMedications": "الأدوية النشطة", "activeMedications": "الأدوية النشطة",
"expDate": "تاريخ انتهاء الصلاحية النشط:", "expDate": "تاريخ انتهاء الصلاحية النشط:",
"route": "الطريق", "route": "الطريق",
@ -525,7 +525,7 @@
"payOnline": "الدفع عبر الإنترنت", "payOnline": "الدفع عبر الإنترنت",
"cancelOrder": "إلغاء الطلب", "cancelOrder": "إلغاء الطلب",
"confirmAddress": "تأكيد العنوان ", "confirmAddress": "تأكيد العنوان ",
"confirmLocation": "أكيد الموقع ", "confirmLocation": "<EFBFBD><EFBFBD>أكيد الموقع ",
"conditionsHMG": "الشروط والأحكام ", "conditionsHMG": "الشروط والأحكام ",
"conditions": "الشروط والأحكام لكوم", "conditions": "الشروط والأحكام لكوم",
"confirmDeleteMsg": "هل أنت متأكد! تريد الحذف ", "confirmDeleteMsg": "هل أنت متأكد! تريد الحذف ",
@ -694,7 +694,11 @@
"bikini": "بيكيني", "bikini": "بيكيني",
"totalMinutes": "إجمالي الدقائق", "totalMinutes": "إجمالي الدقائق",
"feedback": "ملاحظات", "feedback": "ملاحظات",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "نود سماع ملاحظاتك، ومخاوفك بشأن خدمات الرعاية الصحية وتجربة الخدمات الإلكترونية. يرجى استخدام النموذج أدناه", "likeToHear": "نود سماع ملاحظاتك، ومخاوفك بشأن خدمات الرعاية الصحية وتجربة الخدمات الإلكترونية. يرجى استخدام النموذج أدناه",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "يرجى إدخال الموضوع", "emptySubject": "يرجى إدخال الموضوع",
"emptyMessage": "يرجى إدخال الرسالة", "emptyMessage": "يرجى إدخال الرسالة",
"selectAttachment": "اختر المرفق", "selectAttachment": "اختر المرفق",
@ -873,658 +877,5 @@
"walkin": "زيارة بدون موعد", "walkin": "زيارة بدون موعد",
"laserClinic": "عيادة الليزر", "laserClinic": "عيادة الليزر",
"continueString": "يكمل", "continueString": "يكمل",
"covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية", "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية"
}
"appointmentDetails": "تفاصيل الموعد",
"checkingDoctorAvailability": "جاري التحقق من توفر الطبيب...",
"cancellingAppointmentPleaseWait": "جاري إلغاء الموعد، يرجى الانتظار...",
"appointmentCancelledSuccessfully": "تم إلغاء الموعد بنجاح",
"notConfirmed": "غير مؤكد",
"appointmentStatus": "حالة الموعد",
"doctorWillCallYou": "سيتصل بك الطبيب عندما يقترب موعدك.",
"getDirections": "الحصول على الاتجاهات",
"notifyMeBeforeAppointment": "أبلغني قبل الموعد",
"fetchingLabResults": "جاري جلب نتائج المختبر...",
"fetchingRadiologyResults": "جاري جلب نتائج الأشعة...",
"fetchingAppointmentPrescriptions": "جاري جلب وصفات الموعد...",
"noPrescriptionsForAppointment": "ليس لديك أي وصفات طبية لهذا الموعد.",
"amountBeforeTax": "المبلغ قبل الضريبة",
"rebookAppointment": "إعادة حجز الموعد",
"fetchingDoctorSchedulePleaseWait": "جاري جلب جدول الطبيب، يرجى الانتظار...",
"pickADate": "اختر تاريخاً",
"confirmingAppointmentPleaseWait": "جاري تأكيد الموعد، يرجى الانتظار...",
"appointmentConfirmedSuccessfully": "تم تأكيد الموعد بنجاح",
"appointmentPayment": "دفع الموعد",
"checkingPaymentStatusPleaseWait": "جاري التحقق من حالة الدفع، يرجى الانتظار...",
"paymentFailedPleaseTryAgain": "فشل الدفع! يرجى المحاولة مرة أخرى.",
"appointmentCheckIn": "تسجيل حضور الموعد",
"insuranceExpiredOrInactive": "التأمين منتهي الصلاحية أو غير نشط",
"totalAmountToPay": "المبلغ الإجمالي المستحق",
"vat15": "ضريبة القيمة المضافة 15%",
"general": "عام",
"liveCare": "لايف كير",
"recentVisits": "الزيارات الأخيرة",
"searchByClinic": "البحث حسب العيادة",
"tapToSelectClinic": "انقر لاختيار العيادة",
"searchByDoctor": "البحث حسب الطبيب",
"tapToSelect": "انقر للاختيار",
"searchByRegion": "البحث حسب المنطقة",
"centralRegion": "المنطقة الوسطى",
"immediateConsultation": "استشارة فورية",
"scheduledConsultation": "استشارة مجدولة",
"pharmaLiveCare": "لايف كير الصيدلية",
"notSureHelpMeChooseClinic": "غير متأكد؟ ساعدني في اختيار عيادة!",
"mentionYourSymptomsAndFindDoctors": "اذكر أعراضك واعثر على قائمة الأطباء وفقاً لذلك",
"immediateService": "خدمة فورية",
"noNeedToWaitGetMedicalConsultation": "لا حاجة للانتظار، ستحصل على استشارة طبية فورية عبر مكالمة فيديو",
"noVisitRequired": "لا حاجة للزيارة",
"doctorWillContact": "سيتصل بك الطبيب",
"specialisedDoctorWillContactYou": "سيتصل بك طبيب متخصص وسيكون قادراً على الاطلاع على تاريخك الطبي",
"freeMedicineDelivery": "توصيل مجاني للأدوية",
"offersFreeMedicineDelivery": "يوفر توصيل مجاني للأدوية لموعد لايف كير",
"dentalChiefComplaints": "الشكاوى الرئيسة للأسنان",
"viewAvailableAppointments": "عرض المواعيد المتاحة",
"doctorProfile": "الملف للطبيب",
"waitingAppointment": "موعد الانتظار",
"hospitalInformation": "معلومات المستشفى",
"fetchingAppointmentShare": "جاري جلب تفاصيل الموعد...",
"bookingYourAppointment": "جاري حجز موعدك...",
"selectLiveCareClinic": "اختر عيادة لايف كير",
"checkingForExistingDentalPlan": "جاري التحقق من وجود خطة أسنان حالية، يرجى الانتظار...",
"dentalTreatmentPlan": "خطة علاج الأسنان",
"youHaveExistingTreatmentPlan": "لديك خطة علاج حالية: ",
"mins": "دقيقة",
"totalTimeRequired": "إجمالي الوقت المطلوب",
"wouldYouLikeToContinue": "هل تريد متابعتها؟",
"chooseDoctor": "اختر الطبيب",
"viewNearestAppos": "عرض أقرب المواعيد المتاحة",
"noDoctorFound": "لم يتم العثور على طبيب مطابق للمعايير المحددة...",
"yesPleasImInAHurry": "نعم من فضلك، أنا في عجلة من أمري",
"fetchingFeesPleaseWait": "جاري جلب الرسوم، يرجى الانتظار...",
"noThanksPhysicalVisit": "لا، شكراً. أفضل الزيارة الشخصية",
"offline": "غير متصل",
"videoCall": "مكالمة فيديو",
"liveVideoCallWithHMGDoctors": "مكالمة فيديو مباشرة مع أطباء مجموعة الحبيب الطبية",
"audioCall": "مكالمة صوتية",
"phoneCall": "مكالمة هاتفية",
"livePhoneCallWithHMGDoctors": "مكالمة هاتفية مباشرة مع أطباء مجموعة الحبيب الطبية",
"reviewLiveCareRequest": "مراجعة طلب لايف كير",
"selectedLiveCareType": "نوع لايف كير المحدد",
"selectLiveCareCallType": "اختر نوع مكالمة لايف كير",
"confirmingLiveCareRequest": "جاري تأكيد طلب لايف كير، يرجى الانتظار...",
"unknownErrorOccurred": "حدث خطأ غير معروف...",
"liveCarePermissionsMessage": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع والإشعارات لتمكين الاستشارة الافتراضية بين المريض والطبيب، يرجى السماح بهذه الأذونات للمتابعة.",
"liveCarePayment": "دفع لايف كير",
"mada": "مدى",
"visaOrMastercard": "فيزا أو ماستركارد",
"tamara": "تمارا",
"fetchingApplePayDetails": "جاري جلب تفاصيل Apple Pay، يرجى الانتظار...",
"liveCarePendingRequest": "لايف كير حية معلق",
"callLiveCareSupport": "اتصل بدعم لايف كير",
"whatIsWaitingAppointment": "ما هو موعد الانتظار؟",
"waitingAppointmentsFeature": "تتيح لك ميزة مواعيد الانتظار حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حال عدم توفر فتحة متاحة في جدول الطبيب.",
"appointmentWithDoctorConfirmed": "الموعد مع الطبيب مؤكد، ولكن وقت الدخول غير محدد.",
"paymentWithinTenMinutes": "ملاحظة: يجب عليك الدفع خلال 10 دقائق من الحجز، وإلا سيتم إلغاء موعدك تلقائياً",
"liveLocation": "الموقع المباشر",
"verifyYourLocationAtHospital": "تحقق من موقعك في المستشفى لتسجيل الحضور",
"error": "خطأ",
"ensureWithinHospitalLocation": "يرجى التأكد من أنك داخل موقع المستشفى لإجراء تسجيل الحضور عبر الإنترنت.",
"nfcNearFieldCommunication": "NFC (الاتصال قريب المدى)",
"scanPhoneViaNFC": "امسح هاتفك عبر لوحة NFC لتسجيل الحضور",
"qrCode": "رمز QR",
"scanQRCodeToCheckIn": "امسح رمز QR بالكاميرا لتسجيل الحضور",
"processingCheckIn": "جاري معالجة تسجيل الحضور...",
"bookingWaitingAppointment": "جاري حجز موعد الانتظار، يرجى الانتظار...",
"enterValidIDorIqama": "يرجى إدخال رقم هوية وطنية أو رقم ملف صالح",
"selectAppointment": "حدد الموعد",
"rebookSameDoctor": "أعد الحجز مع نفس الطبيب",
"queueing": "قائمة الانتظار",
"inQueue": "في قائمة الانتظار",
"yourTurn": "دورك",
"halaFirstName": "هلا {firstName}!!!",
"thankYouForPatience": "شكراً لصبرك، هذا هو رقم قائمة الانتظار الخاص بك.",
"servingNow": "يُخدم الآن",
"callForVitalSigns": "نداء للعلامات الحيوية",
"callForDoctor": "نداء للطبيب",
"thingsToAskDoctor": "أشياء تسأل طبيبك عنها اليوم",
"improveOverallHealth": "ماذا يمكنني أن أفعل لتحسين صحتي العامة؟",
"routineScreenings": "هل هناك أي فحوصات روتينية يجب أن أجريها؟",
"whatIsThisMedicationFor": "لماذا هذا الدواء؟",
"sideEffectsToKnow": "هل هناك أي آثار جانبية يجب أن أعرفها؟",
"whenFollowUp": "متى يجب أن أعود للمتابعة؟",
"goToHomepage": "الذهاب إلى الصفحة الرئيسية",
"appointmentsList": "قائمة المواعيد",
"allAppt": "جميع المواعيد",
"upcoming": "القادمة",
"completed": "المكتملة",
"noAppointmentsYet": "ليس لديك أي مواعيد بعد.",
"viewProfile": "عرض الملف الشخصي",
"choosePreferredHospitalForService": "اختر المستشفى المفضل لديك للخدمة",
"noHospitalsFound": "لم يتم العثور على مستشفيات",
"cancelOrderConfirmation": "هل أنت متأكد أنك تريد إلغاء هذا الطلب؟",
"orderCancelledSuccessfully": "تم إلغاء الطلب بنجاح",
"requestID": "معرف الطلب:",
"noCMCOrdersYet": "ليس لديك أي طلبات فحص شامل بعد.",
"cmcOrders": "طلبات الفحص الشامل",
"summary": "الملخص",
"selectedService": "الخدمة المحددة",
"requestSubmittedSuccessfully": "تم إرسال طلبك بنجاح.",
"hereIsYourRequestNumber": "هذا هو رقم طلبك #: ",
"pleaseSelectHospitalToContinue": "يرجى اختيار مستشفى للمتابعة",
"confirmSubmitRequest": "هل أنت متأكد أنك تريد إرسال هذا الطلب؟",
"pendingOrderWait": "لديك طلب معلق. يرجى الانتظار حتى تتم معالجته.",
"noServicesAvailable": "لا توجد خدمات متاحة",
"selectAService": "اختر خدمة",
"comprehensiveCheckup": "الفحص الشامل",
"viewNearestHMGLocations": "عرض أقرب مواقع مجموعة الحبيب الطبية",
"provideFeedbackOnServices": "قدم ملاحظاتك على خدماتنا",
"liveChatWithHMG": "خيار الدردشة المباشرة مع مجموعة الحبيب الطبية",
"send": "إرسال",
"status": "الحالة",
"sendingFeedback": "جاري إرسال الملاحظات...",
"selectFeedbackType": "اختر نوع الملاحظات",
"loadingAppointmentsList": "جاري تحميل قائمة المواعيد...",
"noAppointmentsForFeedback": "ليس لديك أي مواعيد لتقديم ملاحظات عنها.",
"selectedAppointment": "الموعد المحدد:",
"subject": "الموضوع",
"enterSubjectHere": "أدخل الموضوع هنا",
"message": "الرسالة",
"enterMessageHere": "أدخل الرسالة هنا",
"filesSelected": "تم تحديد {count} ملف(ات)",
"otherDetails": "تفاصيل أخرى",
"medicalReport": "التقرير الطبي",
"medicalReportNumber": "التقرير الطبي {number}",
"patientIsInsured": "المريض مؤمن عليه",
"insuranceDocument": "وثيقة التأمين",
"selectBranch": "اختر الفرع",
"patientInformation": "معلومات المريض",
"patientLocation": "أين يتواجد المريض",
"identificationNumber": "رقم الهوية",
"enterIdentificationNumber": "أدخل رقم الهوية*",
"patientName": "اسم المريض*",
"referralRequesterInformation": "معلومات مقدم طلب الإحالة",
"enterReferralRequesterName": "أدخل اسم مقدم طلب الإحالة*",
"requesterName": "اسم مقدم الطلب",
"relationship": "العلاقة",
"selectRelation": "اختر العلاقة",
"otherName": "اسم آخر",
"otherNameHint": "اسم آخر*",
"requesterNameRequired": "اسم مقدم طلب الإحالة مطلوب",
"selectRelationshipRequired": "يرجى اختيار العلاقة",
"otherRelationshipNameRequired": "اسم العلاقة الأخرى مطلوب",
"identificationNumberRequired": "رقم الهوية مطلوب",
"patientNameRequired": "اسم المريض مطلوب",
"enterPatientPhoneRequired": "يرجى إدخال رقم هاتف المريض",
"selectPatientCityRequired": "يرجى اختيار مدينة المريض",
"medicalReportRequired": "مطلوب تقرير طبي واحد على الأقل",
"selectBranchRequired": "يرجى اختيار الفرع",
"insuranceDocumentRequired": "وثيقة التأمين مطلوبة للمرضى المؤمن عليهم",
"searchResult": "نتيجة البحث",
"referralNo": "رقم الإحالة {number}",
"eReferral": "الإحالة الإلكترونية",
"referralCreatedSuccessfully": "تم إنشاء إحالتك بنجاح.",
"hereIsYourReferralNumber": "هذا هو رقم الإحالة الخاص بك #: ",
"searchEReferral": "البحث عن إحالة إلكترونية",
"enterRequiredInfoToSearch": "يرجى إدخال المعلومات المطلوبة للبحث عن إحالة إلكترونية",
"selectPickupDirection": "اختر اتجاه الاستلام",
"selectDirection": "اختر الاتجاه",
"toHospital": "إلى المستشفى",
"fromHospital": "من المستشفى",
"selectWay": "اختر الطريقة",
"oneWay": "اتجاه واحد",
"twoWay": "اتجاهين",
"selectPickupDetails": "اختر تفاصيل الاستلام",
"pleaseSelectDetailsOfPickup": " يرجى تحديد تفاصيل الاستلام",
"selectDetails": "اختر التفاصيل",
"work": "العمل",
"pick": "استلام",
"insideTheHome": "داخل المنزل",
"haveAnyAppointment": "هل لديك أي موعد",
"amountPaidAtHospital": "سيتم دفع المبلغ في المستشفى",
"submitRequest": "إرسال الطلب",
"enterPickupLocationManually": "أدخل موقع الاستلام يدوياً",
"enterPickupLocation": "أدخل موقع الاستلام",
"trackingDetails": "تفاصيل التتبع",
"cancelRequest": "إلغاء الطلب",
"shareLocationWhatsapp": "مشاركة موقعك المباشر على واتساب",
"pleaseWaitForCall": "يرجى انتظار المكالمة",
"toHospitalLower": "إلى المستشفى",
"contact": "اتصال",
"failed": "فشل",
"confirmationCall": "مكالمة التأكيد",
"pickupFromHome": "الاستلام من المنزل",
"onTheWayToHospital": " في الطريق إلى المستشفى",
"arrivedAtHospital": "وصل إلى المستشفى",
"orderCancel": "إلغاء الطلب",
"emergencyCheckIn": "تسجيل الطوارئ الإلكتروني",
"erOnlineCheckInDescription": "تتيح هذه الخدمة للمرضى تسجيل موعد الطوارئ قبل الوصول.",
"erOnlineCheckInSuccess": "تم تسجيل وصول الطوارئ بنجاح. الرجاء التوجه إلى منطقة الانتظار.",
"erOnlineCheckInError": "حدث خطأ غير متوقع أثناء عملية التسجيل. يرجى التواصل مع الدعم.",
"fetchingHospitalsList": "جاري جلب قائمة المستشفيات...",
"fetchingPaymentInformation": "جاري جلب معلومات الدفع...",
"erVisitDetails": "تفاصيل زيارة الطوارئ",
"erClinic": "عيادة الطوارئ",
"vatWithAmount": "الضريبة 15% ({amount})",
"erAppointmentBookedSuccess": "تم حجز موعدك بنجاح. يرجى إتمام إجراءات تسجيل الوصول عند وصولك إلى المستشفى.",
"underProcessing": "قيد المعالجة",
"canceledByPatient": "ملغى بواسطة المريض",
"rapidResponseTeam": "فريق الاستجابة السريع",
"allFacilities": "جميع المرافق",
"selectLocation": "اختر الموقع",
"pleaseSelectTheLocation": "يرجى اختيار الموقع",
"viewLocationGoogleMaps": "عرض الموقع على خرائط جوجل",
"callAmbulance": "استدعاء سيارة إسعاف",
"requestAmbulanceInEmergency": "طلب سيارة إسعاف في حالة الطوارئ من المنزل أو المستشفى",
"confirmation": "تأكيد",
"areYouSureYouWantToCallAmbulance": "هل أنت متأكد أنك تريد استدعاء سيارة إسعاف؟",
"getDetailsOfNearestBranch": "احصل على تفاصيل أقرب فرع بما في ذلك الاتجاهات",
"areYouSureYouWantToCallRRT": "هل أنت متأكد أنك تريد استدعاء فريق الاستجابة السريعة (RRT)؟",
"priorERCheckInToSkipLine": "تسجيل الوصول المسبق في الطوارئ لتجاوز الطابور والدفع في الاستقبال.",
"areYouSureYouWantToMakeERCheckIn": "هل أنت متأكد أنك تريد إجراء تسجيل وصول الطوارئ؟",
"checkingYourERAppointmentStatus": "جاري التحقق من حالة موعد الطوارئ الخاص بك...",
"transportOptions": "خيارات النقل",
"selectHospitalForAdvancePayment": "يرجى اختيار المستشفى الذي ترغب في دفع مبلغ مقدم له.",
"recharge": "إعادة الشحن",
"activityLevel": "مستوى النشاط",
"selectActivityLevel": "حدد مستوى النشاط",
"caloriesPerDay": "السعرات الحرارية في اليوم الواحد",
"dietType": "نوع النظام الغذائي",
"selectDietType": "حدد نوع النظام الغذائي",
"bodyFrameSize": "حجم إطار الجسم",
"selectBodyFrameSize": "حدد حجم إطار الجسم",
"averageCycleLength": "متوسط طول الدورة الشهرية (عادةً 28 يومًا)",
"averageLutealPhase": "متوسط طول المرحلة الأصفرية (عادةً 14 يومًا)",
"convert": "يتحول",
"calculate": "احسب",
"healthCalculators": "حاسبات الصحة",
"healthConverters": "محولات الصحة",
"generalHealth": "الصحة العامة",
"relatedToBMICalories": "متعلق بمؤشر كتلة الجسم والسعرات الحرارية ودهون الجسم وما إلى ذلك للبقاء على اطلاع دائم بصحتك.",
"selectCalculator": "اختر الآلة الحاسبة",
"womensHealth": "صحة المرأة",
"relatedToPeriodsOvulation": "متعلق بالدورة الشهرية والإباضة والحمل ومواضيع أخرى.",
"bloodSugar": "سكر الدم",
"trackYourGlucoseLevels": "تتبع مستويات الجلوكوز لديك، وفهم الاتجاهات، واحصل على رؤى مخصصة لصحة أفضل.",
"bloodCholesterol": "كوليسترول الدم",
"monitorCholesterolLevels": "راقب مستويات الكوليسترول، وقيّم مخاطر صحة القلب، واتخذ خطوات استباقية للرفاهية.",
"triglyceridesFatBlood": "الدهون الثلاثية في الدم",
"understandTriglyceridesImpact": "افهم تأثير الدهون الثلاثية على صحة القلب مع رؤى مخصصة وتوصيات الخبراء.",
"bmiCalculator": "حاسبة\nمؤشر كتلة الجسم",
"caloriesCalculator": "حاسبة\nالسعرات الحرارية",
"bmrCalculator": "حاسبة\nمعدل الأيض الأساسي",
"idealBodyWeight": "الوزن المثالي\nللجسم",
"bodyFatCalculator": "حاسبة\nدهون الجسم",
"carbsProteinFat": "الكربوهيدرات\nالبروتين والدهون",
"ovulationPeriod": "فترة\nالإباضة",
"deliveryDueDate": "تاريخ الولادة\nالمتوقع",
"low": "منخفض",
"preDiabetic": "ما قبل السكري",
"high": "مرتفع",
"elevated": "مرتفع قليلاً",
"recorded": "مسجل",
"noRecordsYet": "لا توجد سجلات بعد",
"lastRecord": "آخر سجل",
"addBloodSugar": "إضافة سكر الدم",
"addBloodPressure": "إضافة ضغط الدم",
"addWeight": "إضافة الوزن",
"bloodSugarDataSavedSuccessfully": "تم حفظ بيانات سكر الدم بنجاح",
"bloodPressureDataSavedSuccessfully": "تم حفظ بيانات ضغط الدم بنجاح",
"weightDataSavedSuccessfully": "تم حفظ بيانات الوزن بنجاح",
"pleaseWait": "يرجى الانتظار",
"selectUnit": "اختر الوحدة",
"selectMeasureTime": "اختر وقت القياس",
"selectArm": "اختر الذراع",
"enterBloodSugar": "أدخل سكر الدم",
"enterSystolicValue": "أدخل القيمة الانقباضية",
"enterDiastolicValue": "أدخل القيمة الانبساطية",
"enterWeight": "أدخل الوزن",
"selectDuration": "اختر المدة",
"systolic": "الانقباضي",
"diastolic": "الانبساطي",
"sendReportByEmail": "إرسال التقرير عبر البريد الإلكتروني",
"enterYourEmailToReceiveReport": "أدخل عنوان بريدك الإلكتروني لاستلام التقرير",
"addNewRecord": "إضافة سجل جديد",
"healthTrackers": "متتبعات الصحة",
"monitorBloodPressureLevels": "راقب مستويات ضغط الدم لديك، وتتبع القراءات الانقباضية والانبساطية، وحافظ على صحة قلبك.",
"trackWeightProgress": "تتبع تقدم وزنك، وضع الأهداف، وحافظ على كتلة جسم صحية من أجل العافية الشاملة.",
"bookAppointment": "حجز\nموعد",
"completeCheckup": "الفحص الشامل",
"indoorNavigation": "الملاحة الداخلية",
"eReferralServices": "خدمات الإحالة الإلكترونية",
"bloodDonation": "التبرع بالدم",
"dailyWaterMonitor": "مراقب الماء اليومي",
"fetchingYourWaterIntakeDetails": "جاري جلب تفاصيل استهلاك الماء الخاص بك.",
"healthCalculatorsServices": "حاسبات\nالصحة",
"healthConvertersServices": "محولات\nالصحة",
"smartWatchesServices": "الساعات\nالذكية",
"exploreServices": "استكشف الخدمات",
"medicalAndCareServices": "الخدمات الطبية والرعاية",
"hmgServices": "خدمات مجموعة الحبيب الطبية",
"personalServices": "الخدمات الشخصية",
"habibWallet": "محفظة الحبيب",
"loginToViewWalletBalance": "سجل الدخول لعرض رصيد محفظتك",
"recharge": "إعادة الشحن",
"loginToViewMedicalFile": "سجل الدخول لعرض ملفك الطبي",
"addMember": "إضافة عضو",
"addFamilyMember": "إضافة فرد من العائلة",
"pleaseFillBelowFieldToAddNewFamilyMember": "يرجى ملء الحقل أدناه لإضافة فرد جديد من العائلة إلى ملفك الشخصي",
"healthTools": "أدوات الصحة",
"supportServices": "خدمات الدعم",
"virtualTour": "جولة افتراضية",
"carParking": "موقف السيارات",
"latestNews": "آخر الأخبار",
"hmgContact": "اتصل بمجموعة الحبيب الطبية",
"durationCannotExceed90": "لا يجوز أن تتجاوز المدة 90 دقيقة",
"unexpectedError": "حدث خطأ غير متوقع",
"gettingAmbulanceTransportOption": "جاري الحصول على خيارات نقل الإسعاف",
"fetchingAppointment": "جاري جلب الموعد",
"doYouWantToCancelTheRequest": "هل تريد إلغاء الطلب",
"cancellingRequest": "جاري إلغاء الطلب",
"fetchingTermsAndConditions": "جاري جلب الشروط والأحكام",
"selectLocationPrescriptionDelivery": "يرجى تحديد موقع توصيل الوصفة الطبية",
"noRadiologyOrders": "لم يتم العثور على أي طلبات تصوير شعاعي",
"ageIsRequired": "العمر مطلوب",
"invalidAge": "العمر غير صالح",
"ageMustBeBetween11And120": "يجب أن يكون العمر بين 11 و 120",
"heightIsRequired": "الطول مطلوب",
"invalidHeight": "الطول غير صالح",
"weightIsRequired": "الوزن مطلوب",
"invalidWeight": "الوزن غير صالح",
"timeToDrinkWater": "حان وقت شرب الماء! 💧",
"stayHydratedDrinkWater": "ابق رطبًا! اشرب {amount} مل من الماء.",
"visitPharmacyOnline": "زيارة الصيدلة على الانترنت",
"howAreYouFeelingToday": "كيف حالك اليوم؟",
"checkYourSymptomsWithScale": "تحقق من أعراضك باستخدام ذا المقياس",
"checkYourSymptoms": "تحقق من أعراضك",
"noUpcomingAppointmentPleaseBook": "ليس لديك أي مواعيد قادمة. يرجى حجز موعد",
"youHaveEROnlineCheckInRequest": "لديك طلب تسجيل وصول عبر الإنترنت للطوارئ",
"quickLinks": "روابط سريعة",
"viewMedicalFileLandingPage": "عرض الملف الطبي",
"immediateLiveCareRequest": "طلب LiveCare الفوري",
"yourTurnIsAfterPatients": "دورك بعد {count} مريض.",
"dontHaveHHCOrders": "ليس لديك أي أوامر رعاية صحية منزلية حتى الآن.",
"hhcOrders": "أوامر الرعاية الصحية المنزلية",
"requestedServices": "الخدمات المطلوبة",
"selectServices": "اختر الخدمات",
"selectedServices": "الخدمات المختارة",
"createNewRequest": "إنشاء طلب جديد",
"youHaveNoPendingRequests": "ليس لديك أي طلبات معلقة.",
"noInsuranceDataFound": "لم يتم العثور على بيانات التأمين...",
"noInsuranceUpdateRequest": "لم يتم العثور على أي طلبات لتحديث بيانات التأمين.",
"policyNumberInsurancePage": "الوثيقة: {number}",
"insuranceExpired": "التأمين منتهي الصلاحية",
"insuranceActive": "التأمين نشط",
"patientCardID": "رقم بطاقة المريض: {id}",
"noInsuranceApprovals": "لم تحصل على أي موافقات تأمينية حتى الآن.",
"noInsuranceWithHMG": "ليس لديك تأمين مسجل لدى مجموعة حبيب الطبية.",
"referenceRange": "النطاق المرجعي",
"downloadReport": "تنزيل التقرير",
"generatingReport": "جارٍ إنشاء التقرير، يرجى الانتظار...",
"noLabResults": "ليس لديك أي نتائج مختبرية حتى الآن.",
"labResultDetails": "تفاصيل نتائج المختبر",
"resultOf": "نتيجة",
"whatIsThisResult": "ما هي هذه النتيجة؟",
"lastTested": "آخر اختبار",
"byVisit": "حسب الزيارة",
"byTest": "حسب التحليل",
"results": "نتائج",
"viewResults": "عرض النتائج",
"rebook": "إعادة الحجز",
"noOphthalmologyAppointments": "لم يتم العثور على أي مواعيد في قسم طب العيون...",
"noVitalSignsRecordedYet": "لا توجد علامات حيوية مسجلة بعد",
"appointmentsAndVisits": "المواعيد والزيارات",
"labAndRadiology": "المختبر والأشعة",
"activeMedicationsAndPrescriptions": "الأدوية النشطة والوصفات الطبية",
"allPrescriptions": "جميع الوصفات",
"allMedications": "جميع الأدوية",
"youDontHaveAnyPrescriptionsYet": "ليس لديك أي وصفات طبية بعد.",
"youDontHaveAnyCompletedVisitsYet": "ليس لديك أي زيارات مكتملة بعد",
"others": "أخرى",
"allergyInfo": "معلومات الحساسية",
"vaccineInfo": "معلومات اللقاحات",
"updateInsuranceInfo": "تحديث التأمين",
"myInvoicesList": "قائمة فواتيري",
"ancillaryOrdersList": "قائمة الطلبات المساعدة",
"youDontHaveAnySickLeavesYet": "ليس لديك أي إجازات مرضية بعد.",
"medicalReports": "التقارير الطبية",
"sickLeaveReport": "تقرير الإجازة المرضية",
"weightTracker": "متتبع الوزن",
"askYourDoctor": "اسأل طبيبك",
"internetPairing": "الاقتران بالإنترنت",
"requested": "مطلوب",
"youDontHaveAnyMedicalReportsYet": "ليس لديك أي تقارير طبية بعد.",
"requestMedicalReport": "طلب تقرير طبي",
"youDoNotHaveAnyAppointmentsToRequestMedicalReport": "ليس لديك أي مواعيد لطلب تقرير طبي.",
"areYouSureYouWantToRequestMedicalReport": "هل أنت متأكد أنك تريد طلب تقرير طبي لهذا الموعد؟",
"yourMedicalReportRequestSubmittedSuccessfully": "تم إرسال طلب التقرير الطبي بنجاح.",
"monthlyHealthSummaryReportDisclaimer": "يعكس تقرير الملخص الصحي الشهري هذا المؤشرات الصحية ونتائج التحليل لأحدث الزيارات. يرجى ملاحظة أن هذا سيتم إرساله تلقائيًا من النظام ولا يعتبر تقريرًا رسميًا لذا لا ينبغي اتخاذ أي قرار طبي بناءً عليه",
"updatingMonthlyReportStatus": "جاري تحديث حالة التقرير الشهري...",
"monthlyReportStatusUpdatedSuccessfully": "تم تحديث حالة التقرير الشهري بنجاح",
"whoCanViewMyMedicalFile": "من يمكنه عرض ملفي الطبي؟",
"acceptedYourRequestToBeYourFamilyMember": "{status} طلبك لتكون فردًا من عائلتك",
"canViewYourFile": "يمكنه عرض ملفك",
"hasARequestPendingToBeYourFamilyMember": "لديه طلب {status} ليكون فردًا من عائلتك",
"wantsToAddYouAsTheirFamilyMember": "يريد إضافتك كفرد من عائلته",
"rejectedYourRequestToBeYourFamilyMember": "{status} طلبك لتكون فردًا من عائلتك",
"rejectedYourFamilyMemberRequest": "{status} طلب فرد عائلتك",
"notAvailable": "غير متاح",
"selectAProfile": "الرجاء تحديد ملف تعريف",
"switchFamilyFile": "قم بالتبديل من قائمة الملفات الطبية أدناه",
"medicalFiles": "الملفات الطبية",
"addANewFamilyMember": "إضافة فرد جديد من العائلة",
"viewInvoiceDetails": "عرض تفاصيل الفاتورة",
"outPatient": "مريض خارجي",
"invoiceDetails": "تفاصيل الفاتورة",
"sendingEmailPleaseWait": "جاري إرسال ال<D8A7><D984>ريد الإلكتروني، يرجى الانتظار...",
"emailSentSuccessfullyMessage": "تم إرسال البريد الإلكتروني بنجاح.",
"discount": "خصم",
"paid": "مدفوع",
"fetchingInvoiceDetails": "جارٍ جلب تفاصيل الفاتورة، يرجى الانتظار...",
"scanQRCode": "مسح رمز الاستجابة السريعة",
"parkingSlotDetails": "تفاصيل موقف السيارة",
"slotNumber": "رقم الموقف: {code}",
"basement": "الطابق: {description}",
"parkingDate": "التاريخ: {date}",
"parkedSince": "متوقف منذ: {time}",
"resetDirection": "إعادة تعيين الاتجاه",
"noPrescriptionOrdersYet": "ليس لديك أي طلبات وصفات طبية حتى الآن.",
"fetchingPrescriptionPDFPleaseWait": "جاري جلب ملف الوصفة الطبية، يرجى الانتظار...",
"ratingValue": "التقييم: {rating}",
"downloadPrescription": "تحميل الوصفة الطبية",
"fetchingPrescriptionDetails": "جاري جلب تفاصيل الوصفة الطبية...",
"switchBackFamilyFile": "العودة إلى ملف العائلة",
"profileAndSettings": "الملف الشخصي والإعدادات",
"quickActions": "إجراءات سريعة",
"notificationsSettings": "إعدادات الإشعارات",
"touchIDFaceIDServices": "خدمات Touch ID / Face ID",
"personalInformation": "المعلومات الشخصية",
"updateEmailAddress": "تحديث عنوان البريد الإلكتروني",
"helpAndSupport": "المساعدة والدعم",
"permissionsProfile": "الأذونات",
"privacyPolicy": "سياسة الخصوصية",
"deactivateAccount": "إلغاء تنشيط الحساب",
"ageYearsOld": "{age} {yearsOld}",
"youDontHaveRadiologyOrders": "ليس لديك أي نتائج للأشعة حتى الآن.",
"radiologyResult": "نتيجة الأشعة",
"viewRadiologyImage": "عرض صورة الأشعة",
"rateClinic": "تقييم العيادة",
"back": "رجوع",
"rateDoctor": "تقييم الطبيب",
"howWasYourLastVisitWithDoctor": "كيف كانت زيارتك الأخيرة مع الطبيب؟",
"dateOfBirthSymptoms": "ما هو تاريخ ميلادك؟",
"genderSymptoms": "ما هو جنسك؟",
"heightSymptoms": "كم طولك؟",
"weightSymptoms": "ما هو وزنك؟",
"femaleGender": "أنثى",
"previous": "سابق",
"selectedOrgans": "الهيئات المختارة",
"noOrgansSelected": "لم يتم تحديد أي أعضاء بعد",
"organSelector": "محدد الأعضاء",
"noPredictionsAvailable": "لا توجد تنبؤات متاحة",
"areYouSureYouWantToRestartOrganSelection": "هل أنت متأكد أنك تريد إعادة تشغيل اختيار الأعضاء؟",
"possibleConditions": "الحالات المحتملة",
"pleaseSelectAtLeastOneRiskBeforeProceeding": "يرجى اختيار عامل خطر واحد على الأقل قبل المتابعة",
"aboveYouSeeCommonRiskFactors": "أعلاه ترى عوامل الخطر الأكثر شيوعًا. على الرغم من أن /diagnosis قد تعيد أسئلة حول عوامل الخطر، ",
"readMore": "اقرأ المزيد",
"riskFactors": "عوامل الخطر",
"noRiskFactorsFound": "لم يتم العثور على عوامل خطر",
"basedOnYourSelectedSymptomsNoRiskFactors": "بناءً على الأعراض المحددة، لم يتم تحديد عوامل خطر إضافية.",
"messageNotification": "الرسالة",
"attachedImage": "الصورة المرفقة",
"failedToLoadImage": "فشل تحميل الصورة",
"typeNotification": "النوع",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "يرجى اختيار خيار واحد على الأقل قبل المتابعة",
"suggestions": "الاقتراحات",
"pleaseGoBackAndSelectOrgansFirst": "يرجى العودة واختيار الأعضاء أولاً",
"symptomsSelector": "محدد الأعراض",
"possibleSymptomsRelatedTo": "الأعراض المحتملة المتعلقة بـ",
"suggestionAIListDescription": "هذه قائمة بالأعراض المقترحة من قبل الذكاء الاصطناعي، بناءً على المعلومات التي تم جمعها حتى الآن خلال المقابلة",
"analyzing": "جاري التحليل...",
"seekMedicalAdvice": "اطلب المشورة الطبية",
"monitorDescription": "لا حاجة لطلب المشورة الطبية. فقط حافظ على روتين صحي.",
"seekMedicalAdviceDescription": "ليست حالة طوارئ ولكن من الأفضل مراقبة الأعراض.",
"emergencyDescription": "تحتاج إلى استشارة الطبيب في أقرب وقت ممكن قبل فوات الأوان.",
"colorScience": "دلالات الألوان",
"noNeedToVisitDoctor": "لا حاجة لزي<D8B2><D98A>رة الطبيب",
"commonSymptom": "الأعراض الشائعة",
"bookAppointment": "احجز موعد",
"notApplicable": "لا ينطبق",
"emergencyTriage": "طوارئ",
"emergencyEvidenceDetected": "تم اكتشاف دليل طوارئ. يرجى طلب العناية الطبية.",
"noQuestionItemsAvailable": "لا توجد عناصر أسئلة متاحة",
"pleaseAnswerAllQuestionsBeforeProceeding": "يرجى الإجابة على جميع الأسئلة قبل المتابعة",
"triage": "الفرز",
"areYouSureYouWantToExitProgress": "هل أنت متأكد أنك تريد الخروج؟ سيتم فقدان تقدمك.",
"noQuestionAvailable": "لا يوجد سؤال متاح",
"possibleSymptom": "عرض محتمل: ",
"symptomsCheckerFindingScore": "- درجة نتائج فاحص الأعراض",
"notSet": "غير محدد",
"years": "سنوات",
"symptomsChecker": "فاحص الأعراض",
"helloIsYourInformationUpToDate": "مرحباً {name}، هل معلوماتك محدثة؟",
"noEditAll": "لا، تعديل الكل",
"yesItIs": "نعم، إنها كذلك",
"age": "العمر",
"youDontHaveAnyAncillaryOrdersYet": "ليس لديك أي طلبات مساعدة بعد.",
"invoiceWithNumber": "الفاتورة: {invoiceNo}",
"queued": "في قائمة الانتظار",
"checkInReady": "جاهز للتسجيل",
"checkIn": "تسجيل الوصول",
"viewDetails": "عرض التفاصيل",
"selectPaymentMethod": "اختر طريقة الدفع",
"processingPaymentPleaseWait": "جاري معالجة الدفع، يرجى الانتظار...",
"finalizingPaymentPleaseWait": "جاري إتمام الدفع، يرجى الانتظار...",
"generatingInvoicePleaseWait": "جاري إنشاء الفاتورة، يرجى الانتظار...",
"hereIsYourInvoiceNumber": "هذا هو رقم فاتورتك #: ",
"paymentCompletedSuccessfully": "تم الدفع بنجاح",
"failedToInitializeApplePay": "فشل في تهيئة Apple Pay. يرجى المحاولة مرة أخرى.",
"cash": "نقدي",
"approved": "موافق عليه",
"approvalRejectedPleaseVisitReceptionist": "تم رفض الموافقة - يرجى زيارة موظف الاستقبال",
"sentForApproval": "تم إرساله للموافقة",
"ancillaryOrderDetails": "تفاصيل الطلب المساعد",
"noProceduresAvailableForSelectedOrder": "لا توجد إجراءات متاحة للطلب المحدد.",
"procedures": "الإجراءات",
"totalAmount": "المبلغ الإجمالي",
"covered": "مغطى",
"vatPercent": "ضريبة القيمة المضافة (15%)",
"proceedToPayment": "المتابعة للدفع",
"supportedSmartWatches": "الساعات الذكية المدعومة",
"pleaseMakeSureSamsungWatchConnected": "يرجى التأكد من أن ساعة Samsung الخاصة بك متصلة بهاتفك، ومتزامنة ومحدثة بشكل نشط.",
"beforeSyncingDataFollowInstructions": "قبل مزامنة البيانات، يرجى التأكد من اتباع التعليمات بشكل صحيح.",
"viewWatchInstructions": "عرض تعليمات الساعة",
"healthConnectAppNotInstalled": "يبدو أنه ليس لديك تطبيق Health Connect مثبتًا. يرجى تثبيته من متجر Play لمزامنة بيانات صحتك.",
"setTimerOfReminder": "ضبط مؤقت التذكير",
"youHaveAppointmentWithDr": "لديك موعد مع د. ",
"hours": "ساعات",
"secs": "ثواني",
"noAllergiesDataFound": "لم يتم العثور على بيانات الحساسية...",
"heartRateDescription": "معدل ضربات قلبك يشير إلى عدد المرات التي ينبض فيها قلبك في الدقيقة",
"bloodOxygenDescription": "مستوى الأكسجين في الدم يشير إلى كمية الأكسجين التي تحملها خلايا الدم الحمراء",
"stepsDescription": "عدد الخطوات المتخذة على مدار اليوم",
"caloriesDescription": "السعرات الحرارية المحروقة أثناء النشاط البدني",
"distanceDescription": "المسافة المقطوعة على مدار اليوم",
"overview": "نظرة عامة",
"details": "التفاصيل",
"healthy": "صحي",
"warning": "تحذير",
"vitalSignDetails": "تفاصيل العلامات الحيوية",
"resultOf": "نتيجة {date}",
"resultOfNoDate": "نتيجة --",
"referenceRangeBetween": "النطاق المرجعي: {low} {high} {unit}",
"referenceRangeMin": "النطاق المرجعي: ≥ {low} {unit}",
"referenceRangeMax": "النطاق المرجعي: ≤ {high} {unit}",
"noHistoryAvailable": "لا يوجد تاريخ متاح",
"bmiDescription": "مؤشر كتلة الجسم هو قياس يعتمد على الطول والوزن لتقدير دهون الجسم.",
"heightDescription": "يقاس الطول بالسنتيمتر ويستخدم لحساب مؤشر كتلة الجسم وتوصيات الجرعات.",
"weightDescription": "الوزن يساعد في تتبع الصحة العامة والتغذية والتغيرات مع مرور الوقت.",
"bloodPressureDescription": "ضغط الدم يعكس قوة الدم على جدران الشرايين. يظهر كانقباضي/انبساطي.",
"temperatureDescription": "درجة حرارة الجسم تعكس مدى سخونة جسمك وقد تتغير مع العدوى أو الالتهاب.",
"heartRateDescriptionVital": "معدل ضربات القلب يشير إلى عدد نبضات القلب في الدقيقة.",
"respiratoryRateDescription": "معدل التنفس هو عدد الأنفاس المأخوذة في الدقيقة.",
"bmiAdvice": "حافظ على نظام غذائي متوازن ونشاط منتظم. إذا كان مؤشر كتلة جسمك مرتفعًا أو منخفضًا، فكر في استشارة طبيبك.",
"heightAdvice": "لا حاجة لاتخاذ أي إجراء إلا إذا بدا قياسك غير صحيح. قم بتحديثه في زيارتك القادمة.",
"weightAdvice": "راقب تغيرات الوزن. الزيادة أو الخسارة المفاجئة قد تتطلب استشارة طبية.",
"bloodPressureAdvice": "استمر في تتبع ضغط دمك. يجب مناقشة القراءات المرتفعة أو المنخفضة مع طبيبك.",
"temperatureAdvice": "إذا كان لديك حمى مستمرة أو أعراض، اتصل بمقدم الرعاية الصحية.",
"heartRateAdvice": "تتبع اتجاهات معدل ضربات قلبك. إذا شعرت بدوار أو ألم في الصدر، اطلب الرعاية الطبية.",
"respiratoryRateAdvice": "إذا لاحظت ضيقًا في التنفس أو تنفسًا غير طبيعي، اطلب المشورة الطبية.",
"whatShouldIDoNext": "ماذا يجب أن أفعل بعد ذلك؟",
"customizeDrinkCup": "قم بتخصيص كوب مشروبك",
"tipsToStayHydrated": "نصائح للبقاء رطبًا",
"drinkBeforeYouFeelThirsty": "اشرب قبل أن تشعر بالعطش",
"keepRefillableBottleNextToYou": "احتفظ بزجاجة قابلة لإعادة التعبئة بجانبك",
"trackYourDailyIntakeToStayMotivated": "تتبع كمية الماء اليومية للحفاظ على الحافز",
"chooseSparklingWaterInsteadOfSoda": "اختر الماء الفوار بدلاً من الصودا",
"switchCup": "تبديل الكوب",
"plainWater": "ماء عادي",
"yourGoal": "هدفك",
"remaining": "المتبقي",
"hydrationStatus": "حالة الترطيب",
"areYouSureYouWantToCancelAllWaterReminders": "هل أنت متأكد أنك تريد إلغاء جميع تذكيرات الماء؟",
"remindersSet": "تم ضبط التذكيرات!",
"dailyWaterRemindersScheduledAt": "تم جدولة تذكيرات الماء اليومية في:",
"waterConsumption": "استهلاك المياه",
"selectNumberOfReminders": "حدد عدد التذكيرات",
"h2oSettings": "إعدادات H20",
"settingsSavedSuccessfully": "تم حفظ الإعدادات بنجاح",
"yourName": "اسمك",
"ageYears": "العمر (11-120) سنة",
"numberOfRemindersInADay": "عدد التذكيرات في اليوم",
"medications": "الأدوية",
"someRemarksAboutPrescription": "ستجدون هنا بعض الملاحظات حول الوصفة الطبية",
"notifyMeBeforeConsumptionTime": "أبلغني قبل وقت الاستهلاك",
"noMedicationsToday": "لا أدوية اليوم",
"route": "Route: {route}",
"frequency": "Frequency: {frequency}",
"instruction": "Instruction: {instruction}",
"duration": "Duration: {days}",
"reminders": "تذكيرات",
"reminderAddedToCalendar": "تمت إضافة تذكير إلى التقويم ✅",
"errorWhileSettingCalendar": "حدث خطأ أثناء ضبط التقويم:{error}",
"instructions": "التعليمات",
"requests": "الطلبات",
"thisWeek": "هذا الأسبوع",
"lastMonth": "الشهر الماضي",
"lastSixMonths": "آخر 6 أشهر",
"selectTime": "حدد الوقت",
"pleaseWaitYouWillBeCalledForVitalSigns": "يرجى الانتظار! سيتم استدعاؤك لقياس العلامات الحيوية",
"pleaseVisitRoomForVitalSigns": "يرجى زيارة الغرفة {roomNumber} لقياس العلامات الحيوية",
"pleaseVisitRoomToTheDoctor": "يرجى زيارة الغرفة {roomNumber} لمقابلة الطبيب",
"erOnlineCheckInRequest": "طلب تسجيل الوصول عبر الإنترنت لقسم الطوارئ",
"indoor": "داخلي",
"navigation": "الملاحة",
"health": "الصحة",
"calculators": "الحاسبات",
"converters": "المحولات",
"guide": "الدليل",
"liveCareServiceDesc": "احصل على استشارة طبية من طبيب متخصص عبر مكالمة فيديو",
"bloodGroup": "فصيلة الدم: {bloodType}",
"medicalServices": "الخدمات الطبية",
"insuranceAndPayments": "التأمين والمدفوعات",
"trackerAndOthers": "المتتبع وأخرى",
"bmi": "مؤشر كتلة الجسم"
}

@ -406,8 +406,11 @@
"brand": "Brand", "brand": "Brand",
"power": "Power", "power": "Power",
"diameter": "Diameter", "diameter": "Diameter",
"remarks": "Remarks",
"activeMedications": "Active Medications", "activeMedications": "Active Medications",
"expDate": "Active Exp Date :", "expDate": "Active Exp Date :",
"route": "Route",
"frequency": "Frequency",
"dailyQuantity": "Daily Quantity :", "dailyQuantity": "Daily Quantity :",
"addReminder": "Add Reminder", "addReminder": "Add Reminder",
"cancelReminder": "Cancel Reminder", "cancelReminder": "Cancel Reminder",
@ -686,7 +689,11 @@
"bikini": "Bikini", "bikini": "Bikini",
"totalMinutes": "Total Minutes", "totalMinutes": "Total Minutes",
"feedback": "Feedback", "feedback": "Feedback",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", "likeToHear": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "Please enter the subject", "emptySubject": "Please enter the subject",
"emptyMessage": "Please enter message", "emptyMessage": "Please enter message",
"selectAttachment": "Select Attachment", "selectAttachment": "Select Attachment",
@ -857,7 +864,7 @@
"endDate": "End Date", "endDate": "End Date",
"hmgHospitals": "HMG Hospitals", "hmgHospitals": "HMG Hospitals",
"hmcMedicalClinic": "HMC Medical Centers", "hmcMedicalClinic": "HMC Medical Centers",
"applyFilter": "Apply Filter", "applyFilter": "AppLy Filter",
"facilityAndLocation": "Facility and Location", "facilityAndLocation": "Facility and Location",
"regionAndLocation": "Region And Locations", "regionAndLocation": "Region And Locations",
"clearAllFilters": "Clear all filters", "clearAllFilters": "Clear all filters",
@ -866,656 +873,5 @@
"walkin": "Walk In", "walkin": "Walk In",
"continueString": "Continue", "continueString": "Continue",
"laserClinic": "Laser Clinic", "laserClinic": "Laser Clinic",
"covid_info" :"Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", "covid_info" :"Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention."
"appointmentDetails": "Appointment Details", }
"checkingDoctorAvailability": "Checking doctor availability...",
"cancellingAppointmentPleaseWait": "Cancelling Appointment, Please Wait...",
"appointmentCancelledSuccessfully": "Appointment Cancelled Successfully",
"notConfirmed": "Not Confirmed",
"appointmentStatus": "Appointment Status",
"doctorWillCallYou": "The doctor will call you once the appointment time approaches.",
"getDirections": "Get Directions",
"notifyMeBeforeAppointment": "Notify me before the appointment",
"fetchingLabResults": "Fetching Lab Results...",
"fetchingRadiologyResults": "Fetching Radiology Results...",
"fetchingAppointmentPrescriptions": "Fetching Appointment Prescriptions...",
"noPrescriptionsForAppointment": "You don't have any prescriptions for this appointment.",
"amountBeforeTax": "Amount before tax",
"rebookAppointment": "Re-book Appointment",
"fetchingDoctorSchedulePleaseWait": "Fetching Doctor Schedule, Please Wait...",
"pickADate": "Pick a Date",
"confirmingAppointmentPleaseWait": "Confirming Appointment, Please Wait...",
"appointmentConfirmedSuccessfully": "Appointment Confirmed Successfully",
"appointmentPayment": "Appointment Payment",
"checkingPaymentStatusPleaseWait": "Checking payment status, Please wait...",
"paymentFailedPleaseTryAgain": "Payment Failed! Please try again.",
"appointmentCheckIn": "Appointment check in",
"insuranceExpiredOrInactive": "Insurance expired or inactive",
"totalAmountToPay": "Total amount to pay",
"vat15": "VAT 15%",
"general": "General",
"liveCare": "LiveCare",
"recentVisits": "Recent Visits",
"searchByClinic": "Search By Clinic",
"tapToSelectClinic": "Tap to select clinic",
"searchByDoctor": "Search By Doctor",
"tapToSelect": "Tap to select",
"searchByRegion": "Search By Region",
"centralRegion": "Central Region",
"immediateConsultation": "Immediate Consultation",
"scheduledConsultation": "Scheduled Consultation",
"pharmaLiveCare": "Pharma LiveCare",
"notSureHelpMeChooseClinic": "Not sure? help me choose a clinic!",
"mentionYourSymptomsAndFindDoctors": "Mention your symptoms and find the list of doctors accordingly",
"immediateService": "Immediate service",
"noNeedToWaitGetMedicalConsultation": "No need to wait, you will get medical consultation immediately via video call",
"noVisitRequired": "No visit required",
"doctorWillContact": "Doctor will contact",
"specialisedDoctorWillContactYou": "A specialised doctor will contact you and will be able to view your medical history",
"freeMedicineDelivery": "Free medicine delivery",
"offersFreeMedicineDelivery": "Offers free medicine delivery for the LiveCare appointment",
"dentalChiefComplaints": "Dental Chief Complaints",
"viewAvailableAppointments": "View available appointments",
"doctorProfile": "Doctor Profile",
"waitingAppointment": "Waiting Appointment",
"hospitalInformation": "Hospital Information",
"fetchingAppointmentShare": "Fetching Appointment Share...",
"bookingYourAppointment": "Booking your appointment...",
"selectLiveCareClinic": "Select LiveCare Clinic",
"checkingForExistingDentalPlan": "Checking for an existing dental plan, Please wait...",
"dentalTreatmentPlan": "Dental treatment plan",
"youHaveExistingTreatmentPlan": "You have an existing treatment plan: ",
"mins": "Mins",
"totalTimeRequired": "Total time required",
"wouldYouLikeToContinue": "Would you like to continue it?",
"chooseDoctor": "Choose Doctor",
"viewNearestAppos": "View nearest available appointments",
"noDoctorFound": "No Doctor found for selected criteria...",
"yesPleasImInAHurry": "Yes please, I am in a hurry",
"fetchingFeesPleaseWait": "Fetching fees, Please wait...",
"noThanksPhysicalVisit": "No, Thanks. I would like a physical visit",
"offline": "Offline",
"videoCall": "Video Call",
"liveVideoCallWithHMGDoctors": "Live Video Call with HMG Doctors",
"audioCall": "Audio Call",
"phoneCall": "Phone Call",
"livePhoneCallWithHMGDoctors": "Live Phone Call with HMG Doctors",
"reviewLiveCareRequest": "Review LiveCare Request",
"selectedLiveCareType": "Selected LiveCare Type",
"selectLiveCareCallType": "Select LiveCare call type",
"confirmingLiveCareRequest": "Confirming LiveCare request, Please wait...",
"unknownErrorOccurred": "Unknown error occurred...",
"liveCarePermissionsMessage": "LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.",
"liveCarePayment": "LiveCare Payment",
"mada": "Mada",
"visaOrMastercard": "Visa or Mastercard",
"tamara": "Tamara",
"fetchingApplePayDetails": "Fetching Apple Pay details, Please wait...",
"liveCarePendingRequest": "LiveCare Pending Request",
"callLiveCareSupport": "Call LiveCare Support",
"whatIsWaitingAppointment": "What is Waiting Appointment?",
"waitingAppointmentsFeature": "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctor's schedule.",
"appointmentWithDoctorConfirmed": "The appointment with the doctor is confirmed, but the time of entry is uncertain.",
"paymentWithinTenMinutes": "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically",
"liveLocation": "Live Location",
"verifyYourLocationAtHospital": "Verify your location to be at hospital to check in",
"error": "Error",
"ensureWithinHospitalLocation": "Please ensure you're within the hospital location to perform online check-in.",
"nfcNearFieldCommunication": "NFC (Near Field Communication)",
"scanPhoneViaNFC": "Scan your phone via NFC board to check in",
"qrCode": "QR Code",
"scanQRCodeToCheckIn": "Scan QR code with your camera to check in",
"processingCheckIn": "Processing Check-In...",
"bookingWaitingAppointment": "Booking Waiting Appointment, Please wait...",
"enterValidIDorIqama": "Please enter a valid national ID or file number",
"selectAppointment": "Select Appointment",
"rebookSameDoctor": "Rebook with same doctor",
"queueing": "Queueing",
"inQueue": "In Queue",
"yourTurn": "Your Turn",
"halaFirstName": "Hala {firstName}!!!",
"thankYouForPatience": "Thank you for your patience, here is your queue number.",
"servingNow": "Serving Now",
"callForVitalSigns": "Call for vital signs",
"callForDoctor": "Call for Doctor",
"thingsToAskDoctor": "Things to ask your doctor today",
"improveOverallHealth": "What can I do to improve my overall health?",
"routineScreenings": "Are there any routine screenings I should get?",
"whatIsThisMedicationFor": "What is this medication for?",
"sideEffectsToKnow": "Are there any side effects I should know about?",
"whenFollowUp": "When should I come back for a follow-up?",
"goToHomepage": "Go to homepage",
"appointmentsList": "Appointments List",
"allAppt": "All Appt.",
"upcoming": "Upcoming",
"completed": "Completed",
"noAppointmentsYet": "You don't have any appointments yet.",
"viewProfile": "View Profile",
"choosePreferredHospitalForService": "Choose your preferred hospital for the service",
"noHospitalsFound": "No hospitals Found",
"cancelOrderConfirmation": "Are you sure you want to cancel this order?",
"orderCancelledSuccessfully": "Order has been cancelled successfully",
"requestID": "Request ID:",
"noCMCOrdersYet": "You don't have any CMC orders yet.",
"cmcOrders": "CMC Orders",
"summary": "Summary",
"selectedService": "Selected Service",
"requestSubmittedSuccessfully": "Your request has been successfully submitted.",
"hereIsYourRequestNumber": "Here is your request #: ",
"pleaseSelectHospitalToContinue": "Please select a hospital to continue",
"confirmSubmitRequest": "Are you sure you want to submit this request?",
"pendingOrderWait": "You have a pending order. Please wait for it to be processed.",
"noServicesAvailable": "No services available",
"selectAService": "Select a Service",
"comprehensiveCheckup": "Comprehensive Checkup",
"viewNearestHMGLocations": "View your nearest HMG locations",
"provideFeedbackOnServices": "Provide your feedback on our services",
"liveChatWithHMG": "Live chat option with HMG",
"send": "Send",
"status": "Status",
"sendingFeedback": "Sending Feedback...",
"selectFeedbackType": "Select Feedback Type",
"loadingAppointmentsList": "Loading appointments list...",
"noAppointmentsForFeedback": "You do not have any appointments to submit a feedback.",
"selectedAppointment": "Selected Appointment:",
"subject": "Subject",
"enterSubjectHere": "Enter subject here",
"message": "Message",
"enterMessageHere": "Enter message here",
"filesSelected": "{count} file(s) selected",
"otherDetails": "Other Details",
"medicalReport": "Medical Report",
"medicalReportNumber": "Medical Report {number}",
"patientIsInsured": "Patient is Insured",
"insuranceDocument": "Insurance Document",
"selectBranch": "Select Branch",
"patientInformation": "Patient information",
"patientLocation": "Where the patient located",
"identificationNumber": "Identification Number",
"enterIdentificationNumber": "Enter Identification Number*",
"patientName": "Patient Name*",
"referralRequesterInformation": "Referral requester information",
"enterReferralRequesterName": "Enter Referral Requester Name*",
"requesterName": "Requester Name",
"relationship": "Relationship",
"selectRelation": "Select Relation",
"otherName": "Other Name",
"otherNameHint": "Other Name*",
"requesterNameRequired": "Referral requester name is required",
"selectRelationshipRequired": "Please select a relationship",
"otherRelationshipNameRequired": "Other relationship name is required",
"identificationNumberRequired": "Identification number is required",
"patientNameRequired": "Patient name is required",
"enterPatientPhoneRequired": "Please Enter patient phone number",
"selectPatientCityRequired": "Please select patient city",
"medicalReportRequired": "At least one medical report is required",
"selectBranchRequired": "Please select a branch",
"insuranceDocumentRequired": "Insurance document is required for insured patients",
"searchResult": "Search Result",
"referralNo": "Referral No {number}",
"eReferral": "E Referral",
"referralCreatedSuccessfully": "Your Referral has been created Successfully.",
"hereIsYourReferralNumber": "Here is your Referral #: ",
"searchEReferral": "Search E-Referral",
"enterRequiredInfoToSearch": "Please enter the required information to search for an e-referral",
"selectPickupDirection": "Select Pickup Direction",
"selectDirection": "Select Direction",
"toHospital": "To Hospital",
"fromHospital": "From Hospital",
"selectWay": "Select Way",
"oneWay": "One Way",
"twoWay": "Two Way",
"selectPickupDetails": "Select Pickup Details",
"pleaseSelectDetailsOfPickup": " Please select the details of pickup",
"selectDetails": "Select Details",
"work": "Work",
"pick": "Pick",
"insideTheHome": "Inside the home",
"haveAnyAppointment": "Have any appointment",
"amountPaidAtHospital": "Amount will be paid at the hospital",
"submitRequest": "Submit Request",
"enterPickupLocationManually": "Enter Pickup Location Manually",
"enterPickupLocation": "Enter Pickup Location",
"trackingDetails": "Tracking Details",
"cancelRequest": "Cancel Request",
"shareLocationWhatsapp": "Share Your Live Location on Whatsapp",
"pleaseWaitForCall": "Please wait for the call",
"toHospitalLower": "to hospital",
"contact": "Contact",
"failed": "Failed",
"confirmationCall": "Confirmation Call",
"pickupFromHome": "Pickup Up from Home",
"onTheWayToHospital": " On The Way To Hospital",
"arrivedAtHospital": "Arrived at Hospital",
"orderCancel": "Order Cancel",
"emergencyCheckIn": "Emergency Check-In",
"erOnlineCheckInDescription": "This service lets patients register their ER appointment prior to arrival.",
"erOnlineCheckInSuccess": "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.",
"erOnlineCheckInError": "Unexpected error occurred during check-in. Please contact support.",
"fetchingHospitalsList": "Fetching hospitals list...",
"fetchingPaymentInformation": "Fetching payment information...",
"erVisitDetails": "ER Visit Details",
"erClinic": "ER Clinic",
"vatWithAmount": "VAT 15% ({amount})",
"erAppointmentBookedSuccess": "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital.",
"underProcessing": "Under processing",
"canceledByPatient": "Cancelled by patient",
"rapidResponseTeam": "Rapid Response Team",
"allFacilities": "All Facilities",
"selectLocation": "Select Location",
"pleaseSelectTheLocation": "Please select the location",
"viewLocationGoogleMaps": "View Location on Google Maps",
"callAmbulance": "Call Ambulance",
"requestAmbulanceInEmergency": "Request an ambulance in emergency from home or hospital",
"confirmation": "Confirmation",
"areYouSureYouWantToCallAmbulance": "Are you sure you want to call an ambulance?",
"getDetailsOfNearestBranch": "Get the details of nearest branch including directions",
"areYouSureYouWantToCallRRT": "Are you sure you want to call Rapid Response Team (RRT)?",
"priorERCheckInToSkipLine": "Prior ER Check-In to skip the line & payment at the reception.",
"areYouSureYouWantToMakeERCheckIn": "Are you sure you want to make ER Check-In?",
"checkingYourERAppointmentStatus": "Checking your ER Appointment status...",
"transportOptions": "Transport Options",
"selectHospitalForAdvancePayment": "Please select the hospital you want to make an advance payment for.",
"recharge": "Recharge",
"activityLevel": "Activity Level",
"selectActivityLevel": "Select Activity Level",
"caloriesPerDay": "Calories Per Day",
"dietType": "Diet Type",
"selectDietType": "Select Diet Type",
"bodyFrameSize": "Body Frame Size",
"selectBodyFrameSize": "Select Body Frame Size",
"averageCycleLength": "Average Cycle Length (Usually 28 days)",
"averageLutealPhase": "Average Luteal Phase Length(Usually 14 days)",
"convert": "Convert",
"calculate": "Calculate",
"healthCalculators": "Health Calculators",
"healthConverters": "Health Converters",
"generalHealth": "General Health",
"relatedToBMICalories": "Related To BMI, calories, body fat, etc to stay updated with your health.",
"selectCalculator": "Select Calculator",
"womensHealth": "Women's Health",
"relatedToPeriodsOvulation": "Related To periods, ovulation, pregnancy, and other topics.",
"bloodSugar": "Blood Sugar",
"trackYourGlucoseLevels": "Track your glucose levels, understand trends, and get personalized insights for better health.",
"bloodCholesterol": "Blood Cholesterol",
"monitorCholesterolLevels": "Monitor cholesterol levels, assess heart health risks, and take proactive steps for well-being.",
"triglyceridesFatBlood": "Triglycerides Fat Blood",
"understandTriglyceridesImpact": "Understand triglycerides' impact on heart health with personalized insights and expert recommendations.",
"bmiCalculator": "BMI\nCalculator",
"caloriesCalculator": "Calories\nCalculator",
"bmrCalculator": "BMR\nCalculator",
"idealBodyWeight": "Ideal Body\nWeight",
"bodyFatCalculator": "Body Fat\nCalculator",
"carbsProteinFat": "Carbs\nProtein & Fat",
"ovulationPeriod": "Ovulation\nPeriod",
"deliveryDueDate": "Delivery\nDue Date",
"low": "Low",
"preDiabetic": "Pre-diabetic",
"high": "High",
"elevated": "Elevated",
"recorded": "Recorded",
"noRecordsYet": "No records yet",
"lastRecord": "Last Record",
"addBloodSugar": "Add Blood Sugar",
"addBloodPressure": "Add Blood Pressure",
"addWeight": "Add Weight",
"bloodSugarDataSavedSuccessfully": "Blood Sugar Data saved successfully",
"bloodPressureDataSavedSuccessfully": "Blood Pressure Data saved successfully",
"weightDataSavedSuccessfully": "Weight Data saved successfully",
"pleaseWait": "Please wait",
"selectUnit": "Select Unit",
"selectMeasureTime": "Select Measure Time",
"selectArm": "Select Arm",
"enterBloodSugar": "Enter Blood Sugar",
"enterSystolicValue": "Enter Systolic Value",
"enterDiastolicValue": "Enter Diastolic Value",
"enterWeight": "Enter Weight",
"selectDuration": "Select Duration",
"systolic": "Systolic",
"diastolic": "Diastolic",
"sendReportByEmail": "Send Report by Email",
"enterYourEmailToReceiveReport": "Enter your email address to receive the report",
"addNewRecord": "Add new Record",
"healthTrackers": "Health Trackers",
"monitorBloodPressureLevels": "Monitor your blood pressure levels, track systolic and diastolic readings, and maintain a healthy heart.",
"trackWeightProgress": "Track your weight progress, set goals, and maintain a healthy body mass for overall wellness.",
"bookAppointment": "Book\nAppointment",
"completeCheckup": "Complete Checkup",
"indoorNavigation": "Indoor Navigation",
"eReferralServices": "E-Referral Services",
"dailyWaterMonitor": "Daily Water Monitor",
"fetchingYourWaterIntakeDetails": "Fetching your water intake details.",
"healthCalculatorsServices": "Health\nCalculators",
"healthConvertersServices": "Health\nConverters",
"smartWatchesServices": "Smart\nWatches",
"exploreServices": "Explore Services",
"medicalAndCareServices": "Medical & Care Services",
"hmgServices": "HMG Services",
"personalServices": "Personal Services",
"habibWallet": "Habib Wallet",
"loginToViewWalletBalance": "Login to view your wallet balance",
"loginToViewMedicalFile": "Login to view your medical file",
"addMember": "Add Member",
"addFamilyMember": "Add Family Member",
"pleaseFillBelowFieldToAddNewFamilyMember": "Please fill the below field to add a new family member to your profile",
"healthTools": "Health Tools",
"supportServices": "Support Services",
"virtualTour": "Virtual Tour",
"carParking": "Car Parking",
"latestNews": "Latest News",
"hmgContact": "HMG Contact",
"durationCannotExceed90": "Duration can not exceed 90 mins",
"unexpectedError": "Unexpected Error Occurred",
"gettingAmbulanceTransportOption": "Getting Ambulance Transport Option",
"fetchingAppointment": "Fetching Appointment",
"doYouWantToCancelTheRequest": "Do you want to cancel the request",
"cancellingRequest": "Cancelling request",
"fetchingTermsAndConditions": "Fetching Terms And Conditions",
"selectLocationPrescriptionDelivery": "Please select the location for prescription delivery",
"noRadiologyOrders": "No Radiology Orders Found",
"ageIsRequired": "Age is required",
"invalidAge": "Invalid age",
"ageMustBeBetween11And120": "Age must be between 11 and 120",
"heightIsRequired": "Height is required",
"invalidHeight": "Invalid height",
"weightIsRequired": "Weight is required",
"invalidWeight": "Invalid weight",
"timeToDrinkWater": "Time to Drink Water! 💧",
"stayHydratedDrinkWater": "Stay hydrated! Drink {amount}ml of water.",
"visitPharmacyOnline": "Visit Pharmacy Online",
"howAreYouFeelingToday": "How are you feeling today?",
"checkYourSymptomsWithScale": "Check your symptoms with this scale",
"checkYourSymptoms": "Check your symptoms",
"noUpcomingAppointmentPleaseBook": "You do not have any upcoming appointment. Please book an appointment",
"youHaveEROnlineCheckInRequest": "You have ER Online Check-In Request",
"quickLinks": "Quick Links",
"viewMedicalFileLandingPage": "View medical file",
"immediateLiveCareRequest": "Immediate LiveCare Request",
"yourTurnIsAfterPatients": "Your turn is after {count} patients.",
"dontHaveHHCOrders": "You don't have any Home Health Care orders yet.",
"hhcOrders": "HHC Orders",
"requestedServices": "Requested Services",
"selectServices": "Select Services",
"selectedServices": "Selected Services",
"createNewRequest": "Create new request",
"youHaveNoPendingRequests": "You have no pending requests.",
"noInsuranceDataFound": "No insurance data found...",
"noInsuranceUpdateRequest": "No insurance update requests found.",
"policyNumberInsurancePage": "Policy: {number}",
"insuranceExpired": "Insurance Expired",
"insuranceActive": "Insurance Active",
"patientCardID": "Patient Card ID: {id}",
"noInsuranceApprovals": "You don't have any insurance approvals yet.",
"noInsuranceWithHMG": "You don't have insurance registered with HMG.",
"referenceRange": "Reference Range",
"downloadReport": "Download report",
"generatingReport": "Generating report, Please wait...",
"noLabResults": "You don't have any lab results yet.",
"labResultDetails": "Lab Result Details",
"resultOf": "Result of",
"whatIsThisResult": "What is this result?",
"lastTested": "Last Tested",
"byVisit": "By Visit",
"byTest": "By Test",
"results": "results",
"viewResults": "View Results",
"rebook": "Rebook",
"noOphthalmologyAppointments": "No Ophthalmology appointments found...",
"noVitalSignsRecordedYet": "No vital signs recorded yet",
"appointmentsAndVisits": "Appointments & visits",
"labAndRadiology": "Lab & Radiology",
"activeMedicationsAndPrescriptions": "Active Medications & Prescriptions",
"allPrescriptions": "All Prescriptions",
"allMedications": "All Medications",
"youDontHaveAnyPrescriptionsYet": "You don't have any prescriptions yet.",
"youDontHaveAnyCompletedVisitsYet": "You don't have any completed visits yet",
"others": "Others",
"allergyInfo": "Allergy Info",
"vaccineInfo": "Vaccine Info",
"updateInsuranceInfo": "Update Insurance",
"myInvoicesList": "My Invoices List",
"ancillaryOrdersList": "Ancillary Orders List",
"youDontHaveAnySickLeavesYet": "You don't have any sick leaves yet.",
"medicalReports": "Medical Reports",
"sickLeaveReport": "Sick Leave Report",
"weightTracker": "Weight Tracker",
"askYourDoctor": "Ask Your Doctor",
"internetPairing": "Internet Pairing",
"requested": "Requested",
"youDontHaveAnyMedicalReportsYet": "You don't have any medical reports yet.",
"requestMedicalReport": "Request medical report",
"youDoNotHaveAnyAppointmentsToRequestMedicalReport": "You do not have any appointments to request a medical report.",
"areYouSureYouWantToRequestMedicalReport": "Are you sure you want to request a medical report for this appointment?",
"yourMedicalReportRequestSubmittedSuccessfully": "Your medical report request has been successfully submitted.",
"monthlyHealthSummaryReportDisclaimer": "This monthly health summary report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as a official report so no medical decision should be taken based on it",
"updatingMonthlyReportStatus": "Updating Monthly Report Status...",
"monthlyReportStatusUpdatedSuccessfully": "Monthly Report Status Updated Successfully",
"whoCanViewMyMedicalFile": "Who can view my medical file?",
"acceptedYourRequestToBeYourFamilyMember": "{status} your request to be your family member",
"canViewYourFile": "can view your file",
"hasARequestPendingToBeYourFamilyMember": "has a request {status} to be your family member",
"wantsToAddYouAsTheirFamilyMember": "wants to add you as their family member",
"rejectedYourRequestToBeYourFamilyMember": "{status} your request to be your family member",
"rejectedYourFamilyMemberRequest": "{status} your family member request",
"notAvailable": "N/A",
"selectAProfile": "Please select a profile",
"switchFamilyFile": "Switch from the below list of medical file",
"medicalFiles": "Medical Files",
"addANewFamilyMember": "Add a new family member",
"viewInvoiceDetails": "View invoice details",
"outPatient": "OutPatient",
"invoiceDetails": "Invoice Details",
"sendingEmailPleaseWait": "Sending email, Please wait...",
"emailSentSuccessfullyMessage": "Email sent successfully.",
"discount": "Discount",
"paid": "Paid",
"fetchingInvoiceDetails": "Fetching invoice details, Please wait...",
"scanQRCode": "Scan QR code",
"parkingSlotDetails": "Parking Slot Details",
"slotNumber": "Slot: {code}",
"basement": "Basement: {description}",
"parkingDate": "Date: {date}",
"parkedSince": "Parked Since: {time}",
"resetDirection": "Reset Direction",
"noPrescriptionOrdersYet": "You don't have any prescription orders yet.",
"fetchingPrescriptionPDFPleaseWait": "Fetching prescription PDF, Please wait...",
"ratingValue": "Rating: {rating}",
"downloadPrescription": "Download Prescription",
"fetchingPrescriptionDetails": "Fetching prescription details...",
"switchBackFamilyFile": "Switch Back To Family File",
"profileAndSettings": "Profile & Settings",
"quickActions": "Quick Actions",
"notificationsSettings": "Notifications Settings",
"touchIDFaceIDServices": "Touch ID / Face ID Services",
"personalInformation": "Personal Information",
"updateEmailAddress": "Update Email Address",
"helpAndSupport": "Help & Support",
"permissionsProfile": "Permissions",
"privacyPolicy": "Privacy Policy",
"deactivateAccount": "Deactivate account",
"ageYearsOld": "{age} {yearsOld}",
"youDontHaveRadiologyOrders": "You don't have any radiology results yet.",
"radiologyResult": "Radiology Result",
"viewRadiologyImage": "View Radiology Image",
"rateClinic": "Rate Clinic",
"back": "Back",
"rateDoctor": "Rate Doctor",
"howWasYourLastVisitWithDoctor": "How was your last visit with doctor?",
"dateOfBirthSymptoms": "What is your Date of Birth?",
"genderSymptoms": "What is your gender?",
"heightSymptoms": "How tall are you?",
"weightSymptoms": "What is your weight?",
"femaleGender": "Female",
"previous": "Previous",
"selectedOrgans": "Selected Organs",
"noOrgansSelected": "No organs selected yet",
"organSelector": "Organ Selector",
"noPredictionsAvailable": "No Predictions available",
"areYouSureYouWantToRestartOrganSelection": "Are you sure you want to restart the organ selection?",
"possibleConditions": "Possible Conditions",
"pleaseSelectAtLeastOneRiskBeforeProceeding": "Please select at least one risk before proceeding",
"aboveYouSeeCommonRiskFactors": "Above you see the most common risk factors. Although /diagnosis may return questions about risk factors, ",
"readMore": "Read more",
"riskFactors": "Risk Factors",
"noRiskFactorsFound": "No risk factors found",
"basedOnYourSelectedSymptomsNoRiskFactors": "Based on your selected symptoms, no additional risk factors were identified.",
"messageNotification": "Message",
"attachedImage": "Attached Image",
"failedToLoadImage": "Failed to load image",
"typeNotification": "Type",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "Please select at least one option before proceeding",
"suggestions": "Suggestions",
"pleaseGoBackAndSelectOrgansFirst": "Please go back and select organs first",
"symptomsSelector": "Symptoms Selector",
"possibleSymptomsRelatedTo": "Possible symptoms related to",
"suggestionAIListDescription": "This is a list of symptoms suggested by our AI, based on the information gathered so far during the interview",
"analyzing": "Analyzing...",
"seekMedicalAdvice": "Seek Medical Advice",
"monitorDescription": "No need to seek medical advice. Just keep healthy routine.",
"seekMedicalAdviceDescription": "Not emergency but better to monitor the symptoms.",
"emergencyDescription": "Need to consult doctor as soon as possible before getting too late.",
"colorScience": "Color Science",
"noNeedToVisitDoctor": "No need to visit doctor",
"commonSymptom": "Common Symptom",
"bookAppointment": "Book Appointment",
"notApplicable": "Not Applicable",
"emergencyTriage": "Emergency",
"emergencyEvidenceDetected": "Emergency evidence detected. Please seek medical attention.",
"noQuestionItemsAvailable": "No question items available",
"pleaseAnswerAllQuestionsBeforeProceeding": "Please answer all questions before proceeding",
"triage": "Triage",
"areYouSureYouWantToExitProgress": "Are you sure you want to exit? Your progress will be lost.",
"noQuestionAvailable": "No question available",
"possibleSymptom": "Possible symptom: ",
"symptomsCheckerFindingScore": "- Symptoms checker finding score",
"notSet": "Not set",
"years": "Years",
"symptomsChecker": "Symptoms Checker",
"helloIsYourInformationUpToDate": "Hello {name}, Is your information up to date?",
"noEditAll": "No, Edit all",
"yesItIs": "Yes, It is",
"age": "Age",
"youDontHaveAnyAncillaryOrdersYet": "You don't have any ancillary orders yet.",
"invoiceWithNumber": "Invoice: {invoiceNo}",
"queued": "Queued",
"checkInReady": "Check-in Ready",
"checkIn": "Check In",
"viewDetails": "View Details",
"selectPaymentMethod": "Select Payment Method",
"processingPaymentPleaseWait": "Processing payment, Please wait...",
"finalizingPaymentPleaseWait": "Finalizing payment, Please wait...",
"generatingInvoicePleaseWait": "Generating invoice, Please wait...",
"hereIsYourInvoiceNumber": "Here is your invoice #: ",
"paymentCompletedSuccessfully": "Payment Completed Successfully",
"failedToInitializeApplePay": "Failed to initialize Apple Pay. Please try again.",
"cash": "Cash",
"approved": "Approved",
"approvalRejectedPleaseVisitReceptionist": "Approval Rejected - Please visit receptionist",
"sentForApproval": "Sent For Approval",
"ancillaryOrderDetails": "Ancillary Order Details",
"noProceduresAvailableForSelectedOrder": "No Procedures available for the selected order.",
"procedures": "Procedures",
"totalAmount": "Total Amount",
"covered": "Covered",
"vatPercent": "VAT (15%)",
"proceedToPayment": "Proceed to Payment",
"supportedSmartWatches": "Supported Smart Watches",
"pleaseMakeSureSamsungWatchConnected": "Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.",
"beforeSyncingDataFollowInstructions": "Before syncing data, please make sure that you have followed the instructions properly.",
"viewWatchInstructions": "View watch instructions",
"healthConnectAppNotInstalled": "Seems like you do not have Health Connect App installed. Please install it from the Play Store to sync your health data.",
"setTimerOfReminder": "Set the timer of reminder",
"youHaveAppointmentWithDr": "You have appointment with Dr. ",
"hours": "Hours",
"secs": "Secs",
"noAllergiesDataFound": "No allergies data found...",
"heartRateDescription": "Your heart rate indicates how many times your heart beats per minute",
"bloodOxygenDescription": "Blood oxygen level indicates how much oxygen your red blood cells are carrying",
"stepsDescription": "Number of steps taken throughout the day",
"caloriesDescription": "Calories burned during physical activity",
"distanceDescription": "Distance covered throughout the day",
"overview": "Overview",
"details": "Details",
"healthy": "Healthy",
"warning": "Warning",
"vitalSignDetails": "Vital Sign Details",
"resultOf": "Result of {date}",
"resultOfNoDate": "Result of --",
"referenceRangeBetween": "Reference range: {low} {high} {unit}",
"referenceRangeMin": "Reference range: ≥ {low} {unit}",
"referenceRangeMax": "Reference range: ≤ {high} {unit}",
"noHistoryAvailable": "No history available",
"bmiDescription": "BMI is a measurement based on height and weight that estimates body fat.",
"heightDescription": "Height is measured in centimeters and is used to calculate BMI and dosage recommendations.",
"weightDescription": "Weight helps track overall health, nutrition, and changes over time.",
"bloodPressureDescription": "Blood pressure reflects the force of blood against artery walls. It is shown as systolic/diastolic.",
"temperatureDescription": "Body temperature reflects how hot your body is and may change with infection or inflammation.",
"heartRateDescriptionVital": "Heart rate refers to the number of heart beats per minute.",
"respiratoryRateDescription": "Respiratory rate is the number of breaths taken per minute.",
"bmiAdvice": "Maintain a balanced diet and regular activity. If your BMI is high or low, consider consulting your doctor.",
"heightAdvice": "No action is needed unless your measurement looks incorrect. Update it during your next visit.",
"weightAdvice": "Monitor weight changes. Sudden gain or loss may require medical advice.",
"bloodPressureAdvice": "Keep tracking your blood pressure. High or low readings should be discussed with your doctor.",
"temperatureAdvice": "If you have a persistent fever or symptoms, contact your healthcare provider.",
"heartRateAdvice": "Track your heart rate trends. If you feel dizziness or chest pain, seek medical care.",
"respiratoryRateAdvice": "If you notice shortness of breath or abnormal breathing, seek medical advice.",
"whatShouldIDoNext": "What should I do next?",
"customizeDrinkCup": "Customize your drink cup",
"tipsToStayHydrated": "Tips to stay hydrated",
"drinkBeforeYouFeelThirsty": "Drink before you feel thirsty",
"keepRefillableBottleNextToYou": "Keep a refillable bottle next to you",
"trackYourDailyIntakeToStayMotivated": "Track your daily intake to stay motivated",
"chooseSparklingWaterInsteadOfSoda": "Choose sparkling water instead of soda",
"switchCup": "Switch Cup",
"plainWater": "Plain Water",
"yourGoal": "Your Goal",
"remaining": "Remaining",
"hydrationStatus": "Hydration Status",
"areYouSureYouWantToCancelAllWaterReminders": "Are you sure you want to cancel all water reminders?",
"remindersSet": "Reminders Set!",
"dailyWaterRemindersScheduledAt": "Daily water reminders scheduled at:",
"waterConsumption": "Water Consumption",
"selectActivityLevel": "Select Activity Level",
"selectNumberOfReminders": "Select Number of Reminders",
"h2oSettings": "H20 Settings",
"settingsSavedSuccessfully": "Settings saved successfully",
"yourName": "Your Name",
"ageYears": "Age (11-120) yrs",
"numberOfRemindersInADay": "Number of reminders in a day",
"medications": "Medications",
"remarks": "Remarks: ",
"someRemarksAboutPrescription": "some remarks about the prescription will be here",
"notifyMeBeforeConsumptionTime": "Notify me before the consumption time",
"noMedicationsToday": "No medications today",
"route": "Route: {route}",
"frequency": "Frequency: {frequency}",
"instruction": "Instruction: {instruction}",
"duration": "Duration: {days}",
"reminders": "Reminders",
"reminderAddedToCalendar": "Reminder added to calendar ✅",
"errorWhileSettingCalendar": "Error while setting calendar: {error}",
"instructions": "Instructions",
"requests": "Requests",
"thisWeek": "This Week",
"lastMonth": "Last Month",
"lastSixMonths": "Last 6 Months",
"selectTime": "Select Time",
"pleaseWaitYouWillBeCalledForVitalSigns": "Please wait! you will be called for vital signs",
"pleaseVisitRoomForVitalSigns": "Please visit Room {roomNumber} for vital signs",
"pleaseVisitRoomToTheDoctor": "Please visit Room {roomNumber} to the Doctor",
"erOnlineCheckInRequest": "ER Online Check-In Request",
"indoor": "Indoor",
"navigation": "Navigation",
"health": "Health",
"calculators": "Calculators",
"converters": "Converters",
"guide": "Guide",
"liveCareServiceDesc": "Get medical advice with a specialist doctor Via a video call",
"bloodGroup": "Blood: {bloodType}",
"medicalServices": "Medical Services",
"insuranceAndPayments": "Insurance & Payments",
"trackerAndOthers": "Tracker & Others",
"bmi": "BMI"
}

@ -1,73 +1,73 @@
// import 'dart:convert'; import 'dart:convert';
// import 'dart:io'; import 'dart:io';
//
// void main() async { void main() async {
// final file = File('assets/json/body_symptoms_data.json'); final file = File('assets/json/body_symptoms_data.json');
// final content = await file.readAsString(); final content = await file.readAsString();
//
// print('File size: ${content.length} characters'); print('File size: ${content.length} characters');
//
// // Split into two parts // Split into two parts
// final parts = content.split('export const SymptomsData = ['); final parts = content.split('export const SymptomsData = [');
// if (parts.length != 2) { if (parts.length != 2) {
// print('ERROR: Could not split file properly'); print('ERROR: Could not split file properly');
// exit(1); exit(1);
// } }
//
// print('Split into ${parts.length} parts'); print('Split into ${parts.length} parts');
//
// // Process BodySymptomsData // Process BodySymptomsData
// var bodyPart = parts[0] var bodyPart = parts[0]
// .replaceAll('export const BodySymptomsData = ', '') .replaceAll('export const BodySymptomsData = ', '')
// .trim() .trim()
// .replaceAll(RegExp(r';$'), ''); .replaceAll(RegExp(r';$'), '');
//
// print('Parsing body symptoms...'); print('Parsing body symptoms...');
// Map<String, dynamic> bodySymptomsData; Map<String, dynamic> bodySymptomsData;
// try { try {
// bodySymptomsData = json.decode(bodyPart); bodySymptomsData = json.decode(bodyPart);
// print('✅ Body symptoms parsed: ${bodySymptomsData.length} body parts'); print('✅ Body symptoms parsed: ${bodySymptomsData.length} body parts');
// } catch (e) { } catch (e) {
// print('❌ Error parsing body symptoms: $e'); print('❌ Error parsing body symptoms: $e');
// exit(1); exit(1);
// } }
//
// // Process SymptomsData // Process SymptomsData
// print('Processing symptoms data...'); print('Processing symptoms data...');
// var symptomsPart = parts[1] var symptomsPart = parts[1]
// .trim() .trim()
// .replaceAll(RegExp(r'\];$'), '') .replaceAll(RegExp(r'\];$'), '')
// .replaceAllMapped(RegExp(r'\n(\s*)id:'), (m) => '\n${m.group(1)}"id":') .replaceAllMapped(RegExp(r'\n(\s*)id:'), (m) => '\n${m.group(1)}"id":')
// .replaceAllMapped(RegExp(r'\n(\s*)type:'), (m) => '\n${m.group(1)}"type":') .replaceAllMapped(RegExp(r'\n(\s*)type:'), (m) => '\n${m.group(1)}"type":')
// .replaceAllMapped(RegExp(r'\n(\s*)name:'), (m) => '\n${m.group(1)}"name":') .replaceAllMapped(RegExp(r'\n(\s*)name:'), (m) => '\n${m.group(1)}"name":')
// .replaceAllMapped(RegExp(r'\n(\s*)common_name:'), (m) => '\n${m.group(1)}"common_name":'); .replaceAllMapped(RegExp(r'\n(\s*)common_name:'), (m) => '\n${m.group(1)}"common_name":');
//
// print('Parsing symptoms...'); print('Parsing symptoms...');
// List<dynamic> symptomsData; List<dynamic> symptomsData;
// try { try {
// symptomsData = json.decode('[$symptomsPart]'); symptomsData = json.decode('[$symptomsPart]');
// print('✅ Symptoms parsed: ${symptomsData.length} symptoms'); print('✅ Symptoms parsed: ${symptomsData.length} symptoms');
// } catch (e) { } catch (e) {
// print('❌ Error parsing symptoms: $e'); print('❌ Error parsing symptoms: $e');
// print('First 1000 chars:'); print('First 1000 chars:');
// print('[$symptomsPart]'.substring(0, 1000)); print('[$symptomsPart]'.substring(0, 1000));
// exit(1); exit(1);
// } }
//
// // Create final JSON // Create final JSON
// print('Creating final JSON structure...'); print('Creating final JSON structure...');
// final jsonStructure = { final jsonStructure = {
// 'bodySymptoms': bodySymptomsData, 'bodySymptoms': bodySymptomsData,
// 'symptoms': symptomsData, 'symptoms': symptomsData,
// }; };
//
// // Write to file // Write to file
// print('Writing to file...'); print('Writing to file...');
// final encoder = JsonEncoder.withIndent(' '); final encoder = JsonEncoder.withIndent(' ');
// await file.writeAsString(encoder.convert(jsonStructure)); await file.writeAsString(encoder.convert(jsonStructure));
//
// print('\n✅ SUCCESS! File converted to proper JSON'); print('\n✅ SUCCESS! File converted to proper JSON');
// print('✅ Body parts: ${bodySymptomsData.length}'); print('✅ Body parts: ${bodySymptomsData.length}');
// print('✅ Symptoms: ${symptomsData.length}'); print('✅ Symptoms: ${symptomsData.length}');
// } }
//

@ -14,7 +14,7 @@ class PenguinNavigator {
} }
func navigateToPOI( referenceId:String,completion: @escaping (Bool, String?) -> Void) { func navigateToPOI( referenceId:String,completion: @escaping (Bool, String?) -> Void) {
PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey, showProgress: false) { [weak self] token, error in PenNavUIManager.shared.getToken(clientID: config.clientID, clientKey: config.clientKey, showProgress: true) { [weak self] token, error in
if let error = error { if let error = error {
let errorMessage = "Token error while getting the for Navigate to method" let errorMessage = "Token error while getting the for Navigate to method"

@ -312,8 +312,6 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia
print("====== after eventsDelegate onPenNavSuccess =========") print("====== after eventsDelegate onPenNavSuccess =========")
PenNavUIManager.shared.navigate(to: "108")
@ -387,21 +385,21 @@ class PenguinView: NSObject, FlutterPlatformView, PIEventsDelegate, PenNavInitia
// self?.handleNavigation(clinicID: clinicID, token: token) { success, errorMessage in self?.handleNavigation(clinicID: clinicID, token: token) { success, errorMessage in
//
// if success { if success {
//
// print("Navigation successful") print("Navigation successful")
//
// } else { } else {
//
// print("Navigation failed: \(errorMessage ?? "Unknown error")") print("Navigation failed: \(errorMessage ?? "Unknown error")")
//
// } }
//
//
//
// } }

@ -19,7 +19,7 @@ abstract class ApiClient {
Future<void> post( Future<void> post(
String endPoint, { String endPoint, {
required Map<String, dynamic> body, required dynamic body,
required Function(dynamic response, int statusCode, {int? messageStatus, String? errorMessage}) onSuccess, required Function(dynamic response, int statusCode, {int? messageStatus, String? errorMessage}) onSuccess,
required Function(String error, int statusCode, {int? messageStatus, Failure? failureType}) onFailure, required Function(String error, int statusCode, {int? messageStatus, Failure? failureType}) onFailure,
bool isAllowAny, bool isAllowAny,
@ -189,8 +189,6 @@ class ApiClientImp implements ApiClient {
// body['SessionID'] = "45786230487560q"; // body['SessionID'] = "45786230487560q";
} }
// body['IsNewFlutterApp'] = true;
body.removeWhere((key, value) => value == null); body.removeWhere((key, value) => value == null);
} }

@ -151,7 +151,6 @@ var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
///LiveChat ///LiveChat
var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
var GET_LIVECHAT_REQUEST_ID = 'Services/Patients.svc/REST/Patient_ICChatRequest_Insert';
///babyInformation ///babyInformation
var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
@ -208,7 +207,7 @@ var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAp
var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate";
var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate";
//var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list //URL to get clinic list
var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
@ -399,22 +398,6 @@ var GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_Get
var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions'; var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions';
///Push Notifications
var GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
///My Trackers
var GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
var GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
var ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
var GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
var GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
var ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
var GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
var ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
@ -675,8 +658,6 @@ const FAMILY_FILES = 'Services/Authentication.svc/REST/GetAllSharedRecordsByStat
var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatbot_SendMedicationInstructionByWhatsApp'; var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatbot_SendMedicationInstructionByWhatsApp';
const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
@ -804,11 +785,6 @@ class ApiConsts {
static final String getAllSharedRecordsByStatus = 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus'; static final String getAllSharedRecordsByStatus = 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus';
static final String removeFileFromFamilyMembers = 'Services/Authentication.svc/REST/ActiveDeactive_PatientFile'; static final String removeFileFromFamilyMembers = 'Services/Authentication.svc/REST/ActiveDeactive_PatientFile';
static final String acceptAndRejectFamilyFile = 'Services/Authentication.svc/REST/Update_FileStatus'; static final String acceptAndRejectFamilyFile = 'Services/Authentication.svc/REST/Update_FileStatus';
static final String getActivePrescriptionsDetails = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
static final String getTermsConditions = 'Services/Patients.svc/Rest/GetUserTermsAndConditions';
static final String getMonthlyReports = 'Services/Patients.svc/Rest/UpdatePateintHealthSummaryReport';
static final String updatePatientEmail = 'Services/Patients.svc/Rest/UpdatePateintEmail';
static final String getQrParkingDetails = 'Services/SWP.svc/REST/GetQRParkingByID';
// Ancillary Order Apis // Ancillary Order Apis
static final String getOnlineAncillaryOrderList = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; static final String getOnlineAncillaryOrderList = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
@ -841,7 +817,7 @@ class ApiConsts {
static final String getRiskFactors = '$symptomsCheckerApi/GetRiskFactors'; static final String getRiskFactors = '$symptomsCheckerApi/GetRiskFactors';
static final String getSuggestions = '$symptomsCheckerApi/GetSuggestion'; static final String getSuggestions = '$symptomsCheckerApi/GetSuggestion';
static final String diagnosis = '$symptomsCheckerApi/GetDiagnosis'; static final String diagnosis = '$symptomsCheckerApi/GetDiagnosis';
static final String explain = '$symptomsCheckerApi/ExplainDiagnosisResult'; static final String explain = '$symptomsCheckerApi/explain';
//E-REFERRAL SERVICES //E-REFERRAL SERVICES
static final getAllRelationshipTypes = "Services/Patients.svc/REST/GetAllRelationshipTypes"; static final getAllRelationshipTypes = "Services/Patients.svc/REST/GetAllRelationshipTypes";

@ -225,9 +225,6 @@ class AppAssets {
static const String trade_down_red = '$svgBasePath/trade_down_red.svg'; static const String trade_down_red = '$svgBasePath/trade_down_red.svg';
static const String pharmacy_icon = '$svgBasePath/phramacy_icon.svg'; static const String pharmacy_icon = '$svgBasePath/phramacy_icon.svg';
static const String forward_top_nav_icon = '$svgBasePath/forward_top_nav_icon.svg';
static const String back_top_nav_icon = '$svgBasePath/back_top_nav_icon.svg';
//bottom navigation// //bottom navigation//
static const String homeBottom = '$svgBasePath/home_bottom.svg'; static const String homeBottom = '$svgBasePath/home_bottom.svg';
static const String bookAppoBottom = '$svgBasePath/book_appo_bottom.svg'; static const String bookAppoBottom = '$svgBasePath/book_appo_bottom.svg';
@ -253,7 +250,6 @@ class AppAssets {
static const String homeBorderedIcon = '$svgBasePath/home_bordered.svg'; static const String homeBorderedIcon = '$svgBasePath/home_bordered.svg';
static const String symptomCheckerIcon = '$svgBasePath/symptom_checker_icon.svg'; static const String symptomCheckerIcon = '$svgBasePath/symptom_checker_icon.svg';
static const String symptomCheckerBottomIcon = '$svgBasePath/symptom_bottom_icon.svg'; static const String symptomCheckerBottomIcon = '$svgBasePath/symptom_bottom_icon.svg';
static const String coloredDotsIcon = '$svgBasePath/colored_dots_icon.svg';
// Water Monitor // Water Monitor
static const String waterBottle = '$svgBasePath/water_bottle.svg'; static const String waterBottle = '$svgBasePath/water_bottle.svg';
@ -306,9 +302,6 @@ class AppAssets {
static const String bloodPressure = '$svgBasePath/blood_pressure.svg'; static const String bloodPressure = '$svgBasePath/blood_pressure.svg';
static const String temperature = '$svgBasePath/temperature.svg'; static const String temperature = '$svgBasePath/temperature.svg';
static const String arLangIcon = '$svgBasePath/ar_lang_icon.svg';
static const String enLangIcon = '$svgBasePath/en_lang_icon.svg';
// PNGS // // PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png'; static const String hmgLogo = '$pngBasePath/hmg_logo.png';
static const String liveCareService = '$pngBasePath/livecare_service.png'; static const String liveCareService = '$pngBasePath/livecare_service.png';

@ -10,8 +10,6 @@ import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_repo.
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart'; import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_repo.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/models/active_prescriptions_response_model.dart';
import 'package:hmg_patient_app_new/features/common/common_repo.dart'; import 'package:hmg_patient_app_new/features/common/common_repo.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_repo.dart'; import 'package:hmg_patient_app_new/features/contact_us/contact_us_repo.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart'; import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
@ -35,21 +33,17 @@ import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_repo.dart'; import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_repo.dart';
import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart'; import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart';
import 'package:hmg_patient_app_new/features/monthly_reports/monthly_reports_repo.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_repo.dart'; import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_repo.dart';
import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart'; import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
import 'package:hmg_patient_app_new/features/notifications/notifications_repo.dart';
import 'package:hmg_patient_app_new/features/notifications/notifications_view_model.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart'; import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart'; import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_repo.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_repo.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart'; import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart';
import 'package:hmg_patient_app_new/features/qr_parking/qr_parking_repo.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart'; import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart'; import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart'; import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart';
@ -74,14 +68,8 @@ import 'package:local_auth/local_auth.dart';
import 'package:logger/web.dart'; import 'package:logger/web.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../features/monthly_reports/monthly_reports_repo.dart';
import '../features/qr_parking/qr_parking_view_model.dart';
import '../presentation/health_calculators_and_converts/health_calculator_view_model.dart'; import '../presentation/health_calculators_and_converts/health_calculator_view_model.dart';
import '../features/active_prescriptions/active_prescriptions_repo.dart';
import '../features/monthly_reports/terms_conditions_repo.dart';
import '../features/monthly_reports/terms_conditions_view_model.dart';
GetIt getIt = GetIt.instance; GetIt getIt = GetIt.instance;
class AppDependencies { class AppDependencies {
@ -159,13 +147,6 @@ class AppDependencies {
getIt.registerLazySingleton<MyInvoicesRepo>(() => MyInvoicesRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt())); getIt.registerLazySingleton<MyInvoicesRepo>(() => MyInvoicesRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<HealthTrackersRepo>(() => HealthTrackersRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt())); getIt.registerLazySingleton<HealthTrackersRepo>(() => HealthTrackersRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<MonthlyReportRepo>(() => MonthlyReportRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt())); getIt.registerLazySingleton<MonthlyReportRepo>(() => MonthlyReportRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<ActivePrescriptionsRepo>(() => ActivePrescriptionsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<TermsConditionsRepo>(() => TermsConditionsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerFactory<TermsConditionsViewModel>(() => TermsConditionsViewModel(termsConditionsRepo: getIt<TermsConditionsRepo>(), errorHandlerService: getIt<ErrorHandlerService>(),
),);
getIt.registerLazySingleton<MonthlyReportsRepo>(() => MonthlyReportsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<QrParkingRepo>(() => QrParkingRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<NotificationsRepo>(() => NotificationsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
// ViewModels // ViewModels
// Global/shared VMs LazySingleton // Global/shared VMs LazySingleton
@ -284,27 +265,14 @@ class AppDependencies {
getIt.registerLazySingleton<WaterMonitorViewModel>(() => WaterMonitorViewModel(waterMonitorRepo: getIt(), errorHandlerService: getIt())); getIt.registerLazySingleton<WaterMonitorViewModel>(() => WaterMonitorViewModel(waterMonitorRepo: getIt(), errorHandlerService: getIt()));
//commenting this because its already define there was on run time error because of this.
getIt.registerLazySingleton<MyInvoicesViewModel>(() => MyInvoicesViewModel(myInvoicesRepo: getIt(), errorHandlerService: getIt(), navServices: getIt())); getIt.registerLazySingleton<MyInvoicesViewModel>(() => MyInvoicesViewModel(myInvoicesRepo: getIt(), errorHandlerService: getIt(), navServices: getIt()));
getIt.registerLazySingleton<MonthlyReportViewModel>(() => MonthlyReportViewModel(errorHandlerService: getIt(), monthlyReportRepo: getIt())); getIt.registerLazySingleton<MonthlyReportViewModel>(() => MonthlyReportViewModel(errorHandlerService: getIt(), monthlyReportRepo: getIt()));
getIt.registerLazySingleton<MyInvoicesViewModel>(() => MyInvoicesViewModel(
getIt.registerLazySingleton<NotificationsViewModel>(() => NotificationsViewModel(notificationsRepo: getIt(), errorHandlerService: getIt())); myInvoicesRepo: getIt(),
getIt.registerLazySingleton<HealthTrackersViewModel>(() => HealthTrackersViewModel(healthTrackersRepo: getIt(), errorHandlerService: getIt()));
getIt.registerLazySingleton<ActivePrescriptionsViewModel>(
() => ActivePrescriptionsViewModel(
errorHandlerService: getIt(), errorHandlerService: getIt(),
activePrescriptionsRepo: getIt() navServices: getIt(),
), ));
); getIt.registerLazySingleton<HealthTrackersViewModel>(() => HealthTrackersViewModel(healthTrackersRepo: getIt(), errorHandlerService: getIt()));
getIt.registerFactory<QrParkingViewModel>(
() => QrParkingViewModel(
qrParkingRepo: getIt<QrParkingRepo>(),
errorHandlerService: getIt<ErrorHandlerService>(),
cacheService: getIt<CacheService>(),
),
);
} }
} }

@ -311,150 +311,3 @@ extension ServiceTypeEnumExt on ServiceTypeEnum {
enum PossibleConditionsSeverityEnum { seekMedicalAdvice, monitorOnly, emergency } enum PossibleConditionsSeverityEnum { seekMedicalAdvice, monitorOnly, emergency }
enum HealthTrackerTypeEnum { bloodSugar, bloodPressure, weightTracker } enum HealthTrackerTypeEnum { bloodSugar, bloodPressure, weightTracker }
// Severity Enum
enum SeverityEnum { mild, moderate, severe }
extension SeverityEnumExtension on SeverityEnum {
int get toInt {
switch (this) {
case SeverityEnum.mild:
return 0;
case SeverityEnum.moderate:
return 1;
case SeverityEnum.severe:
return 2;
}
}
String get displayName {
AppState appState = getIt.get<AppState>();
bool isArabic = appState.getLanguageID() == 1 ? true : false;
switch (this) {
case SeverityEnum.mild:
return isArabic ? 'خفيف' : 'Mild';
case SeverityEnum.moderate:
return isArabic ? 'متوسط' : 'Moderate';
case SeverityEnum.severe:
return isArabic ? 'شديد' : 'Severe';
}
}
static SeverityEnum? fromInt(int value) {
switch (value) {
case 0:
return SeverityEnum.mild;
case 1:
return SeverityEnum.moderate;
case 2:
return SeverityEnum.severe;
default:
return null;
}
}
}
// Triage Level Enum
enum TriageLevelEnum { emergencyAmbulance, emergency, consultation24, consultation, selfCare }
extension TriageLevelEnumExtension on TriageLevelEnum {
int get toInt {
switch (this) {
case TriageLevelEnum.emergencyAmbulance:
return 0;
case TriageLevelEnum.emergency:
return 1;
case TriageLevelEnum.consultation24:
return 2;
case TriageLevelEnum.consultation:
return 3;
case TriageLevelEnum.selfCare:
return 4;
}
}
String get displayName {
AppState appState = getIt.get<AppState>();
bool isArabic = appState.getLanguageID() == 1 ? true : false;
switch (this) {
case TriageLevelEnum.emergencyAmbulance:
return isArabic ? 'طوارئ - إسعاف' : 'Emergency - Ambulance';
case TriageLevelEnum.emergency:
return isArabic ? 'طوارئ' : 'Emergency';
case TriageLevelEnum.consultation24:
return isArabic ? 'استشارة خلال 24 ساعة' : 'Consultation within 24 hours';
case TriageLevelEnum.consultation:
return isArabic ? 'استشارة' : 'Consultation';
case TriageLevelEnum.selfCare:
return isArabic ? 'رعاية ذاتية' : 'Self Care';
}
}
static TriageLevelEnum? fromInt(int value) {
switch (value) {
case 0:
return TriageLevelEnum.emergencyAmbulance;
case 1:
return TriageLevelEnum.emergency;
case 2:
return TriageLevelEnum.consultation24;
case 3:
return TriageLevelEnum.consultation;
case 4:
return TriageLevelEnum.selfCare;
default:
return null;
}
}
}
// Question Type Enum
enum QuestionTypeEnum { single, groupSingle, groupMultiple, duration }
extension QuestionTypeEnumExtension on QuestionTypeEnum {
int get toInt {
switch (this) {
case QuestionTypeEnum.single:
return 0;
case QuestionTypeEnum.groupSingle:
return 1;
case QuestionTypeEnum.groupMultiple:
return 2;
case QuestionTypeEnum.duration:
return 3;
}
}
String get displayName {
AppState appState = getIt.get<AppState>();
bool isArabic = appState.getLanguageID() == 1 ? true : false;
switch (this) {
case QuestionTypeEnum.single:
return isArabic ? 'سؤال واحد' : 'Single';
case QuestionTypeEnum.groupSingle:
return isArabic ? 'مجموعة - اختيار واحد' : 'Group Single';
case QuestionTypeEnum.groupMultiple:
return isArabic ? 'مجموعة - اختيار متعدد' : 'Group Multiple';
case QuestionTypeEnum.duration:
return isArabic ? 'المدة' : 'Duration';
}
}
static QuestionTypeEnum? fromInt(int value) {
switch (value) {
case 0:
return QuestionTypeEnum.single;
case 1:
return QuestionTypeEnum.groupSingle;
case 2:
return QuestionTypeEnum.groupMultiple;
case 3:
return QuestionTypeEnum.duration;
default:
return null;
}
}
}

@ -104,7 +104,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!), title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!, navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results", loadingText: "Please grant location permission from app settings to see better results".needTranslation,
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () { onCancelTap: () {
navigationService.pop(); navigationService.pop();
@ -265,7 +265,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!), title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!, navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results", loadingText: "Please grant location permission from app settings to see better results".needTranslation,
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () { onCancelTap: () {
navigationService.pop(); navigationService.pop();

@ -1,316 +0,0 @@
import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:io';
import 'dart:ui';
import 'package:device_calendar/device_calendar.dart';
import 'package:flutter/widgets.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/permission_service.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:jiffy/jiffy.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart' as ios;
import 'package:permission_handler/permission_handler.dart';
import 'package:timezone/data/latest.dart' as tzl;
final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin();
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
class CalendarUtils {
static Completer<CalendarUtils>? _completer;
dynamic get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!);
dynamic calendars;
CalendarUtils._(this.calendars);
// static Future<CalendarUtils> getInstance() async {
// if (_completer == null) {
// _completer = Completer<CalendarUtils>();
// print(_completer!.isCompleted);
// try {
// final dynamic calendarsResult;
// if (Platform.isIOS) {
// calendarsResult = await _myPlugin.getCalendars();
// if (!_completer!.isCompleted) {
// _completer?.complete(CalendarUtils._(await calendarsResult!));
// }
// } else {
// calendarsResult = await deviceCalendarPlugin.retrieveCalendars();
// if (!_completer!.isCompleted) {
// _completer?.complete(CalendarUtils._(await calendarsResult.data!));
// }
// }
// } on Exception catch (e) {
// if (!_completer!.isCompleted) {
// _completer!.completeError(e);
// }
// }
// }
// return _completer!.future;
// }
static Future<CalendarUtils> getInstance() async {
tzl.initializeTimeZones();
if (_completer != null) {
return _completer!.future;
}
_completer = Completer<CalendarUtils>();
try {
final dynamic calendarsResult;
if (Platform.isIOS) {
calendarsResult = await _myPlugin.getCalendars();
_completer!.complete(CalendarUtils._(calendarsResult));
} else {
calendarsResult = await deviceCalendarPlugin.retrieveCalendars();
_completer!.complete(CalendarUtils._(calendarsResult.data));
}
} catch (e) {
_completer!.completeError(e);
}
return _completer!.future;
}
Future createOrUpdateEvents({List<DateTime>? scheduleList, String? title, String? description, List<DateTime>? scheduleDateTime, List<DayOfWeek>? daysOfWeek}) async {
tzl.initializeTimeZones();
List<Event> events = [];
Location _currentLocation;
if (DateTime.now().timeZoneName == "+04")
_currentLocation = getLocation('Asia/Dubai');
else
_currentLocation = getLocation('Asia/Riyadh');
scheduleDateTime!.forEach((element) {
RecurrenceRule recurrenceRule = RecurrenceRule(
// RecurrenceFrequency.Daily,
// daysOfWeek: daysOfWeek,
// endDate: element,
until: element, frequency: Frequency.daily,
);
//added byAamir Tz Time
Event event = Event(writableCalendars!.id,
recurrenceRule: recurrenceRule,
start: TZDateTime.from(element, _currentLocation),
end: TZDateTime.from(element.add(Duration(minutes: 30)), _currentLocation),
title: title,
description: description);
events.add(event);
});
events.forEach((element) {
deviceCalendarPlugin.createOrUpdateEvent(element);
});
}
Future createOrUpdateEvent({required String title, required String description, required String location, DateTime? scheduleDateTime, String? eventId}) async {
RecurrenceRule recurrenceRule = RecurrenceRule(
// RecurrenceFrequency.Daily,
// daysOfWeek: daysOfWeek,
// endDate: scheduleDateTime,
until: scheduleDateTime, frequency: Frequency.daily,
);
Location _currentLocation;
// if (DateTime.now().timeZoneName == "+04")
// _currentLocation = getLocation('Asia/Dubai');
// else
_currentLocation = getLocation('Asia/Riyadh');
TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
print("writableCalendarsToString: " + writableCalendars!.id!);
Event event = Event(
writableCalendars!.id,
start: scheduleDateTimeUTZ,
end: scheduleDateTimeUTZ.add(Duration(minutes: 30)),
title: title,
description: description,
);
ios.CalendarEvent iosCalEvent =
ios.CalendarEvent(location: location, startDate: scheduleDateTimeUTZ, endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description, isAllDay: false);
if (Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions();
print(result);
await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID " + eventId!);
});
} else {
await _myPlugin.createEvent(calendarId: writableCalendars.id!, event: iosCalEvent).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID iOS " + eventId!);
});
}
}
deleteEvent(String _calendarId, String _eventId) async {
if (Platform.isIOS) {
await _myPlugin.deleteEvent(calendarId: _calendarId, eventId: _eventId);
} else {
await deviceCalendarPlugin.deleteEvent(_calendarId, _eventId);
}
}
Future retrieveEvents(
String calendarId,
RetrieveEventsParams retrieveEventsParams,
) async {
if (Platform.isIOS) {
return await _myPlugin.getEvents(calendarId: calendarId);
} else {
return await deviceCalendarPlugin.retrieveEvents(calendarId, retrieveEventsParams);
}
}
Future createCalendar(
String calendarName, {
Color? calendarColor,
String? localAccountName,
}) async {
return await deviceCalendarPlugin.createCalendar(calendarName, calendarColor: calendarColor, localAccountName: localAccountName);
}
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {
var permissionResults = [Permission.calendarFullAccess].request();
return permissionResults;
}
showReminderBottomSheet(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function() onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool isMultiAllowed = false}) async {
if (Platform.isAndroid) {
if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderBottomSheet(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
} else {
// Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
// if (await Permission.calendarFullAccess.request().isGranted) {
// _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
// onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
// }
// });
}
} else {
if (await Permission.calendarWriteOnly.request().isGranted) {
if (await Permission.calendarFullAccess.request().isGranted) {
_showReminderBottomSheet(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
}
}
}
}
Future<void> _showReminderBottomSheet(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder", child: PrescriptionReminderView(
setReminder: (int value) async {
if (!isMultiAllowed!) {
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
await calendarUtils.createOrUpdateEvent(
title: title ?? "You have appointment with Dr. $doctorName",
description: description ?? "At $appoDateFormatted $appoTimeFormatted",
scheduleDateTime: dateTime,
eventId: eventId,
location: '');
onSuccess();
}
} else {
onMultiDateSuccess!(value);
}
},
), callBackFunc: () {}, isFullScreen: false);
}
setCalender(BuildContext context,
{required String eventId, required int selectedMinutes, int? frequencyNumber, required int days, required String orderDate, required String itemDescriptionN, required String route}) async {
DateTime actualDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 8, 0);
frequencyNumber ??= 2; //Some time frequency number is null so by default will be 2
int remainingDays = days - (Jiffy.parseFromDateTime(DateTime.now()).diff(Jiffy.parseFromDateTime(DateUtil.convertStringToDate(orderDate)), unit: Unit.day) as int);
if (remainingDays.isNegative) {
getIt.get<DialogService>().showErrorBottomSheet(message: "Prescription date has been already passed you can not add a reminder for this prescription.");
return;
}
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
try {
for (int i = 0; i < remainingDays; i++) {
//event for number of days.
for (int j = 0; j < frequencyNumber; j++) {
// event for number of times per day.
if (j != 0) {
actualDate.add(new Duration(hours: 8)); // 8 hours addition for daily dose.
}
//Time subtraction from actual reminder time. like before 30, or 1 hour.
actualDate = Jiffy.parseFromDateTime(actualDate).subtract(minutes: selectedMinutes).dateTime;
calendarUtils.createOrUpdateEvent(
title: "$itemDescriptionN} Prescription Reminder",
description: "$itemDescriptionN $frequencyNumber $route ",
scheduleDateTime: actualDate,
eventId: eventId + (i.toString() + j.toString()),
location: '', //event id with varitions
);
print("Creating event #$j for day $i$actualDate");
actualDate = DateTime(actualDate.year, actualDate.month, actualDate.day, 8, 0);
}
actualDate = Jiffy.parseFromDateTime(actualDate).add(days: 1).dateTime;
}
} catch (ex) {
getIt.get<DialogService>().showErrorBottomSheet(message: "catch:$ex");
}
}
Future<void> checkAndRemove(hasReminder, {bool delete = false, String itemDescriptionN = ""}) async {
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
DateTime startEventsDate = Jiffy.parseFromDateTime(DateTime.now()).subtract(days: 30).dateTime;
DateTime endEventsDate = Jiffy.parseFromDateTime(DateTime.now()).add(days: 120).dateTime;
RetrieveEventsParams params = RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate);
if (calendarUtils.calendars != null) {
if (Platform.isAndroid) {
await processEvents(calendarUtils.calendars, calendarUtils, params, delete, itemDescriptionN, hasReminder);
} else {
List<ios.Calendar>? iosCalendars = await _myPlugin.getCalendars();
if (iosCalendars != null) {
await processEvents(iosCalendars.map((cal) => Calendar(id: cal.id, name: cal.name, accountName: cal.accountName)).toList(), calendarUtils, params, delete, itemDescriptionN, hasReminder);
}
}
}
}
Future<void> processEvents(List<Calendar> calendars, calendarUtils, params, delete, String itemDescriptionN, hasReminder) async {
for (var calendar in calendars) {
Result<UnmodifiableListView<Event>> events = await calendarUtils.retrieveEvents(calendar.id!, params);
for (var event in events.data!) {
if (event.title!.contains(itemDescriptionN)) {
if (delete) {
await calendarUtils.deleteEvent(calendar, event);
// AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess);
hasReminder = false;
} else {
hasReminder = false;
// setState(() {
// hasReminder = true;
// });
}
}
}
}
}

@ -3,7 +3,6 @@ import 'dart:async';
import 'package:device_calendar_plus/device_calendar_plus.dart'; import 'package:device_calendar_plus/device_calendar_plus.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:jiffy/jiffy.dart' show Jiffy; import 'package:jiffy/jiffy.dart' show Jiffy;
import 'package:manage_calendar_events/manage_calendar_events.dart' hide Calendar;
class CalenderUtilsNew { class CalenderUtilsNew {
final DeviceCalendar calender = DeviceCalendar.instance; final DeviceCalendar calender = DeviceCalendar.instance;

@ -43,7 +43,7 @@ class Utils {
{ {
"Desciption": "Sahafa Hospital", "Desciption": "Sahafa Hospital",
"DesciptionN": "مستشفى الصحافة", "DesciptionN": "مستشفى الصحافة",
"ID": 1, // Campus ID "ID": 1,
"LegalName": "Sahafa Hospital", "LegalName": "Sahafa Hospital",
"LegalNameN": "مستشفى الصحافة", "LegalNameN": "مستشفى الصحافة",
"Name": "Sahafa Hospital", "Name": "Sahafa Hospital",
@ -55,20 +55,19 @@ class Utils {
"IsActive": true, "IsActive": true,
"IsHmg": true, "IsHmg": true,
"IsVidaPlus": false, "IsVidaPlus": false,
"Latitude": "24.8111548", "Latitude": "24.8113774",
"Longitude": "46.6217912", "Longitude": "46.6239813",
"MainProjectID": 130, "MainProjectID": 130,
"ProjectOutSA": false, "ProjectOutSA": false,
"UsingInDoctorApp": false, "UsingInDoctorApp": false
"IsHMC": false
},{ },{
"Desciption": "Jeddah Fayhaa Hospital", "Desciption": "Jeddah Hospital",
"DesciptionN": "مستشفى جدة الفيحاء", "DesciptionN": "مستشفى الصحافة",
"ID": 3, // Campus ID "ID": 3,
"LegalName": "Jeddah Fayhaa Hospital", "LegalName": "Jeddah Hospital",
"LegalNameN": "مستشفى جدة الفيحاء", "LegalNameN": "مستشفى الصحافة",
"Name": "Jeddah Fayhaa Hospital", "Name": "Jeddah Hospital",
"NameN": "مستشفى جدة الفيحاء", "NameN": "مستشفى الصحافة",
"PhoneNumber": "+966115222222", "PhoneNumber": "+966115222222",
"SetupID": "013311", "SetupID": "013311",
"DistanceInKilometers": 0, "DistanceInKilometers": 0,
@ -76,12 +75,11 @@ class Utils {
"IsActive": true, "IsActive": true,
"IsHmg": true, "IsHmg": true,
"IsVidaPlus": false, "IsVidaPlus": false,
"Latitude": "21.5086703", "Latitude": "24.8113774",
"Longitude": "39.2121855", "Longitude": "46.6239813",
"MainProjectID": 130, "MainProjectID": 130,
"ProjectOutSA": false, "ProjectOutSA": false,
"UsingInDoctorApp": false, "UsingInDoctorApp": false
"IsHMC": false
} }
]; ];
@ -814,8 +812,7 @@ class Utils {
child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: iconColor), child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: iconColor),
), ),
TextSpan( TextSpan(
// text: NumberFormat.currency(locale: 'en_US', symbol: " ", decimalDigits: 0).format(habibWalletAmount), text: NumberFormat.currency(locale: 'en_US', symbol: " ", decimalDigits: 0).format(habibWalletAmount),
text: " ${habibWalletAmount.toStringAsFixed(2)}",
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
fontSize: fontSize ?? 32.f, fontSize: fontSize ?? 32.f,
@ -960,11 +957,11 @@ class Utils {
static String getCardButtonText(int currentQueueStatus, String roomNumber) { static String getCardButtonText(int currentQueueStatus, String roomNumber) {
switch (currentQueueStatus) { switch (currentQueueStatus) {
case 0: case 0:
return LocaleKeys.pleaseWaitYouWillBeCalledForVitalSigns.tr(); return "Please wait! you will be called for vital signs".needTranslation;
case 1: case 1:
return LocaleKeys.pleaseVisitRoomForVitalSigns.tr(namedArgs: {'roomNumber': roomNumber.toString()}); return "Please visit Room $roomNumber for vital signs".needTranslation;
case 2: case 2:
return LocaleKeys.pleaseVisitRoomToTheDoctor.tr(namedArgs: {'roomNumber': roomNumber.toString()}); return "Please visit Room $roomNumber to the Doctor".needTranslation;
} }
return ""; return "";
} }

@ -1,65 +0,0 @@
import 'package:dartz/dartz.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/models/active_prescriptions_response_model.dart';
import '../../core/api/api_client.dart';
import '../../core/api_consts.dart';
import '../../core/common_models/generic_api_model.dart';
import '../../core/exceptions/api_failure.dart';
import '../../services/logger_service.dart';
abstract class ActivePrescriptionsRepo {
Future<Either<Failure, GenericApiModel<List<ActivePrescriptionsResponseModel>>>> getActivePrescriptionsDetails();
}
class ActivePrescriptionsRepoImp implements ActivePrescriptionsRepo {
final ApiClient apiClient;
final LoggerService loggerService;
ActivePrescriptionsRepoImp({required this.loggerService, required this.apiClient});
@override
Future<Either<Failure, GenericApiModel<List<ActivePrescriptionsResponseModel>>>> getActivePrescriptionsDetails() async
{
try {
GenericApiModel<List<ActivePrescriptionsResponseModel>>? apiResponse;
Failure? failure;
await apiClient.post(
ApiConsts.getActivePrescriptionsDetails,
body: {},
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
var list = response['List_ActiveGetPrescriptionReportByPatientID'];
var res = list
.map<ActivePrescriptionsResponseModel>(
(item) => ActivePrescriptionsResponseModel.fromJson(item))
.toList();
apiResponse = GenericApiModel<List<ActivePrescriptionsResponseModel>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
// data: response,
data: res
);
return apiResponse;
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -1,101 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/models/active_prescriptions_response_model.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_repo.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
class ActivePrescriptionsViewModel extends ChangeNotifier {
late ActivePrescriptionsRepo activePrescriptionsRepo;
late ErrorHandlerService errorHandlerService;
List<ActivePrescriptionsResponseModel> activePrescriptionsDetailsList = [];
ActivePrescriptionsViewModel({
required this.activePrescriptionsRepo,
required this.errorHandlerService,
});
Future<void> getActiveMedications({
Function(dynamic)? onSuccess,
Function(String)? onError,
}) async {
final result =
await activePrescriptionsRepo.getActivePrescriptionsDetails();
result.fold(
(failure) async =>
await errorHandlerService.handleError(failure: failure),
(apiResponse) {
if (apiResponse.messageStatus == 1) {
activePrescriptionsDetailsList = apiResponse.data ?? [];
notifyListeners();
if (onSuccess != null) onSuccess(apiResponse.data);
}
},
);
}
DateTime parseDate(String? date) {
if (date == null) return DateTime.now();
final regex = RegExp(r"\/Date\((\d+)([+-]\d+)?\)\/");
final match = regex.firstMatch(date);
if (match != null) {
final millis = int.parse(match.group(1)!);
return DateTime.fromMillisecondsSinceEpoch(millis);
}
return DateTime.tryParse(date) ?? DateTime.now();
}
List<DateTime> generateMedicationDays(ActivePrescriptionsResponseModel med) {
final start = parseDate(med.startDate);
final duration = med.days ?? 0;
if (duration <= 0) return [];
final f = (med.frequency ?? "").toLowerCase().trim();
int intervalDays = 1;
if (f.contains("every six hours") ||
f.contains("every 6 hours") ||
f.contains("every four hours") ||
f.contains("every 4 hours") ||
f.contains("every eight hours") ||
f.contains("every 8 hours") ||
f.contains("every 12 hours") ||
f.contains("every twelve hours") ||
f.contains("every 24 hours") ||
f.contains("3 times a day") ||
f.contains("once a day")) {
intervalDays = 1;
}
else if (f.contains("once a week")) {
intervalDays = 7;
}
else if (f.contains("every 3 days")) {
intervalDays = 3;
}
else if (f.contains("every other day")) {
intervalDays = 2;
}
List<DateTime> result = [];
for (int offset = 0; offset < duration; offset += intervalDays) {
result.add(start.add(Duration(days: offset)));
}
return result;
}
bool sameYMD(DateTime a, DateTime b) =>
a.year == b.year && a.month == b.month && a.day == b.day;
List<ActivePrescriptionsResponseModel> getMedsForSelectedDay(
DateTime selectedDate) {
final clean = DateTime(selectedDate.year, selectedDate.month, selectedDate.day);
return activePrescriptionsDetailsList.where((med) {
final days = generateMedicationDays(med);
return days.any((d) => sameYMD(d, clean));
}).toList();
}
}

@ -1,78 +0,0 @@
class ActivePrescriptionsResponseModel {
String? itemId;
String? itemDescription;
String? route;
String? frequency;
int? frequencyNumber;
int? doseDailyQuantity;
int? days;
String? startDate;
String? endDate;
String? orderDate;
String? productImageString;
bool isReminderOn;
List<String?> selectedDoseTimes = [];
ActivePrescriptionsResponseModel({
this.itemId,
this.itemDescription,
this.route,
this.frequency,
this.frequencyNumber,
this.doseDailyQuantity,
this.days,
this.startDate,
this.endDate,
this.orderDate,
this.productImageString,
this.isReminderOn = false,
List<String?>? selectedDoseTimes,
}) {
this.selectedDoseTimes = selectedDoseTimes ?? [];
}
/// ========== JSON FROM ==========
factory ActivePrescriptionsResponseModel.fromJson(Map<String, dynamic> json) {
return ActivePrescriptionsResponseModel(
itemId: json["ItemID"]?.toString() ?? "",
itemDescription: json["ItemDescription"] ?? "",
route: json["Route"] ?? "",
frequency: json["Frequency"] ?? "",
frequencyNumber: json["FrequencyNumber"],
doseDailyQuantity: json["DoseDailyQuantity"] ?? 1,
days: json["Days"] ?? 0,
startDate: json["StartDate"] ?? "",
endDate: json["EndDate"] ?? "",
orderDate: json["OrderDate"] ?? "",
productImageString: json["ProductImageString"] ?? "",
isReminderOn: json["IsReminderOn"] == true,
selectedDoseTimes:
(json["SelectedDoseTimes"] as List<dynamic>?)
?.map((e) => e?.toString())
.toList() ??
[],
);
}
/// ========== JSON TO ==========
Map<String, dynamic> toJson() {
return {
"ItemID": itemId,
"ItemDescription": itemDescription,
"Route": route,
"Frequency": frequency,
"FrequencyNumber": frequencyNumber,
"DoseDailyQuantity": doseDailyQuantity,
"Days": days,
"StartDate": startDate,
"EndDate": endDate,
"OrderDate": orderDate,
"ProductImageString": productImageString,
"IsReminderOn": isReminderOn,
"SelectedDoseTimes": selectedDoseTimes,
};
}
}

@ -246,6 +246,7 @@ class AuthenticationViewModel extends ChangeNotifier {
} }
Future<void> _handleNewImeiRegistration() async { Future<void> _handleNewImeiRegistration() async {
await selectDeviceImei(onSuccess: (dynamic respData) async { await selectDeviceImei(onSuccess: (dynamic respData) async {
try { try {
if (respData != null) { if (respData != null) {
@ -460,12 +461,6 @@ class AuthenticationViewModel extends ChangeNotifier {
bool isForRegister = (_appState.getUserRegistrationPayload.healthId != null || _appState.getUserRegistrationPayload.patientOutSa == true || _appState.getUserRegistrationPayload.patientOutSa == 1); bool isForRegister = (_appState.getUserRegistrationPayload.healthId != null || _appState.getUserRegistrationPayload.patientOutSa == true || _appState.getUserRegistrationPayload.patientOutSa == 1);
MyAppointmentsViewModel myAppointmentsVM = getIt<MyAppointmentsViewModel>(); MyAppointmentsViewModel myAppointmentsVM = getIt<MyAppointmentsViewModel>();
if (isSwitchUser && _appState.getSuperUserID == null) {
nationalIdController.text = responseID.toString();
}else if( isSwitchUser && _appState.getSuperUserID != null){
nationalIdController.text = _appState.getSuperUserID.toString();
}
final request = RequestUtils.getCommonRequestWelcome( final request = RequestUtils.getCommonRequestWelcome(
phoneNumber: phoneNumberController.text, phoneNumber: phoneNumberController.text,
otpTypeEnum: otpTypeEnum, otpTypeEnum: otpTypeEnum,
@ -571,7 +566,7 @@ class AuthenticationViewModel extends ChangeNotifier {
MedicalFileViewModel medicalVm = getIt<MedicalFileViewModel>(); MedicalFileViewModel medicalVm = getIt<MedicalFileViewModel>();
if (!_appState.getIsChildLoggedIn) { if (!_appState.getIsChildLoggedIn) {
await medicalVm.getFamilyFiles(status: 0); await medicalVm.getFamilyFiles(status: 0);
// await medicalVm.getAllPendingRecordsByResponseId(); await medicalVm.getAllPendingRecordsByResponseId();
_navigationService.replaceAllRoutesAndNavigateToLanding(); _navigationService.replaceAllRoutesAndNavigateToLanding();
} }
} else { } else {
@ -610,7 +605,7 @@ class AuthenticationViewModel extends ChangeNotifier {
MedicalFileViewModel medicalVm = getIt<MedicalFileViewModel>(); MedicalFileViewModel medicalVm = getIt<MedicalFileViewModel>();
insertPatientIMEIData(loginTypeEnum.toInt); insertPatientIMEIData(loginTypeEnum.toInt);
medicalVm.getFamilyFiles(status: 0); //TODO: Remove status: 1 by Aamir Need to Discuss With Sultan medicalVm.getFamilyFiles(status: 0); //TODO: Remove status: 1 by Aamir Need to Discuss With Sultan
// medicalVm.getAllPendingRecordsByResponseId(); medicalVm.getAllPendingRecordsByResponseId();
} }
await clearDefaultInputValues(); await clearDefaultInputValues();
if (isUserAgreedBefore) { if (isUserAgreedBefore) {
@ -766,14 +761,14 @@ class AuthenticationViewModel extends ChangeNotifier {
phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0") phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0")
? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "") ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "")
: _appState.getAuthenticatedUser()!.mobileNumber)!; : _appState.getAuthenticatedUser()!.mobileNumber)!;
nationalIdController.text = _appState.getAuthenticatedUser()!.patientIdentificationNo!; nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!;
onSuccess(); onSuccess();
} else if ((loginTypeEnum == LoginTypeEnum.sms || loginTypeEnum == LoginTypeEnum.whatsapp && _appState.getSelectDeviceByImeiRespModelElement == null) && } else if ((loginTypeEnum == LoginTypeEnum.sms || loginTypeEnum == LoginTypeEnum.whatsapp && _appState.getSelectDeviceByImeiRespModelElement == null) &&
_appState.getAuthenticatedUser() != null) { _appState.getAuthenticatedUser() != null) {
phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0") phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0")
? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "") ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "")
: _appState.getAuthenticatedUser()!.mobileNumber)!; : _appState.getAuthenticatedUser()!.mobileNumber)!;
nationalIdController.text = _appState.getAuthenticatedUser()!.patientIdentificationNo!; nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!;
onSuccess(); onSuccess();
} }
} }

@ -545,20 +545,20 @@ class _OTPVerificationScreenState extends State<OTPVerificationScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 10.h), SizedBox(height: 10.h),
LocaleKeys.otpVerification.tr(context: context).toText24(isBold: true), LocaleKeys.otpVerification.tr().toText24(isBold: true),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Wrap( Wrap(
spacing: 2.h, spacing: 2.h,
runSpacing: 2.h, runSpacing: 2.h,
children: [ children: [
LocaleKeys.weHaveSendOTP.tr(context: context).toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4), LocaleKeys.weHaveSendOTP.tr().toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4),
_getMaskedPhoneNumber().toText15(color: AppColors.inputLabelTextColor, isBold: true), _getMaskedPhoneNumber().toText15(color: AppColors.inputLabelTextColor, isBold: true),
LocaleKeys.via.tr(context: context).toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4), LocaleKeys.via.tr().toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4),
(widget.isFormFamilyFile ? LoginTypeEnum.sms.displayName : authVM.loginTypeEnum.displayName) (widget.isFormFamilyFile ? LoginTypeEnum.sms.displayName : authVM.loginTypeEnum.displayName)
.toText15(color: AppColors.inputLabelTextColor, isBold: true, letterSpacing: -0.4), .toText15(color: AppColors.inputLabelTextColor, isBold: true, letterSpacing: -0.4),
appState.getUserRegistrationPayload.isRegister != null && appState.getUserRegistrationPayload.isRegister == true appState.getUserRegistrationPayload.isRegister != null && appState.getUserRegistrationPayload.isRegister == true
? LocaleKeys.forRegistrationVerification.tr(context: context).toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4) ? LocaleKeys.forRegistrationVerification.tr().toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4)
: LocaleKeys.forLoginVerification.tr(context: context).toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4), : LocaleKeys.forLoginVerification.tr().toText15(color: AppColors.inputLabelTextColor, letterSpacing: -0.4),
], ],
), ),
@ -590,7 +590,7 @@ class _OTPVerificationScreenState extends State<OTPVerificationScreen> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
LocaleKeys.didntReceiveIt.tr(context: context).toText16(color: AppColors.inputLabelTextColor), LocaleKeys.didntReceiveIt.tr().toText16(color: AppColors.inputLabelTextColor),
SizedBox(width: 5.h), SizedBox(width: 5.h),
if (_resendTime > 0) if (_resendTime > 0)
Builder( Builder(
@ -599,7 +599,7 @@ class _OTPVerificationScreenState extends State<OTPVerificationScreen> {
final seconds = (_resendTime % 60).toString().padLeft(2, '0'); final seconds = (_resendTime % 60).toString().padLeft(2, '0');
return Row( return Row(
children: [ children: [
LocaleKeys.resendIn.tr(context: context).toText16(color: AppColors.inputLabelTextColor), LocaleKeys.resendIn.tr().toText16(color: AppColors.inputLabelTextColor),
SizedBox(width: 2.h), SizedBox(width: 2.h),
' ($minutes:$seconds). '.toText16(color: AppColors.inputLabelTextColor) ' ($minutes:$seconds). '.toText16(color: AppColors.inputLabelTextColor)
], ],
@ -609,7 +609,7 @@ class _OTPVerificationScreenState extends State<OTPVerificationScreen> {
else else
GestureDetector( GestureDetector(
onTap: _resendOtp, onTap: _resendOtp,
child: LocaleKeys.resendOTP.tr(context: context).toText16(color: AppColors.primaryRedColor), child: LocaleKeys.resendOTP.tr().toText16(color: AppColors.primaryRedColor),
), ),
], ],
), ),

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -9,7 +8,6 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart'; import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
import 'package:hmg_patient_app_new/features/blood_donation/models/blood_group_hospitals_model.dart'; import 'package:hmg_patient_app_new/features/blood_donation/models/blood_group_hospitals_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors; import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -25,7 +23,14 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.selectHospital.tr(context: context).toText16(weight: FontWeight.w500, color: AppColors.greyTextColor), Text(
"Please select the hospital you want to make an appointment.".needTranslation,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
),
SizedBox(height: 16.h), SizedBox(height: 16.h),
SizedBox( SizedBox(
height: MediaQuery.sizeOf(context).height * .4, height: MediaQuery.sizeOf(context).height * .4,

@ -53,9 +53,6 @@ class BookAppointmentsViewModel extends ChangeNotifier {
int? calculationID = 0; int? calculationID = 0;
bool isSortByClinic = true; bool isSortByClinic = true;
// Accordion expansion state
int? expandedGroupIndex;
int initialSlotDuration = 0; int initialSlotDuration = 0;
bool isNearestAppointmentSelected = false; bool isNearestAppointmentSelected = false;
@ -161,65 +158,13 @@ class BookAppointmentsViewModel extends ChangeNotifier {
bool isBodyPartsLoading = false; bool isBodyPartsLoading = false;
int duration = 0; int duration = 0;
setIsSortByClinic(bool value) { setIsSortByClinic(bool value) {
isSortByClinic = value; isSortByClinic = value;
doctorsListGrouped = isSortByClinic ? doctorsListByClinic : doctorsListByHospital; doctorsListGrouped = isSortByClinic ? doctorsListByClinic : doctorsListByHospital;
notifyListeners(); notifyListeners();
} }
// Toggle accordion expansion
void toggleGroupExpansion(int index) {
if (expandedGroupIndex == index) {
expandedGroupIndex = null;
} else {
expandedGroupIndex = index;
}
notifyListeners();
}
// Reset accordion expansion
void resetGroupExpansion() {
expandedGroupIndex = null;
notifyListeners();
}
// Sort filtered doctor list by clinic or hospital
void sortFilteredDoctorList(bool sortByClinic) {
isSortByClinic = sortByClinic;
if (sortByClinic) {
// Sort by clinic name
filteredDoctorList.sort((a, b) {
final clinicA = (a.clinicName ?? 'Unknown').toLowerCase();
final clinicB = (b.clinicName ?? 'Unknown').toLowerCase();
return clinicA.compareTo(clinicB);
});
} else {
// Sort by hospital/project name
filteredDoctorList.sort((a, b) {
final hospitalA = (a.projectName ?? 'Unknown').toLowerCase();
final hospitalB = (b.projectName ?? 'Unknown').toLowerCase();
return hospitalA.compareTo(hospitalB);
});
}
notifyListeners();
}
// Group filtered doctors list for accordion display
List<List<DoctorsListResponseModel>> getGroupedFilteredDoctorsList() {
final clinicMap = <String, List<DoctorsListResponseModel>>{};
final hospitalMap = <String, List<DoctorsListResponseModel>>{};
for (var doctor in filteredDoctorList) {
final clinicKey = (doctor.clinicName ?? 'Unknown').trim();
clinicMap.putIfAbsent(clinicKey, () => []).add(doctor);
final hospitalKey = (doctor.projectName ?? 'Unknown').trim();
hospitalMap.putIfAbsent(hospitalKey, () => []).add(doctor);
}
return isSortByClinic ? clinicMap.values.toList() : hospitalMap.values.toList();
}
// Group doctors by clinic and hospital // Group doctors by clinic and hospital
void _groupDoctorsList() { void _groupDoctorsList() {
final clinicMap = <String, List<DoctorsListResponseModel>>{}; final clinicMap = <String, List<DoctorsListResponseModel>>{};
@ -271,7 +216,6 @@ class BookAppointmentsViewModel extends ChangeNotifier {
isDoctorProfileLoading = true; isDoctorProfileLoading = true;
isLiveCareSchedule = false; isLiveCareSchedule = false;
currentlySelectedHospitalFromRegionFlow = null; currentlySelectedHospitalFromRegionFlow = null;
expandedGroupIndex = null; // Reset accordion state
clinicsList.clear(); clinicsList.clear();
doctorsList.clear(); doctorsList.clear();
liveCareClinicsList.clear(); liveCareClinicsList.clear();
@ -289,24 +233,9 @@ class BookAppointmentsViewModel extends ChangeNotifier {
this.isNearestAppointmentSelected = isNearestAppointmentSelected; this.isNearestAppointmentSelected = isNearestAppointmentSelected;
if (isNearestAppointmentSelected) { if (isNearestAppointmentSelected) {
for (var group in doctorsListGrouped) { doctorsList.sort((a, b) => DateUtil.convertStringToDate(a.nearestFreeSlot!).compareTo(DateUtil.convertStringToDate(b.nearestFreeSlot!)));
group.sort((a, b) {
var aSlot = a.nearestFreeSlot;
var bSlot = b.nearestFreeSlot;
if (aSlot == null || bSlot == null) return 0;
return DateUtil.convertStringToDate(aSlot).compareTo(DateUtil.convertStringToDate(bSlot));
});
}
} else { } else {
for (var group in doctorsListGrouped) { doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!));
group.sort((a, b) {
var aSlot = a.decimalDoctorRate;
var bSlot = b.decimalDoctorRate;
if (aSlot == null || bSlot == null) return 0;
return bSlot.compareTo(aSlot);
});
}
// doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!));
} }
notifyListeners(); notifyListeners();
@ -473,7 +402,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError!(LocaleKeys.noDoctorFound.tr()); onError!("No doctors found for the search criteria".needTranslation);
}, },
(apiResponse) { (apiResponse) {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
@ -501,7 +430,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
isDoctorsListLoading = false; isDoctorsListLoading = false;
if (onError != null) onError(LocaleKeys.noDoctorFound.tr()); if (onError != null) onError("No doctors found for the search criteria".needTranslation);
notifyListeners(); notifyListeners();
}, },
@ -533,7 +462,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
isDoctorsListLoading = false; isDoctorsListLoading = false;
if (onError != null) onError(LocaleKeys.noDoctorFound.tr()); if (onError != null) onError("No doctors found for the search criteria".needTranslation);
notifyListeners(); notifyListeners();
}, },
@ -569,7 +498,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError?.call(LocaleKeys.noDoctorFound.tr()); onError?.call("No doctors found for the search criteria".needTranslation);
}, },
(apiResponse) async { (apiResponse) async {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
@ -784,7 +713,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
); );
showCommonBottomSheet(navigationService.navigatorKey.currentContext!, showCommonBottomSheet(navigationService.navigatorKey.currentContext!,
child: Utils.getLoadingWidget(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr()), child: Utils.getLoadingWidget(loadingText: "Cancelling your previous appointment....".needTranslation),
callBackFunc: (str) {}, callBackFunc: (str) {},
title: "", title: "",
height: ResponsiveExtension.screenHeight * 0.3, height: ResponsiveExtension.screenHeight * 0.3,
@ -794,7 +723,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async { await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
navigationService.pop(); navigationService.pop();
Future.delayed(Duration(milliseconds: 50)).then((value) async {}); Future.delayed(Duration(milliseconds: 50)).then((value) async {});
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr()); LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
await insertSpecificAppointment( await insertSpecificAppointment(
onError: (err) {}, onError: (err) {},
onSuccess: (apiResp) async { onSuccess: (apiResp) async {
@ -880,7 +809,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
); );
showCommonBottomSheet(navigationService.navigatorKey.currentContext!, showCommonBottomSheet(navigationService.navigatorKey.currentContext!,
child: Utils.getLoadingWidget(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr()), child: Utils.getLoadingWidget(loadingText: "Cancelling your previous appointment....".needTranslation),
callBackFunc: (str) {}, callBackFunc: (str) {},
title: "", title: "",
height: ResponsiveExtension.screenHeight * 0.3, height: ResponsiveExtension.screenHeight * 0.3,
@ -890,7 +819,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async { await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
navigationService.pop(); navigationService.pop();
Future.delayed(Duration(milliseconds: 50)).then((value) async {}); Future.delayed(Duration(milliseconds: 50)).then((value) async {});
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr()); LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
await insertSpecificAppointment( await insertSpecificAppointment(
onError: (err) {}, onError: (err) {},
onSuccess: (apiResp) async { onSuccess: (apiResp) async {
@ -1204,7 +1133,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError!(LocaleKeys.noDoctorFound.tr()); onError!("No doctors found for the search criteria...".needTranslation);
}, },
(apiResponse) { (apiResponse) {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
@ -1291,18 +1220,18 @@ class BookAppointmentsViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} else { } else {
// if (this.duration == 90) { if (this.duration == 90) {
// dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
// message: "Duration can not exceed 90 min".needTranslation, message: "Duration can not exceed 90 min".needTranslation,
// ); );
// return; return;
// } }
selectedBodyPartList.add(part); selectedBodyPartList.add(part);
var duration = getDuration(); var duration = getDuration();
if (duration > 90) { if (duration > 90) {
selectedBodyPartList.remove(part); selectedBodyPartList.remove(part);
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.durationCannotExceed90.tr(), message: "Duration Exceeds 90 min".needTranslation,
); );
return; return;
} }
@ -1336,7 +1265,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError!("Invalid verification point scanned."); onError!("Invalid verification point scanned.".needTranslation);
}, },
(apiResponse) { (apiResponse) {
// if (apiResponse.data['returnValue'] == 0) { // if (apiResponse.data['returnValue'] == 0) {
@ -1410,7 +1339,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
); );
} else if (apiResponse.messageStatus == 1) { } else if (apiResponse.messageStatus == 1) {
if (apiResponse.data == null || apiResponse.data!.isEmpty) { if (apiResponse.data == null || apiResponse.data!.isEmpty) {
onError!(LocaleKeys.unexpectedError.tr()); onError!("Unexpected Error Occurred".needTranslation);
return; return;
} }
notifyListeners(); notifyListeners();

@ -14,8 +14,6 @@ abstract class ContactUsRepo {
Future<Either<Failure, GenericApiModel<List<GetPatientICProjectsModel>>>> getLiveChatProjectsList(); Future<Either<Failure, GenericApiModel<List<GetPatientICProjectsModel>>>> getLiveChatProjectsList();
Future<Either<Failure, GenericApiModel<String>>> getChatRequestID({required String name, required String mobileNo, required String workGroup});
Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment}); Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment});
} }
@ -99,45 +97,6 @@ class ContactUsRepoImp implements ContactUsRepo {
} }
} }
@override
Future<Either<Failure, GenericApiModel<String>>> getChatRequestID({required String name, required String mobileNo, required String workGroup}) async {
Map<String, dynamic> body = {};
body['Name'] = name;
body['MobileNo'] = mobileNo;
body['WorkGroup'] = workGroup;
try {
GenericApiModel<String>? apiResponse;
Failure? failure;
await apiClient.post(
GET_LIVECHAT_REQUEST_ID,
body: body,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final requestId = response['RequestId'] as String;
apiResponse = GenericApiModel<String>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: requestId,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
@override @override
Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment}) async { Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment}) async {
final Map<String, dynamic> body = requestInsertCOCItem.toJson(); final Map<String, dynamic> body = requestInsertCOCItem.toJson();

@ -29,8 +29,6 @@ class ContactUsViewModel extends ChangeNotifier {
int selectedLiveChatProjectIndex = -1; int selectedLiveChatProjectIndex = -1;
String? chatRequestID;
List<String> feedbackAttachmentList = []; List<String> feedbackAttachmentList = [];
PatientAppointmentHistoryResponseModel? patientFeedbackSelectedAppointment; PatientAppointmentHistoryResponseModel? patientFeedbackSelectedAppointment;
@ -155,32 +153,6 @@ class ContactUsViewModel extends ChangeNotifier {
); );
} }
Future<void> getChatRequestID({required String name, required String mobileNo, required String workGroup, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await contactUsRepo.getChatRequestID(name: name, mobileNo: mobileNo, workGroup: workGroup);
result.fold(
(failure) async {
await errorHandlerService.handleError(failure: failure);
if (onError != null) {
onError(failure.toString());
}
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
if (onError != null) {
onError(apiResponse.errorMessage ?? 'Unknown error');
}
} else if (apiResponse.messageStatus == 1) {
chatRequestID = apiResponse.data;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
Future<void> insertCOCItem({required String subject, required String message, Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> insertCOCItem({required String subject, required String message, Function(dynamic)? onSuccess, Function(String)? onError}) async {
RequestInsertCOCItem requestInsertCOCItem = RequestInsertCOCItem(); RequestInsertCOCItem requestInsertCOCItem = RequestInsertCOCItem();
requestInsertCOCItem.attachment = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first : ""; requestInsertCOCItem.attachment = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first : "";

@ -1,6 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart' as GMSMapServices; import 'package:google_maps_flutter/google_maps_flutter.dart' as GMSMapServices;
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -33,7 +32,6 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/facility_sel
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/terms_and_condition.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/terms_and_condition.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/call_ambulance_page.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/call_ambulance_page.dart';
@ -154,7 +152,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
print("the app state is ${appState.isAuthenticated}"); print("the app state is ${appState.isAuthenticated}");
if (!appState.isAuthenticated) { if (!appState.isAuthenticated) {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.loginToUseService.tr(), message: "You Need To Login First To Continue".needTranslation,
onOkPressed: () { onOkPressed: () {
navServices.pop(); navServices.pop();
getIt<AuthenticationViewModel>().onLoginPressed(); getIt<AuthenticationViewModel>().onLoginPressed();
@ -198,6 +196,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
} }
void filterErList(String query) { void filterErList(String query) {
print("the query is $query");
if (query.isEmpty) { if (query.isEmpty) {
nearestERFilteredList = nearestERList; nearestERFilteredList = nearestERList;
} else { } else {
@ -278,6 +277,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
flushData(); flushData();
selectedFacility = FacilitySelection.ALL; selectedFacility = FacilitySelection.ALL;
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
locationUtils!.getLocation( locationUtils!.getLocation(
isShowConfirmDialog: true, isShowConfirmDialog: true,
@ -289,7 +289,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}); });
} else { } else {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.loginToUseService.tr(), message: "You Need To Login First To Continue".needTranslation,
onOkPressed: () { onOkPressed: () {
navServices.pop(); navServices.pop();
navServices.pushAndReplace(AppRoutes.loginScreen); navServices.pushAndReplace(AppRoutes.loginScreen);
@ -311,7 +311,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
void updateBottomSheetState(BottomSheetType sheetType) { void updateBottomSheetState(BottomSheetType sheetType) {
if (sheetType == BottomSheetType.EXPANDED && selectedHospital == null) { if (sheetType == BottomSheetType.EXPANDED && selectedHospital == null) {
dialogService.showErrorBottomSheet(message: LocaleKeys.selectHospital.tr()); dialogService.showErrorBottomSheet(message: "Kindly Select Hospital".needTranslation);
return; return;
} }
bottomSheetType = sheetType; bottomSheetType = sheetType;
@ -481,18 +481,21 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> getTransportationOption() async { Future<void> getTransportationOption() async {
//handle the cache if the data is present then dont fetch it in the authenticated lifecycle //handle the cache if the data is present then dont fetch it in the authenticated lifecycle
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated == false) { if (appState.isAuthenticated == false) {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.loginToUseService.tr(), message: "You Need To Login First To Continue".needTranslation,
onOkPressed: () { onOkPressed: () {
navServices.pop(); navServices.pop();
print("inside the ok button");
getIt<AuthenticationViewModel>().onLoginPressed(); getIt<AuthenticationViewModel>().onLoginPressed();
}); });
return; return;
} }
int? id = appState.getAuthenticatedUser()?.patientId; int? id = appState.getAuthenticatedUser()?.patientId;
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.gettingAmbulanceTransportOption.tr()); LoaderBottomSheet.showLoader(loadingText: "Getting Ambulance Transport Option".needTranslation);
notifyListeners(); notifyListeners();
var response = await emergencyServicesRepo.getTransportationMethods(id: id); var response = await emergencyServicesRepo.getTransportationMethods(id: id);
@ -511,7 +514,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> getTransportationMethods() async { Future<void> getTransportationMethods() async {
int? id = appState.getAuthenticatedUser()?.patientId; int? id = appState.getAuthenticatedUser()?.patientId;
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.gettingAmbulanceTransportOption.tr()); LoaderBottomSheet.showLoader(loadingText: "Getting Ambulance Transport Option".needTranslation);
notifyListeners(); notifyListeners();
var response = await emergencyServicesRepo.getTransportationMethods(id: id); var response = await emergencyServicesRepo.getTransportationMethods(id: id);
@ -700,7 +703,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
} }
Future<void> getAppointments() async { Future<void> getAppointments() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointment.tr()); LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment".needTranslation);
var result = await appointmentRepo.getPatientAppointments(isActiveAppointment: true, isArrivedAppointments: false); var result = await appointmentRepo.getPatientAppointments(isActiveAppointment: true, isArrivedAppointments: false);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
@ -857,10 +860,10 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> cancelOrder(AmbulanceRequestOrdersModel? order, {bool shouldPop = false}) async { Future<void> cancelOrder(AmbulanceRequestOrdersModel? order, {bool shouldPop = false}) async {
dialogService.showCommonBottomSheetWithoutH( dialogService.showCommonBottomSheetWithoutH(
message: LocaleKeys.doYouWantToCancelTheRequest.tr(), message: "Do you want to cancel the request".needTranslation,
onOkPressed: () async { onOkPressed: () async {
navServices.pop(); navServices.pop();
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingRequest.tr()); LoaderBottomSheet.showLoader(loadingText: "Cancelling request".needTranslation);
var response = await emergencyServicesRepo.cancelOrder(order?.iD, appState.getAuthenticatedUser()?.patientId ?? 0); var response = await emergencyServicesRepo.cancelOrder(order?.iD, appState.getAuthenticatedUser()?.patientId ?? 0);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) { response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
@ -965,10 +968,10 @@ class EmergencyServicesViewModel extends ChangeNotifier {
FutureOr<void> cancelRRTOrder(int? orderID, {bool shouldPop = false}) async { FutureOr<void> cancelRRTOrder(int? orderID, {bool shouldPop = false}) async {
dialogService.showCommonBottomSheetWithoutH( dialogService.showCommonBottomSheetWithoutH(
message: LocaleKeys.doYouWantToCancelTheRequest.tr(), message: "Do you want to cancel the request".needTranslation,
onOkPressed: () async { onOkPressed: () async {
navServices.pop(); navServices.pop();
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingRequest.tr()); LoaderBottomSheet.showLoader(loadingText: "Cancelling request".needTranslation);
var response = await emergencyServicesRepo.cancelRRTOrder(orderID); var response = await emergencyServicesRepo.cancelRRTOrder(orderID);
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) { response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
@ -998,10 +1001,11 @@ class EmergencyServicesViewModel extends ChangeNotifier {
} }
void openRRT() { void openRRT() {
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
if (agreedToTermsAndCondition == false) { if (agreedToTermsAndCondition == false) {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.pleaseAcceptTermsConditions.tr(), message: "You Need To Agree To Terms And Conditions".needTranslation,
onOkPressed: () { onOkPressed: () {
if (navServices.context == null) return; if (navServices.context == null) return;
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -1038,9 +1042,9 @@ class EmergencyServicesViewModel extends ChangeNotifier {
bool result = await navServices.push( bool result = await navServices.push(
CustomPageRoute( CustomPageRoute(
page: MapUtilityScreen( page: MapUtilityScreen(
confirmButtonString: LocaleKeys.submitRequest.tr(), confirmButtonString: "Submit Request".needTranslation,
titleString: LocaleKeys.selectLocation.tr(), titleString: "Select Location".needTranslation,
subTitleString: LocaleKeys.pleaseSelectTheLocation.tr(), subTitleString: "Please select the location".needTranslation,
isGmsAvailable: appState.isGMSAvailable, isGmsAvailable: appState.isGMSAvailable,
), ),
direction: AxisDirection.down), direction: AxisDirection.down),
@ -1055,7 +1059,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}); });
} else { } else {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: LocaleKeys.loginToUseService.tr(), message: "You Need To Login First To Continue".needTranslation,
onOkPressed: () { onOkPressed: () {
navServices.pop(); navServices.pop();
getIt<AuthenticationViewModel>().onLoginPressed(); getIt<AuthenticationViewModel>().onLoginPressed();
@ -1068,11 +1072,12 @@ class EmergencyServicesViewModel extends ChangeNotifier {
} }
FutureOr<void> getTermsAndConditions() async { FutureOr<void> getTermsAndConditions() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingTermsAndConditions.tr()); LoaderBottomSheet.showLoader(loadingText: "Fetching Terms And Conditions".needTranslation);
var response = await emergencyServicesRepo.getTermsAndCondition(); var response = await emergencyServicesRepo.getTermsAndCondition();
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) { response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
termsAndConditions = success.data; termsAndConditions = success.data;
print("the response terms are $termsAndConditions");
notifyListeners(); notifyListeners();
navServices.push( navServices.push(
CustomPageRoute(page: TermsAndCondition(termsAndCondition: success.data ?? ""), direction: AxisDirection.down), CustomPageRoute(page: TermsAndCondition(termsAndCondition: success.data ?? ""), direction: AxisDirection.down),

@ -940,16 +940,7 @@ class HmgServicesRepoImp implements HmgServicesRepo {
for (var vitalSignJson in vitalSignsList) { for (var vitalSignJson in vitalSignsList) {
if (vitalSignJson is Map<String, dynamic>) { if (vitalSignJson is Map<String, dynamic>) {
final vitalSign = VitalSignResModel.fromJson(vitalSignJson); vitalSignList.add(VitalSignResModel.fromJson(vitalSignJson));
// Only add records where BOTH height AND weight are greater than 0
final hasValidWeight = _isValidValue(vitalSign.weightKg);
final hasValidHeight = _isValidValue(vitalSign.heightCm);
// Only add if both height and weight are valid (> 0)
if (hasValidWeight && hasValidHeight) {
vitalSignList.add(vitalSign);
}
} }
} }
} }
@ -976,22 +967,5 @@ class HmgServicesRepoImp implements HmgServicesRepo {
} }
} }
/// Helper method to check if a value is valid (greater than 0)
bool _isValidValue(dynamic value) {
if (value == null) return false;
if (value is num) {
return value > 0;
}
if (value is String) {
if (value.trim().isEmpty) return false;
final parsed = double.tryParse(value);
return parsed != null && parsed > 0;
}
return false;
}
} }

@ -40,8 +40,6 @@ class HmgServicesViewModel extends ChangeNotifier {
bool isHospitalListLoading = false; bool isHospitalListLoading = false;
bool isVitalSignLoading = false; bool isVitalSignLoading = false;
bool hasVitalSignDataLoaded = false;
// HHC specific loading states // HHC specific loading states
bool isHhcOrdersLoading = false; bool isHhcOrdersLoading = false;
bool isHhcServicesLoading = false; bool isHhcServicesLoading = false;
@ -880,7 +878,6 @@ class HmgServicesViewModel extends ChangeNotifier {
Function(dynamic)? onSuccess, Function(dynamic)? onSuccess,
Function(String)? onError, Function(String)? onError,
}) async { }) async {
if (hasVitalSignDataLoaded) return;
isVitalSignLoading = true; isVitalSignLoading = true;
notifyListeners(); notifyListeners();
@ -899,7 +896,6 @@ class HmgServicesViewModel extends ChangeNotifier {
isVitalSignLoading = false; isVitalSignLoading = false;
if (apiResponse.messageStatus == 1) { if (apiResponse.messageStatus == 1) {
vitalSignList = apiResponse.data ?? []; vitalSignList = apiResponse.data ?? [];
hasVitalSignDataLoaded = true;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);

@ -8,10 +8,8 @@ class HmgServicesComponentModel {
Color? iconColor; Color? iconColor;
bool isLogin; bool isLogin;
bool isLocked; bool isLocked;
Color textColor;
Color bgColor; Color bgColor;
String? route; String? route;
bool isExternalLink;
Function? onTap; Function? onTap;
HmgServicesComponentModel( HmgServicesComponentModel(
@ -25,8 +23,6 @@ class HmgServicesComponentModel {
this.bgColor = Colors.white, this.bgColor = Colors.white,
this.iconColor = Colors.white, this.iconColor = Colors.white,
this.route, this.route,
this.onTap, this.onTap
this.textColor = Colors.black,
this.isExternalLink = false,
}); });
} }

@ -1,7 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/location_util.dart';
import 'package:hmg_patient_app_new/core/utils/penguin_method_channel.dart'; import 'package:hmg_patient_app_new/core/utils/penguin_method_channel.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/hospital/AppPermission.dart'; import 'package:hmg_patient_app_new/features/hospital/AppPermission.dart';
@ -19,32 +17,20 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier {
int hmgCount = 0; int hmgCount = 0;
TextEditingController searchController = TextEditingController(); TextEditingController searchController = TextEditingController();
final AppState appState; final AppState appState;
LocationUtils locationUtils = getIt.get<LocationUtils>();
HospitalSelectionBottomSheetViewModel(this.appState) { HospitalSelectionBottomSheetViewModel(this.appState) {
locationUtils.getCurrentLocation(onSuccess: (value) { Utils.navigationProjectsList.forEach((element) {
Utils.navigationProjectsList.forEach((element) { HospitalsModel model = HospitalsModel.fromJson(element);
HospitalsModel model = HospitalsModel.fromJson(element); if (model.isHMC == true) {
hmcHospitalList.add(model);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(model.latitude!), double.parse(model.longitude!)).ceilToDouble(); } else {
print(dist); hmgHospitalList.add(model);
model.distanceInKilometers = dist; }
listOfData.add(model);
if (model.isHMC == true) {
hmcHospitalList.add(model);
} else {
hmgHospitalList.add(model);
}
listOfData.add(model);
});
hmgCount = hmgHospitalList.length;
hmcCount = hmcHospitalList.length;
listOfData.sort((a, b) => a.distanceInKilometers.compareTo(b.distanceInKilometers));
hmgHospitalList.sort((a, b) => a.distanceInKilometers.compareTo(b.distanceInKilometers));
getDisplayList();
}); });
hmgCount = hmgHospitalList.length;
hmcCount = hmcHospitalList.length;
getDisplayList();
} }
getDisplayList() { getDisplayList() {
@ -93,14 +79,13 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier {
} }
void openPenguin(HospitalsModel hospital, {String clinicID = ""}) { void openPenguin(HospitalsModel hospital) {
initPenguinSDK(hospital.iD, clinicID: clinicID); initPenguinSDK(hospital.iD);
} }
initPenguinSDK(int projectID, {String clinicID = ""}) async { initPenguinSDK(int projectID) async {
NavigationClinicDetails data = NavigationClinicDetails(); NavigationClinicDetails data = NavigationClinicDetails();
data.projectId = projectID.toString(); data.projectId = projectID.toString();
data.clinicId = clinicID;
final bool permited = await AppPermission.askPenguinPermissions(); final bool permited = await AppPermission.askPenguinPermissions();
if (!permited) { if (!permited) {
Map<Permission, PermissionStatus> statuses = await [ Map<Permission, PermissionStatus> statuses = await [

@ -45,7 +45,9 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
initImmediateLiveCare() { initImmediateLiveCare() {
_appState = getIt<AppState>(); _appState = getIt<AppState>();
immediateLiveCareClinicsList = []; immediateLiveCareClinicsList = [];
patientLiveCareHistoryList = [];
isImmediateLiveCareClinicsLoading = true; isImmediateLiveCareClinicsLoading = true;
patientHasPendingLiveCareRequest = false;
liveCareSelectedCallType = 0; // 1- Video, 2- Audio, 3- Phone liveCareSelectedCallType = 0; // 1- Video, 2- Audio, 3- Phone
immediateLiveCareSelectedClinic = GetLiveCareClinicListResponseModel(); immediateLiveCareSelectedClinic = GetLiveCareClinicListResponseModel();
liveCareImmediateAppointmentFeesList = LiveCareImmediateAppointmentFeesList(); liveCareImmediateAppointmentFeesList = LiveCareImmediateAppointmentFeesList();
@ -134,10 +136,6 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
} }
Future<void> getPatientLiveCareHistory({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientLiveCareHistory({Function(dynamic)? onSuccess, Function(String)? onError}) async {
patientLiveCareHistoryList = [];
patientHasPendingLiveCareRequest = false;
notifyListeners();
final result = await immediateLiveCareRepo.getPatientLiveCareHistory(); final result = await immediateLiveCareRepo.getPatientLiveCareHistory();
result.fold( result.fold(

@ -1,96 +0,0 @@
import 'package:dartz/dartz.dart';
import '../../core/api/api_client.dart';
import '../../core/api_consts.dart';
import '../../core/common_models/generic_api_model.dart';
import '../../core/exceptions/api_failure.dart';
import '../../services/logger_service.dart';
abstract class MonthlyReportsRepo {
Future<Either<Failure, GenericApiModel<dynamic>>> saveMonthlyReport({
String? email,
});
}
class MonthlyReportsRepoImp implements MonthlyReportsRepo {
final ApiClient apiClient;
final LoggerService loggerService;
MonthlyReportsRepoImp({
required this.loggerService,
required this.apiClient,
});
@override
Future<Either<Failure, GenericApiModel<dynamic>>> saveMonthlyReport({
String? email,
}) async {
try {
Failure? failure;
GenericApiModel<dynamic>? reportApiResponse;
await apiClient.post(
ApiConsts.getMonthlyReports,
body: <String, dynamic>{},
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
reportApiResponse = GenericApiModel<dynamic>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: response,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (reportApiResponse == null) return Left(ServerFailure("Unknown error"));
if ((reportApiResponse!.messageStatus ?? 0) != 1) {
return Right(reportApiResponse!);
}
GenericApiModel<dynamic>? emailApiResponse;
final Map<String, dynamic> emailRequest = <String, dynamic>{};
if (email != null && email.trim().isNotEmpty) {
emailRequest["Email"] = email.trim();
}
await apiClient.post(
ApiConsts.updatePatientEmail,
body: emailRequest,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
emailApiResponse = GenericApiModel<dynamic>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: response,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (emailApiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(emailApiResponse!);
} catch (e) {
loggerService.logError("MonthlyReportsRepo.saveMonthlyReport error: $e");
return Left(UnknownFailure(e.toString()));
}
}
}

@ -1,33 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'monthly_reports_repo.dart';
class MonthlyReportsViewModel extends ChangeNotifier {
final MonthlyReportsRepo monthlyReportsRepo;
final ErrorHandlerService errorHandlerService;
bool isLoading = false;
MonthlyReportsViewModel({
required this.monthlyReportsRepo,
required this.errorHandlerService,
});
Future<bool> saveMonthlyReport({String? email}) async {
isLoading = true;
notifyListeners();
final result = await monthlyReportsRepo.saveMonthlyReport(email: email);
final success = result.fold(
(failure) {
errorHandlerService.handleError(failure: failure);
return false;
},
(apiResponse) => (apiResponse.messageStatus ?? 0) == 1,
);
isLoading = false;
notifyListeners();
return success;
}
}

@ -1,60 +0,0 @@
import 'package:dartz/dartz.dart';
import '../../core/api/api_client.dart';
import '../../core/api_consts.dart';
import '../../core/exceptions/api_failure.dart';
import '../../services/logger_service.dart';
abstract class TermsConditionsRepo {
Future<Either<Failure, String>> getTermsConditions();
}
class TermsConditionsRepoImp implements TermsConditionsRepo {
final ApiClient apiClient;
final LoggerService loggerService;
TermsConditionsRepoImp({
required this.loggerService,
required this.apiClient,
});
@override
Future<Either<Failure, String>> getTermsConditions() async {
Failure? failure;
String? html;
try {
await apiClient.post(
ApiConsts.getTermsConditions,
body: <String, dynamic>{},
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType ?? ServerFailure(error.toString());
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final content = response['UserAgreementContent'];
if (content is String && content.isNotEmpty) {
html = content;
} else {
failure = DataParsingFailure(
'UserAgreementContent is null or not String');
}
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
} catch (e) {
failure = UnknownFailure(e.toString());
}
if (failure != null) return Left(failure!);
if (html == null || html!.isEmpty) {
return Left(ServerFailure('No terms and conditions returned'));
}
return Right(html!);
}
}

@ -1,45 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/features/monthly_reports/terms_conditions_repo.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
class TermsConditionsViewModel extends ChangeNotifier {
final TermsConditionsRepo termsConditionsRepo;
final ErrorHandlerService errorHandlerService;
String? termsConditionsHtml;
bool isLoading = false;
TermsConditionsViewModel({
required this.termsConditionsRepo,
required this.errorHandlerService,
});
Future<void> getTermsConditions({
Function()? onSuccess,
Function(String)? onError,
}) async {
isLoading = true;
notifyListeners();
final result = await termsConditionsRepo.getTermsConditions();
result.fold(
(failure) async {
await errorHandlerService.handleError(failure: failure);
isLoading = false;
notifyListeners();
if (onError != null) {
onError(failure.message ?? 'Something went wrong');
}
},
(html) {
termsConditionsHtml = html;
isLoading = false;
notifyListeners();
if (onSuccess != null) onSuccess();
},
);
}
}

@ -220,7 +220,6 @@ class MyAppointmentsViewModel extends ChangeNotifier {
} }
Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
isPatientHasQueueAppointment = false;
if (!isAppointmentDataToBeLoaded) return; if (!isAppointmentDataToBeLoaded) return;
filteredAppointmentList.clear(); filteredAppointmentList.clear();
@ -282,9 +281,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
} }
} }
debugPrint('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}'); print('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}');
debugPrint('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}'); print('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}');
debugPrint('All Appointments: ${patientAppointmentsHistoryList.length}'); print('All Appointments: ${patientAppointmentsHistoryList.length}');
getFiltersForSelectedAppointmentList(filteredAppointmentList); getFiltersForSelectedAppointmentList(filteredAppointmentList);
notifyListeners(); notifyListeners();
} }
@ -727,8 +726,6 @@ class MyAppointmentsViewModel extends ChangeNotifier {
} }
Future<void> getPatientAppointmentQueueDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientAppointmentQueueDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async {
//TODO: Discuss With Haroon, Is the User Has no data it return No Element Bad State;
isPatientHasQueueAppointment = false;
isAppointmentQueueDetailsLoading = true; isAppointmentQueueDetailsLoading = true;
notifyListeners(); notifyListeners();
final result = await myAppointmentsRepo.getPatientAppointmentQueueDetails( final result = await myAppointmentsRepo.getPatientAppointmentQueueDetails(

@ -84,7 +84,7 @@ class AppointmentType {
static String getNextActionText(nextAction) { static String getNextActionText(nextAction) {
switch (nextAction) { switch (nextAction) {
case 0: case 0:
return LocaleKeys.upcomingNoAction.tr(); return "No Action".needTranslation;
case 10: case 10:
return LocaleKeys.confirm.tr(); return LocaleKeys.confirm.tr();
case 15: case 15:
@ -96,7 +96,7 @@ class AppointmentType {
case 90: case 90:
return LocaleKeys.checkinOption.tr(); return LocaleKeys.checkinOption.tr();
default: default:
return LocaleKeys.upcomingNoAction.tr(); return "No Action".needTranslation;
} }
} }

@ -1,96 +0,0 @@
class NotificationResponseModel {
int? id;
int? recordId;
int? patientID;
bool? projectOutSA;
String? deviceType;
String? deviceToken;
String? message;
String? messageType;
String? messageTypeData;
String? videoURL;
bool? isQueue;
String? isQueueOn;
String? createdOn;
dynamic createdBy;
String? notificationType;
bool? isSent;
String? isSentOn;
bool? isRead;
dynamic isReadOn;
int? channelID;
int? projectID;
NotificationResponseModel(
{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});
NotificationResponseModel.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;
}
}

@ -1,78 +0,0 @@
import 'package:dartz/dartz.dart';
import 'package:hmg_patient_app_new/core/api/api_client.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart';
import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class NotificationsRepo {
Future<Either<Failure, GenericApiModel<List<NotificationResponseModel>>>> getAllNotifications({
required int notificationStatusID,
required int pagingSize,
required int currentPage,
});
}
class NotificationsRepoImp implements NotificationsRepo {
final ApiClient apiClient;
final LoggerService loggerService;
NotificationsRepoImp({required this.loggerService, required this.apiClient});
@override
Future<Either<Failure, GenericApiModel<List<NotificationResponseModel>>>> getAllNotifications({
required int notificationStatusID,
required int pagingSize,
required int currentPage,
}) async {
Map<String, dynamic> mapDevice = {
"NotificationStatusID": notificationStatusID,
"pagingSize": pagingSize,
"currentPage": currentPage,
};
try {
GenericApiModel<List<NotificationResponseModel>>? apiResponse;
Failure? failure;
await apiClient.post(
GET_ALL_NOTIFICATIONS,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final list = response['List_GetAllNotificationsFromPool'];
if (list == null || list.isEmpty) {
// Return empty list if no notifications
apiResponse = GenericApiModel<List<NotificationResponseModel>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: [],
);
return;
}
final notifications = list.map((item) => NotificationResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<NotificationResponseModel>();
apiResponse = GenericApiModel<List<NotificationResponseModel>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: notifications,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -1,113 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart';
import 'package:hmg_patient_app_new/features/notifications/notifications_repo.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
class NotificationsViewModel extends ChangeNotifier {
bool isNotificationsLoading = false;
bool hasMoreNotifications = true;
NotificationsRepo notificationsRepo;
ErrorHandlerService errorHandlerService;
List<NotificationResponseModel> notificationsList = [];
int currentPage = 0;
int pagingSize = 14;
int notificationStatusID = 2; // Default to status 2 (e.g., unread)
NotificationsViewModel({
required this.notificationsRepo,
required this.errorHandlerService,
});
initNotificationsViewModel({int? statusID}) {
notificationsList.clear();
currentPage = 0;
hasMoreNotifications = true;
isNotificationsLoading = true;
// if (statusID != null) {
// notificationStatusID = statusID;
// }
// getAllNotifications();
notifyListeners();
}
setNotificationStatusID(int statusID) {
notificationStatusID = statusID;
notificationsList.clear();
currentPage = 0;
hasMoreNotifications = true;
notifyListeners();
}
Future<void> getAllNotifications({
Function(dynamic)? onSuccess,
Function(String)? onError,
}) async {
isNotificationsLoading = true;
notifyListeners();
final result = await notificationsRepo.getAllNotifications(
notificationStatusID: notificationStatusID,
pagingSize: pagingSize,
currentPage: currentPage,
);
result.fold(
(failure) async {
isNotificationsLoading = false;
notifyListeners();
await errorHandlerService.handleError(failure: failure);
if (onError != null) {
onError(failure.toString());
}
},
(apiResponse) {
isNotificationsLoading = false;
if (apiResponse.messageStatus == 2) {
notifyListeners();
if (onError != null) {
onError(apiResponse.errorMessage ?? "Unknown error");
}
} else if (apiResponse.messageStatus == 1) {
final newNotifications = apiResponse.data ?? [];
if (newNotifications.isEmpty || newNotifications.length < pagingSize) {
hasMoreNotifications = false;
}
notificationsList.addAll(newNotifications);
currentPage++;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
Future<void> refreshNotifications({
Function(dynamic)? onSuccess,
Function(String)? onError,
}) async {
notificationsList.clear();
currentPage = 0;
hasMoreNotifications = true;
await getAllNotifications(onSuccess: onSuccess, onError: onError);
}
Future<void> loadMoreNotifications({
Function(dynamic)? onSuccess,
Function(String)? onError,
}) async {
await getAllNotifications(onSuccess: onSuccess, onError: onError);
}
@override
void dispose() {
super.dispose();
}
}

@ -245,8 +245,8 @@ class PrescriptionsViewModel extends ChangeNotifier {
CustomPageRoute( CustomPageRoute(
page: MapUtilityScreen( page: MapUtilityScreen(
confirmButtonString: LocaleKeys.next.tr(), confirmButtonString: LocaleKeys.next.tr(),
titleString: LocaleKeys.selectLocation.tr(), titleString: "Select Location".needTranslation,
subTitleString: LocaleKeys.selectLocationPrescriptionDelivery.tr(), subTitleString: "Please select the location for prescription delivery".needTranslation,
isGmsAvailable: getIt.get<AppState>().isGMSAvailable, isGmsAvailable: getIt.get<AppState>().isGMSAvailable,
), ),
direction: AxisDirection.down), direction: AxisDirection.down),

@ -1,183 +0,0 @@
class QrParkingResponseModel {
dynamic totalRecords;
dynamic nRowID;
int? qRParkingID;
String? description;
String? descriptionN;
dynamic qRCompare;
dynamic qRValue;
String? imagePath;
bool? isActive;
int? parkingID;
int? branchID;
int? companyID;
int? buildingID;
int? rowID;
int? gateID;
int? floorID;
dynamic imagePath1;
int? createdBy;
String? createdOn;
dynamic editedBy;
dynamic editedOn;
String? parkingDescription;
String? parkingDescriptionN;
String? gateDescription;
String? gateDescriptionN;
String? branchDescription;
String? branchDescriptionN;
String? companyDescription;
String? companyDescriptionN;
String? rowDescription;
String? rowDescriptionN;
String? floorDescription;
String? floorDescriptionN;
String? buildingDescription;
String? buildingDescriptionN;
String? qRParkingCode;
String? parkingCode;
double? latitude;
double? longitude;
String? qRImageStr;
QrParkingResponseModel({
this.totalRecords,
this.nRowID,
this.qRParkingID,
this.description,
this.descriptionN,
this.qRCompare,
this.qRValue,
this.imagePath,
this.isActive,
this.parkingID,
this.branchID,
this.companyID,
this.buildingID,
this.rowID,
this.gateID,
this.floorID,
this.imagePath1,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.parkingDescription,
this.parkingDescriptionN,
this.gateDescription,
this.gateDescriptionN,
this.branchDescription,
this.branchDescriptionN,
this.companyDescription,
this.companyDescriptionN,
this.rowDescription,
this.rowDescriptionN,
this.floorDescription,
this.floorDescriptionN,
this.buildingDescription,
this.buildingDescriptionN,
this.qRParkingCode,
this.parkingCode,
this.latitude,
this.longitude,
this.qRImageStr,
});
QrParkingResponseModel.fromJson(Map<String, dynamic> json) {
totalRecords = json['TotalRecords'];
nRowID = json['nRowID'];
qRParkingID = json['QRParkingID'];
description = json['Description'];
descriptionN = json['DescriptionN'];
qRCompare = json['QRCompare'];
qRValue = json['QRValue'];
imagePath = json['ImagePath'];
isActive = json['IsActive'];
parkingID = json['ParkingID'];
branchID = json['BranchID'];
companyID = json['CompanyID'];
buildingID = json['BuildingID'];
rowID = json['RowID'];
gateID = json['GateID'];
floorID = json['FloorID'];
imagePath1 = json['ImagePath1'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
parkingDescription = json['ParkingDescription'];
parkingDescriptionN = json['ParkingDescriptionN'];
gateDescription = json['GateDescription'];
gateDescriptionN = json['GateDescriptionN'];
branchDescription = json['BranchDescription'];
branchDescriptionN = json['BranchDescriptionN'];
companyDescription = json['CompanyDescription'];
companyDescriptionN = json['CompanyDescriptionN'];
rowDescription = json['RowDescription'];
rowDescriptionN = json['RowDescriptionN'];
floorDescription = json['FloorDescription'];
floorDescriptionN = json['FloorDescriptionN'];
buildingDescription = json['BuildingDescription'];
buildingDescriptionN = json['BuildingDescriptionN'];
qRParkingCode = json['QRParkingCode'];
parkingCode = json['ParkingCode'];
latitude = _toDouble(json['Latitude']);
longitude = _toDouble(json['Longitude']);
qRImageStr = json['QRImageStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['TotalRecords'] = totalRecords;
data['nRowID'] = nRowID;
data['QRParkingID'] = qRParkingID;
data['Description'] = description;
data['DescriptionN'] = descriptionN;
data['QRCompare'] = qRCompare;
data['QRValue'] = qRValue;
data['ImagePath'] = imagePath;
data['IsActive'] = isActive;
data['ParkingID'] = parkingID;
data['BranchID'] = branchID;
data['CompanyID'] = companyID;
data['BuildingID'] = buildingID;
data['RowID'] = rowID;
data['GateID'] = gateID;
data['FloorID'] = floorID;
data['ImagePath1'] = imagePath1;
data['CreatedBy'] = createdBy;
data['CreatedOn'] = createdOn;
data['EditedBy'] = editedBy;
data['EditedOn'] = editedOn;
data['ParkingDescription'] = parkingDescription;
data['ParkingDescriptionN'] = parkingDescriptionN;
data['GateDescription'] = gateDescription;
data['GateDescriptionN'] = gateDescriptionN;
data['BranchDescription'] = branchDescription;
data['BranchDescriptionN'] = branchDescriptionN;
data['CompanyDescription'] = companyDescription;
data['CompanyDescriptionN'] = companyDescriptionN;
data['RowDescription'] = rowDescription;
data['RowDescriptionN'] = rowDescriptionN;
data['FloorDescription'] = floorDescription;
data['FloorDescriptionN'] = floorDescriptionN;
data['BuildingDescription'] = buildingDescription;
data['BuildingDescriptionN'] = buildingDescriptionN;
data['QRParkingCode'] = qRParkingCode;
data['ParkingCode'] = parkingCode;
data['Latitude'] = latitude;
data['Longitude'] = longitude;
data['QRImageStr'] = qRImageStr;
return data;
}
static double? _toDouble(dynamic v) {
if (v == null) return null;
if (v is double) return v;
if (v is int) return v.toDouble();
return double.tryParse(v.toString());
}
}

@ -1,74 +0,0 @@
import 'package:dartz/dartz.dart';
import 'package:hmg_patient_app_new/features/qr_parking/models/qr_parking_response_model.dart';
import '../../core/api/api_client.dart';
import '../../core/api_consts.dart';
import '../../core/common_models/generic_api_model.dart';
import '../../core/exceptions/api_failure.dart';
import '../../services/logger_service.dart';
abstract class QrParkingRepo {
Future<Either<Failure, GenericApiModel<List<QrParkingResponseModel>>>>
getQrParking({
required int qrParkingId,
});
}
class QrParkingRepoImp implements QrParkingRepo {
final ApiClient apiClient;
final LoggerService loggerService;
QrParkingRepoImp({
required this.loggerService,
required this.apiClient,
});
@override
Future<Either<Failure, GenericApiModel<List<QrParkingResponseModel>>>>
getQrParking({required int qrParkingId}) async {
try {
GenericApiModel<List<QrParkingResponseModel>>? apiResponse;
Failure? failure;
await apiClient.post(
ApiConsts.getQrParkingDetails, // GetQRParkingByID
body: {'QRParkingID': qrParkingId},
onFailure: (error, statusCode,
{messageStatus, failureType}) {
failure = failureType ??
StatusCodeFailure("$error ($statusCode)");
},
onSuccess: (response, statusCode,
{messageStatus, errorMessage}) {
final list =
(response['List_SWP_QRParkingModel'] as List?) ?? [];
final res = list
.map((e) => QrParkingResponseModel.fromJson(
Map<String, dynamic>.from(e),
))
.toList();
apiResponse = GenericApiModel<List<QrParkingResponseModel>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: res,
);
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) {
return Left(ServerFailure("Unknown error"));
}
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
}

@ -1,144 +0,0 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:hmg_patient_app_new/features/qr_parking/qr_parking_repo.dart';
import '../../services/cache_service.dart';
import '../../services/error_handler_service.dart';
import 'models/qr_parking_response_model.dart';
class QrParkingViewModel extends ChangeNotifier {
final QrParkingRepo qrParkingRepo;
final ErrorHandlerService errorHandlerService;
final CacheService cacheService;
String IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
bool isLoading = false;
String? error;
bool isSavePark = false;
QrParkingResponseModel? qrParkingModel;
List<QrParkingResponseModel> qrParkingList = [];
QrParkingViewModel({
required this.qrParkingRepo,
required this.errorHandlerService,
required this.cacheService,
});
Future<QrParkingResponseModel?> scanAndGetParking() async {
try {
error = null;
isLoading = true;
notifyListeners();
final result = await BarcodeScanner.scan();
if (result.type != ResultType.Barcode) {
isLoading = false;
notifyListeners();
return null;
}
final raw = result.rawContent.trim();
if (raw.isEmpty) {
error = "Invalid QR Code";
isLoading = false;
notifyListeners();
return null;
}
final qrParkingId = _extractQrParkingId(raw);
if (qrParkingId == null) {
error = "Invalid QR Code";
isLoading = false;
notifyListeners();
return null;
}
final apiResult =
await qrParkingRepo.getQrParking(qrParkingId: qrParkingId);
final model = apiResult.fold(
(failure) {
errorHandlerService.handleError(failure: failure);
error = failure.toString();
return null;
},
(apiResponse) {
qrParkingList = apiResponse.data ?? [];
if (qrParkingList.isNotEmpty) {
return qrParkingList.first;
}
error = "Invalid Qr Code";
return null;
},
);
if (model != null) {
qrParkingModel = model;
isSavePark = true;
await cacheService.saveObject(
key: IS_GO_TO_PARKING,
value: model.toJson(),
);
}
isLoading = false;
notifyListeners();
return model;
} catch (e) {
error = "Scan error";
isLoading = false;
notifyListeners();
return null;
}
}
/// Load saved parking
Future<void> getIsSaveParking() async {
isLoading = true;
notifyListeners();
final parking =
await cacheService.getObject(key: IS_GO_TO_PARKING);
if (parking != null) {
isSavePark = true;
qrParkingModel = QrParkingResponseModel.fromJson(
Map<String, dynamic>.from(parking),
);
} else {
isSavePark = false;
qrParkingModel = null;
}
isLoading = false;
notifyListeners();
}
/// Reset parking
Future<void> clearParking() async {
await cacheService.remove(key: IS_GO_TO_PARKING);
isSavePark = false;
qrParkingModel = null;
notifyListeners();
}
int? _extractQrParkingId(String raw) {
try {
if (raw.startsWith("{")) {
final data = jsonDecode(raw);
return int.tryParse(data['QRParkingID'].toString());
}
return int.tryParse(raw);
} catch (_) {
return null;
}
}
}

@ -1,9 +1,7 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart'; import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/radiology/radiology_result_page.dart'; import 'package:hmg_patient_app_new/presentation/radiology/radiology_result_page.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart';
@ -99,7 +97,7 @@ class RadiologyViewModel extends ChangeNotifier {
); );
} else { } else {
if (onError != null) { if (onError != null) {
onError(LocaleKeys.noRadiologyOrders.tr()); onError("No Radiology Orders Found".needTranslation);
} }
} }
} }

@ -8,36 +8,28 @@ class OrganData {
OrganModel( OrganModel(
id: 'head', id: 'head',
name: 'whole_head', name: 'whole_head',
nameAr: 'الرأس_كامل',
description: 'Head', description: 'Head',
descriptionAr: 'الرأس',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.50, y: 0.03), position: OrganPosition(x: 0.50, y: 0.03),
), ),
OrganModel( OrganModel(
id: 'left_eye', id: 'left_eye',
name: 'eyes', name: 'eyes',
nameAr: 'العيون',
description: 'Left Eye', description: 'Left Eye',
descriptionAr: 'العين اليسرى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.43, y: 0.07), position: OrganPosition(x: 0.43, y: 0.07),
), ),
OrganModel( OrganModel(
id: 'right_eye', id: 'right_eye',
name: 'eyes', name: 'eyes',
nameAr: 'العيون',
description: 'Right Eye', description: 'Right Eye',
descriptionAr: 'العين اليمنى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.57, y: 0.07), position: OrganPosition(x: 0.57, y: 0.07),
), ),
OrganModel( OrganModel(
id: 'nose_mouth', id: 'nose_mouth',
name: 'oral_cavity', name: 'oral_cavity',
nameAr: 'تجويف_الفم',
description: 'Nose/Mouth', description: 'Nose/Mouth',
descriptionAr: 'الأنف/الفم',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.50, y: 0.09), position: OrganPosition(x: 0.50, y: 0.09),
), ),
@ -46,9 +38,7 @@ class OrganData {
OrganModel( OrganModel(
id: 'throat', id: 'throat',
name: 'neck_or_throat', name: 'neck_or_throat',
nameAr: 'الرقبة_أو_الحلق',
description: 'Throat', description: 'Throat',
descriptionAr: 'الحلق',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.50, y: 0.15), position: OrganPosition(x: 0.50, y: 0.15),
), ),
@ -57,18 +47,14 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_shoulder', id: 'left_shoulder',
name: 'upper_arm', name: 'upper_arm',
nameAr: 'الذراع_العلوي',
description: 'Left Shoulder', description: 'Left Shoulder',
descriptionAr: 'الكتف الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.22, y: 0.22), position: OrganPosition(x: 0.22, y: 0.22),
), ),
OrganModel( OrganModel(
id: 'right_shoulder', id: 'right_shoulder',
name: 'upper_arm', name: 'upper_arm',
nameAr: 'الذراع_العلوي',
description: 'Right Shoulder', description: 'Right Shoulder',
descriptionAr: 'الكتف الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.8, y: 0.22), position: OrganPosition(x: 0.8, y: 0.22),
), ),
@ -77,27 +63,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_chest', id: 'left_chest',
name: 'chest', name: 'chest',
nameAr: 'الصدر',
description: 'Left Chest', description: 'Left Chest',
descriptionAr: 'الصدر الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.38, y: 0.22), position: OrganPosition(x: 0.38, y: 0.22),
), ),
OrganModel( OrganModel(
id: 'center_chest', id: 'center_chest',
name: 'chest', name: 'chest',
nameAr: 'الصدر',
description: 'Center Chest', description: 'Center Chest',
descriptionAr: 'وسط الصدر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.52, y: 0.25), position: OrganPosition(x: 0.52, y: 0.25),
), ),
OrganModel( OrganModel(
id: 'right_chest', id: 'right_chest',
name: 'chest', name: 'chest',
nameAr: 'الصدر',
description: 'Right Chest', description: 'Right Chest',
descriptionAr: 'الصدر الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.65, y: 0.22), position: OrganPosition(x: 0.65, y: 0.22),
), ),
@ -106,18 +86,14 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_ribs', id: 'left_ribs',
name: 'chest', name: 'chest',
nameAr: 'الصدر',
description: 'Left Ribs', description: 'Left Ribs',
descriptionAr: 'الأضلاع اليسرى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.38, y: 0.35), position: OrganPosition(x: 0.38, y: 0.35),
), ),
OrganModel( OrganModel(
id: 'right_ribs', id: 'right_ribs',
name: 'chest', name: 'chest',
nameAr: 'الصدر',
description: 'Right Ribs', description: 'Right Ribs',
descriptionAr: 'الأضلاع اليمنى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.64, y: 0.35), position: OrganPosition(x: 0.64, y: 0.35),
), ),
@ -126,27 +102,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'upper_abdomen', id: 'upper_abdomen',
name: 'upper_abdomen', name: 'upper_abdomen',
nameAr: 'البطن_العلوي',
description: 'Upper Abdomen', description: 'Upper Abdomen',
descriptionAr: 'أعلى البطن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.51, y: 0.31), position: OrganPosition(x: 0.51, y: 0.31),
), ),
OrganModel( OrganModel(
id: 'navel', id: 'navel',
name: 'mid_abdomen', name: 'mid_abdomen',
nameAr: 'البطن_الأوسط',
description: 'Navel', description: 'Navel',
descriptionAr: 'السرة',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.51, y: 0.38), position: OrganPosition(x: 0.51, y: 0.38),
), ),
OrganModel( OrganModel(
id: 'lower_abdomen', id: 'lower_abdomen',
name: 'lower_abdomen', name: 'lower_abdomen',
nameAr: 'البطن_السفلي',
description: 'Lower Abdomen', description: 'Lower Abdomen',
descriptionAr: 'أسفل البطن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.51, y: 0.44), position: OrganPosition(x: 0.51, y: 0.44),
), ),
@ -155,18 +125,14 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_groin', id: 'left_groin',
name: 'sexual_organs', name: 'sexual_organs',
nameAr: 'الأعضاء_التناسلية',
description: 'Left Groin', description: 'Left Groin',
descriptionAr: 'الفخذ الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.42, y: 0.49), position: OrganPosition(x: 0.42, y: 0.49),
), ),
OrganModel( OrganModel(
id: 'right_groin', id: 'right_groin',
name: 'sexual_organs', name: 'sexual_organs',
nameAr: 'الأعضاء_التناسلية',
description: 'Right Groin', description: 'Right Groin',
descriptionAr: 'الفخذ الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.59, y: 0.49), position: OrganPosition(x: 0.59, y: 0.49),
), ),
@ -176,27 +142,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_elbow', id: 'left_elbow',
name: 'elbow', name: 'elbow',
nameAr: 'الكوع',
description: 'Left Elbow', description: 'Left Elbow',
descriptionAr: 'الكوع الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.21, y: 0.35), position: OrganPosition(x: 0.21, y: 0.35),
), ),
OrganModel( OrganModel(
id: 'left_forearm', id: 'left_forearm',
name: 'forearm', name: 'forearm',
nameAr: 'الساعد',
description: 'Left Forearm', description: 'Left Forearm',
descriptionAr: 'الساعد الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.19, y: 0.43), position: OrganPosition(x: 0.19, y: 0.43),
), ),
OrganModel( OrganModel(
id: 'left_wrist', id: 'left_wrist',
name: 'hand', name: 'hand',
nameAr: 'اليد',
description: 'Left Wrist', description: 'Left Wrist',
descriptionAr: 'المعصم الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.14, y: 0.5), position: OrganPosition(x: 0.14, y: 0.5),
), ),
@ -206,27 +166,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'right_elbow', id: 'right_elbow',
name: 'elbow', name: 'elbow',
nameAr: 'الكوع',
description: 'Right Elbow', description: 'Right Elbow',
descriptionAr: 'الكوع الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.79, y: 0.35), position: OrganPosition(x: 0.79, y: 0.35),
), ),
OrganModel( OrganModel(
id: 'right_forearm', id: 'right_forearm',
name: 'forearm', name: 'forearm',
nameAr: 'الساعد',
description: 'Right Forearm', description: 'Right Forearm',
descriptionAr: 'الساعد الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.81, y: 0.43), position: OrganPosition(x: 0.81, y: 0.43),
), ),
OrganModel( OrganModel(
id: 'right_wrist', id: 'right_wrist',
name: 'hand', name: 'hand',
nameAr: 'اليد',
description: 'Right Wrist', description: 'Right Wrist',
descriptionAr: 'المعصم الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.85, y: 0.5), position: OrganPosition(x: 0.85, y: 0.5),
), ),
@ -235,36 +189,28 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_thigh', id: 'left_thigh',
name: 'thigh', name: 'thigh',
nameAr: 'الفخذ',
description: 'Left Thigh', description: 'Left Thigh',
descriptionAr: 'الفخذ الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.4, y: 0.60), position: OrganPosition(x: 0.4, y: 0.60),
), ),
OrganModel( OrganModel(
id: 'left_knee', id: 'left_knee',
name: 'knee', name: 'knee',
nameAr: 'الركبة',
description: 'Left Knee', description: 'Left Knee',
descriptionAr: 'الركبة اليسرى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.4, y: 0.72), position: OrganPosition(x: 0.4, y: 0.72),
), ),
OrganModel( OrganModel(
id: 'left_shin', id: 'left_shin',
name: 'lower_leg', name: 'lower_leg',
nameAr: 'الساق_السفلي',
description: 'Left Shin', description: 'Left Shin',
descriptionAr: 'الساق اليسرى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.41, y: 0.82), position: OrganPosition(x: 0.41, y: 0.82),
), ),
OrganModel( OrganModel(
id: 'left_ankle', id: 'left_ankle',
name: 'foot', name: 'foot',
nameAr: 'القدم',
description: 'Left Ankle', description: 'Left Ankle',
descriptionAr: 'الكاحل الأيسر',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.43, y: 0.91), position: OrganPosition(x: 0.43, y: 0.91),
), ),
@ -273,36 +219,28 @@ class OrganData {
OrganModel( OrganModel(
id: 'right_thigh', id: 'right_thigh',
name: 'thigh', name: 'thigh',
nameAr: 'الفخذ',
description: 'Right Thigh', description: 'Right Thigh',
descriptionAr: 'الفخذ الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.65, y: 0.60), position: OrganPosition(x: 0.65, y: 0.60),
), ),
OrganModel( OrganModel(
id: 'right_knee', id: 'right_knee',
name: 'knee', name: 'knee',
nameAr: 'الركبة',
description: 'Right Knee', description: 'Right Knee',
descriptionAr: 'الركبة اليمنى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.6, y: 0.72), position: OrganPosition(x: 0.6, y: 0.72),
), ),
OrganModel( OrganModel(
id: 'right_shin', id: 'right_shin',
name: 'lower_leg', name: 'lower_leg',
nameAr: 'الساق_السفلي',
description: 'Right Shin', description: 'Right Shin',
descriptionAr: 'الساق اليمنى',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.57, y: 0.82), position: OrganPosition(x: 0.57, y: 0.82),
), ),
OrganModel( OrganModel(
id: 'right_ankle', id: 'right_ankle',
name: 'foot', name: 'foot',
nameAr: 'القدم',
description: 'Right Ankle', description: 'Right Ankle',
descriptionAr: 'الكاحل الأيمن',
bodyView: BodyView.front, bodyView: BodyView.front,
position: OrganPosition(x: 0.57, y: 0.91), position: OrganPosition(x: 0.57, y: 0.91),
), ),
@ -314,18 +252,14 @@ class OrganData {
OrganModel( OrganModel(
id: 'back_of_head', id: 'back_of_head',
name: 'whole_head', name: 'whole_head',
nameAr: 'الرأس_كامل',
description: 'Back of Head', description: 'Back of Head',
descriptionAr: 'مؤخرة الرأس',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.04), position: OrganPosition(x: 0.50, y: 0.04),
), ),
OrganModel( OrganModel(
id: 'neck_back', id: 'neck_back',
name: 'nape_of_neck', name: 'nape_of_neck',
nameAr: 'مؤخرة_الرقبة',
description: 'Neck', description: 'Neck',
descriptionAr: 'الرقبة',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.14), position: OrganPosition(x: 0.50, y: 0.14),
), ),
@ -334,18 +268,14 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_shoulder_back', id: 'left_shoulder_back',
name: 'upper_arm', name: 'upper_arm',
nameAr: 'الذراع_العلوي',
description: 'Left Shoulder', description: 'Left Shoulder',
descriptionAr: 'الكتف الأيسر',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.33, y: 0.19), position: OrganPosition(x: 0.33, y: 0.19),
), ),
OrganModel( OrganModel(
id: 'right_shoulder_back', id: 'right_shoulder_back',
name: 'upper_arm', name: 'upper_arm',
nameAr: 'الذراع_العلوي',
description: 'Right Shoulder', description: 'Right Shoulder',
descriptionAr: 'الكتف الأيمن',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.67, y: 0.19), position: OrganPosition(x: 0.67, y: 0.19),
), ),
@ -354,27 +284,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'upper_spine', id: 'upper_spine',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Upper Spine', description: 'Upper Spine',
descriptionAr: 'العمود الفقري العلوي',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.23), position: OrganPosition(x: 0.50, y: 0.23),
), ),
OrganModel( OrganModel(
id: 'left_upper_back', id: 'left_upper_back',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Left Upper Back', description: 'Left Upper Back',
descriptionAr: 'أعلى الظهر الأيسر',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.38, y: 0.28), position: OrganPosition(x: 0.38, y: 0.28),
), ),
OrganModel( OrganModel(
id: 'right_upper_back', id: 'right_upper_back',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Right Upper Back', description: 'Right Upper Back',
descriptionAr: 'أعلى الظهر الأيمن',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.62, y: 0.28), position: OrganPosition(x: 0.62, y: 0.28),
), ),
@ -383,27 +307,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'mid_spine', id: 'mid_spine',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Mid Spine', description: 'Mid Spine',
descriptionAr: 'العمود الفقري الأوسط',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.35), position: OrganPosition(x: 0.50, y: 0.35),
), ),
OrganModel( OrganModel(
id: 'left_mid_back', id: 'left_mid_back',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Left Mid Back', description: 'Left Mid Back',
descriptionAr: 'وسط الظهر الأيسر',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.38, y: 0.35), position: OrganPosition(x: 0.38, y: 0.35),
), ),
OrganModel( OrganModel(
id: 'right_mid_back', id: 'right_mid_back',
name: 'back', name: 'back',
nameAr: 'الظهر',
description: 'Right Mid Back', description: 'Right Mid Back',
descriptionAr: 'وسط الظهر الأيمن',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.62, y: 0.35), position: OrganPosition(x: 0.62, y: 0.35),
), ),
@ -412,27 +330,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'lower_spine', id: 'lower_spine',
name: 'lower_back', name: 'lower_back',
nameAr: 'أسفل_الظهر',
description: 'Lower Back', description: 'Lower Back',
descriptionAr: 'أسفل الظهر',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.43), position: OrganPosition(x: 0.50, y: 0.43),
), ),
OrganModel( OrganModel(
id: 'left_lower_back', id: 'left_lower_back',
name: 'lower_back', name: 'lower_back',
nameAr: 'أسفل_الظهر',
description: 'Left Lower Back', description: 'Left Lower Back',
descriptionAr: 'أسفل الظهر الأيسر',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.40, y: 0.43), position: OrganPosition(x: 0.40, y: 0.43),
), ),
OrganModel( OrganModel(
id: 'right_lower_back', id: 'right_lower_back',
name: 'lower_back', name: 'lower_back',
nameAr: 'أسفل_الظهر',
description: 'Right Lower Back', description: 'Right Lower Back',
descriptionAr: 'أسفل الظهر الأيمن',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.60, y: 0.43), position: OrganPosition(x: 0.60, y: 0.43),
), ),
@ -441,27 +353,21 @@ class OrganData {
OrganModel( OrganModel(
id: 'sacrum', id: 'sacrum',
name: 'lower_back', name: 'lower_back',
nameAr: 'أسفل_الظهر',
description: 'Sacrum', description: 'Sacrum',
descriptionAr: 'العجز',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.50, y: 0.52), position: OrganPosition(x: 0.50, y: 0.52),
), ),
OrganModel( OrganModel(
id: 'left_glute', id: 'left_glute',
name: 'buttocks', name: 'buttocks',
nameAr: 'الأرداف',
description: 'Left Glute', description: 'Left Glute',
descriptionAr: 'الأرداف اليسرى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.45, y: 0.56), position: OrganPosition(x: 0.45, y: 0.56),
), ),
OrganModel( OrganModel(
id: 'right_glute', id: 'right_glute',
name: 'buttocks', name: 'buttocks',
nameAr: 'الأرداف',
description: 'Right Glute', description: 'Right Glute',
descriptionAr: 'الأرداف اليمنى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.55, y: 0.56), position: OrganPosition(x: 0.55, y: 0.56),
), ),
@ -470,36 +376,28 @@ class OrganData {
OrganModel( OrganModel(
id: 'left_hamstring', id: 'left_hamstring',
name: 'thigh', name: 'thigh',
nameAr: 'الفخذ',
description: 'Left Hamstring', description: 'Left Hamstring',
descriptionAr: 'عضلة الفخذ الخلفية اليسرى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.43, y: 0.65), position: OrganPosition(x: 0.43, y: 0.65),
), ),
OrganModel( OrganModel(
id: 'right_hamstring', id: 'right_hamstring',
name: 'thigh', name: 'thigh',
nameAr: 'الفخذ',
description: 'Right Hamstring', description: 'Right Hamstring',
descriptionAr: 'عضلة الفخذ الخلفية اليمنى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.57, y: 0.65), position: OrganPosition(x: 0.57, y: 0.65),
), ),
OrganModel( OrganModel(
id: 'left_calf', id: 'left_calf',
name: 'lower_leg', name: 'lower_leg',
nameAr: 'الساق_السفلي',
description: 'Left Calf', description: 'Left Calf',
descriptionAr: 'ربلة الساق اليسرى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.43, y: 0.79), position: OrganPosition(x: 0.43, y: 0.79),
), ),
OrganModel( OrganModel(
id: 'right_calf', id: 'right_calf',
name: 'lower_leg', name: 'lower_leg',
nameAr: 'الساق_السفلي',
description: 'Right Calf', description: 'Right Calf',
descriptionAr: 'ربلة الساق اليمنى',
bodyView: BodyView.back, bodyView: BodyView.back,
position: OrganPosition(x: 0.57, y: 0.79), position: OrganPosition(x: 0.57, y: 0.79),
), ),

@ -1,97 +1,97 @@
// import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
//
// class ConditionsModel { class ConditionsModel {
// final IconData icon; final IconData icon;
// final String title; final String title;
// final int percentage; final int percentage;
// final String tagText; final String tagText;
// final String clinic; final String clinic;
// final List<String> symptoms; final List<String> symptoms;
// final String description; final String description;
// final String? monitorNote; final String? monitorNote;
// final String? appointmentLabel; final String? appointmentLabel;
// final PossibleConditionsSeverityEnum possibleConditionsSeverityEnum; final PossibleConditionsSeverityEnum possibleConditionsSeverityEnum;
//
// ConditionsModel({ ConditionsModel({
// required this.icon, required this.icon,
// required this.title, required this.title,
// required this.percentage, required this.percentage,
// required this.tagText, required this.tagText,
// required this.clinic, required this.clinic,
// required this.symptoms, required this.symptoms,
// required this.description, required this.description,
// required this.possibleConditionsSeverityEnum, required this.possibleConditionsSeverityEnum,
// this.monitorNote, this.monitorNote,
// this.appointmentLabel, this.appointmentLabel,
// }); });
// } }
//
// List<ConditionsModel> dummyConditions = [ List<ConditionsModel> dummyConditions = [
// ConditionsModel( ConditionsModel(
// icon: Icons.psychology_alt, icon: Icons.psychology_alt,
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
// title: "Migraine", title: "Migraine",
// percentage: 87, percentage: 87,
// tagText: "Seek Medical Advice", tagText: "Seek Medical Advice",
// clinic: "Internal Medicine Clinic", clinic: "Internal Medicine Clinic",
// symptoms: ["Headache", "Nausea", "Sensitivity to light"], symptoms: ["Headache", "Nausea", "Sensitivity to light"],
// description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.", description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
// appointmentLabel: "Book Appointment", appointmentLabel: "Book Appointment",
// ), ),
// ConditionsModel( ConditionsModel(
// icon: Icons.deblur, icon: Icons.deblur,
// title: "Tension Headache", title: "Tension Headache",
// percentage: 37, percentage: 37,
// tagText: "Monitor", tagText: "Monitor",
// monitorNote: "No need to visit doctor", monitorNote: "No need to visit doctor",
// clinic: "GP Clinic", clinic: "GP Clinic",
// symptoms: ["Mild head pressure", "Scalp tenderness"], symptoms: ["Mild head pressure", "Scalp tenderness"],
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.", description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
// ), ),
// ConditionsModel( ConditionsModel(
// icon: Icons.medication_liquid, icon: Icons.medication_liquid,
// title: "Meningitis", title: "Meningitis",
// percentage: 28, percentage: 28,
// tagText: "Emergency", tagText: "Emergency",
// clinic: "Neurology Clinic", clinic: "Neurology Clinic",
// symptoms: ["Mild head pressure", "Scalp tenderness"], symptoms: ["Mild head pressure", "Scalp tenderness"],
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.", description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
// appointmentLabel: "Book Appointment", appointmentLabel: "Book Appointment",
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
// ), ),
// ConditionsModel( ConditionsModel(
// icon: Icons.psychology_alt, icon: Icons.psychology_alt,
// title: "Migraine", title: "Migraine",
// percentage: 87, percentage: 87,
// tagText: "Seek Medical Advice", tagText: "Seek Medical Advice",
// clinic: "Internal Medicine Clinic", clinic: "Internal Medicine Clinic",
// symptoms: ["Headache", "Nausea", "Sensitivity to light"], symptoms: ["Headache", "Nausea", "Sensitivity to light"],
// description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.", description: "A migraine is a type of headache that can cause severe throbbing pain, usually on one side of the head.",
// appointmentLabel: "Book Appointment", appointmentLabel: "Book Appointment",
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.seekMedicalAdvice,
// ), ),
// ConditionsModel( ConditionsModel(
// icon: Icons.deblur, icon: Icons.deblur,
// title: "Tension Headache", title: "Tension Headache",
// percentage: 37, percentage: 37,
// tagText: "Monitor", tagText: "Monitor",
// monitorNote: "No need to visit doctor", monitorNote: "No need to visit doctor",
// clinic: "GP Clinic", clinic: "GP Clinic",
// symptoms: ["Mild head pressure", "Scalp tenderness"], symptoms: ["Mild head pressure", "Scalp tenderness"],
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.", description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.monitorOnly,
// ), ),
// ConditionsModel( ConditionsModel(
// icon: Icons.medication_liquid, icon: Icons.medication_liquid,
// title: "Meningitis", title: "Meningitis",
// percentage: 28, percentage: 28,
// tagText: "Emergency", tagText: "Emergency",
// clinic: "Neurology Clinic", clinic: "Neurology Clinic",
// symptoms: ["Mild head pressure", "Scalp tenderness"], symptoms: ["Mild head pressure", "Scalp tenderness"],
// description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.", description: "A tension-type headache is generally a mild to moderate pain that feels like a tight band around your head.",
// appointmentLabel: "Book Appointment", appointmentLabel: "Book Appointment",
// possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency, possibleConditionsSeverityEnum: PossibleConditionsSeverityEnum.emergency,
// ), ),
// ]; ];

@ -3,47 +3,29 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class OrganModel { class OrganModel {
final String id; final String id;
final String name; final String name;
final String nameAr;
final String description; final String description;
final String descriptionAr;
final BodyView bodyView; final BodyView bodyView;
final OrganPosition position; final OrganPosition position;
const OrganModel({ const OrganModel({
required this.id, required this.id,
required this.name, required this.name,
required this.nameAr,
required this.description, required this.description,
required this.descriptionAr,
required this.bodyView, required this.bodyView,
required this.position, required this.position,
}); });
/// Get localized name based on isArabic flag
String getLocalizedName(bool isArabic) {
return isArabic ? nameAr : name;
}
/// Get localized description based on isArabic flag
String getLocalizedDescription(bool isArabic) {
return isArabic ? descriptionAr : description;
}
OrganModel copyWith({ OrganModel copyWith({
String? id, String? id,
String? name, String? name,
String? nameAr,
String? description, String? description,
String? descriptionAr,
BodyView? bodyView, BodyView? bodyView,
OrganPosition? position, OrganPosition? position,
}) { }) {
return OrganModel( return OrganModel(
id: id ?? this.id, id: id ?? this.id,
name: name ?? this.name, name: name ?? this.name,
nameAr: nameAr ?? this.nameAr,
description: description ?? this.description, description: description ?? this.description,
descriptionAr: descriptionAr ?? this.descriptionAr,
bodyView: bodyView ?? this.bodyView, bodyView: bodyView ?? this.bodyView,
position: position ?? this.position, position: position ?? this.position,
); );

@ -22,8 +22,6 @@ class RiskAndSuggestionsItemModel {
final String? type; final String? type;
final String? name; final String? name;
final String? commonName; final String? commonName;
final String? nameAr;
final String? commonNameAr;
final String? language; final String? language;
RiskAndSuggestionsItemModel({ RiskAndSuggestionsItemModel({
@ -31,8 +29,6 @@ class RiskAndSuggestionsItemModel {
this.type, this.type,
this.name, this.name,
this.commonName, this.commonName,
this.nameAr,
this.commonNameAr,
this.language, this.language,
}); });
@ -42,8 +38,6 @@ class RiskAndSuggestionsItemModel {
type: json['type'], type: json['type'],
name: json['name'], name: json['name'],
commonName: json['common_name'], commonName: json['common_name'],
nameAr: json['nameAr'],
commonNameAr: json['common_nameAr'],
language: json['language'], language: json['language'],
); );
} }
@ -54,17 +48,12 @@ class RiskAndSuggestionsItemModel {
'type': type, 'type': type,
'name': name, 'name': name,
'common_name': commonName, 'common_name': commonName,
'nameAr': nameAr,
'common_nameAr': commonNameAr,
'language': language, 'language': language,
}; };
} }
// Helper method to get display name based on locale // Helper method to get display name
String getDisplayName({bool isArabic = false}) { String getDisplayName() {
if (isArabic) {
return commonNameAr ?? nameAr ?? commonName ?? name ?? '';
}
return commonName ?? name ?? ''; return commonName ?? name ?? '';
} }
} }

@ -1,5 +1,3 @@
import 'package:hmg_patient_app_new/core/enums.dart';
class TriageDataDetails { class TriageDataDetails {
final TriageQuestion? question; final TriageQuestion? question;
final List<TriageCondition>? conditions; final List<TriageCondition>? conditions;
@ -172,17 +170,13 @@ class TriageCondition {
final String? id; final String? id;
final String? name; final String? name;
final String? commonName; final String? commonName;
final String? nameAr;
final String? commonNameAr;
final double? probability; final double? probability;
final ConditionDetails? conditionDetails; final dynamic conditionDetails;
TriageCondition({ TriageCondition({
this.id, this.id,
this.name, this.name,
this.commonName, this.commonName,
this.nameAr,
this.commonNameAr,
this.probability, this.probability,
this.conditionDetails, this.conditionDetails,
}); });
@ -192,10 +186,8 @@ class TriageCondition {
id: json['id'], id: json['id'],
name: json['name'], name: json['name'],
commonName: json['common_name'], commonName: json['common_name'],
nameAr: json['nameAr'],
commonNameAr: json['common_nameAr'],
probability: json['probability']?.toDouble(), probability: json['probability']?.toDouble(),
conditionDetails: json['condition_details'] != null ? ConditionDetails.fromJson(json['condition_details']) : null, conditionDetails: json['condition_details'],
); );
} }
@ -204,96 +196,14 @@ class TriageCondition {
'id': id, 'id': id,
'name': name, 'name': name,
'common_name': commonName, 'common_name': commonName,
'nameAr': nameAr,
'common_nameAr': commonNameAr,
'probability': probability, 'probability': probability,
'condition_details': conditionDetails?.toJson(), 'condition_details': conditionDetails,
}; };
} }
/// Get display name based on locale
String getDisplayName({bool isArabic = false}) {
if (isArabic) {
return commonNameAr ?? nameAr ?? commonName ?? name ?? '';
}
return commonName ?? name ?? '';
}
/// Get probability as percentage /// Get probability as percentage
String getProbabilityPercentage() { String getProbabilityPercentage() {
if (probability == null) return '0%'; if (probability == null) return '0%';
return '${(probability! * 100).toStringAsFixed(1)}%'; return '${(probability! * 100).toStringAsFixed(1)}%';
} }
} }
class ConditionDetails {
final String? icd10Code;
final ConditionCategory? category;
final SeverityEnum? severity;
final TriageLevelEnum? triageLevel;
final String? hint;
final bool? hasPatientEducation;
final String? prevalence;
final String? acuteness;
ConditionDetails({
this.icd10Code,
this.category,
this.severity,
this.triageLevel,
this.hint,
this.hasPatientEducation,
this.prevalence,
this.acuteness,
});
factory ConditionDetails.fromJson(Map<String, dynamic> json) {
return ConditionDetails(
icd10Code: json['icd10_code'],
category: json['category'] != null ? ConditionCategory.fromJson(json['category']) : null,
severity: json['severity'] != null ? SeverityEnumExtension.fromInt(json['severity']) : null,
triageLevel: json['triage_level'] != null ? TriageLevelEnumExtension.fromInt(json['triage_level']) : null,
hint: json['hint'],
hasPatientEducation: json['has_patient_education'],
prevalence: json['prevalence'],
acuteness: json['acuteness'],
);
}
Map<String, dynamic> toJson() {
return {
'icd10_code': icd10Code,
'category': category?.toJson(),
'severity': severity?.toInt,
'triage_level': triageLevel?.toInt,
'hint': hint,
'has_patient_education': hasPatientEducation,
'prevalence': prevalence,
'acuteness': acuteness,
};
}
}
class ConditionCategory {
final String? id;
final String? name;
ConditionCategory({
this.id,
this.name,
});
factory ConditionCategory.fromJson(Map<String, dynamic> json) {
return ConditionCategory(
id: json['id'],
name: json['name'],
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
};
}
}

@ -12,42 +12,50 @@ import 'package:hmg_patient_app_new/features/symptoms_checker/models/resp_models
import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class SymptomsCheckerRepo { abstract class SymptomsCheckerRepo {
Future<Either<Failure, GenericApiModel<SymptomsUserDetailsResponseModel>>> getUserDetails({ Future<Either<Failure, GenericApiModel<SymptomsUserDetailsResponseModel>>>
getUserDetails({
required String userName, required String userName,
required String password, required String password,
}); });
Future<Either<Failure, GenericApiModel<BodySymptomResponseModel>>> getBodySymptomsByName({ Future<Either<Failure, GenericApiModel<BodySymptomResponseModel>>>
getBodySymptomsByName({
required List<String> organNames, required List<String> organNames,
required String userSessionToken, required String userSessionToken,
required int gender, required int gender,
}); });
Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>> getRiskFactors({ Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>>
getRiskFactors({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required int gender,
required String sessionId, required String sessionId,
}); });
Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>> getSuggestions({ Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>>
getSuggestions({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required String sessionId, required String sessionId,
required int gender,
}); });
Future<Either<Failure, GenericApiModel<TriageDataDetails>>> getDiagnosisForTriage({ Future<Either<Failure, GenericApiModel<TriageDataDetails>>>
getDiagnosisForTriage({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
List<Map<String, String>>? triageEvidence, List<Map<String, String>>? triageEvidence,
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required int gender,
required String sessionId, required String sessionId,
}); });
} }
@ -56,14 +64,16 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
final ApiClient apiClient; final ApiClient apiClient;
final LoggerService loggerService; final LoggerService loggerService;
SymptomsCheckerRepoImp({required this.apiClient, required this.loggerService}); SymptomsCheckerRepoImp(
{required this.apiClient, required this.loggerService});
@override @override
Future<Either<Failure, GenericApiModel<SymptomsUserDetailsResponseModel>>> getUserDetails({ Future<Either<Failure, GenericApiModel<SymptomsUserDetailsResponseModel>>>
getUserDetails({
required String userName, required String userName,
required String password, required String password,
}) async { }) async {
Map<String, dynamic> body = {"userName": userName, "password": password}; Map<String, String> body = {"userName": userName, "password": password};
try { try {
GenericApiModel<SymptomsUserDetailsResponseModel>? apiResponse; GenericApiModel<SymptomsUserDetailsResponseModel>? apiResponse;
@ -82,9 +92,11 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
// Parse response if it's a string // Parse response if it's a string
final Map<String, dynamic> responseData = response is String ? jsonDecode(response) : response; final Map<String, dynamic> responseData =
response is String ? jsonDecode(response) : response;
SymptomsUserDetailsResponseModel symptomsUserDetailsResponseModel = SymptomsUserDetailsResponseModel.fromJson(responseData); SymptomsUserDetailsResponseModel symptomsUserDetailsResponseModel =
SymptomsUserDetailsResponseModel.fromJson(responseData);
apiResponse = GenericApiModel<SymptomsUserDetailsResponseModel>( apiResponse = GenericApiModel<SymptomsUserDetailsResponseModel>(
messageStatus: messageStatus ?? 1, messageStatus: messageStatus ?? 1,
@ -111,7 +123,8 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
} }
@override @override
Future<Either<Failure, GenericApiModel<BodySymptomResponseModel>>> getBodySymptomsByName({ Future<Either<Failure, GenericApiModel<BodySymptomResponseModel>>>
getBodySymptomsByName({
required List<String> organNames, required List<String> organNames,
required String userSessionToken, required String userSessionToken,
required int gender, required int gender,
@ -141,7 +154,8 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
}, },
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
BodySymptomResponseModel bodySymptomResponse = BodySymptomResponseModel.fromJson(response); BodySymptomResponseModel bodySymptomResponse =
BodySymptomResponseModel.fromJson(response);
apiResponse = GenericApiModel<BodySymptomResponseModel>( apiResponse = GenericApiModel<BodySymptomResponseModel>(
messageStatus: messageStatus ?? 1, messageStatus: messageStatus ?? 1,
@ -150,7 +164,8 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
data: bodySymptomResponse, data: bodySymptomResponse,
); );
} catch (e, stackTrace) { } catch (e, stackTrace) {
loggerService.logError("Error parsing GetBodySymptomsByName response: $e"); loggerService
.logError("Error parsing GetBodySymptomsByName response: $e");
loggerService.logError("StackTrace: $stackTrace"); loggerService.logError("StackTrace: $stackTrace");
failure = DataParsingFailure(e.toString()); failure = DataParsingFailure(e.toString());
} }
@ -168,19 +183,21 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
} }
@override @override
Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>> getRiskFactors({ Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>>
getRiskFactors({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required int gender,
required String sessionId, required String sessionId,
}) async { }) async {
final Map<String, dynamic> body = { final Map<String, dynamic> body = {
"age": { "age": {
"value": age, "value": age,
}, },
"gender": gender, "sex": sex,
"evidence": evidenceIds.map((id) => {"id": id}).toList(), "evidence": evidenceIds.map((id) => {"id": id}).toList(),
"language": language, "language": language,
"generalId": sessionId, "generalId": sessionId,
@ -208,9 +225,11 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
// Parse response if it's a string // Parse response if it's a string
final Map<String, dynamic> responseData = response is String ? jsonDecode(response) : response; final Map<String, dynamic> responseData =
response is String ? jsonDecode(response) : response;
RiskAndSuggestionsResponseModel riskFactorsResponse = RiskAndSuggestionsResponseModel.fromJson(responseData); RiskAndSuggestionsResponseModel riskFactorsResponse =
RiskAndSuggestionsResponseModel.fromJson(responseData);
apiResponse = GenericApiModel<RiskAndSuggestionsResponseModel>( apiResponse = GenericApiModel<RiskAndSuggestionsResponseModel>(
messageStatus: messageStatus ?? 1, messageStatus: messageStatus ?? 1,
@ -236,14 +255,16 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
} }
} }
@override Future<Either<Failure, GenericApiModel<TriageDataDetails>>>
Future<Either<Failure, GenericApiModel<TriageDataDetails>>> getDiagnosisForTriage({ getDiagnosisForTriage({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
List<Map<String, String>>? triageEvidence, // Additional triage-specific evidence List<Map<String, String>>?
triageEvidence, // Additional triage-specific evidence
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required int gender,
required String sessionId, required String sessionId,
}) async { }) async {
// Build evidence list: combine initial symptoms with triage evidence // Build evidence list: combine initial symptoms with triage evidence
@ -263,7 +284,7 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
"age": { "age": {
"value": age, "value": age,
}, },
"gender": gender, "sex": sex,
"evidence": evidenceList, "evidence": evidenceList,
"language": language, "language": language,
"suggest_method": "diagnosis", "suggest_method": "diagnosis",
@ -292,11 +313,13 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
// Parse response if it's a string // Parse response if it's a string
final Map<String, dynamic> responseData = response is String ? jsonDecode(response) : response; final Map<String, dynamic> responseData =
response is String ? jsonDecode(response) : response;
final updatedResponseData = responseData['dataDetails']; final updatedResponseData = responseData['dataDetails'];
TriageDataDetails riskFactorsResponse = TriageDataDetails.fromJson(updatedResponseData); TriageDataDetails riskFactorsResponse =
TriageDataDetails.fromJson(updatedResponseData);
apiResponse = GenericApiModel<TriageDataDetails>( apiResponse = GenericApiModel<TriageDataDetails>(
messageStatus: messageStatus ?? 1, messageStatus: messageStatus ?? 1,
@ -305,7 +328,8 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
data: riskFactorsResponse, data: riskFactorsResponse,
); );
} catch (e, stackTrace) { } catch (e, stackTrace) {
loggerService.logError("Error parsing getDiagnosisForTriage response: $e"); loggerService
.logError("Error parsing getDiagnosisForTriage response: $e");
loggerService.logError("StackTrace: $stackTrace"); loggerService.logError("StackTrace: $stackTrace");
failure = DataParsingFailure(e.toString()); failure = DataParsingFailure(e.toString());
} }
@ -323,19 +347,21 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
} }
@override @override
Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>> getSuggestions({ Future<Either<Failure, GenericApiModel<RiskAndSuggestionsResponseModel>>>
getSuggestions({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
required String userSessionToken, required String userSessionToken,
required String sessionId, required String sessionId,
required int gender,
}) async { }) async {
final Map<String, dynamic> body = { final Map<String, dynamic> body = {
"age": { "age": {
"value": age, "value": age,
}, },
"gender": gender, "sex": sex,
"evidence": evidenceIds.map((id) => {"id": id}).toList(), "evidence": evidenceIds.map((id) => {"id": id}).toList(),
"language": language, "language": language,
"generalId": sessionId, "generalId": sessionId,
@ -363,9 +389,11 @@ class SymptomsCheckerRepoImp implements SymptomsCheckerRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {
// Parse response if it's a string // Parse response if it's a string
final Map<String, dynamic> responseData = response is String ? jsonDecode(response) : response; final Map<String, dynamic> responseData =
response is String ? jsonDecode(response) : response;
RiskAndSuggestionsResponseModel riskFactorsResponse = RiskAndSuggestionsResponseModel.fromJson(responseData); RiskAndSuggestionsResponseModel riskFactorsResponse =
RiskAndSuggestionsResponseModel.fromJson(responseData);
apiResponse = GenericApiModel<RiskAndSuggestionsResponseModel>( apiResponse = GenericApiModel<RiskAndSuggestionsResponseModel>(
messageStatus: messageStatus ?? 1, messageStatus: messageStatus ?? 1,

@ -1,6 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/data/organ_mapping_data.dart'; import 'package:hmg_patient_app_new/features/symptoms_checker/data/organ_mapping_data.dart';
@ -23,23 +23,6 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
required this.appState, required this.appState,
}); });
// Gender constants for both English and Arabic
static const String _maleEn = "male";
static const String _femaleEn = "female";
static const String _maleAr = "ذكر";
static const String _femaleAr = "أنثى";
/// Convert gender string to integer (1 for male, 2 for female)
/// Handles both English and Arabic values
int _getGenderAsInt(String? gender) {
if (gender == null) return 1; // Default to male
final lowerGender = gender.toLowerCase();
if (lowerGender == _maleEn || gender == _maleAr) {
return 1;
}
return 2; // Female or any other value
}
// State variables // State variables
bool isBodyHidden = false; bool isBodyHidden = false;
BodyView _currentView = BodyView.front; BodyView _currentView = BodyView.front;
@ -64,9 +47,12 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
TriageDataDetails? triageDataDetails; TriageDataDetails? triageDataDetails;
// Triage state // Triage state
int? _selectedTriageChoiceIndex; // Deprecated - keeping for backward compatibility int?
final Map<String, int> _selectedTriageChoicesByItemId = {}; // Map of itemId -> choiceIndex for multi-item questions _selectedTriageChoiceIndex; // Deprecated - keeping for backward compatibility
final List<Map<String, String>> _triageEvidenceList = []; // Store triage evidence with proper format final Map<String, int> _selectedTriageChoicesByItemId =
{}; // Map of itemId -> choiceIndex for multi-item questions
final List<Map<String, String>> _triageEvidenceList =
[]; // Store triage evidence with proper format
int _triageQuestionCount = 0; // Track number of triage questions answered int _triageQuestionCount = 0; // Track number of triage questions answered
// Selected risk factors tracking // Selected risk factors tracking
@ -80,7 +66,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
// User Info Flow State // User Info Flow State
int _userInfoCurrentPage = 0; int _userInfoCurrentPage = 0;
bool _isSinglePageEditMode = false; // Track if editing single page or full flow bool _isSinglePageEditMode =
false; // Track if editing single page or full flow
String? _selectedGender; String? _selectedGender;
DateTime? _dateOfBirth; DateTime? _dateOfBirth;
int? _selectedAge; int? _selectedAge;
@ -120,14 +107,17 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
String? get tooltipOrganId => _tooltipOrganId; String? get tooltipOrganId => _tooltipOrganId;
String get currentSessionAuthToken => symptomsUserDetailsResponseModel?.tokenDetails?.authToken ?? ""; String get currentSessionAuthToken =>
symptomsUserDetailsResponseModel?.tokenDetails?.authToken ?? "";
String get currentSessionId => symptomsUserDetailsResponseModel?.sessionId ?? ""; String get currentSessionId =>
symptomsUserDetailsResponseModel?.sessionId ?? "";
// Triage-related getters // Triage-related getters
bool get shouldStopTriage => triageDataDetails?.shouldStop ?? false; bool get shouldStopTriage => triageDataDetails?.shouldStop ?? false;
bool get hasEmergencyEvidence => triageDataDetails?.hasEmergencyEvidence ?? false; bool get hasEmergencyEvidence =>
triageDataDetails?.hasEmergencyEvidence ?? false;
String? get currentInterviewToken => triageDataDetails?.interviewToken; String? get currentInterviewToken => triageDataDetails?.interviewToken;
@ -147,13 +137,15 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Check if all items in current question have been answered /// Check if all items in current question have been answered
bool get areAllTriageItemsAnswered { bool get areAllTriageItemsAnswered {
if (currentTriageQuestion?.items == null || currentTriageQuestion!.items!.isEmpty) { if (currentTriageQuestion?.items == null ||
currentTriageQuestion!.items!.isEmpty) {
return false; return false;
} }
// Check if we have an answer for each item // Check if we have an answer for each item
for (var item in currentTriageQuestion!.items!) { for (var item in currentTriageQuestion!.items!) {
if (item.id != null && !_selectedTriageChoicesByItemId.containsKey(item.id)) { if (item.id != null &&
!_selectedTriageChoicesByItemId.containsKey(item.id)) {
return false; return false;
} }
} }
@ -161,7 +153,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
/// Get organs for current view /// Get organs for current view
List<OrganModel> get currentOrgans => OrganData.getOrgansForView(_currentView); List<OrganModel> get currentOrgans =>
OrganData.getOrgansForView(_currentView);
/// Get all selected organs from both views /// Get all selected organs from both views
List<OrganModel> get selectedOrgans { List<OrganModel> get selectedOrgans {
@ -169,7 +162,9 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
...OrganData.frontViewOrgans, ...OrganData.frontViewOrgans,
...OrganData.backViewOrgans, ...OrganData.backViewOrgans,
]; ];
return allOrgans.where((organ) => _selectedOrganIds.contains(organ.id)).toList(); return allOrgans
.where((organ) => _selectedOrganIds.contains(organ.id))
.toList();
} }
/// Check if any organs are selected /// Check if any organs are selected
@ -186,11 +181,13 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
int get totalSelectedSymptomsCount { int get totalSelectedSymptomsCount {
return _selectedSymptomsByOrgan.values.fold(0, (sum, symptomIds) => sum + symptomIds.length); return _selectedSymptomsByOrgan.values
.fold(0, (sum, symptomIds) => sum + symptomIds.length);
} }
bool get hasSelectedSymptoms { bool get hasSelectedSymptoms {
return _selectedSymptomsByOrgan.values.any((symptomIds) => symptomIds.isNotEmpty); return _selectedSymptomsByOrgan.values
.any((symptomIds) => symptomIds.isNotEmpty);
} }
/// Get risk factors list /// Get risk factors list
@ -216,7 +213,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
void toggleView() { void toggleView() {
_currentView = _currentView == BodyView.front ? BodyView.back : BodyView.front; _currentView =
_currentView == BodyView.front ? BodyView.back : BodyView.front;
notifyListeners(); notifyListeners();
} }
@ -319,7 +317,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
return; return;
} }
List<String> organNames = selectedOrgans.map((organ) => organ.name).toList(); List<String> organNames =
selectedOrgans.map((organ) => organ.name).toList();
await getBodySymptomsByName( await getBodySymptomsByName(
organNames: organNames, organNames: organNames,
@ -369,7 +368,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
} }
if (matchingOrganId != null && _selectedSymptomsByOrgan.containsKey(matchingOrganId)) { if (matchingOrganId != null &&
_selectedSymptomsByOrgan.containsKey(matchingOrganId)) {
final selectedIds = _selectedSymptomsByOrgan[matchingOrganId]!; final selectedIds = _selectedSymptomsByOrgan[matchingOrganId]!;
if (organResult.bodySymptoms != null) { if (organResult.bodySymptoms != null) {
@ -420,7 +420,10 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Get all selected risk factors /// Get all selected risk factors
List<RiskAndSuggestionsItemModel> getAllSelectedRiskFactors() { List<RiskAndSuggestionsItemModel> getAllSelectedRiskFactors() {
return riskFactorsList.where((factor) => factor.id != null && _selectedRiskFactorIds.contains(factor.id)).toList(); return riskFactorsList
.where((factor) =>
factor.id != null && _selectedRiskFactorIds.contains(factor.id))
.toList();
} }
/// Clear all risk factor selections /// Clear all risk factor selections
@ -453,11 +456,12 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
// Extract symptom IDs // Extract symptom IDs
List<String> evidenceIds = selectedSymptoms.where((s) => s.id != null).map((s) => s.id!).toList(); List<String> evidenceIds =
selectedSymptoms.where((s) => s.id != null).map((s) => s.id!).toList();
await getRiskFactors( await getRiskFactors(
age: _selectedAge!, age: _selectedAge!,
gender: _getGenderAsInt(_selectedGender), sex: _selectedGender!.toLowerCase(),
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
sessionId: currentSessionId, sessionId: currentSessionId,
language: appState.isArabic() ? 'ar' : 'en', language: appState.isArabic() ? 'ar' : 'en',
@ -477,7 +481,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Call Risk Factors API /// Call Risk Factors API
Future<void> getRiskFactors({ Future<void> getRiskFactors({
required int age, required int age,
required int gender, required String sex,
required String sessionId, required String sessionId,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
@ -489,11 +493,12 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getRiskFactors( final result = await symptomsCheckerRepo.getRiskFactors(
age: age, age: age,
gender: gender, sex: sex,
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
language: language, language: language,
sessionId: sessionId, sessionId: sessionId,
userSessionToken: currentSessionAuthToken, userSessionToken: currentSessionAuthToken,
gender: (selectedGender ?? "Male").toLowerCase() == "male" ? 1 : 2,
); );
result.fold( result.fold(
@ -510,13 +515,13 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
if (apiResponse.messageStatus == 1 && apiResponse.data != null) { if (apiResponse.messageStatus == 1 && apiResponse.data != null) {
riskFactorsResponse = apiResponse.data; riskFactorsResponse = apiResponse.data;
if (riskFactorsResponse != null && riskFactorsResponse!.dataDetails != null) { if (riskFactorsResponse != null &&
RiskAndSuggestionsItemModel riskFactorItem = RiskAndSuggestionsItemModel( riskFactorsResponse!.dataDetails != null) {
RiskAndSuggestionsItemModel riskFactorItem =
RiskAndSuggestionsItemModel(
id: "not_applicable", id: "not_applicable",
commonName: "Not Applicable", commonName: "Not Applicable",
name: "Not Applicable", name: "Not Applicable",
commonNameAr: "لا ينطبق",
nameAr: "لا ينطبق",
language: appState.isArabic() ? 'ar' : 'en', language: appState.isArabic() ? 'ar' : 'en',
type: null, type: null,
); );
@ -567,7 +572,10 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Get all selected risk factors /// Get all selected risk factors
List<RiskAndSuggestionsItemModel> getAllSelectedSuggestions() { List<RiskAndSuggestionsItemModel> getAllSelectedSuggestions() {
return suggestionsList.where((factor) => factor.id != null && _selectedSuggestionsIds.contains(factor.id)).toList(); return suggestionsList
.where((factor) =>
factor.id != null && _selectedSuggestionsIds.contains(factor.id))
.toList();
} }
/// Clear all risk factor selections /// Clear all risk factor selections
@ -582,15 +590,20 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
// Add selected symptoms // Add selected symptoms
final selectedSymptoms = getAllSelectedSymptoms(); final selectedSymptoms = getAllSelectedSymptoms();
evidenceIds.addAll(selectedSymptoms.where((s) => s.id != null).map((s) => s.id!)); evidenceIds
.addAll(selectedSymptoms.where((s) => s.id != null).map((s) => s.id!));
// Add selected risk factors (excluding "not_applicable") // Add selected risk factors (excluding "not_applicable")
final selectedRiskFactors = getAllSelectedRiskFactors(); final selectedRiskFactors = getAllSelectedRiskFactors();
evidenceIds.addAll(selectedRiskFactors.where((rf) => rf.id != null && rf.id != "not_applicable").map((rf) => rf.id!)); evidenceIds.addAll(selectedRiskFactors
.where((rf) => rf.id != null && rf.id != "not_applicable")
.map((rf) => rf.id!));
// Add selected suggestions (excluding "not_applicable") // Add selected suggestions (excluding "not_applicable")
final selectedSuggestions = getAllSelectedSuggestions(); final selectedSuggestions = getAllSelectedSuggestions();
evidenceIds.addAll(selectedSuggestions.where((s) => s.id != null && s.id != "not_applicable").map((s) => s.id!)); evidenceIds.addAll(selectedSuggestions
.where((s) => s.id != null && s.id != "not_applicable")
.map((s) => s.id!));
return evidenceIds; return evidenceIds;
} }
@ -619,19 +632,23 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
} }
// Extract symptom IDs // Extract symptom IDs
List<String> evidenceIds = selectedSymptoms.where((s) => s.id != null).map((s) => s.id!).toList(); List<String> evidenceIds =
selectedSymptoms.where((s) => s.id != null).map((s) => s.id!).toList();
// Get all selected symptoms // Get all selected symptoms
final selectedRisks = getAllSelectedRiskFactors(); final selectedRisks = getAllSelectedRiskFactors();
if (selectedRisks.isNotEmpty) { if (selectedRisks.isNotEmpty) {
List<String> evidenceRisksIds = selectedRisks.where((s) => s.id != null && s.id != "not_applicable").map((s) => s.id!).toList(); List<String> evidenceRisksIds = selectedRisks
.where((s) => s.id != null && s.id != "not_applicable")
.map((s) => s.id!)
.toList();
evidenceIds.addAll(evidenceRisksIds); evidenceIds.addAll(evidenceRisksIds);
} }
await getSuggestions( await getSuggestions(
age: _selectedAge!, age: _selectedAge!,
gender: _getGenderAsInt(_selectedGender), sex: _selectedGender!.toLowerCase(),
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
language: appState.isArabic() ? 'ar' : 'en', language: appState.isArabic() ? 'ar' : 'en',
onSuccess: (response) { onSuccess: (response) {
@ -650,7 +667,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Call Suggestions API /// Call Suggestions API
Future<void> getSuggestions({ Future<void> getSuggestions({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
required String language, required String language,
Function(RiskAndSuggestionsResponseModel)? onSuccess, Function(RiskAndSuggestionsResponseModel)? onSuccess,
@ -661,11 +678,12 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getSuggestions( final result = await symptomsCheckerRepo.getSuggestions(
age: age, age: age,
gender: gender, sex: sex,
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
language: language, language: language,
sessionId: currentSessionId, sessionId: currentSessionId,
userSessionToken: currentSessionAuthToken, userSessionToken: currentSessionAuthToken,
gender: (selectedGender ?? "Male").toLowerCase() == "male" ? 1 : 2,
); );
result.fold( result.fold(
@ -682,13 +700,13 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
if (apiResponse.messageStatus == 1 && apiResponse.data != null) { if (apiResponse.messageStatus == 1 && apiResponse.data != null) {
suggestionsResponse = apiResponse.data; suggestionsResponse = apiResponse.data;
if (suggestionsResponse != null && suggestionsResponse!.dataDetails != null) { if (suggestionsResponse != null &&
RiskAndSuggestionsItemModel riskFactorItem = RiskAndSuggestionsItemModel( suggestionsResponse!.dataDetails != null) {
RiskAndSuggestionsItemModel riskFactorItem =
RiskAndSuggestionsItemModel(
id: "not_applicable", id: "not_applicable",
commonName: "Not Applicable", commonName: "Not Applicable",
name: "Not Applicable", name: "Not Applicable",
commonNameAr: "لا ينطبق",
nameAr: "لا ينطبق",
language: appState.isArabic() ? 'ar' : 'en', language: appState.isArabic() ? 'ar' : 'en',
type: null, type: null,
); );
@ -712,7 +730,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
/// Call Diagnosis API for Triage - This is called iteratively until shouldStop is true /// Call Diagnosis API for Triage - This is called iteratively until shouldStop is true
Future<void> getDiagnosisForTriage({ Future<void> getDiagnosisForTriage({
required int age, required int age,
required int gender, required String sex,
required List<String> evidenceIds, required List<String> evidenceIds,
List<Map<String, String>>? triageEvidence, List<Map<String, String>>? triageEvidence,
required String language, required String language,
@ -724,12 +742,13 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getDiagnosisForTriage( final result = await symptomsCheckerRepo.getDiagnosisForTriage(
age: age, age: age,
gender: gender, sex: sex,
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
triageEvidence: triageEvidence, triageEvidence: triageEvidence,
language: language, language: language,
sessionId: currentSessionId, sessionId: currentSessionId,
userSessionToken: currentSessionAuthToken, userSessionToken: currentSessionAuthToken,
gender: (selectedGender ?? "Male").toLowerCase() == "male" ? 1 : 2,
); );
result.fold( result.fold(
@ -785,7 +804,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
await getDiagnosisForTriage( await getDiagnosisForTriage(
age: _selectedAge!, age: _selectedAge!,
gender: _getGenderAsInt(_selectedGender), sex: _selectedGender!.toLowerCase(),
evidenceIds: evidenceIds, evidenceIds: evidenceIds,
language: appState.isArabic() ? 'ar' : 'en', language: appState.isArabic() ? 'ar' : 'en',
onSuccess: (response) { onSuccess: (response) {
@ -922,7 +941,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
// Calculate age from date of birth // Calculate age from date of birth
final now = DateTime.now(); final now = DateTime.now();
int age = now.year - dateOfBirth.year; int age = now.year - dateOfBirth.year;
if (now.month < dateOfBirth.month || (now.month == dateOfBirth.month && now.day < dateOfBirth.day)) { if (now.month < dateOfBirth.month ||
(now.month == dateOfBirth.month && now.day < dateOfBirth.day)) {
age--; age--;
} }
_selectedAge = age; _selectedAge = age;
@ -948,22 +968,6 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
bool get isUserInfoFirstPage => _userInfoCurrentPage == 0; bool get isUserInfoFirstPage => _userInfoCurrentPage == 0;
/// Check if current user info page has valid selection
bool get isCurrentUserInfoPageValid {
switch (_userInfoCurrentPage) {
case 0: // Gender page
return _selectedGender != null && _selectedGender!.isNotEmpty;
case 1: // Age/Birth date page
return _dateOfBirth != null || (_selectedAge != null && _selectedAge! > 0);
case 2: // Height page
return _selectedHeight > 0;
case 3: // Weight page
return _selectedWeight > 0;
default:
return false;
}
}
/// Validate and submit user info /// Validate and submit user info
Map<String, dynamic> getUserInfoData() { Map<String, dynamic> getUserInfoData() {
return { return {
@ -985,7 +989,8 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
}) async { }) async {
isBodySymptomsLoading = true; isBodySymptomsLoading = true;
notifyListeners(); notifyListeners();
final result = await symptomsCheckerRepo.getUserDetails(userName: userName, password: password); final result = await symptomsCheckerRepo.getUserDetails(
userName: userName, password: password);
result.fold( result.fold(
(failure) async { (failure) async {
@ -1025,7 +1030,7 @@ class SymptomsCheckerViewModel extends ChangeNotifier {
final result = await symptomsCheckerRepo.getBodySymptomsByName( final result = await symptomsCheckerRepo.getBodySymptomsByName(
organNames: organNames, organNames: organNames,
userSessionToken: currentSessionAuthToken, userSessionToken: currentSessionAuthToken,
gender: _getGenderAsInt(selectedGender ?? "Male"), gender: (selectedGender ?? "Male").toLowerCase() == "male" ? 1 : 2,
); );
result.fold( result.fold(

@ -48,8 +48,6 @@ abstract class TodoSectionRepo {
}); });
Future<Either<Failure, dynamic>> applePayInsertRequest({required dynamic applePayInsertRequest}); Future<Either<Failure, dynamic>> applePayInsertRequest({required dynamic applePayInsertRequest});
Future<Either<Failure, dynamic>> getPatientDashboard();
} }
class TodoSectionRepoImp implements TodoSectionRepo { class TodoSectionRepoImp implements TodoSectionRepo {
@ -378,29 +376,4 @@ class TodoSectionRepoImp implements TodoSectionRepo {
return Left(UnknownFailure(e.toString())); return Left(UnknownFailure(e.toString()));
} }
} }
@override
Future<Either<Failure, dynamic>> getPatientDashboard() async {
Map<String, dynamic> mapDevice = {};
try {
dynamic apiResponse;
Failure? failure;
await apiClient.post(
DASHBOARD,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
apiResponse = response;
},
);
if (failure != null) return Left(failure!);
return Right(apiResponse);
} catch (e) {
loggerService.logError("Unknown error in applePayInsertRequest: ${e.toString()}");
return Left(UnknownFailure(e.toString()));
}
}
} }

@ -10,15 +10,11 @@ class TodoSectionViewModel extends ChangeNotifier {
TodoSectionViewModel({required this.todoSectionRepo, required this.errorHandlerService}); TodoSectionViewModel({required this.todoSectionRepo, required this.errorHandlerService});
String? notificationsCount = "0";
initializeTodoSectionViewModel() async { initializeTodoSectionViewModel() async {
patientAncillaryOrdersList.clear(); patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true; isAncillaryOrdersLoading = true;
isAncillaryDetailsProceduresLoading = true; isAncillaryDetailsProceduresLoading = true;
notificationsCount = "0"; await getPatientOnlineAncillaryOrderList();
getPatientOnlineAncillaryOrderList();
getPatientDashboard();
} }
bool isAncillaryOrdersLoading = false; bool isAncillaryOrdersLoading = false;
@ -32,28 +28,6 @@ class TodoSectionViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Future<void> getPatientDashboard({Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await todoSectionRepo.getPatientDashboard();
result.fold(
(failure) async {
await errorHandlerService.handleError(failure: failure);
},
(apiResponse) {
// if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
// } else if (apiResponse.messageStatus == 1) {
notificationsCount =
apiResponse['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : apiResponse['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
// }
},
);
}
Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientOnlineAncillaryOrderList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
patientAncillaryOrdersList.clear(); patientAncillaryOrdersList.clear();
isAncillaryOrdersLoading = true; isAncillaryOrdersLoading = true;

@ -1,6 +1,5 @@
import 'dart:developer'; import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -15,7 +14,6 @@ import 'package:hmg_patient_app_new/features/water_monitor/models/update_user_de
import 'package:hmg_patient_app_new/features/water_monitor/models/user_progress_models.dart'; import 'package:hmg_patient_app_new/features/water_monitor/models/user_progress_models.dart';
import 'package:hmg_patient_app_new/features/water_monitor/models/water_cup_model.dart'; import 'package:hmg_patient_app_new/features/water_monitor/models/water_cup_model.dart';
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_repo.dart'; import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/services/error_handler_service.dart';
@ -600,36 +598,36 @@ class WaterMonitorViewModel extends ChangeNotifier {
String? validateAge() { String? validateAge() {
if (ageController.text.trim().isEmpty) { if (ageController.text.trim().isEmpty) {
return LocaleKeys.ageIsRequired.tr(); return 'Age is required'.needTranslation;
} }
final age = int.tryParse(ageController.text.trim()); final age = int.tryParse(ageController.text.trim());
if (age == null) { if (age == null) {
return LocaleKeys.invalidAge.tr(); return 'Invalid age'.needTranslation;
} }
if (age < 11 || age > 120) { if (age < 11 || age > 120) {
return LocaleKeys.ageMustBeBetween11And120.tr(); return 'Age must be between 11 and 120'.needTranslation;
} }
return null; return null;
} }
String? validateHeight() { String? validateHeight() {
if (heightController.text.trim().isEmpty) { if (heightController.text.trim().isEmpty) {
return LocaleKeys.heightIsRequired.tr(); return 'Height is required'.needTranslation;
} }
final height = double.tryParse(heightController.text.trim()); final height = double.tryParse(heightController.text.trim());
if (height == null || height <= 0) { if (height == null || height <= 0) {
return LocaleKeys.invalidHeight.tr(); return 'Invalid height'.needTranslation;
} }
return null; return null;
} }
String? validateWeight() { String? validateWeight() {
if (weightController.text.trim().isEmpty) { if (weightController.text.trim().isEmpty) {
return LocaleKeys.weightIsRequired.tr(); return 'Weight is required'.needTranslation;
} }
final weight = double.tryParse(weightController.text.trim()); final weight = double.tryParse(weightController.text.trim());
if (weight == null || weight <= 0) { if (weight == null || weight <= 0) {
return LocaleKeys.invalidWeight.tr(); return 'Invalid weight'.needTranslation;
} }
return null; return null;
} }
@ -1214,8 +1212,8 @@ class WaterMonitorViewModel extends ChangeNotifier {
// Schedule water reminders // Schedule water reminders
await notificationService.scheduleWaterReminders( await notificationService.scheduleWaterReminders(
reminderTimes: reminderTimes, reminderTimes: reminderTimes,
title: LocaleKeys.timeToDrinkWater.tr(), title: 'Time to Drink Water! 💧'.needTranslation,
body: LocaleKeys.stayHydratedDrinkWater.tr(namedArgs: {'amount': selectedCupCapacityMl.toString()}), body: 'Stay hydrated! Drink ${selectedCupCapacityMl}ml of water.'.needTranslation,
); );
// Save reminder enabled state to cache // Save reminder enabled state to cache
@ -1336,8 +1334,8 @@ class WaterMonitorViewModel extends ChangeNotifier {
await notificationService.scheduleNotification( await notificationService.scheduleNotification(
id: 9999, id: 9999,
// Use a unique ID for test notifications // Use a unique ID for test notifications
title: LocaleKeys.timeToDrinkWater.tr(), title: 'Time to Drink Water! 💧'.needTranslation,
body: LocaleKeys.stayHydratedDrinkWater.tr(namedArgs: {'amount': selectedCupCapacityMl.toString()}), body: 'Stay hydrated! Drink ${selectedCupCapacityMl}ml of water.'.needTranslation,
scheduledDate: scheduledTime, scheduledDate: scheduledTime,
payload: 'test_notification', payload: 'test_notification',
); );

@ -693,7 +693,11 @@ abstract class LocaleKeys {
static const bikini = 'bikini'; static const bikini = 'bikini';
static const totalMinutes = 'totalMinutes'; static const totalMinutes = 'totalMinutes';
static const feedback = 'feedback'; static const feedback = 'feedback';
static const send = 'send';
static const status = 'status';
static const likeToHear = 'likeToHear'; static const likeToHear = 'likeToHear';
static const subject = 'subject';
static const message = 'message';
static const emptySubject = 'emptySubject'; static const emptySubject = 'emptySubject';
static const emptyMessage = 'emptyMessage'; static const emptyMessage = 'emptyMessage';
static const selectAttachment = 'selectAttachment'; static const selectAttachment = 'selectAttachment';
@ -872,645 +876,5 @@ abstract class LocaleKeys {
static const laserClinic = 'laserClinic'; static const laserClinic = 'laserClinic';
static const continueString = 'continueString'; static const continueString = 'continueString';
static const covid_info = 'covid_info'; static const covid_info = 'covid_info';
static const appointmentDetails = 'appointmentDetails';
static const checkingDoctorAvailability = 'checkingDoctorAvailability';
static const cancellingAppointmentPleaseWait = 'cancellingAppointmentPleaseWait';
static const appointmentCancelledSuccessfully = 'appointmentCancelledSuccessfully';
static const notConfirmed = 'notConfirmed';
static const appointmentStatus = 'appointmentStatus';
static const doctorWillCallYou = 'doctorWillCallYou';
static const getDirections = 'getDirections';
static const notifyMeBeforeAppointment = 'notifyMeBeforeAppointment';
static const fetchingLabResults = 'fetchingLabResults';
static const fetchingRadiologyResults = 'fetchingRadiologyResults';
static const fetchingAppointmentPrescriptions = 'fetchingAppointmentPrescriptions';
static const noPrescriptionsForAppointment = 'noPrescriptionsForAppointment';
static const amountBeforeTax = 'amountBeforeTax';
static const rebookAppointment = 'rebookAppointment';
static const fetchingDoctorSchedulePleaseWait = 'fetchingDoctorSchedulePleaseWait';
static const pickADate = 'pickADate';
static const confirmingAppointmentPleaseWait = 'confirmingAppointmentPleaseWait';
static const appointmentConfirmedSuccessfully = 'appointmentConfirmedSuccessfully';
static const appointmentPayment = 'appointmentPayment';
static const checkingPaymentStatusPleaseWait = 'checkingPaymentStatusPleaseWait';
static const paymentFailedPleaseTryAgain = 'paymentFailedPleaseTryAgain';
static const appointmentCheckIn = 'appointmentCheckIn';
static const insuranceExpiredOrInactive = 'insuranceExpiredOrInactive';
static const totalAmountToPay = 'totalAmountToPay';
static const vat15 = 'vat15';
static const liveCare = 'liveCare';
static const recentVisits = 'recentVisits';
static const searchByClinic = 'searchByClinic';
static const tapToSelectClinic = 'tapToSelectClinic';
static const searchByDoctor = 'searchByDoctor';
static const tapToSelect = 'tapToSelect';
static const searchByRegion = 'searchByRegion';
static const centralRegion = 'centralRegion';
static const immediateConsultation = 'immediateConsultation';
static const scheduledConsultation = 'scheduledConsultation';
static const pharmaLiveCare = 'pharmaLiveCare';
static const notSureHelpMeChooseClinic = 'notSureHelpMeChooseClinic';
static const mentionYourSymptomsAndFindDoctors = 'mentionYourSymptomsAndFindDoctors';
static const immediateService = 'immediateService';
static const noNeedToWaitGetMedicalConsultation = 'noNeedToWaitGetMedicalConsultation';
static const noVisitRequired = 'noVisitRequired';
static const doctorWillContact = 'doctorWillContact';
static const specialisedDoctorWillContactYou = 'specialisedDoctorWillContactYou';
static const freeMedicineDelivery = 'freeMedicineDelivery';
static const offersFreeMedicineDelivery = 'offersFreeMedicineDelivery';
static const dentalChiefComplaints = 'dentalChiefComplaints';
static const viewAvailableAppointments = 'viewAvailableAppointments';
static const doctorProfile = 'doctorProfile';
static const waitingAppointment = 'waitingAppointment';
static const hospitalInformation = 'hospitalInformation';
static const fetchingAppointmentShare = 'fetchingAppointmentShare';
static const bookingYourAppointment = 'bookingYourAppointment';
static const selectLiveCareClinic = 'selectLiveCareClinic';
static const checkingForExistingDentalPlan = 'checkingForExistingDentalPlan';
static const dentalTreatmentPlan = 'dentalTreatmentPlan';
static const youHaveExistingTreatmentPlan = 'youHaveExistingTreatmentPlan';
static const mins = 'mins';
static const totalTimeRequired = 'totalTimeRequired';
static const wouldYouLikeToContinue = 'wouldYouLikeToContinue';
static const chooseDoctor = 'chooseDoctor';
static const viewNearestAppos = 'viewNearestAppos';
static const noDoctorFound = 'noDoctorFound';
static const yesPleasImInAHurry = 'yesPleasImInAHurry';
static const fetchingFeesPleaseWait = 'fetchingFeesPleaseWait';
static const noThanksPhysicalVisit = 'noThanksPhysicalVisit';
static const offline = 'offline';
static const videoCall = 'videoCall';
static const liveVideoCallWithHMGDoctors = 'liveVideoCallWithHMGDoctors';
static const audioCall = 'audioCall';
static const phoneCall = 'phoneCall';
static const livePhoneCallWithHMGDoctors = 'livePhoneCallWithHMGDoctors';
static const reviewLiveCareRequest = 'reviewLiveCareRequest';
static const selectedLiveCareType = 'selectedLiveCareType';
static const selectLiveCareCallType = 'selectLiveCareCallType';
static const confirmingLiveCareRequest = 'confirmingLiveCareRequest';
static const unknownErrorOccurred = 'unknownErrorOccurred';
static const liveCarePermissionsMessage = 'liveCarePermissionsMessage';
static const liveCarePayment = 'liveCarePayment';
static const mada = 'mada';
static const visaOrMastercard = 'visaOrMastercard';
static const tamara = 'tamara';
static const fetchingApplePayDetails = 'fetchingApplePayDetails';
static const liveCarePendingRequest = 'liveCarePendingRequest';
static const callLiveCareSupport = 'callLiveCareSupport';
static const whatIsWaitingAppointment = 'whatIsWaitingAppointment';
static const waitingAppointmentsFeature = 'waitingAppointmentsFeature';
static const appointmentWithDoctorConfirmed = 'appointmentWithDoctorConfirmed';
static const paymentWithinTenMinutes = 'paymentWithinTenMinutes';
static const liveLocation = 'liveLocation';
static const verifyYourLocationAtHospital = 'verifyYourLocationAtHospital';
static const error = 'error';
static const ensureWithinHospitalLocation = 'ensureWithinHospitalLocation';
static const nfcNearFieldCommunication = 'nfcNearFieldCommunication';
static const scanPhoneViaNFC = 'scanPhoneViaNFC';
static const qrCode = 'qrCode';
static const scanQRCodeToCheckIn = 'scanQRCodeToCheckIn';
static const processingCheckIn = 'processingCheckIn';
static const bookingWaitingAppointment = 'bookingWaitingAppointment';
static const enterValidIDorIqama = 'enterValidIDorIqama';
static const selectAppointment = 'selectAppointment';
static const rebookSameDoctor = 'rebookSameDoctor';
static const queueing = 'queueing';
static const inQueue = 'inQueue';
static const yourTurn = 'yourTurn';
static const halaFirstName = 'halaFirstName';
static const thankYouForPatience = 'thankYouForPatience';
static const servingNow = 'servingNow';
static const callForVitalSigns = 'callForVitalSigns';
static const callForDoctor = 'callForDoctor';
static const thingsToAskDoctor = 'thingsToAskDoctor';
static const improveOverallHealth = 'improveOverallHealth';
static const routineScreenings = 'routineScreenings';
static const whatIsThisMedicationFor = 'whatIsThisMedicationFor';
static const sideEffectsToKnow = 'sideEffectsToKnow';
static const whenFollowUp = 'whenFollowUp';
static const goToHomepage = 'goToHomepage';
static const appointmentsList = 'appointmentsList';
static const allAppt = 'allAppt';
static const upcoming = 'upcoming';
static const completed = 'completed';
static const noAppointmentsYet = 'noAppointmentsYet';
static const viewProfile = 'viewProfile';
static const choosePreferredHospitalForService = 'choosePreferredHospitalForService';
static const noHospitalsFound = 'noHospitalsFound';
static const cancelOrderConfirmation = 'cancelOrderConfirmation';
static const orderCancelledSuccessfully = 'orderCancelledSuccessfully';
static const requestID = 'requestID';
static const noCMCOrdersYet = 'noCMCOrdersYet';
static const cmcOrders = 'cmcOrders';
static const summary = 'summary';
static const selectedService = 'selectedService';
static const requestSubmittedSuccessfully = 'requestSubmittedSuccessfully';
static const hereIsYourRequestNumber = 'hereIsYourRequestNumber';
static const pleaseSelectHospitalToContinue = 'pleaseSelectHospitalToContinue';
static const confirmSubmitRequest = 'confirmSubmitRequest';
static const pendingOrderWait = 'pendingOrderWait';
static const noServicesAvailable = 'noServicesAvailable';
static const selectAService = 'selectAService';
static const comprehensiveCheckup = 'comprehensiveCheckup';
static const viewNearestHMGLocations = 'viewNearestHMGLocations';
static const provideFeedbackOnServices = 'provideFeedbackOnServices';
static const liveChatWithHMG = 'liveChatWithHMG';
static const send = 'send';
static const status = 'status';
static const sendingFeedback = 'sendingFeedback';
static const selectFeedbackType = 'selectFeedbackType';
static const loadingAppointmentsList = 'loadingAppointmentsList';
static const noAppointmentsForFeedback = 'noAppointmentsForFeedback';
static const selectedAppointment = 'selectedAppointment';
static const subject = 'subject';
static const enterSubjectHere = 'enterSubjectHere';
static const message = 'message';
static const enterMessageHere = 'enterMessageHere';
static const filesSelected = 'filesSelected';
static const otherDetails = 'otherDetails';
static const medicalReport = 'medicalReport';
static const medicalReportNumber = 'medicalReportNumber';
static const patientIsInsured = 'patientIsInsured';
static const insuranceDocument = 'insuranceDocument';
static const selectBranch = 'selectBranch';
static const patientInformation = 'patientInformation';
static const patientLocation = 'patientLocation';
static const identificationNumber = 'identificationNumber';
static const enterIdentificationNumber = 'enterIdentificationNumber';
static const patientName = 'patientName';
static const referralRequesterInformation = 'referralRequesterInformation';
static const enterReferralRequesterName = 'enterReferralRequesterName';
static const requesterName = 'requesterName';
static const relationship = 'relationship';
static const selectRelation = 'selectRelation';
static const otherName = 'otherName';
static const otherNameHint = 'otherNameHint';
static const requesterNameRequired = 'requesterNameRequired';
static const selectRelationshipRequired = 'selectRelationshipRequired';
static const otherRelationshipNameRequired = 'otherRelationshipNameRequired';
static const identificationNumberRequired = 'identificationNumberRequired';
static const patientNameRequired = 'patientNameRequired';
static const enterPatientPhoneRequired = 'enterPatientPhoneRequired';
static const selectPatientCityRequired = 'selectPatientCityRequired';
static const medicalReportRequired = 'medicalReportRequired';
static const selectBranchRequired = 'selectBranchRequired';
static const insuranceDocumentRequired = 'insuranceDocumentRequired';
static const searchResult = 'searchResult';
static const referralNo = 'referralNo';
static const eReferral = 'eReferral';
static const referralCreatedSuccessfully = 'referralCreatedSuccessfully';
static const hereIsYourReferralNumber = 'hereIsYourReferralNumber';
static const searchEReferral = 'searchEReferral';
static const enterRequiredInfoToSearch = 'enterRequiredInfoToSearch';
static const selectPickupDirection = 'selectPickupDirection';
static const selectDirection = 'selectDirection';
static const toHospital = 'toHospital';
static const fromHospital = 'fromHospital';
static const selectWay = 'selectWay';
static const oneWay = 'oneWay';
static const twoWay = 'twoWay';
static const selectPickupDetails = 'selectPickupDetails';
static const pleaseSelectDetailsOfPickup = 'pleaseSelectDetailsOfPickup';
static const selectDetails = 'selectDetails';
static const work = 'work';
static const pick = 'pick';
static const insideTheHome = 'insideTheHome';
static const haveAnyAppointment = 'haveAnyAppointment';
static const amountPaidAtHospital = 'amountPaidAtHospital';
static const submitRequest = 'submitRequest';
static const enterPickupLocationManually = 'enterPickupLocationManually';
static const enterPickupLocation = 'enterPickupLocation';
static const trackingDetails = 'trackingDetails';
static const cancelRequest = 'cancelRequest';
static const shareLocationWhatsapp = 'shareLocationWhatsapp';
static const pleaseWaitForCall = 'pleaseWaitForCall';
static const toHospitalLower = 'toHospitalLower';
static const contact = 'contact';
static const failed = 'failed';
static const confirmationCall = 'confirmationCall';
static const pickupFromHome = 'pickupFromHome';
static const onTheWayToHospital = 'onTheWayToHospital';
static const arrivedAtHospital = 'arrivedAtHospital';
static const orderCancel = 'orderCancel';
static const emergencyCheckIn = 'emergencyCheckIn';
static const erOnlineCheckInDescription = 'erOnlineCheckInDescription';
static const erOnlineCheckInSuccess = 'erOnlineCheckInSuccess';
static const erOnlineCheckInError = 'erOnlineCheckInError';
static const fetchingHospitalsList = 'fetchingHospitalsList';
static const fetchingPaymentInformation = 'fetchingPaymentInformation';
static const erVisitDetails = 'erVisitDetails';
static const erClinic = 'erClinic';
static const vatWithAmount = 'vatWithAmount';
static const erAppointmentBookedSuccess = 'erAppointmentBookedSuccess';
static const underProcessing = 'underProcessing';
static const canceledByPatient = 'canceledByPatient';
static const rapidResponseTeam = 'rapidResponseTeam';
static const allFacilities = 'allFacilities';
static const selectLocation = 'selectLocation';
static const pleaseSelectTheLocation = 'pleaseSelectTheLocation';
static const viewLocationGoogleMaps = 'viewLocationGoogleMaps';
static const callAmbulance = 'callAmbulance';
static const requestAmbulanceInEmergency = 'requestAmbulanceInEmergency';
static const confirmation = 'confirmation';
static const areYouSureYouWantToCallAmbulance = 'areYouSureYouWantToCallAmbulance';
static const getDetailsOfNearestBranch = 'getDetailsOfNearestBranch';
static const areYouSureYouWantToCallRRT = 'areYouSureYouWantToCallRRT';
static const priorERCheckInToSkipLine = 'priorERCheckInToSkipLine';
static const areYouSureYouWantToMakeERCheckIn = 'areYouSureYouWantToMakeERCheckIn';
static const checkingYourERAppointmentStatus = 'checkingYourERAppointmentStatus';
static const transportOptions = 'transportOptions';
static const selectHospitalForAdvancePayment = 'selectHospitalForAdvancePayment';
static const recharge = 'recharge';
static const activityLevel = 'activityLevel';
static const selectActivityLevel = 'selectActivityLevel';
static const caloriesPerDay = 'caloriesPerDay';
static const dietType = 'dietType';
static const selectDietType = 'selectDietType';
static const bodyFrameSize = 'bodyFrameSize';
static const selectBodyFrameSize = 'selectBodyFrameSize';
static const averageCycleLength = 'averageCycleLength';
static const averageLutealPhase = 'averageLutealPhase';
static const convert = 'convert';
static const calculate = 'calculate';
static const healthCalculators = 'healthCalculators';
static const healthConverters = 'healthConverters';
static const generalHealth = 'generalHealth';
static const relatedToBMICalories = 'relatedToBMICalories';
static const selectCalculator = 'selectCalculator';
static const womensHealth = 'womensHealth';
static const relatedToPeriodsOvulation = 'relatedToPeriodsOvulation';
static const bloodSugar = 'bloodSugar';
static const trackYourGlucoseLevels = 'trackYourGlucoseLevels';
static const bloodCholesterol = 'bloodCholesterol';
static const monitorCholesterolLevels = 'monitorCholesterolLevels';
static const triglyceridesFatBlood = 'triglyceridesFatBlood';
static const understandTriglyceridesImpact = 'understandTriglyceridesImpact';
static const bmiCalculator = 'bmiCalculator';
static const caloriesCalculator = 'caloriesCalculator';
static const bmrCalculator = 'bmrCalculator';
static const idealBodyWeight = 'idealBodyWeight';
static const bodyFatCalculator = 'bodyFatCalculator';
static const carbsProteinFat = 'carbsProteinFat';
static const ovulationPeriod = 'ovulationPeriod';
static const deliveryDueDate = 'deliveryDueDate';
static const low = 'low';
static const preDiabetic = 'preDiabetic';
static const high = 'high';
static const elevated = 'elevated';
static const recorded = 'recorded';
static const noRecordsYet = 'noRecordsYet';
static const lastRecord = 'lastRecord';
static const addBloodSugar = 'addBloodSugar';
static const addBloodPressure = 'addBloodPressure';
static const addWeight = 'addWeight';
static const bloodSugarDataSavedSuccessfully = 'bloodSugarDataSavedSuccessfully';
static const bloodPressureDataSavedSuccessfully = 'bloodPressureDataSavedSuccessfully';
static const weightDataSavedSuccessfully = 'weightDataSavedSuccessfully';
static const pleaseWait = 'pleaseWait';
static const selectUnit = 'selectUnit';
static const selectMeasureTime = 'selectMeasureTime';
static const selectArm = 'selectArm';
static const enterBloodSugar = 'enterBloodSugar';
static const enterSystolicValue = 'enterSystolicValue';
static const enterDiastolicValue = 'enterDiastolicValue';
static const enterWeight = 'enterWeight';
static const selectDuration = 'selectDuration';
static const systolic = 'systolic';
static const diastolic = 'diastolic';
static const sendReportByEmail = 'sendReportByEmail';
static const enterYourEmailToReceiveReport = 'enterYourEmailToReceiveReport';
static const addNewRecord = 'addNewRecord';
static const healthTrackers = 'healthTrackers';
static const monitorBloodPressureLevels = 'monitorBloodPressureLevels';
static const trackWeightProgress = 'trackWeightProgress';
static const bookAppointment = 'bookAppointment';
static const completeCheckup = 'completeCheckup';
static const indoorNavigation = 'indoorNavigation';
static const eReferralServices = 'eReferralServices';
static const dailyWaterMonitor = 'dailyWaterMonitor';
static const fetchingYourWaterIntakeDetails = 'fetchingYourWaterIntakeDetails';
static const healthCalculatorsServices = 'healthCalculatorsServices';
static const healthConvertersServices = 'healthConvertersServices';
static const smartWatchesServices = 'smartWatchesServices';
static const exploreServices = 'exploreServices';
static const medicalAndCareServices = 'medicalAndCareServices';
static const hmgServices = 'hmgServices';
static const personalServices = 'personalServices';
static const habibWallet = 'habibWallet';
static const loginToViewWalletBalance = 'loginToViewWalletBalance';
static const loginToViewMedicalFile = 'loginToViewMedicalFile';
static const addMember = 'addMember';
static const addFamilyMember = 'addFamilyMember';
static const pleaseFillBelowFieldToAddNewFamilyMember = 'pleaseFillBelowFieldToAddNewFamilyMember';
static const healthTools = 'healthTools';
static const supportServices = 'supportServices';
static const virtualTour = 'virtualTour';
static const carParking = 'carParking';
static const latestNews = 'latestNews';
static const hmgContact = 'hmgContact';
static const durationCannotExceed90 = 'durationCannotExceed90';
static const unexpectedError = 'unexpectedError';
static const gettingAmbulanceTransportOption = 'gettingAmbulanceTransportOption';
static const fetchingAppointment = 'fetchingAppointment';
static const doYouWantToCancelTheRequest = 'doYouWantToCancelTheRequest';
static const cancellingRequest = 'cancellingRequest';
static const fetchingTermsAndConditions = 'fetchingTermsAndConditions';
static const selectLocationPrescriptionDelivery = 'selectLocationPrescriptionDelivery';
static const noRadiologyOrders = 'noRadiologyOrders';
static const ageIsRequired = 'ageIsRequired';
static const invalidAge = 'invalidAge';
static const ageMustBeBetween11And120 = 'ageMustBeBetween11And120';
static const heightIsRequired = 'heightIsRequired';
static const invalidHeight = 'invalidHeight';
static const weightIsRequired = 'weightIsRequired';
static const invalidWeight = 'invalidWeight';
static const timeToDrinkWater = 'timeToDrinkWater';
static const stayHydratedDrinkWater = 'stayHydratedDrinkWater';
static const visitPharmacyOnline = 'visitPharmacyOnline';
static const howAreYouFeelingToday = 'howAreYouFeelingToday';
static const checkYourSymptomsWithScale = 'checkYourSymptomsWithScale';
static const checkYourSymptoms = 'checkYourSymptoms';
static const noUpcomingAppointmentPleaseBook = 'noUpcomingAppointmentPleaseBook';
static const youHaveEROnlineCheckInRequest = 'youHaveEROnlineCheckInRequest';
static const quickLinks = 'quickLinks';
static const viewMedicalFileLandingPage = 'viewMedicalFileLandingPage';
static const immediateLiveCareRequest = 'immediateLiveCareRequest';
static const yourTurnIsAfterPatients = 'yourTurnIsAfterPatients';
static const dontHaveHHCOrders = 'dontHaveHHCOrders';
static const hhcOrders = 'hhcOrders';
static const requestedServices = 'requestedServices';
static const selectServices = 'selectServices';
static const selectedServices = 'selectedServices';
static const createNewRequest = 'createNewRequest';
static const youHaveNoPendingRequests = 'youHaveNoPendingRequests';
static const noInsuranceDataFound = 'noInsuranceDataFound';
static const noInsuranceUpdateRequest = 'noInsuranceUpdateRequest';
static const policyNumberInsurancePage = 'policyNumberInsurancePage';
static const insuranceExpired = 'insuranceExpired';
static const insuranceActive = 'insuranceActive';
static const patientCardID = 'patientCardID';
static const noInsuranceApprovals = 'noInsuranceApprovals';
static const noInsuranceWithHMG = 'noInsuranceWithHMG';
static const referenceRange = 'referenceRange';
static const downloadReport = 'downloadReport';
static const generatingReport = 'generatingReport';
static const noLabResults = 'noLabResults';
static const labResultDetails = 'labResultDetails';
static const resultOf = 'resultOf';
static const whatIsThisResult = 'whatIsThisResult';
static const lastTested = 'lastTested';
static const byVisit = 'byVisit';
static const byTest = 'byTest';
static const results = 'results';
static const viewResults = 'viewResults';
static const rebook = 'rebook';
static const noOphthalmologyAppointments = 'noOphthalmologyAppointments';
static const noVitalSignsRecordedYet = 'noVitalSignsRecordedYet';
static const appointmentsAndVisits = 'appointmentsAndVisits';
static const labAndRadiology = 'labAndRadiology';
static const activeMedicationsAndPrescriptions = 'activeMedicationsAndPrescriptions';
static const allPrescriptions = 'allPrescriptions';
static const allMedications = 'allMedications';
static const youDontHaveAnyPrescriptionsYet = 'youDontHaveAnyPrescriptionsYet';
static const youDontHaveAnyCompletedVisitsYet = 'youDontHaveAnyCompletedVisitsYet';
static const others = 'others';
static const allergyInfo = 'allergyInfo';
static const vaccineInfo = 'vaccineInfo';
static const updateInsuranceInfo = 'updateInsuranceInfo';
static const myInvoicesList = 'myInvoicesList';
static const ancillaryOrdersList = 'ancillaryOrdersList';
static const youDontHaveAnySickLeavesYet = 'youDontHaveAnySickLeavesYet';
static const medicalReports = 'medicalReports';
static const sickLeaveReport = 'sickLeaveReport';
static const weightTracker = 'weightTracker';
static const askYourDoctor = 'askYourDoctor';
static const internetPairing = 'internetPairing';
static const requested = 'requested';
static const youDontHaveAnyMedicalReportsYet = 'youDontHaveAnyMedicalReportsYet';
static const requestMedicalReport = 'requestMedicalReport';
static const youDoNotHaveAnyAppointmentsToRequestMedicalReport = 'youDoNotHaveAnyAppointmentsToRequestMedicalReport';
static const areYouSureYouWantToRequestMedicalReport = 'areYouSureYouWantToRequestMedicalReport';
static const yourMedicalReportRequestSubmittedSuccessfully = 'yourMedicalReportRequestSubmittedSuccessfully';
static const monthlyHealthSummaryReportDisclaimer = 'monthlyHealthSummaryReportDisclaimer';
static const updatingMonthlyReportStatus = 'updatingMonthlyReportStatus';
static const monthlyReportStatusUpdatedSuccessfully = 'monthlyReportStatusUpdatedSuccessfully';
static const whoCanViewMyMedicalFile = 'whoCanViewMyMedicalFile';
static const acceptedYourRequestToBeYourFamilyMember = 'acceptedYourRequestToBeYourFamilyMember';
static const canViewYourFile = 'canViewYourFile';
static const hasARequestPendingToBeYourFamilyMember = 'hasARequestPendingToBeYourFamilyMember';
static const wantsToAddYouAsTheirFamilyMember = 'wantsToAddYouAsTheirFamilyMember';
static const rejectedYourRequestToBeYourFamilyMember = 'rejectedYourRequestToBeYourFamilyMember';
static const rejectedYourFamilyMemberRequest = 'rejectedYourFamilyMemberRequest';
static const notAvailable = 'notAvailable';
static const selectAProfile = 'selectAProfile';
static const switchFamilyFile = 'switchFamilyFile';
static const medicalFiles = 'medicalFiles';
static const addANewFamilyMember = 'addANewFamilyMember';
static const viewInvoiceDetails = 'viewInvoiceDetails';
static const outPatient = 'outPatient';
static const invoiceDetails = 'invoiceDetails';
static const sendingEmailPleaseWait = 'sendingEmailPleaseWait';
static const emailSentSuccessfullyMessage = 'emailSentSuccessfullyMessage';
static const discount = 'discount';
static const paid = 'paid';
static const fetchingInvoiceDetails = 'fetchingInvoiceDetails';
static const scanQRCode = 'scanQRCode';
static const parkingSlotDetails = 'parkingSlotDetails';
static const slotNumber = 'slotNumber';
static const basement = 'basement';
static const parkingDate = 'parkingDate';
static const parkedSince = 'parkedSince';
static const resetDirection = 'resetDirection';
static const noPrescriptionOrdersYet = 'noPrescriptionOrdersYet';
static const fetchingPrescriptionPDFPleaseWait = 'fetchingPrescriptionPDFPleaseWait';
static const ratingValue = 'ratingValue';
static const downloadPrescription = 'downloadPrescription';
static const fetchingPrescriptionDetails = 'fetchingPrescriptionDetails';
static const switchBackFamilyFile = 'switchBackFamilyFile';
static const profileAndSettings = 'profileAndSettings';
static const quickActions = 'quickActions';
static const notificationsSettings = 'notificationsSettings';
static const touchIDFaceIDServices = 'touchIDFaceIDServices';
static const personalInformation = 'personalInformation';
static const updateEmailAddress = 'updateEmailAddress';
static const helpAndSupport = 'helpAndSupport';
static const permissionsProfile = 'permissionsProfile';
static const privacyPolicy = 'privacyPolicy';
static const deactivateAccount = 'deactivateAccount';
static const ageYearsOld = 'ageYearsOld';
static const youDontHaveRadiologyOrders = 'youDontHaveRadiologyOrders';
static const radiologyResult = 'radiologyResult';
static const viewRadiologyImage = 'viewRadiologyImage';
static const rateClinic = 'rateClinic';
static const back = 'back';
static const rateDoctor = 'rateDoctor';
static const howWasYourLastVisitWithDoctor = 'howWasYourLastVisitWithDoctor';
static const dateOfBirthSymptoms = 'dateOfBirthSymptoms';
static const genderSymptoms = 'genderSymptoms';
static const heightSymptoms = 'heightSymptoms';
static const weightSymptoms = 'weightSymptoms';
static const femaleGender = 'femaleGender';
static const previous = 'previous';
static const selectedOrgans = 'selectedOrgans';
static const noOrgansSelected = 'noOrgansSelected';
static const organSelector = 'organSelector';
static const noPredictionsAvailable = 'noPredictionsAvailable';
static const areYouSureYouWantToRestartOrganSelection = 'areYouSureYouWantToRestartOrganSelection';
static const possibleConditions = 'possibleConditions';
static const pleaseSelectAtLeastOneRiskBeforeProceeding = 'pleaseSelectAtLeastOneRiskBeforeProceeding';
static const aboveYouSeeCommonRiskFactors = 'aboveYouSeeCommonRiskFactors';
static const readMore = 'readMore';
static const riskFactors = 'riskFactors';
static const noRiskFactorsFound = 'noRiskFactorsFound';
static const basedOnYourSelectedSymptomsNoRiskFactors = 'basedOnYourSelectedSymptomsNoRiskFactors';
static const messageNotification = 'messageNotification';
static const attachedImage = 'attachedImage';
static const failedToLoadImage = 'failedToLoadImage';
static const typeNotification = 'typeNotification';
static const pleaseSelectAtLeastOneOptionBeforeProceeding = 'pleaseSelectAtLeastOneOptionBeforeProceeding';
static const suggestions = 'suggestions';
static const pleaseGoBackAndSelectOrgansFirst = 'pleaseGoBackAndSelectOrgansFirst';
static const symptomsSelector = 'symptomsSelector';
static const possibleSymptomsRelatedTo = 'possibleSymptomsRelatedTo';
static const suggestionAIListDescription = 'suggestionAIListDescription';
static const analyzing = 'analyzing';
static const seekMedicalAdvice = 'seekMedicalAdvice';
static const monitorDescription = 'monitorDescription';
static const seekMedicalAdviceDescription = 'seekMedicalAdviceDescription';
static const emergencyDescription = 'emergencyDescription';
static const colorScience = 'colorScience';
static const noNeedToVisitDoctor = 'noNeedToVisitDoctor';
static const commonSymptom = 'commonSymptom';
static const notApplicable = 'notApplicable';
static const emergencyTriage = 'emergencyTriage';
static const emergencyEvidenceDetected = 'emergencyEvidenceDetected';
static const noQuestionItemsAvailable = 'noQuestionItemsAvailable';
static const pleaseAnswerAllQuestionsBeforeProceeding = 'pleaseAnswerAllQuestionsBeforeProceeding';
static const triage = 'triage';
static const areYouSureYouWantToExitProgress = 'areYouSureYouWantToExitProgress';
static const noQuestionAvailable = 'noQuestionAvailable';
static const possibleSymptom = 'possibleSymptom';
static const symptomsCheckerFindingScore = 'symptomsCheckerFindingScore';
static const notSet = 'notSet';
static const years = 'years';
static const symptomsChecker = 'symptomsChecker';
static const helloIsYourInformationUpToDate = 'helloIsYourInformationUpToDate';
static const noEditAll = 'noEditAll';
static const yesItIs = 'yesItIs';
static const age = 'age';
static const youDontHaveAnyAncillaryOrdersYet = 'youDontHaveAnyAncillaryOrdersYet';
static const invoiceWithNumber = 'invoiceWithNumber';
static const queued = 'queued';
static const checkInReady = 'checkInReady';
static const checkIn = 'checkIn';
static const viewDetails = 'viewDetails';
static const selectPaymentMethod = 'selectPaymentMethod';
static const processingPaymentPleaseWait = 'processingPaymentPleaseWait';
static const finalizingPaymentPleaseWait = 'finalizingPaymentPleaseWait';
static const generatingInvoicePleaseWait = 'generatingInvoicePleaseWait';
static const hereIsYourInvoiceNumber = 'hereIsYourInvoiceNumber';
static const paymentCompletedSuccessfully = 'paymentCompletedSuccessfully';
static const failedToInitializeApplePay = 'failedToInitializeApplePay';
static const cash = 'cash';
static const approved = 'approved';
static const approvalRejectedPleaseVisitReceptionist = 'approvalRejectedPleaseVisitReceptionist';
static const sentForApproval = 'sentForApproval';
static const ancillaryOrderDetails = 'ancillaryOrderDetails';
static const noProceduresAvailableForSelectedOrder = 'noProceduresAvailableForSelectedOrder';
static const procedures = 'procedures';
static const totalAmount = 'totalAmount';
static const covered = 'covered';
static const vatPercent = 'vatPercent';
static const proceedToPayment = 'proceedToPayment';
static const supportedSmartWatches = 'supportedSmartWatches';
static const pleaseMakeSureSamsungWatchConnected = 'pleaseMakeSureSamsungWatchConnected';
static const beforeSyncingDataFollowInstructions = 'beforeSyncingDataFollowInstructions';
static const viewWatchInstructions = 'viewWatchInstructions';
static const healthConnectAppNotInstalled = 'healthConnectAppNotInstalled';
static const setTimerOfReminder = 'setTimerOfReminder';
static const youHaveAppointmentWithDr = 'youHaveAppointmentWithDr';
static const hours = 'hours';
static const secs = 'secs';
static const noAllergiesDataFound = 'noAllergiesDataFound';
static const heartRateDescription = 'heartRateDescription';
static const bloodOxygenDescription = 'bloodOxygenDescription';
static const stepsDescription = 'stepsDescription';
static const caloriesDescription = 'caloriesDescription';
static const distanceDescription = 'distanceDescription';
static const overview = 'overview';
static const details = 'details';
static const healthy = 'healthy';
static const warning = 'warning';
static const vitalSignDetails = 'vitalSignDetails';
static const resultOfNoDate = 'resultOfNoDate';
static const referenceRangeBetween = 'referenceRangeBetween';
static const referenceRangeMin = 'referenceRangeMin';
static const referenceRangeMax = 'referenceRangeMax';
static const noHistoryAvailable = 'noHistoryAvailable';
static const bmiDescription = 'bmiDescription';
static const heightDescription = 'heightDescription';
static const weightDescription = 'weightDescription';
static const bloodPressureDescription = 'bloodPressureDescription';
static const temperatureDescription = 'temperatureDescription';
static const heartRateDescriptionVital = 'heartRateDescriptionVital';
static const respiratoryRateDescription = 'respiratoryRateDescription';
static const bmiAdvice = 'bmiAdvice';
static const heightAdvice = 'heightAdvice';
static const weightAdvice = 'weightAdvice';
static const bloodPressureAdvice = 'bloodPressureAdvice';
static const temperatureAdvice = 'temperatureAdvice';
static const heartRateAdvice = 'heartRateAdvice';
static const respiratoryRateAdvice = 'respiratoryRateAdvice';
static const whatShouldIDoNext = 'whatShouldIDoNext';
static const customizeDrinkCup = 'customizeDrinkCup';
static const tipsToStayHydrated = 'tipsToStayHydrated';
static const drinkBeforeYouFeelThirsty = 'drinkBeforeYouFeelThirsty';
static const keepRefillableBottleNextToYou = 'keepRefillableBottleNextToYou';
static const trackYourDailyIntakeToStayMotivated = 'trackYourDailyIntakeToStayMotivated';
static const chooseSparklingWaterInsteadOfSoda = 'chooseSparklingWaterInsteadOfSoda';
static const switchCup = 'switchCup';
static const plainWater = 'plainWater';
static const yourGoal = 'yourGoal';
static const remaining = 'remaining';
static const hydrationStatus = 'hydrationStatus';
static const areYouSureYouWantToCancelAllWaterReminders = 'areYouSureYouWantToCancelAllWaterReminders';
static const remindersSet = 'remindersSet';
static const dailyWaterRemindersScheduledAt = 'dailyWaterRemindersScheduledAt';
static const waterConsumption = 'waterConsumption';
static const selectNumberOfReminders = 'selectNumberOfReminders';
static const h2oSettings = 'h2oSettings';
static const settingsSavedSuccessfully = 'settingsSavedSuccessfully';
static const yourName = 'yourName';
static const ageYears = 'ageYears';
static const numberOfRemindersInADay = 'numberOfRemindersInADay';
static const medications = 'medications';
static const someRemarksAboutPrescription = 'someRemarksAboutPrescription';
static const notifyMeBeforeConsumptionTime = 'notifyMeBeforeConsumptionTime';
static const noMedicationsToday = 'noMedicationsToday';
static const reminders = 'reminders';
static const reminderAddedToCalendar = 'reminderAddedToCalendar';
static const errorWhileSettingCalendar = 'errorWhileSettingCalendar';
static const instructions = 'instructions';
static const requests = 'requests';
static const thisWeek = 'thisWeek';
static const lastMonth = 'lastMonth';
static const lastSixMonths = 'lastSixMonths';
static const selectTime = 'selectTime';
static const pleaseWaitYouWillBeCalledForVitalSigns = 'pleaseWaitYouWillBeCalledForVitalSigns';
static const pleaseVisitRoomForVitalSigns = 'pleaseVisitRoomForVitalSigns';
static const pleaseVisitRoomToTheDoctor = 'pleaseVisitRoomToTheDoctor';
static const erOnlineCheckInRequest = 'erOnlineCheckInRequest';
static const indoor = 'indoor';
static const navigation = 'navigation';
static const health = 'health';
static const calculators = 'calculators';
static const converters = 'converters';
static const guide = 'guide';
static const liveCareServiceDesc = 'liveCareServiceDesc';
static const bloodGroup = 'bloodGroup';
static const medicalServices = 'medicalServices';
static const insuranceAndPayments = 'insuranceAndPayments';
static const trackerAndOthers = 'trackerAndOthers';
static const bmi = 'bmi';
} }

@ -10,7 +10,6 @@ import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart'; import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart'; import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
import 'package:hmg_patient_app_new/features/doctor_filter/doctor_filter_view_model.dart'; import 'package:hmg_patient_app_new/features/doctor_filter/doctor_filter_view_model.dart';
@ -28,11 +27,9 @@ import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart'; import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
import 'package:hmg_patient_app_new/features/notifications/notifications_view_model.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart'; import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart'; import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart';
import 'package:hmg_patient_app_new/features/qr_parking/qr_parking_view_model.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart'; import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart'; import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart'; import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
@ -49,7 +46,6 @@ import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart'; import 'package:provider/single_child_widget.dart';
import 'core/utils/size_utils.dart'; import 'core/utils/size_utils.dart';
import 'features/monthly_reports/terms_conditions_view_model.dart';
import 'firebase_options.dart'; import 'firebase_options.dart';
@pragma('vm:entry-point') @pragma('vm:entry-point')
@ -185,18 +181,6 @@ void main() async {
), ),
ChangeNotifierProvider<MonthlyReportViewModel>( ChangeNotifierProvider<MonthlyReportViewModel>(
create: (_) => getIt.get<MonthlyReportViewModel>(), create: (_) => getIt.get<MonthlyReportViewModel>(),
),
ChangeNotifierProvider<NotificationsViewModel>(
create: (_) => getIt.get<NotificationsViewModel>(),
),
ChangeNotifierProvider<ActivePrescriptionsViewModel>(
create: (_) => getIt.get<ActivePrescriptionsViewModel>(),
),
ChangeNotifierProvider<QrParkingViewModel>(
create: (_) => getIt.get<QrParkingViewModel>(),
),
ChangeNotifierProvider<TermsConditionsViewModel>(
create: (_) => getIt.get<TermsConditionsViewModel>(),
) )
], child: MyApp()), ], child: MyApp()),
), ),

@ -123,7 +123,7 @@ class AllergiesListPage extends StatelessWidget {
), ),
), ),
) )
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noAllergiesDataFound.tr()); : Utils.getNoDataWidget(context, noDataText: "No allergies data found...".needTranslation);
}, },
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
), ),

@ -87,7 +87,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.appointmentDetails.tr(context: context), title: "Appointment Details".needTranslation,
report: AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) report: AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
? () { ? () {
contactUsViewModel.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel); contactUsViewModel.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel);
@ -105,13 +105,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppointmentDoctorCard( AppointmentDoctorCard(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onAskDoctorTap: () async { onAskDoctorTap: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
await myAppointmentsViewModel.isDoctorAvailable( await myAppointmentsViewModel.isDoctorAvailable(
projectID: widget.patientAppointmentHistoryResponseModel.projectID, projectID: widget.patientAppointmentHistoryResponseModel.projectID,
doctorId: widget.patientAppointmentHistoryResponseModel.doctorID, doctorId: widget.patientAppointmentHistoryResponseModel.doctorID,
clinicId: widget.patientAppointmentHistoryResponseModel.clinicID, clinicId: widget.patientAppointmentHistoryResponseModel.clinicID,
onSuccess: (value) async { onSuccess: (value) async {
if (value) { if (value) {
print("Doctor is available");
await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) { await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -128,14 +129,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
); );
}); });
} else { } else {
debugPrint("Doctor is not available"); print("Doctor is not available");
} }
}); });
}, },
onCancelTap: () async { onCancelTap: () async {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Cancelling Appointment, Please Wait...".needTranslation);
await myAppointmentsViewModel.cancelAppointment( await myAppointmentsViewModel.cancelAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) { onSuccess: (apiResponse) {
@ -144,7 +145,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel.getPatientAppointments(true, false); myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr(context: context)), child: Utils.getSuccessWidget(loadingText: "Appointment Cancelled Successfully".needTranslation),
callBackFunc: () { callBackFunc: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -181,13 +182,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [ children: [
Row( Row(
children: [ children: [
LocaleKeys.appointmentStatus.tr(context: context).toText16(isBold: true), "Appointment Status".needTranslation.toText16(isBold: true),
], ],
), ),
SizedBox(height: 4.h), SizedBox(height: 4.h),
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel) (!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
? LocaleKeys.notConfirmed.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500) ? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: LocaleKeys.confirmed.tr(context: context).toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)), : "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
SizedBox(height: 16.h), SizedBox(height: 16.h),
//TODO Add countdown timer in case of LiveCare Appointment //TODO Add countdown timer in case of LiveCare Appointment
widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false
@ -199,7 +200,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.doctorWillCallYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "The doctor will call you once the appointment time approaches."
.needTranslation
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -221,11 +224,11 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: SizedBox( child: SizedBox(
width: MediaQuery.of(context).size.width * 0.785, width: MediaQuery.of(context).size.width * 0.785,
child: CustomButton( child: CustomButton(
text: "Get Directions".needTranslation,
onPressed: () { onPressed: () {
MapsLauncher.launchCoordinates(double.parse(widget.patientAppointmentHistoryResponseModel.latitude!), MapsLauncher.launchCoordinates(double.parse(widget.patientAppointmentHistoryResponseModel.latitude!),
double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), widget.patientAppointmentHistoryResponseModel.projectName); double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), widget.patientAppointmentHistoryResponseModel.projectName);
}, },
text: LocaleKeys.getDirections.tr(context: context),
backgroundColor: AppColors.textColor.withValues(alpha: 0.8), backgroundColor: AppColors.textColor.withValues(alpha: 0.8),
borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01), borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
@ -280,7 +283,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true), LocaleKeys.setReminder.tr(context: context).toText13(isBold: true),
LocaleKeys.notifyMeBeforeAppointment.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500), "Notify me before the appointment"
.needTranslation
.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
], ],
), ),
const Spacer(), const Spacer(),
@ -302,9 +307,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
"${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"", "${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"",
"", "",
"", "",
title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}", title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}".needTranslation,
description: description:"${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}".needTranslation,
"${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}",
onSuccess: () { onSuccess: () {
setState(() { setState(() {
myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel); myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel);
@ -314,10 +318,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
onMultiDateSuccess: (int selectedIndex) async { onMultiDateSuccess: (int selectedIndex) async {
isEventAddedOrRemoved = await calender.createOrUpdateEvent( isEventAddedOrRemoved = await calender.createOrUpdateEvent(
title: title: "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget
"Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", .patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}".needTranslation,
description: description: "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget
"Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}", .patientAppointmentHistoryResponseModel.projectName}",
scheduleDateTime: DateUtil.convertStringToDate(widget scheduleDateTime: DateUtil.convertStringToDate(widget
.patientAppointmentHistoryResponseModel.appointmentDate), .patientAppointmentHistoryResponseModel.appointmentDate),
eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}", eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}",
@ -365,7 +369,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true, isLargeText: true,
iconSize: 36.w, iconSize: 36.w,
).onPress(() async { ).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingLabResults.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching Lab Results...".needTranslation);
await labViewModel.getLabResultsByAppointmentNo( await labViewModel.getLabResultsByAppointmentNo(
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo, appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
projectID: widget.patientAppointmentHistoryResponseModel.projectID, projectID: widget.patientAppointmentHistoryResponseModel.projectID,
@ -398,7 +402,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true, isLargeText: true,
iconSize: 36.w, iconSize: 36.w,
).onPress(() async { ).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingRadiologyResults.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching Radiology Results...".needTranslation);
await radiologyViewModel.getPatientRadiologyOrdersByAppointment( await radiologyViewModel.getPatientRadiologyOrdersByAppointment(
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo, appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
projectID: widget.patientAppointmentHistoryResponseModel.projectID, projectID: widget.patientAppointmentHistoryResponseModel.projectID,
@ -425,7 +429,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true, isLargeText: true,
iconSize: 36.w, iconSize: 36.w,
).onPress(() async { ).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointmentPrescriptions.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment Prescriptions...".needTranslation);
await prescriptionsViewModel.getPrescriptionDetails( await prescriptionsViewModel.getPrescriptionDetails(
getPrescriptionRequestModel(), getPrescriptionRequestModel(),
onSuccess: (val) { onSuccess: (val) {
@ -453,7 +457,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.noPrescriptionsForAppointment.tr(context: context)), child: Utils.getErrorWidget(
loadingText: "You don't have any prescriptions for this appointment.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -522,7 +527,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
// ], // ],
// ), // ),
// SizedBox(height: 16.h), // SizedBox(height: 16.h),
// LocaleKeys.prescriptions.tr(context: context).toText18(isBold: true), // LocaleKeys.prescriptions.tr().toText18(isBold: true),
// SizedBox(height: 16.h), // SizedBox(height: 16.h),
// Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { // Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) {
// return prescriptionVM.isPrescriptionsDetailsLoading // return prescriptionVM.isPrescriptionsDetailsLoading
@ -708,7 +713,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true), "Amount before tax".needTranslation.toText18(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -725,6 +730,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
.tr(context: context) .tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)), .toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})" "VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})"
.needTranslation
.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2), .toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2),
], ],
), ),
@ -752,7 +758,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h), ).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h),
AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
? CustomButton( ? CustomButton(
text: LocaleKeys.rebookAppointment.tr(context: context), text: "Re-book Appointment".needTranslation,
onPressed: () { onPressed: () {
openDoctorScheduleCalendar(); openDoctorScheduleCalendar();
}, },
@ -810,13 +816,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
projectName: widget.patientAppointmentHistoryResponseModel.projectName, projectName: widget.patientAppointmentHistoryResponseModel.projectName,
); );
bookAppointmentsViewModel.setSelectedDoctor(doctor); bookAppointmentsViewModel.setSelectedDoctor(doctor);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingDoctorSchedulePleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching Doctor Schedule, Please Wait...".needTranslation);
await bookAppointmentsViewModel.getDoctorFreeSlots( await bookAppointmentsViewModel.getDoctorFreeSlots(
isBookingForLiveCare: false, isBookingForLiveCare: false,
onSuccess: (dynamic respData) async { onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: LocaleKeys.pickADate.tr(context: context), title: "Pick a Date".needTranslation,
context, context,
child: AppointmentCalendar(), child: AppointmentCalendar(),
isFullScreen: false, isFullScreen: false,
@ -841,14 +847,15 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
case 0: case 0:
break; break;
case 10: case 10:
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingAppointmentPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Confirming Appointment, Please Wait...".needTranslation);
await myAppointmentsViewModel.confirmAppointment( await myAppointmentsViewModel.confirmAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) { onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.getPatientAppointments(true, false); myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)), callBackFunc: (str) { showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation),
callBackFunc: (str) {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
title: "", title: "",
@ -869,10 +876,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
), ),
); );
case 50: case 50:
// return LocaleKeys.confirmLiveCare.tr(context: context); // return LocaleKeys.confirmLiveCare.tr();
case 90: case 90:
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.onlineCheckIn.tr(context: context), title: LocaleKeys.onlineCheckIn.tr(),
child: AppointmentCheckinBottomSheet( child: AppointmentCheckinBottomSheet(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
myAppointmentsViewModel: myAppointmentsViewModel, myAppointmentsViewModel: myAppointmentsViewModel,

@ -90,7 +90,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.appointmentPayment.tr(context: context), title: "Appointment Payment".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -111,7 +111,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.mada, width: 72.h, height: 25.h) Image.asset(AppAssets.mada, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Mada".toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), "Mada".needTranslation.toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -154,6 +154,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), ).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Visa or Mastercard" "Visa or Mastercard"
.needTranslation
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],
@ -194,6 +195,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Tamara" "Tamara"
.needTranslation
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
], ],
@ -248,7 +250,8 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context) "Insurance expired or inactive"
.needTranslation
.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500) .toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
.paddingSymmetrical(24.h, 0.h), .paddingSymmetrical(24.h, 0.h),
CustomButton( CustomButton(
@ -274,12 +277,12 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
) )
: const SizedBox(), : const SizedBox(),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h), "Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), "Amount before tax".needTranslation.toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true), myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -290,7 +293,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"VAT 15%".toText14(isBold: true, color: AppColors.greyTextColor), "VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientTaxAmount! myAppointmentsVM.patientAppointmentShareResponseModel!.patientTaxAmount!
.toString() .toString()
@ -304,7 +307,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"".toText14(isBold: true), "".needTranslation.toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true), myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -380,7 +383,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
} }
void checkPaymentStatus() async { void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
if (selectedPaymentMethod == "TAMARA") { if (selectedPaymentMethod == "TAMARA") {
await payfortViewModel.checkTamaraPaymentStatus( await payfortViewModel.checkTamaraPaymentStatus(
transactionID: transID, transactionID: transID,
@ -438,7 +441,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)), child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -519,7 +522,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)), child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -8,7 +7,6 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -32,7 +30,7 @@ class AppointmentQueuePage extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.queueing.tr(context: context), title: "Queueing".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.all(24.0), padding: EdgeInsets.all(24.0),
@ -59,7 +57,7 @@ class AppointmentQueuePage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: myAppointmentsVM.currentQueueStatus == 0 ? LocaleKeys.inQueue.tr(context: context) : LocaleKeys.yourTurn.tr(context: context), labelText: myAppointmentsVM.currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20), backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20),
textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus), textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus),
), ),
@ -68,10 +66,12 @@ class AppointmentQueuePage extends StatelessWidget {
).toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading), ).toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 10.h), SizedBox(height: 10.h),
"Hala ${appState!.getAuthenticatedUser()!.firstName}!!!" "Hala ${appState!.getAuthenticatedUser()!.firstName}!!!"
.needTranslation
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h), SizedBox(height: 8.h),
LocaleKeys.thankYouForPatience.tr(context: context) "Thank you for your patience, here is your queue number."
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight) .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h), SizedBox(height: 8.h),
@ -111,7 +111,8 @@ class AppointmentQueuePage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.servingNow.tr(context: context) "Serving Now"
.needTranslation
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading), .toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 18.h), SizedBox(height: 18.h),
@ -137,8 +138,8 @@ class AppointmentQueuePage extends StatelessWidget {
? AppAssets.call_for_vitals ? AppAssets.call_for_vitals
: AppAssets.call_for_doctor, : AppAssets.call_for_doctor,
labelText: myAppointmentsVM.patientQueueDetailsList[index].callType == 1 labelText: myAppointmentsVM.patientQueueDetailsList[index].callType == 1
? LocaleKeys.callForVitalSigns.tr(context: context) ? "Call for vital signs".needTranslation
: LocaleKeys.callForDoctor.tr(context: context), : "Call for Doctor".needTranslation,
iconColor: myAppointmentsVM.patientQueueDetailsList[index].callType == 1 iconColor: myAppointmentsVM.patientQueueDetailsList[index].callType == 1
? AppColors.primaryRedColor ? AppColors.primaryRedColor
: AppColors.successColor, : AppColors.successColor,
@ -179,23 +180,35 @@ class AppointmentQueuePage extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.bulb_icon, width: 24.w, height: 24.h), Utils.buildSvgWithAssets(icon: AppAssets.bulb_icon, width: 24.w, height: 24.h),
SizedBox(width: 8.w), SizedBox(width: 8.w),
LocaleKeys.thingsToAskDoctor.tr(context: context).toText16(isBold: true), "Things to ask your doctor today".needTranslation.toText16(isBold: true),
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
"${LocaleKeys.improveOverallHealth.tr(context: context)}"
// What can I do to improve my overall health?
// Are there any routine screenings I should get?
// What is this medication for?
// Are there any side effects I should know about?
// When should I come back for a follow-up?
"${"What can I do to improve my overall health?"}"
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
"${LocaleKeys.routineScreenings.tr(context: context)}" "${"Are there any routine screenings I should get?"}"
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
"${LocaleKeys.whatIsThisMedicationFor.tr(context: context)}" "${"What is this medication for?"}"
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
"${LocaleKeys.sideEffectsToKnow.tr(context: context)}" "${"Are there any side effects I should know about?"}"
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
"${LocaleKeys.whenFollowUp.tr(context: context)}" "${"When should I come back for a follow-up?"}"
.needTranslation
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), .toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 16.h), SizedBox(height: 16.h),
@ -216,7 +229,7 @@ class AppointmentQueuePage extends StatelessWidget {
hasShadow: true, hasShadow: true,
), ),
child: CustomButton( child: CustomButton(
text: LocaleKeys.goToHomepage.tr(context: context), text: "Go to homepage".needTranslation,
onPressed: () { onPressed: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
@ -236,10 +249,11 @@ class AppointmentQueuePage extends StatelessWidget {
icon: AppAssets.homeBottom, icon: AppAssets.homeBottom,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
iconSize: 18.h, iconSize: 18.h,
).paddingSymmetrical(24.h, 24.h), ).paddingSymmetrical(16.h, 24.h),
), )
], ],
); );
})); }),
);
} }
} }

@ -56,7 +56,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.appointmentsList.tr(context: context), title: "Appointments List".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
@ -65,9 +65,9 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
activeTextColor: Color(0xffED1C2B), activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
tabs: [ tabs: [
CustomTabBarModel(null, LocaleKeys.allAppt.tr(context: context)), CustomTabBarModel(null, "All Appt.".needTranslation),
CustomTabBarModel(null, LocaleKeys.upcoming.tr(context: context)), CustomTabBarModel(null, "Upcoming".needTranslation),
CustomTabBarModel(null, LocaleKeys.completed.tr(context: context)), CustomTabBarModel(null, "Completed".needTranslation),
], ],
onTabChange: (index) { onTabChange: (index) {
setState(() { setState(() {
@ -155,7 +155,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
isLoading: true, isLoading: true,
isFromHomePage: false, isFromHomePage: false,
), ),
) ).paddingSymmetrical(24.h, 0.h)
: filteredAppointmentList.isNotEmpty : filteredAppointmentList.isNotEmpty
? AnimationConfiguration.staggeredList( ? AnimationConfiguration.staggeredList(
position: index, position: index,
@ -248,7 +248,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
) )
: Utils.getNoDataWidget( : Utils.getNoDataWidget(
context, context,
noDataText: LocaleKeys.noAppointmentsYet.tr(context: context), noDataText: "You don't have any appointments yet.".needTranslation,
callToActionButton: CustomButton( callToActionButton: CustomButton(
text: LocaleKeys.bookAppo.tr(context: context), text: LocaleKeys.bookAppo.tr(context: context),
onPressed: () { onPressed: () {
@ -296,7 +296,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
onClicked: () { onClicked: () {
if (myAppointmentsVM.availableFilters[index] == AppointmentListingFilters.DATESELECTION) { if (myAppointmentsVM.availableFilters[index] == AppointmentListingFilters.DATESELECTION) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: LocaleKeys.setTheDateRange.tr(context: context), title: "Set The Date Range".needTranslation,
context, context,
child: DateRangeSelector( child: DateRangeSelector(
onRangeSelected: (start, end) { onRangeSelected: (start, end) {

@ -211,7 +211,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppCustomChipWidget(labelText: "${group.length} ${'doctors'}"), AppCustomChipWidget(labelText: "${group.length} ${'doctors'.needTranslation}"),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more), Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
], ],
), ),
@ -284,7 +284,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
icon: AppAssets.view_report_icon, icon: AppAssets.view_report_icon,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
iconSize: 16.h, iconSize: 16.h,
text: LocaleKeys.viewProfile.tr(context: context), text: "View Profile".needTranslation.tr(context: context),
onPressed: () async { onPressed: () async {
bookAppointmentsViewModel.setSelectedDoctor(DoctorsListResponseModel( bookAppointmentsViewModel.setSelectedDoctor(DoctorsListResponseModel(
clinicID: doctor?.clinicID ?? 0, clinicID: doctor?.clinicID ?? 0,

@ -96,13 +96,13 @@ class AppointmentCard extends StatelessWidget {
AppCustomChipWidget( AppCustomChipWidget(
icon: isLoading ? AppAssets.walkin_appointment_icon : (isLiveCare ? AppAssets.small_livecare_icon : AppAssets.walkin_appointment_icon), icon: isLoading ? AppAssets.walkin_appointment_icon : (isLiveCare ? AppAssets.small_livecare_icon : AppAssets.walkin_appointment_icon),
iconColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor), iconColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
labelText: isLoading ? LocaleKeys.walkin.tr(context: context) : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)), labelText: isLoading ? 'Walk In'.needTranslation : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : 'Walk In'.needTranslation),
backgroundColor: isLoading ? AppColors.greyColor : (isLiveCare ? AppColors.successColor : AppColors.greyColor), backgroundColor: isLoading ? AppColors.greyColor : (isLiveCare ? AppColors.successColor : AppColors.greyColor),
textColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor), textColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading labelText: isLoading
? 'OutPatient' ? 'OutPatient'.needTranslation
: (appState.isArabic() : (appState.isArabic()
? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN! ? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN!
: patientAppointmentHistoryResponseModel.isInOutPatientDescription!), : patientAppointmentHistoryResponseModel.isInOutPatientDescription!),
@ -111,7 +111,7 @@ class AppointmentCard extends StatelessWidget {
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading labelText: isLoading
? 'Booked' ? 'Booked'.needTranslation
: AppointmentType.getAppointmentStatusType(patientAppointmentHistoryResponseModel.patientStatusType!), : AppointmentType.getAppointmentStatusType(patientAppointmentHistoryResponseModel.patientStatusType!),
backgroundColor: AppColors.successColor.withValues(alpha: 0.1), backgroundColor: AppColors.successColor.withValues(alpha: 0.1),
textColor: AppColors.successColor, textColor: AppColors.successColor,
@ -229,7 +229,7 @@ class AppointmentCard extends StatelessWidget {
return SizedBox.shrink(); return SizedBox.shrink();
} else { } else {
return CustomButton( return CustomButton(
text: LocaleKeys.selectAppointment.tr(context: context), text: 'Select appointment'.needTranslation,
onPressed: () { onPressed: () {
if (isForFeedback) { if (isForFeedback) {
contactUsViewModel!.setPatientFeedbackSelectedAppointment(patientAppointmentHistoryResponseModel); contactUsViewModel!.setPatientFeedbackSelectedAppointment(patientAppointmentHistoryResponseModel);
@ -310,7 +310,7 @@ class AppointmentCard extends StatelessWidget {
return CustomButton( return CustomButton(
text: LocaleKeys.askDoctor.tr(context: context), text: LocaleKeys.askDoctor.tr(context: context),
onPressed: () async { onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
await myAppointmentsViewModel.isDoctorAvailable( await myAppointmentsViewModel.isDoctorAvailable(
projectID: patientAppointmentHistoryResponseModel.projectID, projectID: patientAppointmentHistoryResponseModel.projectID,
doctorId: patientAppointmentHistoryResponseModel.doctorID, doctorId: patientAppointmentHistoryResponseModel.doctorID,
@ -353,7 +353,7 @@ class AppointmentCard extends StatelessWidget {
} }
return CustomButton( return CustomButton(
text: LocaleKeys.rebookSameDoctor.tr(context: context), text: 'Rebook with same doctor'.needTranslation,
onPressed: () => openDoctorScheduleCalendar(context), onPressed: () => openDoctorScheduleCalendar(context),
backgroundColor: AppColors.greyColor, backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor, borderColor: AppColors.greyColor,
@ -417,7 +417,7 @@ class AppointmentCard extends StatelessWidget {
context, context,
child: AppointmentCalendar(), child: AppointmentCalendar(),
callBackFunc: () {}, callBackFunc: () {},
title: LocaleKeys.pickADate.tr(context: context), title: 'Pick a Date'.needTranslation,
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );

@ -45,8 +45,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
children: [ children: [
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.liveLocation.tr(context: context), "Live Location".needTranslation,
LocaleKeys.verifyYourLocationAtHospital.tr(context: context), "Verify your location to be at hospital to check in".needTranslation,
).onPress(() { ).onPress(() {
// locationUtils = LocationUtils( // locationUtils = LocationUtils(
// isShowConfirmDialog: false, // isShowConfirmDialog: false,
@ -61,10 +61,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context); sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context);
} else { } else {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.error.tr(context: context), title: "Error".needTranslation,
child: Utils.getErrorWidget( child: Utils.getErrorWidget(loadingText: "Please ensure you're within the hospital location to perform online check-in.".needTranslation), callBackFunc: () {
loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context),
), callBackFunc: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, isFullScreen: false); }, isFullScreen: false);
} }
@ -73,8 +71,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_nfc_icon, AppAssets.checkin_nfc_icon,
LocaleKeys.nfcNearFieldCommunication.tr(context: context), "NFC (Near Field Communication)".needTranslation,
LocaleKeys.scanPhoneViaNFC.tr(context: context), "Scan your phone via NFC board to check in".needTranslation,
).onPress(() { ).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () { Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { showNfcReader(context, onNcfScan: (String nfcId) {
@ -87,8 +85,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_qr_icon, AppAssets.checkin_qr_icon,
LocaleKeys.qrCode.tr(context: context), "QR Code".needTranslation,
LocaleKeys.scanQRCodeToCheckIn.tr(context: context), "Scan QR code with your camera to check in".needTranslation,
).onPress(() async { ).onPress(() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") { if (onlineCheckInQRCode != "") {
@ -141,16 +139,14 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
} }
void sendCheckInRequest(String scannedCode, int checkInType, BuildContext context) async { void sendCheckInRequest(String scannedCode, int checkInType, BuildContext context) async {
LoaderBottomSheet.showLoader( LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
loadingText: LocaleKeys.processingCheckIn.tr(context: context),
);
await myAppointmentsViewModel.sendCheckInNfcRequest( await myAppointmentsViewModel.sendCheckInNfcRequest(
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
scannedCode: scannedCode, scannedCode: scannedCode,
checkInType: checkInType, checkInType: checkInType,
onSuccess: (apiResponse) { onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async { showCommonBottomSheetWithoutHeight(context, title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async {
await myAppointmentsViewModel.getPatientAppointmentQueueDetails(); await myAppointmentsViewModel.getPatientAppointmentQueueDetails();
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
@ -168,7 +164,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
}, },
onError: (error) { onError: (error) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.error.tr(context: context), child: Utils.getErrorWidget(loadingText: error), callBackFunc: () { showCommonBottomSheetWithoutHeight(context, title: "Error".needTranslation, child: Utils.getErrorWidget(loadingText: error), callBackFunc: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, isFullScreen: false); }, isFullScreen: false);
}, },

@ -114,7 +114,7 @@ class AppointmentDoctorCard extends StatelessWidget {
iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor, iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment! labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context) ? LocaleKeys.livecare.tr(context: context)
: LocaleKeys.walkin.tr(context: context), : "Walk In".needTranslation,
backgroundColor: backgroundColor:
!patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor, !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor,
textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor, textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
@ -160,7 +160,7 @@ class AppointmentDoctorCard extends StatelessWidget {
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
) )
: CustomButton( : CustomButton(
text: LocaleKeys.rebookSameDoctor.tr(), text: "Rebook with same doctor".needTranslation,
onPressed: () { onPressed: () {
onRescheduleTap(); onRescheduleTap();
}, },

@ -105,7 +105,7 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon."), child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon.".needTranslation),
callBackFunc: () { callBackFunc: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },

@ -46,7 +46,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
SizedBox(height: 24.h), SizedBox(height: 24.h),
FacilitySelectionItem( FacilitySelectionItem(
svgPath: AppAssets.hmg, svgPath: AppAssets.hmg,
title: "HMG", title: "HMG".needTranslation,
subTitle: LocaleKeys.hospitalsWithCount.tr(namedArgs: { subTitle: LocaleKeys.hospitalsWithCount.tr(namedArgs: {
'count': 'count':
"${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}" "${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}"
@ -63,7 +63,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
FacilitySelectionItem( FacilitySelectionItem(
svgPath: AppAssets.hmc, svgPath: AppAssets.hmc,
title: "HMC", title: "HMC".needTranslation,
subTitle: LocaleKeys.medicalCentersWithCount.tr(namedArgs: { subTitle: LocaleKeys.medicalCentersWithCount.tr(namedArgs: {
'count': 'count':
"${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}" "${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}"

@ -32,7 +32,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
// children: [ // children: [
// Text( // Text(
// LocaleKeys.selectHospital.tr(context: context), // LocaleKeys.selectHospital.tr(),
// style: TextStyle( // style: TextStyle(
// fontSize: 21, // fontSize: 21,
// fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
@ -40,7 +40,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// ), // ),
// ), // ),
// Text( // Text(
// LocaleKeys.selectHospitalSubTitle.tr(context: context), // LocaleKeys.selectHospitalSubTitle.tr(),
// style: TextStyle( // style: TextStyle(
// fontSize: 16, // fontSize: 16,
// fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500,
@ -49,8 +49,8 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// ), // ),
// SizedBox(height: 16.h), // SizedBox(height: 16.h),
// TextInputWidget( // TextInputWidget(
// labelText: LocaleKeys.search.tr(context: context), // labelText: LocaleKeys.search.tr(),
// hintText: LocaleKeys.searchHospital.tr(context: context), // hintText: LocaleKeys.searchHospital.tr(),
// controller: searchText, // controller: searchText,
// onChange: (value) { // onChange: (value) {
// appointmentsViewModel.filterHospitalListByString( // appointmentsViewModel.filterHospitalListByString(
@ -135,8 +135,8 @@ class HospitalBottomSheetBody extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.search.tr(context: context), labelText: LocaleKeys.search.tr(),
hintText: LocaleKeys.searchHospital.tr(context: context), hintText: LocaleKeys.searchHospital.tr(),
controller: searchText, controller: searchText,
onChange: (value) { onChange: (value) {
debouncer.run((){ debouncer.run((){

@ -76,7 +76,7 @@ class HospitalListItem extends StatelessWidget {
Visibility( Visibility(
visible: (hospitalData?.distanceInKMs != "0"), visible: (hospitalData?.distanceInKMs != "0"),
child: AppCustomChipWidget( child: AppCustomChipWidget(
labelText: "${hospitalData?.distanceInKMs ?? ""} km", labelText: "${hospitalData?.distanceInKMs ?? ""} km".needTranslation,
deleteIcon: AppAssets.location_red, deleteIcon: AppAssets.location_red,
deleteIconSize: Size(9, 12), deleteIconSize: Size(9, 12),
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
@ -88,7 +88,7 @@ class HospitalListItem extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Distance not available", labelText: "Distance not available".needTranslation,
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
), ),
// SizedBox( // SizedBox(
@ -99,7 +99,7 @@ class HospitalListItem extends StatelessWidget {
Visibility( Visibility(
visible: !isLocationEnabled, visible: !isLocationEnabled,
child: AppCustomChipWidget( child: AppCustomChipWidget(
labelText: "Location turned off", labelText: "Location turned off".needTranslation,
deleteIcon: AppAssets.location_unavailable, deleteIcon: AppAssets.location_unavailable,
deleteIconSize: Size(9.w, 12.h), deleteIconSize: Size(9.w, 12.h),
textColor: AppColors.blackColor, textColor: AppColors.blackColor,

@ -23,7 +23,7 @@ class TypeSelectionWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "All Facilities", labelText: "All Facilities".needTranslation,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.ALL color: data.currentlySelectedFacility == FacilitySelection.ALL
@ -45,7 +45,7 @@ class TypeSelectionWidget extends StatelessWidget {
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.hmg, icon: AppAssets.hmg,
iconHasColor: false, iconHasColor: false,
labelText: "Hospitals", labelText: "Hospitals".needTranslation,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMG color: data.currentlySelectedFacility == FacilitySelection.HMG
@ -67,7 +67,7 @@ class TypeSelectionWidget extends StatelessWidget {
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.hmc, icon: AppAssets.hmc,
iconHasColor: false, iconHasColor: false,
labelText: "Medical Centers", labelText: "Medical Centers".needTranslation,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: BorderSide( side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMC color: data.currentlySelectedFacility == FacilitySelection.HMC

@ -71,10 +71,10 @@ class LoginScreenState extends State<LoginScreen> {
children: [ children: [
Utils.showLottie(context: context, assetPath: AppAnimations.login, width: 200.h, height: 200.h, repeat: true, fit: BoxFit.cover), Utils.showLottie(context: context, assetPath: AppAnimations.login, width: 200.h, height: 200.h, repeat: true, fit: BoxFit.cover),
SizedBox(height: 130.h), // Adjusted to sizer unit SizedBox(height: 130.h), // Adjusted to sizer unit
LocaleKeys.welcomeToDrSulaiman.tr(context: context).toText32(isBold: true, color: AppColors.textColor), LocaleKeys.welcomeToDrSulaiman.tr().toText32(isBold: true, color: AppColors.textColor),
SizedBox(height: 32.h), SizedBox(height: 32.h),
TextInputWidget( TextInputWidget(
labelText: "${LocaleKeys.nationalId.tr(context: context)} / ${LocaleKeys.fileNo.tr(context: context)}", labelText: "${LocaleKeys.nationalId.tr()} / ${LocaleKeys.fileNo.tr()}",
hintText: "xxxxxxxxx", hintText: "xxxxxxxxx",
controller: authVm.nationalIdController, controller: authVm.nationalIdController,
focusNode: _nationalIdFocusNode, focusNode: _nationalIdFocusNode,
@ -87,13 +87,13 @@ class LoginScreenState extends State<LoginScreen> {
isAllowLeadingIcon: true, isAllowLeadingIcon: true,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h), padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h),
leadingIcon: AppAssets.student_card, leadingIcon: AppAssets.student_card,
errorMessage: LocaleKeys.enterValidIDorIqama.tr(context: context), errorMessage: "Please enter a valid national ID or file number".needTranslation,
hasError: false, hasError: false,
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
CustomButton( CustomButton(
height: 50.h, height: 50.h,
text: LocaleKeys.login.tr(context: context), text: LocaleKeys.login.tr(),
icon: AppAssets.login1, icon: AppAssets.login1,
iconColor: Colors.white, iconColor: Colors.white,
onPressed: () { onPressed: () {
@ -116,10 +116,10 @@ class LoginScreenState extends State<LoginScreen> {
text: TextSpan( text: TextSpan(
style: context.dynamicTextStyle(color: Colors.black, fontSize: 14.f, height: 26 / 16, fontWeight: FontWeight.w500), style: context.dynamicTextStyle(color: Colors.black, fontSize: 14.f, height: 26 / 16, fontWeight: FontWeight.w500),
children: <TextSpan>[ children: <TextSpan>[
TextSpan(text: LocaleKeys.dontHaveAccount.tr(context: context), style: context.dynamicTextStyle()), TextSpan(text: LocaleKeys.dontHaveAccount.tr(), style: context.dynamicTextStyle()),
TextSpan(text: " "), TextSpan(text: " "),
TextSpan( TextSpan(
text: LocaleKeys.registernow.tr(context: context), text: LocaleKeys.registernow.tr(),
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
color: AppColors.primaryRedColor, color: AppColors.primaryRedColor,
fontSize: 14.f, // Adjusted to sizer unit fontSize: 14.f, // Adjusted to sizer unit
@ -172,7 +172,7 @@ class LoginScreenState extends State<LoginScreen> {
Padding( Padding(
padding: EdgeInsets.only(bottom: 10.h), padding: EdgeInsets.only(bottom: 10.h),
child: CustomButton( child: CustomButton(
text: LocaleKeys.sendOTPSMS.tr(context: context), text: LocaleKeys.sendOTPSMS.tr(),
onPressed: () async { onPressed: () async {
if (ValidationUtils.isValidatePhone( if (ValidationUtils.isValidatePhone(
phoneNumber: phoneNumberController!.text, phoneNumber: phoneNumberController!.text,
@ -196,14 +196,14 @@ class LoginScreenState extends State<LoginScreen> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 8.h), padding: EdgeInsets.symmetric(horizontal: 8.h),
child: LocaleKeys.oR.tr(context: context).toText16(color: AppColors.textColor), child: LocaleKeys.oR.tr().toText16(color: AppColors.textColor),
), ),
], ],
), ),
Padding( Padding(
padding: EdgeInsets.only(bottom: 10.h, top: 10.h), padding: EdgeInsets.only(bottom: 10.h, top: 10.h),
child: CustomButton( child: CustomButton(
text: LocaleKeys.sendOTPWHATSAPP.tr(context: context), text: LocaleKeys.sendOTPWHATSAPP.tr(),
onPressed: () async { onPressed: () async {
if (ValidationUtils.isValidatePhone( if (ValidationUtils.isValidatePhone(
phoneNumber: phoneNumberController!.text, phoneNumber: phoneNumberController!.text,

@ -49,7 +49,7 @@ class QuickLoginState extends State<QuickLogin> {
], ],
), ),
Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true), Utils.showLottie(context: context, assetPath: AppAnimations.checkmark, width: 120, height: 120, repeat: true),
LocaleKeys.allSet.tr(context: context).toText16(textAlign: TextAlign.center, weight: FontWeight.w500) LocaleKeys.allSet.tr().toText16(textAlign: TextAlign.center, weight: FontWeight.w500)
// Text( // Text(
// ' TranslationBase.of(context).allSet', // ' TranslationBase.of(context).allSet',
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
@ -67,7 +67,7 @@ class QuickLoginState extends State<QuickLogin> {
children: [ children: [
Image.asset(AppAssets.lockIcon, height: 100), Image.asset(AppAssets.lockIcon, height: 100),
SizedBox(height: 10.h), SizedBox(height: 10.h),
LocaleKeys.enableQuickLogin.tr(context: context).toText26(isBold: true), LocaleKeys.enableQuickLogin.tr().toText26(isBold: true),
// Text( // Text(
// ' TranslationBase.of(context).enableQuickLogin', // ' TranslationBase.of(context).enableQuickLogin',
// style: context.dynamicTextStyle( // style: context.dynamicTextStyle(
@ -77,7 +77,7 @@ class QuickLoginState extends State<QuickLogin> {
// ), // ),
// ), // ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
LocaleKeys.enableQuickLogin.tr(context: context).toText16(color: AppColors.quickLoginColor), LocaleKeys.enableQuickLogin.tr().toText16(color: AppColors.quickLoginColor),
// Description // Description
// Text( // Text(
// 'TranslationBase.of(context).enableMsg', // 'TranslationBase.of(context).enableMsg',
@ -94,7 +94,7 @@ class QuickLoginState extends State<QuickLogin> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: LocaleKeys.enableQuickLogin.tr(context: context), text: LocaleKeys.enableQuickLogin.tr(),
onPressed: () { onPressed: () {
widget.onPressed(); widget.onPressed();
}, },
@ -114,7 +114,7 @@ class QuickLoginState extends State<QuickLogin> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: LocaleKeys.notNow.tr(context: context), text: LocaleKeys.notNow.tr(),
onPressed: () { onPressed: () {
cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: false); cacheService.saveBool(key: CacheConst.quickLoginEnabled, value: false);
Navigator.pop(context, "true"); Navigator.pop(context, "true");

@ -80,7 +80,7 @@ class _RegisterNew extends State<RegisterNew> {
children: [ children: [
Utils.showLottie(context: context, assetPath: 'assets/animations/lottie/register.json', width: 200.w, height: 200.h, fit: BoxFit.cover, repeat: true), Utils.showLottie(context: context, assetPath: 'assets/animations/lottie/register.json', width: 200.w, height: 200.h, fit: BoxFit.cover, repeat: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.prepareToElevate.tr(context: context).toText32(isBold: true), LocaleKeys.prepareToElevate.tr().toText32(isBold: true),
SizedBox(height: 24.h), SizedBox(height: 24.h),
Directionality( Directionality(
textDirection: Directionality.of(context), textDirection: Directionality.of(context),
@ -96,7 +96,7 @@ class _RegisterNew extends State<RegisterNew> {
).withVerticalPadding(8.h), ).withVerticalPadding(8.h),
Divider(height: 1.h), Divider(height: 1.h),
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.nationalIdNumber.tr(context: context), labelText: LocaleKeys.nationalIdNumber.tr(),
hintText: "xxxxxxxxx", hintText: "xxxxxxxxx",
controller: authVm.nationalIdController, controller: authVm.nationalIdController,
focusNode: _nationalIdFocusNode, focusNode: _nationalIdFocusNode,
@ -111,8 +111,8 @@ class _RegisterNew extends State<RegisterNew> {
).withVerticalPadding(8), ).withVerticalPadding(8),
Divider(height: 1), Divider(height: 1),
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.dob.tr(context: context), labelText: LocaleKeys.dob.tr(),
hintText: "11 July, 1994", hintText: "11 July, 1994".needTranslation,
controller: authVm.dobController, controller: authVm.dobController,
focusNode: _dobFocusNode, focusNode: _dobFocusNode,
isEnable: true, isEnable: true,
@ -156,7 +156,7 @@ class _RegisterNew extends State<RegisterNew> {
Row( Row(
children: [ children: [
Text( Text(
LocaleKeys.iAcceptThe.tr(context: context), LocaleKeys.iAcceptThe.tr(),
style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)), style: context.dynamicTextStyle(fontSize: 14.f, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
), ),
GestureDetector( GestureDetector(
@ -165,7 +165,7 @@ class _RegisterNew extends State<RegisterNew> {
Navigator.of(context).pushNamed('/terms'); Navigator.of(context).pushNamed('/terms');
}, },
child: Text( child: Text(
LocaleKeys.termsConditoins.tr(context: context), LocaleKeys.termsConditoins.tr(),
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 14.f, fontSize: 14.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -179,7 +179,7 @@ class _RegisterNew extends State<RegisterNew> {
), ),
// Expanded( // Expanded(
// child: Text( // child: Text(
// LocaleKeys.iAcceptTermsConditions.tr(context: context).split("the").first, // LocaleKeys.iAcceptTermsConditions.tr().split("the").first,
// style: context.dynamicTextStyle(fontSize: 14.fSize, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)), // style: context.dynamicTextStyle(fontSize: 14.fSize, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
// ), // ),
// ), // ),
@ -188,7 +188,7 @@ class _RegisterNew extends State<RegisterNew> {
), ),
SizedBox(height: 25.h), SizedBox(height: 25.h),
CustomButton( CustomButton(
text: LocaleKeys.registernow.tr(context: context), text: LocaleKeys.registernow.tr(),
icon: AppAssets.note_edit, icon: AppAssets.note_edit,
onPressed: () { onPressed: () {
// Dismiss keyboard before proceeding // Dismiss keyboard before proceeding
@ -220,10 +220,10 @@ class _RegisterNew extends State<RegisterNew> {
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
children: <TextSpan>[ children: <TextSpan>[
TextSpan(text: LocaleKeys.alreadyHaveAccount.tr(context: context), style: context.dynamicTextStyle()), TextSpan(text: LocaleKeys.alreadyHaveAccount.tr(), style: context.dynamicTextStyle()),
TextSpan(text: " "), TextSpan(text: " "),
TextSpan( TextSpan(
text: LocaleKeys.loginNow.tr(context: context), text: LocaleKeys.loginNow.tr(),
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
color: AppColors.primaryRedColor, color: AppColors.primaryRedColor,
fontSize: 16.f, fontSize: 16.f,
@ -271,7 +271,7 @@ class _RegisterNew extends State<RegisterNew> {
Padding( Padding(
padding: const EdgeInsets.only(bottom: 10), padding: const EdgeInsets.only(bottom: 10),
child: CustomButton( child: CustomButton(
text: LocaleKeys.sendOTPSMS.tr(context: context), text: LocaleKeys.sendOTPSMS.tr(),
onPressed: () async { onPressed: () async {
// Dismiss keyboard before validation // Dismiss keyboard before validation
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
@ -298,14 +298,14 @@ class _RegisterNew extends State<RegisterNew> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 8.h), padding: EdgeInsets.symmetric(horizontal: 8.h),
child: LocaleKeys.oR.tr(context: context).toText16(color: AppColors.textColor), child: LocaleKeys.oR.tr().toText16(color: AppColors.textColor),
), ),
], ],
), ),
Padding( Padding(
padding: EdgeInsets.only(bottom: 10.h, top: 10.h), padding: EdgeInsets.only(bottom: 10.h, top: 10.h),
child: CustomButton( child: CustomButton(
text: LocaleKeys.sendOTPWHATSAPP.tr(context: context), text: LocaleKeys.sendOTPWHATSAPP.tr(),
onPressed: () async { onPressed: () async {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
if (ValidationUtils.isValidatePhone( if (ValidationUtils.isValidatePhone(

@ -73,7 +73,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
LocaleKeys.personalDetailsVerification.tr(context: context).toText26(color: AppColors.textColor, weight: FontWeight.w600, letterSpacing: -2), LocaleKeys.personalDetailsVerification.tr().toText26(color: AppColors.textColor, weight: FontWeight.w600, letterSpacing: -2),
SizedBox(height: 24.h), SizedBox(height: 24.h),
Container( Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
@ -81,8 +81,8 @@ class _RegisterNew extends State<RegisterNewStep2> {
child: Column( child: Column(
children: [ children: [
TextInputWidget( TextInputWidget(
labelText: authVM!.isUserFromUAE() ? LocaleKeys.fullName.tr(context: context) : LocaleKeys.name.tr(context: context), labelText: authVM!.isUserFromUAE() ? LocaleKeys.fullName.tr() : LocaleKeys.name.tr(),
hintText: authVM!.isUserFromUAE() ? LocaleKeys.enterNameHere.tr(context: context) : (name), hintText: authVM!.isUserFromUAE() ? LocaleKeys.enterNameHere.tr() : (name),
controller: authVM!.isUserFromUAE() ? authVM!.nameController : null, controller: authVM!.isUserFromUAE() ? authVM!.nameController : null,
isEnable: true, isEnable: true,
prefix: null, prefix: null,
@ -100,7 +100,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
).paddingSymmetrical(0.h, 16.h), ).paddingSymmetrical(0.h, 16.h),
Divider(height: 1.h, color: AppColors.greyColor), Divider(height: 1.h, color: AppColors.greyColor),
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.nationalIdNumber.tr(context: context), labelText: LocaleKeys.nationalIdNumber.tr(),
hintText: authVM!.isUserFromUAE() ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : (appState.getNHICUserData.idNumber ?? ""), hintText: authVM!.isUserFromUAE() ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : (appState.getNHICUserData.idNumber ?? ""),
controller: null, controller: null,
isEnable: true, isEnable: true,
@ -120,8 +120,8 @@ class _RegisterNew extends State<RegisterNewStep2> {
builder: (context, genderType, child) { builder: (context, genderType, child) {
final authVM = context.read<AuthenticationViewModel>(); final authVM = context.read<AuthenticationViewModel>();
return DropdownWidget( return DropdownWidget(
labelText: LocaleKeys.gender.tr(context: context), labelText: LocaleKeys.gender.tr(),
hintText: LocaleKeys.malE.tr(context: context), hintText: LocaleKeys.malE.tr(),
isEnable: true, isEnable: true,
dropdownItems: GenderTypeEnum.values.map((e) => appState.isArabic() ? e.typeAr : e.type).toList(), dropdownItems: GenderTypeEnum.values.map((e) => appState.isArabic() ? e.typeAr : e.type).toList(),
selectedValue: genderType != null ? (appState.isArabic() ? genderType.typeAr : genderType.type) : "", selectedValue: genderType != null ? (appState.isArabic() ? genderType.typeAr : genderType.type) : "",
@ -136,7 +136,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
).withVerticalPadding(8); ).withVerticalPadding(8);
}) })
: TextInputWidget( : TextInputWidget(
labelText: LocaleKeys.gender.tr(context: context), labelText: LocaleKeys.gender.tr(),
hintText: (appState.getNHICUserData.gender ?? ""), hintText: (appState.getNHICUserData.gender ?? ""),
controller: null, controller: null,
isEnable: true, isEnable: true,
@ -157,8 +157,8 @@ class _RegisterNew extends State<RegisterNewStep2> {
builder: (context, maritalStatus, child) { builder: (context, maritalStatus, child) {
final authVM = context.read<AuthenticationViewModel>(); // For onChange final authVM = context.read<AuthenticationViewModel>(); // For onChange
return DropdownWidget( return DropdownWidget(
labelText: LocaleKeys.maritalStatus.tr(context: context), labelText: LocaleKeys.maritalStatus.tr(),
hintText: LocaleKeys.married.tr(context: context), hintText: LocaleKeys.married.tr(),
isEnable: true, isEnable: true,
dropdownItems: MaritalStatusTypeEnum.values.map((e) => appState.isArabic() ? e.typeAr : e.type).toList(), dropdownItems: MaritalStatusTypeEnum.values.map((e) => appState.isArabic() ? e.typeAr : e.type).toList(),
selectedValue: maritalStatus != null ? (appState.isArabic() ? maritalStatus.typeAr : maritalStatus.type) : "", selectedValue: maritalStatus != null ? (appState.isArabic() ? maritalStatus.typeAr : maritalStatus.type) : "",
@ -174,7 +174,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
}, },
) )
: TextInputWidget( : TextInputWidget(
labelText: LocaleKeys.maritalStatus.tr(context: context), labelText: LocaleKeys.maritalStatus.tr(),
hintText: appState.isArabic() hintText: appState.isArabic()
? (MaritalStatusTypeExtension.fromValue(appState.getNHICUserData.maritalStatusCode)!.typeAr) ? (MaritalStatusTypeExtension.fromValue(appState.getNHICUserData.maritalStatusCode)!.typeAr)
: (MaritalStatusTypeExtension.fromValue(appState.getNHICUserData.maritalStatusCode)!.type), : (MaritalStatusTypeExtension.fromValue(appState.getNHICUserData.maritalStatusCode)!.type),
@ -203,8 +203,8 @@ class _RegisterNew extends State<RegisterNewStep2> {
builder: (context, data, child) { builder: (context, data, child) {
final authVM = context.read<AuthenticationViewModel>(); final authVM = context.read<AuthenticationViewModel>();
return DropdownWidget( return DropdownWidget(
labelText: LocaleKeys.country.tr(context: context), labelText: LocaleKeys.country.tr(),
hintText: LocaleKeys.uae.tr(context: context), hintText: LocaleKeys.uae.tr(),
isEnable: true, isEnable: true,
dropdownItems: (data.countriesList ?? []).map((e) => data.isArabic ? e.nameN ?? "" : e.name ?? "").toList(), dropdownItems: (data.countriesList ?? []).map((e) => data.isArabic ? e.nameN ?? "" : e.name ?? "").toList(),
selectedValue: data.selectedCountry != null selectedValue: data.selectedCountry != null
@ -224,7 +224,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
}, },
) )
: TextInputWidget( : TextInputWidget(
labelText: LocaleKeys.nationality.tr(context: context), labelText: LocaleKeys.nationality.tr(),
hintText: appState.isArabic() hintText: appState.isArabic()
? (authVM!.countriesList!.firstWhere((e) => e.id == (appState.getNHICUserData.nationalityCode ?? ""), orElse: () => NationalityCountries()).nameN ?? "") ? (authVM!.countriesList!.firstWhere((e) => e.id == (appState.getNHICUserData.nationalityCode ?? ""), orElse: () => NationalityCountries()).nameN ?? "")
: (authVM!.countriesList!.firstWhere((e) => e.id == (appState.getNHICUserData.nationalityCode ?? ""), orElse: () => NationalityCountries()).name ?? ""), : (authVM!.countriesList!.firstWhere((e) => e.id == (appState.getNHICUserData.nationalityCode ?? ""), orElse: () => NationalityCountries()).name ?? ""),
@ -243,7 +243,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
color: AppColors.greyColor, color: AppColors.greyColor,
), ),
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.mobileNumber.tr(context: context), labelText: LocaleKeys.mobileNumber.tr(),
hintText: (appState.getUserRegistrationPayload.patientMobileNumber.toString() ?? ""), hintText: (appState.getUserRegistrationPayload.patientMobileNumber.toString() ?? ""),
controller: null, controller: null,
isEnable: false, isEnable: false,
@ -260,7 +260,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
color: AppColors.greyColor, color: AppColors.greyColor,
), ),
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.dob.tr(context: context), labelText: LocaleKeys.dob.tr(),
hintText: authVM!.isUserFromUAE() ? appState.getUserRegistrationPayload.dob! : appState.getNHICUserData.dateOfBirth ?? "", hintText: authVM!.isUserFromUAE() ? appState.getUserRegistrationPayload.dob! : appState.getNHICUserData.dateOfBirth ?? "",
controller: authVM!.isUserFromUAE() ? authVM!.dobController : null, controller: authVM!.isUserFromUAE() ? authVM!.dobController : null,
isEnable: false, isEnable: false,
@ -280,7 +280,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: LocaleKeys.cancel.tr(context: context), text: LocaleKeys.cancel.tr(),
icon: AppAssets.cancel, icon: AppAssets.cancel,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -298,7 +298,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
text: LocaleKeys.confirm.tr(context: context), text: LocaleKeys.confirm.tr(),
icon: AppAssets.confirm, icon: AppAssets.confirm,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
onPressed: () { onPressed: () {
@ -345,7 +345,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
Padding( Padding(
padding: const EdgeInsets.only(bottom: 10), padding: const EdgeInsets.only(bottom: 10),
child: CustomButton( child: CustomButton(
text: LocaleKeys.submit.tr(context: context), text: LocaleKeys.submit.tr(),
onPressed: () { onPressed: () {
if (ValidationUtils.isValidateEmail( if (ValidationUtils.isValidateEmail(
email: authVM!.emailController.text, email: authVM!.emailController.text,

@ -89,8 +89,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
initialIndex: bookAppointmentsVM.selectedTabIndex, initialIndex: bookAppointmentsVM.selectedTabIndex,
tabs: [ tabs: [
CustomTabBarModel(null, LocaleKeys.general.tr(context: context)), CustomTabBarModel(null, "General".needTranslation),
CustomTabBarModel(null, LocaleKeys.liveCare.tr(context: context)), CustomTabBarModel(null, "LiveCare".needTranslation),
], ],
onTabChange: (index) { onTabChange: (index) {
bookAppointmentsVM.onTabChanged(index); bookAppointmentsVM.onTabChanged(index);
@ -121,7 +121,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (appState.isAuthenticated) ...[], if (appState.isAuthenticated) ...[],
LocaleKeys.recentVisits.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.w, 0.h), "Recent Visits".needTranslation.toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
SizedBox( SizedBox(
height: 110.h, height: 110.h,
@ -232,8 +232,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.searchByClinic.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Search By Clinic".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -264,8 +264,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.searchByDoctor.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Search By Doctor".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelect.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "Tap to select".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -294,8 +294,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.searchByRegion.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Search By Region".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.centralRegion.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "Central Region".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -340,8 +340,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.immediateConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Immediate Consultation".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -382,8 +382,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.scheduledConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Scheduled Consultation".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -412,8 +412,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.pharmaLiveCare.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), "Pharma LiveCare".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), "".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
], ],
), ),
], ],
@ -447,9 +447,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.notSureHelpMeChooseClinic.tr(context: context).toText16(weight: FontWeight.w600, color: AppColors.textColor), "Not sure? help me choose a clinic!".needTranslation.toText16(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 8.h), SizedBox(height: 4.h),
LocaleKeys.mentionYourSymptomsAndFindDoctors.tr(context: context).toText12( "Mention your symptoms and find the list of doctors accordingly".needTranslation.toText12(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
@ -531,7 +531,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
getTitle(AppointmentViaRegionViewmodel data) { getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) { if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr(context: context).toText20(weight: FontWeight.w600); return LocaleKeys.selectRegion.tr().toText20(weight: FontWeight.w600);
} else { } else {
return Transform.flip( return Transform.flip(
flipX: data.isArabic ? true : false, flipX: data.isArabic ? true : false,
@ -558,8 +558,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.immediateService.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Immediate service".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "No need to wait, you will get medical consultation immediately via video call".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -574,7 +574,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.noVisitRequired.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "No visit required".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
@ -590,8 +590,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.doctorWillContact.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Doctor will contact".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "A specialised doctor will contact you and will be able to view your medical history".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -606,8 +606,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.freeMedicineDelivery.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Free medicine delivery".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Offers free medicine delivery for the LiveCare appointment".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -615,7 +615,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
), ),
SizedBox(height: 36.h), SizedBox(height: 36.h),
CustomButton( CustomButton(
text: "Login to use this service", text: "Login to use this service".needTranslation,
onPressed: () async { onPressed: () async {
await authVM.onLoginPressed(); await authVM.onLoginPressed();
}, },

@ -1,6 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -10,7 +9,6 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/dental_chief_complaints_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/dental_chief_complaints_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/chief_complaint_card.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/chief_complaint_card.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -42,7 +40,7 @@ class _DentalChiefComplaintsPageState extends State<DentalChiefComplaintsPage> {
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false); bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
return CollapsingListView( return CollapsingListView(
title: LocaleKeys.dentalChiefComplaints.tr(), title: "Dental Chief Complaints".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h), padding: EdgeInsets.symmetric(horizontal: 24.h),

@ -128,7 +128,7 @@ class DoctorsFilters extends StatelessWidget{
TextInputWidget( TextInputWidget(
controller: TextEditingController()..text =context.watch<DoctorFilterViewModel>().selectedClinicForFilters ??'', controller: TextEditingController()..text =context.watch<DoctorFilterViewModel>().selectedClinicForFilters ??'',
labelText: LocaleKeys.clinicName.tr(context: context), labelText: LocaleKeys.clinicName.tr(context: context),
hintText: LocaleKeys.searchClinic.tr(), hintText: LocaleKeys.searchClinic.tr().needTranslation,
isEnable: false, isEnable: false,
prefix: null, prefix: null,
autoFocus: false, autoFocus: false,

@ -1,5 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -9,7 +8,6 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -35,7 +33,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.doctorProfile.tr(), title: "Doctor Profile".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -86,11 +84,11 @@ class DoctorProfilePage extends StatelessWidget {
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
iconColor: AppColors.ratingColorYellow, iconColor: AppColors.ratingColorYellow,
labelText: "${bookAppointmentsViewModel.doctorsProfileResponseModel.projectName}", labelText: "Branch: ${bookAppointmentsViewModel.doctorsProfileResponseModel.projectName}".needTranslation,
), ),
AppCustomChipWidget( AppCustomChipWidget(
iconColor: AppColors.ratingColorYellow, iconColor: AppColors.ratingColorYellow,
labelText: "${bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription}", labelText: "Clinic: ${bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription}".needTranslation,
), ),
], ],
), ),
@ -144,7 +142,7 @@ class DoctorProfilePage extends StatelessWidget {
hasShadow: true, hasShadow: true,
), ),
child: CustomButton( child: CustomButton(
text: LocaleKeys.viewAvailableAppointments.tr(), text: "View available appointments".needTranslation,
onPressed: () async { onPressed: () async {
LoaderBottomSheet.showLoader(); LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule bookAppointmentsViewModel.isLiveCareSchedule
@ -153,7 +151,7 @@ class DoctorProfilePage extends StatelessWidget {
onSuccess: (dynamic respData) async { onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: LocaleKeys.pickADate.tr(), title: "Pick a Date".needTranslation,
context, context,
child: AppointmentCalendar(), child: AppointmentCalendar(),
isFullScreen: false, isFullScreen: false,
@ -176,7 +174,7 @@ class DoctorProfilePage extends StatelessWidget {
onSuccess: (dynamic respData) async { onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
title: LocaleKeys.pickADate.tr(), title: "Pick a Date".needTranslation,
context, context,
child: AppointmentCalendar(), child: AppointmentCalendar(),
isFullScreen: false, isFullScreen: false,

@ -83,8 +83,8 @@ class LaserAppointment extends StatelessWidget {
activeTextColor: Color(0xffED1C2B), activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
tabs: [ tabs: [
CustomTabBarModel(null, LocaleKeys.malE.tr()), CustomTabBarModel(null,LocaleKeys.malE.tr()),
CustomTabBarModel(null, "Female"), CustomTabBarModel(null, "Female".needTranslation),
], ],
onTabChange: (index) { onTabChange: (index) {
var viewmodel = context.read<BookAppointmentsViewModel>(); var viewmodel = context.read<BookAppointmentsViewModel>();

@ -45,7 +45,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.reviewLiveCareRequest.tr(context: context), title: "Review LiveCare Request".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 24.h), padding: EdgeInsets.symmetric(horizontal: 24.h),
child: Column( child: Column(
@ -80,7 +80,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
spacing: 3.h, spacing: 3.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"), AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old".needTranslation),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceName)!}"), "${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceName)!}"),
@ -93,7 +93,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
), ),
), ),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.selectedLiveCareType.tr(context: context).toText16(isBold: true), "Selected LiveCare Type".needTranslation.toText16(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) { Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return Container( return Container(
@ -111,7 +111,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain), Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain),
SizedBox(width: 8.h), SizedBox(width: 8.h),
getLiveCareType(context, immediateLiveCareViewModel.liveCareSelectedCallType).toText16(isBold: true), getLiveCareType(immediateLiveCareViewModel.liveCareSelectedCallType).toText16(isBold: true),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain), Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
@ -121,7 +121,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
).onPress(() { ).onPress(() {
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async { showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async {
debugPrint("Selected Call Type: ${immediateLiveCareViewModel.liveCareSelectedCallType}"); debugPrint("Selected Call Type: ${immediateLiveCareViewModel.liveCareSelectedCallType}");
}, title: LocaleKeys.selectLiveCareCallType.tr(context: context), isCloseButtonVisible: true, isFullScreen: false); }, title: "Select LiveCare call type".needTranslation, isCloseButtonVisible: true, isFullScreen: false);
}); });
}), }),
SizedBox(height: 24.h) SizedBox(height: 24.h)
@ -152,7 +152,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h), "Insurance expired or inactive".needTranslation.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton( CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context), text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () { onPressed: () {
@ -176,12 +176,12 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
) )
: const SizedBox(), : const SizedBox(),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h), "Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), "Amount before tax".needTranslation.toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13, Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"), isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
], ],
@ -189,7 +189,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor), "VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"), isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
@ -210,7 +210,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
onPressed: () async { onPressed: () async {
await askVideoCallPermission().then((val) async { await askVideoCallPermission().then((val) async {
if (val) { if (val) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingLiveCareRequest.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Confirming LiveCare request, Please wait...".needTranslation);
await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare("${appState.getAuthenticatedUser()!.patientId}${DateTime.now().millisecondsSinceEpoch}"); await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare("${appState.getAuthenticatedUser()!.patientId}${DateTime.now().millisecondsSinceEpoch}");
await immediateLiveCareViewModel.getPatientLiveCareHistory(); await immediateLiveCareViewModel.getPatientLiveCareHistory();
@ -230,7 +230,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.unknownErrorOccurred.tr(context: context)), child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -241,7 +241,9 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context), title: LocaleKeys.notice.tr(context: context),
context, context,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context), loadingText:
"LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed."
.needTranslation,
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () { onCancelTap: () {
Navigator.pop(context); Navigator.pop(context);
@ -283,7 +285,9 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context), title: LocaleKeys.notice.tr(context: context),
context, context,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context), loadingText:
"LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed."
.needTranslation,
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () { onCancelTap: () {
Navigator.pop(context); Navigator.pop(context);
@ -347,16 +351,16 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
// } // }
} }
String getLiveCareType(BuildContext context, int callType) { String getLiveCareType(int callType) {
switch (callType) { switch (callType) {
case 1: case 1:
return LocaleKeys.videoCall.tr(context: context); return "Video Call".needTranslation;
case 2: case 2:
return LocaleKeys.audioCall.tr(context: context); return "Audio Call".needTranslation;
case 3: case 3:
return LocaleKeys.phoneCall.tr(context: context); return "Phone Call".needTranslation;
default: default:
return LocaleKeys.videoCall.tr(context: context); return "Video Call".needTranslation;
} }
} }
} }

@ -84,7 +84,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.liveCarePayment.tr(context: context), title: "LiveCare Payment".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -104,7 +104,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [ children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h), Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.mada.tr(context: context).toText16(isBold: true), "Mada".needTranslation.toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -146,7 +146,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true), "Visa or Mastercard".needTranslation.toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -183,7 +183,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [ children: [
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h), Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true), "Tamara".needTranslation.toText16(isBold: true),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -234,7 +234,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.insuranceExpiredOrInactive.tr().toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h), "Insurance expired or inactive".needTranslation.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton( CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context), text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () { onPressed: () {
@ -258,12 +258,12 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
) )
: const SizedBox(), : const SizedBox(),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.totalAmountToPay.tr().toText18(isBold: true).paddingSymmetrical(24.h, 0.h), "Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.amountBeforeTax.tr().toText14(isBold: true), "Amount before tax".needTranslation.toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toString().toText16(isBold: true), AppColors.blackColor, 13, Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
@ -271,7 +271,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.vat15.tr().toText14(isBold: true, color: AppColors.greyTextColor), "VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
@ -281,7 +281,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"".toText14(isBold: true), "".needTranslation.toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!.toString().toText24(isBold: true), AppColors.blackColor, 17, Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!.toString().toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
@ -355,7 +355,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} }
void checkPaymentStatus() async { void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr()); LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
if (selectedPaymentMethod == "TAMARA") { if (selectedPaymentMethod == "TAMARA") {
await payfortViewModel.checkTamaraPaymentStatus( await payfortViewModel.checkTamaraPaymentStatus(
@ -382,7 +382,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -393,7 +393,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()), child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -434,7 +434,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -443,7 +443,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else { } else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()), child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,
@ -482,7 +482,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} }
startApplePay() async { startApplePay() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingApplePayDetails.tr()); LoaderBottomSheet.showLoader(loadingText: "Fetching Apple Pay details, Please wait...".needTranslation);
transID = Utils.getAppointmentTransID( transID = Utils.getAppointmentTransID(
immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!, immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!,
ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12, ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12,

@ -1,6 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -11,7 +10,6 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -64,7 +62,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.liveCarePendingRequest.tr(), title: "LiveCare Pending Request".needTranslation,
child: Padding( child: Padding(
padding: EdgeInsets.all(24.0), padding: EdgeInsets.all(24.0),
child: Column( child: Column(
@ -126,7 +124,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".toText16(isBold: true), "Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon, icon: AppAssets.appointment_calendar_icon,
@ -150,7 +148,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
hasShadow: true, hasShadow: true,
), ),
child: CustomButton( child: CustomButton(
text: LocaleKeys.callLiveCareSupport.tr(), text: "Call LiveCare Support".needTranslation,
onPressed: () async { onPressed: () async {
launchUrl(Uri.parse("tel://" + "011 525 9553")); launchUrl(Uri.parse("tel://" + "011 525 9553"));
}, },

@ -1,6 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -14,7 +13,6 @@ import 'package:hmg_patient_app_new/features/book_appointments/models/resp_model
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart';
@ -61,7 +59,7 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.selectLiveCareClinic.tr(), title: "Select LiveCare Clinic".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.all(24.h), padding: EdgeInsets.all(24.h),
@ -120,7 +118,7 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async { showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async {
if (immediateLiveCareViewModel.liveCareSelectedCallType != 0) { if (immediateLiveCareViewModel.liveCareSelectedCallType != 0) {
immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic); immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingFeesPleaseWait.tr()); LoaderBottomSheet.showLoader(loadingText: "Fetching fees, Please wait...".needTranslation);
await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) { await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
Navigator.of(context).push( Navigator.of(context).push(
@ -132,11 +130,11 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
}); });
} }
}, title: LocaleKeys.selectLiveCareCallType.tr(), isCloseButtonVisible: true, isFullScreen: false); }, title: "Select LiveCare call type".needTranslation, isCloseButtonVisible: true, isFullScreen: false);
} else { } else {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
child: Utils.getErrorWidget( child: Utils.getErrorWidget(
loadingText: "The selected clinic is only available between ${liveCareClinic.shiftTimings!.first.startTime} & ${liveCareClinic.shiftTimings!.first.endTime} hours."), loadingText: "The selected clinic is only available between ${liveCareClinic.shiftTimings!.first.startTime} & ${liveCareClinic.shiftTimings!.first.endTime} hours.".needTranslation),
callBackFunc: () {}, callBackFunc: () {},
title: "", title: "",
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -37,7 +37,7 @@ class LiveCareClinicCard extends StatelessWidget {
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.livecare_online_icon, icon: AppAssets.livecare_online_icon,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : LocaleKeys.offline.tr()).toText10(isBold: true, color: AppColors.whiteColor), richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : "Offline".needTranslation).toText10(isBold: true, color: AppColors.whiteColor),
backgroundColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor, backgroundColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
), ),

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.dart';
@ -8,7 +7,6 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
class SelectLiveCareCallType extends StatelessWidget { class SelectLiveCareCallType extends StatelessWidget {
@ -23,8 +21,8 @@ class SelectLiveCareCallType extends StatelessWidget {
children: [ children: [
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.videoCall.tr(context: context), "Video Call".needTranslation,
LocaleKeys.liveVideoCallWithHMGDoctors.tr(context: context), "View your nearest HMG locations".needTranslation,
).onPress(() { ).onPress(() {
Navigator.of(context).pop(); Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(1); immediateLiveCareViewModel.setLiveCareSelectedCallType(1);
@ -32,8 +30,8 @@ class SelectLiveCareCallType extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.audioCall.tr(context: context), "Audio Call".needTranslation,
LocaleKeys.liveVideoCallWithHMGDoctors.tr(context: context), "Provide your feedback on our services".needTranslation,
).onPress(() { ).onPress(() {
Navigator.of(context).pop(); Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(2); immediateLiveCareViewModel.setLiveCareSelectedCallType(2);
@ -41,8 +39,8 @@ class SelectLiveCareCallType extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_location_icon, AppAssets.checkin_location_icon,
LocaleKeys.phoneCall.tr(context: context), "Phone Call".needTranslation,
LocaleKeys.livePhoneCallWithHMGDoctors.tr(context: context), "Live chat option with HMG".needTranslation,
).onPress(() { ).onPress(() {
Navigator.of(context).pop(); Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(3); immediateLiveCareViewModel.setLiveCareSelectedCallType(3);

@ -113,18 +113,20 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
runSpacing: 8.h, runSpacing: 8.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}", labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}".needTranslation,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.branch.tr(context: context)} ${bookAppointmentsViewModel.selectedDoctor.projectName}", labelText: "${LocaleKeys.branch.tr(context: context)} ${bookAppointmentsViewModel.selectedDoctor.projectName}".needTranslation,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
"${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDate}", "${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDate}"
.needTranslation,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
"${LocaleKeys.time.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? LocaleKeys.waitingAppointment.tr(context: context) : bookAppointmentsViewModel.selectedAppointmentTime}", "${LocaleKeys.time.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? "Waiting Appointment".needTranslation : bookAppointmentsViewModel.selectedAppointmentTime}"
.needTranslation,
), ),
], ],
), ),
@ -164,7 +166,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
), ),
), ),
SizedBox(height: 24.h), SizedBox(height: 24.h),
LocaleKeys.hospitalInformation.tr(context: context).toText16(isBold: true), "Hospital Information".needTranslation.toText16(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Container( Container(
width: double.infinity, width: double.infinity,
@ -239,7 +241,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
} }
void getWalkInAppointmentPatientShare() async { void getWalkInAppointmentPatientShare() async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointmentShare.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment Share...".needTranslation);
await bookAppointmentsViewModel.getWalkInPatientShareAppointment(onSuccess: (val) { await bookAppointmentsViewModel.getWalkInPatientShareAppointment(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
Navigator.of(context).push( Navigator.of(context).push(
@ -260,7 +262,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
} }
void initiateBookAppointment() async { void initiateBookAppointment() async {
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr(context: context)); LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
if (bookAppointmentsViewModel.isLiveCareSchedule) { if (bookAppointmentsViewModel.isLiveCareSchedule) {

@ -34,14 +34,6 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
TextEditingController searchEditingController = TextEditingController(); TextEditingController searchEditingController = TextEditingController();
FocusNode textFocusNode = FocusNode(); FocusNode textFocusNode = FocusNode();
late BookAppointmentsViewModel bookAppointmentsViewModel; late BookAppointmentsViewModel bookAppointmentsViewModel;
late ScrollController _scrollController;
final Map<int, GlobalKey> _itemKeys = {};
@override
void initState() {
_scrollController = ScrollController();
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -51,8 +43,8 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.chooseDoctor.tr(), title: "Choose Doctor".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h), padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -84,7 +76,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
) )
: null, : null,
onChange: (value) { onChange: (value) {
// bookAppointmentsViewModel.filterClinics(value!); // bookAppointmentsViewModel.filterClinics(value!);
}, },
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h, vertical: ResponsiveExtension(10).h,
@ -97,41 +89,43 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
child: SizedBox( child: SizedBox(
height: 56.h, height: 56.h,
width: 56.h, width: 56.h,
child: DecoratedBox( child: DecoratedBox(decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor,
color: AppColors.whiteColor, borderRadius: 10.h,
borderRadius: 10.h, hasShadow: false,
hasShadow: false, ),
), child: Utils.buildSvgWithAssets(icon: AppAssets.ic_filters,
child: Utils.buildSvgWithAssets( height: 24.h,
icon: AppAssets.ic_filters, width: 24.h, ).paddingAll(16.h).onPress((){
height: 24.h, context.read<DoctorFilterViewModel>()
width: 24.h,
).paddingAll(16.h).onPress(() {
context.read<DoctorFilterViewModel>()
..clearSelection() ..clearSelection()
..clearSearchFilters() ..clearSearchFilters()
..getFiltersFromDoctorList(bookAppointmentsViewModel.doctorsList) ..getFiltersFromDoctorList(
..setSelections(bookAppointmentsViewModel.selectedFacilityForFilters?.toList(), bookAppointmentsViewModel.selectedRegionForFilters?.toList(), bookAppointmentsViewModel.doctorsList
bookAppointmentsViewModel.selectedClinicForFilters, bookAppointmentsViewModel.selectedHospitalForFilters, bookAppointmentsViewModel.applyFilters); )..setSelections(
Navigator.of(context).push( bookAppointmentsViewModel.selectedFacilityForFilters?.toList(),
PageRouteBuilder( bookAppointmentsViewModel.selectedRegionForFilters?.toList(),
pageBuilder: (context, animation, secondaryAnimation) => DoctorsFilters(), // Replace YourNewPage with your actual page widget bookAppointmentsViewModel.selectedClinicForFilters,
transitionsBuilder: (context, animation, secondaryAnimation, child) { bookAppointmentsViewModel.selectedHospitalForFilters,
const begin = Offset(0.0, 1.0); // Start from the bottom (y=1.0) bookAppointmentsViewModel.applyFilters) ;
const end = Offset.zero; // End at the original position (y=0.0) Navigator.of(context).push(
final tween = Tween(begin: begin, end: end); PageRouteBuilder(
final offsetAnimation = animation.drive(tween); pageBuilder: (context, animation, secondaryAnimation) => DoctorsFilters(), // Replace YourNewPage with your actual page widget
transitionsBuilder: (context, animation, secondaryAnimation, child) {
const begin = Offset(0.0, 1.0); // Start from the bottom (y=1.0)
const end = Offset.zero; // End at the original position (y=0.0)
final tween = Tween(begin: begin, end: end);
final offsetAnimation = animation.drive(tween);
return SlideTransition( return SlideTransition(
position: offsetAnimation, position: offsetAnimation,
child: child, child: child,
); );
}, },
transitionDuration: Duration(milliseconds: 200), // Adjust duration as needed transitionDuration: Duration(milliseconds: 200), // Adjust duration as needed
), ),
); );
}), }),
), ),
), ),
) )
@ -142,50 +136,13 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (bookAppointmentsVM.isDoctorSearchByNameStarted)
Row(
children: [
CustomButton(
text: LocaleKeys.byClinic.tr(context: context),
onPressed: () {
bookAppointmentsVM.sortFilteredDoctorList(true);
},
backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
),
SizedBox(width: 8.h),
CustomButton(
text: LocaleKeys.byHospital.tr(context: context),
onPressed: () {
bookAppointmentsVM.sortFilteredDoctorList(false);
},
backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
),
],
).paddingSymmetrical(0.h, 0.h),
bookAppointmentsVM.isDoctorSearchByNameStarted bookAppointmentsVM.isDoctorSearchByNameStarted
? ListView.separated( ? ListView.separated(
padding: EdgeInsets.only(top: 20.h), padding: EdgeInsets.only(top: 24.h),
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: bookAppointmentsVM.isDoctorsListLoading ? 5 : bookAppointmentsVM.getGroupedFilteredDoctorsList().length, itemCount: bookAppointmentsVM.isDoctorsListLoading ? 5 : bookAppointmentsVM.filteredDoctorList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final isExpanded = bookAppointmentsVM.expandedGroupIndex == index;
final groupedDoctors = bookAppointmentsVM.getGroupedFilteredDoctorsList();
return bookAppointmentsVM.isDoctorsListLoading return bookAppointmentsVM.isDoctorsListLoading
? DoctorCard( ? DoctorCard(
doctorsListResponseModel: DoctorsListResponseModel(), doctorsListResponseModel: DoctorsListResponseModel(),
@ -199,112 +156,35 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
verticalOffset: 100.0, verticalOffset: 100.0,
child: FadeInAnimation( child: FadeInAnimation(
child: AnimatedContainer( child: AnimatedContainer(
key: _itemKeys.putIfAbsent(index, () => GlobalKey()),
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOut, curve: Curves.easeInOut,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: InkWell( child: DoctorCard(
onTap: () { doctorsListResponseModel: bookAppointmentsVM.filteredDoctorList[index],
bookAppointmentsVM.toggleGroupExpansion(index); isLoading: false,
// After rebuild, ensure the expanded item is visible bookAppointmentsViewModel: bookAppointmentsViewModel,
WidgetsBinding.instance.addPostFrameCallback((_) { ).onPress(() async {
final key = _itemKeys[index]; bookAppointmentsVM.setSelectedDoctor(bookAppointmentsVM.filteredDoctorList[index]);
if (key != null && key.currentContext != null && bookAppointmentsVM.expandedGroupIndex == index) { // bookAppointmentsVM.setSelectedDoctor(DoctorsListResponseModel());
Scrollable.ensureVisible( LoaderBottomSheet.showLoader();
key.currentContext!, await bookAppointmentsVM.getDoctorProfile(onSuccess: (dynamic respData) {
duration: Duration(milliseconds: 350), LoaderBottomSheet.hideLoader();
curve: Curves.easeInOut, Navigator.of(context).push(
alignment: 0.1, CustomPageRoute(
); page: DoctorProfilePage(),
} ),
}); );
}, }, onError: (err) {
child: Padding( LoaderBottomSheet.hideLoader();
padding: EdgeInsets.all(16.h), showCommonBottomSheetWithoutHeight(
child: Column( context,
crossAxisAlignment: CrossAxisAlignment.start, child: Utils.getErrorWidget(loadingText: err),
children: [ callBackFunc: () {},
Row( isFullScreen: false,
mainAxisAlignment: MainAxisAlignment.spaceBetween, isCloseButtonVisible: true,
children: [ );
CustomButton( });
text: "${groupedDoctors[index].length} ${'doctors'}", }),
onPressed: () {},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
textColor: AppColors.blackColor,
fontSize: 10,
fontWeight: FontWeight.w500,
borderRadius: 8,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 30.h),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
],
),
SizedBox(height: 8.h),
// Clinic/Hospital name as group title
Text(
bookAppointmentsVM.isSortByClinic
? (groupedDoctors[index].first.clinicName ?? 'Unknown')
: (groupedDoctors[index].first.projectName ?? 'Unknown'),
style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600),
overflow: TextOverflow.ellipsis,
),
// Expanded content - list of doctors in this group
AnimatedSwitcher(
duration: Duration(milliseconds: 400),
child: isExpanded
? Container(
key: ValueKey<int>(index),
padding: EdgeInsets.only(top: 12.h),
child: Column(
children: groupedDoctors[index].asMap().entries.map<Widget>((entry) {
final doctorIndex = entry.key;
final doctor = entry.value;
final isLastDoctor = doctorIndex == groupedDoctors[index].length - 1;
return Column(
children: [
DoctorCard(
doctorsListResponseModel: doctor,
isLoading: false,
bookAppointmentsViewModel: bookAppointmentsViewModel,
).onPress(() async {
bookAppointmentsVM.setSelectedDoctor(doctor);
LoaderBottomSheet.showLoader();
await bookAppointmentsVM.getDoctorProfile(
onSuccess: (dynamic respData) {
LoaderBottomSheet.hideLoader();
Navigator.of(context).push(
CustomPageRoute(
page: DoctorProfilePage(),
),
);
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
},
);
}),
if (!isLastDoctor)
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h),
],
);
}).toList(),
),
)
: SizedBox.shrink(),
),
],
),
),
),
), ),
), ),
), ),
@ -381,10 +261,8 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
), ),
); );
} }
@override @override
void dispose() { void dispose() {
_scrollController.dispose();
bookAppointmentsViewModel.doctorsList.clear(); bookAppointmentsViewModel.doctorsList.clear();
super.dispose(); super.dispose();
} }

@ -79,7 +79,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))),
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h), padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h),
child: CustomButton( child: CustomButton(
text: LocaleKeys.bookAppo.tr(context: context), text: LocaleKeys.bookAppo.tr(),
onPressed: () { onPressed: () {
if (widget.calculatedResult["clinicId"] == null) { if (widget.calculatedResult["clinicId"] == null) {
bookAppointmentsViewModel.setIsDoctorsListLoading(true); bookAppointmentsViewModel.setIsDoctorsListLoading(true);
@ -103,7 +103,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: bookAppointmentsViewModel.isLiveCareSchedule ? LocaleKeys.selectLiveCareClinic.tr(context: context) : LocaleKeys.selectClinic.tr(context: context), title: bookAppointmentsViewModel.isLiveCareSchedule ? "Select LiveCare Clinic".needTranslation : LocaleKeys.selectClinic.tr(context: context),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h), padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -1097,7 +1097,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
getTitle(AppointmentViaRegionViewmodel data) { getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) { if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr(context: context).toText20(weight: FontWeight.w600); return LocaleKeys.selectRegion.tr().toText20(weight: FontWeight.w600);
} else { } else {
return Transform.flip( return Transform.flip(
flipX: data.isArabic ? true : false, flipX: data.isArabic ? true : false,
@ -1114,18 +1114,18 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
void initDentalAppointmentBookingFlow(int projectID) async { void initDentalAppointmentBookingFlow(int projectID) async {
bookAppointmentsViewModel.setProjectID(projectID.toString()); bookAppointmentsViewModel.setProjectID(projectID.toString());
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingForExistingDentalPlan.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Checking for an existing dental plan, Please wait...".needTranslation);
await bookAppointmentsViewModel.getPatientDentalEstimation(projectID: projectID).then((value) { await bookAppointmentsViewModel.getPatientDentalEstimation(projectID: projectID).then((value) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
if (bookAppointmentsViewModel.patientDentalPlanEstimationList.isNotEmpty) { if (bookAppointmentsViewModel.patientDentalPlanEstimationList.isNotEmpty) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
// title: LocaleKeys.notice.tr(context: context), // title: LocaleKeys.notice.tr(context: context),
title: LocaleKeys.dentalTreatmentPlan.tr(context: context), title: "Dental treatment plan".needTranslation,
context, context,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.youHaveExistingTreatmentPlan.tr(context: context).toText14(weight: FontWeight.w500), "You have an existing treatment plan: ".needTranslation.toText14(weight: FontWeight.w500),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Container( Container(
width: double.infinity, width: double.infinity,
@ -1156,7 +1156,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
bookAppointmentsViewModel.patientDentalPlanEstimationList[index].procedureName!.toText12(isBold: true), bookAppointmentsViewModel.patientDentalPlanEstimationList[index].procedureName!.toText12(isBold: true),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "${bookAppointmentsViewModel.totalTimeNeededForDentalProcedure} ${LocaleKeys.mins.tr(context: context)}"), AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "${bookAppointmentsViewModel.totalTimeNeededForDentalProcedure} Mins".needTranslation),
], ],
); );
}, },
@ -1171,21 +1171,21 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.totalTimeRequired.tr(context: context).toText14(isBold: true), "Total time required".needTranslation.toText14(isBold: true),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "30 ${LocaleKeys.mins.tr(context: context)}"), AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "30 Mins".needTranslation),
], ],
) )
], ],
), ),
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.wouldYouLikeToContinue.tr(context: context).toText14(weight: FontWeight.w500), "Would you like to continue it?".needTranslation.toText14(weight: FontWeight.w500),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: LocaleKeys.cancel.tr(context: context), text: LocaleKeys.cancel.tr(),
onPressed: () { onPressed: () {
bookAppointmentsViewModel.setIsContinueDentalPlan(false); bookAppointmentsViewModel.setIsContinueDentalPlan(false);
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true); bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
@ -1206,7 +1206,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: LocaleKeys.confirm.tr(context: context), text: LocaleKeys.confirm.tr(),
onPressed: () async { onPressed: () async {
bookAppointmentsViewModel.setIsContinueDentalPlan(true); bookAppointmentsViewModel.setIsContinueDentalPlan(true);
Navigator.of(context).pop(); Navigator.of(context).pop();

@ -33,6 +33,7 @@ class SelectDoctorPage extends StatefulWidget {
class _SelectDoctorPageState extends State<SelectDoctorPage> { class _SelectDoctorPageState extends State<SelectDoctorPage> {
TextEditingController searchEditingController = TextEditingController(); TextEditingController searchEditingController = TextEditingController();
int? expandedIndex;
FocusNode textFocusNode = FocusNode(); FocusNode textFocusNode = FocusNode();
@ -75,7 +76,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.chooseDoctor.tr(), title: "Choose Doctor".needTranslation,
// bottomChild: Container( // bottomChild: Container(
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))), // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))),
// padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h), // padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h),
@ -169,7 +170,8 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
), ),
], ],
).paddingSymmetrical(0.h, 0.h), ).paddingSymmetrical(0.h, 0.h),
if (bookAppointmentsViewModel.isGetDocForHealthCal && bookAppointmentsVM.showSortFilterButtons) SizedBox(height: 16.h), if (bookAppointmentsViewModel.isGetDocForHealthCal && bookAppointmentsVM.showSortFilterButtons)
SizedBox(height: 16.h),
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
@ -178,7 +180,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
children: [ children: [
LocaleKeys.nearestAppo.tr(context: context).toText13(isBold: true), LocaleKeys.nearestAppo.tr(context: context).toText13(isBold: true),
SizedBox(height: 4.h), SizedBox(height: 4.h),
LocaleKeys.viewNearestAppos.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500), "View nearest available appointments".needTranslation.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
], ],
), ),
const Spacer(), const Spacer(),
@ -188,6 +190,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
value: bookAppointmentsVM.isNearestAppointmentSelected, value: bookAppointmentsVM.isNearestAppointmentSelected,
onChanged: (newValue) async { onChanged: (newValue) async {
bookAppointmentsVM.setIsNearestAppointmentSelected(newValue); bookAppointmentsVM.setIsNearestAppointmentSelected(newValue);
}, },
), ),
], ],
@ -196,10 +199,11 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
padding: EdgeInsets.only(top: 16.h), padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: bookAppointmentsVM.isDoctorsListLoading ? 5 : (bookAppointmentsVM.doctorsListGrouped.isNotEmpty ? bookAppointmentsVM.doctorsListGrouped.length : 1), itemCount: bookAppointmentsVM.isDoctorsListLoading
? 5
: (bookAppointmentsVM.doctorsListGrouped.isNotEmpty ? bookAppointmentsVM.doctorsListGrouped.length : 1),
itemBuilder: (context, index) { itemBuilder: (context, index) {
// final isExpanded = bookAppointmentsVM.expandedGroupIndex == index; final isExpanded = expandedIndex == index;
final isExpanded = true;
return bookAppointmentsVM.isDoctorsListLoading return bookAppointmentsVM.isDoctorsListLoading
? DoctorCard( ? DoctorCard(
doctorsListResponseModel: DoctorsListResponseModel(), doctorsListResponseModel: DoctorsListResponseModel(),
@ -207,7 +211,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
bookAppointmentsViewModel: bookAppointmentsViewModel, bookAppointmentsViewModel: bookAppointmentsViewModel,
) )
: bookAppointmentsVM.doctorsListGrouped.isEmpty : bookAppointmentsVM.doctorsListGrouped.isEmpty
? Utils.getNoDataWidget(context, noDataText: LocaleKeys.noDoctorFound.tr()) ? Utils.getNoDataWidget(context, noDataText: "No Doctor found for selected criteria...".needTranslation)
: AnimationConfiguration.staggeredList( : AnimationConfiguration.staggeredList(
position: index, position: index,
duration: const Duration(milliseconds: 500), duration: const Duration(milliseconds: 500),
@ -221,11 +225,13 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
bookAppointmentsVM.toggleGroupExpansion(index); setState(() {
expandedIndex = isExpanded ? null : index;
});
// After rebuild, ensure the expanded item is visible // After rebuild, ensure the expanded item is visible
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
final key = _itemKeys[index]; final key = _itemKeys[index];
if (key != null && key.currentContext != null && bookAppointmentsVM.expandedGroupIndex == index) { if (key != null && key.currentContext != null && expandedIndex == index) {
Scrollable.ensureVisible( Scrollable.ensureVisible(
key.currentContext!, key.currentContext!,
duration: Duration(milliseconds: 350), duration: Duration(milliseconds: 350),
@ -245,7 +251,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
CustomButton( CustomButton(
text: "${bookAppointmentsVM.doctorsListGrouped[index].length} ${'doctors'}", text: "${bookAppointmentsVM.doctorsListGrouped[index].length} ${'doctors'.needTranslation}",
onPressed: () {}, onPressed: () {},
backgroundColor: AppColors.greyColor, backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor, borderColor: AppColors.greyColor,
@ -276,41 +282,34 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
key: ValueKey<int>(index), key: ValueKey<int>(index),
padding: EdgeInsets.only(top: 12.h), padding: EdgeInsets.only(top: 12.h),
child: Column( child: Column(
children: bookAppointmentsVM.doctorsListGrouped[index].asMap().entries.map<Widget>((entry) { children: bookAppointmentsVM.doctorsListGrouped[index].map<Widget>((doctor) {
final doctorIndex = entry.key; return Container(
final doctor = entry.value; margin: EdgeInsets.only(bottom: 12.h),
final isLastDoctor = doctorIndex == bookAppointmentsVM.doctorsListGrouped[index].length - 1; child: DoctorCard(
doctorsListResponseModel: doctor,
return Column( isLoading: false,
children: [ bookAppointmentsViewModel: bookAppointmentsViewModel,
DoctorCard( ).onPress(() async {
doctorsListResponseModel: doctor, bookAppointmentsVM.setSelectedDoctor(doctor);
isLoading: false, LoaderBottomSheet.showLoader();
bookAppointmentsViewModel: bookAppointmentsViewModel, await bookAppointmentsVM.getDoctorProfile(onSuccess: (dynamic respData) {
).onPress(() async { LoaderBottomSheet.hideLoader();
bookAppointmentsVM.setSelectedDoctor(doctor); Navigator.of(context).push(
LoaderBottomSheet.showLoader(); CustomPageRoute(
await bookAppointmentsVM.getDoctorProfile(onSuccess: (dynamic respData) { page: DoctorProfilePage(),
LoaderBottomSheet.hideLoader(); ),
Navigator.of(context).push( );
CustomPageRoute( }, onError: (err) {
page: DoctorProfilePage(), LoaderBottomSheet.hideLoader();
), showCommonBottomSheetWithoutHeight(
); context,
}, onError: (err) { child: Utils.getErrorWidget(loadingText: err),
LoaderBottomSheet.hideLoader(); callBackFunc: () {},
showCommonBottomSheetWithoutHeight( isFullScreen: false,
context, isCloseButtonVisible: true,
child: Utils.getErrorWidget(loadingText: err), );
callBackFunc: () {}, });
isFullScreen: false, }),
isCloseButtonVisible: true,
);
});
}),
if (!isLastDoctor)
Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h),
],
); );
}).toList(), }).toList(),
), ),

@ -54,8 +54,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.immediateService.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Immediate service".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "No need to wait, you will get medical consultation immediately via video call".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -70,7 +70,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.noVisitRequired.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "No visit required".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
@ -86,8 +86,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.doctorWillContact.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Doctor will contact".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "A specialised doctor will contact you and will be able to view your medical history".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -102,8 +102,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.freeMedicineDelivery.tr(context: context).toText18(color: AppColors.textColor, isBold: true), "Free medicine delivery".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500), "Offers free medicine delivery for the LiveCare appointment".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
], ],
), ),
), ),
@ -117,7 +117,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
Column( Column(
children: [ children: [
CustomButton( CustomButton(
text: LocaleKeys.yesPleasImInAHurry.tr(context: context), text: "Yes please, I am in a hurry".needTranslation,
onPressed: () async { onPressed: () async {
Navigator.pop(context); Navigator.pop(context);
GetLiveCareClinicListResponseModel liveCareClinic = GetLiveCareClinicListResponseModel( GetLiveCareClinicListResponseModel liveCareClinic = GetLiveCareClinicListResponseModel(
@ -129,7 +129,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
immediateLiveCareViewModel.setLiveCareSelectedCallType(1); immediateLiveCareViewModel.setLiveCareSelectedCallType(1);
immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic); immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingFeesPleaseWait.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: "Fetching fees, Please wait...".needTranslation);
await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) { await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push( Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push(
@ -162,7 +162,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
CustomButton( CustomButton(
text: LocaleKeys.noThanksPhysicalVisit.tr(context: context), text: "No, Thanks. I would like a physical visit".needTranslation,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
onNegativeClicked?.call(); onNegativeClicked?.call();

@ -28,7 +28,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.waitingAppointment.tr(), title: "Waiting Appointment".needTranslation,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -47,11 +47,13 @@ class WaitingAppointmentInfo extends StatelessWidget {
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.waiting_appointment_icon, width: 48.h, height: 48.h, fit: BoxFit.contain), Utils.buildSvgWithAssets(icon: AppAssets.waiting_appointment_icon, width: 48.h, height: 48.h, fit: BoxFit.contain),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.whatIsWaitingAppointment.tr(context: context).toText16(isBold: true), "What is Waiting Appointment?".needTranslation.toText16(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.waitingAppointmentsFeature.tr(context: context).toText14(isBold: false), "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctors schedule."
.needTranslation
.toText14(isBold: false),
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.appointmentWithDoctorConfirmed.tr(context: context).toText14(isBold: false), "The appointment with the doctor is confirmed, but the time of entry is uncertain.".needTranslation.toText14(isBold: false),
SizedBox(height: 24.h), SizedBox(height: 24.h),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -64,7 +66,9 @@ class WaitingAppointmentInfo extends StatelessWidget {
SizedBox(width: 10.w), SizedBox(width: 10.w),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.7, width: MediaQuery.of(context).size.width * 0.7,
child: LocaleKeys.paymentWithinTenMinutes.tr(context: context).toText14(isBold: true, color: AppColors.warningColorYellow), child: "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically"
.needTranslation
.toText14(isBold: true, color: AppColors.warningColorYellow),
), ),
], ],
), ),
@ -84,7 +88,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
hasShadow: true, hasShadow: true,
), ),
child: CustomButton( child: CustomButton(
text: LocaleKeys.continueString.tr(), text: "Continue".needTranslation,
onPressed: () async { onPressed: () async {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.onlineCheckIn.tr(), title: LocaleKeys.onlineCheckIn.tr(),

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

Loading…
Cancel
Save