diff --git a/android/app/build.gradle b/android/app/build.gradle
index d88df7fe..336e8e53 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -40,7 +40,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// applicationId "com.cloud.diplomaticquarterapp"
- applicationId "com.ejada.hmg"
+ applicationId "com.ejada.hmg.uat"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
diff --git a/android/app/google-services.json b/android/app/google-services.json
index dd4038cf..6d1d75a9 100755
--- a/android/app/google-services.json
+++ b/android/app/google-services.json
@@ -10,7 +10,7 @@
"client_info": {
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
- "package_name": "com.ejada.hmg"
+ "package_name": "com.ejada.hmg.uat"
}
},
"oauth_client": [
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1238814b..63f94294 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
+
@@ -29,7 +30,11 @@
-
+
+
+
+
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index ffbdc324..c0fc03b3 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -9,7 +9,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
+ classpath 'com.android.tools.build:gradle:3.5.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
}
diff --git a/assets/images/1.png b/assets/images/1.png
new file mode 100644
index 00000000..c90aa190
Binary files /dev/null and b/assets/images/1.png differ
diff --git a/assets/images/2.png b/assets/images/2.png
new file mode 100644
index 00000000..48891b32
Binary files /dev/null and b/assets/images/2.png differ
diff --git a/assets/images/3.png b/assets/images/3.png
new file mode 100644
index 00000000..721f6e6c
Binary files /dev/null and b/assets/images/3.png differ
diff --git a/assets/images/4.png b/assets/images/4.png
new file mode 100644
index 00000000..6d61b45f
Binary files /dev/null and b/assets/images/4.png differ
diff --git a/assets/images/5.png b/assets/images/5.png
new file mode 100644
index 00000000..e45f432c
Binary files /dev/null and b/assets/images/5.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/bmi.png b/assets/images/AlHabibMedicalService/health_calculator/bmi.png
new file mode 100644
index 00000000..6df6c9f9
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/bmi.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/bmr.png b/assets/images/AlHabibMedicalService/health_calculator/bmr.png
new file mode 100644
index 00000000..db31ed43
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/bmr.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/body-fat.png b/assets/images/AlHabibMedicalService/health_calculator/body-fat.png
new file mode 100644
index 00000000..97b05df3
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/body-fat.png differ
diff --git a/assets/images/bc_parking.png b/assets/images/bc_parking.png
new file mode 100644
index 00000000..64633516
Binary files /dev/null and b/assets/images/bc_parking.png differ
diff --git a/assets/images/new-design/pending.svg b/assets/images/new-design/pending.svg
new file mode 100644
index 00000000..2c26afbd
--- /dev/null
+++ b/assets/images/new-design/pending.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/nfc/ic_done.png b/assets/images/nfc/ic_done.png
new file mode 100644
index 00000000..5b802855
Binary files /dev/null and b/assets/images/nfc/ic_done.png differ
diff --git a/assets/images/nfc/ic_nfc.png b/assets/images/nfc/ic_nfc.png
new file mode 100644
index 00000000..274e1b8c
Binary files /dev/null and b/assets/images/nfc/ic_nfc.png differ
diff --git a/ios/Podfile b/ios/Podfile
index d68afba2..89424e2a 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -3,6 +3,7 @@
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+$FirebaseAnalyticsWithoutAdIdSupport = true
project 'Runner', {
'Debug' => :debug,
diff --git a/lib/analytics/analytic-events.dart b/lib/analytics/analytic-events.dart
new file mode 100644
index 00000000..3e107d95
--- /dev/null
+++ b/lib/analytics/analytic-events.dart
@@ -0,0 +1,69 @@
+import 'package:diplomaticquarterapp/uitl/utils.dart';
+
+class _Event{
+ String name;
+ String description;
+ bool active;
+ _Event(dynamic map){
+ name = map['name'];
+ description = map['description'];
+ active = map['active'];
+ }
+
+ flutterName() => 'f: $name';
+}
+
+class AnalyticEvents{
+ static _Event get(String key) {
+ var e = _Event(mapping[key]);
+ if(e == null){
+ var label = labelFrom(className: key); // Convert Class Name in to Label (HomeCare -> Home Care)
+ e = _Event({"name": label, "active":true, "description":key});
+ }
+ return e;
+ }
+
+ static var mapping = const {
+ "HomeHealthCarePage" : {
+ "active" : true,
+ "name" : "Home Health Care Page",
+ "description" : "",
+ },
+ "SplashScreen" : {
+ "active" : true,
+ "name" : "Splash Screen",
+ "description" : "",
+ },
+ "LandingPage" : {
+ "active" : true,
+ "name" : "Landing Page",
+ "description" : "",
+ },
+ "WelcomeLogin" : {
+ "active" : true,
+ "name" : "Welcome Login",
+ "description" : "",
+ },
+ "LoginType" : {
+ "active" : true,
+ "name" : "Login Type",
+ "description" : "",
+ },
+ "Login" : {
+ "active" : true,
+ "name" : "Login",
+ "description" : "",
+ },
+ "ForgotPassword" : {
+ "active" : true,
+ "name" : "Forgot Password",
+ "description" : "",
+ },
+ "" : {
+ "active" : true,
+ "name" : "",
+ "description" : "",
+ },
+ };
+}
+
diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart
new file mode 100644
index 00000000..f4bf8b72
--- /dev/null
+++ b/lib/analytics/google-analytics.dart
@@ -0,0 +1,85 @@
+import 'package:diplomaticquarterapp/analytics/analytic-events.dart';
+import 'package:diplomaticquarterapp/routes.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:firebase_analytics/firebase_analytics.dart';
+import 'package:firebase_analytics/observer.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class Singleton {
+ const Singleton(); //Constant constructor
+
+ void hello() { print('Hello world'); }
+}
+
+var analytics = FirebaseAnalytics();
+
+class GAnalytics{
+ const GAnalytics();
+ static GAnalytics shared = const GAnalytics();
+ NavObserver navObserver() => NavObserver();
+}
+// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
+class NavObserver extends RouteObserver>{
+
+ _sendScreenView(PageRoute route) async{
+
+
+ log(String className){
+ var event = AnalyticEvents.get(className);
+ if(event.active){
+ analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( (Object error) {
+ debugPrint('$FirebaseAnalyticsObserver: $error');
+ },
+ test: (Object error) {
+ return error is PlatformException;
+ },
+ );
+ }
+ }
+
+ if(route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null"){
+ var class_ = routes[route.settings.name](0);
+ if(class_ != null)
+ log(class_.toStringShort());
+
+ }else if(route is FadePage){
+ var class_ = route.page;
+ if(class_ != null)
+ log(class_.toStringShort());
+
+ }else if(route is MaterialPageRoute){
+ var class_ = route.builder(null);
+ if (class_ != null)
+ log(class_.toStringShort());
+
+ }else{
+ print("");
+ }
+
+ }
+
+ @override
+ void didPush(Route route, Route previousRoute) {
+ super.didPush(route, previousRoute);
+ if (route is PageRoute) {
+ _sendScreenView(route);
+ }
+ }
+
+ @override
+ void didReplace({Route newRoute, Route oldRoute}) {
+ super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
+ if (newRoute is PageRoute) {
+ _sendScreenView(newRoute);
+ }
+ }
+
+ @override
+ void didPop(Route route, Route previousRoute) {
+ super.didPop(route, previousRoute);
+ // if (previousRoute is PageRoute && route is PageRoute) {
+ // _sendScreenView(previousRoute);
+ // }
+ }
+}
\ No newline at end of file
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 62fedb16..70cb02b6 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
-//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
-//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
+const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
+const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
-const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
-const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
+//const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
+//const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver
-const DRIVER_LOCATION =
- 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
+const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
@@ -42,51 +41,36 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials
-const WIFI_CREDENTIALS =
- "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
+const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor
-const GET_MY_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
-const GET_DOCTOR_RATING_NOTES =
- 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
-const GET_DOCTOR_RATING_DETAILS =
- 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
+const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
+const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
-const GET_PRESCRIPTIONS_ALL_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PRESCRIPTION_REPORT =
- 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
-const SEND_PRESCRIPTION_EMAIL =
- 'Services/Notifications.svc/REST/SendPrescriptionEmail';
-const GET_PRESCRIPTION_REPORT_ENH =
- 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
+const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
+const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
+const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_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 SEND_LAB_RESULT_EMAIL =
- 'Services/Notifications.svc/REST/SendLabReportEmail';
-const GET_Patient_LAB_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabResults';
-const GET_Patient_LAB_ORDERS_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
+const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
+const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
+const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
-const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
- 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
+const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
-const GET_PATIENT_ORDERS_DETAILS =
- 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
+const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
-const SEND_RAD_REPORT_EMAIL =
- 'Services/Notifications.svc/REST/SendRadReportEmail';
+const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@@ -95,32 +79,23 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
-const GET_PATIENT_VITAL_SIGN =
- 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
+const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
-const GET_NEAREST_HOSPITAL =
- 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
+const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online
-const ER_GET_VISUAL_TRIAGE_QUESTIONS =
- "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
-const ER_SAVE_TRIAGE_INFORMATION =
- "services/Doctors.svc/REST/ER_SaveTriageInformation";
+const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
+const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest
-const GET_AMBULANCE_REQUEST =
- 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
-const GET_PATIENT_ALL_PRES_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
- 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
-const UPDATE_PRESS_ORDER =
- 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
-const INSERT_ER_INERT_PRES_ORDER =
- 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
+const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
+const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
+const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@@ -129,15 +104,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
-const GET_BABYINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetBabyByUserID';
+const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
-const GET_USERINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetUserInformation_New';
+const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@@ -159,29 +132,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
-const GET_BLOOD_REQUEST =
- 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
+const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
-const SAVE_BLOOD_REQUEST =
- 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
+const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
-const GET_BLOOD_AGREEMENT =
- 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
-const SAVE_BLOOD_AGREEMENT =
- 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
+const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
+const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
-const INSERT_REQUEST_FOR_MEDICAL_REPORT =
- 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
-const SEND_MEDICAL_REPORT_EMAIL =
- 'Services/Notifications.svc/REST/SendMedicalReportEmail';
+const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
+const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate
-const IS_LAST_APPOITMENT_RATED =
- 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
-const GET_APPOINTMENT_DETAILS_BY_NO =
- 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
+const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
+const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@@ -193,8 +158,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
-const GET_ACTIVE_APPOINTMENTS_LIST_URL =
- "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
+const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@@ -203,115 +167,87 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
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";
+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";
//URL to insert appointment
-const INSERT_SPECIFIC_APPOINTMENT =
- "Services/Doctors.svc/REST/InsertSpecificAppointment";
+const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
-const GET_PATIENT_SHARE =
- "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
+const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
-const GET_PATIENT_APPOINTMENT_HISTORY =
- "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
+const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
-const SEND_REPORT_EYE_EMAIL =
- "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
+const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
-const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL =
- "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
+const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history
-const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
- "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
+const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment
-const CONFIRM_APPOINTMENT =
- "Services/MobileNotifications.svc/REST/ConfirmAppointment";
+const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
-const INSERT_VIDA_REQUEST =
- "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
+const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR
-const GENERATE_QR_APPOINTMENT =
- "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
+const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR
-const EMAIL_QR_APPOINTMENT =
- "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
+const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status
-const CHECK_PAYMENT_STATUS =
- "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
+const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
-const HIS_CREATE_ADVANCE_PAYMENT =
- "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
+const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
-const ADD_ADVANCE_NUMBER_REQUEST =
- 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
+const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
-const IS_ALLOW_ASK_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
-const GET_CALL_REQUEST_TYPE =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
-const ADD_VIDA_REQUEST =
- 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
+const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
-const GET_LIVECARE_CLINICS =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
+const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
-const GET_LIVECARE_SCHEDULE_CLINICS =
- 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
+const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
-const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
+const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
-const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
+const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
-const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
- 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
+const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
-const GET_LIVECARE_CLINIC_TIMING =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
+const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
-const GET_ER_APPOINTMENT_FEES =
- 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
+const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
-const ADD_NEW_CALL_FOR_PATIENT_ER =
- 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
+const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
-const GET_LIVECARE_HISTORY =
- 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
-const CANCEL_LIVECARE_REQUEST =
- 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
-const SEND_LIVECARE_INVOICE_EMAIL =
- 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
+const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
+const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
+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';
+const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
-const GET_PATIENT_HEALTH_STATS =
- 'Services/Patients.svc/REST/Med_GetTransactionsSts';
+const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
+
+const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
@@ -332,21 +268,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
-const GET_PAtIENTS_INSURANCE =
- "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
-const GET_PAtIENTS_INSURANCE_UPDATED =
- "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
+const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
-const GET_PATIENT_INSURANCE_DETAILS =
- "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
-const UPLOAD_INSURANCE_CARD =
- 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
+const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
+const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
-const GET_PAtIENTS_INSURANCE_APPROVALS =
- "Services/Patients.svc/REST/GetApprovalStatus";
+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";
@@ -356,84 +287,57 @@ 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_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 SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
-const GET_COVID_DRIVETHRU_PROJECT_LIST =
- 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
+const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
-const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
- 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
+const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
-const GET_COVID_DRIVETHRU_PAYMENT_INFO =
- 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
+const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
-const GET_COVID_DRIVETHRU_FREE_SLOTS =
- 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
+const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
+ 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services
-const GET_PATIENT_LAST_RECORD =
- 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
+const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
-const GET_DIABETIC_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
-const GET_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
-const ADD_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
-
-const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
-const GET_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
-const ADD_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
-
-const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
-const GET_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
-const ADD_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
+const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
+const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
+const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
+
+const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
+const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
+const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
+
+const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
+const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
+const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
-const GET_CALL_INFO_HOURS_RESULT =
- 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
-const GET_CALL_REQUEST_TYPE_LOV =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
-
-const UPDATE_DIABETIC_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
-
-const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
-const DEACTIVATE_DIABETIC_STATUS =
- 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
-const DEACTIVATE_BLOOD_PRESSURES_STATUS =
- 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
-
-const UPDATE_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
-const SEND_AVERAGE_BLOOD_WEIGHT_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
-const SEND_AVERAGE_BLOOD_PRESSURE_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
-
-const UPDATE_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
-const DEACTIVATE_WEIGHT_PRESSURE_RESULT =
- 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
+const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
+const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+
+const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
+
+const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
+const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
+const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
+
+const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
+const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
+const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
+
+const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
+const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@@ -441,35 +345,25 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
-const H2O_GET_USER_PROGRESS =
- "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
-const H2O_INSERT_USER_ACTIVITY =
- "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
-const H2O_GET_USER_DETAIL =
- "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
-const H2O_UPDATE_USER_DETAIL =
- "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
-const H2O_UNDO_USER_ACTIVITY =
- "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
+const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
+const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
+const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
+const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
+const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services
-const GET_ALL_RELATIONSHIP_TYPES =
- "Services/Patients.svc/REST/GetAllRelationshipTypes";
-const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
-const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
+const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
+const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
+const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders
-const GET_ANCILLARY_ORDERS =
- 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
+const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
-const GET_ANCILLARY_ORDERS_DETAILS =
- 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
+const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
@@ -501,50 +395,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders";
-const GET_LACUM_ACCOUNT_INFORMATION =
- "Services/Patients.svc/REST/GetLakumAccountInformation";
-const GET_LACUM_GROUP_INFORMATION =
- "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
-const LACUM_ACCOUNT_ACTIVATE =
- "Services/Patients.svc/REST/LakumAccountActivation";
-const LACUM_ACCOUNT_DEACTIVATE =
- "Services/Patients.svc/REST/LakumAccountDeactivation";
-const CREATE_LAKUM_ACCOUNT =
- "Services/Patients.svc/REST/PHR_CreateLakumAccount";
-const TRANSFER_YAHALA_LOYALITY_POINTS =
- "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
-const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
- "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
+const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
+const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
+const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
+const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation";
+const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount";
+const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
+const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care
-const HHC_GET_ALL_SERVICES =
- "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
-const HHC_GET_ALL_CMC_SERVICES =
- "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
-const PATIENT_ER_UPDATE_PRES_ORDER =
- "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
-const GET_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
-const GET_CMC_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
+const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
+const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
+const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
+const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
+const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
-const GET_PATIENT_ALL_PRES_ORD =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const PATIENT_ER_INSERT_PRES_ORDER =
- 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
-const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
- 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
-const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
- 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
+const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
+const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";
@@ -577,8 +455,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
-const GET_DISEASE_BY_CLINIC_ID =
- 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
+const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10;
@@ -594,6 +471,8 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids=';
+const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
+
class AppGlobal {
static var context;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index f1ad075f..6426f85e 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -466,6 +466,14 @@ const Map localizedValues = {
"ar":
" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "
},
+ "parkingDescription": {
+
+ "en": "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).",
+
+ "ar": "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)."
+
+ },
+ "checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"},
"readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"},
"showMyPark": {"en": "Show My Park", "ar": "عرض بارك"},
"clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"},
@@ -1257,6 +1265,8 @@ const Map localizedValues = {
"stretcher": {"en": "Stretcher", "ar": "نقالة"},
"none": {"en": "None", "ar": "لا شيء"},
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
+ "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"},
+ "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
"transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"},
"directions": {"en": "Directions", "ar": "الاتجاهات"},
@@ -2023,5 +2033,29 @@ const Map localizedValues = {
"covid-select-procedure": {
"en": "Please select the procedure:",
"ar": "الرجاء تحديد الإجراء:"
- }
+ },
+ "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"},
+ "expected-weiting": {
+ "en": "Waiting time to start LiveCare consultation ",
+ "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"
+ },
+ "er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"},
+ "insured-patient": {
+ "en":
+ "If you're Insurance patient, you have only have to pay the co-payment",
+ "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"
+ },
+ "i-accept-terms": {
+ "en": "I Accept the Terms And Conditions",
+ "ar": "أوافق على الشروط والأحكام"
+ },
+ "upcoming-pay-options": {
+ "en": "You can pay by the following Options:",
+ "ar": "يمكنك الدفع عن طريق الخيارات التالية:"
+ },
+
+ "please-accept-terms": {
+ "en": "Please accept terms & conditions to continue",
+ "ar": "يرجى قبول الشروط والأحكام للمتابعة"
+ },
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index 6e761991..703f5e3c 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -30,3 +30,4 @@ const NOTIFICATION_COUNT = 'notification-count';
const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
const H2O_UNIT = 'H2O_UNIT';
+const H2O_REMINDER = 'H2O_REMINDER';
diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
index bb100219..2f4ec9f0 100644
--- a/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
+++ b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
@@ -49,6 +49,7 @@ class UserDetailModel {
this.isNotificationON});
UserDetailModel.fromJson(Map json) {
+ if(json==null) return;
userID = json['UserID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
diff --git a/lib/core/model/active_medications/ActivePrescriptionReport.dart b/lib/core/model/active_medications/ActivePrescriptionReport.dart
index 866cb728..1917a6c8 100644
--- a/lib/core/model/active_medications/ActivePrescriptionReport.dart
+++ b/lib/core/model/active_medications/ActivePrescriptionReport.dart
@@ -23,7 +23,7 @@ class ActivePrescriptionReport {
dynamic patientName;
dynamic phoneOffice1;
dynamic prescriptionQR;
- int prescriptionTimes;
+ double prescriptionTimes;
dynamic productImage;
String productImageBase64;
String productImageString;
diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
index 5f41f878..26bf567a 100644
--- a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
+++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
@@ -1,4 +1,4 @@
-class ReauestInsuranceApprovalModel {
+class RequestInsuranceApprovalModel {
double versionID;
int channel;
int languageID;
@@ -15,7 +15,7 @@ class ReauestInsuranceApprovalModel {
int eXuldAPPNO;
int projectID;
- ReauestInsuranceApprovalModel(
+ RequestInsuranceApprovalModel(
{this.versionID,
this.channel,
this.languageID,
@@ -32,7 +32,7 @@ class ReauestInsuranceApprovalModel {
this.eXuldAPPNO,
this.projectID});
- ReauestInsuranceApprovalModel.fromJson(Map json) {
+ RequestInsuranceApprovalModel.fromJson(Map json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart
index 894fad46..27911267 100644
--- a/lib/core/model/insurance/insurance_approval.dart
+++ b/lib/core/model/insurance/insurance_approval.dart
@@ -1,140 +1,465 @@
-class InsuranceApprovalDetails {
- String procedureName;
- String status;
- String isInvoicedDesc;
-
- InsuranceApprovalDetails({
- this.procedureName,
- this.status,
- this.isInvoicedDesc,
- });
-
- InsuranceApprovalDetails.fromJson(Map json) {
- try {
- isInvoicedDesc = json['IsInvoicedDesc'];
- status = json['Status'];
- procedureName = json['ProcedureName'];
- } catch (e) {
- print(e);
- }
- }
-}
-
class InsuranceApprovalModel {
- InsuranceApprovalDetails approvalDetails;
- double versionID;
- int channel;
- int languageID;
- String iPAdress;
- String generalid;
- int patientOutSA;
- String sessionID;
- bool isDentalAllowedBackend;
- int deviceTypeID;
- int patientID;
- String tokenID;
- int patientTypeID;
- int patientType;
- int eXuldAPPNO;
+ String setupID;
int projectID;
- String doctorName;
- String clinicName;
- String patientDescription;
int approvalNo;
- String approvalStatusDescption;
- int unUsedCount;
-
- //String companyName;
+ String approvalDate;
+ int patientType;
+ int patientID;
+ int companyID;
+ int subCategoryID;
+ int doctorID;
+ int clinicID;
+ int approvalType;
+ String inpatientApprovalSubType;
+ String validFrom;
+ String vaildDays;
+ String validTo;
+ bool isApprovalOnGross;
+ bool isPackage;
+ int requestedAmount;
+ int actualApprovedAmount;
+ int aviliableAmount;
+ String companyApprovalNo;
+ int progNoteOrderNo;
+ String submitOn;
+ String receiptOn;
+ String remarks1;
+ String remarks2;
+ int status;
+ String feedbackStatusBy;
+ String feedbackStatus;
+ String feedbackStatusOn;
+ int authorizerID;
String expiryDate;
- String rceiptOn;
int appointmentNo;
+ int admissionNo;
+ int admissionRequestNo;
+ int createdBy;
+ String createdOn;
+ int editedBy;
+ String editedOn;
+ String rowVer;
+ bool isAddlDiscApplied;
+ int inProgressReasonID;
+ String extendedBy;
+ String extendedOn;
+ int subPolicyNo;
+ int noOrderAuthorizerID;
+ bool isVerbalApproval;
+ String subStatus;
+ bool isNotificationSend;
+ String eApprovalStatus;
+ String eApprovalRemarks;
+ bool isEmailSentOnDelayApproval;
+ int eAuthorizationID;
+ InsuranceApprovalDetails apporvalDetails;
+ String approvalStatusDescption;
+ String clinicName;
+ String clinicNameN;
+ String companyName;
+ String doctorImageURL;
+ String doctorName;
+ String doctorNameN;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isExecludeDoctor;
+ bool isInOutPatient;
+ String isInOutPatientDescription;
+ String isInOutPatientDescriptionN;
+ bool isLiveCareAppointment;
+ String projectName;
+ String projectNameN;
+ String qR;
+ List speciality;
+ String strApprovalDate;
+ String strExpiryDate;
+ String strSubmitDate;
+ int totaUnUsedCount;
+ int unUsedCount;
InsuranceApprovalModel(
- {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.eXuldAPPNO,
+ {this.setupID,
this.projectID,
- this.doctorName,
- this.clinicName,
- this.patientDescription,
this.approvalNo,
- this.approvalStatusDescption,
- this.unUsedCount,
- //this.companyName,
+ this.approvalDate,
+ this.patientType,
+ this.patientID,
+ this.companyID,
+ this.subCategoryID,
+ this.doctorID,
+ this.clinicID,
+ this.approvalType,
+ this.inpatientApprovalSubType,
+ this.validFrom,
+ this.vaildDays,
+ this.validTo,
+ this.isApprovalOnGross,
+ this.isPackage,
+ this.requestedAmount,
+ this.actualApprovedAmount,
+ this.aviliableAmount,
+ this.companyApprovalNo,
+ this.progNoteOrderNo,
+ this.submitOn,
+ this.receiptOn,
+ this.remarks1,
+ this.remarks2,
+ this.status,
+ this.feedbackStatusBy,
+ this.feedbackStatus,
+ this.feedbackStatusOn,
+ this.authorizerID,
this.expiryDate,
- this.rceiptOn,
- this.approvalDetails,
- this.appointmentNo});
-
- InsuranceApprovalDetails x = InsuranceApprovalDetails();
+ this.appointmentNo,
+ this.admissionNo,
+ this.admissionRequestNo,
+ this.createdBy,
+ this.createdOn,
+ this.editedBy,
+ this.editedOn,
+ this.rowVer,
+ this.isAddlDiscApplied,
+ this.inProgressReasonID,
+ this.extendedBy,
+ this.extendedOn,
+ this.subPolicyNo,
+ this.noOrderAuthorizerID,
+ this.isVerbalApproval,
+ this.subStatus,
+ this.isNotificationSend,
+ this.eApprovalStatus,
+ this.eApprovalRemarks,
+ this.isEmailSentOnDelayApproval,
+ this.eAuthorizationID,
+ this.apporvalDetails,
+ this.approvalStatusDescption,
+ this.clinicName,
+ this.clinicNameN,
+ this.companyName,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorNameN,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isExecludeDoctor,
+ this.isInOutPatient,
+ this.isInOutPatientDescription,
+ this.isInOutPatientDescriptionN,
+ this.isLiveCareAppointment,
+ this.projectName,
+ this.projectNameN,
+ this.qR,
+ this.speciality,
+ this.strApprovalDate,
+ this.strExpiryDate,
+ this.strSubmitDate,
+ this.totaUnUsedCount,
+ this.unUsedCount});
InsuranceApprovalModel.fromJson(Map json) {
- try {
- rceiptOn = json['ReceiptOn'];
- expiryDate = json['ExpiryDate'];
- //companyName = json['CompanyName'];
- unUsedCount = json['TotaUnUsedCount'];
- approvalStatusDescption = json['ApprovalStatusDescption'];
- approvalNo = json['ApprovalNo'];
- patientDescription = json['IsInOutPatientDescription'];
- 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'];
- eXuldAPPNO = json['EXuldAPPNO'];
- projectID = json['ProjectID'];
- doctorName = json['DoctorName'];
- clinicName = json['ClinicName'];
- approvalDetails =
- InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
- appointmentNo = json['AppointmentNo'];
- } catch (e) {
- print(e);
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ approvalNo = json['ApprovalNo'];
+ approvalDate = json['ApprovalDate'];
+ patientType = json['PatientType'];
+ patientID = json['PatientID'];
+ companyID = json['CompanyID'];
+ subCategoryID = json['SubCategoryID'];
+ doctorID = json['DoctorID'];
+ clinicID = json['ClinicID'];
+ approvalType = json['ApprovalType'];
+ inpatientApprovalSubType = json['InpatientApprovalSubType'];
+ validFrom = json['ValidFrom'];
+ vaildDays = json['VaildDays'];
+ validTo = json['ValidTo'];
+ isApprovalOnGross = json['IsApprovalOnGross'];
+ isPackage = json['IsPackage'];
+ requestedAmount = json['RequestedAmount'];
+ actualApprovedAmount = json['ActualApprovedAmount'];
+ aviliableAmount = json['AviliableAmount'];
+ companyApprovalNo = json['CompanyApprovalNo'];
+ progNoteOrderNo = json['ProgNoteOrderNo'];
+ submitOn = json['SubmitOn'];
+ receiptOn = json['ReceiptOn'];
+ remarks1 = json['Remarks1'];
+ remarks2 = json['Remarks2'];
+ status = json['Status'];
+ feedbackStatusBy = json['FeedbackStatusBy'];
+ feedbackStatus = json['FeedbackStatus'];
+ feedbackStatusOn = json['FeedbackStatusOn'];
+ authorizerID = json['AuthorizerID'];
+ expiryDate = json['ExpiryDate'];
+ appointmentNo = json['AppointmentNo'];
+ admissionNo = json['AdmissionNo'];
+ admissionRequestNo = json['AdmissionRequestNo'];
+ createdBy = json['CreatedBy'];
+ createdOn = json['CreatedOn'];
+ editedBy = json['EditedBy'];
+ editedOn = json['EditedOn'];
+ rowVer = json['RowVer'];
+ isAddlDiscApplied = json['IsAddlDiscApplied'];
+ inProgressReasonID = json['InProgressReasonID'];
+ extendedBy = json['ExtendedBy'];
+ extendedOn = json['ExtendedOn'];
+ subPolicyNo = json['SubPolicyNo'];
+ noOrderAuthorizerID = json['NoOrderAuthorizerID'];
+ isVerbalApproval = json['isVerbalApproval'];
+ subStatus = json['SubStatus'];
+ isNotificationSend = json['IsNotificationSend'];
+ eApprovalStatus = json['EApprovalStatus'];
+ eApprovalRemarks = json['EApprovalRemarks'];
+ isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
+ eAuthorizationID = json['EAuthorizationID'];
+ if (json['ApporvalDetails'] != null) {
+ apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
}
+ approvalStatusDescption = json['ApprovalStatusDescption'];
+ clinicName = json['ClinicName'];
+ clinicNameN = json['ClinicNameN'];
+ companyName = json['CompanyName'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorNameN = json['DoctorNameN'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ isInOutPatient = json['IsInOutPatient'];
+ isInOutPatientDescription = json['IsInOutPatientDescription'];
+ isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
+ projectName = json['ProjectName'];
+ projectNameN = json['ProjectNameN'];
+ qR = json['QR'];
+ speciality = json['Speciality'].cast();
+ strApprovalDate = json['StrApprovalDate'];
+ strExpiryDate = json['StrExpiryDate'];
+ strSubmitDate = json['StrSubmitDate'];
+ totaUnUsedCount = json['TotaUnUsedCount'];
+ unUsedCount = json['UnUsedCount'];
}
Map toJson() {
final Map data = new Map();
- 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['PatientID'] = this.patientID;
- data['TokenID'] = this.tokenID;
- data['PatientTypeID'] = this.patientTypeID;
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['ApprovalNo'] = this.approvalNo;
+ data['ApprovalDate'] = this.approvalDate;
data['PatientType'] = this.patientType;
- if (appointmentNo == null) {
- data['EXuldAPPNO'] = this.eXuldAPPNO;
- data['ProjectID'] = this.projectID;
- }
- if (appointmentNo != null) {
- data['AppointmentNo'] = this.appointmentNo;
+ data['PatientID'] = this.patientID;
+ data['CompanyID'] = this.companyID;
+ data['SubCategoryID'] = this.subCategoryID;
+ data['DoctorID'] = this.doctorID;
+ data['ClinicID'] = this.clinicID;
+ data['ApprovalType'] = this.approvalType;
+ data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
+ data['ValidFrom'] = this.validFrom;
+ data['VaildDays'] = this.vaildDays;
+ data['ValidTo'] = this.validTo;
+ data['IsApprovalOnGross'] = this.isApprovalOnGross;
+ data['IsPackage'] = this.isPackage;
+ data['RequestedAmount'] = this.requestedAmount;
+ data['ActualApprovedAmount'] = this.actualApprovedAmount;
+ data['AviliableAmount'] = this.aviliableAmount;
+ data['CompanyApprovalNo'] = this.companyApprovalNo;
+ data['ProgNoteOrderNo'] = this.progNoteOrderNo;
+ data['SubmitOn'] = this.submitOn;
+ data['ReceiptOn'] = this.receiptOn;
+ data['Remarks1'] = this.remarks1;
+ data['Remarks2'] = this.remarks2;
+ data['Status'] = this.status;
+ data['FeedbackStatusBy'] = this.feedbackStatusBy;
+ data['FeedbackStatus'] = this.feedbackStatus;
+ data['FeedbackStatusOn'] = this.feedbackStatusOn;
+ data['AuthorizerID'] = this.authorizerID;
+ data['ExpiryDate'] = this.expiryDate;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['AdmissionNo'] = this.admissionNo;
+ data['AdmissionRequestNo'] = this.admissionRequestNo;
+ data['CreatedBy'] = this.createdBy;
+ data['CreatedOn'] = this.createdOn;
+ data['EditedBy'] = this.editedBy;
+ data['EditedOn'] = this.editedOn;
+ data['RowVer'] = this.rowVer;
+ data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
+ data['InProgressReasonID'] = this.inProgressReasonID;
+ data['ExtendedBy'] = this.extendedBy;
+ data['ExtendedOn'] = this.extendedOn;
+ data['SubPolicyNo'] = this.subPolicyNo;
+ data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
+ data['isVerbalApproval'] = this.isVerbalApproval;
+ data['SubStatus'] = this.subStatus;
+ data['IsNotificationSend'] = this.isNotificationSend;
+ data['EApprovalStatus'] = this.eApprovalStatus;
+ data['EApprovalRemarks'] = this.eApprovalRemarks;
+ data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
+ data['EAuthorizationID'] = this.eAuthorizationID;
+ if (this.apporvalDetails != null) {
+ data['ApporvalDetails'] = this.apporvalDetails.toJson;
}
+ data['ApprovalStatusDescption'] = this.approvalStatusDescption;
+ data['ClinicName'] = this.clinicName;
+ data['ClinicNameN'] = this.clinicNameN;
+ data['CompanyName'] = this.companyName;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['IsInOutPatient'] = this.isInOutPatient;
+ data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
+ data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
+ data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
+ data['ProjectName'] = this.projectName;
+ data['ProjectNameN'] = this.projectNameN;
+ data['QR'] = this.qR;
+ data['Speciality'] = this.speciality;
+ data['StrApprovalDate'] = this.strApprovalDate;
+ data['StrExpiryDate'] = this.strExpiryDate;
+ data['StrSubmitDate'] = this.strSubmitDate;
+ data['TotaUnUsedCount'] = this.totaUnUsedCount;
+ data['UnUsedCount'] = this.unUsedCount;
+ return data;
+ }
+}
+
+class InsuranceApprovalDetails {
+ int setupID;
+ int projectID;
+ int approvalNo;
+ int lineItemNo;
+ int orderType;
+ int procedureID;
+ int toothNo;
+ int price;
+ int approvedAmount;
+ String unapprovedPatientShare;
+ int waivedAmount;
+ String discountType;
+ int discountValue;
+ String shareType;
+ String patientShareTypeValue;
+ String companyShareTypeValue;
+ String patientShare;
+ String companyShare;
+ int deductableAmount;
+ String disapprovedRemarks;
+ int progNoteOrderNo;
+ int progNoteLineItemNo;
+ String invoiceTransactionType;
+ int invoiceNo;
+ String procedureName;
+ String procedureNameN;
+ String status;
+ bool isInvoiced;
+ String isInvoicedDesc;
+
+ InsuranceApprovalDetails(
+ {this.setupID,
+ this.projectID,
+ this.approvalNo,
+ this.lineItemNo,
+ this.orderType,
+ this.procedureID,
+ this.toothNo,
+ this.price,
+ this.approvedAmount,
+ this.unapprovedPatientShare,
+ this.waivedAmount,
+ this.discountType,
+ this.discountValue,
+ this.shareType,
+ this.patientShareTypeValue,
+ this.companyShareTypeValue,
+ this.patientShare,
+ this.companyShare,
+ this.deductableAmount,
+ this.disapprovedRemarks,
+ this.progNoteOrderNo,
+ this.progNoteLineItemNo,
+ this.invoiceTransactionType,
+ this.invoiceNo,
+ this.procedureName,
+ this.procedureNameN,
+ this.status,
+ this.isInvoiced,
+ this.isInvoicedDesc});
+
+ InsuranceApprovalDetails.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ approvalNo = json['ApprovalNo'];
+ lineItemNo = json['LineItemNo'];
+ orderType = json['OrderType'];
+ procedureID = json['ProcedureID'];
+ toothNo = json['ToothNo'];
+ price = json['Price'];
+ approvedAmount = json['ApprovedAmount'];
+ unapprovedPatientShare = json['UnapprovedPatientShare'];
+ waivedAmount = json['WaivedAmount'];
+ discountType = json['DiscountType'];
+ discountValue = json['DiscountValue'];
+ shareType = json['ShareType'];
+ patientShareTypeValue = json['PatientShareTypeValue'];
+ companyShareTypeValue = json['CompanyShareTypeValue'];
+ patientShare = json['PatientShare'];
+ companyShare = json['CompanyShare'];
+ deductableAmount = json['DeductableAmount'];
+ disapprovedRemarks = json['DisapprovedRemarks'];
+ progNoteOrderNo = json['ProgNoteOrderNo'];
+ progNoteLineItemNo = json['ProgNoteLineItemNo'];
+ invoiceTransactionType = json['InvoiceTransactionType'];
+ invoiceNo = json['InvoiceNo'];
+ procedureName = json['ProcedureName'];
+ procedureNameN = json['ProcedureNameN'];
+ status = json['Status'];
+ isInvoiced = json['IsInvoiced'];
+ isInvoicedDesc = json['IsInvoicedDesc'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['ApprovalNo'] = this.approvalNo;
+ data['LineItemNo'] = this.lineItemNo;
+ data['OrderType'] = this.orderType;
+ data['ProcedureID'] = this.procedureID;
+ data['ToothNo'] = this.toothNo;
+ data['Price'] = this.price;
+ data['ApprovedAmount'] = this.approvedAmount;
+ data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
+ data['WaivedAmount'] = this.waivedAmount;
+ data['DiscountType'] = this.discountType;
+ data['DiscountValue'] = this.discountValue;
+ data['ShareType'] = this.shareType;
+ data['PatientShareTypeValue'] = this.patientShareTypeValue;
+ data['CompanyShareTypeValue'] = this.companyShareTypeValue;
+ data['PatientShare'] = this.patientShare;
+ data['CompanyShare'] = this.companyShare;
+ data['DeductableAmount'] = this.deductableAmount;
+ data['DisapprovedRemarks'] = this.disapprovedRemarks;
+ data['ProgNoteOrderNo'] = this.progNoteOrderNo;
+ data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
+ data['InvoiceTransactionType'] = this.invoiceTransactionType;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['ProcedureName'] = this.procedureName;
+ data['ProcedureNameN'] = this.procedureNameN;
+ data['Status'] = this.status;
+ data['IsInvoiced'] = this.isInvoiced;
+ data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data;
}
}
diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart
index 8c18df62..5545b25b 100644
--- a/lib/core/model/prescriptions/prescription_report.dart
+++ b/lib/core/model/prescriptions/prescription_report.dart
@@ -134,7 +134,7 @@ class PrescriptionReport {
frequencyID = json['frequencyID'];
routeID = json['routeID'];
name = json['name'];
- itemDescriptionN = json['itemDescriptionN'];
+ itemDescriptionN = json['ItemDescriptionN'];
routeN = json['routeN'];
frequencyN = json['frequencyN'];
}
diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart
index 203eaaff..01a34c47 100644
--- a/lib/core/model/prescriptions/prescription_report_enh.dart
+++ b/lib/core/model/prescriptions/prescription_report_enh.dart
@@ -15,6 +15,7 @@ class PrescriptionReportEnh {
String imageThumbUrl;
String isCovered;
String itemDescription;
+ String itemDescriptionN;
int itemID;
String orderDate;
int patientID;
@@ -35,38 +36,39 @@ class PrescriptionReportEnh {
PrescriptionReportEnh(
{this.address,
- this.appointmentNo,
- this.clinic,
- this.companyName,
- this.days,
- this.doctorName,
- this.doseDailyQuantity,
- this.frequency,
- this.frequencyNumber,
- this.image,
- this.imageExtension,
- this.imageSRCUrl,
- this.imageString,
- this.imageThumbUrl,
- this.isCovered,
- this.itemDescription,
- this.itemID,
- this.orderDate,
- this.patientID,
- this.patientName,
- this.phoneOffice1,
- this.prescriptionQR,
- this.prescriptionTimes,
- this.productImage,
- this.productImageBase64,
- this.productImageString,
- this.projectID,
- this.projectName,
- this.remarks,
- this.route,
- this.sKU,
- this.scaleOffset,
- this.startDate});
+ this.appointmentNo,
+ this.clinic,
+ this.companyName,
+ this.days,
+ this.doctorName,
+ this.doseDailyQuantity,
+ this.frequency,
+ this.frequencyNumber,
+ this.image,
+ this.imageExtension,
+ this.imageSRCUrl,
+ this.imageString,
+ this.imageThumbUrl,
+ this.isCovered,
+ this.itemDescription,
+ this.itemDescriptionN,
+ this.itemID,
+ this.orderDate,
+ this.patientID,
+ this.patientName,
+ this.phoneOffice1,
+ this.prescriptionQR,
+ this.prescriptionTimes,
+ this.productImage,
+ this.productImageBase64,
+ this.productImageString,
+ this.projectID,
+ this.projectName,
+ this.remarks,
+ this.route,
+ this.sKU,
+ this.scaleOffset,
+ this.startDate});
PrescriptionReportEnh.fromJson(Map json) {
address = json['Address'];
@@ -85,6 +87,7 @@ class PrescriptionReportEnh {
imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
+ itemDescriptionN = json['ItemDescriptionN'];
itemID = json['ItemID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
@@ -122,6 +125,7 @@ class PrescriptionReportEnh {
data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;
+ data['ItemDescriptionN'] = this.itemDescriptionN;
data['ItemID'] = this.itemID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID;
diff --git a/lib/core/model/prescriptions/prescription_report_inp.dart b/lib/core/model/prescriptions/prescription_report_inp.dart
new file mode 100644
index 00000000..b802337b
--- /dev/null
+++ b/lib/core/model/prescriptions/prescription_report_inp.dart
@@ -0,0 +1,124 @@
+class PrescriptionReportINP {
+ int patientID;
+ String patientName;
+ String patientAge;
+ String patientGender;
+ String address;
+ String phoneOffice;
+ String itemDescription;
+ int doseTimingID;
+ int frequencyID;
+ int routeID;
+ String clinic;
+ String doctorName;
+ String route;
+ String frequency;
+ String remarks;
+ String name;
+ int days;
+ String startDate;
+ String orderDate;
+ int doseDailyQuantity;
+ int itemID;
+ Null productImage;
+ String sKU;
+ String itemDescriptionN;
+ String routeN;
+ String frequencyN;
+ String imageSRCUrl;
+ String imageThumbUrl;
+
+ PrescriptionReportINP(
+ {this.patientID,
+ this.patientName,
+ this.patientAge,
+ this.patientGender,
+ this.address,
+ this.phoneOffice,
+ this.itemDescription,
+ this.doseTimingID,
+ this.frequencyID,
+ this.routeID,
+ this.clinic,
+ this.doctorName,
+ this.route,
+ this.frequency,
+ this.remarks,
+ this.name,
+ this.days,
+ this.startDate,
+ this.orderDate,
+ this.doseDailyQuantity,
+ this.itemID,
+ this.productImage,
+ this.sKU,
+ this.itemDescriptionN,
+ this.routeN,
+ this.frequencyN,
+ this.imageSRCUrl,
+ this.imageThumbUrl});
+
+ PrescriptionReportINP.fromJson(Map json) {
+ patientID = json['PatientID'];
+ patientName = json['PatientName'];
+ patientAge = json['PatientAge'];
+ patientGender = json['PatientGender'];
+ address = json['Address'];
+ phoneOffice = json['PhoneOffice'];
+ itemDescription = json['ItemDescription'];
+ doseTimingID = json['DoseTimingID'];
+ frequencyID = json['FrequencyID'];
+ routeID = json['RouteID'];
+ clinic = json['Clinic'];
+ doctorName = json['DoctorName'];
+ route = json['Route'];
+ frequency = json['Frequency'];
+ remarks = json['Remarks'];
+ name = json['Name'];
+ days = json['Days'];
+ startDate = json['StartDate'];
+ orderDate = json['OrderDate'];
+ doseDailyQuantity = json['DoseDailyQuantity'];
+ itemID = json['ItemID'];
+ productImage = json['ProductImage'];
+ sKU = json['SKU'];
+ itemDescriptionN = json['ItemDescriptionN'];
+ routeN = json['RouteN'];
+ frequencyN = json['FrequencyN'];
+ imageSRCUrl = json['ImageSRCUrl'];
+ imageThumbUrl = json['ImageThumbUrl'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['PatientID'] = this.patientID;
+ data['PatientName'] = this.patientName;
+ data['PatientAge'] = this.patientAge;
+ data['PatientGender'] = this.patientGender;
+ data['Address'] = this.address;
+ data['PhoneOffice'] = this.phoneOffice;
+ data['ItemDescription'] = this.itemDescription;
+ data['DoseTimingID'] = this.doseTimingID;
+ data['FrequencyID'] = this.frequencyID;
+ data['RouteID'] = this.routeID;
+ data['Clinic'] = this.clinic;
+ data['DoctorName'] = this.doctorName;
+ data['Route'] = this.route;
+ data['Frequency'] = this.frequency;
+ data['Remarks'] = this.remarks;
+ data['Name'] = this.name;
+ data['Days'] = this.days;
+ data['StartDate'] = this.startDate;
+ data['OrderDate'] = this.orderDate;
+ data['DoseDailyQuantity'] = this.doseDailyQuantity;
+ data['ItemID'] = this.itemID;
+ data['ProductImage'] = this.productImage;
+ data['SKU'] = this.sKU;
+ data['ItemDescriptionN'] = this.itemDescriptionN;
+ data['RouteN'] = this.routeN;
+ data['FrequencyN'] = this.frequencyN;
+ data['ImageSRCUrl'] = this.imageSRCUrl;
+ data['ImageThumbUrl'] = this.imageThumbUrl;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/request_send_prescription_email.dart b/lib/core/model/prescriptions/request_send_prescription_email.dart
index 2d1f3aa3..ecd0f36d 100644
--- a/lib/core/model/prescriptions/request_send_prescription_email.dart
+++ b/lib/core/model/prescriptions/request_send_prescription_email.dart
@@ -23,6 +23,7 @@ class RequestSendPrescriptionEmail {
String setupID;
String clinicName;
String doctorName;
+ int doctorID;
int projectID;
List listPrescriptions;
@@ -49,7 +50,8 @@ class RequestSendPrescriptionEmail {
this.setupID,
this.clinicName,
this.doctorName,
- this.projectID});
+ this.projectID,
+ this.doctorID});
RequestSendPrescriptionEmail.fromJson(Map json) {
appointmentDate = json['AppointmentDate'];
@@ -75,6 +77,7 @@ class RequestSendPrescriptionEmail {
clinicName = json['ClinicName'];
doctorName = json['DoctorName'];
projectID = json['ProjectID'];
+ doctorID = json['DoctorID'];
}
Map toJson() {
@@ -106,7 +109,7 @@ class RequestSendPrescriptionEmail {
data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;
-
+ data['DoctorID'] = this.doctorID;
return data;
}
}
diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
index 37fdae75..4b38ef65 100644
--- a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
+++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
@@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:flutter/cupertino.dart';
class BariatricsService extends BaseService {
List clinicCategoryList = [];
@@ -75,19 +76,24 @@ class BariatricsService extends BaseService {
}, body: body);
}
- Future getDoctorList() async {
+ Future getDoctorList({@required DiseasesByClinic disease}) async {
hasError = false;
- DoctorListByTimeRequestModel _doctorListReq = DoctorListByTimeRequestModel();
- _doctorListReq.isGetNearAppointment = false;
- _doctorListReq.continueDentalPlan = false;
- _doctorListReq.isSearchAppointmnetByClinicID = true;
- _doctorListReq.latitude = 0;
- _doctorListReq.longitude = 0;
- _doctorListReq.license = true;
- _doctorListReq.clinicID = 108;
- _doctorListReq.patientID = 0;
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
- //body['ClinicID'] = 108; // hint: it is static depend on IONIC project
+ Map body = Map();
+ body['ClinicID'] = 108; // hint: it is static depend on IONIC project
+ body['ContinueDentalPlan'] = false;
+ body['IsGetNearAppointment'] = false;
+ body['IsSearchAppointmnetByClinicID'] = true;
+ body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+ body['Latitude'] = 0;
+ body['License'] = true;
+ body['Longitude'] = 0;
+ body['PatientID'] = 0;
+ body['isDentalAllowedBackend'] = false;
+
+ if(disease != null)
+ body['DiseaseID'] = disease.diseasesID;
await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) {
doctorListByTime.clear();
@@ -98,6 +104,6 @@ class BariatricsService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _doctorListReq.toJson());
+ }, body: body);
}
}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index 03f12df1..43c39fec 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -29,8 +29,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onFailure: (String error, int statusCode) {},
/// body: Map();
///
-AuthenticatedUserObject authenticatedUserObject =
- locator();
+AuthenticatedUserObject authenticatedUserObject = locator();
VitalSignService _vitalSignService = locator();
class BaseAppClient {
@@ -50,14 +49,10 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
- Map headers = {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- };
+ Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
@@ -72,19 +67,13 @@ class BaseAppClient {
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
- body['PatientOutSA'] = body.containsKey('PatientOutSA')
- ? body['PatientOutSA'] != null
- ? body['PatientOutSA']
- : PATIENT_OUT_SA
- : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -107,19 +96,20 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
+ body['PatientOutSA'] = body.containsKey('PatientOutSA')
+ ? body['PatientOutSA'] != null
+ ? body['PatientOutSA']
+ : PATIENT_OUT_SA
+ : PATIENT_OUT_SA;
body['SessionID'] = SESSION_ID; //getSe
+
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': pharmacyToken,
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(
- user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
@@ -131,8 +121,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) {
- final response = await http.post(url.trim(),
- body: json.encode(body), headers: headers);
+ final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@@ -144,8 +133,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -160,34 +148,24 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else if (!parsed['IsAuthenticated']) {
@@ -201,9 +179,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -240,16 +216,13 @@ class BaseAppClient {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
@@ -271,12 +244,11 @@ class BaseAppClient {
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -299,9 +271,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSe
headers = {
@@ -320,8 +290,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) {
- final response = await http.post(url.trim(),
- body: json.encode(body), headers: headers);
+ final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@@ -333,8 +302,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -349,34 +317,24 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else if (!parsed['IsAuthenticated']) {
@@ -390,9 +348,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -408,8 +364,7 @@ class BaseAppClient {
}
Future navigateToAppUpdate(context, String text) async {
- Navigator.pushReplacement(
- context, FadePage(page: AppUpdatePage(appUpdateText: text)));
+ Navigator.pushReplacement(context, FadePage(page: AppUpdatePage(appUpdateText: text)));
}
get(String endPoint,
@@ -433,10 +388,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
@@ -480,9 +432,7 @@ class BaseAppClient {
'Content-Type': 'text/html; charset=utf-8',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
});
@@ -491,8 +441,7 @@ class BaseAppClient {
if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) {
- AppToast.showErrorToast(
- message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
+ AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
Navigator.of(AppGlobal.context).pushNamed(HOME);
} else {
onFailure('Error While Fetching data', statusCode);
@@ -520,10 +469,7 @@ class BaseAppClient {
final response = await http.post(
url.trim(),
body: json.encode(body),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -556,10 +502,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -586,10 +529,7 @@ class BaseAppClient {
final response = await http.put(
url.trim(),
body: json.encode(body),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -622,10 +562,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.delete(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -645,10 +582,8 @@ class BaseAppClient {
await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser();
- Provider.of(AppGlobal.context, listen: false).isLogin =
- false;
- var model =
- Provider.of(AppGlobal.context, listen: false);
+ Provider.of(AppGlobal.context, listen: false).isLogin = false;
+ var model = Provider.of(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
@@ -662,8 +597,7 @@ class BaseAppClient {
static defaultHttpParameters() async {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
var params = {};
if (user != null) {
@@ -699,8 +633,7 @@ class BaseAppClient {
try {
if (isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@@ -723,12 +656,11 @@ class BaseAppClient {
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -751,9 +683,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token);
}
@@ -765,17 +695,14 @@ class BaseAppClient {
var ss = json.encode(body);
if (await Utils.checkConnection()) {
- final response =
- await http.post(url.trim(), body: json.encode(body), headers: {
+ final response = await http.post(url.trim(), body: json.encode(body), headers: {
// 'Content-Type': 'application/json',
// 'Accept': 'application/json',
// 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
});
@@ -790,8 +717,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -806,31 +732,21 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
} else if (!parsed['IsAuthenticated']) {
await logout();
@@ -843,9 +759,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 0b626342..6eb1f415 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/ReauestInsuranceApprovalModel.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_model.dart';
@@ -25,8 +26,7 @@ class InsuranceCardService extends BaseService {
List insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false;
- GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
- GetAllSharedRecordsByStatusResponse();
+ GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
clearInsuranceCard() {
_cardList.clear();
@@ -36,19 +36,12 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear();
}
-
- InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
- isDentalAllowedBackend: false,
- patientTypeID: 1,
- patientType: 1,
- eXuldAPPNO: 0,
- projectID: 0);
+ RequestInsuranceApprovalModel _requestInsuranceApprovalModel = RequestInsuranceApprovalModel(isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0);
Future getInsurance() async {
hasError = false;
_cardList.clear();
- await baseAppClient.post(GET_PAtIENTS_INSURANCE,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE, onSuccess: (dynamic response, int statusCode) {
response['List_PatientInsuranceCard'].forEach((item) {
_cardList.add(InsuranceCardModel.fromJson(item));
});
@@ -60,10 +53,9 @@ class InsuranceCardService extends BaseService {
Future getInsuranceUpdate() async {
hasError = false;
- _cardList.clear();
- await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED,
- onSuccess: (dynamic response, int statusCode) {
- _cardUpdated.clear();
+ _cardList.clear();
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, onSuccess: (dynamic response, int statusCode) {
+ _cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item));
});
@@ -77,17 +69,16 @@ class InsuranceCardService extends BaseService {
hasError = false;
// _cardList.clear();
if (appointmentNo != null) {
- _insuranceApprovalModel.appointmentNo = appointmentNo;
- _insuranceApprovalModel.eXuldAPPNO = null;
- _insuranceApprovalModel.projectID = null;
+ // _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
+ _requestInsuranceApprovalModel.eXuldAPPNO = null;
+ _requestInsuranceApprovalModel.projectID = null;
} else {
- _insuranceApprovalModel.appointmentNo = null;
- _insuranceApprovalModel.eXuldAPPNO = 0;
- _insuranceApprovalModel.projectID = 0;
+ // _requestInsuranceApprovalModel.appointmentNo = null;
+ _requestInsuranceApprovalModel.eXuldAPPNO = 0;
+ _requestInsuranceApprovalModel.projectID = 0;
}
- await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length);
_insuranceApproval.clear();
_insuranceApproval.length = 0;
@@ -97,14 +88,13 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _insuranceApprovalModel.toJson());
+ }, body: _requestInsuranceApprovalModel.toJson());
}
Future getFamilyFiles() async {
var myFamily = await sharedPref.getObject(FAMILY_FILE);
if (myFamily != null) {
- getAllSharedRecordsByStatusResponse =
- GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
+ getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
} else {
getSharedRecordByStatus();
}
@@ -115,68 +105,75 @@ class InsuranceCardService extends BaseService {
dynamic localRes;
var request = GetAllSharedRecordsByStatusReq();
request.status = 0;
- await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS,
- onSuccess: (dynamic response, int statusCode) {
+ 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);
+ getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error;
}
}
- Future getInsuranceDetails(data) async{
+
+ Future getInsuranceDetails(data) async {
dynamic localRes;
- await baseAppClient.post(INSURANCE_DETAILS,
- onSuccess: (dynamic response, int statusCode) {
- localRes = response['List_InsuranceCheckList'];
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
+ await baseAppClient.post(
+ INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ localRes = response['List_InsuranceCheckList'];
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: {'CompanyID': data.companyID, 'SubCategoryID': data.subCategoryID},
+ );
return Future.value(localRes);
}
- Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
+ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID}) async {
error = "";
hasError = false;
insuranceCardDetails = null;
isHaveInsuranceCard = false;
- await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
- onSuccess: (dynamic response, int statusCode) {
- insuranceCardDetailsList.clear();
- isHaveInsuranceCard = true;
- response['List_PatientInsuranceDetails'].forEach((item) {
- insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
- });
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},);
-
+ await baseAppClient.post(
+ GET_PATIENT_INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ insuranceCardDetailsList.clear();
+ isHaveInsuranceCard = true;
+ response['List_PatientInsuranceDetails'].forEach((item) {
+ insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
+ });
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: {'SetupID': setupID, 'ProjectID': projectID, 'PatientIdentificationID': patientIdentificationID, 'isDentalAllowedBackend': false, 'PatientID': patientID},
+ );
}
- Future uploadInsuranceCard({ String patientIdentificationID,int patientID,String image=""}) async{
+ Future uploadInsuranceCard({String patientIdentificationID, int patientID, String image = ""}) async {
error = "";
- Map body = Map();
- body['PatientID']=patientID;
- body['PatientType']=user.patientType;
- body['MobileNo']=user.mobileNumber;
- body['PatientIdentificationID']=patientIdentificationID;
- body['InsuranceCardImage']= image;
-
- await baseAppClient.post(UPLOAD_INSURANCE_CARD,
- onSuccess: (dynamic response, int statusCode) {
-
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:body,);
-
+ Map body = Map();
+ body['PatientID'] = patientID;
+ body['PatientType'] = user.patientType;
+ body['MobileNo'] = user.mobileNumber;
+ body['PatientIdentificationID'] = patientIdentificationID;
+ body['InsuranceCardImage'] = image;
+
+ await baseAppClient.post(
+ UPLOAD_INSURANCE_CARD,
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: body,
+ );
}
}
diff --git a/lib/core/service/medical/BloodPressureService.dart b/lib/core/service/medical/BloodPressureService.dart
index 82130750..7a849808 100644
--- a/lib/core/service/medical/BloodPressureService.dart
+++ b/lib/core/service/medical/BloodPressureService.dart
@@ -73,7 +73,7 @@ class BloodPressureService extends BaseService {
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
- body['to'] = user.emailAddress;
+ body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_PRESSURE_REPORT,
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
diff --git a/lib/core/service/medical/BloodSugarService.dart b/lib/core/service/medical/BloodSugarService.dart
index e8e2fabf..4de444ea 100644
--- a/lib/core/service/medical/BloodSugarService.dart
+++ b/lib/core/service/medical/BloodSugarService.dart
@@ -114,7 +114,7 @@ class BloodSugarService extends BaseService {
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
- body['to'] = user.emailAddress;
+ body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT,
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart
index e9741a7f..af34f2ba 100644
--- a/lib/core/service/medical/prescriptions_service.dart
+++ b/lib/core/service/medical/prescriptions_service.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
+import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
@@ -15,7 +16,7 @@ import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService {
List prescriptionsList = List();
-
+ List prescriptionReportListINP = List();
List prescriptionsOrderList = List();
Future getPrescriptions() async {
@@ -56,32 +57,40 @@ class PrescriptionsService extends BaseService {
appointmentNo: 0, isDentalAllowedBackend: false);
List prescriptionReportList = List();
- Future getPrescriptionReport(
- {Prescriptions prescriptions}) async {
+ Future getPrescriptionReport({Prescriptions prescriptions}) async {
hasError = false;
- _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
+ if (prescriptions.isInOutPatient == false) {
+ _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
+ } else {
+ _requestPrescriptionReport.dischargeNo = 0;
+ }
_requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
- await baseAppClient.post(prescriptions.isInOutPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
+ await baseAppClient.post(
+ prescriptions.isInOutPatient
+ ? GET_PRESCRIPTION_REPORT_ENH
+ : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
- if(prescriptions.isInOutPatient){
+ if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
- prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
- prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ prescriptionReportList
+ .add(PrescriptionReport.fromJson(prescriptions));
+ prescriptionReportEnhList
+ .add(PrescriptionReportEnh.fromJson(prescriptions));
});
- }else{
+ } else {
+ prescriptionReportListINP.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
- prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
+ prescriptionReportListINP
+ .add(PrescriptionReportINP.fromJson(prescriptions));
});
}
-
-
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@@ -90,35 +99,42 @@ class PrescriptionsService extends BaseService {
RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail(
- isDentalAllowedBackend: false,);
+ isDentalAllowedBackend: false,
+ );
Future sendPrescriptionEmail(String appointmentDate, int patientID,
- String clinicName, String doctorName, int projectID) async {
+ String clinicName, String doctorName, int doctorID, int projectID) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID;
- _requestSendPrescriptionEmail.to = user.emailAddress;
- _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
- _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
- _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
- _requestSendPrescriptionEmail.patientName = user.firstName +" "+ user.lastName;
- _requestSendPrescriptionEmail.setupID = user.setupID;
+ _requestSendPrescriptionEmail.to = user.emailAddress;
+ _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
+ _requestSendPrescriptionEmail.patientIditificationNum =
+ user.patientIdentificationNo;
+ _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
+ _requestSendPrescriptionEmail.doctorID = doctorID;
+ _requestSendPrescriptionEmail.patientName =
+ user.firstName + " " + user.lastName;
+ _requestSendPrescriptionEmail.setupID = user.setupID;
+ _requestSendPrescriptionEmail.to = user.emailAddress;
hasError = false;
- await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
+ await baseAppClient
+ .post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
- RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
+ RequestGetListPharmacyForPrescriptions
+ requestGetListPharmacyForPrescriptions =
+ RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
isDentalAllowedBackend: false,
-
);
List pharmacyPrescriptionsList = List();
@@ -139,18 +155,19 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
- RequestPrescriptionReportEnh(isDentalAllowedBackend: false,);
+ RequestPrescriptionReportEnh(
+ isDentalAllowedBackend: false,
+ );
List prescriptionReportEnhList = List();
- Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
-
+ Future getPrescriptionReportEnh(
+ {PrescriptionsOrder prescriptionsOrder}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
-
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
@@ -160,46 +177,45 @@ class PrescriptionsService extends BaseService {
isInPatient = element.isInOutPatient;
}
} else {
- if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
+ if (int.parse(prescriptionsOrder.appointmentNo) ==
+ element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
- isInPatient = element.isInOutPatient;///call inpGetPrescriptionReport
+ isInPatient = element.isInOutPatient;
+
+ ///call inpGetPrescriptionReport
}
}
});
hasError = false;
- await baseAppClient.post(isInPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
+ await baseAppClient.post(
+ isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
- if(isInPatient){
+ if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
- prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ prescriptionReportEnhList
+ .add(PrescriptionReportEnh.fromJson(prescriptions));
});
- }else{
+ } else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
-
- PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
- reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
+ PrescriptionReportEnh reportEnh =
+ PrescriptionReportEnh.fromJson(prescriptions);
+ reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
-
});
-
}
-
-
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
-
-
}
Future updatePressOrder({@required int presOrderID}) async {
@@ -211,12 +227,10 @@ class PrescriptionsService extends BaseService {
body['PresOrderStatus'] = 4;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
- onSuccess: (dynamic response, int statusCode) {
-
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body: body);
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
}
-
}
diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
index 609e5424..53b39025 100644
--- a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
@@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_
import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import 'package:flutter/cupertino.dart';
import '../../../../locator.dart';
@@ -52,9 +53,9 @@ class BariatricsViewModel extends BaseViewModel {
}
}
- void getDoctorList() async {
+ void getDoctorList({@required DiseasesByClinic disease}) async {
setState(ViewState.Busy);
- await _service.getDoctorList();
+ await _service.getDoctorList(disease:disease);
if (_service.hasError) {
error = _service.error;
setState(ViewState.Error);
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 4473c117..f75abe88 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -122,14 +122,17 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error;
setState(ViewState.Error);
} else {
- bool isShouldClear = false;
- if (_labsService.labOrdersResultsList.length == 1) {
- labOrdersResultsList.forEach((element) {
- if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty)
- isShouldClear = true;
- });
- }
- if (isShouldClear) _labsService.labOrdersResultsList.clear();
+ /// commented out based on PAP-304
+ // bool isShouldClear = false;
+ // if (_labsService.labOrdersResultsList.length == 1) {
+ // labOrdersResultsList.forEach((element) {
+ // if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty)
+ // isShouldClear = true;
+ // });
+ // }
+ // if (isShouldClear)
+ //
+ // _labsService.labOrdersResultsList.clear();
setState(ViewState.Idle);
}
}
diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart
index 2c32a081..3ad9df99 100644
--- a/lib/core/viewModels/medical/prescriptions_view_model.dart
+++ b/lib/core/viewModels/medical/prescriptions_view_model.dart
@@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
-
+import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
import '../../../core/model/prescriptions/Prescriptions.dart';
@@ -19,17 +19,20 @@ class PrescriptionsViewModel extends BaseViewModel {
List _prescriptionsOrderListClinic = List();
List _prescriptionsOrderListHospital = List();
-
List get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
+ List get prescriptionReportListINP =>
+ _prescriptionsService.prescriptionReportListINP;
+
List get prescriptionsList =>
_prescriptionsService.prescriptionsList;
- List get prescriptionsHistory => _prescriptionsService.prescriptionsOrderList;
-
- List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList ;
+ List get prescriptionsHistory =>
+ _prescriptionsService.prescriptionsOrderList;
+ List get pharmacyPrescriptionsList =>
+ _prescriptionsService.pharmacyPrescriptionsList;
List get prescriptionsOrderList =>
filterType == FilterType.Clinic
@@ -105,7 +108,8 @@ class PrescriptionsViewModel extends BaseViewModel {
getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy);
- await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
+ await _prescriptionsService.getPrescriptionReport(
+ prescriptions: prescriptions);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@@ -119,11 +123,12 @@ class PrescriptionsViewModel extends BaseViewModel {
int patientID,
String clinicName,
String doctorName,
- String mes,
+ int doctorID,
+ String mes,
int projectID}) async {
setState(ViewState.BusyLocal);
- await _prescriptionsService.sendPrescriptionEmail(
- appointmentDate, patientID, clinicName, doctorName, projectID);
+ await _prescriptionsService.sendPrescriptionEmail(appointmentDate,
+ patientID, clinicName, doctorName, doctorID, projectID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@@ -145,12 +150,13 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
-
- List get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
+ List get prescriptionReportEnhList =>
+ _prescriptionsService.prescriptionReportEnhList;
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
setState(ViewState.Busy);
- await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder);
+ await _prescriptionsService.getPrescriptionReportEnh(
+ prescriptionsOrder: prescriptionsOrder);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@@ -159,16 +165,14 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
-
- Future updatePressOrder({@required int presOrderID}) async {
+ Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
- await getPrescriptions();
+ await getPrescriptions();
}
}
-
}
diff --git a/lib/main.dart b/lib/main.dart
index 70ca9d71..bf090720 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,30 +1,29 @@
+import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
-import 'package:diplomaticquarterapp/uitl/HMG_Geofence.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
-import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:firebase_analytics/firebase_analytics.dart';
+import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
-import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
-
-import 'Constants.dart';
-import 'config/shared_pref_kay.dart';
import 'config/size_config.dart';
-import 'core/model/geofencing/requests/GeoZonesRequestModel.dart';
-import 'core/service/geofencing/GeofencingServices.dart';
import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
import 'pages/pharmacies/compare-list.dart';
+import 'package:firebase_core/firebase_core.dart';
+
void main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+ FirebaseApp defaultApp = await Firebase.initializeApp();
+
setupLocator();
runApp(MyApp());
}
@@ -35,6 +34,7 @@ class MyApp extends StatefulWidget {
}
class _MyApp extends State {
+
@override
void initState() {
// ProjectViewModel projectProvider;
@@ -52,6 +52,7 @@ class _MyApp extends State {
.showNow(title: "Payload", subtitle: payload, payload: payload);
});
+
// final themeNotifier = Provider.of(context);
precacheImage(AssetImage('assets/images/powerd-by.jpg'), context);
return LayoutBuilder(
@@ -82,6 +83,9 @@ class _MyApp extends State {
],
child: Consumer(
builder: (context, projectProvider, child) => MaterialApp(
+ navigatorObservers: [
+ GAnalytics.shared.navObserver()
+ ],
showSemanticsDebugger: false,
title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal,
diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart
index 4c7974a3..eacba6a5 100644
--- a/lib/models/Authentication/authenticated_user.dart
+++ b/lib/models/Authentication/authenticated_user.dart
@@ -61,71 +61,72 @@ class AuthenticatedUser {
dynamic tempAddress;
dynamic zipCode;
dynamic isFamily;
+ dynamic cRSVerificationStatus;
// dynamic patientPayType;
// dynamic patientType;
// dynamic status;
- AuthenticatedUser({
- this.setupID,
- this.patientType,
- this.patientID,
- this.firstName,
- this.middleName,
- this.lastName,
- this.firstNameN,
- this.middleNameN,
- this.lastNameN,
- this.relationshipID,
- this.gender,
- this.dateofBirth,
- this.dateofBirthN,
- this.nationalityID,
- this.phoneResi,
- this.phoneOffice,
- this.mobileNumber,
- this.faxNumber,
- this.emailAddress,
- this.bloodGroup,
- this.rHFactor,
- this.isEmailAlertRequired,
- this.isSMSAlertRequired,
- this.preferredLanguage,
- this.isPrivilegedMember,
- this.memberID,
- this.expiryDate,
- this.isHmgEmployee,
- this.employeeID,
- this.emergencyContactName,
- this.emergencyContactNo,
- this.patientPayType,
- this.dHCCPatientRefID,
- this.isPatientDummy,
- this.status,
- this.isStatusCleared,
- this.patientIdentificationType,
- this.patientIdentificationNo,
- this.projectID,
- this.infoSourceID,
- this.address,
- this.age,
- this.ageDesc,
- this.areaID,
- this.createdBy,
- this.genderDescription,
- this.iR,
- this.iSOCityID,
- this.iSOCountryID,
- this.listPrivilege,
- this.marital,
- this.outSA,
- this.pOBox,
- this.receiveHealthSummaryReport,
- this.sourceType,
- this.strDateofBirth,
- this.tempAddress,
- this.zipCode,
- this.isFamily
- });
+ AuthenticatedUser(
+ {this.setupID,
+ this.patientType,
+ this.patientID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.relationshipID,
+ this.gender,
+ this.dateofBirth,
+ this.dateofBirthN,
+ this.nationalityID,
+ this.phoneResi,
+ this.phoneOffice,
+ this.mobileNumber,
+ this.faxNumber,
+ this.emailAddress,
+ this.bloodGroup,
+ this.rHFactor,
+ this.isEmailAlertRequired,
+ this.isSMSAlertRequired,
+ this.preferredLanguage,
+ this.isPrivilegedMember,
+ this.memberID,
+ this.expiryDate,
+ this.isHmgEmployee,
+ this.employeeID,
+ this.emergencyContactName,
+ this.emergencyContactNo,
+ this.patientPayType,
+ this.dHCCPatientRefID,
+ this.isPatientDummy,
+ this.status,
+ this.isStatusCleared,
+ this.patientIdentificationType,
+ this.patientIdentificationNo,
+ this.projectID,
+ this.infoSourceID,
+ this.address,
+ this.age,
+ this.ageDesc,
+ this.areaID,
+ this.createdBy,
+ this.genderDescription,
+ this.iR,
+ this.iSOCityID,
+ this.iSOCountryID,
+ this.listPrivilege,
+ this.marital,
+ this.outSA,
+ this.pOBox,
+ this.receiveHealthSummaryReport,
+ this.sourceType,
+ this.strDateofBirth,
+ this.tempAddress,
+ this.zipCode,
+ this.isFamily,
+ this.cRSVerificationStatus});
AuthenticatedUser.fromJson(Map json) {
setupID = json['SetupID'];
@@ -193,6 +194,7 @@ class AuthenticatedUser {
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
+ cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map toJson() {
@@ -259,6 +261,7 @@ class AuthenticatedUser {
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['IsFamily'] = this.isFamily;
+ data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}
diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
index 21f277d9..355300c4 100644
--- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
+++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
@@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
+import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
@@ -281,12 +282,10 @@ class _AllHabibMedicalServiceState extends State {
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: ToDo(isShowAppBar: true),
- ),
- ),
+ onTap: (){
+ Navigator.pop(context);
+ LandingPage.shared.switchToDoFromHMGServices();
+ },
imageLocation:
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
index 4acc7eaf..b8be6539 100644
--- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
@@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
+import 'package:manage_calendar_events/manage_calendar_events.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart';
@@ -53,14 +54,14 @@ class _H2oSettingState extends State {
void initState() {
super.initState();
_userDetailModel = widget.userDetailModel;
- _heightValue = _userDetailModel.height;
- _weightValue = _userDetailModel.weight;
+ _heightValue = _userDetailModel?.height ?? 100;
+ _weightValue = _userDetailModel?.weight ?? 50;
_heightController.text = _heightValue.toStringAsFixed(0);
_weightController.text = _weightValue.toStringAsFixed(0);
_nameController.text = _userDetailModel.firstName;
- _isWeightKG = _userDetailModel.isWeightInKG;
- _isHeightCM = _userDetailModel.isHeightInCM;
- _isGenderMale = _userDetailModel.gender == "M" ? true : false;
+ _isWeightKG = _userDetailModel?.isWeightInKG ?? true;
+ _isHeightCM = _userDetailModel?.isHeightInCM ?? true;
+ _isGenderMale = (_userDetailModel?.gender ?? "M") == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1;
readPrefs();
@@ -70,6 +71,7 @@ class _H2oSettingState extends State {
void readPrefs() async {
prefs = await SharedPreferences.getInstance();
_isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
+ _selectedRemindedTime = prefs.getInt(H2O_REMINDER) ?? 0;
setState(() {});
}
@@ -450,14 +452,35 @@ class _H2oSettingState extends State {
_userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context);
- await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
- await widget.viewModel.updateUserDetail(_userDetailModel, (tag) {
+ await widget.viewModel.updateUserDetail(_userDetailModel, (tag) async {
if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
+ await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
+ int _tempRemindTime = prefs.getInt(H2O_REMINDER) ?? _selectedRemindedTime;
+ if (_tempRemindTime != _selectedRemindedTime) {
+ await prefs.setInt(H2O_REMINDER, _selectedRemindedTime);
+ _addReminderToCalender(_selectedRemindedTime);
+ }
}
GifLoaderDialogUtils.hideDialog(context);
});
Navigator.pop(context);
}
+
+ final CalendarPlugin _myPlugin = CalendarPlugin();
+ void _addReminderToCalender(int _selectedRemindedTime) async {
+ bool _calendarPermission = await _myPlugin.hasPermissions();
+ if (_calendarPermission) {
+ } else {
+ await _myPlugin.requestPermissions();
+ }
+ _myPlugin.hasPermissions().then((value) {
+ if (!value) {
+ _myPlugin.requestPermissions();
+ } else {
+ _myPlugin.getCalendars().then((value) => {print(value.length)});
+ }
+ });
+ }
}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
index a3d67613..c71a0c87 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
@@ -99,17 +99,8 @@ class _BariatricsPageState extends State {
handler: () async {
Navigator.push(
context,
- FadePage(page: DoctorList()),
+ FadePage(page: DoctorList(diseaseByClinic: _selectedDisease,)),
);
- // await model.searchDoctorsByTime(_selectedDisease);
- // if (model.state == ViewState.ErrorLocal) {
- // AppToast.showErrorToast(message: model.error);
- // } else {}
-
- // Navigator.push(
- // context,
- // MaterialPageRoute(builder: (context) => BariatricsPage()),
- // );
},
),
),
@@ -131,15 +122,6 @@ class _BariatricsPageState extends State {
context,
FadePage(page: DoctorList()),
);
- await model.searchDoctorsByTime(_selectedDisease);
- if (model.state == ViewState.ErrorLocal) {
- AppToast.showErrorToast(message: model.error);
- }
-
- // Navigator.push(
- // context,
- // MaterialPageRoute(builder: (context) => BariatricsPage()),
- // );
},
),
),
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
index 45ea16fd..ec7074c2 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
@@ -6,8 +6,10 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dart:math';
+import '../health_calc_desc.dart';
import 'result_page.dart';
const activeCardColor = Color(0xff70777A);
@@ -121,7 +123,25 @@ class _BMICalculatorState extends State {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
- appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
+ showHomeAppBarIcon: false,
+ appBarIcons: [
+ IconButton(
+ icon: Icon(Icons.info_outline),
+ color: Colors.white,
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => HealthDescPage(
+ "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
+ TranslationBase.of(context).bmiCalcDesc,
+ "assets/images/AlHabibMedicalService/health_calculator/bmi.png")),
+ );
+ },
+ )
+ ],
+ appBarTitle:
+ "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@@ -158,7 +178,8 @@ class _BMICalculatorState extends State {
Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(
+ vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@@ -179,7 +200,8 @@ class _BMICalculatorState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
@@ -261,15 +283,18 @@ class _BMICalculatorState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(0, 3), // changes position of shadow
+ offset:
+ Offset(0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
- child: Center(child: Texts(TranslationBase.of(context).cm)),
+ padding: const EdgeInsets.symmetric(
+ vertical: 0.0, horizontal: 18.0),
+ child: Center(
+ child: Texts(TranslationBase.of(context).cm)),
),
),
),
@@ -290,13 +315,16 @@ class _BMICalculatorState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(0, 3), // changes position of shadow
+ offset:
+ Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
- child: Center(child: Texts(TranslationBase.of(context).feet)),
+ padding:
+ const EdgeInsets.symmetric(horizontal: 16.0),
+ child: Center(
+ child: Texts(TranslationBase.of(context).feet)),
),
),
),
@@ -328,7 +356,8 @@ class _BMICalculatorState extends State {
Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(
+ vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
@@ -349,7 +378,8 @@ class _BMICalculatorState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
@@ -431,15 +461,18 @@ class _BMICalculatorState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(0, 3), // changes position of shadow
+ offset:
+ Offset(0, 3), // changes position of shadow
),
],
color: kgCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
- child: Center(child: Texts(TranslationBase.of(context).kg)),
+ padding: const EdgeInsets.symmetric(
+ vertical: 0.0, horizontal: 18.0),
+ child: Center(
+ child: Texts(TranslationBase.of(context).kg)),
),
),
),
@@ -460,13 +493,17 @@ class _BMICalculatorState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(0, 3), // changes position of shadow
+ offset:
+ Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
- child: Center(child: Texts(TranslationBase.of(context).pound)),
+ padding:
+ const EdgeInsets.symmetric(horizontal: 16.0),
+ child: Center(
+ child:
+ Texts(TranslationBase.of(context).pound)),
),
),
),
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart b/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart
index b7d50303..4a24ecc2 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@@ -8,13 +9,14 @@ import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
class DoctorList extends StatelessWidget {
- const DoctorList({Key key}) : super(key: key);
+ DiseasesByClinic diseaseByClinic;
+ DoctorList({Key key, this.diseaseByClinic}) : super(key: key);
@override
Widget build(BuildContext context) {
return BaseView(
allowAny: true,
- onModelReady: (model) => model.getDoctorList(),
+ onModelReady: (model) => model.getDoctorList(disease: diseaseByClinic),
builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart b/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart
new file mode 100644
index 00000000..19f8e986
--- /dev/null
+++ b/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart
@@ -0,0 +1,40 @@
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+
+class HealthDescPage extends StatelessWidget {
+ final String title;
+ final String desc;
+ final String icon;
+
+ HealthDescPage(this.title, this.desc, this.icon);
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ isShowDecPage: false,
+ appBarTitle: title,
+ body: Container(
+ margin: EdgeInsets.all(8.0),
+ child: Row(
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 8),
+ child: Image.asset(
+ icon,
+ fit: BoxFit.cover,
+ height: 80,
+ ),
+ ),
+ Expanded(
+ child: Text(
+ desc,
+ style: TextStyle(fontSize: 18.0),
+ ),
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/parking_page.dart b/lib/pages/AlHabibMedicalService/parking_page.dart
index 82c390ea..19f06a56 100644
--- a/lib/pages/AlHabibMedicalService/parking_page.dart
+++ b/lib/pages/AlHabibMedicalService/parking_page.dart
@@ -8,7 +8,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
-
+import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import '../../d_q_icons_icons.dart';
class ParkingPage extends StatelessWidget {
@@ -19,6 +19,13 @@ class ParkingPage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).parking,
+ description: TranslationBase.of(context).parkingDescription,
+ imagesInfo: [
+ ImagesInfo(
+ imageAr: 'assets/images/bc_parking.png',
+ imageEn: 'assets/images/bc_parking.png',
+ isAsset: true)
+ ],
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: !model.isSavePark
diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart
index 00fb2fc8..ff7224be 100644
--- a/lib/pages/BookAppointment/QRCode.dart
+++ b/lib/pages/BookAppointment/QRCode.dart
@@ -13,8 +13,10 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
+import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
+import 'package:nfc_in_flutter/nfc_in_flutter.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@@ -30,17 +32,27 @@ class QRCode extends StatefulWidget {
class _QRCodeState extends State {
Uint8List _bytes;
+ bool _supportsNFC = false;
+ BuildContext _context;
@override
void initState() {
// TODO: implement initState
+
_bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
+ NFC.isNDEFSupported.then((supported) {
+ setState(() {
+ print("nfc supprted");
+ _supportsNFC = true;
+ });
+ });
super.initState();
}
@override
Widget build(BuildContext context) {
+ _context = context;
return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode,
isShowAppBar: true,
@@ -51,9 +63,56 @@ class _QRCodeState extends State {
mainAxisSize: MainAxisSize.max,
children: [
Container(
- margin: EdgeInsets.only(top: 30.0),
- alignment: Alignment.center,
- child: Image.memory(_bytes, scale: 0.5),
+ width: double.infinity,
+ height: MediaQuery.of(context).size.width / 3,
+ child: Row(
+ children: [
+ _supportsNFC
+ ? Expanded(
+ flex: 1,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ InkWell(
+ child: Container(
+ margin: EdgeInsets.only(top: 30.0),
+ alignment: Alignment.center,
+ padding: EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ border: Border.all(color: Colors.black),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Image.asset(
+ "assets/images/nfc/ic_nfc.png"),
+ ),
+ onTap: () {
+ showNfcReader(context,
+ onNcfScan: (String nfcId) {
+ Future.delayed(
+ const Duration(milliseconds: 100),
+ () {
+ sendNfcCheckInRequest(nfcId);
+ });
+ });
+ },
+ ),
+ ],
+ ),
+ )
+ : Container(),
+ Expanded(
+ flex: 1,
+ child: Container(
+ margin: EdgeInsets.only(top: 30.0),
+ alignment: Alignment.center,
+ child: Image.memory(
+ _bytes,
+ ),
+ ),
+ ),
+ ],
+ ),
),
Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
@@ -70,18 +129,20 @@ class _QRCodeState extends State {
EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset(
"assets/images/new-design/device_icon.png",
- width: 120.0,
- height: 120.0),
+ width: MediaQuery.of(context).size.width / 3.4,
+ height: MediaQuery.of(context).size.width / 3.4),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.5,
- margin: EdgeInsets.only(
- top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
- child: Text(TranslationBase.of(context).scanQRHospital,
- style: TextStyle(
- color: Colors.red[700],
- fontSize: 20.0,
- fontWeight: FontWeight.bold)),
+ Expanded(
+ child: Container(
+ width: double.infinity,
+ margin: EdgeInsets.only(
+ top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
+ child: Text(TranslationBase.of(context).scanQRHospital,
+ style: TextStyle(
+ color: Colors.red[700],
+ fontSize: 18.0,
+ fontWeight: FontWeight.bold)),
+ ),
),
],
),
@@ -300,4 +361,51 @@ class _QRCodeState extends State {
}
return docSpeciality;
}
+
+ sendNfcCheckInRequest(String nfcId) {
+ GifLoaderDialogUtils.showMyDialog(context);
+
+ DoctorsListService service = new DoctorsListService();
+
+ service
+ .sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId,
+ widget.patientShareResponse.projectID, context)
+ .then((res) {
+ print(res);
+
+ GifLoaderDialogUtils.hideDialog(context);
+ _showMyDialog(res["SuccessMsg"], this.context);
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ print(err);
+ _showMyDialog(err, this.context);
+ });
+ }
+
+ Future _showMyDialog(String message, BuildContext context) async {
+ return showDialog(
+ context: context,
+ barrierDismissible: true, // user must tap button!
+ builder: (BuildContext context) {
+ return AlertDialog(
+ title: const Text('Alert'),
+ content: SingleChildScrollView(
+ child: ListBody(
+ children: [
+ Text(message),
+ ],
+ ),
+ ),
+ actions: [
+ TextButton(
+ child: const Text('OK'),
+ onPressed: () {
+ Navigator.of(context).pop();
+ },
+ ),
+ ],
+ );
+ },
+ );
+ }
}
diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart
index 3e82b5a2..1b920cdd 100644
--- a/lib/pages/ErService/ErOptions.dart
+++ b/lib/pages/ErService/ErOptions.dart
@@ -1,8 +1,12 @@
+import 'dart:convert';
+
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
@@ -23,6 +27,7 @@ class ErOptions extends StatefulWidget {
class _ErOptionsState extends State {
LocationUtils locationUtils;
+ ProjectViewModel projectViewModel;
@override
void initState() {
@@ -35,6 +40,9 @@ class _ErOptionsState extends State {
}
@override
Widget build(BuildContext context) {
+ projectViewModel = Provider.of(context);
+ final rrtLocked = !projectViewModel.havePrivilege(68);
+
return AppScaffold(
isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo,
@@ -46,6 +54,7 @@ class _ErOptionsState extends State {
children: [
Container(
+ height: 170,
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
child: Row(
mainAxisSize: MainAxisSize.max,
@@ -83,6 +92,7 @@ class _ErOptionsState extends State {
),
Container(
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
+ height: 170,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
@@ -95,14 +105,24 @@ class _ErOptionsState extends State {
onTap: (){
Navigator.push(
context,
- FadePage(
- page: DdServicesPage()));
+ FadePage(page: DdServicesPage())
+ );
},
),
),
Expanded(
- child: Container(),
+ child: CardCommonEr(
+ locked: rrtLocked,
+ image: 'assets/images/new-design/AM.PNG',
+ text: TranslationBase.of(context).rrtService,
+ subText: TranslationBase.of(context).RapidResponseTeam,
+ onTap:(){
+ Navigator.push(
+ context,
+ FadePage(
+ page: NearestEr()));
+ }),
)
],
),
diff --git a/lib/pages/ErService/widgets/card_common.dart b/lib/pages/ErService/widgets/card_common.dart
index 6b396dc9..cd0dfaa9 100644
--- a/lib/pages/ErService/widgets/card_common.dart
+++ b/lib/pages/ErService/widgets/card_common.dart
@@ -10,51 +10,72 @@ class CardCommonEr extends StatelessWidget {
final image;
final text;
final subText;
+ final bool locked;
final Function onTap;
const CardCommonEr(
- {@required this.image,
- @required this.text,
- @required this.subText,
- @required this.onTap});
+ {
+ this.locked = false,
+ @required this.image,
+ @required this.text,
+ @required this.subText,
+ @required this.onTap,
+ });
@override
Widget build(BuildContext context) {
return GestureDetector(
- onTap: () => onTap(),
- 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: [
+ onTap: locked ? null : onTap,
+ child: Opacity(
+ opacity: locked ? 0.25 : 1.0,
+ child: Stack(
+ 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)),
+ 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)),
+ ),
+ Spacer(),
+ 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),
+ ),
+ ],
),
- 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),
- ),
- ],
+ ),
+ if(locked)
+ Align(
+ alignment: Alignment.center,
+ child: lock()
+ )
+ ] ,
),
),
);
}
+ Widget lock(){
+ return Container(child: Icon(Icons.lock_rounded, size: 80),);
+ }
+
}
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index 79bcd94b..febbdf0f 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -92,9 +92,16 @@ class _ToDoState extends State {
padding: EdgeInsets.all(0.0),
itemCount: widget.appoList.length,
itemBuilder: (context, index) {
+ print("ttt "+getNextActionImage(widget
+ .appoList[index]
+ .nextAction));
+ print("ttt "+widget
+ .appoList[index]
+ .nextAction.toString());
return Container(
margin: EdgeInsets.all(10.0),
child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Card(
@@ -366,44 +373,32 @@ class _ToDoState extends State {
color: Color(0xff20bc44),
),
height: 30.0,
- margin: projectViewModel.isArabic
- ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0)
- : EdgeInsets.fromLTRB(20.0, 0.0, 160.0, 0.0),
+ padding: EdgeInsets.only(right:15),
+ margin: EdgeInsets.symmetric(horizontal:20),
transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row(
+ mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
widget.appoList[index].isLiveCareAppointment
- ? Container(
- margin: EdgeInsets.fromLTRB(
- 5.0, 0.0, 5.0, 0.0),
- child: Image.asset(
- "assets/images/new-design/video.png"),
- )
- : Container(
- margin: EdgeInsets.fromLTRB(
- 5.0, 0.0, 5.0, 0.0),
- child: Image.asset(
- "assets/images/new-design/walkin.png"),
- ),
+ ? Image.asset(
+ "assets/images/new-design/video.png")
+ : Image.asset(
+ "assets/images/new-design/walkin.png"),
widget.appoList[index].isLiveCareAppointment
- ? Container(
- child: Text(
- TranslationBase.of(context).videoAppo,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.bold,
- fontSize: 11.0)),
- )
- : Container(
- child: Text(
- TranslationBase.of(context)
- .walkinAppo,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.bold,
- fontSize: 11.0)),
- )
+ ? Text(
+ TranslationBase.of(context).videoAppo,
+ style: TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 11.0))
+ : Text(
+ TranslationBase.of(context)
+ .walkinAppo,
+ style: TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 11.0))
],
),
),
@@ -459,6 +454,10 @@ class _ToDoState extends State {
return "assets/images/new-design/waiting_for_doctor.png";
break;
+ case 90:
+ return "assets/images/new-design/check-in.png";
+ break;
+
default:
return "";
}
@@ -480,6 +479,9 @@ class _ToDoState extends State {
break;
case 60:
break;
+ case 90:
+ getAppoQR(context, appo);
+ break;
}
}
@@ -516,6 +518,10 @@ class _ToDoState extends State {
return TranslationBase.of(context).waitingForDoctor;
break;
+ case 90:
+ return TranslationBase.of(context).checkinOptions;
+ break;
+
default:
return "";
}
diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart
index ed5f5bee..a8e553be 100644
--- a/lib/pages/feedback/send_feedback_page.dart
+++ b/lib/pages/feedback/send_feedback_page.dart
@@ -19,6 +19,7 @@ import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart'
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
+import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'dart:convert';
import 'dart:io';
@@ -167,7 +168,7 @@ class _SendFeedbackPageState extends State {
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
- CrossAxisAlignment.start,
+ CrossAxisAlignment.start,
children: [
Texts(
appointHistory.doctorNameObj,
@@ -176,8 +177,8 @@ class _SendFeedbackPageState extends State {
Texts(
DateUtil
.getMonthDayYearDateFormatted(
- appointHistory
- .appointmentDate),
+ appointHistory
+ .appointmentDate),
variant: 'caption3',
),
StarRating(
@@ -235,7 +236,7 @@ class _SendFeedbackPageState extends State {
flex: 4,
child: Column(
crossAxisAlignment:
- CrossAxisAlignment.start,
+ CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(10.0),
@@ -246,11 +247,11 @@ class _SendFeedbackPageState extends State {
child: LargeAvatar(
name: model
.appointHistoryList[
- index]
+ index]
.doctorNameObj,
url: model
.appointHistoryList[
- index]
+ index]
.doctorImageURL,
),
),
@@ -260,27 +261,27 @@ class _SendFeedbackPageState extends State {
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
- CrossAxisAlignment
- .start,
+ CrossAxisAlignment
+ .start,
children: [
Texts(
model
.appointHistoryList[
- index]
+ index]
.doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(model
.appointHistoryList[
- index]
+ index]
.appointmentDate),
variant: 'caption3',
),
StarRating(
totalAverage: model
.appointHistoryList[
- index]
+ index]
.doctorRate
.toDouble(),
forceStars: true),
@@ -326,9 +327,9 @@ class _SendFeedbackPageState extends State {
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
- onChanged: (v){setState(() {
-
- });},
+ onChanged: (v) {
+ setState(() {});
+ },
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptySubject;
@@ -349,11 +350,13 @@ class _SendFeedbackPageState extends State {
controller: messageController,
suffixIcon: Icons.mic,
onSuffixTap: () {
+ requestPermissions();
+
openSpeechReco();
},
- onChanged: (v){setState(() {
-
- });},
+ onChanged: (v) {
+ setState(() {});
+ },
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptyMessage;
@@ -364,11 +367,11 @@ class _SendFeedbackPageState extends State {
InkWell(
onTap: () {
ImageOptions.showImageOptions(context,
- (String image, File file) {
- setState(() {
- images.add(image);
- });
- });
+ (String image, File file) {
+ setState(() {
+ images.add(image);
+ });
+ });
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
@@ -397,39 +400,39 @@ class _SendFeedbackPageState extends State {
),
...List.generate(
images.length,
- (index) => Container(
- margin: EdgeInsets.all(10),
- padding: EdgeInsets.all(8.0),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
+ (index) => Container(
+ margin: EdgeInsets.all(10),
+ padding: EdgeInsets.all(8.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Icon(FontAwesomeIcons.paperclip),
- SizedBox(
- width: 8,
- ),
- Texts(
- 'image ${index + 1}.png',
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Icon(FontAwesomeIcons.paperclip),
+ SizedBox(
+ width: 8,
+ ),
+ Texts(
+ 'image ${index + 1}.png',
+ ),
+ ],
),
+ InkWell(
+ onTap: () {
+ setState(() {
+ images.remove(images[index]);
+ });
+ },
+ child: Icon(
+ FontAwesomeIcons.trashAlt,
+ color: Colors.red[300],
+ ))
],
),
- InkWell(
- onTap: () {
- setState(() {
- images.remove(images[index]);
- });
- },
- child: Icon(
- FontAwesomeIcons.trashAlt,
- color: Colors.red[300],
- ))
- ],
- ),
- )),
+ )),
SizedBox(
- height: 45,
+ height: 100,
),
],
),
@@ -437,7 +440,7 @@ class _SendFeedbackPageState extends State {
),
),
bottomSheet: Container(
- height: 80.0,
+ height: 80,
width: double.infinity,
padding: EdgeInsets.all(15.0),
child: Center(
@@ -447,22 +450,21 @@ class _SendFeedbackPageState extends State {
label: TranslationBase.of(context).send,
textColor: Colors.white,
disabled: (titleController.text.toString().isEmpty ||
- messageController.text.toString().isEmpty ),
+ messageController.text.toString().isEmpty),
onTap: () {
final form = formKey.currentState;
if (form.validate()) {
-
GifLoaderDialogUtils.showMyDialog(context);
model
.sendCOCItem(
- title: titleController.text,
- attachment: images.length > 0 ? images[0] : "",
- details: messageController.text,
- cOCTypeName: getCOCName(),
- appointHistory: messageType ==
- MessageType.ComplaintOnAnAppointment
- ? appointHistory
- : null)
+ title: titleController.text,
+ attachment: images.length > 0 ? images[0] : "",
+ details: messageController.text,
+ cOCTypeName: getCOCName(),
+ appointHistory: messageType ==
+ MessageType.ComplaintOnAnAppointment
+ ? appointHistory
+ : null)
.then((value) {
if (value) {
setState(() {
@@ -479,7 +481,6 @@ class _SendFeedbackPageState extends State {
GifLoaderDialogUtils.hideDialog(context);
}
});
-
}
},
),
@@ -544,7 +545,7 @@ class _SendFeedbackPageState extends State {
if (available) {
speech.listen(
onResult: resultListener,
- // listenMode: ListenMode.confirmation,
+ listenMode: stt.ListenMode.confirmation,
localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
);
} else {
@@ -552,12 +553,23 @@ class _SendFeedbackPageState extends State {
}
}
- void errorListener(SpeechRecognitionError error) {}
+ void errorListener(SpeechRecognitionError error) {
+ event.setValue({"searchText": 'null'});
+ //SpeechToText.closeAlertDialog(context);
+ print(error);
+ }
void statusListener(String status) {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
}
+ void requestPermissions() async {
+ Map statuses = await [
+ Permission.microphone,
+ ].request();
+ print(statuses);
+ }
+
void resultListener(result) {
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});
@@ -565,10 +577,18 @@ class _SendFeedbackPageState extends State {
if (result.finalResult == true) {
setState(() {
RoboSearch.closeAlertDialog(context);
- messageController.text = reconizedWord;
+ speech.stop();
+ messageController.text = reconizedWord + '\n';
});
}
}
+
+ Future initSpeechState() async {
+ bool hasSpeech = await speech.initialize(
+ onError: errorListener, onStatus: statusListener);
+ print(hasSpeech);
+ if (!mounted) return;
+ }
}
class FeedbackTypeDialog extends StatefulWidget {
@@ -588,7 +608,6 @@ class FeedbackTypeDialogState extends State {
setMessageDialogType(MessageType messageType) {
setState(() {
-
messageTypeDialog = messageType;
});
}
@@ -603,7 +622,7 @@ class FeedbackTypeDialogState extends State {
return BaseView(
builder: (_, model, widge) => SimpleDialog(
title: Text(
- TranslationBase.of(context).feedbackType,
+ TranslationBase.of(context).messageType,
textAlign: TextAlign.center,
),
children: [
@@ -623,7 +642,7 @@ class FeedbackTypeDialogState extends State {
onTap: () => setMessageDialogType(MessageType.NON),
child: ListTile(
title:
- Texts(TranslationBase.of(context).notClassified),
+ Texts(TranslationBase.of(context).notClassified),
leading: Radio(
value: MessageType.NON,
groupValue: messageTypeDialog,
@@ -648,7 +667,7 @@ class FeedbackTypeDialogState extends State {
MessageType.ComplaintOnAnAppointment),
child: ListTile(
title:
- Texts(TranslationBase.of(context).complainAppo),
+ Texts(TranslationBase.of(context).complainAppo),
leading: Radio(
value: MessageType.ComplaintOnAnAppointment,
groupValue: messageTypeDialog,
@@ -805,9 +824,9 @@ class FeedbackTypeDialogState extends State {
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
- TranslationBase.of(context).ok,
- fontWeight: FontWeight.w400,
- )),
+ TranslationBase.of(context).ok,
+ fontWeight: FontWeight.w400,
+ )),
),
)),
],
diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart
index e37f3138..5b297e89 100644
--- a/lib/pages/feedback/status_feedback_page.dart
+++ b/lib/pages/feedback/status_feedback_page.dart
@@ -93,16 +93,24 @@ class _StatusFeedbackPageState extends State {
child: Center(
child: Column(
children: [
- SizedBox(height: MediaQuery.of(context).size.height*0.4,),
- Image.asset('assets/images/comments.png',width: 80,height: 80,),
- SizedBox(height: 15,),
+ SizedBox(
+ height: MediaQuery.of(context).size.height * 0.4,
+ ),
+ Image.asset(
+ 'assets/images/comments.png',
+ width: 80,
+ height: 80,
+ ),
+ SizedBox(
+ height: 15,
+ ),
Texts(TranslationBase.of(context).noSearchResult),
],
),
),
),
bottomSheet: Container(
- height: MediaQuery.of(context).size.height * 0.12,
+ height: 80,
width: double.infinity,
padding: EdgeInsets.all(15.0),
child: Center(
@@ -112,8 +120,7 @@ class _StatusFeedbackPageState extends State {
label: TranslationBase.of(context).search,
textColor: Colors.white,
disabled: true,
- onTap: () {
- },
+ onTap: () {},
),
),
),
diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart
index d81e704e..7283abf8 100644
--- a/lib/pages/insurance/insurance_approval_screen.dart
+++ b/lib/pages/insurance/insurance_approval_screen.dart
@@ -24,23 +24,13 @@ class _InsuranceApprovalState extends State {
@override
Widget build(BuildContext context) {
- imagesInfo.add(ImagesInfo(
- imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png',
- imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
- imagesInfo.add(ImagesInfo(
- imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',
- imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
+ imagesInfo
+ .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
+ imagesInfo
+ .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
return BaseView(
- onModelReady: widget.appointmentNo != null
- ? (model) =>
- model.getInsuranceApproval(appointmentNo: widget.appointmentNo)
- : (model) => model.getInsuranceApproval(),
- builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
- AppScaffold(
+ onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(),
+ builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).approvals,
@@ -65,153 +55,121 @@ class _InsuranceApprovalState extends State {
children: [
Texts(
TranslationBase.of(context).totalApproval,
- color: Color(0xff60688B),
- fontSize: 19.0,
- fontWeight: FontWeight.w600,
+ color: Color(0xff60688B),
+ fontSize: 19.0,
+ fontWeight: FontWeight.w600,
),
if (model.insuranceApproval.length > 0)
Container(
width: 60,
height: 40,
- decoration: BoxDecoration(
- color: Theme.of(context).primaryColor,
- borderRadius: BorderRadius.circular(19.0)),
+ decoration: BoxDecoration(color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(19.0)),
child: Center(
child: Texts(
- model.insuranceApproval[0].unUsedCount
- .toString(),
- color: Colors.white, fontSize: 17.0,
+ model.insuranceApproval[0].unUsedCount.toString(),
+ color: Colors.white,
+ fontSize: 17.0,
),
))
],
)),
- ...List.generate(
- model.insuranceApproval.length,
- (index) => RoundedContainer(
- backgroundColor: Colors.white,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- ExpansionTile(
- title: Container(
- //height: 120.0,
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- model.insuranceApproval[index].patientDescription == "In Patient"
- ? Container(
- decoration: BoxDecoration(
- color: Theme.of(context).primaryColor,
- borderRadius:
- BorderRadius.circular(
- 16.0)),
- width: 115.0,
- padding:
- EdgeInsets.only(left: 11.5),
- child: Center(
- child: Texts(
- TranslationBase.of(context).inPatient,
- color: Colors.white,
- ),
- ),
- )
- : Container(
- decoration: BoxDecoration(
- color: Color(0xff505A5D),
- borderRadius:
- BorderRadius.circular(
- 16.0)),
- width: 115.0,
- padding:
- EdgeInsets.only(left: 11.5),
- child: Center(
- child: Texts(
- TranslationBase.of(context).outpatient,
- color: Colors.white,
- ),
- ),
- ),
- Padding(
- padding: EdgeInsets.symmetric(
- vertical: 10.0),
- child: Texts(
- model.insuranceApproval[index]
- .clinicName,
- fontSize: 20.0,
- color: Color(0xff60686B),
- fontWeight: FontWeight.w600,
- ),
+ ...List.generate(model.insuranceApproval.length, (index) {
+ print(model.insuranceApproval[index].isLiveCareAppointment);
+ return RoundedContainer(
+ backgroundColor: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ExpansionTile(
+ title: Container(
+ //height: 120.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ model.insuranceApproval[index].isLiveCareAppointment
+ ? sideBadge(TranslationBase.of(context).liveCare, 0xffA9A089)
+ : model.insuranceApproval[index].isInOutPatient
+ ? sideBadge(TranslationBase.of(context).outpatient, 0xff505a5d)
+ : sideBadge(TranslationBase.of(context).inPatient, 0xffb8372c),
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 10.0),
+ child: Texts(
+ model.insuranceApproval[index].clinicName,
+ fontSize: 20.0,
+ color: Color(0xff60686B),
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ Texts(
+ model.insuranceApproval[index].doctorName,
+ fontSize: 17.0,
+ ),
+ ],
+ ),
+ ),
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Texts(
+ TranslationBase.of(context).approvalNo,
+ fontSize: 18.0,
),
Texts(
- model.insuranceApproval[index]
- .doctorName,
- fontSize: 17.0,
+ model.insuranceApproval[index].approvalNo.toString(),
+ fontSize: 18.0,
+ fontWeight: FontWeight.w600,
),
],
),
- ),
- children: [
- Padding(
- padding: EdgeInsets.symmetric(
- vertical: 12.0, horizontal: 12.0),
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Texts(
- TranslationBase.of(context).approvalNo,
- fontSize: 18.0,
- ),
- Texts(model.insuranceApproval[index].approvalNo.toString(),
- fontSize: 18.0,
- fontWeight: FontWeight.w600,),
- ],
- ),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 1.0,
- ),
- Row(
- children: [
- Texts(
- TranslationBase.of(context).procedureStatus ,
- fontSize: 17.5,
- ),
- SizedBox(width: 12,),
- Texts(
- model.insuranceApproval[index].approvalStatusDescption,
- fontWeight: FontWeight.w600,
- fontSize: 17.5,
- ),
- ],
- ),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 1.0,
- ),
- Row(
- children: [
- Texts(
- TranslationBase.of(context).unusedCount,
- fontSize: 17.5,
- ),
- Texts(
- model.insuranceApproval[index].unUsedCount.toString(),
- fontSize: 17.5,
- fontWeight: FontWeight.w600,
- ),
- ],
- ),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 1.0,
- ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Row(
+ children: [
+ Texts(
+ TranslationBase.of(context).procedureStatus,
+ fontSize: 17.5,
+ ),
+ SizedBox(
+ width: 12,
+ ),
+ Texts(
+ model.insuranceApproval[index].approvalStatusDescption,
+ fontWeight: FontWeight.w600,
+ fontSize: 17.5,
+ ),
+ ],
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Row(
+ children: [
+ Texts(
+ TranslationBase.of(context).unusedCount,
+ fontSize: 17.5,
+ ),
+ Texts(
+ model.insuranceApproval[index].unUsedCount.toString(),
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ ],
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
// Text(
// 'Company Name: ' +
// model.insuranceApproval[index]
@@ -224,190 +182,131 @@ class _InsuranceApprovalState extends State {
// fontSize: 17.5,
// fontWeight: FontWeight.w600),
// ),
- Texts(
- TranslationBase.of(context).companyName,
- fontWeight: FontWeight.w600,
- fontSize: 17.5,
- ),
-
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 1.0,
- ),
- Row(
- children: [
- Texts(
- TranslationBase.of(context).receiptOn ,
- fontSize: 17.5,
- fontWeight: FontWeight.w600,
-
- ),
- Texts(
- convertDateFormat(model.insuranceApproval[index].rceiptOn),
- fontSize: 17.5,
- fontWeight: FontWeight.w600,
+ Texts(
+ TranslationBase.of(context).companyName,
+ fontWeight: FontWeight.w600,
+ fontSize: 17.5,
+ ),
- ),
- ],
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Row(
+ children: [
+ Texts(
+ TranslationBase.of(context).receiptOn,
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ Texts(
+ convertDateFormat(model.insuranceApproval[index].receiptOn),
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ ],
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Row(
+ children: [
+ Texts(
+ TranslationBase.of(context).expiryDate,
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ Texts(
+ convertDateFormat(model.insuranceApproval[index].expiryDate),
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ ],
+ ),
+ Divider(
+ color: Colors.black,
+ height: 55.0,
+ thickness: 1.2,
+ ),
+ IntrinsicHeight(
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ flex: 1,
+ child: Column(
+ children: [
+ Text(TranslationBase.of(context).procedureName),
+ Padding(
+ padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
+ child: Text(
+ model.insuranceApproval[index].apporvalDetails?.procedureName ?? '',
+ style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15.5),
+ ),
+ ),
+ ],
+ ),
),
- Divider(
+ VerticalDivider(
+ width: 10.0,
+ thickness: 1.2,
color: Colors.black,
- height: 25.0,
- thickness: 1.0,
),
- Row(
- children: [
- Texts(
- TranslationBase.of(context).expiryDate,
- fontSize: 17.5,
- fontWeight: FontWeight.w600,
-
- ),
- Texts(
- convertDateFormat(model.insuranceApproval[index].expiryDate),
- fontSize: 17.5,
- fontWeight: FontWeight.w600,
-
- ),
- ],
+ Expanded(
+ flex: 1,
+ child: Column(
+ children: [
+ Text(TranslationBase.of(context).procedureStatus),
+ Padding(
+ padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
+ child: Text(
+ model.insuranceApproval[index].apporvalDetails?.status ?? '',
+ style: TextStyle(fontSize: 17.5, fontWeight: FontWeight.w600),
+ ),
+ ),
+ ],
+ ),
),
- Divider(
- color: Colors.black,
- height: 55.0,
+ VerticalDivider(
+ width: 2.3,
thickness: 1.2,
+ color: Colors.black,
),
- IntrinsicHeight(
- child: Row(
- crossAxisAlignment:
- CrossAxisAlignment.center,
+ Expanded(
+ flex: 1,
+ child: Column(
children: [
- Expanded(
- flex: 1,
- child: Column(
- children: [
- Text(TranslationBase.of(
- context)
- .procedureName),
- Padding(
- padding: EdgeInsets.only(
- top: SizeConfig
- .heightMultiplier *
- 3.0),
- child: Text(
- model
- .insuranceApproval[
- index]
- .approvalDetails ==
- null
- ? ''
- : model
- .insuranceApproval[
- index]
- .approvalDetails
- .procedureName,
- style: TextStyle(
- fontWeight:
- FontWeight.w600,
- fontSize: 15.5),
- ),
- ),
- ],
- ),
- ),
- VerticalDivider(
- width: 10.0,
- thickness: 1.2,
- color: Colors.black,
- ),
- Expanded(
- flex: 1,
- child: Column(
- children: [
- Text(TranslationBase.of(
- context)
- .procedureStatus),
- Padding(
- padding: EdgeInsets.only(
- top: SizeConfig
- .heightMultiplier *
- 3.0),
- child: Text(
- model
- .insuranceApproval[
- index]
- .approvalDetails ==
- null
- ? ''
- : model
- .insuranceApproval[
- index]
- .approvalDetails
- .status,
- style: TextStyle(
- fontSize: 17.5,
- fontWeight:
- FontWeight
- .w600),
- ),
- ),
- ],
- ),
- ),
- VerticalDivider(
- width: 2.3,
- thickness: 1.2,
- color: Colors.black,
- ),
- Expanded(
- flex: 1,
- child: Column(
- children: [
- Text(TranslationBase.of(
- context)
- .usageStatus),
- Padding(
- padding: EdgeInsets.only(
- top: SizeConfig
- .heightMultiplier *
- 3.0),
- child: Text(
- model
- .insuranceApproval[
- index]
- .approvalDetails ==
- null
- ? ''
- : model
- .insuranceApproval[
- index]
- .approvalDetails
- .isInvoicedDesc,
- style: TextStyle(
- fontWeight:
- FontWeight.w600,
- fontSize: 17.5),
- ),
- ),
- ],
+ Text(TranslationBase.of(context).usageStatus),
+ Padding(
+ padding: EdgeInsets.only(top: SizeConfig.heightMultiplier * 3.0),
+ child: Text(
+ model.insuranceApproval[index].apporvalDetails?.isInvoicedDesc ?? '',
+ style: TextStyle(fontWeight: FontWeight.w600, fontSize: 17.5),
),
),
],
),
),
- Divider(
- color: Colors.black,
- height: 25.0,
- thickness: 1.0,
- ),
],
),
),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
],
),
- ],
- ),
- )),
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }),
],
),
),
@@ -416,6 +315,22 @@ class _InsuranceApprovalState extends State {
);
}
+ Widget sideBadge(String title, int color) {
+ return Container(
+ decoration: BoxDecoration(
+ color: Color(color),
+ borderRadius: BorderRadius.circular(16.0),
+ ),
+ width: 115.0,
+ padding: EdgeInsets.only(top: 1, bottom: 1),
+ alignment: Alignment.center,
+ child: Texts(
+ title,
+ color: Colors.white,
+ ),
+ );
+ }
+
convertDateFormat(String Date) {
const start = "/Date(";
const end = "+0300)";
@@ -423,13 +338,8 @@ class _InsuranceApprovalState extends State {
final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length);
- var date = new DateTime.fromMillisecondsSinceEpoch(
- int.parse(Date.substring(startIndex + start.length, endIndex)));
- String newDate = date.year.toString() +
- "-" +
- date.month.toString().padLeft(2, '0') +
- "-" +
- date.day.toString().padLeft(2, '0');
+ var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
+ String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
return newDate.toString();
}
diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart
index 1804e274..3e51b668 100644
--- a/lib/pages/landing/home_page.dart
+++ b/lib/pages/landing/home_page.dart
@@ -1,10 +1,11 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
-import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -38,14 +40,16 @@ class HomePage extends StatefulWidget {
}
class _HomePageState extends State {
- PharmacyModuleViewModel pharmacyModuleViewModel =
- locator();
+ PharmacyModuleViewModel pharmacyModuleViewModel = locator();
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
- onModelReady: (model) => model.getPatientRadOrders(),
+ onModelReady: (model) => () async {
+ model.getPatientRadOrders();
+ var user = await sharedPref.getObject(USER_PROFILE);
+ },
builder: (_, model, wi) => AppScaffold(
isShowDecPage: false,
isHelp: true,
@@ -64,9 +68,7 @@ class _HomePageState extends State {
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
- image: ExactAssetImage(
- 'assets/images/dashboard_top_bg.png'),
- fit: BoxFit.cover),
+ image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
),
child: Stack(
children: [
@@ -75,129 +77,103 @@ class _HomePageState extends State {
left: 5,
right: 5,
child: Container(
- width:
- MediaQuery.of(context).size.width * 0.8,
+ width: MediaQuery.of(context).size.width * 0.8,
child: Row(
children: [
Expanded(
- child: Container(
- height: 125,
- padding: EdgeInsets.all(5),
- margin: EdgeInsets.all(5),
- decoration: BoxDecoration(
- image: DecorationImage(
- image: AssetImage(
- "assets/images/new-design/covid_bg_transparent.png"),
- fit: BoxFit.fill,
- ),
- color:
- Colors.white.withOpacity(0.3),
- borderRadius: BorderRadius.all(
- Radius.circular(5))),
+ child: Visibility(
+ visible: model.user.outSA == 1 ? false : true,
child: Container(
- child: Column(
- children: [
- Texts(
- TranslationBase.of(context)
- .covidTest,
- fontSize: 15.0,
- color: Colors.white,
- fontWeight: FontWeight.w700,
+ height: 125,
+ padding: EdgeInsets.all(5),
+ margin: EdgeInsets.all(5),
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image:
+ AssetImage("assets/images/new-design/covid_bg_transparent.png"),
+ fit: BoxFit.fill,
),
- Row(
- mainAxisAlignment:
- MainAxisAlignment
- .spaceAround,
- children: [
- Container(
- margin: EdgeInsets.only(
- top: 15.0,
+ color: Colors.white.withOpacity(0.3),
+ borderRadius: BorderRadius.all(Radius.circular(5))),
+ child: Container(
+ child: Column(
+ children: [
+ Texts(
+ TranslationBase.of(context).covidTest,
+ color: Colors.white,
+ fontWeight: FontWeight.w700,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Container(
+ margin: EdgeInsets.only(
+ top: 15.0,
+ ),
+ child: SvgPicture.asset(
+ 'assets/images/new-design/covid-19-car.svg',
+ width: 45.0,
+ height: 45.0),
),
- child: SvgPicture.asset(
- 'assets/images/new-design/covid-19-car.svg',
- width: 35.0,
- height: 35.0),
- ),
- Container(
- margin: EdgeInsets.only(
- top: 5.0),
- child: Column(
- children: [
- Texts(
- TranslationBase.of(
- context)
- .driveThru,
- fontWeight:
- FontWeight.w700,
- fontSize: 15.0,
- color: Colors.white,
- ),
- ButtonTheme(
- shape:
- RoundedRectangleBorder(
- borderRadius:
- BorderRadius
- .circular(
- 5.0),
+ Container(
+ margin: EdgeInsets.only(top: 5.0),
+ child: Column(
+ children: [
+ Texts(
+ TranslationBase.of(context).driveThru,
+ fontWeight: FontWeight.w700,
+ color: Colors.white,
),
- minWidth: MediaQuery.of(
- context)
- .size
- .width *
- 0.1,
- height: 25.0,
- child: RaisedButton(
- color: Colors
- .red[800],
- textColor:
- Colors.white,
- disabledTextColor:
- Colors.white,
- disabledColor:
- new Color(
- 0xFFbcc2c4),
- onPressed: () {
- navigateToCovidDriveThru();
- },
-
+ ButtonTheme(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(5.0),
+ ),
+ minWidth: MediaQuery.of(context).size.width * 0.15,
+ height: 25.0,
+ child: RaisedButton(
+ color: Colors.red[800],
+ textColor: Colors.white,
+ disabledTextColor: Colors.white,
+ disabledColor: new Color(0xFFbcc2c4),
+ onPressed: () {
+ navigateToCovidDriveThru();
+ },
+ child: Center(
+ child: Center(
child: Center(
- child: Texts(
- TranslationBase.of(
- context)
- .bookNow,
- fontWeight:
- FontWeight
- .w700,
- color: Colors
- .white,
+ child: Center(
+ child: Texts(
+ TranslationBase.of(context).bookNow,
+ fontWeight: FontWeight.w700,
+ color: Colors.white,
+ ),
),
-
+ ),
+ ),
+ ),
),
),
- ),
- ],
+ ],
+ ),
),
- ),
- ],
- ),
- ],
+ ],
+ ),
+ ],
+ ),
),
),
),
),
Expanded(
child: InkWell(
- onTap: () => Navigator.push(context,
- FadePage(page: LiveCareHome())),
+ onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
child: Container(
height: 125,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
- color: Colors.white
- .withOpacity(0.3),
- borderRadius: BorderRadius.all(
- Radius.circular(5))),
+ color: Colors.white.withOpacity(0.3),
+ borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset(
projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
@@ -213,23 +189,15 @@ class _HomePageState extends State {
],
),
),
- Container(
- width: double.infinity,
- height: projectViewModel.isArabic ? 110 : 80)
+ Container(width: double.infinity, height: projectViewModel.isArabic ? 110 : 80)
],
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
- (MediaQuery.of(context).orientation ==
- Orientation.landscape
- ? 0.02
- : 0.03),
+ (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
- (MediaQuery.of(context).orientation ==
- Orientation.landscape
- ? 0.02
- : 0.03),
+ (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin)
? Container(
width: double.infinity,
@@ -237,14 +205,10 @@ class _HomePageState extends State {
decoration: BoxDecoration(
color: HexColor('#A59E9E'),
shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.transparent, width: 0.5),
- borderRadius:
- BorderRadius.all(Radius.circular(9)),
+ border: Border.all(color: Colors.transparent, width: 0.5),
+ borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
- image: ExactAssetImage(
- 'assets/images/bg_graphic.png'),
- fit: BoxFit.cover)),
+ image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
@@ -260,37 +224,30 @@ class _HomePageState extends State {
fontSize: 23,
),
Texts(
- TranslationBase.of(context)
- .myMedicalFileSubTitle,
+ TranslationBase.of(context).myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
- alignment: projectViewModel.isArabic
- ? Alignment.bottomLeft
- : Alignment.bottomRight,
+ alignment:
+ projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
- margin: EdgeInsets.only(
- left: 15, right: 15),
+ margin: EdgeInsets.only(left: 15, right: 15),
width: 90,
height: 30,
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.transparent,
- width: 0.5),
- borderRadius: BorderRadius.all(
- Radius.circular(0)),
+ border: Border.all(color: Colors.transparent, width: 0.5),
+ borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: Center(
child: Texts(
- TranslationBase.of(context)
- .viewMore,
+ TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 12,
@@ -309,14 +266,10 @@ class _HomePageState extends State {
decoration: BoxDecoration(
color: HexColor('#A59E9E'),
shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.transparent, width: 0.5),
- borderRadius:
- BorderRadius.all(Radius.circular(9)),
+ border: Border.all(color: Colors.transparent, width: 0.5),
+ borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
- image: ExactAssetImage(
- 'assets/images/bg_graphic.png'),
- fit: BoxFit.cover),
+ image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
@@ -324,38 +277,56 @@ class _HomePageState extends State {
children: [
Row(
children: [
- if (projectViewModel.user != null &&
- model.isLogin)
+ if (projectViewModel.user != null && model.isLogin)
Expanded(
child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 8,
),
- Row(
- children: [
- Texts(
- model.user.firstName +
- " " +
- model.user.lastName,
- color: Colors.grey[100],
- bold: true,
- fontSize: 15,
- ),
- Container(
- margin:
- EdgeInsets.fromLTRB(
- 8.0,
- 0.0,
- 8.0,
- 0.0),
- child: SvgPicture.asset(
- "assets/images/new-design/verification_check.svg"),
- ),
- ],
- ),
+ model.user.cRSVerificationStatus == 2
+ ? Row(
+ children: [
+ Texts(
+ model.user.firstName + " " + model.user.lastName,
+ color: Colors.grey[100],
+ bold: true,
+ fontSize: 15,
+ ),
+ Container(
+ margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
+ child: SvgPicture.asset(
+ "assets/images/new-design/verification_check.svg"),
+ ),
+ ],
+ )
+ : model.user.cRSVerificationStatus == 3
+ ? Row(
+ children: [
+ Texts(
+ model.user.firstName + " " + model.user.lastName,
+ color: Colors.grey[100],
+ bold: true,
+ fontSize: 15,
+ ),
+ Container(
+ margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
+ child: SvgPicture.asset(
+ "assets/images/new-design/pending.svg"),
+ ),
+ ],
+ )
+ : Row(
+ children: [
+ Texts(
+ model.user.firstName + " " + model.user.lastName,
+ color: Colors.grey[100],
+ bold: true,
+ fontSize: 15,
+ ),
+ ],
+ ),
Texts(
'${model.user.patientID}',
color: Colors.white,
@@ -384,17 +355,14 @@ class _HomePageState extends State {
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.transparent,
- width: 0.5),
+ border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Center(
child: Texts(
- TranslationBase.of(context)
- .myMedicalFile,
+ TranslationBase.of(context).myMedicalFile,
color: Colors.white,
fontSize: 12,
textAlign: TextAlign.center,
@@ -434,8 +402,7 @@ class _HomePageState extends State {
height: 40,
),
Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
- color: Colors.white,
- fontSize: 17)
+ color: Colors.white, fontSize: 17)
],
),
),
@@ -450,11 +417,7 @@ class _HomePageState extends State {
width: 35,
height: 40,
),
- Texts(
- '${model.booldType}',
- color: Colors.white,
- fontSize: 17
- )
+ Texts('${model.booldType}', color: Colors.white, fontSize: 17)
],
),
),
@@ -468,12 +431,10 @@ class _HomePageState extends State {
],
),
Padding(
- padding:
- const EdgeInsets.only(bottom: 15, right: 15, left: 15),
+ padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15),
child: InkWell(
onTap: () {
- Navigator.of(context).push(MaterialPageRoute(
- builder: (context) => PackagesHomePage()));
+ Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage()));
},
child: Container(
decoration: BoxDecoration(
@@ -501,131 +462,126 @@ class _HomePageState extends State {
if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
- Container(
- margin: EdgeInsets.only(left: 15, right: 15),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- if (projectViewModel.havePrivilege(64))
- DashboardItem(
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: HomeHealthCarePage(),
- ),
- );
- },
- child: Center(
- child: Padding(
- padding: const EdgeInsets.all(15.0),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/home_health_care_icon.png',
- width: 50,
- height: 50,
- ),
- SizedBox(
- height: 10,
- ),
- Texts(
- TranslationBase.of(context)
- .homeHealthCare,
- textAlign: TextAlign.center,
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize:
- SizeConfig.textMultiplier * 1.55,
- )
- ],
+ if (model.user.outSA == 0)
+ Container(
+ margin: EdgeInsets.only(left: 15, right: 15),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ if (projectViewModel.havePrivilege(64))
+ DashboardItem(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: HomeHealthCarePage(),
+ ),
+ );
+ },
+ child: Center(
+ child: Padding(
+ padding: const EdgeInsets.all(15.0),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/home_health_care_icon.png',
+ width: 50,
+ height: 50,
+ ),
+ SizedBox(
+ height: 10,
+ ),
+ Texts(
+ TranslationBase.of(context).homeHealthCare,
+ textAlign: TextAlign.center,
+ color: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: SizeConfig.textMultiplier * 1.55,
+ )
+ ],
+ ),
),
),
+ height: MediaQuery.of(context).size.width * 0.4,
+ imageName: 'home_healthcare_service_bg.png',
+ opacity: 0.5,
),
- height: MediaQuery.of(context).size.width * 0.4,
- imageName: 'home_healthcare_service_bg.png',
- opacity: 0.5,
- ),
- if (projectViewModel.havePrivilege(65))
- DashboardItem(
- onTap: () => getPharmacyToken(model),
- child: Center(
- child: Padding(
- padding: const EdgeInsets.all(15.0),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/pharmacy_logo.png',
- width: 40,
- height: 40,
- ),
- SizedBox(
- height: 20,
- ),
- Texts(
- TranslationBase.of(context)
- .onlinePharmacy,
- textAlign: TextAlign.center,
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize:
- SizeConfig.textMultiplier * 1.55,
- )
- ],
+ if (projectViewModel.havePrivilege(65))
+ DashboardItem(
+ onTap: () => getPharmacyToken(model),
+ child: Center(
+ child: Padding(
+ padding: const EdgeInsets.all(15.0),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/pharmacy_logo.png',
+ width: 40,
+ height: 40,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ Texts(
+ TranslationBase.of(context).onlinePharmacy,
+ textAlign: TextAlign.center,
+ color: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: SizeConfig.textMultiplier * 1.55,
+ )
+ ],
+ ),
),
),
+ height: MediaQuery.of(context).size.width * 0.4,
+ imageName: 'al-habib_onlne_pharmacy_bg.png',
),
- height: MediaQuery.of(context).size.width * 0.4,
- imageName: 'al-habib_onlne_pharmacy_bg.png',
- ),
- if (projectViewModel.havePrivilege(67))
- DashboardItem(
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: CMCPage(),
- ),
- );
- },
- child: Center(
- child: Padding(
- padding: const EdgeInsets.all(15.0),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/comprehensive_medical_checkup_logo.png',
- width: 50,
- height: 50,
- ),
- SizedBox(
- height: 10,
- ),
- Texts(
- TranslationBase.of(context).cmcHeading,
- textAlign: TextAlign.center,
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize:
- SizeConfig.textMultiplier * 1.55,
- )
- ],
+ if (projectViewModel.havePrivilege(67))
+ DashboardItem(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: CMCPage(),
+ ),
+ );
+ },
+ child: Center(
+ child: Padding(
+ padding: const EdgeInsets.all(15.0),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/comprehensive_medical_checkup_logo.png',
+ width: 50,
+ height: 50,
+ ),
+ SizedBox(
+ height: 10,
+ ),
+ Texts(
+ TranslationBase.of(context).cmcHeading,
+ textAlign: TextAlign.center,
+ color: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: SizeConfig.textMultiplier * 1.55,
+ )
+ ],
+ ),
),
),
+ height: MediaQuery.of(context).size.width * 0.4,
+ color: HexColor("#747C80"),
+ imageName: 'emergency_service_image.png',
),
- height: MediaQuery.of(context).size.width * 0.4,
- color: HexColor("#747C80"),
- imageName: 'emergency_service_image.png',
- ),
- ],
+ ],
+ ),
),
- ),
SizedBox(
height: 8,
),
InkWell(
- onTap: () =>
- Navigator.push(context, FadePage(page: PaymentService())),
+ onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
@@ -646,8 +602,7 @@ class _HomePageState extends State {
height: 5,
),
Texts(
- TranslationBase.of(context)
- .onlinePaymentService,
+ TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@@ -663,41 +618,37 @@ class _HomePageState extends State {
color: Colors.white,
),
),
- InkWell(
- onTap: () => Navigator.push(context, FadePage(page: EReferralPage())),
- child: Container(
- child: Center(
- child: Padding(
- padding: const EdgeInsets.all(15.0),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/ereferral_service_icon.png',
- width: 50,
- height: 55,
- ),
- SizedBox(
- height: 10,
- ),
- Texts(
- TranslationBase.of(context)
- .offersAndPackages,
- textAlign: TextAlign.center,
- color: Colors.black87,
- bold: false,
- fontSize: SizeConfig.textMultiplier * 1.7,
- )
- ],
- ),
+ Container(
+ child: Center(
+ child: Padding(
+ padding: const EdgeInsets.all(15.0),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/ereferral_service_icon.png',
+ width: 50,
+ height: 55,
+ ),
+ SizedBox(
+ height: 10,
+ ),
+ Texts(
+ TranslationBase.of(context).offersAndPackages,
+ textAlign: TextAlign.center,
+ color: Colors.black87,
+ bold: false,
+ fontSize: SizeConfig.textMultiplier * 1.7,
+ )
+ ],
),
),
- width: MediaQuery.of(context).size.width * 0.29,
- height: MediaQuery.of(context).size.width * 0.4,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(6.0),
- color: Colors.white,
- )),
- ),
+ ),
+ width: MediaQuery.of(context).size.width * 0.29,
+ height: MediaQuery.of(context).size.width * 0.4,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(6.0),
+ color: Colors.white,
+ )),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
@@ -722,13 +673,11 @@ class _HomePageState extends State {
height: 10,
),
Texts(
- TranslationBase.of(context)
- .emergencyServices,
+ TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
- fontSize:
- SizeConfig.textMultiplier * 1.7,
+ fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
@@ -766,8 +715,7 @@ class _HomePageState extends State {
fontWeight: FontWeight.normal,
),
Texts(
- TranslationBase.of(context)
- .viewAllHabibMedicalService,
+ TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
@@ -788,15 +736,13 @@ class _HomePageState extends State {
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
- onTap: () => Navigator.push(
- context, FadePage(page: AllHabibMedicalService())),
+ onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())),
),
DashboardItem(
onTap: () {
// Navigator.push(
// context, FadePage(page: FeedbackHomePage()));
- Navigator.push(
- context, FadePage(page: ContactUsPage()));
+ Navigator.push(context, FadePage(page: ContactUsPage()));
},
child: Container(
width: double.infinity,
@@ -805,7 +751,7 @@ class _HomePageState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
- TranslationBase.of(context).reachUs,
+ TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),
@@ -918,10 +864,8 @@ class DashboardItem extends StatelessWidget {
? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover,
- colorFilter: hasColorFilter
- ? new ColorFilter.mode(
- Colors.black.withOpacity(0.2), BlendMode.dstIn)
- : null,
+ colorFilter:
+ hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
)
: null,
),
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index c55b685b..9708db83 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -1,5 +1,6 @@
import 'dart:io';
+import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
@@ -31,9 +32,11 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
+import 'package:firebase_analytics/observer.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
@@ -43,12 +46,22 @@ import '../../routes.dart';
import 'home_page.dart';
class LandingPage extends StatefulWidget {
+ static LandingPage shared;
+ _LandingPageState state;
+ LandingPage() {
+ LandingPage.shared = this;
+ }
+
static bool isOpenCallPage = false;
static IncomingCallData incomingCallData = new IncomingCallData();
@override
- _LandingPageState createState() => _LandingPageState();
+ _LandingPageState createState() => state = _LandingPageState();
+
+ switchToDoFromHMGServices(){
+ state.changeCurrentTab(4);
+ }
}
class _LandingPageState extends State with WidgetsBindingObserver {
@@ -66,6 +79,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
+
var event = RobotProvider();
var familyFileProvider = family.FamilyFilesProvider();
@@ -83,18 +97,22 @@ class _LandingPageState extends State with WidgetsBindingObserver {
bool isPageNavigated = false;
LocationUtils locationUtils;
- _changeCurrentTab(int tab) {
+ changeCurrentTab(int tab) {
setState(() {
- currentTab = tab;
- if (tab != 0)
+ if(currentTab > 0 && tab == 2)
+ pageController.jumpToPage(0);
+ else if (tab != 0)
pageController.jumpToPage(tab);
else {
IS_VOICE_COMMAND_CLOSED = false;
pageController.jumpToPage(tab);
}
+ currentTab = tab;
});
}
+
+
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);
@@ -188,6 +206,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
// if (results[Permission.calendar].isGranted) ;
});
requestPermissions();
+
// });
//
// //_firebase Background message handler
@@ -366,7 +385,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
checkValue(projectProvider) {
if (projectProvider.searchValue != null) {
- _changeCurrentTab(2);
+ changeCurrentTab(2);
}
}
@@ -401,6 +420,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
authService
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
+ this.getNotificationCount(DEVICE_TOKEN);
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);
@@ -543,7 +563,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
children: [
HomePage(
goToMyProfile: () {
- _changeCurrentTab(1);
+ changeCurrentTab(1);
},
),
MedicalProfilePage(),
@@ -553,16 +573,16 @@ class _LandingPageState extends State with WidgetsBindingObserver {
], // Please do not remove the BookingOptions from this array
),
bottomNavigationBar: BottomNavBar(
- changeIndex: _changeCurrentTab,
+ changeIndex: changeCurrentTab,
index: currentTab,
),
- floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked ,
floatingActionButton:
(projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton(
elevation: true,
onTap: () {
- _changeCurrentTab(2);
+ changeCurrentTab(2);
})
: null);
}
diff --git a/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart
index e2dab5b0..c06c9464 100644
--- a/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart
+++ b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart
@@ -9,7 +9,9 @@ class LiveCarePaymentDialog extends StatefulWidget {
String clinicName;
LiveCarePaymentDialog(
- {@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName});
+ {@required this.getERAppointmentFeesList,
+ @required this.waitingTime,
+ @required this.clinicName});
@override
_LiveCarePaymentDialogState createState() => _LiveCarePaymentDialogState();
@@ -32,14 +34,15 @@ class _LiveCarePaymentDialogState extends State {
height: MediaQuery.of(context).size.height * 0.691,
margin: EdgeInsets.all(20.0),
width: 450.0,
- child: Column(
+ child: SingleChildScrollView(
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 10.0),
- child: Text("Online Consultation",
+ child: Text(TranslationBase.of(context).onlineConsultation,
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
@@ -52,7 +55,7 @@ class _LiveCarePaymentDialogState extends State {
direction: Axis.horizontal,
children: [
Expanded(
- child: Text("Waiting time to start LiveCare consultation",
+ child: Text(TranslationBase.of(context).expectedWaiting,
textAlign: TextAlign.end,
style: TextStyle(fontSize: 13.0)),
),
@@ -92,7 +95,7 @@ class _LiveCarePaymentDialogState extends State {
alignment: Alignment.center,
margin: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.all(5.0),
- child: Text("Consultation fee",
+ child: Text(TranslationBase.of(context).erConsultFee,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.0,
@@ -155,8 +158,7 @@ class _LiveCarePaymentDialogState extends State {
Container(
margin: EdgeInsets.only(left: 10.0),
width: MediaQuery.of(context).size.width * 0.55,
- child: Text(
- "If you're Insurance patient, you have only have to pay the co-payment",
+ child: Text(TranslationBase.of(context).insuredPatient,
style: TextStyle(fontSize: 13.0)),
),
],
@@ -175,7 +177,7 @@ class _LiveCarePaymentDialogState extends State {
),
Container(
child: new Text(
- 'I Accept the Terms And Conditions',
+ TranslationBase.of(context).iAcceptTerms,
style: new TextStyle(fontSize: 14.0),
),
),
@@ -198,7 +200,7 @@ class _LiveCarePaymentDialogState extends State {
alignment: Alignment.center,
margin: EdgeInsets.only(top: 10.0),
child: new Text(
- 'You can pay by the following Options:',
+ TranslationBase.of(context).upComingPayOption,
textAlign: TextAlign.center,
style: new TextStyle(fontSize: 14.0),
),
@@ -236,8 +238,10 @@ class _LiveCarePaymentDialogState extends State {
Expanded(
child: InkWell(
onTap: () {
- if(_selected == 0) {
- AppToast.showErrorToast(message: "Please accept terms & conditions to continue");
+ if (_selected == 0) {
+ AppToast.showErrorToast(
+ message: TranslationBase.of(context)
+ .pleaseAcceptTerms);
} else {
Navigator.pop(context, true);
}
@@ -255,7 +259,7 @@ class _LiveCarePaymentDialogState extends State {
),
),
],
- ),
+ )),
),
),
);
diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart
index 103066d5..ae7f1dca 100644
--- a/lib/pages/livecare/widgets/clinic_list.dart
+++ b/lib/pages/livecare/widgets/clinic_list.dart
@@ -535,7 +535,8 @@ class _clinic_listState extends State {
isDataLoaded
? Container(
height: MediaQuery.of(context).size.height * 0.7,
- child: Column(
+ child: SingleChildScrollView(
+ child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
@@ -575,7 +576,7 @@ class _clinic_listState extends State {
height: 10.0,
),
],
- ),
+ )),
)
: Container(),
isDataLoaded
@@ -584,7 +585,7 @@ class _clinic_listState extends State {
child: Container(
width: MediaQuery.of(context).size.width,
height: 50.0,
- margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 20.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart
index 2ef8d0a2..561089ff 100644
--- a/lib/pages/login/confirm-login.dart
+++ b/lib/pages/login/confirm-login.dart
@@ -543,6 +543,7 @@ class _ConfirmLogin extends State {
// sharedPref.setString(
// BLOOD_TYPE, result['PatientBloodType']),
authenticatedUserObject.user = result.list,
+
sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID,
diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart
index 927e98de..c5da90d5 100644
--- a/lib/pages/login/login.dart
+++ b/lib/pages/login/login.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@@ -40,6 +41,7 @@ class Login extends StatefulWidget {
class _Login extends State {
final util = Utils();
final nationalIDorFile = TextEditingController();
+ final mobileNumberController = TextEditingController();
final int loginType = LoginType.loginType;
String mobileNo;
String countryCode = '966';
@@ -62,6 +64,11 @@ class _Login extends State {
void initState() {
// getDeviceToken();
super.initState();
+
+ if(BASE_URL.contains("uat.")){
+ nationalIDorFile.text = "1231755";
+ mobileNumberController.text = mobileNo = "537503378";
+ }
}
getDeviceToken() async {
@@ -102,6 +109,7 @@ class _Login extends State {
Directionality(
textDirection: TextDirection.ltr,
child: MobileNo(
+ controller: mobileNumberController,
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value)),
@@ -266,6 +274,8 @@ class _Login extends State {
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list;
+ // authenticatedUserObject.user.cRSVerificationStatus =
+ // result['CRSVerificationStatus'];
projectViewModel.user = authenticatedUserObject.user;
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart
index 548405f0..d28fea86 100644
--- a/lib/pages/login/register-info.dart
+++ b/lib/pages/login/register-info.dart
@@ -359,7 +359,8 @@ class _RegisterInfo extends State {
"DateofBirth": DateUtil.convertISODateToJsonDate(
registerInfo.dateOfBirth.replaceAll('/', '-')),
"Gender": registerInfo.gender == 'M' ? 1 : 2,
- "NationalityID": registerInfo.nationality,
+ "NationalityID": registerInfo.nationalityCode,
+ "eHealthIDField": registerInfo.healthId,
"DateofBirthN": date,
"EmailAddress": email,
"SourceType": location,
diff --git a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart
index 5bc9618d..a6fc5fef 100644
--- a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart
+++ b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart
@@ -49,7 +49,8 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5,
),
Texts(
- TranslationBase.of(context).expDate+' :' +
+ TranslationBase.of(context).expDate +
+ ' :' +
DateUtil.getDayMonthYearDateFormatted(model
.activePrescriptionReport[index].orderDate),
),
@@ -57,21 +58,24 @@ class ActiveMedicationsPage extends StatelessWidget {
height: 5,
),
Texts(
- TranslationBase.of(context).route+ ' :' +
+ TranslationBase.of(context).route +
+ ' :' +
model.activePrescriptionReport[index].route,
),
SizedBox(
height: 5,
),
Texts(
- TranslationBase.of(context).frequency+ ' :' +
+ TranslationBase.of(context).frequency +
+ ' :' +
model.activePrescriptionReport[index].frequency,
),
SizedBox(
height: 5,
),
Texts(
- TranslationBase.of(context).dailyQuantity + ' :${model.activePrescriptionReport[index].doseDailyQuantity}',
+ TranslationBase.of(context).dailyQuantity +
+ ' :${model.activePrescriptionReport[index].doseDailyQuantity}',
),
],
),
@@ -86,16 +90,20 @@ class ActiveMedicationsPage extends StatelessWidget {
color: Colors.red,
size: 28,
),
- SizedBox(height: 25,),
+ SizedBox(
+ height: 25,
+ ),
InkWell(
- onTap: (){
+ onTap: () {
Navigator.push(
context,
FadePage(
page: ReminderPage(
- frequency: model.activePrescriptionReport[index]
+ frequency: model
+ .activePrescriptionReport[index]
.frequencyNumber,
- days: model.activePrescriptionReport[index].days,
+ days: model
+ .activePrescriptionReport[index].days,
itemDescription: model
.activePrescriptionReport[index]
.itemDescription,
diff --git a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
index 0de0f451..e3aa9755 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart
@@ -32,7 +32,16 @@ class WeightMonthlyPage extends StatelessWidget {
body: model.weighMonthTimeSeriesData.isEmpty
? Container(
child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
+ child: Container(
+ child: Center(
+ child: MonthLineChartCurved(
+ horizontalInterval: 1.0,
+ title: TranslationBase.of(context).weight,
+ timeSeries: model.weighMonthTimeSeriesData,
+ indexes: model.weighMonthTimeSeriesData.length ~/ 5.5 ?? 0,
+ ),
+ ),
+ ),
),
)
: ListView(
diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
index 47afd9fe..d0c92da1 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
@@ -30,7 +30,12 @@ class WeightWeeklyPage extends StatelessWidget {
child: Center(
child: Container(
child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
+ child: LineChartCurved(
+ horizontalInterval: 1.0,
+ title: TranslationBase.of(context).weight,
+ timeSeries: model.weightWeekTimeSeriesData,
+ indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
+ ),
),
),
),
diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
index a3b443d4..f8fc4dc4 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
@@ -31,7 +31,16 @@ class WeightYearPage extends StatelessWidget {
body: model.weightYearTimeSeriesData.isEmpty
? Container(
child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
+ child: Container(
+ child: Center(
+ child: LineChartCurved(
+ horizontalInterval: 1.0,
+ title: TranslationBase.of(context).weight,
+ timeSeries: model.weightYearTimeSeriesData,
+ indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
+ ),
+ ),
+ ),
),
)
: ListView(
diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
index 8bd180fa..98058bcf 100644
--- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
+++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
@@ -27,13 +27,13 @@ class AddBloodPressurePage extends StatefulWidget {
const AddBloodPressurePage(
{Key key,
- this.bloodSugarDate,
- this.measureTimeSelectedType,
- this.isUpdate = false,
- this.lineItemNo,
- this.model,
- this.bloodSystolicValue,
- this.bloodDiastolicValue})
+ this.bloodSugarDate,
+ this.measureTimeSelectedType,
+ this.isUpdate = false,
+ this.lineItemNo,
+ this.model,
+ this.bloodSystolicValue,
+ this.bloodDiastolicValue})
: super(key: key);
@override
@@ -42,15 +42,14 @@ class AddBloodPressurePage extends StatefulWidget {
class _AddBloodPressurePageState extends State {
TextEditingController _bloodSystolicValueController = TextEditingController();
- TextEditingController _bloodDiastolicValueController =
- TextEditingController();
+ TextEditingController _bloodDiastolicValueController = TextEditingController();
DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now();
int measuredArm = 1;
bool isButtonDisabled = false;
final List measureTimeEnList = [
- 'Left',
- 'Right',
+ 'Left arm ',
+ 'Right arm',
];
final List measureTimeArList = [
'الذراع الأيسر',
@@ -81,44 +80,38 @@ class _AddBloodPressurePageState extends State {
return AppScaffold(
isShowAppBar: true,
- appBarTitle: widget.isUpdate
- ? TranslationBase.of(context).update
- : TranslationBase.of(context).add,
+ appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
appBarIcons: widget.isUpdate
- ? [
- IconButton(
- icon: Icon(Icons.delete),
- color: Colors.white,
- onPressed: () {
- ConfirmDialog dialog = new ConfirmDialog(
- context: context,
- confirmMessage: 'Remove this measure',
- okText: TranslationBase.of(context).ok,
- cancelText: TranslationBase.of(context).cancel,
- okFunction: () async {
- ConfirmDialog.closeAlertDialog(context);
+ ? [
+ IconButton(
+ icon: Icon(Icons.delete),
+ color: Colors.white,
+ onPressed: () {
+ ConfirmDialog dialog = new ConfirmDialog(
+ context: context,
+ confirmMessage: 'Remove this measure',
+ okText: TranslationBase.of(context).ok,
+ cancelText: TranslationBase.of(context).cancel,
+ okFunction: () async {
+ ConfirmDialog.closeAlertDialog(context);
- GifLoaderDialogUtils.showMyDialog(context);
- widget.model
- .deactivateDiabeticStatus(
- lineItemNo: widget.lineItemNo)
- .then((value) {
- GifLoaderDialogUtils.hideDialog(context);
- if (widget.model.state == ViewState.ErrorLocal)
- AppToast.showErrorToast(
- message: widget.model.error);
- else
- Navigator.pop(context);
- }).catchError((e) {
- GifLoaderDialogUtils.hideDialog(context);
- AppToast.showErrorToast(message: widget.model.error);
- });
- },
- cancelFunction: () => {});
- dialog.showAlertDialog(context);
- },
- )
- ]
+ GifLoaderDialogUtils.showMyDialog(context);
+ widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (widget.model.state == ViewState.ErrorLocal)
+ AppToast.showErrorToast(message: widget.model.error);
+ else
+ Navigator.pop(context);
+ }).catchError((e) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: widget.model.error);
+ });
+ },
+ cancelFunction: () => {});
+ dialog.showAlertDialog(context);
+ },
+ )
+ ]
: null,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
@@ -151,17 +144,13 @@ class _AddBloodPressurePageState extends State {
),
InkWell(
onTap: () {
- confirmSelectMeasureTimeDialog(projectViewModel.isArabic
- ? measureTimeEnList
- : measureTimeArList);
+ confirmSelectMeasureTimeDialog(!projectViewModel.isArabic ? measureTimeArList : measureTimeEnList);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: Colors.white),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -183,22 +172,18 @@ class _AddBloodPressurePageState extends State {
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now(), onConfirm: (date) {
- setState(
- () {
- bloodSugarDate = date;
- },
- );
+ setState(
+ () {
+ bloodSugarDate = date;
},
- currentTime: bloodSugarDate,
- locale: projectViewModel.localeType);
+ );
+ }, currentTime: bloodSugarDate, locale: projectViewModel.localeType);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: Colors.white),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -213,30 +198,22 @@ class _AddBloodPressurePageState extends State {
),
InkWell(
onTap: () {
- DatePicker.showTimePicker(context, showTitleActions: true,
- onConfirm: (date) {
- setState(
- () {
- timeSugarDate = date;
- },
- );
+ DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) {
+ setState(
+ () {
+ timeSugarDate = date;
},
- currentTime: timeSugarDate,
- locale: projectViewModel.localeType);
+ );
+ }, currentTime: timeSugarDate, locale: projectViewModel.localeType);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: Colors.white),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Texts(TranslationBase.of(context).time),
- Texts(getTime())
- ],
+ children: [Texts(TranslationBase.of(context).time), Texts(getTime())],
),
),
),
@@ -254,23 +231,18 @@ class _AddBloodPressurePageState extends State {
loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
- color: isButtonDisabled
- ? Colors.grey[900]
- : Colors.grey,
+ color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
onTap: () async {
- if (_bloodSystolicValueController.text.isNotEmpty &&
- _bloodDiastolicValueController.text.isNotEmpty) {
+ if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
widget.model
.addORUpdateDiabtecResult(
isUpdate: widget.isUpdate,
bloodPressureDate:
- '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
- diastolicPressure:
- _bloodDiastolicValueController.text.toString(),
- systolicePressure:
- _bloodSystolicValueController.text.toString(),
+ '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
+ diastolicPressure: _bloodDiastolicValueController.text.toString(),
+ systolicePressure: _bloodSystolicValueController.text.toString(),
measuredArm: measuredArm,
)
.then((value) {
@@ -318,7 +290,7 @@ class _AddBloodPressurePageState extends State {
}
void validateForm() {
- print("_bloodSystolicValueController "+_bloodSystolicValueController.text.length.toString());
+ print("_bloodSystolicValueController " + _bloodSystolicValueController.text.length.toString());
if (measureTimeSelectedType != 'Left Arm' &&
_bloodSystolicValueController.text.length > 0 &&
_bloodDiastolicValueController.text.length > 0) {
@@ -348,5 +320,4 @@ class _AddBloodPressurePageState extends State {
// });
// }
}
-
}
diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart
index 04853689..6d4f02d8 100644
--- a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart
+++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@@ -21,7 +22,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
- body: model.weighMonthTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView(
+ body: ListView(
children: [
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@@ -29,8 +30,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
child: MonthCurvedChartBloodPressure(
horizontalInterval: 20.0,
title: TranslationBase.of(context).bloodPressure,
- timeSeries1: model.weighMonthTimeSeriesDataTop,
- timeSeries2: model.weighMonthTimeSeriesDataLow,
+ timeSeries1: model.weighMonthTimeSeriesDataTop.isEmpty?[TimeSeriesSales3(0,0.0)]:model.weighMonthTimeSeriesDataTop,
+ timeSeries2: model.weighMonthTimeSeriesDataLow.isEmpty?[TimeSeriesSales3(0,0.0)]:model.weighMonthTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
),
),
@@ -47,7 +48,7 @@ class BloodPressureMonthlyPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Table(
+ model.weighMonthTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart
index b5b01f06..68172354 100644
--- a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart
+++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@@ -18,7 +19,7 @@ class BloodPressureYearPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
- body: model.weightYearTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):ListView(
+ body:ListView(
children: [
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@@ -26,8 +27,8 @@ class BloodPressureYearPage extends StatelessWidget {
child: CurvedChartBloodPressure(
horizontalInterval: 3.0,// model.weightWeekTimeSeriesDataLow.length==1 ?1 :20.0,
title: TranslationBase.of(context).bloodPressure,
- timeSeries1: model.weightYearTimeSeriesDataTop,
- timeSeries2: model.weightYearTimeSeriesDataLow,
+ timeSeries1: model.weightYearTimeSeriesDataTop.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightYearTimeSeriesDataTop,
+ timeSeries2: model.weightYearTimeSeriesDataLow.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightYearTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
),
),
@@ -44,7 +45,7 @@ class BloodPressureYearPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Table(
+ model.weightYearTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),):Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
diff --git a/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart
index e4ff7332..1929d836 100644
--- a/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart
+++ b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart
@@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.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';
@@ -21,7 +22,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
- body: model.weightWeekTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): ListView(
+ body: ListView(
children: [
Container(
margin: EdgeInsets.only(top: 12, left: 8, right: 8),
@@ -29,8 +30,8 @@ class BloodPressureWeeklyPage extends StatelessWidget {
child: CurvedChartBloodPressure(
horizontalInterval:3.0,
title: TranslationBase.of(context).bloodPressure,
- timeSeries1: model.weightWeekTimeSeriesDataTop,
- timeSeries2: model.weightWeekTimeSeriesDataLow,
+ timeSeries1: model.weightWeekTimeSeriesDataTop.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightWeekTimeSeriesDataTop,
+ timeSeries2: model.weightWeekTimeSeriesDataLow.isEmpty?[TimeSeriesSales2(DateTime.now(),0.0)]:model.weightWeekTimeSeriesDataLow,
indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5,
),
),
@@ -47,7 +48,7 @@ class BloodPressureWeeklyPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Table(
+ model.weightWeekTimeSeriesDataTop.isEmpty? Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
diff --git a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
index 6f186104..6d4755dc 100644
--- a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
+++ b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
@@ -282,11 +282,11 @@ class _AddBloodSugarPageState extends State {
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
- onTap: () {
+ onTap: () async {
if (_bloodSugarValueController.text.isNotEmpty) {
if (widget.isUpdate) {
GifLoaderDialogUtils.showMyDialog(context);
- widget.bloodSugarViewMode
+ await widget.bloodSugarViewMode
.updateDiabtecResult(
month: bloodSugarDate,
hour: timeSugarDate,
@@ -294,8 +294,8 @@ class _AddBloodSugarPageState extends State {
measuredTime: measuredTime,
lineItemNo: widget.lineItemNo,
bloodSugerResult:
- _bloodSugarValueController.text.toString())
- .then((value) {
+ _bloodSugarValueController.text.toString());
+
GifLoaderDialogUtils.hideDialog(context);
if (widget.bloodSugarViewMode.state ==
ViewState.ErrorLocal)
@@ -303,9 +303,10 @@ class _AddBloodSugarPageState extends State {
message: widget.bloodSugarViewMode.error);
else
Navigator.pop(context);
- });
- } else
- widget.bloodSugarViewMode
+
+ } else {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await widget.bloodSugarViewMode
.addDiabtecResult(
diabtecUnit: measureUnitSelectedType,
measuredTime: measuredTime,
@@ -313,15 +314,17 @@ class _AddBloodSugarPageState extends State {
_bloodSugarValueController.text.toString(),
bloodSugerDateChart:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
- )
- .then((value) {
+ );
+
GifLoaderDialogUtils.hideDialog(context);
if (widget.bloodSugarViewMode.state == ViewState.Error)
AppToast.showErrorToast(
message: widget.bloodSugarViewMode.error);
else
Navigator.pop(context);
- });
+
+ }
+
}
}),
),
diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart
index 1294c5dd..a0f37c83 100644
--- a/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart
+++ b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart';
+import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
@@ -17,25 +18,32 @@ import 'package:provider/provider.dart';
class BloodMonthlyPage extends StatelessWidget {
final List