diff --git a/Certs/APNSDevPushCert.p12 b/Certs/APNSDevPushCert.p12
new file mode 100644
index 00000000..dba27aec
Binary files /dev/null and b/Certs/APNSDevPushCert.p12 differ
diff --git a/Certs/APNSProdCert.certSigningRequest b/Certs/APNSProdCert.certSigningRequest
new file mode 100644
index 00000000..3f13a387
--- /dev/null
+++ b/Certs/APNSProdCert.certSigningRequest
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j
+b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBALcPrk09MmhQhRNe8LYdaeN4mYtoKJg3
+SndMLgpxnaRqP7a6f4sp118wCFZsTXnwhPVP4DzmXWc2AzZtsusmhdw1tzNFtme0
+PtEjDXIPI2lHU3Zhi2zukZdAVxF+uNi3pcp0axina60ZQciIfb/7Fx6hNbqpk90E
+O8a2Ob17Wq/ZTYIP4H7ZGydUe2ra9QyDtjmGj9vpEv+xXYWX685sgEylTG14DSOP
+ozGsQmaf+QCMbCT3osq7idWc1IQ+3Oed0kUTx1jmRtZwPzQkJJ1Bx3vYSXN/EOlb
+u+ei1Nqtc14aVCYvmcuvGDtMyRtw6w+syCw2CpJCPGNkxNz+EH9h+EUCAwEAAaAA
+MA0GCSqGSIb3DQEBCwUAA4IBAQBYdu2AaZY6kReuT1Xp8ktlyPfjBRKhPPChuaeR
+tFnYMsJtG0aIA/xOu4/RYDgmL92seimULXd9DIPvkJ2DuaB+bdfGTw0qXUlihkm8
+ui5O0L2F9OZbQxJogvTmrMsKnkoR27O5vyfCn9VMOLk3x1nyEzAXIj/5GHWw9T6t
+r65jPUOfm6ikiZtICBzSaTPBtyfZB8mrbwG2dpOvVNSa1dj3xip4L8CL6TxH+qM3
++N90QFYjvjphJkpn2Kt0ow9IyIyeqJbIYJmsWoV9pXddOHCjKdTWUjq7D2Jn3eUA
+DAKjKgVqF4/dU10k7EtSfrw01aHLXjj5FxsD5YhVrgTA5xSq
+-----END CERTIFICATE REQUEST-----
diff --git a/Certs/APNSProdCert.p12 b/Certs/APNSProdCert.p12
new file mode 100644
index 00000000..b0ada453
Binary files /dev/null and b/Certs/APNSProdCert.p12 differ
diff --git a/Certs/ApplePushServicesSandbox.certSigningRequest b/Certs/ApplePushServicesSandbox.certSigningRequest
new file mode 100644
index 00000000..7d509a0a
--- /dev/null
+++ b/Certs/ApplePushServicesSandbox.certSigningRequest
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j
+b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnHqsyE7WfiVcE1Lpa4t4OVO6qlll2q
+1djs0XG06R/dlDtIqv4940/XLj+hU93mzAcVvFW4DSIEdD3InM3+T6oMTjPu6meU
+69h9ryaVkluQRrT/tdGI1EKO4MWGMe4MDIt7DqMhMfAcxTwekwdxdKaCEhaw3qnA
+l/64AelY6URW1pHHJMA0VV7j+pE3jVNai+muMXPrhQ1VrOrV8FftpY3bEeRJR2Cl
+T0tv0LhEMu4SfLnVWCzGQQC82hilDw3rH3ZDs8DFxF9agNVdwKlYamarh1dQXwRq
+Yx2+sjY1/51r9L4VS+GAh9ECxz0e+43NpzfZ/N+mTeDYKDepaBwPQ6kCAwEAAaAA
+MA0GCSqGSIb3DQEBCwUAA4IBAQB89OyLfywKT7ftmpEqCmgsmaJexb580q9w8wOk
+1JhJkNV5ec+p1dnge2NZeJ4LGII/5wmPj1vANNW0GZdmJDgnC+2gg9toq1QLCAsF
+rW7/LMpgAoEH+P5bhrHV9RRv6BQi0ZmN0apBHjp/pqZfm2Cl5jQPEWjUEf2tIF4l
+LSKdok6IPO9n4Fgyk0XdUNSEhgVhsLtZkGiXnkI1YovKDnupTFYPXMLp103bc9zP
+xDxwscvOysNDijlzZAkJPg2z8NrJIRDrKvLRHzxQwZ/1LHVB/51bp/1iyks3vOjh
+qw5XVsrtGAjCjU9md7q3XkPSyKzhK9UqPdOxdvl1OY0KKIIY
+-----END CERTIFICATE REQUEST-----
diff --git a/Certs/aps.cer b/Certs/aps.cer
index fb46df86..d95bac40 100644
Binary files a/Certs/aps.cer and b/Certs/aps.cer differ
diff --git a/Certs/aps_development.cer b/Certs/aps_development.cer
new file mode 100644
index 00000000..9a9934bb
Binary files /dev/null and b/Certs/aps_development.cer differ
diff --git a/CustomFlutterFirebaseMessagingService.java b/CustomFlutterFirebaseMessagingService.java
new file mode 100644
index 00000000..0a4d83be
--- /dev/null
+++ b/CustomFlutterFirebaseMessagingService.java
@@ -0,0 +1,17 @@
+package io.flutter.plugins.firebasemessaging;
+
+import android.content.Intent;
+
+import com.google.firebase.messaging.RemoteMessage;
+
+public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
+ @Override
+ public void onMessageReceived(RemoteMessage remoteMessage) {
+ if (remoteMessage.getData().containsKey("is_call")) {
+ Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
+ startActivity(intent);
+ super.onMessageReceived(remoteMessage);
+ } else
+ super.onMessageReceived(remoteMessage);
+ }
+}
\ No newline at end of file
diff --git a/android/CustomFlutterFirebaseMessagingService.java b/android/CustomFlutterFirebaseMessagingService.java
new file mode 100644
index 00000000..0a4d83be
--- /dev/null
+++ b/android/CustomFlutterFirebaseMessagingService.java
@@ -0,0 +1,17 @@
+package io.flutter.plugins.firebasemessaging;
+
+import android.content.Intent;
+
+import com.google.firebase.messaging.RemoteMessage;
+
+public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
+ @Override
+ public void onMessageReceived(RemoteMessage remoteMessage) {
+ if (remoteMessage.getData().containsKey("is_call")) {
+ Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
+ startActivity(intent);
+ super.onMessageReceived(remoteMessage);
+ } else
+ super.onMessageReceived(remoteMessage);
+ }
+}
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 30575eb9..884c7e09 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -6,6 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
+
diff --git a/android/build.gradle b/android/build.gradle
index e2e8a05f..8e56476b 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.4.2'
+ classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 296b146b..5660070d 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Jun 23 08:50:38 CEST 2017
+#Thu Sep 03 16:26:30 EEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/assets/images/new-design/AM.PNG b/assets/images/new-design/AM.PNG
new file mode 100644
index 00000000..212ca0b1
Binary files /dev/null and b/assets/images/new-design/AM.PNG differ
diff --git a/assets/images/report.jpg b/assets/images/report.jpg
new file mode 100644
index 00000000..5846cd53
Binary files /dev/null and b/assets/images/report.jpg differ
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 956a2315..9b910e66 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -7,7 +7,7 @@ const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/';
-const GET_PROJECT = '/Lists.svc/REST/GetProject';
+const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
///Doctor
const GET_MY_DOCTOR =
@@ -28,8 +28,8 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
-const GET_Patient_LAB_SPECIAL_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const GET_Patient_LAB_RESULT = '/Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@@ -43,12 +43,25 @@ const SEND_RAD_REPORT_EMAIL =
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory =
- 'Services/Doctors.svc/REST/PateintHasAppoimentHistory';
+ 'Services'
+ '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
+///Er Nearest
+const GET_NEAREST_HOSPITAL=
+ 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
+
+///Er Nearest
+const GET_AMBULANCE_REQUEST=
+ 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
+
+
+
+
+
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT =
@@ -69,9 +82,15 @@ const GET_QR_PARKING = '/Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
+//URL to get projects list
+const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
+
//URL to get doctors list
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
+//URL to dental doctors list
+const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
+
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
@@ -141,6 +160,10 @@ const CANCEL_LIVECARE_REQUEST =
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
+
+const GET_USER_TERMS ='/Services/Patients.svc/REST/GetUserTermsAndConditions';
+const UPDATE_HEALTH_TERMS ='/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
@@ -153,7 +176,6 @@ const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1;
-
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
@@ -168,6 +190,21 @@ const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
+const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
+const GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND";
+
+const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
+
+const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
+
+const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
+const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
+const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
+const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
+const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
+
+const TIMER_MIN = 10;
+
class AppGlobal {
static var context;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 903943ef..baf3cc69 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -227,6 +227,7 @@ const Map> localizedValues = {
'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'
},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
+ "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"},
"close": {"en": "Close", "ar": "مغلق"},
"booked": {"en": "Booked", "ar": "محجوز"},
"confirmed": {"en": "Confirmed", "ar": "مؤكد"},
@@ -365,23 +366,23 @@ const Map> localizedValues = {
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"},
"logs": {"en": "Logs", "ar": "السجلات"},
- "parking": {"en": "Parking", "ar": "مواقف"},
- "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"},
- "parkingTitle": {
- "en":
- "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.",
- "ar":
- " خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "
- },
- "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"},
- "showMyPark": {"en": "Show My Park", "ar": "عرض بارك"},
- "clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"},
- "floor": {"en": "Floor:", "ar": "الطابق"},
- "gate": {"en": "Gate:", "ar": "بوابة"},
- "building": {"en": "Building:", "ar": "المبنى"},
- "branch": {"en": "Branch:", "ar": "الفرع"},
- "emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"},
"textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"},
+ "locationDialogMessage": {"en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."},
+ "parking":{"en":"Parking","ar":"مواقف"},
+ "alhabiServices":{"en":"HMG Service","ar":"خدمات الحبيب"},
+ "parkingTitle":{"en":"Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.","ar":" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "},
+ "readBarcode":{"en":"Read Barcode","ar":"قراءة الكود"},
+ "showMyPark":{"en":"Show My Park","ar":"عرض بارك"},
+ "clearMyData":{"en":"clear My Data","ar":"امسح البيانات"},
+ "floor":{"en":"Floor:","ar":"الطابق"},
+ "gate":{"en":"Gate:","ar":"بوابة"},
+ "building":{"en":"Building:","ar":"المبنى"},
+ "branch":{"en":"Branch:","ar":"الفرع"},
+ "emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"},
+ "nearester":{"en":"Nearest ER:","ar":"أقرب طوارى"},
+ "locationa":{"en":"location:","ar":"الموقع"},
+ "ambulancerequest":{"en":"Ambulance :","ar":"طلب نقل "},
+ "requestA":{"en":"Request:","ar":"اسعاف"},
"MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": {
"en": "No Booked Appointments",
@@ -421,7 +422,7 @@ const Map> localizedValues = {
"MyVaccines": {"en": "My Vaccines", "ar": "تطعيماتي"},
"MyVaccinesSubtitle": {"en": "List", "ar": "قائمة"},
"Medical": {"en": "Medical", "ar": "التقارير"},
- "MedicalSubtitle": {"Report": "List", "ar": "الطبية"},
+ "MedicalSubtitle": {"en": "Report", "ar": "الطبية"},
"Monthly": {"en": "Monthly", "ar": "تقارير"},
"MonthlySubtitle": {"en": "Report", "ar": "الشهرية"},
"Sick": {"en": "Sick", "ar": "الإجازات"},
@@ -448,4 +449,44 @@ const Map> localizedValues = {
"OrderNo": {"en": "Order No", "ar": "رقم الطلب"},
"OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"},
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
+ "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
+ "km":{"en":"KMs:","ar":"كم"},
+ "PatientHealthSummaryReport":{"en":"Patient Health Summary Report","ar":" ملخص التقارير الشهرية"},
+ "ToViewTheTermsAndConditions":{"en":"To View The Terms And Conditions Report","ar":" عرض الشروط والأحكام "},
+ "ClickHere":{"en":"Click here","ar":"أنقر هنا"},
+ "IAgreeToTheTermsAndConditions":{"en":"I agree to the terms and conditions ","ar":"أوافق على الشروط والاحكام "},
+ "IAgreeToTheTermsAndConditionsSubtitle":{"en":"I agree to the terms and conditions ","ar":"هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية"},
+ "Save":{"en":"Save","ar":"حفظ "},
+ "UserAgreement":{"en":"User Agreement","ar":"اتفاقية الخصوصية "},
+ "UpdateSuccessfully":{"en":"Update Successfully","ar":"تم التحديث بنجاح"},
+ "CHECK_VACCINE_AVAILABILITY":{"en":"CHECK VACCINE AVAILABILITY","ar":"تحقق من توافر اللقاح"},
+ "MyVaccinesAvailability":{"en":"MyVaccinesAvailability","ar":"توفر لقاحي"},
+ "PaymentService":{"en":"Payment Service","ar":"خدمة المدفوعات"},
+ "PaymentOnline":{"en":"Service","ar":"الالكتروني"},
+ "OnlineCheckIn":{"en":"Online Check-In","ar":"مدفوعات معلقة"},
+ "MyBalances":{"en":"My Balances","ar":"رصيدي"},
+ "BalanceAmount":{"en":"Balance Amount","ar":"رصيدالحساب"},
+ "TotalBalance":{"en":"Total Balance","ar":"الرصيد الكلي"},
+ "CreateAdvancedPayment":{"en":"Create Advanced Payment","ar":"إنشاء دفعة مقدمة"},
+ "AdvancePayment":{"en":"Advance Payment","ar":"الدفع مقدما"},
+ "AdvancePaymentLabel":{
+ "en":"You can create and add an Advanced Payment for you account or other accounts.",
+ "ar":"يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"},
+ "FileNumber":{"en":"File Number","ar":"رقم الملف"},
+ "Amount":{"en":"Amount *","ar":"المبلغ *"},
+ "DepositorEmail":{"en":"Depositor Email *","ar":"البريد الإلكتروني للمودع *"},
+ "Notes":{"en":"Notes","ar":"ملاحظات"},
+ "SelectPatientName":{"en":"Select Patient Name","ar":"اختر اسم المريض"},
+ "SelectFamilyPatientName":{"en":"Family Members","ar":"أفراد الأسرة"},
+ "SelectHospital":{"en":"Select Hospital","ar":"اختر المستشفى"},
+ "MyAccount":{"en":"My Account","ar":"حسابي"},
+ "OtherAccount":{"en":"Other Account","ar":"حساب آخر"},
+ "SelectBeneficiary":{"en":"Select Beneficiary","ar":"حدد المستفيد"},
+ "ConfirmThePayment":{"en":"Confirm The Payment","ar":"تأكيد عملية الدفع"},
+ "DepositorName":{"en":"Depositor Name","ar":"اسم المودع *"},
+ "MobileNumber":{"en":"Mobile Number","ar":"رقم الجوال"},
+ "Ok":{"en":"Ok","ar":"حسنا"},
+ "TheVerificationCodeExpiresIn":{"en":"The Verification Code Expires In","ar":"تنتهي صلاحية رمز التحقق في"},
+ "PleaseEnterTheVerificationCode":{"en":"Please enter the verification code send to","ar":"الرجاء إدخال رمز التحقق المرسل إلى"},
+
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index c9da9fe7..61e36022 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -11,4 +11,6 @@ const AUTH_DATA = 'auth-data';
const IMEI_USER_DATA = 'imei-user-data';
const NHIC_DATA = 'nhic-data';
const FAMILY_FILE = 'family-file';
+const USER_LAT = 'user-lat';
+const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
diff --git a/lib/core/model/er/get_all_transportation_method_list_model.dart b/lib/core/model/er/get_all_transportation_method_list_model.dart
new file mode 100644
index 00000000..3402873e
--- /dev/null
+++ b/lib/core/model/er/get_all_transportation_method_list_model.dart
@@ -0,0 +1,79 @@
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+class PatientER_RRT_GetAllTransportationMethodListModel {
+ int id;
+ DateTime createDate;
+ DateTime lastEditDate;
+ int createdBy;
+ int lastEditBy;
+ bool isActive;
+ String title;
+ String titleAR;
+ int price;
+ Null isDefault;
+ int visibility;
+ Null durationId;
+ String description;
+ String descriptionAR;
+ int totalPrice;
+ int vAT;
+
+ PatientER_RRT_GetAllTransportationMethodListModel(
+ {
+ this.id,
+ this.createDate,
+ this.lastEditDate,
+ this.createdBy,
+ this.lastEditBy,
+ this.isActive,
+ this.title,
+ this.titleAR,
+ this.price,
+ this.isDefault,
+ this.visibility,
+ this.durationId,
+ this.description,
+ this.descriptionAR,
+ this.totalPrice,
+ this.vAT});
+
+ PatientER_RRT_GetAllTransportationMethodListModel.fromJson(
+ Map json) {
+ id = json['Id'];
+ createDate = DateUtil.convertStringToDate(json['CreateDate']);
+ lastEditDate = DateUtil.convertStringToDate(json['LastEditDate']);
+ createdBy = json['CreatedBy'];
+ lastEditBy = json['LastEditBy'];
+ isActive = json['IsActive'];
+ title = json['Title'];
+ titleAR = json['TitleAR'];
+ price = json['Price'];
+ isDefault = json['isDefault'];
+ visibility = json['Visibility'];
+ durationId = json['DurationId'];
+ description = json['Description'];
+ descriptionAR = json['DescriptionAR'];
+ totalPrice = json['TotalPrice'];
+ vAT = json['VAT'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Id'] = this.id;
+ data['CreateDate'] = this.createDate;
+ data['LastEditDate'] = this.lastEditDate;
+ data['CreatedBy'] = this.createdBy;
+ data['LastEditBy'] = this.lastEditBy;
+ data['IsActive'] = this.isActive;
+ data['Title'] = this.title;
+ data['TitleAR'] = this.titleAR;
+ data['Price'] = this.price;
+ data['isDefault'] = this.isDefault;
+ data['Visibility'] = this.visibility;
+ data['DurationId'] = this.durationId;
+ data['Description'] = this.description;
+ data['DescriptionAR'] = this.descriptionAR;
+ data['TotalPrice'] = this.totalPrice;
+ data['VAT'] = this.vAT;
+ return data;
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/er/projectavgerwaitingtime.dart b/lib/core/model/er/projectavgerwaitingtime.dart
new file mode 100644
index 00000000..9b21ec66
--- /dev/null
+++ b/lib/core/model/er/projectavgerwaitingtime.dart
@@ -0,0 +1,104 @@
+class ProjectAvgERWaitingTime {
+ int iD;
+ int projectID;
+ int avgTimeInMinutes;
+ String avgTimeInHHMM;
+ dynamic distanceInKilometers;
+ String latitude;
+ String longitude;
+ String phoneNumber;
+ String projectImageURL;
+ String projectName;
+
+ ProjectAvgERWaitingTime(
+ {this.iD,
+ this.projectID,
+ this.avgTimeInMinutes,
+ this.avgTimeInHHMM,
+ this.distanceInKilometers,
+ this.latitude,
+ this.longitude,
+ this.phoneNumber,
+ this.projectImageURL,
+ this.projectName});
+
+ ProjectAvgERWaitingTime.fromJson(Map json) {
+ iD = json['ID'];
+ projectID = json['ProjectID'];
+ avgTimeInMinutes = json['AvgTimeInMinutes'];
+ avgTimeInHHMM = json['AvgTimeInHHMM'];
+ distanceInKilometers = json['DistanceInKilometers'];
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ phoneNumber = json['PhoneNumber'];
+ projectImageURL = json['ProjectImageURL'];
+ projectName = json['ProjectName'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ID'] = this.iD;
+ data['ProjectID'] = this.projectID;
+ data['AvgTimeInMinutes'] = this.avgTimeInMinutes;
+ data['AvgTimeInHHMM'] = this.avgTimeInHHMM;
+ data['DistanceInKilometers'] = this.distanceInKilometers;
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ data['PhoneNumber'] = this.phoneNumber;
+ data['ProjectImageURL'] = this.projectImageURL;
+ data['ProjectName'] = this.projectName;
+ return data;
+ }
+}
+//class ProjectAvgERWaitingTime {
+// int iD;
+// int projectID;
+// int avgTimeInMinutes;
+// String avgTimeInHHMM;
+// String distanceInKilometers;
+// String latitude;
+// String longitude;
+// String phoneNumber;
+// String projectImageURL;
+// String projectName;
+//
+// ProjectAvgERWaitingTime(
+// {this.iD,
+// this.projectID,
+// this.avgTimeInMinutes,
+// this.avgTimeInHHMM,
+// this.distanceInKilometers,
+// this.latitude,
+// this.longitude,
+// this.phoneNumber,
+// this.projectImageURL,
+// this.projectName});
+//
+// ProjectAvgERWaitingTime.fromJson(Map json) {
+// iD = json['ID'];
+// projectID = json['ProjectID'];
+// avgTimeInMinutes = json['AvgTimeInMinutes'];
+// avgTimeInHHMM = json['AvgTimeInHHMM'];
+// distanceInKilometers = json['DistanceInKilometers'];
+// latitude = json['Latitude'];
+// longitude = json['Longitude'];
+// phoneNumber = json['PhoneNumber'];
+// projectImageURL = json['ProjectImageURL'];
+// projectName = json['ProjectName'];
+// }
+//
+// Map toJson() {
+// final Map data = new Map();
+// data['ID'] = this.iD;
+// data['ProjectID'] = this.projectID;
+// data['AvgTimeInMinutes'] = this.avgTimeInMinutes;
+// data['AvgTimeInHHMM'] = this.avgTimeInHHMM;
+// data['DistanceInKilometers'] = this.distanceInKilometers;
+// data['Latitude'] = this.latitude;
+// data['Longitude'] = this.longitude;
+// data['PhoneNumber'] = this.phoneNumber;
+// data['ProjectImageURL'] = this.projectImageURL;
+// data['ProjectName'] = this.projectName;
+// return data;
+// }
+//}
\ No newline at end of file
diff --git a/lib/core/model/hospitals/hospitals_model.dart b/lib/core/model/hospitals/hospitals_model.dart
index a8308de8..264528c7 100644
--- a/lib/core/model/hospitals/hospitals_model.dart
+++ b/lib/core/model/hospitals/hospitals_model.dart
@@ -1,18 +1,18 @@
class HospitalsModel {
String desciption;
Null desciptionN;
- int iD;
+ dynamic iD;
String legalName;
String legalNameN;
String name;
Null nameN;
String phoneNumber;
String setupID;
- int distanceInKilometers;
+ dynamic distanceInKilometers;
bool isActive;
String latitude;
String longitude;
- int mainProjectID;
+ dynamic mainProjectID;
Null projectOutSA;
bool usingInDoctorApp;
diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart
new file mode 100644
index 00000000..23b3363d
--- /dev/null
+++ b/lib/core/model/labs/lab_result.dart
@@ -0,0 +1,88 @@
+class LabResult {
+ String description;
+ Null femaleInterpretativeData;
+ int gender;
+ int lineItemNo;
+ Null maleInterpretativeData;
+ String notes;
+ String packageID;
+ int patientID;
+ String projectID;
+ String referanceRange;
+ String resultValue;
+ String sampleCollectedOn;
+ String sampleReceivedOn;
+ String setupID;
+ Null superVerifiedOn;
+ String testCode;
+ String uOM;
+ String verifiedOn;
+ Null verifiedOnDateTime;
+
+ LabResult(
+ {this.description,
+ this.femaleInterpretativeData,
+ this.gender,
+ this.lineItemNo,
+ this.maleInterpretativeData,
+ this.notes,
+ this.packageID,
+ this.patientID,
+ this.projectID,
+ this.referanceRange,
+ this.resultValue,
+ this.sampleCollectedOn,
+ this.sampleReceivedOn,
+ this.setupID,
+ this.superVerifiedOn,
+ this.testCode,
+ this.uOM,
+ this.verifiedOn,
+ this.verifiedOnDateTime});
+
+ LabResult.fromJson(Map json) {
+ description = json['Description'];
+ femaleInterpretativeData = json['FemaleInterpretativeData'];
+ gender = json['Gender'];
+ lineItemNo = json['LineItemNo'];
+ maleInterpretativeData = json['MaleInterpretativeData'];
+ notes = json['Notes'];
+ packageID = json['PackageID'];
+ patientID = json['PatientID'];
+ projectID = json['ProjectID'];
+ referanceRange = json['ReferanceRange'];
+ resultValue = json['ResultValue'];
+ sampleCollectedOn = json['SampleCollectedOn'];
+ sampleReceivedOn = json['SampleReceivedOn'];
+ setupID = json['SetupID'];
+ superVerifiedOn = json['SuperVerifiedOn'];
+ testCode = json['TestCode'];
+ uOM = json['UOM'];
+ verifiedOn = json['VerifiedOn'];
+ verifiedOnDateTime = json['VerifiedOnDateTime'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Description'] = this.description;
+ data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
+ data['Gender'] = this.gender;
+ data['LineItemNo'] = this.lineItemNo;
+ data['MaleInterpretativeData'] = this.maleInterpretativeData;
+ data['Notes'] = this.notes;
+ data['PackageID'] = this.packageID;
+ data['PatientID'] = this.patientID;
+ data['ProjectID'] = this.projectID;
+ data['ReferanceRange'] = this.referanceRange;
+ data['ResultValue'] = this.resultValue;
+ data['SampleCollectedOn'] = this.sampleCollectedOn;
+ data['SampleReceivedOn'] = this.sampleReceivedOn;
+ data['SetupID'] = this.setupID;
+ data['SuperVerifiedOn'] = this.superVerifiedOn;
+ data['TestCode'] = this.testCode;
+ data['UOM'] = this.uOM;
+ data['VerifiedOn'] = this.verifiedOn;
+ data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
+ return data;
+ }
+}
diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart
new file mode 100644
index 00000000..40472b13
--- /dev/null
+++ b/lib/core/model/my_balance/AdvanceModel.dart
@@ -0,0 +1,18 @@
+import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
+
+class AdvanceModel {
+ String fileNumber;
+ String amount;
+ HospitalsModel hospitalsModel;
+ String email;
+ String note;
+ String depositorName;
+
+ AdvanceModel(
+ {this.amount,
+ this.email,
+ this.note,
+ this.hospitalsModel,
+ this.fileNumber,
+ this.depositorName});
+}
diff --git a/lib/core/model/my_balance/patient_advance_balance_amount.dart b/lib/core/model/my_balance/patient_advance_balance_amount.dart
new file mode 100644
index 00000000..44a5083f
--- /dev/null
+++ b/lib/core/model/my_balance/patient_advance_balance_amount.dart
@@ -0,0 +1,28 @@
+class PatientAdvanceBalanceAmount {
+ int distanceInKilometers;
+ dynamic patientAdvanceBalanceAmount;
+ String projectDescription;
+ int projectID;
+
+ PatientAdvanceBalanceAmount(
+ {this.distanceInKilometers,
+ this.patientAdvanceBalanceAmount,
+ this.projectDescription,
+ this.projectID});
+
+ PatientAdvanceBalanceAmount.fromJson(Map json) {
+ distanceInKilometers = json['DistanceInKilometers'];
+ patientAdvanceBalanceAmount = json['PatientAdvanceBalanceAmount'];
+ projectDescription = json['ProjectDescription'];
+ projectID = json['ProjectID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['DistanceInKilometers'] = this.distanceInKilometers;
+ data['PatientAdvanceBalanceAmount'] = this.patientAdvanceBalanceAmount;
+ data['ProjectDescription'] = this.projectDescription;
+ data['ProjectID'] = this.projectID;
+ return data;
+ }
+}
diff --git a/lib/core/model/my_balance/patient_info.dart b/lib/core/model/my_balance/patient_info.dart
new file mode 100644
index 00000000..6004f014
--- /dev/null
+++ b/lib/core/model/my_balance/patient_info.dart
@@ -0,0 +1,32 @@
+class PatientInfo {
+ String fullName;
+ String mobileNumber;
+ int patientID;
+ int projectID;
+ String zipCode;
+
+ PatientInfo(
+ {this.fullName,
+ this.mobileNumber,
+ this.patientID,
+ this.projectID,
+ this.zipCode});
+
+ PatientInfo.fromJson(Map json) {
+ fullName = json['FullName'];
+ mobileNumber = json['MobileNumber'];
+ patientID = json['PatientID'];
+ projectID = json['ProjectID'];
+ zipCode = json['ZipCode'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['FullName'] = this.fullName;
+ data['MobileNumber'] = this.mobileNumber;
+ data['PatientID'] = this.patientID;
+ data['ProjectID'] = this.projectID;
+ data['ZipCode'] = this.zipCode;
+ return data;
+ }
+}
diff --git a/lib/core/model/my_balance/patient_info_and_mobile_number.dart b/lib/core/model/my_balance/patient_info_and_mobile_number.dart
new file mode 100644
index 00000000..8f05b4d9
--- /dev/null
+++ b/lib/core/model/my_balance/patient_info_and_mobile_number.dart
@@ -0,0 +1,84 @@
+class PatientInfoAndMobileNumber {
+ String setupID;
+ int projectID;
+ int mainAccountID;
+ int patientType;
+ int patientID;
+ String firstName;
+ Null middleName;
+ Null lastName;
+ Null firstNameN;
+ Null middleNameN;
+ Null lastNameN;
+ Null gender;
+ Null dateofBirth;
+ Null dateofBirthN;
+ Null nationalityID;
+ String mobileNumber;
+ String emailAddress;
+ Null zipCode;
+
+ PatientInfoAndMobileNumber(
+ {this.setupID,
+ this.projectID,
+ this.mainAccountID,
+ this.patientType,
+ this.patientID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.gender,
+ this.dateofBirth,
+ this.dateofBirthN,
+ this.nationalityID,
+ this.mobileNumber,
+ this.emailAddress,
+ this.zipCode});
+
+ PatientInfoAndMobileNumber.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ mainAccountID = json['MainAccountID'];
+ patientType = json['PatientType'];
+ patientID = json['PatientID'];
+ firstName = json['FirstName'];
+ middleName = json['MiddleName'];
+ lastName = json['LastName'];
+ firstNameN = json['FirstNameN'];
+ middleNameN = json['MiddleNameN'];
+ lastNameN = json['LastNameN'];
+ gender = json['Gender'];
+ dateofBirth = json['DateofBirth'];
+ dateofBirthN = json['DateofBirthN'];
+ nationalityID = json['NationalityID'];
+ mobileNumber = json['MobileNumber'];
+ emailAddress = json['EmailAddress'];
+ zipCode = json['ZipCode'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['MainAccountID'] = this.mainAccountID;
+ data['PatientType'] = this.patientType;
+ data['PatientID'] = this.patientID;
+ data['FirstName'] = this.firstName;
+ data['MiddleName'] = this.middleName;
+ data['LastName'] = this.lastName;
+ data['FirstNameN'] = this.firstNameN;
+ data['MiddleNameN'] = this.middleNameN;
+ data['LastNameN'] = this.lastNameN;
+ data['Gender'] = this.gender;
+ data['DateofBirth'] = this.dateofBirth;
+ data['DateofBirthN'] = this.dateofBirthN;
+ data['NationalityID'] = this.nationalityID;
+ data['MobileNumber'] = this.mobileNumber;
+ data['EmailAddress'] = this.emailAddress;
+ data['ZipCode'] = this.zipCode;
+ return data;
+ }
+}
diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart
new file mode 100644
index 00000000..ff73e1da
--- /dev/null
+++ b/lib/core/model/sick_leave/sick_leave.dart
@@ -0,0 +1,139 @@
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+
+class SickLeave {
+ String setupID;
+ int projectID;
+ int patientID;
+ int patientType;
+ int clinicID;
+ int doctorID;
+ int requestNo;
+ DateTime requestDate;
+ int sickLeaveDays;
+ int appointmentNo;
+ int admissionNo;
+ int actualDoctorRate;
+ String appointmentDate;
+ String clinicName;
+ String doctorImageURL;
+ String doctorName;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isDoctorAllowVedioCall;
+ bool isExecludeDoctor;
+ bool isInOutPatient;
+ String isInOutPatientDescription;
+ String isInOutPatientDescriptionN;
+ int noOfPatientsRate;
+ Null patientName;
+ String projectName;
+ String qR;
+ List speciality;
+
+ SickLeave(
+ {this.setupID,
+ this.projectID,
+ this.patientID,
+ this.patientType,
+ this.clinicID,
+ this.doctorID,
+ this.requestNo,
+ this.requestDate,
+ this.sickLeaveDays,
+ this.appointmentNo,
+ this.admissionNo,
+ this.actualDoctorRate,
+ this.appointmentDate,
+ this.clinicName,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isDoctorAllowVedioCall,
+ this.isExecludeDoctor,
+ this.isInOutPatient,
+ this.isInOutPatientDescription,
+ this.isInOutPatientDescriptionN,
+ this.noOfPatientsRate,
+ this.patientName,
+ this.projectName,
+ this.qR,
+ this.speciality});
+
+ SickLeave.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ patientID = json['PatientID'];
+ patientType = json['PatientType'];
+ clinicID = json['ClinicID'];
+ doctorID = json['DoctorID'];
+ requestNo = json['RequestNo'];
+ requestDate = DateUtil.convertStringToDate(json['RequestDate']);
+ sickLeaveDays = json['SickLeaveDays'];
+ appointmentNo = json['AppointmentNo'];
+ admissionNo = json['AdmissionNo'];
+ actualDoctorRate = json['ActualDoctorRate'];
+ appointmentDate = json['AppointmentDate'];
+ clinicName = json['ClinicName'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ isInOutPatient = json['IsInOutPatient'];
+ isInOutPatientDescription = json['IsInOutPatientDescription'];
+ isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ patientName = json['PatientName'];
+ projectName = json['ProjectName'];
+ qR = json['QR'];
+ if(json['Speciality']!=null)
+ speciality = json['Speciality'].cast();
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['PatientID'] = this.patientID;
+ data['PatientType'] = this.patientType;
+ data['ClinicID'] = this.clinicID;
+ data['DoctorID'] = this.doctorID;
+ data['RequestNo'] = this.requestNo;
+ data['RequestDate'] = DateUtil.convertDateToString(requestDate);
+ data['SickLeaveDays'] = this.sickLeaveDays;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['AdmissionNo'] = this.admissionNo;
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['AppointmentDate'] = this.appointmentDate;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['IsInOutPatient'] = this.isInOutPatient;
+ data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
+ data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['PatientName'] = this.patientName;
+ data['ProjectName'] = this.projectName;
+ data['QR'] = this.qR;
+ data['Speciality'] = this.speciality;
+ return data;
+ }
+}
diff --git a/lib/core/model/vaccine/my_vaccine.dart b/lib/core/model/vaccine/my_vaccine.dart
index ac6e2e19..dc921c12 100644
--- a/lib/core/model/vaccine/my_vaccine.dart
+++ b/lib/core/model/vaccine/my_vaccine.dart
@@ -1,91 +1,152 @@
class VaccineModel {
- String to;
- String from;
- double versionID;
- int channel;
- int languageID;
- String iPAdress;
- String generalid;
- int patientOutSA;
- String sessionID;
- bool isDentalAllowedBackend;
- int deviceTypeID;
+ String setupID;
+ int projectID;
int patientID;
- String tokenID;
- int patientTypeID;
- int patientType;
+ int invoiceNo;
+ String procedureID;
+ String vaccineName;
+ Null vaccineNameN;
String invoiceDate;
+ int doctorID;
+ int clinicID;
+ String firstName;
+ String middleName;
+ String lastName;
+ Null firstNameN;
+ Null middleNameN;
+ Null lastNameN;
+ String dateofBirth;
+ int actualDoctorRate;
+ String age;
+ String clinicName;
String doctorImageURL;
String doctorName;
+ int doctorRate;
String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isDoctorAllowVedioCall;
+ bool isExecludeDoctor;
+ int noOfPatientsRate;
+ String patientName;
String projectName;
- String vaccineName;
+ String qR;
+ List speciality;
+ String vaccinationDate;
- VaccineModel({
- this.to,
- this.from,
- this.versionID,
- this.channel,
- this.languageID,
- this.iPAdress,
- this.generalid,
- this.patientOutSA,
- this.sessionID,
- this.isDentalAllowedBackend,
- this.deviceTypeID,
- this.patientID,
- this.tokenID,
- this.patientTypeID,
- this.patientType,
- this.invoiceDate,
- this.doctorImageURL,
- this.doctorName,
- this.doctorTitle,
- this.projectName,
- this.vaccineName,
- });
+ VaccineModel(
+ {this.setupID,
+ this.projectID,
+ this.patientID,
+ this.invoiceNo,
+ this.procedureID,
+ this.vaccineName,
+ this.vaccineNameN,
+ this.invoiceDate,
+ this.doctorID,
+ this.clinicID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.dateofBirth,
+ this.actualDoctorRate,
+ this.age,
+ this.clinicName,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isDoctorAllowVedioCall,
+ this.isExecludeDoctor,
+ this.noOfPatientsRate,
+ this.patientName,
+ this.projectName,
+ this.qR,
+ this.speciality,
+ this.vaccinationDate});
VaccineModel.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ patientID = json['PatientID'];
+ invoiceNo = json['InvoiceNo'];
+ procedureID = json['ProcedureID'];
vaccineName = json['VaccineName'];
- projectName = json['ProjectName'];
- doctorTitle = json['DoctorTitle'];
- doctorName = json['DoctorName'];
- doctorImageURL = json['DoctorImageURL'];
+ vaccineNameN = json['VaccineNameN'];
invoiceDate = json['InvoiceDate'];
- to = json['To'];
- from = json['From'];
- versionID = json['VersionID'];
- channel = json['Channel'];
- languageID = json['LanguageID'];
- iPAdress = json['IPAdress'];
- generalid = json['generalid'];
- patientOutSA = json['PatientOutSA'];
- sessionID = json['SessionID'];
- isDentalAllowedBackend = json['isDentalAllowedBackend'];
- deviceTypeID = json['DeviceTypeID'];
- patientID = json['PatientID'];
- tokenID = json['TokenID'];
- patientTypeID = json['PatientTypeID'];
- patientType = json['PatientType'];
+ doctorID = json['DoctorID'];
+ clinicID = json['ClinicID'];
+ firstName = json['FirstName'];
+ middleName = json['MiddleName'];
+ lastName = json['LastName'];
+ firstNameN = json['FirstNameN'];
+ middleNameN = json['MiddleNameN'];
+ lastNameN = json['LastNameN'];
+ dateofBirth = json['DateofBirth'];
+ actualDoctorRate = json['ActualDoctorRate'];
+ age = json['Age'];
+ clinicName = json['ClinicName'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ patientName = json['PatientName'];
+ projectName = json['ProjectName'];
+ qR = json['QR'];
+ speciality = json['Speciality'].cast();
+ vaccinationDate = json['VaccinationDate'];
}
Map toJson() {
final Map data = new Map();
- data['To'] = this.to;
- data['From'] = this.from;
- data['VersionID'] = this.versionID;
- data['Channel'] = this.channel;
- data['LanguageID'] = this.languageID;
- data['IPAdress'] = this.iPAdress;
- data['generalid'] = this.generalid;
- data['PatientOutSA'] = this.patientOutSA;
- data['SessionID'] = this.sessionID;
- data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
- data['DeviceTypeID'] = this.deviceTypeID;
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
- data['TokenID'] = this.tokenID;
- data['PatientTypeID'] = this.patientTypeID;
- data['PatientType'] = this.patientType;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['ProcedureID'] = this.procedureID;
+ data['VaccineName'] = this.vaccineName;
+ data['VaccineNameN'] = this.vaccineNameN;
+ data['InvoiceDate'] = this.invoiceDate;
+ data['DoctorID'] = this.doctorID;
+ data['ClinicID'] = this.clinicID;
+ data['FirstName'] = this.firstName;
+ data['MiddleName'] = this.middleName;
+ data['LastName'] = this.lastName;
+ data['FirstNameN'] = this.firstNameN;
+ data['MiddleNameN'] = this.middleNameN;
+ data['LastNameN'] = this.lastNameN;
+ data['DateofBirth'] = this.dateofBirth;
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['Age'] = this.age;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['PatientName'] = this.patientName;
+ data['ProjectName'] = this.projectName;
+ data['QR'] = this.qR;
+ data['Speciality'] = this.speciality;
+ data['VaccinationDate'] = this.vaccinationDate;
return data;
}
}
diff --git a/lib/core/model/vaccine/vaccination_item.dart b/lib/core/model/vaccine/vaccination_item.dart
new file mode 100644
index 00000000..0009ea7d
--- /dev/null
+++ b/lib/core/model/vaccine/vaccination_item.dart
@@ -0,0 +1,18 @@
+class VaccinationItem {
+ String dESCRIPTION;
+ String iTEMCODE;
+
+ VaccinationItem({this.dESCRIPTION, this.iTEMCODE});
+
+ VaccinationItem.fromJson(Map json) {
+ dESCRIPTION = json['DESCRIPTION'];
+ iTEMCODE = json['ITEM_CODE'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['DESCRIPTION'] = this.dESCRIPTION;
+ data['ITEM_CODE'] = this.iTEMCODE;
+ return data;
+ }
+}
diff --git a/lib/core/model/vaccine/vaccination_on_hand.dart b/lib/core/model/vaccine/vaccination_on_hand.dart
new file mode 100644
index 00000000..daf3e886
--- /dev/null
+++ b/lib/core/model/vaccine/vaccination_on_hand.dart
@@ -0,0 +1,44 @@
+class VaccinationOnHand {
+ int distanceInKilometers;
+ int iTEMONHAND;
+ bool isThereItems;
+ String oRGANIZATIONCODE;
+ String oRGANIZATIONNAME;
+ String projectAlias;
+ int projectID;
+ String projectName;
+
+ VaccinationOnHand(
+ {this.distanceInKilometers,
+ this.iTEMONHAND,
+ this.isThereItems,
+ this.oRGANIZATIONCODE,
+ this.oRGANIZATIONNAME,
+ this.projectAlias,
+ this.projectID,
+ this.projectName});
+
+ VaccinationOnHand.fromJson(Map json) {
+ distanceInKilometers = json['DistanceInKilometers'];
+ iTEMONHAND = json['ITEM_ONHAND'];
+ isThereItems = json['IsThereItems'];
+ oRGANIZATIONCODE = json['ORGANIZATION_CODE'];
+ oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
+ projectAlias = json['ProjectAlias'];
+ projectID = json['ProjectID'];
+ projectName = json['ProjectName'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['DistanceInKilometers'] = this.distanceInKilometers;
+ data['ITEM_ONHAND'] = this.iTEMONHAND;
+ data['IsThereItems'] = this.isThereItems;
+ data['ORGANIZATION_CODE'] = this.oRGANIZATIONCODE;
+ data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
+ data['ProjectAlias'] = this.projectAlias;
+ data['ProjectID'] = this.projectID;
+ data['ProjectName'] = this.projectName;
+ return data;
+ }
+}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index efb168c8..8fde2166 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -2,14 +2,11 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
-import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
-import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
-import '../../../locator.dart';
import '../../../routes.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
@@ -31,11 +28,13 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN);
var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en');
var user = await sharedPref.getObject(USER_PROFILE);
- body['SetupID'] = body.containsKey('SetupID')
- ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
- : SETUP_ID;
+ if (body.containsKey('SetupID')) {
+ body['SetupID'] = body.containsKey('SetupID')
+ ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
+ : SETUP_ID;
+ }
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
@@ -44,16 +43,28 @@ class BaseAppClient {
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA
: PATIENT_OUT_SA;
- body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
+
+ if (body.containsKey('isDentalAllowedBackend')) {
+ body['isDentalAllowedBackend'] =
+ body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
+ }
+
body['DeviceTypeID'] = DeviceTypeID;
+
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE
: PATIENT_TYPE;
+
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
+
if (user != null) {
body['TokenID'] = token;
body['PatientID'] =
diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart
new file mode 100644
index 00000000..181ad37b
--- /dev/null
+++ b/lib/core/service/er/am_service.dart
@@ -0,0 +1,25 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
+import '../base_service.dart';
+
+class AmService extends BaseService {
+ List AmModelList = List();
+ Map body = Map();
+
+ Future getAllTransportationOrders() async {
+ hasError = false;
+
+ await baseAppClient.post(GET_AMBULANCE_REQUEST,
+ onSuccess: (dynamic response, int statusCode) {
+ AmModelList.clear();
+ response['AmModelList'].forEach((vital) {
+ AmModelList.add(
+ PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/er/er_service.dart b/lib/core/service/er/er_service.dart
new file mode 100644
index 00000000..bd3b6116
--- /dev/null
+++ b/lib/core/service/er/er_service.dart
@@ -0,0 +1,43 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
+import '../base_service.dart';
+
+class ErService extends BaseService {
+ List projectAvgERWaitingTimeModelList = List();
+
+ Map body = Map();
+ String Latitude = "";
+ String Longitude = "";
+ String PhoneNumber = "";
+
+ Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
+ hasError = false;
+
+ if (id != null && projectID != null) {
+ body['ID'] = id;
+ body['ProjectID'] = projectID;
+ }
+ var lat = await sharedPref.getDouble(USER_LAT);
+ var long = await sharedPref.getDouble(USER_LONG);
+ body['Latitude'] = lat ?? 0;
+ body['Longitude'] = long ?? 0;
+
+ await baseAppClient.post(GET_NEAREST_HOSPITAL,
+ onSuccess: (dynamic response, int statusCode) {
+ projectAvgERWaitingTimeModelList.clear();
+ response['List_ProjectAvgERWaitingTime'].forEach((vital) {
+ projectAvgERWaitingTimeModelList
+ .add(ProjectAvgERWaitingTime.fromJson(vital));
+ });
+ projectAvgERWaitingTimeModelList.forEach((element) {
+ Latitude = '${element.latitude}';
+ Longitude = '${element.longitude}';
+ PhoneNumber = '${element.phoneNumber}';
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/hospital_service.dart b/lib/core/service/hospital_service.dart
index c131d94f..194b8256 100644
--- a/lib/core/service/hospital_service.dart
+++ b/lib/core/service/hospital_service.dart
@@ -2,35 +2,43 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/request_get_hospitals_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:geolocator/geolocator.dart';
class HospitalService extends BaseService {
List _hospitals = List();
List get hospitals => _hospitals;
- RequestGetHospitalsModel _requestGetHospitalsModel = RequestGetHospitalsModel(
- latitude: 0,
- longitude: 0,
- versionID: 5.2,
- channel: 3,
- languageID: 2,
- iPAdress: '10.20.10.20',
- generalid: 'Cs2020@2016\$2958',
- patientOutSA: 0,
- sessionID: 'JUWuiMBCEGkAAxQpakQ',
- isDentalAllowedBackend: false,
- deviceTypeID: 2);
+ double _latitude;
+ double _longitude;
+
+ _getCurrentLocation() async {
+ await getLastKnownPosition().then((value) {
+ _latitude = value.latitude;
+ _longitude = value.longitude;
+ }).catchError((e) {
+ _longitude = 0;
+ _latitude = 0;
+ });
+ // currentLocation = LatLng(position.latitude, position.longitude);
+ }
Future getHospitals() async {
+ await _getCurrentLocation();
+ Map body = Map();
+ body['Latitude'] = _latitude;
+ body['Longitude'] = _longitude;
+
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {
- _hospitals.clear();
+ _hospitals.clear();
response['ListProject'].forEach((hospital) {
_hospitals.add(HospitalsModel.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _requestGetHospitalsModel.toJson());
+ }, body: body);
}
+
}
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 8850e953..7fee6615 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -1,8 +1,13 @@
import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
+import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class InsuranceCardService extends BaseService {
List _cardList = List();
@@ -15,6 +20,9 @@ class InsuranceCardService extends BaseService {
List get insuranceApproval => _insuranceApproval;
+ GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse();
+
clearInsuranceCard() {
_cardList.clear();
}
@@ -101,7 +109,7 @@ class InsuranceCardService extends BaseService {
Future getInsuranceApproval({int appointmentNo}) async {
hasError = false;
// _cardList.clear();
- if(appointmentNo != null) {
+ if (appointmentNo != null) {
_insuranceApprovalModel.appointmentNo = appointmentNo;
_insuranceApprovalModel.eXuldAPPNO = null;
_insuranceApprovalModel.projectID = null;
@@ -124,4 +132,35 @@ class InsuranceCardService extends BaseService {
super.error = error;
}, body: _insuranceApprovalModel.toJson());
}
+
+ Future getFamilyFiles() async {
+ var myFamily = await sharedPref.getObject(FAMILY_FILE);
+ if (myFamily != null) {
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
+ } else {
+ getSharedRecordByStatus();
+ }
+ }
+
+ Future getSharedRecordByStatus() async {
+ try {
+ dynamic localRes;
+ var request = GetAllSharedRecordsByStatusReq();
+ request.status = 0;
+ await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS,
+ onSuccess: (dynamic response, int statusCode) {
+ localRes = response;
+ }, onFailure: (String error, int statusCode) {
+ AppToast.showErrorToast(message: error);
+ throw error;
+ }, body: request.toJson());
+ sharedPref.setObject(FAMILY_FILE, localRes);
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(localRes);
+ } catch (error) {
+ print(error);
+ throw error;
+ }
+ }
}
diff --git a/lib/core/service/medical/PatientSickLeaveService.dart b/lib/core/service/medical/PatientSickLeaveService.dart
new file mode 100644
index 00000000..b2bb16ef
--- /dev/null
+++ b/lib/core/service/medical/PatientSickLeaveService.dart
@@ -0,0 +1,45 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+
+class PatientSickLeaveService extends BaseService {
+ List sickLeaveList = List();
+
+ getSickLeave() async {
+ hasError = false;
+ super.error = "";
+ await baseAppClient.post(GET_PATIENT_SICK_LEAVE,
+ onSuccess: (response, statusCode) async {
+ sickLeaveList.clear();
+ response['List_SickLeave'].forEach((sickLeave) {
+ sickLeaveList.add(SickLeave.fromJson(sickLeave));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+ sendSickLeaveEmail(
+ {int requestNo, String projectName, String doctorName, int projectID,String setupID}) async {
+ hasError = false;
+ super.error = "";
+ Map body = Map();
+ body['RequestNo'] = requestNo;
+ body['To'] = user.emailAddress;
+ body['DateofBirth'] = user.dateofBirth;
+ body['PatientIditificationNum'] = user.patientIdentificationNo;
+ body['PatientMobileNumber'] = user.mobileNumber;
+ body['PatientName'] = user.firstName + " " + user.firstName;
+ body['ProjectName'] = projectName;
+ body['DoctorName'] = doctorName;
+ body['ProjectID'] = 12;
+ body['SetupID'] = 12;
+ await baseAppClient
+ .post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
index 98f8110e..c1ad65f3 100644
--- a/lib/core/service/medical/labs_service.dart
+++ b/lib/core/service/medical/labs_service.dart
@@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
@@ -28,6 +29,7 @@ class LabsService extends BaseService {
RequestPatientLabSpecialResult();
List patientLabSpecialResult = List();
+ List labResultList = List();
Future getLaboratoryResult(
{String projectID,
@@ -52,6 +54,27 @@ class LabsService extends BaseService {
}, body: _requestPatientLabSpecialResult.toJson());
}
+ Future getPatientLabResult({PatientLabOrders patientLabOrder}) async {
+ hasError = false;
+ Map body = Map();
+ body['InvoiceNo'] = patientLabOrder.invoiceNo;
+ body['OrderNo'] = patientLabOrder.orderNo;
+ body['Procedure'] = "U/A";
+ body['ProjectID'] = patientLabOrder.projectID;
+ body['ClinicID'] = patientLabOrder.clinicID;
+ //TODO Check the res
+ await baseAppClient.post(GET_Patient_LAB_RESULT,
+ onSuccess: (dynamic response, int statusCode) {
+ patientLabSpecialResult.clear();
+ response['ListPLR'].forEach((lab) {
+ labResultList.add(LabResult.fromJson(lab));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail();
diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart
new file mode 100644
index 00000000..cbc1be97
--- /dev/null
+++ b/lib/core/service/medical/my_balance_service.dart
@@ -0,0 +1,148 @@
+import 'dart:convert';
+
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
+import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+class MyBalanceService extends BaseService {
+ List patientAdvanceBalanceAmountList = List();
+ double totalAdvanceBalanceAmount;
+ List patientInfoList = List();
+ GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse();
+ PatientInfoAndMobileNumber patientInfoAndMobileNumber;
+ String logInTokenID;
+ String verificationCode;
+
+ getPatientAdvanceBalanceAmount() async {
+ hasError = false;
+ super.error = "";
+ await baseAppClient.post(GET_PATIENT_AdVANCE_BALANCE_AMOUNT,
+ onSuccess: (response, statusCode) async {
+ patientAdvanceBalanceAmountList.clear();
+ response['List_PatientAdvanceBalanceAmount'].forEach((item) {
+ patientAdvanceBalanceAmountList
+ .add(PatientAdvanceBalanceAmount.fromJson(item));
+ });
+ totalAdvanceBalanceAmount = response['TotalAdvanceBalanceAmount'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+ getPatientInfoByPatientID({String id}) async {
+ hasError = false;
+ super.error = "";
+ Map body = Map();
+ body['SearchPatientID'] = int.parse(id);
+ body['isDentalAllowedBackend'] = false;
+ await baseAppClient.post(GET_PATIENT_INFO_BY_ID,
+ onSuccess: (response, statusCode) async {
+ patientInfoList.clear();
+ response['GetPatientInfoByPatientIDList'].forEach((item) {
+ patientInfoList.add(PatientInfo.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ getPatientInfoByPatientIDAndMobileNumber() async {
+ hasError = false;
+ super.error = "";
+ Map body = Map();
+ body['isDentalAllowedBackend'] = false;
+ body['MobileNo'] = user.mobileNumber;
+ body['ProjectID'] = user.projectID;
+
+ await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
+ onSuccess: (response, statusCode) async {
+ response['List_PatientInfo'].forEach((item) {
+ patientInfoAndMobileNumber = PatientInfoAndMobileNumber.fromJson(item);
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ super.error = error;
+ }, body: body);
+ }
+
+ sendActivationCodeForAdvancePayment({int patientID,int projectID}) async {
+ hasError = false;
+ super.error = "";
+ Map body = Map();
+ body['PatientID'] = patientID;
+ body['ProjectID'] = projectID;
+ body['isDentalAllowedBackend'] = false;
+
+ await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT,
+ onSuccess: (response, statusCode) async {
+ logInTokenID = response['LogInTokenID'];
+ verificationCode = response['VerificationCode'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ super.error = error;
+ }, body: body);
+ }
+
+ checkActivationCodeForAdvancePayment({String activationCode}) async {
+ hasError = false;
+ super.error = "";
+ Map body = Map();
+ body['activationCode'] = activationCode;
+ body['PatientMobileNumber'] = 'XXXXXXXXXX';
+ body['isDentalAllowedBackend'] = false;
+ body['LogInTokenID'] = logInTokenID;
+
+ await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT,
+ onSuccess: (response, statusCode) async {
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ super.error = error;
+ }, body: body);
+ }
+
+ getSharedRecordByStatus() async {
+ try {
+ var request = GetAllSharedRecordsByStatusReq();
+ request.status = 0;
+ await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS,
+ onSuccess: (dynamic response, int statusCode) {
+ sharedPref.setObject(FAMILY_FILE, response);
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(response);
+ }, onFailure: (String error, int statusCode) {
+ AppToast.showErrorToast(message: error);
+ hasError = true;
+ super.error = error;
+ }, body: request.toJson());
+ } catch (error) {
+ print(error);
+ hasError = true;
+ super.error = error;
+ }
+ }
+
+ getFamilyFiles() async {
+ if (await sharedPref.getObject(FAMILY_FILE) != null) {
+ getAllSharedRecordsByStatusResponse =
+ GetAllSharedRecordsByStatusResponse.fromJson(
+ await sharedPref.getObject(FAMILY_FILE));
+ return getAllSharedRecordsByStatusResponse;
+ } else {
+ return getSharedRecordByStatus();
+ }
+ }
+}
diff --git a/lib/core/service/medical/my_doctor_service.dart b/lib/core/service/medical/my_doctor_service.dart
index d688c7e7..4df3ce8a 100644
--- a/lib/core/service/medical/my_doctor_service.dart
+++ b/lib/core/service/medical/my_doctor_service.dart
@@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
-import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_appointmentt.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart';
@@ -9,7 +8,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
class MyDoctorService extends BaseService {
- List patientDoctorAppointmentList = List();
+ List patientDoctorAppointmentList = List();
DoctorProfile doctorProfile;
DoctorList doctorList;
DoctorRating doctorRating = DoctorRating();
@@ -51,7 +50,7 @@ class MyDoctorService extends BaseService {
patientDoctorAppointmentList.clear();
response['PatientDoctorAppointmentResultList'].forEach((hospital) {
patientDoctorAppointmentList
- .add(PatientDoctorAppointment.fromJson(hospital));
+ .add(DoctorList.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
diff --git a/lib/core/service/medical/reports_monthly_service.dart b/lib/core/service/medical/reports_monthly_service.dart
new file mode 100644
index 00000000..5e643669
--- /dev/null
+++ b/lib/core/service/medical/reports_monthly_service.dart
@@ -0,0 +1,83 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
+import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
+
+class ReportsMonthlyService extends BaseService {
+ List reportsList = List();
+ List appointHistoryList = List();
+
+ RequestReports _requestReports = RequestReports(
+ isReport: true,
+ encounterType: 1,
+ requestType: 1,
+ versionID: 5.5,
+ channel: 3,
+ languageID: 2,
+ iPAdress: "10.20.10.20",
+ generalid: 'Cs2020@2016\$2958',
+ patientOutSA: 0,
+ sessionID: 'KIbLoqkytuKJEWECHQ',
+ isDentalAllowedBackend: false,
+ deviceTypeID: 2,
+ patientID: 1231755,
+ tokenID: '@dm!n',
+ patientTypeID: 1,
+ patientType: 1);
+
+ Future getReports() async {
+ hasError = false;
+ await baseAppClient.post(REPORTS,
+ onSuccess: (dynamic response, int statusCode) {
+ reportsList.clear();
+ response['GetPatientMedicalStatus'].forEach((reports) {
+ reportsList.add(Reports.fromJson(reports));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestReports.toJson());
+ }
+
+ Future getPatentAppointmentHistory() async {
+ hasError = false;
+ Map body = new Map();
+ body['IsForMedicalReport'] = true;
+ await baseAppClient.post(GET_PATIENT_AppointmentHistory,
+ onSuccess: (dynamic response, int statusCode) {
+ appointHistoryList = [];
+ response['AppoimentAllHistoryResultList'].forEach((appoint) {
+ appointHistoryList.add(AppointmentHistory.fromJson(appoint));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future insertRequestForMedicalReport(
+ AppointmentHistory appointmentHistory) async {
+ Map body = new Map();
+ body['ClinicID'] = appointmentHistory.clinicID;
+ body['DoctorID'] = appointmentHistory.doctorID;
+ body['SetupID'] = appointmentHistory.setupID;
+ body['EncounterNo'] = appointmentHistory.appointmentNo;
+ body['EncounterType'] = 1;// appointmentHistory.appointmentType;
+ body['IsActive'] = appointmentHistory.isActiveDoctor;
+ body['ProjectID'] = appointmentHistory.projectID;
+ body['Remarks'] = "";
+ body['ProcedureId'] = "";
+ body['RequestType'] = 1;
+ body['Source'] = 2;
+ body['Status'] = 1;
+ body['CreatedBy'] = 102;
+ hasError = false;
+ await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart
index b8e5f426..316872ed 100644
--- a/lib/core/service/medical/reports_service.dart
+++ b/lib/core/service/medical/reports_service.dart
@@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
class ReportsService extends BaseService {
List reportsList = List();
List appointHistoryList = List();
-
+ String userAgreementContent = "";
RequestReports _requestReports = RequestReports(
isReport: true,
encounterType: 1,
@@ -44,7 +44,7 @@ class ReportsService extends BaseService {
hasError = false;
Map body = new Map();
body['IsForMedicalReport'] = true;
- await baseAppClient.post(GET_PATIENT_AppointmentHistory,
+ await baseAppClient.post(GET_PATIENT_AppointmentHistory,
onSuccess: (dynamic response, int statusCode) {
appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) {
@@ -56,6 +56,33 @@ class ReportsService extends BaseService {
}, body: body);
}
+ Future getUserTermsAndConditions() async {
+ hasError = false;
+ await baseAppClient.post(GET_USER_TERMS,
+ onSuccess: (dynamic response, int statusCode) {
+ userAgreementContent = response['UserAgreementContent'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+
+ Future updatePatientHealthSummaryReport({bool isSummary}) async {
+ Map body = Map();
+ body['RSummaryReport'] = isSummary;
+ hasError = false;
+ await baseAppClient.post(UPDATE_HEALTH_TERMS,
+ onSuccess: (dynamic response, int statusCode) {
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+
+
Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async {
Map body = new Map();
@@ -63,7 +90,7 @@ class ReportsService extends BaseService {
body['DoctorID'] = appointmentHistory.doctorID;
body['SetupID'] = appointmentHistory.setupID;
body['EncounterNo'] = appointmentHistory.appointmentNo;
- body['EncounterType'] = 1;// appointmentHistory.appointmentType;
+ body['EncounterType'] = 1; // appointmentHistory.appointmentType;
body['IsActive'] = appointmentHistory.isActiveDoctor;
body['ProjectID'] = appointmentHistory.projectID;
body['Remarks'] = "";
@@ -73,7 +100,7 @@ class ReportsService extends BaseService {
body['Status'] = 1;
body['CreatedBy'] = 102;
hasError = false;
- await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
+ await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart
index 189e26d8..297909a4 100644
--- a/lib/core/service/vaccine_service.dart
+++ b/lib/core/service/vaccine_service.dart
@@ -1,31 +1,20 @@
import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart';
+import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_on_hand.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
class VaccineService extends BaseService {
List _vaccineList = List();
+ List vaccinationItemList = List();
+ List vaccinationOnHandList = List();
List get vaccineList => _vaccineList;
- VaccineModel _vaccineModel = VaccineModel(
- to: "0",
- from: "0",
- channel: 3,
- deviceTypeID: 2,
- generalid: "Cs2020@2016\$2958",
- iPAdress: "10.20.10.20",
- isDentalAllowedBackend: false,
- languageID: 2,
- patientID: 1231755,
- patientOutSA: 0,
- patientType: 1,
- patientTypeID: 1,
- sessionID: "uoKFXSLUwEaHYPwKZNA",
- tokenID: "@dm!n",
- versionID: 5.5,
- );
-
Future getMyVaccine() async {
+ Map body = Map();
+ body['To'] = "0";
+ body['From'] = "0";
hasError = false;
_vaccineList.clear();
await baseAppClient.post(GET_VACCINES,
@@ -36,8 +25,51 @@ class VaccineService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _vaccineModel.toJson());
+ }, body: body);
}
- Future sendEmail() async {}
+ Future sendEmail() async {
+ Map body = Map();
+ body['ListVaccines'] = vaccineList.map((v) => v.toJson()).toList();
+ body['To'] = user.emailAddress;
+ body['DateofBirth'] = user.dateofBirth;
+ body['PatientIditificationNum'] = user.patientIdentificationNo;
+ body['PatientMobileNumber'] = user.mobileNumber;
+ body['PatientName'] = user.firstName + " " + user.lastName;
+
+ hasError = false;
+
+ await baseAppClient.post(GET_VACCINES_EMAIL,
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future getMyVaccinationItem() async {
+ await baseAppClient.post(GET_VACCINATIONS_ITEMS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['GetVaccinationsList'].forEach((item) {
+ vaccinationItemList.add(VaccinationItem.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+ Future getMyVaccinationOnHand({String pItemCode}) async {
+ Map body = Map();
+ body['P_ITEM_CODE'] = pItemCode;
+ await baseAppClient.post(GET_VACCINATION_ONHAND,
+ onSuccess: (dynamic response, int statusCode) {
+ response['GetVaccinationOnHandList'].forEach((item) {
+ vaccinationOnHandList.add(VaccinationOnHand.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
}
diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart
new file mode 100644
index 00000000..db1acbf0
--- /dev/null
+++ b/lib/core/viewModels/er/am_request_view_model.dart
@@ -0,0 +1,32 @@
+
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
+import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import '../base_view_model.dart';
+import '../../../locator.dart';
+
+class AmRequestViewModel extends BaseViewModel{
+
+
+ AmService _amService = locator();
+
+ List get AmRequestModeList=>
+ _amService.AmModelList;
+
+ getAmRequestOrders({int id, int projectID}) async {
+ setState(ViewState.Busy);
+
+
+ await _amService.getAllTransportationOrders();
+
+ if ( _amService.hasError) {
+ error = _amService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/lib/core/viewModels/er/near_hospital_view_model.dart b/lib/core/viewModels/er/near_hospital_view_model.dart
new file mode 100644
index 00000000..f12aa28f
--- /dev/null
+++ b/lib/core/viewModels/er/near_hospital_view_model.dart
@@ -0,0 +1,31 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
+
+import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
+
+import '../../../locator.dart';
+
+class NearHospitalViewModel extends BaseViewModel {
+ ErService _erService = locator();
+
+ List get ProjectAvgERWaitingTimeModeList =>
+ _erService.projectAvgERWaitingTimeModelList;
+
+ getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
+ setState(ViewState.Busy);
+
+ if (id != null && projectID != null) {
+ await _erService.getProjectAvgERWaitingTimeOrders(
+ id: id, projectID: projectID);
+ } else {
+ await _erService.getProjectAvgERWaitingTimeOrders();
+ }
+ if (_erService.hasError) {
+ error = _erService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+}
diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart
index a6975360..e99a53f6 100644
--- a/lib/core/viewModels/insurance_card_View_model.dart
+++ b/lib/core/viewModels/insurance_card_View_model.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dar
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import '../../locator.dart';
import 'base_view_model.dart';
@@ -20,6 +21,9 @@ class InsuranceViewModel extends BaseViewModel {
List get insuranceApproval =>
_insuranceCardService.insuranceApproval;
+ GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse =>
+ _insuranceCardService.getAllSharedRecordsByStatusResponse;
+
Future getInsurance() async {
hasError = false;
_insuranceCardService.clearInsuranceCard();
@@ -41,7 +45,7 @@ class InsuranceViewModel extends BaseViewModel {
error = _insuranceCardService.error;
setState(ViewState.ErrorLocal);
} else
- setState(ViewState.Idle);
+ getFamilyFiles();
}
Future getInsuranceApproval({int appointmentNo}) async {
@@ -59,4 +63,13 @@ class InsuranceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
+ Future getFamilyFiles() async {
+ await _insuranceCardService.getFamilyFiles();
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
}
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 1efdfb7c..032aeb1e 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -1,6 +1,6 @@
-
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
@@ -78,13 +78,32 @@ class LabsViewModel extends BaseViewModel {
List get patientLabSpecialResult =>
_labsService.patientLabSpecialResult;
+ List get labResultList => _labsService.labResultList;
+
getLaboratoryResult(
{String projectID,
int clinicID,
String invoiceNo,
String orderNo}) async {
setState(ViewState.Busy);
- await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,orderNo: orderNo,projectID: projectID,clinicID: clinicID);
+ await _labsService.getLaboratoryResult(
+ invoiceNo: invoiceNo,
+ orderNo: orderNo,
+ projectID: projectID,
+ clinicID: clinicID);
+ if (_labsService.hasError) {
+ error = _labsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ getPatientLabResult({PatientLabOrders patientLabOrder}) async {
+ setState(ViewState.Busy);
+ await _labsService.getPatientLabResult(
+ patientLabOrder: patientLabOrder
+ );
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart
new file mode 100644
index 00000000..350e9d89
--- /dev/null
+++ b/lib/core/viewModels/medical/my_balance_view_model.dart
@@ -0,0 +1,116 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
+import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
+import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
+import 'package:diplomaticquarterapp/core/service/medical/my_balance_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import 'package:diplomaticquarterapp/locator.dart';
+import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+class MyBalanceViewModel extends BaseViewModel {
+ MyBalanceService _myBalanceService = locator();
+
+ HospitalService _hospitalService = locator();
+
+ List get hospitals => _hospitalService.hospitals;
+
+ List get patientAdvanceBalanceAmountList =>
+ _myBalanceService.patientAdvanceBalanceAmountList;
+
+ double get totalAdvanceBalanceAmount =>
+ _myBalanceService.totalAdvanceBalanceAmount;
+
+ GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse =>
+ _myBalanceService.getAllSharedRecordsByStatusResponse;
+
+ List get patientInfoList => _myBalanceService.patientInfoList;
+
+ PatientInfoAndMobileNumber get patientInfoAndMobileNumber =>
+ _myBalanceService.patientInfoAndMobileNumber;
+
+
+ String get logInTokenID => _myBalanceService.logInTokenID;
+ String get verificationCode => _myBalanceService.verificationCode;
+
+ getPatientAdvanceBalanceAmount() async {
+ setState(ViewState.Busy);
+ await _myBalanceService.getPatientAdvanceBalanceAmount();
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future getHospitals() async {
+ setState(ViewState.Busy);
+ await _hospitalService.getHospitals();
+ if (_hospitalService.hasError) {
+ error = _hospitalService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future getPatientInfoByPatientID({String id}) async {
+ setState(ViewState.Busy);
+ await _myBalanceService.getPatientInfoByPatientID(id: id);
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future getPatientInfoByPatientIDAndMobileNumber() async {
+ setState(ViewState.Busy);
+ await _myBalanceService.getPatientInfoByPatientIDAndMobileNumber();
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future sendActivationCodeForAdvancePayment({int patientID,int projectID}) async {
+ setState(ViewState.Busy);
+ await _myBalanceService.sendActivationCodeForAdvancePayment(patientID: patientID,projectID: projectID);
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+ Future checkActivationCodeForAdvancePayment({String activationCode}) async {
+ setState(ViewState.Busy);
+ await _myBalanceService.checkActivationCodeForAdvancePayment(activationCode: activationCode);
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.ErrorLocal);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future getFamilyFiles() async {
+ setState(ViewState.Busy);
+ await _myBalanceService.getFamilyFiles();
+ if (_myBalanceService.hasError) {
+ error = _myBalanceService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+}
diff --git a/lib/core/viewModels/medical/my_doctor_view_model.dart b/lib/core/viewModels/medical/my_doctor_view_model.dart
index f1db7804..266157ff 100644
--- a/lib/core/viewModels/medical/my_doctor_view_model.dart
+++ b/lib/core/viewModels/medical/my_doctor_view_model.dart
@@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
-import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@@ -65,9 +64,7 @@ class MyDoctorViewModel extends BaseViewModel {
.toList();
if (doctorByHospital.length != 0) {
- _patientDoctorAppointmentListHospital[
- _patientDoctorAppointmentListHospital
- .indexOf(doctorByHospital[0])]
+ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
diff --git a/lib/core/viewModels/medical/patient_sick_leave_view_model.dart b/lib/core/viewModels/medical/patient_sick_leave_view_model.dart
new file mode 100644
index 00000000..6addf833
--- /dev/null
+++ b/lib/core/viewModels/medical/patient_sick_leave_view_model.dart
@@ -0,0 +1,42 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
+import 'package:diplomaticquarterapp/core/service/medical/PatientSickLeaveService.dart';
+import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import 'package:diplomaticquarterapp/locator.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+class PatientSickLeaveViewMode extends BaseViewModel {
+ PatientSickLeaveService _patientSickLeaveService =
+ locator();
+
+ List get sickLeaveList => _patientSickLeaveService.sickLeaveList;
+
+ getSickLeave() async {
+ setState(ViewState.Busy);
+ await _patientSickLeaveService.getSickLeave();
+ if (_patientSickLeaveService.hasError) {
+ error = _patientSickLeaveService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ Future sendSickLeaveEmail(
+ {String message,
+ int requestNo,
+ String projectName,
+ String doctorName,int projectID,String setupID}) async {
+ setState(ViewState.Busy);
+ await _patientSickLeaveService.sendSickLeaveEmail(
+ requestNo: requestNo, projectName: projectName, doctorName: doctorName,projectID: projectID,setupID: setupID);
+ if (_patientSickLeaveService.hasError) {
+ error = _patientSickLeaveService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ AppToast.showSuccessToast(message: message);
+ setState(ViewState.Idle);
+ }
+ }
+}
diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart
new file mode 100644
index 00000000..3ae196f5
--- /dev/null
+++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart
@@ -0,0 +1,46 @@
+import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+import '../../../core/enum/reportfilter_type.dart';
+import '../../../core/enum/viewstate.dart';
+import '../../../core/model/reports/Reports.dart';
+import '../../../core/service/medical/reports_service.dart';
+import '../../../locator.dart';
+import '../base_view_model.dart';
+
+class ReportsMonthlyViewModel extends BaseViewModel {
+ ReportFilterType filterType = ReportFilterType.Requested;
+
+ ReportsService _reportsService = locator();
+
+
+
+ String get userAgreementContent => _reportsService.userAgreementContent;
+
+ getUserTermsAndConditions() async{
+ setState(ViewState.Busy);
+ await _reportsService.getUserTermsAndConditions();
+ if (_reportsService.hasError) {
+ error = _reportsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ updatePatientHealthSummaryReport({String message, bool isSummary})async{
+ setState(ViewState.BusyLocal);
+ await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
+ if (_reportsService.hasError) {
+ error = _reportsService.error;
+ AppToast.showErrorToast(message: error);
+ setState(ViewState.ErrorLocal);
+ } else {
+ AppToast.showSuccessToast(message: message);
+ setState(ViewState.Idle);
+ }
+ }
+
+
+
+}
diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart
index 40cdd432..5975daf2 100644
--- a/lib/core/viewModels/project_view_model.dart
+++ b/lib/core/viewModels/project_view_model.dart
@@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart';
class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale;
- String currentLanguage = 'ar';
+ String currentLanguage = 'en';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
@@ -45,7 +45,7 @@ class ProjectViewModel extends BaseViewModel {
void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_LANGUAGE);
- _appLocale = Locale(currentLanguage ?? 'ar');
+ _appLocale = Locale(currentLanguage ?? 'en');
_isArabic = currentLanguage != null
? currentLanguage == 'ar' ? true : false
: true;
diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart
index a3b6c057..9f8dfecf 100644
--- a/lib/core/viewModels/vaccine_view_model.dart
+++ b/lib/core/viewModels/vaccine_view_model.dart
@@ -1,3 +1,6 @@
+import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
import 'base_view_model.dart';
import '../../locator.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
@@ -10,10 +13,11 @@ class VaccineViewModel extends BaseViewModel {
VaccineService _vaccineService = locator();
List get vaccineList => _vaccineService.vaccineList;
+ List get vaccinationItemList => _vaccineService.vaccinationItemList;
+
Future getVaccine() async {
hasError = false;
- //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _vaccineService.getMyVaccine();
if (_vaccineService.hasError) {
@@ -22,4 +26,40 @@ class VaccineViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+
+ Future getMyVaccinationItem() async {
+ hasError = false;
+ setState(ViewState.Busy);
+ await _vaccineService.getMyVaccinationItem();
+ if (_vaccineService.hasError) {
+ error = _vaccineService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future getMyVaccinationOnHand({String pItemCode}) async {
+ hasError = false;
+ setState(ViewState.Busy);
+ await _vaccineService.getMyVaccinationOnHand(pItemCode: pItemCode);
+ if (_vaccineService.hasError) {
+ error = _vaccineService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future sendEmail({String message}) async {
+ hasError = false;
+ setState(ViewState.BusyLocal);
+ await _vaccineService.sendEmail();
+ if (_vaccineService.hasError) {
+ error = _vaccineService.error;
+ setState(ViewState.ErrorLocal);
+ AppToast.showErrorToast(message: error);
+ } else {
+ AppToast.showSuccessToast(message: message);
+ setState(ViewState.Idle);
+ }
+ }
}
diff --git a/lib/locator.dart b/lib/locator.dart
index b2e974a8..93715c99 100644
--- a/lib/locator.dart
+++ b/lib/locator.dart
@@ -5,23 +5,33 @@ import 'package:get_it/get_it.dart';
import 'core/service/appointment_rate_service.dart';
import 'core/service/dashboard_service.dart';
+import 'core/service/er/am_service.dart';
+import 'core/service/er/er_service.dart';
import 'core/service/feedback/feedback_service.dart';
import 'core/service/hospital_service.dart';
+import 'core/service/medical/PatientSickLeaveService.dart';
import 'core/service/medical/labs_service.dart';
import 'core/service/medical/medical_service.dart';
+import 'core/service/medical/my_balance_service.dart';
import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_service.dart';
+import 'core/service/medical/reports_monthly_service.dart';
import 'core/service/medical/vital_sign_service.dart';
import 'core/viewModels/appointment_rate_view_model.dart';
+import 'core/viewModels/er/am_request_view_model.dart';
+import 'core/viewModels/er/near_hospital_view_model.dart';
import 'core/viewModels/feedback/feedback_view_model.dart';
import 'core/service/medical/reports_service.dart';
import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/medical/labs_view_model.dart';
import 'core/viewModels/medical/medical_view_model.dart';
+import 'core/viewModels/medical/my_balance_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart';
+import 'core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/medical/radiology_view_model.dart';
+import 'core/viewModels/medical/reports_monthly_view_model.dart';
import 'core/viewModels/medical/vital_sign_view_model.dart';
import 'core/viewModels/medical/reports_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
@@ -53,6 +63,13 @@ void setupLocator() {
locator.registerLazySingleton(() => AppointmentRateService());
locator.registerLazySingleton(() => QrService());
locator.registerFactory(() => VaccineService());
+ locator.registerLazySingleton(() => ReportsMonthlyService());
+ locator.registerLazySingleton(() => ErService());
+ locator.registerLazySingleton(() => AmService());
+
+
+ locator.registerLazySingleton(() => PatientSickLeaveService());
+ locator.registerLazySingleton(() => MyBalanceService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
@@ -70,5 +87,10 @@ void setupLocator() {
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel());
locator.registerFactory(() => QrViewModel());
+ locator.registerFactory(() => ReportsMonthlyViewModel());
+ locator.registerFactory(() => NearHospitalViewModel());
+ locator.registerFactory(() => AmRequestViewModel());
+ locator.registerFactory(() => PatientSickLeaveViewMode());
+ locator.registerFactory(() => MyBalanceViewModel());
}
diff --git a/lib/main.dart b/lib/main.dart
index ce0e097c..ec42e7a3 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,7 +1,4 @@
-import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
-import 'package:diplomaticquarterapp/pages/login/login.dart';
import 'package:diplomaticquarterapp/routes.dart';
-import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
@@ -69,9 +66,9 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
- scaffoldBackgroundColor:Hexcolor('#E0E0E0'),// Colors.grey[100],
+ scaffoldBackgroundColor:Hexcolor('#E9E9E9'),// Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
- textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
+ textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100].withOpacity(0.4),
@@ -80,7 +77,7 @@ class MyApp extends StatelessWidget {
bottomSheetTheme:BottomSheetThemeData(
backgroundColor: Hexcolor('#E0E0E0')
) ,
- cursorColor: Color.fromRGBO(78, 62, 253, 1.0),
+ cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey[700],
diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
index a935542a..9ba1fb8e 100644
--- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart
+++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
@@ -272,3 +272,13 @@ class AppoitmentAllHistoryResultList {
return data;
}
}
+
+class PatientAppointmentList {
+ String filterName = "";
+ List patientDoctorAppointmentList = List();
+
+ PatientAppointmentList(
+ {this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) {
+ patientDoctorAppointmentList.add(patientDoctorAppointment);
+ }
+}
diff --git a/lib/models/Appointments/DentalChiefComplaintsModel.dart b/lib/models/Appointments/DentalChiefComplaintsModel.dart
new file mode 100644
index 00000000..c15b828a
--- /dev/null
+++ b/lib/models/Appointments/DentalChiefComplaintsModel.dart
@@ -0,0 +1,48 @@
+class DentalChiefComplaintsModel {
+ List listDentalChiefComplain;
+
+ DentalChiefComplaintsModel({this.listDentalChiefComplain});
+
+ DentalChiefComplaintsModel.fromJson(Map json) {
+ if (json['List_DentalChiefComplain'] != null) {
+ listDentalChiefComplain = new List();
+ json['List_DentalChiefComplain'].forEach((v) {
+ listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v));
+ });
+ }
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.listDentalChiefComplain != null) {
+ data['List_DentalChiefComplain'] =
+ this.listDentalChiefComplain.map((v) => v.toJson()).toList();
+ }
+ return data;
+ }
+}
+
+class ListDentalChiefComplain {
+ int projectID;
+ int iD;
+ String name;
+ String nameN;
+
+ ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN});
+
+ ListDentalChiefComplain.fromJson(Map json) {
+ projectID = json['ProjectID'];
+ iD = json['ID'];
+ name = json['Name'];
+ nameN = json['NameN'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProjectID'] = this.projectID;
+ data['ID'] = this.iD;
+ data['Name'] = this.name;
+ data['NameN'] = this.nameN;
+ return data;
+ }
+}
diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart
index 1ef6ee72..65d28910 100644
--- a/lib/models/Appointments/DoctorListResponse.dart
+++ b/lib/models/Appointments/DoctorListResponse.dart
@@ -1,5 +1,3 @@
-import 'package:intl/intl.dart';
-
class DoctorList {
int clinicID;
String clinicName;
@@ -32,7 +30,7 @@ class DoctorList {
int noOfPatientsRate;
int originalClinicID;
int personRate;
- int projectDistanceInKiloMeters;
+ dynamic projectDistanceInKiloMeters;
String qR;
dynamic qRString;
int rateNumber;
@@ -87,7 +85,7 @@ class DoctorList {
clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle'];
iD = json['ID'];
- name = json['Name'];
+ name = json['DoctorName']??json['Name'];
projectID = json['ProjectID'];
projectName = json['ProjectName'];
actualDoctorRate = json['ActualDoctorRate'];
@@ -120,7 +118,7 @@ class DoctorList {
rateNumber = json['RateNumber'];
serviceID = json['ServiceID'];
setupID = json['SetupID'];
- if (json.containsKey('Speciality'))
+ if (json.containsKey('Speciality') && json['Speciality']!=null)
speciality = json['Speciality'].cast();
workingHours = json['WorkingHours'];
}
@@ -170,12 +168,13 @@ class DoctorList {
}
}
-class DoctorListAppointmentList {
+class PatientDoctorAppointmentList {
String filterName = "";
+ String distanceInKMs = "";
List patientDoctorAppointmentList = List();
- DoctorListAppointmentList(
- {this.filterName, DoctorList patientDoctorAppointment}) {
+ PatientDoctorAppointmentList(
+ {this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}
diff --git a/lib/models/Appointments/SearchInfoModel.dart b/lib/models/Appointments/SearchInfoModel.dart
new file mode 100644
index 00000000..f5500bca
--- /dev/null
+++ b/lib/models/Appointments/SearchInfoModel.dart
@@ -0,0 +1,10 @@
+class SearchInfo {
+ int ProjectID;
+ int ClinicID;
+ String DoctorName;
+ String SelectedDate;
+ String SelectedTime;
+ String currentLat;
+ String currentLong;
+ DateTime date;
+}
diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart
index 8c1d781c..88ecdb6b 100644
--- a/lib/pages/BookAppointment/BookConfirm.dart
+++ b/lib/pages/BookAppointment/BookConfirm.dart
@@ -502,8 +502,6 @@ class _BookConfirmState extends State {
Future navigateToBookSuccess(context, DoctorList docObject,
PatientShareResponse patientShareResponse) async {
- print(widget.appoDateFormatted);
-// print(widget.appoTimeFormatted);
Navigator.push(
context,
diff --git a/lib/pages/BookAppointment/BookingOptions.dart b/lib/pages/BookAppointment/BookingOptions.dart
index dacb25e9..b6dc5500 100644
--- a/lib/pages/BookAppointment/BookingOptions.dart
+++ b/lib/pages/BookAppointment/BookingOptions.dart
@@ -1,19 +1,36 @@
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/CardCommon.dart';
-import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
import '../../uitl/translations_delegate_base.dart';
-class BookingOptions extends StatelessWidget {
+class BookingOptions extends StatefulWidget {
final bool isAppbar;
+
BookingOptions({this.isAppbar = false});
+
+ @override
+ _BookingOptionsState createState() => _BookingOptionsState();
+}
+
+class _BookingOptionsState extends State {
+ LocationUtils locationUtils;
+
+ @override
+ void initState() {
+ locationUtils =
+ new LocationUtils(isShowConfirmDialog: true, context: context);
+ WidgetsBinding.instance
+ .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
+
+ super.initState();
+ }
+
@override
Widget build(BuildContext context) {
- final searchValue = Provider.of(context);
return AppScaffold(
- isShowAppBar: isAppbar,
+ isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo,
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart
new file mode 100644
index 00000000..9d3da450
--- /dev/null
+++ b/lib/pages/BookAppointment/DentalComplaints.dart
@@ -0,0 +1,82 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
+import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
+import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
+import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
+
+class DentalComplaints extends StatefulWidget {
+ SearchInfo searchInfo;
+
+ DentalComplaints({@required this.searchInfo});
+
+ @override
+ _DentalComplaintsState createState() => _DentalComplaintsState();
+}
+
+class _DentalComplaintsState extends State {
+ List complaintsList = [];
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+ bool isDataLoaded = false;
+ var languageID;
+
+ @override
+ void initState() {
+ WidgetsBinding.instance
+ .addPostFrameCallback((_) => getChiefComplaintsList());
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: "Symptoms",
+ body: Container(
+ margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
+ child: ListView.builder(
+ itemCount: complaintsList.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Container(
+ margin: EdgeInsets.only(bottom: 10.0),
+ child: DentalComplaintCard(
+ listDentalChiefComplain: complaintsList[index],
+ languageID: languageID,
+ ),
+ );
+ },
+ ),
+ ),
+ );
+ }
+
+ getLanguageID() async {
+ languageID = await sharedPref.getString(APP_LANGUAGE);
+ }
+
+ getChiefComplaintsList() {
+ getLanguageID();
+ ClinicListService service = new ClinicListService();
+ service
+ .getChiefComplaintsList(
+ widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ print(res['List_DentalChiefComplain']);
+ setState(() {
+ res['List_DentalChiefComplain'].forEach((v) {
+ complaintsList.add(new ListDentalChiefComplain.fromJson(v));
+ });
+ print(complaintsList.length);
+ });
+ } else {}
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
+}
diff --git a/lib/pages/BookAppointment/Search.dart b/lib/pages/BookAppointment/Search.dart
index 9af6b449..08b49462 100644
--- a/lib/pages/BookAppointment/Search.dart
+++ b/lib/pages/BookAppointment/Search.dart
@@ -1,13 +1,17 @@
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
-import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart';
import 'package:flutter/material.dart';
+import 'package:geolocator/geolocator.dart';
class Search extends StatefulWidget {
final int type;
+
Search({this.type = 0});
+
@override
_SearchState createState() => _SearchState();
}
diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart
index 7da5112b..2b5fac17 100644
--- a/lib/pages/BookAppointment/SearchResults.dart
+++ b/lib/pages/BookAppointment/SearchResults.dart
@@ -1,15 +1,17 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
-import 'widgets/DoctorView.dart';
-
class SearchResults extends StatefulWidget {
List doctorsList = [];
+ List patientDoctorAppointmentListHospital;
- SearchResults({@required this.doctorsList});
+ SearchResults(
+ {@required this.doctorsList, this.patientDoctorAppointmentListHospital});
@override
_SearchResultsState createState() => _SearchResultsState();
@@ -21,23 +23,7 @@ class _SearchResultsState extends State {
@override
void initState() {
- event.controller.stream.listen((p) {
- // if (p['project_id'] != null) {
- // tempList = [];
- // widget.doctorsList.forEach((e) => {
- // if (e.projectID == int.parse(p['project_id'])) {tempList.add(e)}
- // });
- // } else if (p['doctor_id'] != null) {
- // tempList = [];
- // widget.doctorsList.forEach((e) => {
- // if (e.doctorID == int.parse(p['doctor_id'])) {tempList.add(e)}
- // });
- // DoctorView().getDoctorsProfile(context, tempList[0], isAppo: true);
- // }
- // setState(() {
- // widget.doctorsList = tempList;
- // });
- });
+ event.controller.stream.listen((p) {});
super.initState();
}
@@ -47,20 +33,31 @@ class _SearchResultsState extends State {
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
body: Container(
- margin: EdgeInsets.only(bottom: 10.0),
+ margin: EdgeInsets.all(10.0),
child: SingleChildScrollView(
- child: ListView.builder(
- scrollDirection: Axis.vertical,
- shrinkWrap: true,
- physics: ScrollPhysics(),
- padding: EdgeInsets.all(0.0),
- itemCount: widget.doctorsList.length,
- itemBuilder: (context, index) {
- return DoctorView(
- //AJ note
- doctor: widget.doctorsList[index],
- );
- },
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget.patientDoctorAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ .patientDoctorAppointmentListHospital[index].filterName + " - " +widget
+ .patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ .patientDoctorAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return DoctorView(
+ doctor: doctor,
+ );
+ }).toList(),
+ )),
+ )
+ ],
),
),
),
diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart
index bfadd3b0..6b3eff38 100644
--- a/lib/pages/BookAppointment/components/SearchByClinic.dart
+++ b/lib/pages/BookAppointment/components/SearchByClinic.dart
@@ -1,21 +1,19 @@
-import 'dart:convert';
+import "dart:collection";
+import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
-import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
-import '../SearchResults.dart';
-import "dart:collection";
-
class SearchByClinic extends StatefulWidget {
@override
_SearchByClinicState createState() => _SearchByClinicState();
@@ -24,20 +22,15 @@ class SearchByClinic extends StatefulWidget {
class _SearchByClinicState extends State {
bool nearestAppo = false;
String dropdownValue;
+ String projectDropdownValue;
var event = RobotProvider();
List clinicsList = [];
+ List projectsList = [];
+ bool isMobileAppDentalAllow = false;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
- // event.controller.stream.listen((p) {
- // if (p['clinic_id'] != null) {
- // // setState(() {
- // dropdownValue = p['clinic_id'].toString();
- // //});
- // getDoctorsList(context);
- // }
- // });
super.initState();
}
@@ -89,25 +82,91 @@ class _SearchByClinicState extends State {
onChanged: (newValue) {
setState(() {
dropdownValue = newValue;
-
- getDoctorsList(context);
+ if (!isDentalSelectedAndSupported() && !nearestAppo) {
+ projectDropdownValue = "";
+ getDoctorsList(context);
+ }
});
},
),
)),
+ isDentalSelectedAndSupported() == true || nearestAppo
+ ? Container(
+ height: 60.0,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(
+ color: Colors.grey[400],
+ width: 1.0,
+ ),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ padding: EdgeInsets.all(8.0),
+ width: MediaQuery.of(context).size.width,
+ margin: EdgeInsets.only(top: 15.0),
+ child: DropdownButtonHideUnderline(
+ child: DropdownButton(
+ hint: new Text("Select Project"),
+ value: projectDropdownValue,
+ items: projectsList.map((item) {
+ return new DropdownMenuItem(
+ value: item.mainProjectID.toString(),
+ child: new Text(item.name),
+ );
+ }).toList(),
+ onChanged: (newValue) {
+ setState(() {
+ projectDropdownValue = newValue;
+ getDoctorsList(context);
+ });
+ },
+ ),
+ ))
+ : Container(),
],
),
);
}
+ bool isDentalSelectedAndSupported() {
+ return dropdownValue != "" &&
+ (dropdownValue == "17") &&
+ isMobileAppDentalAllow;
+ }
+
getClinicsList() {
ClinicListService service = new ClinicListService();
- service.getClinicsList(context).then((res) {
+ service
+ .getClinicsList(context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ setState(() {
+ isMobileAppDentalAllow = res['ISMobileAppDentalAllow'];
+ res['ListClinicCentralized'].forEach((v) {
+ clinicsList.add(new ListClinicCentralized.fromJson(v));
+ });
+ });
+ } else {}
+ })
+ .catchError((err) {
+ print(err);
+ })
+ .showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
+ .then((value) {
+ getProjectsList();
+ });
+ }
+
+ getProjectsList() {
+ ClinicListService service = new ClinicListService();
+ service.getProjectsList(context).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
- res['ListClinicCentralized'].forEach((v) {
- clinicsList.add(new ListClinicCentralized.fromJson(v));
+ res['ListProject'].forEach((v) {
+ projectsList.add(new HospitalsModel.fromJson(v));
});
+ print(projectsList.length);
});
} else {}
}).catchError((err) {
@@ -117,54 +176,81 @@ class _SearchByClinicState extends State {
}
getDoctorsList(BuildContext context) {
- List doctorsList = [];
- //========================
+ SearchInfo searchInfo = new SearchInfo();
+ if (dropdownValue == "17") {
+ searchInfo.ProjectID = int.parse(projectDropdownValue);
+ searchInfo.ClinicID = int.parse(dropdownValue);
+ searchInfo.date = DateTime.now();
- List arr = [];
- var distinctIds;
- List result;
- int numAll;
- //=========================
- DoctorsListService service = new DoctorsListService();
- service.getDoctorsList(int.parse(dropdownValue), 0, context).then((res) {
- if (res['MessageStatus'] == 1) {
- setState(() {
- if (res['DoctorList'].length != 0) {
- doctorsList.clear();
- res['DoctorList'].forEach((v) {
- doctorsList.add(new DoctorList.fromJson(v));
+ navigateToDentalComplaints(context, searchInfo);
+ } else {
+ List doctorsList = [];
+ List arr = [];
+ List arrDistance = [];
+ List result;
+ int numAll;
+ DoctorsListService service = new DoctorsListService();
+ service
+ .getDoctorsList(
+ int.parse(dropdownValue),
+ projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
+ nearestAppo,
+ context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ setState(() {
+ if (res['DoctorList'].length != 0) {
+ print(res['DoctorList']);
+ doctorsList.clear();
+ res['DoctorList'].forEach((v) {
+ doctorsList.add(new DoctorList.fromJson(v));
- arr.add(new DoctorList.fromJson(v).projectName);
- // print(DoctorList.fromJson(v).projectName);
- // print(DoctorList.fromJson(v).projectDistanceInKiloMeters);
- // distinctIds = result.toSet().toList();
- });
- } else {}
- });
+ arr.add(new DoctorList.fromJson(v).projectName);
+ arrDistance.add(new DoctorList.fromJson(v)
+ .projectDistanceInKiloMeters
+ .toString());
+ });
+ } else {}
+ });
- result = LinkedHashSet.from(arr).toList();
- numAll = result.length;
- // print(result);
- print("numAll=" + numAll.toString());
+ result = LinkedHashSet.from(arr).toList();
+ numAll = result.length;
- navigateToSearchResults(context, doctorsList, result, numAll);
- } else {
- AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
- }
- }).catchError((err) {
- print(err);
- }).showProgressBar(
- text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ navigateToSearchResults(
+ context, doctorsList, result, numAll, arrDistance);
+ } else {
+ AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
+ }
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
}
- Future navigateToSearchResults(context, docList, result, numAll) async {
+ Future navigateToDentalComplaints(
+ BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) =>
- BranchView(doctorsList: docList, result: result, num: numAll),
+ builder: (context) => DentalComplaints(searchInfo: searchInfo),
),
);
- //builder: (context) => SearchResults(doctorsList: docList)));
+ }
+
+ Future navigateToSearchResults(
+ context, docList, result, numAll, resultDistance) async {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => BranchView(
+ doctorsList: docList,
+ result: result,
+ num: numAll,
+ resultDistance: resultDistance),
+ ),
+ ).then((value) {
+ getProjectsList();
+ });
}
}
diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart
index 3e817878..1e7deb38 100644
--- a/lib/pages/BookAppointment/components/SearchByDoctor.dart
+++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart
@@ -84,6 +84,10 @@ class _SearchByDoctorState extends State {
getDoctorsList(BuildContext context) {
List doctorsList = [];
DoctorsListService service = new DoctorsListService();
+
+ List _patientDoctorAppointmentListHospital =
+ List();
+
service
.getDoctorsListByName(doctorNameController.text, context)
.then((res) {
@@ -93,9 +97,35 @@ class _SearchByDoctorState extends State {
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
+
+ doctorsList.forEach((element) {
+ List doctorByHospital =
+ _patientDoctorAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.projectName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ _patientDoctorAppointmentListHospital[
+ _patientDoctorAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ _patientDoctorAppointmentListHospital.add(
+ PatientDoctorAppointmentList(
+ filterName: element.projectName,
+ distanceInKMs: element.projectDistanceInKiloMeters.toString(),
+ patientDoctorAppointment: element));
+ }
+ });
} else {}
});
- navigateToSearchResults(context, doctorsList);
+
+ navigateToSearchResults(
+ context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@@ -107,7 +137,7 @@ class _SearchByDoctorState extends State {
_onDocTextChanged(content) {
print(content);
- if (content.length >= 4) {
+ if (content.length >= 3) {
setState(() {
_isButtonDisabled = false;
});
@@ -123,10 +153,17 @@ class _SearchByDoctorState extends State {
getDoctorsList(context);
}
- Future navigateToSearchResults(context, List docList) async {
+ Future navigateToSearchResults(
+ context,
+ List docList,
+ List
+ patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
MaterialPageRoute(
- builder: (context) => SearchResults(doctorsList: docList)));
+ builder: (context) => SearchResults(
+ doctorsList: docList,
+ patientDoctorAppointmentListHospital:
+ patientDoctorAppointmentListHospital)));
}
}
diff --git a/lib/pages/BookAppointment/widgets/BranchView.dart b/lib/pages/BookAppointment/widgets/BranchView.dart
index 82c38cb2..88912a3f 100644
--- a/lib/pages/BookAppointment/widgets/BranchView.dart
+++ b/lib/pages/BookAppointment/widgets/BranchView.dart
@@ -1,8 +1,6 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
-import 'package:flutter/material.dart';
-
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@@ -12,9 +10,11 @@ class BranchView extends StatefulWidget {
final List doctorsList;
final List result;
+ final List resultDistance;
final int num;
- const BranchView({Key key, this.doctorsList, this.result, this.num})
+ const BranchView(
+ {Key key, this.doctorsList, this.result, this.resultDistance, this.num})
: super(key: key);
@override
@@ -30,8 +30,8 @@ class _BranchViewState extends State {
body: new ListView.builder(
itemBuilder: (BuildContext context, int index) {
return new ExpandableListView(
-
result2: widget.result,
+ resultDistance: widget.resultDistance,
val: index,
doctorsList2: widget.doctorsList);
},
@@ -42,13 +42,13 @@ class _BranchViewState extends State {
}
class ExpandableListView extends StatefulWidget {
-
final List result2;
+ final List resultDistance;
final List doctorsList2;
final val;
const ExpandableListView(
- {Key key, this.result2, this.val, this.doctorsList2})
+ {Key key, this.result2, this.resultDistance, this.val, this.doctorsList2})
: super(key: key);
@override
@@ -61,11 +61,9 @@ class _ExpandableListViewState extends State {
@override
Widget build(BuildContext context) {
return new Container(
- // margin: new EdgeInsets.symmetric(vertical: 1.0),
width: MediaQuery.of(context).size.width * 0.6,
- margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0),
child: Card(
- // margin: EdgeInsets.fromLTRB(20.0, 16.0, 20.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
@@ -77,19 +75,22 @@ class _ExpandableListViewState extends State {
child: new Column(
children: [
new Container(
+ margin: EdgeInsets.only(left: 5.0, right: 5.0),
color: Colors.white,
- // padding: new EdgeInsets.symmetric(horizontal: 5.0),
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
new Text(
- widget.result2[widget.val].toString()+" "+ "22 كم",
+ widget.result2[widget.val].toString() +
+ " " +
+ getProjectDistance(
+ widget.resultDistance[widget.val].toString()),
style: new TextStyle(
fontWeight: FontWeight.bold, color: Colors.black),
),
new IconButton(
icon: new Container(
- height: 30.0,
+ height: 28.0,
width: 30.0,
decoration: new BoxDecoration(
color: Colors.red,
@@ -124,13 +125,14 @@ class _ExpandableListViewState extends State {
itemCount: widget.doctorsList2.length,
itemBuilder: (context, index) {
return widget.result2[widget.val].toString() ==
- widget.doctorsList2[index].projectName.toString()? DoctorView(
- //AJ note
- doctor:
- widget.doctorsList2[index]
-
- // widget.doctorsList2[index]
- ):Container();
+ widget.doctorsList2[index].projectName.toString()
+ ? DoctorView(
+ //AJ note
+ doctor: widget.doctorsList2[index]
+
+ // widget.doctorsList2[index]
+ )
+ : Container();
},
),
)
@@ -140,6 +142,14 @@ class _ExpandableListViewState extends State {
),
);
}
+
+ String getProjectDistance(String distance) {
+ if (distance != "0")
+ return " - " + distance + " " + TranslationBase.of(context).km;
+ else {
+ return "";
+ }
+ }
}
class ExpandableContainer extends StatelessWidget {
@@ -162,7 +172,7 @@ class ExpandableContainer extends StatelessWidget {
duration: new Duration(milliseconds: 500),
curve: Curves.easeInOut,
width: screenWidth,
- height: expanded ? expandedHeight : collapsedHeight,
+ height: expanded ? MediaQuery.of(context).size.height : collapsedHeight,
child: new Container(
child: child,
decoration: new BoxDecoration(
diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart
new file mode 100644
index 00000000..27f37d0a
--- /dev/null
+++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart
@@ -0,0 +1,135 @@
+import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
+import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
+import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
+
+// ignore: must_be_immutable
+class DentalComplaintCard extends StatefulWidget {
+ final ListDentalChiefComplain listDentalChiefComplain;
+ var languageID;
+
+ DentalComplaintCard(
+ {@required this.listDentalChiefComplain, this.languageID});
+
+ @override
+ _DentalComplaintCardState createState() => _DentalComplaintCardState();
+}
+
+class _DentalComplaintCardState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ child: InkWell(
+ onTap: () {
+ getChiefComplaintsList();
+ },
+ child: Card(
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Row(
+ children: [
+ Container(
+ width: MediaQuery.of(context).size.width * 0.85,
+ padding: EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Container(
+ child: Text(widget.listDentalChiefComplain.name,
+ style:
+ TextStyle(fontSize: 16.0, color: Colors.black)),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Icon(Icons.arrow_forward_ios,
+ size: 20.0, color: Colors.black54),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+ getChiefComplaintsList() {
+ List doctorsList = [];
+ List _patientDoctorAppointmentListHospital =
+ List();
+
+ ClinicListService service = new ClinicListService();
+ service
+ .getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
+ widget.listDentalChiefComplain.projectID, context)
+ .then((res) {
+ if (res['MessageStatus'] == 1) {
+ print(res['List_DentalDoctorChiefComplaintMapping']);
+ setState(() {
+ doctorsList.clear();
+ res['List_DentalDoctorChiefComplaintMapping'].forEach((v) {
+ doctorsList.add(new DoctorList.fromJson(v));
+ });
+
+ doctorsList.forEach((element) {
+ List doctorByHospital =
+ _patientDoctorAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.projectName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ _patientDoctorAppointmentListHospital[
+ _patientDoctorAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ _patientDoctorAppointmentListHospital.add(
+ PatientDoctorAppointmentList(
+ filterName: element.projectName,
+ distanceInKMs:
+ element.projectDistanceInKiloMeters.toString(),
+ patientDoctorAppointment: element));
+ }
+ });
+ navigateToSearchResults(
+ context, doctorsList, _patientDoctorAppointmentListHospital);
+ });
+ } else {
+ AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
+ }
+ }).catchError((err) {
+ print(err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }
+
+ Future navigateToSearchResults(
+ context,
+ List docList,
+ List
+ patientDoctorAppointmentListHospital) async {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => SearchResults(
+ doctorsList: docList,
+ patientDoctorAppointmentListHospital:
+ patientDoctorAppointmentListHospital)));
+ }
+}
diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart
index 4cdc3977..d3150459 100644
--- a/lib/pages/BookAppointment/widgets/DoctorView.dart
+++ b/lib/pages/BookAppointment/widgets/DoctorView.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -21,7 +22,7 @@ class DoctorView extends StatelessWidget {
getDoctorsProfile(context, doctor);
},
child: Card(
- margin: EdgeInsets.fromLTRB(20.0, 16.0, 20.0, 8.0),
+ margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
@@ -44,7 +45,7 @@ class DoctorView extends StatelessWidget {
Expanded(
flex: 4,
child: Container(
- width: MediaQuery.of(context).size.width * 0.6,
+ width: MediaQuery.of(context).size.width * 0.55,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -81,6 +82,16 @@ class DoctorView extends StatelessWidget {
color: Colors.grey[600],
letterSpacing: 1.0)),
),
+ this.doctor.nearestFreeSlot != null ? Container(
+ margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
+ child: Text(
+ getDate(this.doctor.nearestFreeSlot),
+ style: TextStyle(
+ fontSize: 14.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.green[600],
+ letterSpacing: 1.0)),
+ ) : Container(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
@@ -144,6 +155,29 @@ class DoctorView extends StatelessWidget {
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
+ String getDate(String date) {
+ DateTime dateObj = DateUtil.convertStringToDate(date);
+ return DateUtil.getWeekDay(dateObj.weekday) +
+ ", " +
+ dateObj.day.toString() +
+ " " +
+ DateUtil.getMonth(dateObj.month) +
+ " " +
+ dateObj.year.toString() +
+ " " +
+ dateObj.hour.toString() +
+ ":" +
+ getMinute(dateObj);
+ }
+
+ String getMinute(DateTime dateObj) {
+ if(dateObj.minute == 0) {
+ return dateObj.minute.toString() + "0";
+ } else {
+ return dateObj.minute.toString();
+ }
+ }
+
Future navigateToDoctorProfile(context, docObject, docProfile,
{isAppo}) async {
Navigator.push(
diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart
new file mode 100644
index 00000000..9c4dfa29
--- /dev/null
+++ b/lib/pages/ErService/AmbulanceReq.dart
@@ -0,0 +1,125 @@
+import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
+import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'dart:ui';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+
+class AmbulanceReq extends StatefulWidget {
+ @override
+ _AmbulanceReqState createState() => _AmbulanceReqState();
+}
+
+class _AmbulanceReqState extends State
+ with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ @override
+ void initState() {
+ super.initState();
+ _tabController = TabController(length: 2, vsync: this);
+ }
+ @override
+ void dispose() {
+ super.dispose();
+ _tabController.dispose();
+ }
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getPrescriptions(),
+ builder: (_, model, widget) => AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: "Ambulance Request",
+ body: Scaffold(
+ extendBodyBehindAppBar: true,
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(65.0),
+ child: Stack(
+ children: [
+ Positioned(
+ bottom: 1,
+ left: 0,
+ right: 0,
+ child: BackdropFilter(
+ filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
+ child: Container(
+ color: Theme.of(context)
+ .scaffoldBackgroundColor
+ .withOpacity(0.8),
+ height: 70.0,
+ ),
+ ),
+ ),
+ Center(
+ child: Container(
+ height: 60.0,
+ margin: EdgeInsets.only(top: 10.0),
+ width: MediaQuery.of(context).size.width * 0.9,
+ decoration: BoxDecoration(
+ border: Border(
+ bottom: BorderSide(
+ color: Theme.of(context).dividerColor,
+ width: 0.7),
+ ),
+ color: Colors.white),
+ child: Center(
+ child: TabBar(
+ isScrollable: true,
+ controller: _tabController,
+ indicatorWeight: 5.0,
+ indicatorSize: TabBarIndicatorSize.label,
+ indicatorColor: Colors.red[800],
+ labelColor: Theme.of(context).primaryColor,
+ labelPadding:
+ EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
+ unselectedLabelColor: Colors.grey[800],
+ tabs: [
+ Container(
+ width: MediaQuery.of(context).size.width * 0.40,
+ child: Center(
+ child: Texts("Ambulance Request"),//TranslationBase.of(context).prescriptions
+ ),
+ ),
+ Container(
+ width: MediaQuery.of(context).size.width * 0.30,
+ child: Center(
+ child: Texts("Orders Log"),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ body: Column(
+ children: [
+ Expanded(
+ child: TabBarView(
+ physics: BouncingScrollPhysics(),
+ controller: _tabController,
+ children: [
+ PrescriptionsPage(
+ prescriptionsViewModel: model,
+ ),
+ PrescriptionsHistoryPage(
+ prescriptionsViewModel: model,
+ )
+ ],
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+}
diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart
new file mode 100644
index 00000000..886d47d2
--- /dev/null
+++ b/lib/pages/ErService/ErOptions.dart
@@ -0,0 +1,73 @@
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+
+import 'package:flutter/material.dart';
+import '../../uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
+
+class ErOptions extends StatefulWidget {
+ final bool isAppbar;
+
+ const ErOptions({Key key, this.isAppbar}) : super(key: key);
+
+
+ @override
+ _ErOptionsState createState() => _ErOptionsState();
+}
+
+class _ErOptionsState extends State {
+ LocationUtils locationUtils;
+
+ @override
+ void initState() {
+ locationUtils =
+ new LocationUtils(isShowConfirmDialog: true, context: context);
+ WidgetsBinding.instance
+ .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
+
+ super.initState();
+ }
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: widget.isAppbar,
+ appBarTitle: TranslationBase.of(context).bookAppo,
+ body: Container(
+ margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+
+ Container(
+ margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(
+ child: CardCommonEr(
+ image: 'assets/images/new-design/AM.PNG',
+ text: TranslationBase.of(context).ambulancerequest,
+ subText: TranslationBase.of(context).requestA,
+ type: 0,
+
+ ),
+ ),
+ Expanded(
+ child: CardCommonEr(
+ image: 'assets/images/new-design/emergency_icon.png',
+ text: TranslationBase.of(context).nearester,
+ subText: TranslationBase.of(context).locationa,
+ type: 1),
+
+ )
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart
new file mode 100644
index 00000000..227cfb3b
--- /dev/null
+++ b/lib/pages/ErService/NearestEr.dart
@@ -0,0 +1,350 @@
+import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import '../../uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
+import 'widgets/card_position.dart';
+
+class NearestEr extends StatelessWidget {
+ static const String _url = "assets/images/";
+
+ int appointmentNo;
+ int projectID;
+
+ NearestEr({this.appointmentNo, this.projectID});
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: appointmentNo != null && projectID != null
+ ? (model) => model.getProjectAvgERWaitingTimeOrders(
+ id: appointmentNo, projectID: projectID)
+ : (model) => model.getProjectAvgERWaitingTimeOrders(),
+ builder: (_, mode, widget) => AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: 'Nearest ER',
+ baseViewModel: mode,
+ body: mode.ProjectAvgERWaitingTimeModeList.length > 0
+ ? Container(
+ child: ListView(
+ children: [
+ Text(
+ "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 18.0,
+ letterSpacing: 1.0,
+ fontWeight: FontWeight.w900,
+ color: new Color(0xFF60686b))),
+ Container(
+ margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Container(
+ child: CardPosition(
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[0].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[0]
+ .projectName,
+ ),
+ ),
+
+ ),
+ Expanded(
+ child: Container(
+ child: CardPosition(
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[1].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[1]
+ .projectName,
+ ),
+ ),
+
+ )
+ ],
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Container(
+ child: CardPosition(
+
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[2].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[2]
+ .projectName,
+ ),
+ ),
+
+ ),
+ Expanded(
+ child: Container(
+ child: CardPosition(
+
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[3].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[3]
+ .projectName,
+ ),
+ ),
+ flex: 0,
+ )
+ ],
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Container(
+ child: CardPosition(
+
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[4].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[4]
+ .projectName,
+ ),
+ ),
+
+ ),
+ Expanded(
+ child: Container(
+ child: CardPosition(
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[5].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[5]
+ .projectName,
+ ),
+ ),
+
+ )
+ ],
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Container(
+ child: CardPosition(
+ text: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .projectName
+ .toString(),
+ image:
+ 'assets/images/new-design/find_us_icon.png',
+ subText: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .distanceInKilometers
+ .toString(),
+ type: mode
+ .ProjectAvgERWaitingTimeModeList[6].iD
+ .toString(),
+ telephone: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .phoneNumber
+ .toString(),
+ networkImage: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .projectImageURL
+ .toString(),
+ latitude: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .latitude,
+ longitude: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .longitude,
+ projectname: mode
+ .ProjectAvgERWaitingTimeModeList[6]
+ .projectName,
+ ),
+ ),
+ flex: 0,
+ ),
+ ],
+ ),
+ ],
+ )),
+ ],
+ ),
+ )
+ : Center(
+ child: Texts('No Data'),
+ ),
+ ),
+ );
+ }
+}
+
diff --git a/lib/pages/ErService/widgets/card_common.dart b/lib/pages/ErService/widgets/card_common.dart
new file mode 100644
index 00000000..35ece966
--- /dev/null
+++ b/lib/pages/ErService/widgets/card_common.dart
@@ -0,0 +1,83 @@
+//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:flutter/material.dart';
+
+import '../AmbulanceReq.dart';
+import '../NearestEr.dart';
+
+class CardCommonEr extends StatelessWidget {
+ final image;
+ final text;
+ final subText;
+ final type;
+ const CardCommonEr(
+ {@required this.image,
+ @required this.text,
+ @required this.subText,
+ @required this.type});
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: () {
+ navigateToSearch(context, this.type);
+
+ },
+ child: Container(
+ margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
+ decoration: BoxDecoration(boxShadow: [
+ BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
+ ], borderRadius: BorderRadius.circular(10), color: Colors.white),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
+ child: Text(this.text,
+ overflow: TextOverflow.clip,
+ style: TextStyle(
+ color: new Color(0xFFc5272d),
+ letterSpacing: 1.0,
+ fontSize: 20.0)),
+ ),
+ Container(
+ margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
+ child: Text(this.subText,
+ overflow: TextOverflow.clip,
+ style: TextStyle(
+ color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
+ ),
+ Container(
+ alignment: Alignment.bottomRight,
+ margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
+ child: Image.asset(this.image, width: 60.0, height: 60.0),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Future navigateToSearch(context, type) async {
+//===Switch case===
+ if(type==0)
+ {
+
+ Navigator.push(
+ context,
+ FadePage(
+ page: AmbulanceReq()));
+ }
+ else{
+
+ Navigator.push(
+ context,
+ FadePage(
+ page: NearestEr()));
+
+ }
+
+
+ }
+}
diff --git a/lib/pages/ErService/widgets/card_position.dart b/lib/pages/ErService/widgets/card_position.dart
new file mode 100644
index 00000000..8647ad62
--- /dev/null
+++ b/lib/pages/ErService/widgets/card_position.dart
@@ -0,0 +1,108 @@
+//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
+import 'package:flutter/material.dart';
+import 'package:giffy_dialog/giffy_dialog.dart';
+import 'package:url_launcher/url_launcher.dart';
+import 'package:maps_launcher/maps_launcher.dart';
+
+
+import '../NearestEr.dart';
+
+class CardPosition extends StatelessWidget {
+ final image;
+ final text;
+ final subText;
+ final type;
+ final telephone;
+ final networkImage;
+ final latitude;
+ final longitude;
+ final projectname;
+ const CardPosition(
+ {
+ @required this.image,
+ @required this.text,
+ @required this.subText,
+ @required this.type,
+ @required this.telephone,
+ @required this.networkImage ,
+ @required this.latitude,
+ @required this.longitude,
+ @required this.projectname ,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: () {
+ navigateToSearch(context, this.type,this.telephone,this.networkImage,this.latitude,this.longitude,this.projectname);
+
+ },
+ child: Container(
+ width:MediaQuery.of(context).size.width * 0.47,//165,
+ margin: EdgeInsets.fromLTRB(7.0, 7.0, 7.0, 7.0),
+ decoration: BoxDecoration(boxShadow: [
+ BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
+ ], borderRadius: BorderRadius.circular(10), color: Colors.white),
+ child: Column(
+
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
+ child: Text(this.text,
+ overflow: TextOverflow.clip,
+ style: TextStyle(
+ color: Colors.black,
+ letterSpacing: 1.0,
+ fontSize: 2 * SizeConfig.textMultiplier)),
+ ),
+ Container(
+ alignment: Alignment.center,
+ margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
+ child: Image.asset(this.image, width: 60.0, height: 60.0),
+ ),
+ Container(
+ margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
+ child: Text(this.subText,
+ overflow: TextOverflow.clip,
+ style: TextStyle(
+ color: Color(0xFFc5272d), letterSpacing: 1.0, fontSize: 15.0)),
+ ),
+
+ ],
+ ),
+ ),
+ );
+ }
+
+ Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async {
+
+
+
+
+ showDialog(
+ context: context,builder: (_) => AssetGiffyDialog(
+ title: Text(projectname,
+ style: TextStyle(
+ fontSize: 22.0, fontWeight: FontWeight.w600),
+ ),image:Image.network(networkImage, fit: BoxFit.cover,),
+
+ buttonOkText:Text("LOCATION"),
+ buttonOkColor: Colors.grey,
+ buttonCancelText:Text('CAll') ,
+ buttonCancelColor: Colors.grey,
+ onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);},
+ onCancelButtonPressed :() {launch("tel://" +telephone);}
+
+
+
+
+ ) );
+
+ }
+
+ }
+
+
diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart
index af4c47c0..dc6fc65c 100644
--- a/lib/pages/MyAppointments/MyAppointments.dart
+++ b/lib/pages/MyAppointments/MyAppointments.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCar
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@@ -15,6 +16,11 @@ class MyAppointments extends StatefulWidget {
List confirmedAppoList = [];
List arrivedAppoList = [];
+ List _patientBookedAppointmentListHospital = List();
+ List _patientConfirmedAppointmentListHospital =
+ List();
+ List _patientArrivedAppointmentListHospital = List();
+
@override
_MyAppointmentsState createState() => _MyAppointmentsState();
}
@@ -40,7 +46,6 @@ class _MyAppointmentsState extends State
isShowAppBar: true,
body: Container(
child: Column(children: [
- /// this is will not colored with theme data
TabBar(
tabs: [
Tab(text: TranslationBase.of(context).booked),
@@ -94,7 +99,10 @@ class _MyAppointmentsState extends State
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ AppToast.showErrorToast(message: err);
+ Navigator.of(context).pop();
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@@ -123,15 +131,85 @@ class _MyAppointmentsState extends State
widget.arrivedAppoList.add(v);
}
});
+
+ widget.bookedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientBookedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientBookedAppointmentListHospital[widget
+ ._patientBookedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientBookedAppointmentListHospital.add(PatientAppointmentList(
+ filterName: element.clinicName, patientDoctorAppointment: element));
+ }
+ });
+
+ widget.confirmedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientConfirmedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientConfirmedAppointmentListHospital[widget
+ ._patientConfirmedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientConfirmedAppointmentListHospital.add(
+ PatientAppointmentList(
+ filterName: element.clinicName,
+ patientDoctorAppointment: element));
+ }
+ });
+
+ widget.arrivedAppoList.forEach((element) {
+ List doctorByHospital =
+ widget._patientArrivedAppointmentListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.clinicName,
+ )
+ .toList();
+
+ if (doctorByHospital.length != 0) {
+ widget
+ ._patientArrivedAppointmentListHospital[widget
+ ._patientArrivedAppointmentListHospital
+ .indexOf(doctorByHospital[0])]
+ .patientDoctorAppointmentList
+ .add(element);
+ } else {
+ widget._patientArrivedAppointmentListHospital.add(
+ PatientAppointmentList(
+ filterName: element.clinicName,
+ patientDoctorAppointment: element));
+ }
+ });
}
openAppointmentsTab() {
- if (widget.bookedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 1);
- } else if (widget.confirmedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 2);
- } else if (widget.arrivedAppoList.length != 0) {
- _tabController.animateTo((_tabController.index + 1) % 3);
+ if (widget._patientBookedAppointmentListHospital.length != 0) {
+ _tabController.index = 0;
+ } else if (widget._patientConfirmedAppointmentListHospital.length != 0) {
+ _tabController.index = 1;
+ } else if (widget._patientArrivedAppointmentListHospital.length != 0) {
+ _tabController.index = 2;
return;
}
}
@@ -163,24 +241,95 @@ class _MyAppointmentsState extends State
fontSize: 16.0,
)),
),
+ Container(
+ margin: EdgeInsets.only(top: 10.0),
+ child: Container(
+ child: widget.bookedAppoList.length != 0
+ ? SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientBookedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientBookedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientBookedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
+ )
+ : Container(
+ child: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Image.asset(
+ "assets/images/new-design/noAppointmentIcon.png"),
+ Container(
+ margin: EdgeInsets.only(top: 10.0),
+ child: Text("No Booked Appointments",
+ style: TextStyle(
+ fontSize: 16.0,
+ )),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ )
],
- ),
- ),
- ),
- );
+
+ ))));
}
Widget getConfirmedAppointments() {
return widget.confirmedAppoList.length != 0
? Container(
- child: new ListView.builder(
- itemCount: widget.confirmedAppoList.length,
- itemBuilder: (context, i) {
- return AppointmentCard(
- appo: widget.confirmedAppoList[i],
- onReloadAppointmentHistory: getPatientAppointmentHistory,
- );
- },
+ margin: EdgeInsets.only(top: 10.0),
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientConfirmedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientConfirmedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientConfirmedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
),
)
: Container(
@@ -206,14 +355,34 @@ class _MyAppointmentsState extends State
Widget getArrivedAppointments() {
return widget.arrivedAppoList.length != 0
? Container(
- child: new ListView.builder(
- itemCount: widget.arrivedAppoList.length,
- itemBuilder: (context, i) {
- return AppointmentCard(
- appo: widget.arrivedAppoList[i],
- onReloadAppointmentHistory: getPatientAppointmentHistory,
- );
- },
+ margin: EdgeInsets.only(top: 10.0),
+ child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
+ child: Column(
+ children: [
+ ...List.generate(
+ widget._patientArrivedAppointmentListHospital.length,
+ (index) => AppExpandableNotifier(
+ title: widget
+ ._patientArrivedAppointmentListHospital[index]
+ .filterName,
+ bodyWidget: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: widget
+ ._patientArrivedAppointmentListHospital[index]
+ .patientDoctorAppointmentList
+ .map((doctor) {
+ return AppointmentCard(
+ appo: doctor,
+ onReloadAppointmentHistory:
+ getPatientAppointmentHistory,
+ );
+ }).toList(),
+ )),
+ )
+ ],
+ ),
),
)
: Container(
diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart
index 4a288730..a89253c6 100644
--- a/lib/pages/MyAppointments/models/ArrivedButtons.dart
+++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart
@@ -25,7 +25,7 @@ class ArrivedButtons {
"title": "Lab",
"subtitle": "Result",
"icon": "assets/images/new-design/lab_result_icon.png",
- "caller": "addReminder"
+ "caller": "labResult"
},
{
"title": "Vital Signs",
diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
index a876160f..19e82086 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
@@ -12,17 +12,18 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButton
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
+import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
-import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
+import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget {
@@ -189,6 +190,10 @@ class _AppointmentActionsState extends State {
case "VitalSigns":
navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID);
break;
+
+ case "insertComplaint":
+ navigateToInsertComplaint();
+ break;
}
}
@@ -357,7 +362,8 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
openAppointmentRadiology() {
@@ -374,7 +380,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
openPrescriptionReport() {
@@ -394,7 +401,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
Future navigateToMedicinePrescriptionReport(
@@ -460,7 +468,10 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ AppToast.showErrorToast(
+ message: err);
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
getCallRequestType() {
@@ -475,7 +486,8 @@ class _AppointmentActionsState extends State {
});
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
showAskDocRequestDialog(List requestData) {
@@ -520,7 +532,8 @@ class _AppointmentActionsState extends State {
}).catchError((err) {
print(err);
AppToast.showErrorToast(message: err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
confirmAppointment() {
@@ -537,7 +550,8 @@ class _AppointmentActionsState extends State {
}
}).catchError((err) {
print(err);
- }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
+ }).showProgressBar(
+ text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
navigateToInsuranceApprovals(int appoNo) {
@@ -547,7 +561,14 @@ class _AppointmentActionsState extends State {
navigateToVitalSigns(int appoNo, int projectID) {
Navigator.push(
- context, FadePage(page: VitalSignDetailsScreen(appointmentNo: appoNo, projectID: projectID)));
+ context,
+ FadePage(
+ page: VitalSignDetailsScreen(
+ appointmentNo: appoNo, projectID: projectID)));
+ }
+
+ navigateToInsertComplaint() {
+ Navigator.push(context, FadePage(page: FeedbackHomePage()));
}
rateAppointment() {
diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
index e2f6f706..b64bd232 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
@@ -42,7 +42,7 @@ class _ApointmentCardState extends State {
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
Container(
- width: MediaQuery.of(context).size.width * 0.6,
+ width: MediaQuery.of(context).size.width * 0.57,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -95,7 +95,7 @@ class _ApointmentCardState extends State {
emptyIcon: Icons.star,
),
Container(
- transform: Matrix4.translationValues(0.0, -40.0, 0.0),
+ transform: Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset(
"assets/images/new-design/arrow.png",
width: 25.0,
diff --git a/lib/pages/conference/conference_button_bar.dart b/lib/pages/conference/conference_button_bar.dart
index d9abd212..d49c4e4a 100644
--- a/lib/pages/conference/conference_button_bar.dart
+++ b/lib/pages/conference/conference_button_bar.dart
@@ -212,6 +212,11 @@ class _ConferenceButtonBarState extends State with AfterLay
key: Key('microphone-button'),
onPressed: () => _onPressed(widget.onAudioEnabled),
),
+ CircleButton(
+ child: const Icon(Icons.switch_camera, color: Colors.white),
+ key: Key('switch-camera-button'),
+ onPressed: () => _onPressed(widget.onSwitchCamera),
+ ),
CircleButton(
radius: 35,
child: const RotationTransition(
@@ -226,11 +231,6 @@ class _ConferenceButtonBarState extends State with AfterLay
key: Key('hangup-button'),
onPressed: () => _onPressed(widget.onHangup),
),
- CircleButton(
- child: const Icon(Icons.switch_camera, color: Colors.white),
- key: Key('switch-camera-button'),
- onPressed: () => _onPressed(widget.onSwitchCamera),
- ),
],
),
);
diff --git a/lib/pages/conference/conference_page.dart b/lib/pages/conference/conference_page.dart
index 60ffb0d5..7848d4f7 100644
--- a/lib/pages/conference/conference_page.dart
+++ b/lib/pages/conference/conference_page.dart
@@ -217,21 +217,21 @@ class _ConferencePageState extends State {
);
}
- if (length <= 3) {
- buildInCols(true, false, 1);
- } else if (length == 5) {
- buildInCols(false, true, 2);
- } else if (length <= 6 || length == 8) {
- buildInCols(false, false, 2);
- } else if (length == 7 || length == 9) {
- buildInCols(true, false, 2);
- } else if (length == 10) {
- buildInCols(false, true, 3);
- } else if (length == 13 || length == 16) {
- buildInCols(true, false, 3);
- } else if (length <= 18) {
- buildInCols(false, false, 3);
- }
+// if (length <= 3) {
+// buildInCols(true, false, 1);
+// } else if (length == 5) {
+// buildInCols(false, true, 2);
+// } else if (length <= 6 || length == 8) {
+// buildInCols(false, false, 2);
+// } else if (length == 7 || length == 9) {
+// buildInCols(true, false, 2);
+// } else if (length == 10) {
+// buildInCols(false, true, 3);
+// } else if (length == 13 || length == 16) {
+// buildInCols(true, false, 3);
+// } else if (length <= 18) {
+// buildInCols(false, false, 3);
+// }
return Column(
children: children,
diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart
index 70d164ff..6483b6b2 100644
--- a/lib/pages/insurance/insurance_card_screen.dart
+++ b/lib/pages/insurance/insurance_card_screen.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
@@ -39,95 +40,117 @@ class _InsuranceCardState extends State {
itemBuilder: (BuildContext context, int index) {
return RoundedContainer(
backgroundColor: Colors.white,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- ExpansionTile(
- title: Container(
- height: 65.0,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: EdgeInsets.symmetric(vertical: 15.0),
- child: Texts(
- model.insurance[index].groupName,
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ExpansionTile(
+ title: Container(
+ height: 65.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 15.0),
+ child: Texts(
+ model.insurance[index].groupName,
+ ),
),
- ),
- ],
- ),
- ),
- children: [
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 0.5,
- ),
- Texts(
- TranslationBase.of(context).companyName +
- model.insurance[index].companyName,
- fontSize: 20.0,
- ),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 0.5,
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- Text(
- TranslationBase.of(context).category +
- model.insurance[index].subCategoryDesc,
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).expirationDate +
- convertDateFormat(
- model.insurance[index].cardValidTo),
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).patientCard +
- model.insurance[index].patientCardID,
- style: TextStyle(fontSize: 18.5),
- ),
- Text(
- TranslationBase.of(context).policyNumber +
- model
- .insurance[index].insurancePolicyNumber,
- style: TextStyle(fontSize: 18.5),
- ),
- ],
- ),
- Column(
- children: [
- model.insurance[index].isActive == true
- ? Text('Active',
- style: TextStyle(
- color: Colors.green,
- fontWeight: FontWeight.w900,
- fontSize: 17.9))
- : Text('Not Active',
- style: TextStyle(
- color: Colors.red,
- fontWeight: FontWeight.w900,
- fontSize: 17.9))
- ],
- ),
- SizedBox(
- height: 14.5,
+ ],
+ ),
),
- if (model.insurance[index].isActive == true)
+ children: [
Container(
- child: Button(
- label: TranslationBase.of(context).seeDetails,
+ padding: EdgeInsets.all(14),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ shape: BoxShape.rectangle,
+ border: Border.all(color: Colors.grey,width: 0.2),
+ borderRadius: BorderRadius.all(Radius.circular(2)),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.white70,
+ ),
+
+ ]
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context).companyName +
+ model.insurance[index].companyName,
+ fontSize: 20.0,
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 0.5,
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Text(
+ TranslationBase.of(context).category +
+ model.insurance[index].subCategoryDesc,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).expirationDate +
+ convertDateFormat(
+ model.insurance[index].cardValidTo),
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).patientCard +
+ model.insurance[index].patientCardID,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).policyNumber +
+ model
+ .insurance[index].insurancePolicyNumber,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ model.insurance[index].isActive == true
+ ? Text('Active',
+ style: TextStyle(
+ color: Colors.green,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ : Text('Not Active',
+ style: TextStyle(
+ color: Colors.red,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ ],
+ ),
+ SizedBox(
+ height: 14.5,
+ ),
+ if (model.insurance[index].isActive == true)
+ Container(
+ color: Colors.transparent,
+ child: SecondaryButton(
+ label: TranslationBase.of(context).seeDetails,
+ textColor: Colors.white,
+ ),
+ width: double.infinity,
+ ),
+ ],
),
- width: 400.0,
),
- ],
- ),
- ],
+
+
+ ],
+ ),
+ ],
+ ),
),
);
}),
diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart
index 9cfa41a9..2fa291df 100644
--- a/lib/pages/insurance/insurance_update_screen.dart
+++ b/lib/pages/insurance/insurance_update_screen.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
@@ -97,9 +98,12 @@ class _InsuranceUpdateState extends State
children: [
Container(
child: ListView.builder(
- itemCount: model.insuranceUpdate == null
+ itemCount: model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList ==
+ null
? 0
- : model.insuranceUpdate.length,
+ : model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(10.0),
@@ -112,81 +116,63 @@ class _InsuranceUpdateState extends State
child: Container(
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
- child: Column(
+ child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
- Flex(
- direction: Axis.horizontal,
- children: [
- Expanded(
- flex: 3,
- child: Container(
- margin: EdgeInsets.only(
- top: 2.0,
- left: 10.0,
- right: 20.0),
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- Text("TAMER FANASHEH ",
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- Text(
- 'File No.' +
- model
- .insuranceUpdate[
- index]
- .patientID
- .toString(),
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- Text(
- model.insuranceUpdate[index]
- .createdOn,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight:
- FontWeight.w500,
- letterSpacing: 1.0)),
- ],
- ),
- ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0, left: 10.0, right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index].patientName,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ 'File No.' +
+ model.getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index].patientID.toString(),
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ letterSpacing: 1.0)),
+ ],
),
- Expanded(
- flex: 1,
- child: Container(
-// height: MediaQuery.of(context).size.height * 0.12,
- margin: EdgeInsets.only(top: 20.0),
- child: Column(
- children: [
- Container(
- child: Button(
- label: 'Fetch',
- ),
- height: SizeConfig
- .heightMultiplier *
- 3.8,
- width:
- SizeConfig.screenWidth *
- 4.2,
- ),
- ],
- ),
- ),
- )
- ],
+ ),
),
+ Expanded(
+ flex: 2,
+ child: Container(
+ // height: MediaQuery.of(context).size.height * 0.12,
+ margin: EdgeInsets.only(top: 2.0),
+ child: Column(
+ children: