diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
index c70123d4..13f778ff 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -36,7 +36,7 @@ android {
applicationId = "com.cloudsolutions.HMGPatientApp"
// minSdk = 24
minSdk = 29
- targetSdk = 35
+ targetSdk = 36
compileSdk = 36
// targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..360ab55d
--- /dev/null
+++ b/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,26 @@
+
+ #ffffff
+ #ED1C2B
+ #444647
+ #2E3039
+ #2E3039
+ #a5a5a5
+ #e1e1e1
+ #FFF
+ #1e1e1e
+ #ED1C2B
+ #F9FAFD
+ #F2FAFD
+ #EC2213
+ #4D6E6E6E
+ #FFFFFFFF
+ #00000000
+ #3db39e
+ #00000000
+ #c7c7c7
+ #4c4c4c
+ #4c4c4c
+ #a5a5a5
+ #ED1C2B
+ #FFF
+
\ No newline at end of file
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index ac3b4792..2299155e 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
+#distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
diff --git a/assets/images/svg/no_image_found.svg b/assets/images/svg/no_image_found.svg
new file mode 100644
index 00000000..faea08cd
--- /dev/null
+++ b/assets/images/svg/no_image_found.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/assets/images/svg/patient_qr_code_icon.svg b/assets/images/svg/patient_qr_code_icon.svg
new file mode 100644
index 00000000..c76f0326
--- /dev/null
+++ b/assets/images/svg/patient_qr_code_icon.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/images/svg/vital_sign_item_icon.svg b/assets/images/svg/vital_sign_item_icon.svg
new file mode 100644
index 00000000..3ebe220a
--- /dev/null
+++ b/assets/images/svg/vital_sign_item_icon.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index cc468e14..750a1bf7 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -1959,13 +1959,13 @@
"refund": "استرداد",
"parkingQR": "رمز الاستجابة السريعة لوقوف السيارات",
"parkingQRDesc": "امسح رمز الاستجابة السريعة (QR Code) أدناه عند بوابة الخروج من موقف السيارات:",
- "livecareUpdateInsuranceSent": "تم استلام طلب تحديث بيانات التأمين الخاص بك، ويجري العمل عليه حالياً. سنقوم بإشعارك فور اكتمال التحديث.",
- "livecareUpdateInsurance": "سيتم تحويل طلب تحديث بيانات التأمين إلى فريق LiveCare المختص لاستكمال الإجراءات. هل تود المتابعة؟",
- "schedule": "جدول",
- "doctorSchedule": "جدول الطبيب",
- "weeklyShift": "الفترات الأسبوعية",
- "dayOff": "إجازة",
- "notAvailable": "غير متاح",
+ "livecareUpdateInsuranceSent": "تم استلام طلب تحديث بيانات التأمين الخاص بك، ويجري العمل عليه حالياً. سنقوم بإشعارك فور اكتمال التحديث.",
+ "livecareUpdateInsurance": "سيتم تحويل طلب تحديث بيانات التأمين إلى فريق LiveCare المختص لاستكمال الإجراءات. هل تود المتابعة؟",
+ "schedule": "جدول",
+ "doctorSchedule": "جدول الطبيب",
+ "weeklyShift": "الفترات الأسبوعية",
+ "dayOff": "إجازة",
+ "notAvailable": "غير متاح",
"hide": "إخفاء",
"liveCareSupport": "دعم لايف كير",
"liveCareSupportAssistance": "للتواصل والمساعدة",
@@ -1973,4 +1973,89 @@
"preferredConsultationLanguage": "اللغة المفضلة للاستشارة",
"preferredConsultationLanguageEn": "أرغب أن يتحدث معي الطبيب باللغة العربية",
"preferredConsultationLanguageAr": "أرغب أن يتحدث مع الطبيب باللغة اللانجليزية"
+ "hide": "إخفاء",
+ "viewPatientQR": "عرض رمز الاستجابة السريعة للمريض",
+ "patientQR": "رمز الاستجابة السريعة للمريض",
+ "forText": "عن",
+ "liveCareTermsHeading": "شروط خدمات الرعاية الصحية عن بُعد",
+ "liveCareTermsIntroHeading": "مقدمة",
+ "liveCareTermsConditions1": "تعتبر شركة مجموعة الدكتور سليمان الحبيب للخدمات الطبية ('المجموعة') واحدة من الشركات الرائدة في قطاع الرعاية الصحية في المملكة العربية السعودية والتي تسعى دائمًا لتحسين خدماتها في المنطقة، وكخطوة لنقل خدماتنا إلى مستوى آخر ولتسهيل عملية تلقي خدمات الرعاية الصحية، فقد اعتمدنا نهج تقديم بعض خدماتنا عن بُعد للمرضى. تنطبق هذه الشروط على خدمات الرعاية الصحية عن بُعد التي نقدمها، والتي تتيح إجراء الاستشارات بين الطبيب والمريض عبر الإنترنت، باستخدام تقنية الاتصالات الصوتية أو المرئية (يشار إليها غالباً باسم 'خدمات الرعاية الصحية عن بُعد').",
+ "liveCareTermsConditions2": "الغرض من خدمات الرعاية الصحية عن بعد هو تسهيل الاتصالات بين الممارسين الصحيين والمرضى لتقديم خدمات الرعاية الصحية من خلال وسائل الاتصال الإلكترونية المتقدمة، والتي تتيح للممارسين الصحيين تقييم وتشخيص وعلاج ومتابعة المرضى عن بُعد دون الحاجة إلى حضور المرضى شخصياً.",
+ "liveCareTermsHeading2": "الاتفاقية",
+ "liveCareTermsConditions3": "يتم تقديم خدمات الرعاية الصحية عن بُعد عبر تطبيق الهاتف المحمول أو الموقع الإلكتروني للمجموعة. تنطبق الشروط التالية على خدمات الرعاية الصحية عن بُعد: ",
+ "liveCareTermsConditions3a": "شروط استخدام الموقع الالكتروني - ",
+ "liveCareTermsConditions3b": "تفاقية مستخدم التطبيق - ",
+ "liveCareTermsConditions3c": "روط استخدام الخدمات الإلكترونية - ",
+ "liveCareTermsConditions3d": "شروط خدمات الرعاية الصحية عن بُعد هذه - ",
+ "liveCareTermsConditions4": "بالموافقة على الاستمرار في خدمات الرعاية الصحية عن بُعد وقبول هذه الشروط، فإنك تدخل في اتفاقية مع المجموعة تتضمن جميع الشروط المذكورة أعلاه (اتفاقية خدمات الرعاية الصحية عن بُعد).",
+ "liveCareTermsConditions5": "يتعين عليك أيضاً قراءة سياسة الخصوصية الخاصة بنا حيث تحتوي سياسة الخصوصية على تفاصيل حول كيفية استخدامنا لمعلوماتك الشخصية وحقوقك بشأنها. من خلال متابعة استخدام خدمات الرعاية الصحية عن بُعد، فإنك توافق على استخدامنا لمعلوماتك الشخصية وفقاً لسياسة الخصوصية الخاصة بنا وتوافق صراحةً على استخدامنا لمعلوماتك الشخصية لأداء خدمات الرعاية الصحية عن بُعد وأداء واجباتنا المهنية كمقدم لخدمات الرعاية الطبية.",
+ "liveCareTermsConditions6": "يتعين عليك أيضاً قراءة سياسة الخصوصية الخاصة بنا حيث تحتوي سياسة الخصوصية على تفاصيل حول كيفية استخدامنا لمعلوماتك الشخصية وحقوقك بشأنها. من خلال متابعة استخدام خدمات الرعاية الصحية عن بُعد، فإنك توافق على استخدامنا لمعلوماتك الشخصية وفقاً لسياسة الخصوصية الخاصة بنا وتوافق صراحةً على استخدامنا لمعلوماتك الشخصية لأداء خدمات الرعاية الصحية عن بُعد وأداء واجباتنا المهنية كمقدم لخدمات الرعاية الطبية.",
+ "liveCareTermsHeading3": "1.\tالتعاريف",
+ "liveCareTermsConditions7": "المجموعة تعني شركة مجموعة الدكتور سليمان الحبيب للخدمات الطبية والشركات التابعة لها.",
+ "liveCareTermsConditions8": "خدمات الرعاية الصحية عن بُعد تعني خدمة الرعاية الصحية عن بُعد التي تقدمها المجموعة، والتي تتيح الاستشارة والتشخيص والمتابعة عن بُعد بين المريض والطبيب، باستخدام التطبيق و/أو موقع الويب.",
+ "liveCareTermsConditions9": "خدماتنا تعني بعض الخدمات التي تقدمها المجموعة والتي تغطي استعراض السجلات الطبية للمرضى ونتائج الفحوصات الطبية، وتوفير التشخيصات الطبية بالإضافة إلى توفر خدمة الرعاية الصحية عن بعد بالصوت والفيديو بين ممارسي الرعاية الصحية والمرضى.",
+ "liveCareTermsConditions10": "التطبيق يعني تطبيق (Dr. ALHABIB) وهو عبارة عن منصة يتم من خلالها تقديم خدماتنا ويمكن للمستخدمين الولوج إليها.",
+ "liveCareTermsConditions11": "موقع الويب يعني موقع الويب الخاص بالمجموعة وهو عبارة عن منصة يتم من خلالها تقديم خدماتنا ويمكن للمستخدمين الدخول إليها.",
+ "liveCareTermsConditions12": "الشروط والأحكام تعني شروط خدمات الرعاية الصحية عن بُعد هذه.",
+ "liveCareTermsConditions13": "المحتوى يعني أي رسالة أو بيانات أو معلومات أو نص أو صوت أو صور أو فيديو أو رسومات أو رمز أو أي مادة أخرى واردة في التطبيق أو موقع الويب أو يتم نقلها عبر التطبيق أو موقع الويب.",
+ "liveCareTermsHeading4": "2.\tتعهدات المستخدم",
+ "liveCareTermsConditions14": "2-1\tمن خلال دخولك إلى خدمات الرعاية الصحية عن بُعد واستخدامها، فإنك توافق على هذه الشروط والأحكام ويتعين عليك ألا تحاول الدخول إلى خدماتنا إذا كنت لا توافق عليها.",
+ "liveCareTermsConditions15": "2-2\tأنت تضمن وتقر وتتعهد بأن جميع المعلومات التي تقدمها عن نفسك وعن أي شخص آخر صحيحة ودقيقة.",
+ "liveCareTermsConditions16": "2-3\tخدمات الرعاية الصحية عن بعد مخصصة للاستخدام من قبل المرضى الموجودين فعلياً في المملكة العربية السعودية (المنطقة المسموح بها) ولا ينبغي استخدامها من قبل المرضى خارج المنطقة المسموح بها. بالموافقة على هذه الشروط والأحكام والدخول إلى خدمات الرعاية الصحية عن بُعد عبر التطبيق أو موقع الويب، فإنك تقر وتضمن لنا أنك موجود فعلياً في إحدى المناطق المسموح بها.",
+ "liveCareTermsHeading5": "3.\tالقيود على خدمات الرعاية الصحية عن بعد والمخاطر المرتبطة بها",
+ "liveCareTermsConditions17": "3-1\tلا تستخدم التطبيق أو موقع الويب أو خدمات الرعاية الصحية عن بُعد للتواصل بشأن الحالات الطبية الطارئة أو علاجها. لا التطبيق ولا موقع الويب ولا خدمات الرعاية الصحية عن بُعد توفر الرعاية في الحالات الطبية الطارئة. إذا كانت هناك حالة طبية طارئة عاجلة أو كانت هناك حاجة إلى استجابة سريعة فيما يتعلق بصحتك، فانتقل إلى أقرب مركز/مستشفى طوارئ أو اتصل على الفور بأي رقم هاتف للطوارئ.",
+ "liveCareTermsConditions18": "3-2\tخدمات الرعاية الصحية عن بعد ليست مناسبة للحالات الطبية الطارئة وقد تكون هناك بعض العلاجات أو الأدوية التي لا يمكن تقديمها دون استشارة متابعة في حضور المريض شخصياً. إذا كنت تعتقد أن لديك حالة طبية خطيرة، فعليك طلب استشارة شخصية مع أخصائي طبي مرخص.",
+ "liveCareTermsConditions19": "3-3\tتهدف خدمات الرعاية الصحية عن بُعد إلى توفير مزايا تشمل راحة المريض. لذلك، فهو قد يكون الأنسب كبديل للاستشارة الشخصية للأمور الطبية الروتينية. ومع ذلك، هناك مخاطر محتملة مرتبطة باستخدام أي خدمة للرعاية الصحية عن بُعد، بما في ذلك خدمات الرعاية الصحية عن بُعد، وقد تشمل هذه المخاطر على سبيل المثال لا الحصر ما يلي:",
+ "liveCareTermsConditions19a": "(1) المعلومات المنقولة قد لا تكون كافية (مثل ضعف دقة الصور) للسماح باتخاذ القرار الطبي المناسب من قبل الممارسين الصحيين",
+ "liveCareTermsConditions19b": "(2) قد يقرر الممارسين الصحيين أن المعلومات المنقولة ليست ذات جودة كافية، مما يستلزم مقابلة المريض وجهاً لوجه، أو على الأقل إعادة جدولة استشارة طبية صوتية ومرئية في وقت لاحق",
+ "liveCareTermsConditions19c": "(3) يمكن أن يحدث تأخير في تقديم الرعاية الطبية بسبب أوجه القصور أو الأعطال في الأجهزة الإلكترونية",
+ "liveCareTermsConditions19d": "(4) يعتمد الممارس الصحي على المريض لتقديم جميع المعلومات ذات الصلة شفوياً وعبر الاستخدام المناسب لجهاز الكاميرا الخاص بالمريض. من الممكن ألا يتم تقديم المعلومات إلى الممارس أو قد لا تكون واضحة بقدر الوضوح الذي يتوفر للممارس الصحي أثناء إجراء الفحص البدني الشخصي",
+ "liveCareTermsConditions19e": "(5) قد تفشل البروتوكولات الأمنية، مما يتسبب في انتهاك خصوصية المعلومات الطبية الشخصية. على الرغم من أننا نتخذ تدابير معقولة لحماية أمن المعلومات المنقولة عبر التطبيق و/أو الموقع الإلكتروني، إلا أنه لا يمكن أبدًا ضمان أن تكون عمليات الإرسال هذه آمنة تماماً، والمعلومات المنقولة عبر شبكات الاتصالات العامة خارجة عن سيطرتنا ولا يمكننا تأمينها.",
+ "liveCareTermsConditions20": "3-4\tفي حال كنت تستخدم خدمات الرعاية الصحية عن بُعد ولكنك تواجه أي حالة أو مخاوف مستمرة، فإننا نوصيك بحجز استشارة شخصية.",
+ "liveCareTermsHeading6": "4.\tإخلاء المسؤولية عن الضمان",
+ "liveCareTermsConditions21": "4-1\tنحن لا نضمن ولا نقر أو نتعهد بأن خدمات الرعاية الصحية عن بُعد ستلبي احتياجاتك، أو أنها ستكون مستمرة دون انقطاع أو سيتم توفيرها في الوقت المناسب أو أنها آمنة أو خالية من الأخطاء أو خالية من الفيروسات. لن نتحمل أي مسؤولية تجاهك في حالة تعذر حدوث جلسة خدمات الرعاية الصحية عن بُعد أو تمت مقاطعتها أو التخلي عنها بسبب عدم توفر منصتنا عبر الإنترنت ومع ذلك، في حالة تعذر علينا إجراء جلسة خدمات الرعاية الصحية عن بُعد بالكامل بسبب تعطل منصتنا، فلن نتقاضى منك أي أجور عن جلسة الاستشارة البديلة.",
+ "liveCareTermsConditions22": "4-2\tتُستثنى جميع الضمانات الصريحة أو الضمنية بموجب النظام، باستثناء تلك التي لا يمكن استثناؤها بشكل قانوني.",
+ "liveCareTermsConditions23": "4-3\tلا يوجد في هذا القسم 4 أي نص يُقصد منه استبعاد أو تقييد مسؤوليتنا عن أي مطالبة تتعلق بالإهمال الطبي، إلى الحد الذي لا يسمح لنا فيه النظام المعمول به في المنطقة المسموح بها ذات الصلة بالقيام بذلك.",
+ "liveCareTermsHeading7": "5.\tالأهلية والتسجيل والاستخدام",
+ "liveCareTermsConditions24": "5-1\tمن أجل الدخول إلى خدمات الرعاية الصحية عن بُعد، يتعين عليك أن تفي بمتطلبات الحد الأدنى للسن وهو 18 عاماً (يتم احتسابها وفقاً للتقويم الميلادي) وأن تتمتع بالأهلية القانونية الكاملة.",
+ "liveCareTermsConditions25": "5-2\tيجب أن يحصل أي شخص يقل عمره عن 18 عاماً (يتم احتسابها وفقاً للتقويم الميلادي) يقوم بالدخول إلى خدمات الرعاية الصحية عن بُعد على إذن من أحد الوالدين أو الوصي للقيام بذلك.",
+ "liveCareTermsConditions26": "5-3\tأنت تضمن وتقر وتتعهد بأن لديك الحق القانوني والقدرة على الدخول إلى التطبيق و/أو موقع الويب وفقاً لهذه الشروط والأحكام و، عند الاقتضاء، إجراء الحجوزات والمدفوعات من خلال التطبيق أو موقع الويب.",
+ "liveCareTermsConditions27": "5-4\tتتم عملية التسجيل وفق ما ورد في شروط استخدام الخدمات الإلكترونية",
+ "liveCareTermsConditions28": "5-5\tخدمات الرعاية الصحية عن بُعد مخصصة فقط لاستخدامك الشخصي واستخدام أطفالك تحت إشرافك. يتعين عليك ألا تشارك بيانات تسجيل الدخول الخاصة بك (اسم المستخدم وكلمة المرور وما إلى ذلك) مع أي شخص آخر ويجب أن تتخذ خطوات معقولة للحفاظ على أمان هذه البيانات. يتم تقديم خدماتنا على أساس أن لدينا معلومات معينة حول المستخدم، والتي قد تكون مرتبطة أو تم الحصول عليها من تفاصيل حسابك (العمر والجنس والتاريخ الطبي وما إلى ذلك). نحن لا نتحمل أي مسؤولية من أي نوع تجاهك أو تجاه أي شخص آخر إذا تم تقديم خدماتنا عبر حساب مستخدم إلى شخص آخر غير المستخدم المسجل. هذا مهم بشكل خاص لخدمات الرعاية الصحية عن بعد، حيث سيحتاج الممارس الصحي إلى تقييم المعلومات التي يقدمها المريض أثناء الاستشارة في سياق الملف الطبي للمريض وتاريخه.",
+ "liveCareTermsConditions29": "5-6\tأنت مسؤول عن التأكد من أن لديك جهازاً متصلاً بالإنترنت وقادراً على إرسال واستقبال الفيديو والصوت. نحن لسنا مسؤولين عن أي انقطاع في جلسة خدمات الرعاية الصحية عن بعد بسبب ناجم عن جهازك أو اتصالك بالإنترنت. أنت مسؤول عن جميع التكاليف المرتبطة باتصالك بالإنترنت واستخدامك لها.",
+ "liveCareTermsConditions30": "5-7\tقد نقوم من وقت لآخر بإصدار تحديثات لتطبيقنا و/أو موقع الويب الخاص بنا. يجب عليك التأكد من أنك تقوم بتشغيل أحدث إصدار من التطبيق. قد يؤدي استخدام الإصدارات القديمة من التطبيق إلى حدوث أخطاء فنية أثناء استخدامك لخدمات الرعاية الصحية عن بُعد وقد يعرضك ذلك لمخاطر أمنية إضافية.",
+ "liveCareTermsHeading8": "6.\tخدمات الرعاية الصحية عن بُعد",
+ "liveCareTermsConditions31": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. ",
+ "liveCareTermsHeading9": "7.\tالأجور والسداد",
+ "liveCareTermsConditions32": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. ",
+ "liveCareTermsConditions33": "7-1\tستتم الإشارة إلى أجور استشارة خدمات الرعاية الصحية عن بُعد قبل أن تختار المتابعة. بمجرد المتابعة، فإنك توافق على سداد الأجور. لا تشمل تلك الأجور الأولية أي أجور لاحقة مثل أجور الوصفات الطبية والاختبارات المعملية واستشارات المتابعة وما إلى ذلك من أجور وسيتم إبلاغك بها بعد الاستشارة الأولية.",
+ "liveCareTermsConditions34": "7-2\tيتم تحديد شروط وطرق السداد المعمول بها في شروط استخدام الخدمات عبر الإنترنت الخاصة بنا.",
+ "liveCareTermsConditions35": "7-3\tقد يكون من الممكن فرض أجور خدمات الرعاية الصحية عن بُعد مباشرة على مزود التأمين الطبي، على الرغم من أننا لا نقدم أي تعهد أو ضمان بأن هذا سيكون ممكناً في أي وقت. تضمنت شروط استخدام الخدمات عبر الإنترنت الخاصة بنا مزيد من التفاصيل حول ذلك. إذا كان هذا التسهيل الخدمي متاحاً واخترت استخدامه، فستحتاج إلى تزويدنا بتفاصيل شركة التأمين الطبي وتغطية وثيقة التأمين، ما لم تكن قد قمت بذلك مسبقاً وربطتها بحسابك. أنت تفوضنا بموجب هذا بالتواصل مع أي شركة تأمين وفق التفاصيل التي تقدمها لنا في وقت الشراء أو المرتبطة بحسابك من أجل الحصول على الموافقة على تكلفة الخدمات المقدمة لك. أنت تقر بأنه قد يُطلب منا تقديم تفاصيل محددة عن الخدمات الطبية التي تطلبها من أجل القيام بذلك وتوافق صراحة على هذا الإفصاح.",
+ "liveCareTermsHeading10": "8.\tالاتصالات و/أو الاستفسارات",
+ "liveCareTermsConditions36": "في حال وجود أي أسئلة و/أو استفسارات بخصوص استخدام خدمات الرعاية الصحية عن بُعد، يرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011",
+ "liveCareTermsHeading11": "9.\tحدود المسؤولية",
+ "liveCareTermsConditions37": "9-1\tمع مراعاة أي مسؤوليات ينص عليها النظام والتي لا يمكن استبعادها بموجبه، لا تتحمل المجموعة أو أي من مديرينا أو موظفينا أو وكلائنا أو مقاولينا المسؤولية تجاهك عن أي خسائر وأضرار ومسؤوليات ومطالبات ونفقات (بما في ذلك على سبيل المثال لا الحصر الأتعاب القانونية وتكاليف الدفاع أو التسوية) أيا كانت، سواء كانت مباشرة أو غير مباشرة أو تبعية، ناشئة عن أو متعلقة باستخدامك لخدمات الرعاية الصحية عن بُعد، أياً كان سبب نشوئها، سواء كان ذلك بموجب عقد أو المسؤولية التقصيرية (بما في ذلك الإهمال) أو النظام أو غير ذلك.",
+ "liveCareTermsConditions38": "9-2\tلن نكون مسؤولين تجاهك أو تجاه أي شخص آخر عن أي خسارة ناتجة عن سبب خارج عن سيطرتنا. يتضمن ذلك تعطل المعدات الإلكترونية أو الميكانيكية أو خطوط الاتصالات (بما في ذلك الهاتف والكابل والإنترنت)، أو الدخول غير المصرح به، أو أفعال أو إغفالات الأطراف الثالثة، أو الفيروسات، أو السرقة، أو أخطاء المشغل، أو الطقس القاسي أو غير العادي (بما في ذلك الفيضانات، أو الزلازل، أو أي من أفعال القضاء والقدر الأخرى)، أو الحرائق والحروب والتمرد والأعمال الإرهابية وأعمال شغب والنزاع العمالي أو المشاكل العمالية الأخرى أو الحوادث أو الطوارئ أو التأخير أو الحجز الزائد أو الإلغاء، أو الزوال الملكي أو أي إجراء حكومي.",
+ "liveCareTermsHeading12": "10.\tإنهاء الاستخدام",
+ "liveCareTermsConditions39": "10-1\tيجوز لنا التوقف عن توفير خدمات الرعاية الصحية عن بُعد في أي وقت ولأي سبب. لن نتحمل أي مسؤولية عن أي توقف، بما في ذلك عندما تكون خلال الاستشارات أو دورات العلاج باستخدام خدمات الرعاية الصحية عن بُعد. سنساعدك للتمكن من حجز الاستشارات الشخصية بدلاً من ذلك أو في نقل المعلومات ذات الصلة إلى مزود طبي بديل لتمكينك من مواصلة العلاج (مع مراعاة أنظمة حماية البيانات والسرية والممارسات الطبية والممارسات الطبية الجيدة السائدة).",
+ "liveCareTermsConditions40": "10-2\tيجوز لنا إنهاء استخدامك ودخولك إلى خدمات الرعاية الصحية عن بُعد لأي سبب أو بدون سبب، في أي وقت، سواء بإشعارك أو بدونه ودون تحمل أي مسؤولية تجاهك، ومع ذلك قد تنشأ هذه المسؤولية (على الرغم من أننا سنأخذ واجباتنا الطبية تجاهك بعين الاعتبار في حالة القيام بذلك).",
+ "liveCareTermsConditions41": "10-3\tستظل جميع القيود وجميع إخلاءات الطرف من المسؤولية والاستثناءات والقيود الخاصة بمسؤوليتنا سارية بعد أي إنهاء. عند الإنهاء، يتعين عليك عدم الدخول إلى أو استخدام التطبيق و/أو موقع الويب بشكل مباشر أو غير مباشر.",
+ "liveCareTermsHeading13": "11.\tالقانون الحاكم والاختصاص القضائي",
+ "liveCareTermsConditions42": "النظام المعمول به على التطبيق و/أو شروط وأحكام مستخدم موقع الويب والنزاعات الناشئة عنها أو المتعلقة بها هي أنظمة المملكة العربية السعودية. وأنت تخضع بشكل لا رجوع فيه للاختصاص القضائي الحصري لمحاكم المملكة العربية السعودية.",
+ "liveCareTermsHeading14": "12.\tالإقرارات",
+ "liveCareTermsConditions43": "12-1\tباستثناء ما هو منصوص عليه صراحةً في هذه الشروط والأحكام أو ما يسمح به أي نظام معمول به، فإنك توافق على ما يلي:",
+ "liveCareTermsConditions43a": "(1) أنك قد قرأت وفهمت هذه الشروط والأحكام والبنود الأخرى التي تشكل جزءاً من اتفاقيتك معنا",
+ "liveCareTermsConditions43b": "(2) أنك قد قرأت سياسة الخصوصية الخاصة بنا وتوافق بموجبه صراحة على استخدامنا لمعلوماتك الشخصية كما هو موضح فيها. بالإضافة إلى ذلك، أنت تدرك أن رقم الاتصال أو عنوان البريد الإلكتروني الذي زودتنا به عند التسجيل سيتم استخدامه للاتصالات من قبل المجموعة من خلال الرسائل القصيرة أو البريد الإلكتروني أو أي طريقة أخرى فيما يتعلق بخدمات الرعاية الصحية عن بُعد، بما في ذلك إشعارات المواعيد والخدمات الطبية الحالية.",
+ "liveCareTermsConditions43c": "(3) أنت تدرك أن لديك الحق في حجب أو سحب موافقتك بشأن استخدام التطبيق و/أو موقع الويب في سياق رعايتك في أي وقت، دون التأثير على حقك في تلقي الرعاية أو العلاج في المستقبل؛",
+ "liveCareTermsConditions43d": "(4) أنت تدرك أنك قد تتوقع الحصول على مزايا من استخدام التطبيق و/أو موقع الويب فيما يتعلق برعايتك الصحية، ولكن لا يمكن ضمان أي نتائج أو تأكيدها؛",
+ "liveCareTermsConditions43e": "(5) أنت تدرك أنه قد تتم مشاركة معلومات الرعاية الصحية الخاصة بك مع موظفين آخرين في المجموعة لأغراض جدولة المواعيد والفواتير؛",
+ "liveCareTermsConditions43f": "(6) أنت تدرك أن صور الفيديو والتسجيلات الصوتية الخاصة بك قد يتم التقاطها وتخزينها إلكترونياً. وأنت تدرك كذلك أنه يمكن استخدام هذه التسجيلات لاحقاً فيما يتعلق بالإجراءات النظامية إذا لزم الأمر ولكن لن يتم استخدامها لأي غرض بخلاف توفير خدمات الرعاية الصحية عن بُعد وخدمات المتابعة الطبية لك. أنت تقر وتوافق على استخدام هذه الصور والتسجيلات الصوتية من قبلنا للأغراض الموضحة؛",
+ "liveCareTermsConditions43g": "(7) أنك تدرك مخاطر الاتصال عبر البريد الإلكتروني والرسائل النصية، ولا سيما مخاطر الخصوصية. أنت تدرك أن المجموعة لا يمكنها ضمان أمان وسرية البريد الإلكتروني أو الاتصالات النصية. لن تكون المجموعة مسؤولة عن الرسائل التي لم يتم استلامها أو تسليمها بسبب عطل فني أو الكشف عن معلومات سرية ما لم يكن ذلك بسبب سوء سلوك متعمد.",
+ "liveCareTermsHeading15": "13.\tشروط وأحكام عامة",
+ "liveCareTermsConditions44": "13-1\tيجوز لنا في أي وقت تغيير هذه الشروط والأحكام لأسباب أمنية أو نظامية أو تنظيمية ، أو لتعكس التحديثات أو التغييرات التي تطرأ على خدمات أو وظائف خدمات الرعاية الصحية عن بُعد أو التطبيق، عن طريق نشر الشروط والأحكام المتنوعة على التطبيق. سنخطرك في التطبيق بأن هذه الشروط والأحكام قد تغيرت قبل استخدامك التالي لخدمات الرعاية الصحية عن بُعد وستتاح لك الفرصة للموافقة على الشروط المعدلة قبل استخدام الخدمة مرة أخرى.",
+ "liveCareTermsConditions45": "13-2\tيجوز لنا أداء أي من التزاماتنا، وممارسة أي من الحقوق الممنوحة لنا بموجب هذه الشروط والأحكام، من خلال طرف ثالث. يجوز لنا التنازل عن أي من حقوقنا والتزاماتنا أو جميعها بموجب هذه الشروط والأحكام إلى أي طرف ثالث.",
+ "liveCareTermsConditions46": "13-3\tإذا تبين أن أي بند أو جزء من أي بند من هذه الشروط والأحكام باطل أو غير قابل للإنفاذ أو غير صالح، فسيتم فصله عن هذه الشروط والأحكام، تاركاً باقي الشروط سارية المفعول بكامل الأثر والنفاذ، بشرط ألا يغير فصل ذلك البند من الطبيعة الأساسية لهذه الشروط والأحكام.",
+ "liveCareTermsHeading16": "14.\tالشكاوى",
+ "liveCareTermsConditions47": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. ",
+ "liveCareTermsConditions48": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"
}
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 2c2756f9..df3a4e9a 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -21,7 +21,7 @@
"mySchedule": "My Schedule",
"logout": "Logout",
"respirationRate": "Respiration Rate",
- "bookAppo": "New Appointment",
+ "bookAppo": "Book Appointment",
"searchBy": "Search By:",
"clinic": "Clinic",
"byClinic": "By Clinic",
@@ -1949,13 +1949,13 @@
"invoiceHistory": "Invoice History",
"parkingQR": "Parking QR Code",
"parkingQRDesc": "Scan the below QR Code at the exit parking gate:",
- "livecareUpdateInsuranceSent": "Your insurance update request is being processed. You will be notified once the update is completed.",
- "livecareUpdateInsurance": "Please note that your insurance update request will be sent to the our LiveCare team for update. Would you like to proceed?",
- "schedule": "Schedule",
- "doctorSchedule": "Doctor Schedule",
- "weeklyShift": "Weekly Shift",
- "dayOff": "Off",
- "notAvailable": "Not Available",
+ "livecareUpdateInsuranceSent": "Your insurance update request is being processed. You will be notified once the update is completed.",
+ "livecareUpdateInsurance": "Please note that your insurance update request will be sent to the our LiveCare team for update. Would you like to proceed?",
+ "schedule": "Schedule",
+ "doctorSchedule": "Doctor Schedule",
+ "weeklyShift": "Weekly Shift",
+ "dayOff": "Off",
+ "notAvailable": "Not Available",
"hide": "Hide",
"liveCareSupport": "LiveCare Support",
"liveCareSupportAssistance": "For Support & Assistance",
@@ -1963,6 +1963,91 @@
"preferredConsultationLanguage": "Preferred Consultation Language",
"preferredConsultationLanguageEn": "I would like to speak with the doctor in Arabic",
"preferredConsultationLanguageAr": "I would like to speak with the doctor in English"
+ "hide": "Hide",
+ "viewPatientQR": "View Patient QR Code",
+ "patientQR": "Patient QR Code",
+ "forText": "For",
+ "liveCareTermsHeading": "TELEHEALTH SERVICES TERMS OF USE",
+ "liveCareTermsIntroHeading": "INTRODUCTION",
+ "liveCareTermsConditions1": "Dr. Sulaiman Al Habib Medical Services Group Company (the “Group”) is one of the leaders in the healthcare sector in the Kingdom of Saudi Arabia with an aim to always improve its services in the region, and as a step to take our services to another level and to facilitate the process of receiving healthcare services we have adopted the approach of providing some of our services remotely to patients. These terms apply to our Telehealth Services, which enable consultations to occur between a doctor and a patient over the internet, using audio or and video conferencing technology (often referred to as “Telehealth Services”).",
+ "liveCareTermsConditions2": "The purpose of the Telehealth Services is to facilitate communication between healthcare practitioners and patients to provide healthcare services through advanced electronic communication means, which allows healthcare professionals to evaluate, diagnose, treat and follow-up with patients remotely without the need for patients to attend in person.).",
+ "liveCareTermsHeading2": "AGREEMENT",
+ "liveCareTermsConditions3": "Telehealth Services is delivered over the Group’s mobile application or and Website. The following terms apply to the Telehealth Services: ",
+ "liveCareTermsConditions3a": " - Website Terms of Use",
+ "liveCareTermsConditions3b": " - App User Agreement",
+ "liveCareTermsConditions3c": " - Online Services Terms of Use",
+ "liveCareTermsConditions3d": " - These Telehealth Services User Terms of Use",
+ "liveCareTermsConditions4": "By agreeing to proceed with the Telehealth Services and accepting these terms, you enter into an agreement with The Group incorporating all the above terms (Telehealth Services Agreement).",
+ "liveCareTermsConditions5": "Our Privacy Policy should also be read. It contains details about how we use your personal information and your rights. By proceeding with the Telehealth Services, you agree to our use of your personal information in accordance with our Privacy Policy and you expressly consent to our use of your personal information for the performance of the Telehealth Services and the discharge of our professional duties as a medical care provider.",
+ "liveCareTermsConditions6": "Our Privacy Policy should also be read. It contains details about how we use your personal information and your rights. By proceeding with the Telehealth Services, you agree to our use of your personal information in accordance with our Privacy Policy and you expressly consent to our use of your personal information for the performance of the Telehealth Services and the discharge of our professional duties as a medical care provider.",
+ "liveCareTermsHeading3": "1. DEFINITIONS",
+ "liveCareTermsConditions7": "Group means Dr. Sulaiman Al Habib Medical Services Group Company and its subsidiaries. ",
+ "liveCareTermsConditions8": "Telehealth Services means the Group’s telehealth service, enabling remote consultation, diagnosis and follow-up between the patient and doctor, using the Application and or the Website.",
+ "liveCareTermsConditions9": "Our Services means certain services provided by the Group which covers viewing patients’ medical records and medical test results, providing medical diagnostics in addition to the availability of voice and video Telehealth Service between healthcare practitioners and patients.",
+ "liveCareTermsConditions10": "Application means Dr. ALHABIB Application which is a platform where Our Services are provided through and accessible by users. ",
+ "liveCareTermsConditions11": "Website means the Group internet website which is a platform where Our Services are provided through and accessible by users. ",
+ "liveCareTermsConditions12": "Terms & Conditions means these Telehealth Services Terms of Use. ",
+ "liveCareTermsConditions13": "Content means any message, data, information, text, sound, photos, video, graphics, code or any other material contained on the Application and or the Website or transmitted via the Application and or the Website. ",
+ "liveCareTermsHeading4": "2. USER UNDERTAKINGS",
+ "liveCareTermsConditions14": "2.1 By accessing and using Telehealth Services, you agree to these Terms & Conditions, and you should not attempt to access Our Services if you do not agree. ",
+ "liveCareTermsConditions15": "2.2 You warrant, represent and undertake that all information you provide about yourself and about anyone else is true and accurate. ",
+ "liveCareTermsConditions16": "2.3 Telehealth Services is intended for use by patients physically located in the Kingdom Saudi Arabia (Permitted Territory) and should not be used by patients outside the Permitted Territory. By agreeing to these Terms & Conditions and accessing Telehealth Services via the Application and or the Website, you represent and warrant to us that you are physically located in one of the Permitted Territory. ",
+ "liveCareTermsHeading5": "3. LIMITATIONS OF TELEHEALTH SERVICES AND ASSOCIATED RISKS",
+ "liveCareTermsConditions17": "3.1 Do not use the Application and or the Website or the Telehealth Services to communicate or treat medical emergencies. Neither the Application nor the Website nor Telehealth Services are intended for the provision of care in an emergency. IF THERE IS AN URGENT MEDICAL EMERGENCY OR A RESPONSE IS NEEDED QUICKLY REGARDING YOUR HEALTH, GO TO A NEARBY EMERGENCY CENTER/HOSPITAL OR CALL IMMEDIATELY ANY EMERGENCY PHONE NUMBER. ",
+ "liveCareTermsConditions18": "3.2 Telehealth Services is not appropriate for emergency conditions and there may be some treatments or medicines which cannot be provided without follow-up physical consultation. If you believe you have a serious medical condition, you should seek an in-person consultation with a licensed medical professional.",
+ "liveCareTermsConditions19": "3.3 Telehealth Services is intended to provide benefits including patient convenience. As such, it is most suitable as an alternative to in-person consultation for routine medical matters. However, there are potential risks associated with the use of any telehealth service, including Telehealth Services, and these risks may include but not be limited to the following: ",
+ "liveCareTermsConditions19a": "(a) information transmitted may not be sufficient (e.g. poor resolution of images) to allow for appropriate medical decision making by healthcare practitioners.",
+ "liveCareTermsConditions19b": "(b) healthcare practitioners may determine that the transmitted information is of inadequate quality, thus necessitating a face-to-face meeting with the patient, or at least a rescheduled voice and video medical consult. ",
+ "liveCareTermsConditions19c": "(c) delays in medical care could occur due to deficiencies or failures of the electronic devices. ",
+ "liveCareTermsConditions19d": "(d) the practitioner is dependent on the patient to provide all relevant information orally and via the appropriate use of the patient’s own camera device. It is possible that information may not be provided to the practitioner or may not be apparent which would have been apparent to the practitioner during an in-person physical examination. ",
+ "liveCareTermsConditions19e": "(e) security protocols could fail, causing a breach of privacy of personal medical information. Whilst we take reasonable measures to protect the security of the information transmitted over the Application and or the Website, such transmissions can never be guaranteed to be completely secure and information transmitted over public telecommunications networks is outside our control and cannot be secured by us.",
+ "liveCareTermsConditions20": "3.4 If you use Telehealth Services but are experiencing any ongoing condition or concerns, we recommend you schedule an in-person consultation. ",
+ "liveCareTermsHeading6": "4. DISCLAIMER OF WARRANTY ",
+ "liveCareTermsConditions21": "4.1 We do not warrant, represent or undertake that Telehealth Services will meet your needs, or that it will be uninterrupted, timely, secure, error-free or free from viruses. We shall have no liability to you if a Telehealth Services session cannot occur or is interrupted or abandoned due to any unavailability of our online platform, however, where the Telehealth Services session cannot be delivered fully due to the downtime of our own platform, we will not charge you for a replacement consultation.",
+ "liveCareTermsConditions22": "4.2 All warranties expressed or implied by law, except those that cannot be lawfully excluded, are excluded. ",
+ "liveCareTermsConditions23": "4.3 Nothing in this section 4 is intended to exclude or limit our liability for any medical negligence claim, to the extent the applicable law in the relevant Permitted Territory does not permit us to do so.",
+ "liveCareTermsHeading7": "5. ELIGIBILITY, REGISTRATION AND USE",
+ "liveCareTermsConditions24": "5.1 To access Telehealth Services, you must satisfy the minimum age requirement of 18 years (measured according to the Gregorian calendar) and have full legal capacity. ",
+ "liveCareTermsConditions25": "5.2 Any person under the age of 18 years (measured according to the Gregorian calendar) accessing Telehealth Services must have permission from their parent or guardian to do so.",
+ "liveCareTermsConditions26": "5.3 You warrant, represent and undertake that you possess the legal right and ability to access the Application and or the Website in accordance with these Terms & Conditions and, where relevant, to make bookings and payments through the Application and or the Website.",
+ "liveCareTermsConditions27": "5.4 The registration process is as provided in the Online Services Terms of Use.",
+ "liveCareTermsConditions28": "5.5 Telehealth Services is intended only for your own personal use and the use of your children under your supervision. You must not share your user access details (log-in name, password etc.) with any other person and must take reasonable steps to maintain the security of such details. Our services are delivered on the basis that we have certain information about the user, which may be connected to or obtained from your account details (age, gender, medical history etc.). We accept no responsibility whatsoever to you or any other person if our services are delivered via a user account to a person other than the registered user. This is particularly important for telehealth services, where the practitioner will need to assess the information, the patient provides during the consultation in the context of the patient’s medical file and history.",
+ "liveCareTermsConditions29": "5.6 You are responsible for ensuring you have a device connected to the internet and capable of transmitting and receiving video and sound. We are not responsible for any failure of a Telehealth Services session caused by your device or your internet connection. You are responsible for all costs associated with your own internet connection and use.",
+ "liveCareTermsConditions30": "5.7 From time to time we may release updates to our Application and or the Website. You should ensure that you are running the latest version of the Application. Use of old versions of the Application may lead to technical errors in your use of the Telehealth Services and may expose you to additional security risks.",
+ "liveCareTermsHeading8": "6. TELEHEALTH SERVICES",
+ "liveCareTermsConditions31": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.",
+ "liveCareTermsHeading9": "7. CHARGES AND PAYMENT",
+ "liveCareTermsConditions32": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.",
+ "liveCareTermsConditions33": "7.1 The charges for a Telehealth Services consultation will be indicated before you choose to proceed. By proceeding, you agree to pay the charges. Any subsequent charges, such as prescription charges, lab tests, follow-up consultations etc. are excluded from the initial charge and will be communicated to you following the initial consultation. ",
+ "liveCareTermsConditions34": "7.2 The applicable payment terms and methods are set out in our Online Services Terms of Use. ",
+ "liveCareTermsConditions35": "7.3 It may be possible to charge Telehealth Services directly to a provider of medical insurance, although we give no undertaking or warranty that this shall be possible at any given time. Further details are set out in our Online Services Terms of Use. If such facility is made available and you choose to use it, you will need to provide us with details of your medical insurer and policy coverage, unless you have already done so and linked them to your account. You hereby authorise us to contact any such insurer with the details you provide at the time of purchase, or which are linked to your account to seek approval of the cost of your services. You acknowledge that we may be required to provide specific details of the medical services sought by you to do so and you expressly consent to such disclosure.",
+ "liveCareTermsHeading10": "8. COMMUNICATION AND/OR INQUIRIES",
+ "liveCareTermsConditions36": "In case there are any questions and/or inquiries regarding the use of Telehealth Services please contact: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553",
+ "liveCareTermsHeading11": "9. LIMITATION OF LIABILITY ",
+ "liveCareTermsConditions37": "9.1 Subject to any responsibilities implied by law and which cannot be excluded, neither the Group nor any of our directors, employees, agents or contractors, are liable to you for any losses, damages, liabilities, claims and expenses (including without limitation but not limited to legal costs and defense or settlement costs) whatsoever, whether direct, indirect or consequential, arising out of or referable to your use of Telehealth Services , however caused, whether in contract, tort (including negligence), statute or otherwise. ",
+ "liveCareTermsConditions38": "9.2 We will not be liable to you or anyone else for any loss resulting from a cause over which we do not have control. This includes failure of electronic or mechanical equipment or communications lines (including telephone, cable and Internet), unauthorized access, acts or omissions of third parties, viruses, theft, operator errors, severe or extraordinary weather (including flood, earthquake, or other act of God), fire, war, insurrection, terrorist act, riot, labor dispute or other labor problems, accident, emergency, delay, overbooking, cancellation, Royal demise or action of government",
+ "liveCareTermsHeading12": "10. TERMINATION OF USE",
+ "liveCareTermsConditions39": "10.1 We may discontinue the provision of Telehealth Services at any time and for any reason. We shall have no liability for any discontinuation, including where you are part-way through a series of consultations or courses of treatment using Telehealth Services. We will assist in enabling you to book in-person consultations instead or in transferring relevant information to an alternative medical provider to enable you to continue treatment (subject to data protection, confidentiality and medical practice laws and to prevailing medical good practice).",
+ "liveCareTermsConditions40": "10.2 We may terminate your use and access to Telehealth Services for any or no reason, at any time, with or without notice to you and without incurring any liability to you, however that liability may arise (although we will consider our medical duties to you, if doing so). ",
+ "liveCareTermsConditions41": "10.3 All restrictions and all disclaimers and exclusions and limitations of our liability will survive any termination. Upon termination, you must not directly or indirectly access or use the Application and or the Website.",
+ "liveCareTermsHeading13": "11. GOVERNING LAW AND JURISDICTION ",
+ "liveCareTermsConditions42": "The law applicable to the Application and or the Website User Terms and Conditions and to disputes arising out of or in connection with them are the laws of The Kingdom of Saudi Arabia. You irrevocably submit to the exclusive jurisdiction of the courts of the Kingdom of Saudi Arabia. ",
+ "liveCareTermsHeading14": "12. ACKNOWLEDGEMENTS",
+ "liveCareTermsConditions43": "12.1 Except as expressly set out in these Terms & Conditions or as permitted by any applicable law, you agree on the following: ",
+ "liveCareTermsConditions43a": "(a) you have read and understand these Terms & Conditions and the other terms forming part of your Agreement with us; ",
+ "liveCareTermsConditions43b": "(b) you have read our Privacy Policy and hereby expressly consent to our use of your personal information as described. In addition, you understand that the contact number or email address that you have provided on registration will be used for communications by the Group through SMS, email or any other method in connection with the Telehealth Services, including for appointment notifications and current medical services;",
+ "liveCareTermsConditions43c": "(c) you understand that you have the right to withhold or withdraw your consent to the use of the Application and or the Website in the course of your care at any time, without affecting your right to future care or treatment; ",
+ "liveCareTermsConditions43d": "(d) you understand that you may expect to receive benefits from the use of Application and or the Website concerning your healthcare, but that no results can be guaranteed or assured; ",
+ "liveCareTermsConditions43e": "(e) you understand that your healthcare information may be shared with other employees in the Group for scheduling and billing purposes;",
+ "liveCareTermsConditions43f": "(f) you understand that video images and audio recordings of you may be captured and stored electronically. You understand that these recordings may be later used in connection with legal proceedings if necessary but will not otherwise be used for any purpose other than providing Telehealth Services and follow-up medical services to you. You acknowledge and consent to the use of these images and audio recordings by us for the purposes described; ",
+ "liveCareTermsConditions43g": "(g) you understand the risks of communicating by email and text messages, particularly the privacy risks. You understand that the Group cannot guarantee the security and confidentiality of email or text communication. The Group will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.",
+ "liveCareTermsHeading15": "13. GENERAL TERMS AND CONDITIONS ",
+ "liveCareTermsConditions44": "13.1 We may at any time vary these Terms & Conditions for security, legal or regulatory reasons, or to reflect updates or changes to the services or functionality of Telehealth Services or the Application, by publishing the varied Terms & Conditions on the Application. We will notify you on the Application that these Terms & Conditions have changed before your next use of the Telehealth Services and you will have the opportunity to agree to the revised terms before using the service again. ",
+ "liveCareTermsConditions45": "13.2 We may perform any of our obligations, and exercise any of the rights granted to us under these Terms & Conditions, through a third party. We may assign any or all our rights and obligations under these Terms & Conditions to any third party.",
+ "liveCareTermsConditions46": "13.3 If any clause or part of any clause of these Terms & Conditions is found to be void, unenforceable or invalid, then it will be severed from these Terms & Conditions, leaving the remainder in full force and effect, provided that the severance has not altered the basic nature of these Terms & Conditions. ",
+ "liveCareTermsHeading16": "14. COMPLAINTS",
+ "liveCareTermsConditions47": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.",
+ "liveCareTermsConditions48": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553"
}
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index fdc3bdfa..f52d12fc 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -8,8 +8,8 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 1587365701FF0D2AAAFED0D8 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A83C76CFF9D3F92EDE3B22B4 /* Pods_Runner.framework */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 37D27FAF2C38AC83B852680C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A83C76CFF9D3F92EDE3B22B4 /* Pods_Runner.framework */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */; };
61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */; };
@@ -100,7 +100,7 @@
76B1D2512F91BF8000DBBD1B /* Penguin.xcframework in Frameworks */,
76B1D2552F91BF8000DBBD1B /* PenNavUI.xcframework in Frameworks */,
76B1D2532F91BF8000DBBD1B /* PenguinINRenderer.xcframework in Frameworks */,
- DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */,
+ 37D27FAF2C38AC83B852680C /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -339,10 +339,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -356,10 +360,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
+ inputPaths = (
+ );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
+ outputPaths = (
+ );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -519,7 +527,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 2;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -529,7 +537,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.0.5;
+ MARKETING_VERSION = 0.0.12;
PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.HMGPatientApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -706,7 +714,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 2;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -716,7 +724,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.0.5;
+ MARKETING_VERSION = 0.0.12;
PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.HMGPatientApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -736,7 +744,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 2;
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -746,7 +754,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.0.5;
+ MARKETING_VERSION = 0.0.12;
PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.HMGPatientApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 5b3b2681..caa84333 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -86,7 +86,7 @@
NSMicrophoneUsageDescriptionThis app requires microphone access to enable virtual consultation between patient & doctorNSMotionUsageDescription
- This app requires motion detection access to function properly.
+ This app requires access to motion detection to count your daily steps.NSPhotoLibraryUsageDescriptionThis app requires photo library access to select image as document & upload it.NSPhotoLibraryAddUsageDescription
diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart
index 87de3c8d..784c2f44 100644
--- a/lib/core/api/api_client.dart
+++ b/lib/core/api/api_client.dart
@@ -210,8 +210,8 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n";
}
- body['TokenID'] = "@dm!n";
- // body['PatientID'] = 4770714;
+ // body['TokenID'] = "@dm!n";
+ // body['PatientID'] = 226077;
// body['PatientID'] = 53320;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;
diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart
index 8f2deaa3..40f04b1e 100644
--- a/lib/core/api_consts.dart
+++ b/lib/core/api_consts.dart
@@ -5,7 +5,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts {
static const maxSmallScreen = 660;
- static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
+ static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT
@@ -301,7 +301,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api ****************
- static final double appVersionID = 21.7;
+ static final double appVersionID = 22.0;
// static final double appVersionID = 50.7;
static final int appChannelId = 3;
@@ -911,8 +911,6 @@ var AUTO_GENERATE_INVOICE_TAMARA = 'Services/PayFort_Serv.svc/REST/Tamara_Getinf
var GET_ONESIGNAL_VOIP_TOKEN = 'https://onesignal.com/api/v1/players';
-var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCare/SendPaymentStatus';
-
var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs';
var GET_NATIONALITY = 'Services/Lists.svc/REST/GetNationality';
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index dc61cc66..0c0044e2 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -110,6 +110,7 @@ class AppAssets {
static const String report_icon = '$svgBasePath/report_icon.svg';
static const String radiology_icon = '$svgBasePath/radiology_icon.svg';
static const String prescription_item_icon = '$svgBasePath/prescription_item_icon.svg';
+ static const String vital_sign_item_icon = '$svgBasePath/vital_sign_item_icon.svg';
static const String checkin_location_icon = '$svgBasePath/checkin_location_icon.svg';
static const String checkin_nfc_icon = '$svgBasePath/checkin_nfc_icon.svg';
static const String checkin_qr_icon = '$svgBasePath/checkin_qr_icon.svg';
@@ -400,6 +401,8 @@ class AppAssets {
static const String descriptionIcon = '$svgBasePath/description_icon.svg';
static const String selectImageIcon = '$svgBasePath/select_image_icon.svg';
static const String liveCareRescheduleIcon = '$svgBasePath/livecare_reschedule_icon.svg';
+ static const String patientQRCodeIcon = '$svgBasePath/patient_qr_code_icon.svg';
+ static const String noImageFound = '$svgBasePath/no_image_found.svg';
// PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png';
diff --git a/lib/core/app_state.dart b/lib/core/app_state.dart
index a27b727e..0d015922 100644
--- a/lib/core/app_state.dart
+++ b/lib/core/app_state.dart
@@ -170,7 +170,6 @@ class AppState {
set setIsAuthenticated(v) => isAuthenticated = v;
-
String deviceTypeID = "";
set setDeviceTypeID(v) => deviceTypeID = v;
@@ -179,6 +178,14 @@ class AppState {
String get getFamilyFileTokenID => _familyFileTokenID;
+ bool isSafeDevice = true;
+
+ // set setIsSafeDevice(v) => isSafeDevice = v;
+
+ set setIsSafeDevice(bool value) {
+ isSafeDevice = value;
+ }
+
set setFamilyFileTokenID(String value) {
_familyFileTokenID = value;
}
diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart
index ecfe1324..b6c7fb38 100644
--- a/lib/core/dependencies.dart
+++ b/lib/core/dependencies.dart
@@ -84,6 +84,7 @@ import 'package:hmg_patient_app_new/services/logger_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/services/notification_service.dart';
import 'package:hmg_patient_app_new/services/permission_service.dart';
+import 'package:hmg_patient_app_new/services/security_service.dart';
import 'package:hmg_patient_app_new/core/services/turnstile_service.dart';
import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_calendar_model.dart';
import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart';
@@ -157,6 +158,10 @@ class AppDependencies {
getIt.registerLazySingleton(() => PermissionService());
getIt.registerLazySingleton(() => TurnstileService(getIt()));
+ getIt.registerLazySingleton(() => SecurityServiceImpl(
+ appState: getIt(),
+ loggerService: getIt(),
+ ));
// Repositories
getIt.registerLazySingleton(() => CommonRepoImp(loggerService: getIt()));
@@ -369,7 +374,11 @@ class AppDependencies {
errorHandlerService: getIt(),
));
- getIt.registerLazySingleton(() => PayTabsViewModel(appState: getIt()));
+ getIt.registerLazySingleton(() => PayTabsViewModel(
+ appState: getIt(),
+ payfortRepo: getIt(),
+ errorHandlerService: getIt(),
+ ));
getIt.registerLazySingleton(
() => ClarityService(appState: getIt.get()),
diff --git a/lib/core/paytabs_config.dart b/lib/core/paytabs_config.dart
index 4d90ee8f..b1ba0dd4 100644
--- a/lib/core/paytabs_config.dart
+++ b/lib/core/paytabs_config.dart
@@ -3,6 +3,11 @@ class PaymentSdkDefaultConfig {
static const String profileID = "119730";
static const String serverKey = "SWJ9LD22MT-JLJZLBKTLK-WGWTLWGTWR";
static const String clientKey = "C7K2DQ-PDDN6B-69B2K7-P9GB9T";
+
+ // static const String profileID = "135577";
+ // static const String serverKey = "SDJ9LD22LR-J9LRBKZDRD-ZRZKWDWBRR";
+ // static const String clientKey = "CBK2DQ-PDPN6P-BR2K9D-VPBTB2";
+
static const String defaultCurrency = "SAR";
static const double defaultAmount = 10.0;
static const String defaultMerchantCountryCode = "SA";
diff --git a/lib/core/talsec_config.dart b/lib/core/talsec_config.dart
new file mode 100644
index 00000000..1603d419
--- /dev/null
+++ b/lib/core/talsec_config.dart
@@ -0,0 +1,15 @@
+import 'package:freerasp/freerasp.dart';
+
+final talsecConfig = TalsecConfig(
+ androidConfig: AndroidConfig(
+ packageName: 'com.cloudsolutions.HMGPatientApp',
+ signingCertHashes: ['6tvWaoN5coG4SnfxGbdQlcLmM0J4ePQwDjrKIg+QkV0=', 'j6VEqVhrypHMIiXiFdRLDdGwjGaMGWY7KAdBJA+Z4Pc='], // Must be the release cert hash
+ supportedStores: ['com.android.vending'], // Google Play Store
+ ),
+ iosConfig: IOSConfig(
+ bundleIds: ['com.cloudsolutions.HMGPatientApp'], // iOS Bundle ID
+ teamId: '3A359E86ZF', // Found in Apple Developer portal
+ ),
+ watcherMail: '', // Required to receive security alerts
+ isProd: true, // Enforces strict checks for release builds
+);
\ No newline at end of file
diff --git a/lib/core/utils/date_util.dart b/lib/core/utils/date_util.dart
index 97c8dad0..7510786d 100644
--- a/lib/core/utils/date_util.dart
+++ b/lib/core/utils/date_util.dart
@@ -28,21 +28,21 @@ class DateUtil {
const end = "+0300)";
final startIndex = date.indexOf(start);
final endIndex = date.indexOf(end, startIndex + start.length);
- // if (projectId == 2 || projectId == 3) {
- // return DateTime.fromMillisecondsSinceEpoch(
- // int.parse(
- // date.substring(startIndex + start.length, endIndex),
- // ),
- // isUtc: true)
- // .add(Duration(hours: 4));
- // } else {
- return DateTime.fromMillisecondsSinceEpoch(
+ if (projectId == 2 || projectId == 3) {
+ return DateTime.fromMillisecondsSinceEpoch(
+ int.parse(
+ date.substring(startIndex + start.length, endIndex),
+ ),
+ isUtc: true)
+ .add(Duration(hours: 4));
+ } else {
+ return DateTime.fromMillisecondsSinceEpoch(
int.parse(
date.substring(startIndex + start.length, endIndex),
),
isUtc: true)
.add(Duration(hours: 3));
- // }
+ }
} else {
return DateTime.now();
}
diff --git a/lib/core/utils/request_utils.dart b/lib/core/utils/request_utils.dart
index 4d4ae4b5..62399abd 100644
--- a/lib/core/utils/request_utils.dart
+++ b/lib/core/utils/request_utils.dart
@@ -27,7 +27,7 @@ class RequestUtils {
}) {
bool fileNo = false;
if (nationId.isNotEmpty) {
- final numericRegex = RegExp(r'^[0-9]+$');
+ final numericRegex = RegExp(r'^[0-9]+$');
fileNo = nationId.length < 10 && numericRegex.hasMatch(nationId);
//fileNo = nationId.length < 10 && nationId.isNumericOnly() ;
if (fileNo) {
@@ -40,14 +40,23 @@ class RequestUtils {
if (zipCode == "0") {
request.patientMobileNumberOthers = phoneNumber;
} else {
- request.patientMobileNumber = int.parse(phoneNumber);
+ // Remove any non-numeric characters before parsing
+ final numericPhone = phoneNumber.replaceAll(RegExp(r'[^0-9]'), '');
+ final parsedPhone = int.tryParse(numericPhone);
+ if (parsedPhone != null) {
+ request.patientMobileNumber = parsedPhone;
+ } else {
+ // If parsing fails, use as string in Others field
+ request.patientMobileNumberOthers = phoneNumber;
+ }
}
}
request.oTPSendType = otpTypeEnum.toInt(); // could map OTPTypeEnum if needed
request.zipCode = zipCode; // or countryCode if defined elsewhere
if (isForRegister) {
- request.patientIdentificationID = int.parse(nationId);
+ final parsedNationId = int.tryParse(nationId.replaceAll(RegExp(r'[^0-9]'), ''));
+ request.patientIdentificationID = parsedNationId ?? 0;
request.searchType = 1;
request.isHijri = calenderType.toInt;
request.patientID = patientId;
@@ -56,7 +65,7 @@ class RequestUtils {
request.isDentalAllowedBackend = false;
} else {
if (fileNo) {
- request.patientID = patientId ?? int.parse(nationId);
+ request.patientID = patientId ?? (int.tryParse(nationId.replaceAll(RegExp(r'[^0-9]'), '')) ?? 0);
request.patientIdentificationID = request.nationalID;
request.searchType = 2;
} else {
@@ -71,15 +80,15 @@ class RequestUtils {
static dynamic getCommonRequestWelcome(
{required String phoneNumber,
- required OTPTypeEnum otpTypeEnum,
- required String? deviceToken,
- required bool patientOutSA,
- required String? loginTokenID,
- RegistrationDataModelPayload? registeredData,
- int? patientId,
- required String nationIdText,
- required String countryCode,
- required int loginType}) {
+ required OTPTypeEnum otpTypeEnum,
+ required String? deviceToken,
+ required bool patientOutSA,
+ required String? loginTokenID,
+ RegistrationDataModelPayload? registeredData,
+ int? patientId,
+ required String nationIdText,
+ required String countryCode,
+ required int loginType}) {
bool fileNo = false;
if (nationIdText.isNotEmpty) {
final numericRegex = RegExp(r'^[0-9]+$');
@@ -91,8 +100,17 @@ class RequestUtils {
request.patientMobileNumberOthers = phoneNumber;
request.mobileNo = phoneNumber;
} else {
- request.patientMobileNumber = int.parse(phoneNumber);
- request.mobileNo = '0$phoneNumber';
+ // Remove any non-numeric characters before parsing
+ final numericPhone = phoneNumber.replaceAll(RegExp(r'[^0-9]'), '');
+ final parsedPhone = int.tryParse(numericPhone);
+ if (parsedPhone != null) {
+ request.patientMobileNumber = parsedPhone;
+ request.mobileNo = '0$numericPhone';
+ } else {
+ // If parsing fails, use as string in Others field
+ request.patientMobileNumberOthers = phoneNumber;
+ request.mobileNo = phoneNumber;
+ }
}
request.deviceToken = deviceToken;
request.projectOutSA = patientOutSA;
@@ -106,8 +124,8 @@ class RequestUtils {
request.searchType = registeredData.searchType != null
? registeredData.searchType
: fileNo
- ? 1
- : 2;
+ ? 1
+ : 2;
request.patientID = registeredData.patientId ?? 0;
request.patientIdentificationID = request.nationalID = (registeredData.patientIdentificationId ?? 0);
request.dob = registeredData.dob;
@@ -115,7 +133,8 @@ class RequestUtils {
log("nationIdText: ${nationIdText}");
} else {
if (fileNo) {
- request.patientID = patientId ?? int.parse(nationIdText);
+ final numericNationId = nationIdText.replaceAll(RegExp(r'[^0-9]'), '');
+ request.patientID = patientId ?? (int.tryParse(numericNationId) ?? 0);
request.patientIdentificationID = request.nationalID = '0';
request.searchType = 2;
//TODO: Issue HEre is Not Login
@@ -155,8 +174,17 @@ class RequestUtils {
request.patientMobileNumberOthers = mobileNumber;
request.mobileNo = mobileNumber;
} else {
- request.patientMobileNumber = int.parse(mobileNumber);
- request.mobileNo = '0$mobileNumber';
+ // Remove any non-numeric characters before parsing
+ final numericMobile = mobileNumber.replaceAll(RegExp(r'[^0-9]'), '');
+ final parsedMobile = int.tryParse(numericMobile);
+ if (parsedMobile != null) {
+ request.patientMobileNumber = parsedMobile;
+ request.mobileNo = '0$numericMobile';
+ } else {
+ // If parsing fails, use as string in Others field
+ request.patientMobileNumberOthers = mobileNumber;
+ request.mobileNo = mobileNumber;
+ }
}
}
request.projectOutSA = patientOutSA;
@@ -240,16 +268,16 @@ class RequestUtils {
"Patientobject": {
"TempValue": true,
"PatientIdentificationType": (isDubai
- ? appState.getUserRegistrationPayload.patientIdentificationId?.toString().substring(0, 1)
- : appState.getNHICUserData.idNumber!.substring(0, 1)) ==
- "1"
+ ? appState.getUserRegistrationPayload.patientIdentificationId?.toString().substring(0, 1)
+ : appState.getNHICUserData.idNumber!.substring(0, 1)) ==
+ "1"
? 1
: 2,
"PatientIdentificationNo":
- isDubai ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : appState.getNHICUserData.idNumber.toString(),
+ isDubai ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : appState.getNHICUserData.idNumber.toString(),
"MobileNumber": appState.getUserRegistrationPayload.patientMobileNumber ?? 0,
"PatientOutSA": (appState.getUserRegistrationPayload.zipCode == CountryEnum.saudiArabia.countryCode ||
- appState.getUserRegistrationPayload.zipCode == '+966')
+ appState.getUserRegistrationPayload.zipCode == '+966')
? 0
: 1,
"FirstNameN": isDubai ? "..." : appState.getNHICUserData.firstNameAr,
@@ -266,31 +294,31 @@ class RequestUtils {
"DateofBirthN": date,
"EmailAddress": emailAddress,
"SourceType": (appState.getUserRegistrationPayload.zipCode == CountryEnum.saudiArabia.countryCode ||
- appState.getUserRegistrationPayload.zipCode == '+966')
+ appState.getUserRegistrationPayload.zipCode == '+966')
? "1"
: "2",
"PreferredLanguage": appState.getLanguageCode() == "ar" ? (isDubai ? "1" : 1) : (isDubai ? "2" : 2),
"Marital": isDubai
? (maritalStatus == MaritalStatusTypeEnum.single
- ? '0'
- : maritalStatus == MaritalStatusTypeEnum.married
- ? '1'
- : '2')
+ ? '0'
+ : maritalStatus == MaritalStatusTypeEnum.married
+ ? '1'
+ : '2')
: (appState.getNHICUserData.maritalStatusCode == 'U'
- ? '0'
- : appState.getNHICUserData.maritalStatusCode == 'M'
- ? '1'
- : '2'),
+ ? '0'
+ : appState.getNHICUserData.maritalStatusCode == 'M'
+ ? '1'
+ : '2'),
},
"PatientIdentificationID":
- isDubai ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : appState.getNHICUserData.idNumber.toString(),
+ isDubai ? appState.getUserRegistrationPayload.patientIdentificationId.toString() : appState.getNHICUserData.idNumber.toString(),
"PatientMobileNumber": appState.getUserRegistrationPayload.patientMobileNumber.toString()[0] == '0'
? appState.getUserRegistrationPayload.patientMobileNumber
: '0${appState.getUserRegistrationPayload.patientMobileNumber}',
"DOB": dob,
"IsHijri": appState.getUserRegistrationPayload.isHijri,
"PatientOutSA": (appState.getUserRegistrationPayload.zipCode == CountryEnum.saudiArabia.countryCode ||
- appState.getUserRegistrationPayload.zipCode == '+966')
+ appState.getUserRegistrationPayload.zipCode == '+966')
? 0
: 1,
"isDentalAllowedBackend": appState.getUserRegistrationPayload.isDentalAllowedBackend,
@@ -314,7 +342,9 @@ class RequestUtils {
request.sharedPatientId = 0;
request.sharedPatientIdentificationId = nationalIDorFile;
} else if (loginType == 2) {
- request.sharedPatientId = int.parse(nationalIDorFile);
+ // Remove any non-numeric characters before parsing
+ final numericId = nationalIDorFile.replaceAll(RegExp(r'[^0-9]'), '');
+ request.sharedPatientId = int.tryParse(numericId) ?? 0;
request.sharedPatientIdentificationId = '';
}
request.searchType = loginType;
@@ -325,4 +355,4 @@ class RequestUtils {
request.isDentalAllowedBackend = false;
return request;
}
-}
+}
\ No newline at end of file
diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart
index 320bd1cf..d3107d72 100644
--- a/lib/core/utils/utils.dart
+++ b/lib/core/utils/utils.dart
@@ -808,8 +808,8 @@ class Utils {
double? border,
double? borderRadius,
}) {
- final iconH = height ?? 24.h;
- final iconW = width ?? 24.w;
+ final double? iconW = (width == null && height == null) ? 24.w : width;
+ final double? iconH = (width == null && height == null) ? 24.h : height;
return PreserveImageColors(
child: Container(
decoration: BoxDecoration(
@@ -851,7 +851,7 @@ class Utils {
/// Widget to build an image from network - automatically preserves colors in visual modes
static Widget buildImgWithNetwork({
- required String url,
+ required String? url,
required Color iconColor,
bool isDisabled = false,
double? width,
@@ -859,8 +859,15 @@ class Utils {
BoxFit fit = BoxFit.cover,
ImageErrorWidgetBuilder? errorBuilder,
}) {
- final iconH = height ?? 24.h;
- final iconW = width ?? 24.w;
+ final double? iconW = (width == null && height == null) ? 24.w : width;
+ final double? iconH = (width == null && height == null) ? 24.h : height;
+ if (url == null || url.isEmpty) {
+ return Utils.buildSvgWithAssets(
+ width: iconW ?? 24.w,
+ height: iconH ?? 24.h,
+ icon: AppAssets.noImageFound,
+ );
+ }
return PreserveImageColors(
child: Image.network(
url,
@@ -870,7 +877,7 @@ class Utils {
errorBuilder: errorBuilder ??
(_, __, ___) {
//todo_section change the error builder icon that it is returning
- return Utils.buildSvgWithAssets(width: iconW, height: iconH, icon: AppAssets.no_visit_icon);
+ return Utils.buildSvgWithAssets(width: iconW ?? 24.w, height: iconH ?? 24.h, icon: AppAssets.noImageFound);
},
),
);
@@ -1057,9 +1064,42 @@ class Utils {
return isHavePrivilege;
}
- static void openWebView({required String url}) {
- Uri uri = Uri.parse(url);
- launchUrl(uri, mode: LaunchMode.inAppBrowserView);
+ static Future openWebView({required String url}) async {
+ try {
+ Uri uri = Uri.parse(url);
+
+ // Validate URL scheme for in-app browser
+ if (!uri.hasScheme || (!uri.scheme.startsWith('http'))) {
+ throw 'Invalid URL scheme. In-app browser only supports HTTP/HTTPS URLs';
+ }
+
+ // Check if URL can be launched
+ if (await canLaunchUrl(uri)) {
+ final launched = await launchUrl(
+ uri,
+ mode: LaunchMode.externalApplication,
+ );
+
+ if (!launched) {
+ // Fallback to external browser
+ await launchUrl(uri, mode: LaunchMode.externalApplication);
+ }
+ } else {
+ // Fallback to external browser
+ await launchUrl(uri, mode: LaunchMode.externalApplication);
+ }
+ } catch (e) {
+ debugPrint('❌ Failed to open URL: $url - Error: $e');
+
+ // Try external browser as last resort
+ try {
+ final uri = Uri.parse(url);
+ await launchUrl(uri, mode: LaunchMode.externalApplication);
+ } catch (e2) {
+ debugPrint('❌ Failed to open URL in external browser: $e2');
+ // Optionally show user-friendly error message
+ }
+ }
}
static Color getCardBorderColor(int currentQueueStatus) {
diff --git a/lib/core/utils/zoom_config.dart b/lib/core/utils/zoom_config.dart
index 09370c00..8262e83d 100644
--- a/lib/core/utils/zoom_config.dart
+++ b/lib/core/utils/zoom_config.dart
@@ -2,3 +2,9 @@ const Map configs = {
'ZOOM_SDK_KEY': 'b9T74nhfTg-ioP9urm970A',
'ZOOM_SDK_SECRET': 'KOzmjBNXQ1f4IPHpnngfL29uZvJMufSy2Fk8',
};
+
+
+// const Map configs = {
+// 'ZOOM_SDK_KEY': 'jYHoRpSUMTTefOwLq94Kyf1Kak513TUHpu78',
+// 'ZOOM_SDK_SECRET': 'MOqi1zc18VFOMEaBDshFSHKLB0C2n9M0K48H',
+// };
diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart
index fdc16943..a8719f29 100644
--- a/lib/features/authentication/authentication_view_model.dart
+++ b/lib/features/authentication/authentication_view_model.dart
@@ -31,6 +31,7 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
+import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
@@ -824,7 +825,11 @@ class AuthenticationViewModel extends ChangeNotifier {
onSuccess: (dynamic respData) async {
try {
if (respData != null) {
- dynamic data = await SelectDeviceByImeiRespModelElement.fromJson(respData.toJson());
+ SelectDeviceByImeiRespModelElement data = SelectDeviceByImeiRespModelElement.fromJson(respData.toJson());
+ if (data.mobile == null || data.mobile == "" || data.identificationNo == null || data.identificationNo == "") {
+ return;
+ }
+
_appState.setSelectDeviceByImeiRespModelElement(data);
LoaderBottomSheet.hideLoader();
@@ -856,8 +861,6 @@ class AuthenticationViewModel extends ChangeNotifier {
}
Future checkUserAuthentication({required OTPTypeEnum otpTypeEnum, Function(dynamic)? onSuccess, Function(String)? onError}) async {
- // TODO: THIS SHOULD BE REMOVED LATER ON AND PASSED FROM APP STATE DIRECTLY INTO API CLIENT. BECAUSE THIS API ONLY NEEDS FEW PARAMS FROM USER
-
loginTypeEnum = otpTypeEnum == OTPTypeEnum.sms ? LoginTypeEnum.sms : LoginTypeEnum.whatsapp;
// if (phoneNumberController.text.isEmpty) {
@@ -980,15 +983,15 @@ class AuthenticationViewModel extends ChangeNotifier {
// TODO: GET APP SMS SIGNATURE HERE
request.sMSSignature = await getSignature();
- if(!kDebugMode) {
- // Get Turnstile token if configured
- final turnstileToken = await _turnstileService.getTurnstileToken();
- if (turnstileToken != null) {
- request.turnstileToken = turnstileToken;
- } else {
- request.turnstileToken = "";
- }
- }
+ // if(!kDebugMode) {
+ // // Get Turnstile token if configured
+ // final turnstileToken = await _turnstileService.getTurnstileToken();
+ // if (turnstileToken != null) {
+ // request.turnstileToken = turnstileToken;
+ // } else {
+ // request.turnstileToken = "";
+ // }
+ // }
if (isNeedLoading) {
LoaderBottomSheet.showLoader();
@@ -1278,6 +1281,9 @@ class AuthenticationViewModel extends ChangeNotifier {
getIt.get().setIsWalletAmountToBeLoaded(true);
getIt.get().setIsInsuranceDataToBeLoaded(true);
getIt.get().setHasVitalSignDataLoaded(false);
+ getIt.get().setIsSickLeavesDataNeedsReloading(true);
+ getIt.get().setIsMedicalReportsDataNeedsReloading(true);
+ getIt.get().setIsPrescriptionDataNeedsReloading(true);
if (isUserAgreedBefore) {
LoaderBottomSheet.hideLoader();
navigateToHomeScreen();
diff --git a/lib/features/book_appointments/book_appointments_repo.dart b/lib/features/book_appointments/book_appointments_repo.dart
index e5200f67..a705d84a 100644
--- a/lib/features/book_appointments/book_appointments_repo.dart
+++ b/lib/features/book_appointments/book_appointments_repo.dart
@@ -2,7 +2,9 @@
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/app_state.dart';
import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
+import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/appointment_nearest_gate_response_model.dart';
@@ -30,7 +32,7 @@ abstract class BookAppointmentsRepo {
Future>> getDoctorProfile(int clinicID, int projectID, int doctorId, {Function(dynamic)? onSuccess, Function(String)? onError});
- Future>> getDoctorRatingDetails(int doctorId, {Function(dynamic)? onSuccess, Function(String)? onError});
+ Future>> getDoctorRatingDetails(int doctorId, int projectID, {Function(dynamic)? onSuccess, Function(String)? onError});
Future>> getDoctorFreeSlots(int clinicID, int projectID, int doctorId, bool isBookingForLiveCare,
{bool continueDentalPlan = false, Function(dynamic)? onSuccess, Function(String)? onError});
@@ -181,6 +183,9 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
"IsSearchAppointmnetByClinicID": isContinueDentalPlan ? false : true,
"isDentalAllowedBackend": clinicID == 17 ? true : isContinueDentalPlan,
"IsGetNearAppointment": isNearest,
+ "gender": getIt.get().isAuthenticated ? getIt.get().getAuthenticatedUser()!.gender! : 0,
+ "age": getIt.get().isAuthenticated ? getIt.get().getAuthenticatedUser()!.age! : 0,
+ "DateofBirth": getIt.get().isAuthenticated ? getIt.get().getAuthenticatedUser()!.dateofBirth! : null,
if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()),
"License": true
};
@@ -309,9 +314,10 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
}
@override
- Future>> getDoctorRatingDetails(int doctorId, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ Future>> getDoctorRatingDetails(int doctorId, int projectID, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
Map mapDevice = {
"DoctorID": doctorId,
+ "ProjectID": projectID,
"PatientID": 0,
"License": true,
"IsRegistered": true,
diff --git a/lib/features/book_appointments/book_appointments_view_model.dart b/lib/features/book_appointments/book_appointments_view_model.dart
index e4f028d9..dbed528e 100644
--- a/lib/features/book_appointments/book_appointments_view_model.dart
+++ b/lib/features/book_appointments/book_appointments_view_model.dart
@@ -404,6 +404,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
isWaitingAppointmentSelected = false;
isPatientRescheduleAppointment = false;
bodyTypes = [maleLaserCategory, femaleLaserCategory];
+ selectedChiefComplaintID = 0;
// getLocation();
notifyListeners();
}
@@ -420,14 +421,14 @@ class BookAppointmentsViewModel extends ChangeNotifier {
setIsNearestAppointmentSelected(bool isNearestAppointmentSelected) {
this.isNearestAppointmentSelected = isNearestAppointmentSelected;
if (isNearestAppointmentSelected) {
- for (var group in doctorsListGrouped) {
- 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));
- });
- }
+ // for (var group in doctorsListGrouped) {
+ // 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 {
// for (var group in doctorsListGrouped) {
// group.sort((a, b) {
@@ -675,7 +676,6 @@ class BookAppointmentsViewModel extends ChangeNotifier {
(failure) async {
isDoctorsListLoading = false;
if (onError != null) onError(LocaleKeys.noDoctorFound.tr());
-
notifyListeners();
},
(apiResponse) {
@@ -690,7 +690,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
clearSearchFilters();
getFiltersFromDoctorList();
_groupDoctorsList();
- setIsNearestAppointmentSelected(isNearest);
+ // setIsNearestAppointmentSelected(isNearest);
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -806,7 +806,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
doctorDetailsList.clear();
notifyListeners();
- final result = await bookAppointmentsRepo.getDoctorRatingDetails(selectedDoctor.doctorID ?? 0, onSuccess: onSuccess, onError: onError);
+ final result = await bookAppointmentsRepo.getDoctorRatingDetails(selectedDoctor.doctorID ?? 0, selectedDoctor.projectID ?? 0, onSuccess: onSuccess, onError: onError);
result.fold(
(failure) async {
diff --git a/lib/features/habib_wallet/habib_wallet_view_model.dart b/lib/features/habib_wallet/habib_wallet_view_model.dart
index cc87bb7b..21ec0e79 100644
--- a/lib/features/habib_wallet/habib_wallet_view_model.dart
+++ b/lib/features/habib_wallet/habib_wallet_view_model.dart
@@ -30,7 +30,36 @@ class HabibWalletViewModel extends ChangeNotifier {
num habibWalletAmount = 0;
num walletRechargeAmount = 0;
String notesText = "";
- bool isWalletAmountToBeLoaded = true;
+ bool isWalletAmountToBeLoaded = false;
+ bool isLakumInfoToBeLoaded = false;
+
+ // ── Balance visibility (show/hide like a password field) ──────────────────
+ bool isWalletAmountHidden = true;
+ bool isLakumPointsHidden = true;
+
+ // Track whether data has already been fetched (to avoid re-calling APIs).
+ bool isWalletAmountFetched = false;
+ bool isLakumInfoFetched = false;
+
+ void toggleWalletAmountVisibility() {
+ isWalletAmountHidden = !isWalletAmountHidden;
+ notifyListeners();
+ // On first unhide, fetch the data if not already fetched.
+ if (!isWalletAmountHidden && !isWalletAmountFetched) {
+ isWalletAmountToBeLoaded = true;
+ getPatientBalanceAmount();
+ }
+ }
+
+ void toggleLakumPointsVisibility() {
+ isLakumPointsHidden = !isLakumPointsHidden;
+ notifyListeners();
+ // On first unhide, fetch the data if not already fetched.
+ if (!isLakumPointsHidden && !isLakumInfoFetched) {
+ isLakumInfoToBeLoaded = true;
+ getLakumAccountInformation();
+ }
+ }
bool isBottomSheetContentLoading = false;
@@ -70,6 +99,8 @@ class HabibWalletViewModel extends ChangeNotifier {
bool isLakumAccountInfoLoading = false;
LakumInquiryInformationResponseModel? lakumAccountInfo;
+
+
// Get all flattened transactions sorted by date descending
List getAllLakumTransactions() {
if (lakumAccountInfo?.gainedPointsAmountPerYear == null) {
@@ -328,6 +359,8 @@ class HabibWalletViewModel extends ChangeNotifier {
if (isWalletAmountToBeLoaded) {
isWalletAmountLoading = true;
habibWalletAmount = 0;
+ }
+ if (isLakumInfoToBeLoaded) {
isLakumAccountInfoLoading = true;
yahalaAccountNumber = "";
}
@@ -399,6 +432,11 @@ class HabibWalletViewModel extends ChangeNotifier {
notifyListeners();
}
+ setIsLakumInfoToBeLoaded(bool value) {
+ isLakumInfoToBeLoaded = value;
+ notifyListeners();
+ }
+
String getSelectedRechargeTypeValue() {
switch (selectedRechargeType) {
case 1:
@@ -437,6 +475,7 @@ class HabibWalletViewModel extends ChangeNotifier {
isWalletAmountLoading = false;
isWalletAmountToBeLoaded = false;
+ isWalletAmountFetched = true;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -540,7 +579,7 @@ class HabibWalletViewModel extends ChangeNotifier {
}
Future getLakumAccountInformation({Function(dynamic)? onSuccess, Function(String)? onError}) async {
- if (!isWalletAmountToBeLoaded) {
+ if (!isLakumInfoToBeLoaded) {
return;
}
@@ -555,6 +594,8 @@ class HabibWalletViewModel extends ChangeNotifier {
(failure) async {
yahalaAccountNumber = "0";
isLakumAccountInfoLoading = false;
+ isLakumInfoFetched = true;
+ isLakumInfoToBeLoaded = false;
notifyListeners(); // 675534
},
(apiResponse) async {
@@ -581,6 +622,8 @@ class HabibWalletViewModel extends ChangeNotifier {
);
}
isLakumAccountInfoLoading = false;
+ isLakumInfoFetched = true;
+ isLakumInfoToBeLoaded = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
diff --git a/lib/features/hmg_services/hmg_services_repo.dart b/lib/features/hmg_services/hmg_services_repo.dart
index 8f439d2c..6e01a561 100644
--- a/lib/features/hmg_services/hmg_services_repo.dart
+++ b/lib/features/hmg_services/hmg_services_repo.dart
@@ -67,7 +67,7 @@ abstract class HmgServicesRepo {
Future>> getCovidPaymentInfo(String procedureID, int projectID);
- Future>>> getPatientVitalSign();
+ Future>>> getPatientVitalSign( num? transID, int? projectID);
}
class HmgServicesRepoImp implements HmgServicesRepo {
@@ -917,8 +917,11 @@ class HmgServicesRepoImp implements HmgServicesRepo {
}
@override
- Future>>> getPatientVitalSign() async {
+ Future>>> getPatientVitalSign(num? transID, int? projectID) async {
Map requestBody = {
+ "TransID": transID,
+ "TransNo": transID,
+ "ProjectID": projectID,
};
try {
diff --git a/lib/features/hmg_services/hmg_services_view_model.dart b/lib/features/hmg_services/hmg_services_view_model.dart
index da1ae80d..9cd7e519 100644
--- a/lib/features/hmg_services/hmg_services_view_model.dart
+++ b/lib/features/hmg_services/hmg_services_view_model.dart
@@ -895,37 +895,59 @@ class HmgServicesViewModel extends ChangeNotifier {
Future getPatientVitalSign({
Function(dynamic)? onSuccess,
Function(String)? onError,
+ num? transNo,
+ int? projectID,
+ bool forceRefresh = false,
}) async {
- if (hasVitalSignDataLoaded) return;
- isVitalSignLoading = true;
- notifyListeners();
+ final bool isSpecificQuery = (transNo != null || projectID != null);
+
+ if (!isSpecificQuery && hasVitalSignDataLoaded && !forceRefresh) {
+ if (onSuccess != null) {
+ onSuccess(GenericApiModel>(
+ messageStatus: 1,
+ data: vitalSignList,
+ ));
+ }
+ return;
+ }
- final result = await hmgServicesRepo.getPatientVitalSign();
+ if (!isSpecificQuery) {
+ isVitalSignLoading = true;
+ notifyListeners();
+ }
+
+ final result = await hmgServicesRepo.getPatientVitalSign(transNo, projectID);
result.fold(
(failure) async {
- isVitalSignLoading = false;
- notifyListeners();
+ if (!isSpecificQuery) {
+ isVitalSignLoading = false;
+ notifyListeners();
+ }
await errorHandlerService.handleError(failure: failure);
if (onError != null) {
onError(failure.message);
}
},
(apiResponse) {
- isVitalSignLoading = false;
- if (apiResponse.messageStatus == 1) {
- vitalSignList = apiResponse.data ?? [];
- hasVitalSignDataLoaded = true;
- if (vitalSignList.isNotEmpty) {
- getIt.get().setSelectedHeight(vitalSignList.first.heightCm);
- getIt.get().setSelectedWeight(vitalSignList.first.weightKg);
+ if (!isSpecificQuery) {
+ isVitalSignLoading = false;
+ if (apiResponse.messageStatus == 1) {
+ vitalSignList = apiResponse.data ?? [];
+ hasVitalSignDataLoaded = true;
+ if (vitalSignList.isNotEmpty) {
+ getIt.get().setSelectedHeight(vitalSignList.first.heightCm);
+ getIt.get().setSelectedWeight(vitalSignList.first.weightKg);
+ }
}
notifyListeners();
+ }
+
+ if (apiResponse.messageStatus == 1) {
if (onSuccess != null) {
onSuccess(apiResponse);
}
} else {
- notifyListeners();
if (onError != null) {
onError(apiResponse.errorMessage ?? 'Unknown error');
}
diff --git a/lib/features/immediate_livecare/immediate_livecare_repo.dart b/lib/features/immediate_livecare/immediate_livecare_repo.dart
index 6726a09b..e07d6293 100644
--- a/lib/features/immediate_livecare/immediate_livecare_repo.dart
+++ b/lib/features/immediate_livecare/immediate_livecare_repo.dart
@@ -101,9 +101,7 @@ class ImmediateLiveCareRepoImp implements ImmediateLiveCareRepo {
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final respObject = response['GetERAppointmentFeesList'];
-
final liveCareFeesObj = LiveCareImmediateAppointmentFeesList.fromJson(respObject);
-
apiResponse = GenericApiModel(
messageStatus: messageStatus,
statusCode: statusCode,
diff --git a/lib/features/immediate_livecare/immediate_livecare_view_model.dart b/lib/features/immediate_livecare/immediate_livecare_view_model.dart
index e02b8c61..a51c2319 100644
--- a/lib/features/immediate_livecare/immediate_livecare_view_model.dart
+++ b/lib/features/immediate_livecare/immediate_livecare_view_model.dart
@@ -61,11 +61,14 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
bool isShowNotEligibleDialog = false;
String notEligibleErrorMsg = "";
+ bool isTermsAccepted = false;
+
initImmediateLiveCare() {
_appState = getIt();
immediateLiveCareClinicsList = [];
mainLiveCareClinicList = [];
isImmediateLiveCareClinicsLoading = true;
+ isTermsAccepted = false;
liveCareSelectedCallType = 0; // 1- Video, 2- Audio, 3- Phone
selectedConsultationLanguage = 0;
immediateLiveCareSelectedClinic = GetLiveCareClinicListResponseModel();
@@ -73,6 +76,12 @@ class ImmediateLiveCareViewModel extends ChangeNotifier {
notifyListeners();
}
+
+ onTermsAccepted() {
+ isTermsAccepted = !isTermsAccepted;
+ notifyListeners();
+ }
+
setLiveCareSelectedCallType(int value) {
liveCareSelectedCallType = value;
notifyListeners();
diff --git a/lib/features/insurance/insurance_repo.dart b/lib/features/insurance/insurance_repo.dart
index 2719035b..0a0ee0be 100644
--- a/lib/features/insurance/insurance_repo.dart
+++ b/lib/features/insurance/insurance_repo.dart
@@ -11,7 +11,7 @@ import 'package:hmg_patient_app_new/features/insurance/models/resp_models/upload
import 'package:hmg_patient_app_new/services/logger_service.dart';
abstract class InsuranceRepo {
- Future>>> getPatientInsuranceDetails();
+ Future>>> getPatientInsuranceDetails({bool isFromHomePage = false});
Future>>> getPatientInsuranceCardHistory();
@@ -35,8 +35,10 @@ class InsuranceRepoImp implements InsuranceRepo {
InsuranceRepoImp({required this.loggerService, required this.apiClient});
@override
- Future>>> getPatientInsuranceDetails() async {
- Map mapDevice = {};
+ Future>>> getPatientInsuranceDetails({bool isFromHomePage = false}) async {
+ Map mapDevice = {
+ "IsFromHomePage": isFromHomePage
+ };
try {
GenericApiModel>? apiResponse;
diff --git a/lib/features/insurance/insurance_view_model.dart b/lib/features/insurance/insurance_view_model.dart
index 621ebe4c..caeba030 100644
--- a/lib/features/insurance/insurance_view_model.dart
+++ b/lib/features/insurance/insurance_view_model.dart
@@ -32,15 +32,11 @@ class InsuranceViewModel extends ChangeNotifier {
InsuranceViewModel({required this.insuranceRepo, required this.errorHandlerService});
- initInsuranceProvider() {
- debugPrint("InsuranceViewModel: initInsuranceProvider called, isInsuranceDataToBeLoaded=$isInsuranceDataToBeLoaded");
+ initInsuranceProvider({bool isFromHomePage = false}) {
if (isInsuranceDataToBeLoaded) {
patientInsuranceList.clear();
isInsuranceLoading = true;
- debugPrint("InsuranceViewModel: Calling getPatientInsuranceDetails API");
- getPatientInsuranceDetails();
- } else {
- debugPrint("InsuranceViewModel: Skipping API call, isInsuranceDataToBeLoaded is false");
+ getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
}
patientInsuranceCardHistoryList.clear();
isInsuranceHistoryLoading = true;
@@ -80,19 +76,16 @@ class InsuranceViewModel extends ChangeNotifier {
notifyListeners();
}
- Future getPatientInsuranceDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ Future getPatientInsuranceDetails({bool isFromHomePage = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isInsuranceDataToBeLoaded) {
- debugPrint("InsuranceViewModel: getPatientInsuranceDetails - skipping, flag is false");
return;
}
- debugPrint("InsuranceViewModel: getPatientInsuranceDetails - making API call");
- final result = await insuranceRepo.getPatientInsuranceDetails();
+ final result = await insuranceRepo.getPatientInsuranceDetails(isFromHomePage: isFromHomePage);
result.fold(
// (failure) async => await errorHandlerService.handleError(failure: failure),
(failure) async {
- debugPrint("InsuranceViewModel: API call failed - ${failure.toString()}");
isInsuranceLoading = false;
isInsuranceDataToBeLoaded = true;
isInsuranceExpired = false;
@@ -102,11 +95,9 @@ class InsuranceViewModel extends ChangeNotifier {
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
- debugPrint("InsuranceViewModel: API returned error status");
isInsuranceDataToBeLoaded = false;
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
- debugPrint("InsuranceViewModel: API success - received ${apiResponse.data?.length ?? 0} insurance records");
patientInsuranceList = apiResponse.data!;
isInsuranceLoading = false;
isInsuranceDataToBeLoaded = false;
@@ -115,7 +106,6 @@ class InsuranceViewModel extends ChangeNotifier {
isInsuranceExpired = DateTime.now().isAfter(
DateUtil.convertStringToDate(patientInsuranceList.first.cardValidTo),
);
- debugPrint("InsuranceViewModel: Insurance card expired: $isInsuranceExpired");
}
isInsuranceExpiryBannerShown = isInsuranceExpired;
diff --git a/lib/features/medical_file/medical_file_view_model.dart b/lib/features/medical_file/medical_file_view_model.dart
index e0abd9d7..29f653ec 100644
--- a/lib/features/medical_file/medical_file_view_model.dart
+++ b/lib/features/medical_file/medical_file_view_model.dart
@@ -29,7 +29,11 @@ class MedicalFileViewModel extends ChangeNotifier {
bool isPatientSickLeavePDFLoading = false;
bool isPatientMedicalReportsListLoading = false;
bool isPatientAllergiesListLoading = false;
+ bool _isFamilyFilesLoading = false;
+ bool get isFamilyFilesLoading => _isFamilyFilesLoading;
+
+ set setIsFamilyFilesLoading(bool value) => _isFamilyFilesLoading = value;
MedicalFileRepo medicalFileRepo;
ErrorHandlerService errorHandlerService;
@@ -41,7 +45,6 @@ class MedicalFileViewModel extends ChangeNotifier {
List patientSickLeavesViewList = [];
bool isSickLeavesSortByClinic = true;
-
bool isSickLeavesDataNeedsReloading = true;
List patientAllergiesList = [];
@@ -57,6 +60,7 @@ class MedicalFileViewModel extends ChangeNotifier {
List patientMedicalReportsViewList = [];
bool isMedicalReportsSortByClinic = true;
+ bool isMedicalReportsDataNeedsReloading = true;
List patientMedicalReportAppointmentHistoryList = [];
PatientAppointmentHistoryResponseModel? patientMedicalReportSelectedAppointment;
@@ -164,6 +168,16 @@ class MedicalFileViewModel extends ChangeNotifier {
notifyListeners();
}
+ setIsSickLeavesDataNeedsReloading(bool value) {
+ isSickLeavesDataNeedsReloading = value;
+ notifyListeners();
+ }
+
+ setIsMedicalReportsDataNeedsReloading(bool value) {
+ isMedicalReportsDataNeedsReloading = value;
+ notifyListeners();
+ }
+
setIsPatientSickLeaveListLoading(bool val) {
if (val && isSickLeavesDataNeedsReloading) {
patientSickLeaveList.clear();
@@ -188,7 +202,7 @@ class MedicalFileViewModel extends ChangeNotifier {
}
setIsPatientMedicalReportsLoading(bool val) {
- if (val) {
+ if (val && isMedicalReportsDataNeedsReloading) {
onMedicalReportTabChange(0);
patientMedicalReportList.clear();
patientMedicalReportsByClinic.clear();
@@ -196,8 +210,8 @@ class MedicalFileViewModel extends ChangeNotifier {
patientMedicalReportsViewList.clear();
patientMedicalReportPDFBase64 = "";
isMedicalReportsSortByClinic = true;
+ isPatientMedicalReportsListLoading = val;
}
- isPatientMedicalReportsListLoading = val;
notifyListeners();
}
@@ -369,6 +383,10 @@ class MedicalFileViewModel extends ChangeNotifier {
}
Future getPatientMedicalReportList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ if (!isMedicalReportsDataNeedsReloading) {
+ return;
+ }
+
patientMedicalReportList.clear();
patientMedicalReportRequestedList.clear();
patientMedicalReportReadyList.clear();
@@ -381,6 +399,7 @@ class MedicalFileViewModel extends ChangeNotifier {
(failure) async => await errorHandlerService.handleError(
failure: failure,
onOkPressed: () {
+ isMedicalReportsDataNeedsReloading = true;
onError!(failure.message);
},
),
@@ -396,6 +415,7 @@ class MedicalFileViewModel extends ChangeNotifier {
}
onMedicalReportTabChange(0);
isPatientMedicalReportsListLoading = false;
+ isMedicalReportsDataNeedsReloading = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -431,21 +451,42 @@ class MedicalFileViewModel extends ChangeNotifier {
}
Future getFamilyFiles({int? status, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+
+ setIsFamilyFilesLoading = true;
+
+ final shouldShowLoader = patientFamilyFiles.isEmpty;
+ if (shouldShowLoader) {
+ LoaderBottomSheet.showLoader();
+ }
+
final result = await medicalFileRepo.getPatientFamilyFiles(status, _appState.getSuperUserID != null ? _appState.getSuperUserID! : _appState.getAuthenticatedUser()!.patientId!);
result.fold(
- (failure) async => await errorHandlerService.handleError(
- failure: failure,
- onOkPressed: () {
- onError!(failure.message);
- },
- ),
+ (failure) async {
+
+ setIsFamilyFilesLoading = false;
+
+ await errorHandlerService.handleError(
+ failure: failure,
+ onOkPressed: () {
+ if (shouldShowLoader) {
+ LoaderBottomSheet.hideLoader();
+ }
+ onError!(failure.message);
+ },
+ );
+ },
(apiResponse) {
if (apiResponse.messageStatus == 2) {
+
+ setIsFamilyFilesLoading = false;
+
// _dialogService.showErrorBottomSheet(message: apiResponse.errorMessage!, onOkPressed: () {});
+ if (shouldShowLoader) {
+ LoaderBottomSheet.hideLoader();
+ }
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data != null) {
- // Add current user as the first active family file
final currentUser = _appState.getAuthenticatedUser()!;
final currentUserFamilyFile = FamilyFileResponseModelLists(
patientId: currentUser.patientId,
@@ -525,6 +566,12 @@ class MedicalFileViewModel extends ChangeNotifier {
pendingFamilyFiles = newPendingFamilyFiles;
}
+ // Clear loading state on success
+ setIsFamilyFilesLoading = false;
+
+ if (shouldShowLoader) {
+ LoaderBottomSheet.hideLoader();
+ }
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -662,13 +709,10 @@ class MedicalFileViewModel extends ChangeNotifier {
}
Future handleFamilyFileRequestOTPVerification() async {
- LoaderBottomSheet.showLoader();
if (!_appState.getIsChildLoggedIn) {
await getFamilyFiles(status: 0);
await getAllPendingRecordsByResponseId();
}
-
- LoaderBottomSheet.hideLoader();
}
Future removeFileFromFamilyMembers({int? id}) async {
diff --git a/lib/features/my_appointments/appointment_via_region_viewmodel.dart b/lib/features/my_appointments/appointment_via_region_viewmodel.dart
index 1144be82..bb4179e1 100644
--- a/lib/features/my_appointments/appointment_via_region_viewmodel.dart
+++ b/lib/features/my_appointments/appointment_via_region_viewmodel.dart
@@ -161,6 +161,20 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
page: DentalChiefComplaintsPage(),
),
);
+ } else {
+ if (appState.getAuthenticatedUser()!.age! > 12) {
+ navigationService.push(
+ CustomPageRoute(
+ page: DentalChiefComplaintsPage(),
+ ),
+ );
+ } else {
+ navigationService.push(
+ CustomPageRoute(
+ page: SelectDoctorPage(),
+ ),
+ );
+ }
}
}
if (clinicId == 253) {
diff --git a/lib/features/my_appointments/my_appointments_repo.dart b/lib/features/my_appointments/my_appointments_repo.dart
index 0ee8d7e3..87fb2ec2 100644
--- a/lib/features/my_appointments/my_appointments_repo.dart
+++ b/lib/features/my_appointments/my_appointments_repo.dart
@@ -25,7 +25,7 @@ import 'models/resp_models/appointment_details_resp_model.dart';
abstract class MyAppointmentsRepo {
Future>>> getPatientAppointments(
- {required bool isActiveAppointment, required bool isArrivedAppointments, bool isForEyeMeasurement = false});
+ {required bool isActiveAppointment, required bool isArrivedAppointments, bool isForEyeMeasurement = false, bool isForTimeLine = false});
Future>> getPatientShareAppointment(
{required int projectID, required int clinicID, required String appointmentNo, required bool isLiveCareAppointment});
@@ -105,14 +105,15 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
@override
Future>>> getPatientAppointments(
- {required bool isActiveAppointment, required bool isArrivedAppointments, bool isForEyeMeasurement = false}) async {
+ {required bool isActiveAppointment, required bool isArrivedAppointments, bool isForEyeMeasurement = false, bool isForTimeLine = false}) async {
Map mapDevice = {
"IsActiveAppointment": isActiveAppointment,
"IsComingFromCOC": false,
"isForUpcomming": false,
"IsForMedicalReport": false,
"IsForArrived": isArrivedAppointments,
- "IsIrisPrescription": isForEyeMeasurement
+ "IsIrisPrescription": isForEyeMeasurement,
+ "IsForTimeLine": isForTimeLine
};
try {
@@ -172,9 +173,9 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
try {
final list = response['OnlineCheckInAppointments'];
patientShareObj = (list == null || list.isEmpty) ? PatientAppointmentShareResponseModel() : PatientAppointmentShareResponseModel.fromJson(list[0]);
- patientShareObj.isCash = list[0]["IsCash"];
- patientShareObj.isEligible = list[0]["IsEligible"];
- patientShareObj.isInsured = list[0]["IsInsured"];
+ patientShareObj.isCash = isLiveCareAppointment ? list[0]["IsCash"] : response["IsCash"];
+ patientShareObj.isEligible = isLiveCareAppointment ? list[0]["IsEligible"] : response["IsEligible"];
+ patientShareObj.isInsured = isLiveCareAppointment ? list[0]["IsInsured"] : response["IsInsured"];
// if (list == null || list.isEmpty) {
// throw Exception("patient share list is empty");
diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart
index b480a354..b153c556 100644
--- a/lib/features/my_appointments/my_appointments_view_model.dart
+++ b/lib/features/my_appointments/my_appointments_view_model.dart
@@ -55,6 +55,8 @@ class MyAppointmentsViewModel extends ChangeNotifier {
bool isAppointmentDataToBeLoaded = true;
bool isMyDoctorsDataToBeLoaded = true;
+ bool isArrivedAppointmentDataLoaded = false;
+ bool isFullArrivedAppointmentsLoaded = false;
bool isEyeMeasurementsAppointmentsLoading = false;
@@ -76,7 +78,7 @@ class MyAppointmentsViewModel extends ChangeNotifier {
List patientUpcomingAppointmentsHistoryList = [];
List patientArrivedAppointmentsHistoryList = [];
- List patientTimelineAppointmentsList = [];
+ // List patientAllArrivedAppointmentsHistoryList = [];
List patientMyDoctorsList = [];
@@ -172,11 +174,12 @@ class MyAppointmentsViewModel extends ChangeNotifier {
patientAppointmentsHistoryList.clear();
patientUpcomingAppointmentsHistoryList.clear();
patientArrivedAppointmentsHistoryList.clear();
- patientTimelineAppointmentsList.clear();
+ // patientAllArrivedAppointmentsHistoryList.clear();
patientEyeMeasurementsAppointmentsHistoryList.clear();
isMyAppointmentsLoading = true;
isTimeLineAppointmentsLoading = true;
patientMyDoctorsList.clear();
+ isFullArrivedAppointmentsLoaded = false;
}
isTamaraDetailsLoading = true;
isAppointmentPatientShareLoading = true;
@@ -266,7 +269,7 @@ class MyAppointmentsViewModel extends ChangeNotifier {
);
}
- Future getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ Future getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {bool isForTimeLine = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (patientArrivedAppointmentsHistoryList.isNotEmpty) {
isPatientHasQueueAppointment = false;
notifyListeners();
@@ -275,15 +278,19 @@ class MyAppointmentsViewModel extends ChangeNotifier {
getPatientAppointmentQueueDetails();
}
}
- if (!isAppointmentDataToBeLoaded) return;
- debugPrint('getPatientAppointments CALLED!!!');
+ // Skip API call if full data is already loaded and we're not requesting timeline view
+ if (!isForTimeLine && isFullArrivedAppointmentsLoaded && !isAppointmentDataToBeLoaded) {
+ return;
+ }
+
+ if (!isAppointmentDataToBeLoaded) return;
patientAppointmentsByClinic.clear();
patientAppointmentsByHospital.clear();
patientAppointmentsViewList.clear();
- patientTimelineAppointmentsList.clear();
+ // patientAllArrivedAppointmentsHistoryList.clear();
filteredAppointmentList.clear();
patientAppointmentsHistoryList.clear();
patientUpcomingAppointmentsHistoryList.clear();
@@ -292,7 +299,7 @@ class MyAppointmentsViewModel extends ChangeNotifier {
final results = await Future.wait([
myAppointmentsRepo.getPatientAppointments(isActiveAppointment: isActiveAppointment, isArrivedAppointments: isArrivedAppointments),
- myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true),
+ myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true, isForTimeLine: isForTimeLine),
]);
results[0].fold(
@@ -321,6 +328,11 @@ class MyAppointmentsViewModel extends ChangeNotifier {
patientArrivedAppointmentsHistoryList = apiResponse.data!;
isMyAppointmentsLoading = false;
isAppointmentDataToBeLoaded = false;
+ if (!isForTimeLine) {
+ // patientAllArrivedAppointmentsHistoryList = apiResponse.data!;
+ isArrivedAppointmentDataLoaded = true;
+ isFullArrivedAppointmentsLoaded = true;
+ }
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -347,13 +359,73 @@ class MyAppointmentsViewModel extends ChangeNotifier {
}
// }
- debugPrint('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}');
- debugPrint('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}');
- debugPrint('All Appointments: ${patientAppointmentsHistoryList.length}');
getFiltersForSelectedAppointmentList(filteredAppointmentList);
notifyListeners();
}
+ changeTabToArrived() {
+ if (isFullArrivedAppointmentsLoaded && patientUpcomingAppointmentsHistoryList.isEmpty && patientArrivedAppointmentsHistoryList.isNotEmpty && selectedTabIndex == 0) {
+ selectedTabIndex = 1;
+ updateListWRTTab(1);
+ notifyListeners();
+ }
+ }
+
+ /// Loads full arrived appointments list if not already loaded
+ /// This is called when navigating to My Appointments page from landing page
+ Future loadFullArrivedAppointmentsIfNeeded({Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ // Skip if already loaded
+ if (isFullArrivedAppointmentsLoaded) {
+ // Auto-switch to Arrived tab if no upcoming appointments (even when data is already loaded)
+ if (patientUpcomingAppointmentsHistoryList.isEmpty && patientArrivedAppointmentsHistoryList.isNotEmpty && selectedTabIndex == 0) {
+ selectedTabIndex = 1;
+ updateListWRTTab(1);
+ notifyListeners();
+ }
+ return;
+ }
+
+ setIsAppointmentsHistoryLoading(true);
+
+ // Fetch full arrived appointments (isForTimeLine = false)
+ final result = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true, isForTimeLine: false);
+
+ result.fold(
+ (failure) async => await errorHandlerService.handleError(failure: failure),
+ (apiResponse) {
+ if (apiResponse.messageStatus == 2) {
+ // Handle error
+ } else if (apiResponse.messageStatus == 1) {
+ patientArrivedAppointmentsHistoryList = apiResponse.data!;
+ // patientAllArrivedAppointmentsHistoryList = apiResponse.data!;
+ isArrivedAppointmentDataLoaded = true;
+ isFullArrivedAppointmentsLoaded = true;
+
+ // Rebuild the combined list
+ patientAppointmentsHistoryList.clear();
+ patientAppointmentsHistoryList.addAll(patientUpcomingAppointmentsHistoryList);
+ patientAppointmentsHistoryList.addAll(patientArrivedAppointmentsHistoryList);
+
+ isMyAppointmentsLoading = false;
+
+ // Auto-switch to Arrived tab if no upcoming appointments
+ if (patientUpcomingAppointmentsHistoryList.isEmpty && patientArrivedAppointmentsHistoryList.isNotEmpty && selectedTabIndex == 0) {
+ selectedTabIndex = 1;
+ updateListWRTTab(1);
+ } else {
+ // Update filtered list based on current tab
+ updateListWRTTab(selectedTabIndex);
+ }
+
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
void getFiltersForSelectedAppointmentList(List filteredAppointmentList) {
availableFilters.clear();
if (filteredAppointmentList.isEmpty == true) return;
@@ -362,9 +434,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
availableFilters.add(AppointmentListingFilters.LIVECARE);
}
- if (filteredAppointmentList.any((element) => element.isLiveCareAppointment == false)) {
- availableFilters.add(AppointmentListingFilters.WALKIN);
- }
+ // if (filteredAppointmentList.any((element) => element.isLiveCareAppointment == false)) {
+ // availableFilters.add(AppointmentListingFilters.WALKIN);
+ // }
if (filteredAppointmentList.any((element) => AppointmentType.isArrived(element) == true)) {
availableFilters.add(AppointmentListingFilters.ARRIVED);
@@ -699,7 +771,11 @@ class MyAppointmentsViewModel extends ChangeNotifier {
} else if (apiResponse.messageStatus == 1) {
patientMyDoctorsList = apiResponse.data!;
isPatientMyDoctorsLoading = false;
- isMyDoctorsDataToBeLoaded = false;
+
+ if (!isTop8) {
+ isMyDoctorsDataToBeLoaded = false;
+ }
+
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
@@ -801,15 +877,15 @@ class MyAppointmentsViewModel extends ChangeNotifier {
selectedFilter = [];
// if(previouslySelectedTab == selectedTabIndex ) return;
switch (index) {
+ // case 0:
+ // filteredAppointmentList.clear();
+ // filteredAppointmentList.addAll(patientAppointmentsHistoryList);
+ // break;
case 0:
- filteredAppointmentList.clear();
- filteredAppointmentList.addAll(patientAppointmentsHistoryList);
- break;
- case 1:
filteredAppointmentList.clear();
filteredAppointmentList.addAll(patientUpcomingAppointmentsHistoryList);
break;
- case 2:
+ case 1:
filteredAppointmentList.clear();
filteredAppointmentList.addAll(patientArrivedAppointmentsHistoryList);
break;
@@ -835,11 +911,12 @@ class MyAppointmentsViewModel extends ChangeNotifier {
this.end = end;
isDateFilterSelected = true;
List sourceList = [];
- if (selectedTabIndex == 0) {
- sourceList = patientAppointmentsHistoryList;
- } else if (selectedTabIndex == 1) {
+ // if (selectedTabIndex == 0) {
+ // sourceList = patientAppointmentsHistoryList;
+ // } else
+ if (selectedTabIndex == 0) {
sourceList = patientUpcomingAppointmentsHistoryList;
- } else if (selectedTabIndex == 2) {
+ } else if (selectedTabIndex == 1) {
sourceList = patientArrivedAppointmentsHistoryList;
}
// if (isDateFilterSelected) sourceList = filteredAppointmentList;
@@ -1299,7 +1376,6 @@ class MyAppointmentsViewModel extends ChangeNotifier {
);
} catch (e) {
// Ignore errors if reminder doesn't exist
- debugPrint("No existing ${type.displayName} to remove");
}
}
}
diff --git a/lib/features/payfort/payfort_repo.dart b/lib/features/payfort/payfort_repo.dart
index 3cd27a9d..6826478c 100644
--- a/lib/features/payfort/payfort_repo.dart
+++ b/lib/features/payfort/payfort_repo.dart
@@ -3,6 +3,7 @@ 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/common_models/tamara_request_model.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/get_tamara_installments_details_response_model.dart';
import 'package:hmg_patient_app_new/features/payfort/models/apple_pay_request_insert_model.dart';
@@ -34,6 +35,8 @@ abstract class PayfortRepo {
Future>> payfortRequestInsert({required PayfortRequestInsertModel payfortRequestInsertModel});
Future>> payfortResponseInsert({required PayfortResponseInsertModel payfortResponseInsertModel});
+
+ Future>> tamaraRequestInsert({required TamaraRequestModel tamaraRequestModel});
}
class PayfortRepoImp implements PayfortRepo {
@@ -55,7 +58,7 @@ class PayfortRepoImp implements PayfortRepo {
try {
final list = response;
if (list == null || list.isEmpty) {
- throw Exception("payfort list is empty");
+ throw Exception("No project configuration found.");
}
final applePayConfigurationResponse = PayfortProjectDetailsRespModel.fromJson(list[0]);
@@ -350,4 +353,31 @@ class PayfortRepoImp implements PayfortRepo {
return Left(UnknownFailure(e.toString()));
}
}
+
+ @override
+ Future> tamaraRequestInsert({required TamaraRequestModel tamaraRequestModel}) async {
+ try {
+ GenericApiModel? apiResponse;
+ Failure? failure;
+ await apiClient.post(TAMARA_REQUEST_INSERT, body: tamaraRequestModel.toJson(), onFailure: (error, statusCode, {messageStatus, failureType}) {
+ failure = failureType;
+ }, onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
+ try {
+ apiResponse = GenericApiModel(
+ messageStatus: messageStatus,
+ statusCode: statusCode,
+ errorMessage: null,
+ data: response,
+ );
+ } catch (e) {
+ failure = DataParsingFailure(e.toString());
+ }
+ }, isAllowAny: true, isPaymentServices: true);
+ if (failure != null) return Left(failure!);
+ if (apiResponse == null) return Left(ServerFailure("Unknown error"));
+ return Right(apiResponse!);
+ } catch (e) {
+ return Left(UnknownFailure(e.toString()));
+ }
+ }
}
diff --git a/lib/features/payfort/payfort_view_model.dart b/lib/features/payfort/payfort_view_model.dart
index f567264f..c4f96857 100644
--- a/lib/features/payfort/payfort_view_model.dart
+++ b/lib/features/payfort/payfort_view_model.dart
@@ -9,6 +9,7 @@ import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/cache_consts.dart';
+import 'package:hmg_patient_app_new/core/common_models/tamara_request_model.dart';
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/features/my_appointments/models/resp_models/get_tamara_installments_details_response_model.dart';
@@ -116,6 +117,25 @@ class PayfortViewModel extends ChangeNotifier {
);
}
+ Future tamaraRequestInsert({required TamaraRequestModel tamaraRequestModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await payfortRepo.tamaraRequestInsert(tamaraRequestModel: tamaraRequestModel);
+
+ 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) {
+ // payfortProjectDetailsRespModel = apiResponse.data!;
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
Future payfortResponseInsert({required PayfortResponseInsertModel payfortResponseInsertModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await payfortRepo.payfortResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel);
@@ -398,7 +418,7 @@ class PayfortViewModel extends ChangeNotifier {
payfortRequestInsertModel.sHAResponsePhase = payfortProjectDetailsRespModel!.shaResponse;
payfortRequestInsertModel.signature = sdkTokenResponse!.signature;
payfortRequestInsertModel.language = getIt.get().isArabic() ? "ar" : "en";
- payfortRequestInsertModel.integrationId = "1";
+ payfortRequestInsertModel.integrationId = "1"; // Payfort integration ID
payfortRequestInsertModel.isSchedule = isScheduleLiveCare;
payfortRequestInsertModel.appointmentDate = appointmentDate;
payfortRequestInsertModel.appointmentNo = appointmentNo;
diff --git a/lib/features/paytabs/paytabs_view_model.dart b/lib/features/paytabs/paytabs_view_model.dart
index 35a924af..35d3c85b 100644
--- a/lib/features/paytabs/paytabs_view_model.dart
+++ b/lib/features/paytabs/paytabs_view_model.dart
@@ -11,26 +11,53 @@ import 'package:flutter_paytabs_bridge/PaymentSdkTransactionType.dart';
import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
+import 'package:hmg_patient_app_new/core/cache_consts.dart';
+import 'package:hmg_patient_app_new/core/common_models/tamara_request_model.dart';
+import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/paytabs_config.dart';
+import 'package:hmg_patient_app_new/core/utils/utils.dart';
+import 'package:hmg_patient_app_new/features/payfort/models/payfort_project_details_resp_model.dart';
+import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/paytabs/models/paytabs_transaction_response_model.dart';
+import 'package:hmg_patient_app_new/features/payfort/models/payfort_request_insert_model.dart';
+import 'package:hmg_patient_app_new/features/payfort/models/payfort_response_insert_model.dart';
+import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart';
+import 'package:hmg_patient_app_new/services/error_handler_service.dart';
+import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
class PayTabsViewModel extends ChangeNotifier {
late PaymentSdkConfigurationDetails paymentConfiguration;
final AppState appState;
+ final PayfortRepo payfortRepo;
+ final ErrorHandlerService errorHandlerService;
late PaytabsTransactionResponseModel paytabsTransactionResponseModel;
+ PayfortProjectDetailsRespModel? paytabsProjectDetailsRespModel;
+
PayTabsViewModel({
required this.appState,
+ required this.payfortRepo,
+ required this.errorHandlerService,
});
- setPaymentConfiguration(String paymentDescription, num amount, {bool isAddCard = false}) {
+ setPaymentConfiguration(String paymentDescription, num amount, int serviceID, int projectID, {bool isAddCard = false}) async {
String cartID = DateTime.now().millisecondsSinceEpoch.toString();
+
+ LoaderBottomSheet.showLoader();
+
+ await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID);
+
paymentConfiguration = PaymentSdkConfigurationDetails(
- profileId: PaymentSdkDefaultConfig.profileID,
- serverKey: PaymentSdkDefaultConfig.serverKey,
- clientKey: PaymentSdkDefaultConfig.clientKey,
- transactionType: PaymentSdkTransactionType.SALE,
+ profileId: paytabsProjectDetailsRespModel!.merchantIdentifier,
+ serverKey: paytabsProjectDetailsRespModel!.accessCode,
+ clientKey: paytabsProjectDetailsRespModel!.shaResponse,
+
+ // profileId: PaymentSdkDefaultConfig.profileID,
+ // serverKey: PaymentSdkDefaultConfig.serverKey,
+ // clientKey: PaymentSdkDefaultConfig.clientKey,
+
+ transactionType: PaymentSdkTransactionType.SALE,
cartId: cartID.substring((cartID.length - 5), cartID.length),
cartDescription: paymentDescription,
merchantName: PaymentSdkDefaultConfig.defaultMerchantName,
@@ -43,7 +70,8 @@ class PayTabsViewModel extends ChangeNotifier {
amount: amount.toDouble(),
showBillingInfo: false,
forceShippingInfo: false,
- currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
+ // currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
+ currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED",
merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode,
billingDetails: BillingDetails(
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient",
@@ -97,12 +125,17 @@ class PayTabsViewModel extends ChangeNotifier {
notifyListeners();
}
- setAlternatePaymentConfiguration(String paymentDescription, num amount, {bool isAddCard = false}) {
+ setAlternatePaymentConfiguration(String paymentDescription, num amount, int serviceID, int projectID, {bool isAddCard = false}) async {
String cartID = DateTime.now().millisecondsSinceEpoch.toString();
+
+ LoaderBottomSheet.showLoader();
+
+ await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID);
+
paymentConfiguration = PaymentSdkConfigurationDetails(
- profileId: PaymentSdkDefaultConfig.profileID,
- serverKey: PaymentSdkDefaultConfig.serverKey,
- clientKey: PaymentSdkDefaultConfig.clientKey,
+ profileId: paytabsProjectDetailsRespModel!.merchantIdentifier,
+ serverKey: paytabsProjectDetailsRespModel!.accessCode,
+ clientKey: paytabsProjectDetailsRespModel!.shaResponse,
transactionType: PaymentSdkTransactionType.SALE,
cartId: cartID.substring((cartID.length - 5), cartID.length),
cartDescription: paymentDescription,
@@ -112,7 +145,8 @@ class PayTabsViewModel extends ChangeNotifier {
amount: amount.toDouble(),
showBillingInfo: false,
forceShippingInfo: false,
- currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
+ // currencyCode: PaymentSdkDefaultConfig.defaultCurrency,
+ currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED",
merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode,
billingDetails: BillingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient",
"CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"),
@@ -152,6 +186,42 @@ class PayTabsViewModel extends ChangeNotifier {
notifyListeners();
}
+ Future paytabsRequestInsert({required PayfortRequestInsertModel payfortRequestInsertModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await payfortRepo.payfortRequestInsert(payfortRequestInsertModel: payfortRequestInsertModel);
+
+ 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) {
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
+ Future paytabsResponseInsert({required PayfortResponseInsertModel payfortResponseInsertModel, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await payfortRepo.payfortResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel);
+
+ 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) {
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
startApplePayPayment({Function(PaytabsTransactionResponseModel)? onSuccess, Function(String)? onError}) async {
bool _callbackFired = false; // prevent duplicate callback invocations
@@ -189,44 +259,180 @@ class PayTabsViewModel extends ChangeNotifier {
});
}
- startCardPayment({Function(PaytabsTransactionResponseModel)? onSuccess, Function(String)? onError}) {
+ startCardPayment({
+ required String paymentOption,
+ required String liveServiceID,
+ required String isScheduleLiveCare,
+ required String appointmentDate,
+ required String appointmentNo,
+ required String doctorID,
+ required String transactionID,
+ required String amount,
+ required String fileNumber,
+ required String orderDescription,
+ required String serviceID,
+ required String projectID,
+ Function(PaytabsTransactionResponseModel)? onSuccess,
+ Function(String)? onError,
+ }) async {
bool _callbackFired = false; // prevent duplicate callback invocations
- FlutterPaytabsBridge.startCardPayment(paymentConfiguration, (event) {
- if (_callbackFired) return; // ignore any subsequent callback calls
+ try {
+ // LoaderBottomSheet.showLoader();
- final transactionDetails = event["data"] as Map