Binrushd-Medical-Center commited on
Commit
656dd4f
·
verified ·
1 Parent(s): 73ee396

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +95 -1
main.py CHANGED
@@ -1,5 +1,5 @@
1
  # main.py
2
- from fastapi import FastAPI, Form, HTTPException, Depends, Header, Form
3
  from fastapi.security import OAuth2PasswordBearer
4
  from pydantic import BaseModel, EmailStr
5
  import typing
@@ -1677,3 +1677,97 @@ def favorites_by_contact(
1677
 
1678
  rows = supa_select("favorites", params)
1679
  return {"message": "Favorites fetched successfully", "count": len(rows), "data": rows}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # main.py
2
+ from fastapi import FastAPI, Form, HTTPException, Depends, Header, Form, Query
3
  from fastapi.security import OAuth2PasswordBearer
4
  from pydantic import BaseModel, EmailStr
5
  import typing
 
1677
 
1678
  rows = supa_select("favorites", params)
1679
  return {"message": "Favorites fetched successfully", "count": len(rows), "data": rows}
1680
+
1681
+ # ====== Terms AR/EN ======
1682
+ TERMS_AR = """
1683
+ مقدمة
1684
+ مرحبًا بك في تطبيق Binrushd Medical Center، التطبيق الرسمي لمركز بن رشد التخصصي للعيون. باستخدامك لهذا التطبيق، فإنك توافق على الشروط والأحكام التالية، لذا يُرجى قراءتها بعناية قبل الاستخدام.
1685
+
1686
+ 1. الهدف من التطبيق
1687
+ يتيح التطبيق للمستخدمين:
1688
+
1689
+ التعرف على خدمات المركز وأقسامه الطبية.
1690
+
1691
+ استعراض معلومات الأطباء والمواعيد المتاحة.
1692
+
1693
+ حجز المواعيد وإرسال طلبات الحجز إلكترونيًا.
1694
+
1695
+ 2. الاستخدام المسموح
1696
+
1697
+ يلتزم المستخدم باستخدام التطبيق لأغراض شخصية فقط.
1698
+
1699
+ يُمنع استخدام التطبيق لأي غرض تجاري أو دعائي أو غير قانوني.
1700
+
1701
+ يجب تقديم معلومات صحيحة ودقيقة عند التسجيل أو الحجز.
1702
+
1703
+ 3. الخصوصية وحماية البيانات
1704
+
1705
+ يلتزم مركز بن رشد بالحفاظ على سرية بيانات المستخدم وعدم مشاركتها مع أي طرف ثالث إلا عند الضرورة لتقديم الخدمة أو بناءً على المتطلبات القانونية.
1706
+
1707
+ يحتفظ المركز بحق استخدام بيانات الاستخدام لتحسين الخدمات وتجربة المستخدم.
1708
+
1709
+ 4. المواعيد والخدمات الطبية
1710
+
1711
+ تأكيد الحجز لا يُعدّ تشخيصًا طبيًا ولا يضمن توافر الطبيب في جميع الأوقات.
1712
+
1713
+ يحتفظ المركز بحق تعديل أو إلغاء المواعيد عند الضرورة مع إخطار المستخدم.
1714
+
1715
+ 5. حقوق الملكية الفكرية
1716
+ جميع محتويات التطبيق (النصوص، الصور، الشعارات، التصميمات) مملوكة لمركز بن رشد ولا يجوز نسخها أو استخدامها دون إذن خطي مسبق.
1717
+
1718
+ 6. التعديلات
1719
+ يحق لمركز بن رشد تعديل هذه الشروط في أي وقت، وتعتبر النسخة المنشورة في التطبيق هي السارية وقت الاستخدام.
1720
+
1721
+ 7. التواصل
1722
+ للاستفسارات أو الدعم الفني، يمكن التواصل عبر البريد الإلكتروني: info@binrushd.net
1723
+ """
1724
+
1725
+ TERMS_EN = """
1726
+ Introduction
1727
+ Welcome to the Binrushd Medical Center mobile application — the official app of Binrushd Eye Specialty Center. By using this application, you agree to the following terms and conditions. Please read them carefully before using the app.
1728
+
1729
+ 1. Purpose of the Application
1730
+ This app allows users to:
1731
+
1732
+ Learn more about the medical services and departments of the center.
1733
+
1734
+ View doctors’ profiles and available appointment slots.
1735
+
1736
+ Book appointments and send booking requests electronically.
1737
+
1738
+ 2. Permitted Use
1739
+
1740
+ The app is intended for personal, non-commercial use only.
1741
+
1742
+ You may not use the app for any unlawful or unauthorized purpose.
1743
+
1744
+ Users must provide accurate and truthful information when registering or booking.
1745
+
1746
+ 3. Privacy and Data Protection
1747
+
1748
+ Binrushd Medical Center is committed to protecting user data and will not share it with third parties except when required to provide services or comply with legal obligations.
1749
+
1750
+ Usage data may be analyzed to improve the quality of services and user experience.
1751
+
1752
+ 4. Appointments and Medical Services
1753
+
1754
+ Appointment booking does not constitute a medical diagnosis and does not guarantee doctor availability at all times.
1755
+
1756
+ The center reserves the right to modify or cancel appointments when necessary and will inform users accordingly.
1757
+
1758
+ 5. Intellectual Property Rights
1759
+ All content in the app (texts, images, logos, and designs) is owned by Binrushd Medical Center and may not be copied or reused without prior written consent.
1760
+
1761
+ 6. Modifications
1762
+ Binrushd Medical Center reserves the right to modify these terms at any time. The latest version published in the app shall be deemed the valid one.
1763
+
1764
+ 7. Contact
1765
+ For inquiries or support, please contact: info@binrushd.net
1766
+ """
1767
+
1768
+ @app.get("/api/terms")
1769
+ def get_terms(lang: str = Query("ar", description="لغة الشروط: ar أو en")):
1770
+ if lang.lower() == "en":
1771
+ return {"language": "en", "title": "Terms and Conditions", "content": TERMS_EN.strip()}
1772
+ else:
1773
+ return {"language": "ar", "title": "الشروط والأحكام", "content": TERMS_AR.strip()}