diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index f6ab4d58..e6bbdf39 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,15 @@
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. -->
+
+
+
+
+
+
+
+
+
+<<<<<<< HEAD
+=======
+>>>>>>> edd850490ef9ccdee72c9e8d3318f88be0677dce
diff --git a/ios/.gitignore b/ios/.gitignore
index e96ef602..ce2e85b9 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -30,3 +30,5 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3
+/Runner.xcworkspace/contents.xcworkspacedata
+/Runner.xcodeproj/project.pbxproj
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 23df2dbe..005fe83c 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -68,6 +68,8 @@ PODS:
- Flutter (1.0.0)
- flutter_flexible_toast (0.0.1):
- Flutter
+ - flutter_inappwebview (0.0.1):
+ - Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
@@ -110,6 +112,10 @@ PODS:
- Flutter
- local_auth (0.0.1):
- Flutter
+ - manage_calendar_events (0.0.1):
+ - Flutter
+ - map_launcher (0.0.1):
+ - Flutter
- MTBBarcodeScanner (5.0.11)
- nanopb (0.3.9011):
- nanopb/decode (= 0.3.9011)
@@ -151,12 +157,15 @@ DEPENDENCIES:
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
+ - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
+ - manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
+ - map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
@@ -208,6 +217,8 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_flexible_toast:
:path: ".symlinks/plugins/flutter_flexible_toast/ios"
+ flutter_inappwebview:
+ :path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_plugin_android_lifecycle:
@@ -220,6 +231,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker/ios"
local_auth:
:path: ".symlinks/plugins/local_auth/ios"
+ manage_calendar_events:
+ :path: ".symlinks/plugins/manage_calendar_events/ios"
+ map_launcher:
+ :path: ".symlinks/plugins/map_launcher/ios"
path_provider_linux:
:path: ".symlinks/plugins/path_provider_linux/ios"
permission_handler:
@@ -259,6 +274,7 @@ SPEC CHECKSUMS:
FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
+ flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3
@@ -269,6 +285,8 @@ SPEC CHECKSUMS:
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
+ manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
+ map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 785bfcb8..c1c5e34c 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -239,12 +239,15 @@
"${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework",
"${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
"${BUILT_PRODUCTS_DIR}/flutter_flexible_toast/flutter_flexible_toast.framework",
+ "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework",
"${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework",
"${BUILT_PRODUCTS_DIR}/flutter_plugin_android_lifecycle/flutter_plugin_android_lifecycle.framework",
"${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework",
"${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
+ "${BUILT_PRODUCTS_DIR}/manage_calendar_events/manage_calendar_events.framework",
+ "${BUILT_PRODUCTS_DIR}/map_launcher/map_launcher.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
@@ -263,12 +266,15 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_flexible_toast.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_plugin_android_lifecycle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/manage_calendar_events.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/map_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 5adb06d2..1ec4417c 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
const MAX_SMALL_SCREEN = 660;
-const BASE_URL = 'https://uat.hmgwebservices.com/Services';
+const BASE_URL = 'https://hmgwebservices.com/Services';
const GET_PROJECT = '/Lists.svc/REST/GetProject';
@@ -20,6 +20,24 @@ const GET_PRESCRIPTIONS_ALL_ORDERS =
'/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = '/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = '/Notifications.svc/REST/SendPrescriptionEmail';
+const GET_PRESCRIPTION_REPORT_ENH =
+ '/Patients.svc/REST/GetPrescriptionReport_enh';
+
+///Lab Order
+const GET_Patient_LAB_ORDERS = '/Patients.svc/REST/GetPatientLabOrders';
+const GET_Patient_LAB_SPECIAL_RESULT =
+ '/Patients.svc/REST/GetPatientLabSpecialResults';
+
+///
+const GET_PATIENT_ORDERS = '/Patients.svc/REST/GetPatientRadOrders';
+const GET_PATIENT_ORDERS_DETAILS =
+ '/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
+const GET_RAD_IMAGE_URL = '/Patients.svc/Rest/GetRadImageURL';
+const SEND_RAD_REPORT_EMAIL = '/Notifications.svc/REST/SendRadReportEmail';
+
+///Feedback
+const SEND_FEEDBACK = '/COCWS.svc/REST/InsertCOCItemInSPList';
+const GET_STATUS_FOR_COCO = '/COCWS.svc/REST/GetStatusforCOC';
//const BASE_URL = 'https://hmgwebservices.com/Services'; // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/Services'; // UAT Environment
@@ -76,10 +94,22 @@ const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.5;
+const SETUP_ID = '91877';
+const LANGUAGE = 1;
+const PATIENT_OUT_SA = 0;
+const SESSION_ID = 'TMRhVmkGhOsvamErw';
+const IS_DENTAL_ALLOWED_BACKEND = false;
+const PATIENT_TYPE = 1;
+const PATIENT_TYPE_ID = 1;
+
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "/Patients.svc/REST/GetPharmcyList";
+const GET_PAtIENTS_INSURANCE = "/Patients.svc/REST/Get_PatientInsuranceDetails";
+const GET_PAtIENTS_INSURANCE_UPDATED =
+ "/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+const GET_PAtIENTS_INSURANCE_APPROVALS = "/Patients.svc/REST/GetApprovalStatus";
class AppGlobal {
static var context;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index abb070ff..cbf9837d 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -182,4 +182,56 @@ const Map> localizedValues = {
"payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"},
'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'},
'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'},
+ "more-verify": {
+ "en": "More Verification Options",
+ "ar": "المزيد من خيارات التحقق"
+ },
+ "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
+ "account-info": {
+ "en": "Would you like to login with current username?",
+ "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"
+ },
+ "another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"},
+ "next": {"en": "Next", "ar": 'التالى'},
+ "first-name": {"en": "First Name", "ar": "الاسم الأول"},
+ "middle-name": {"en": "Middle Name", "ar": "الاسم الثاني"},
+ "last-name": {"en": "Last Name", "ar": "إسم العائلة"},
+ "female": {"en": "Female", "ar": "أنثى"},
+ "male": {"en": "Male", "ar": "ذكر"},
+ "preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"},
+ "english": {"en": "English", "ar": "الإنجليزية"},
+ "arabic": {"en": "Arabic", "ar": "العربية"},
+ "locations-register": {
+ "en": "Where do you want to create this file?",
+ "ar": "أين تريد فتح هذا الملف؟"
+ },
+ "ksa": {"en": "KSA", "ar": "السعودية"},
+ "dubai": {"en": "Dubai", "ar": "دبي"},
+ "enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
+ "family": {"en": "My Family", "ar": "عائلتي"},
+ "family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
+ "add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"},
+ "sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"},
+ "recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
+ "manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"},
+ // "my-family": {"en": "MY FAMILY", "ar": "عائلتي"},
+ "approvals": {"en": "Approvals", "ar": "موفقات التأمين"},
+ "approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "},
+ "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
+ "receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "},
+ "expiryDate": {"en": "Expiry Date: ", "ar": "تاريخ الانتهاء: "},
+ "procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"},
+ "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
+ "usageStatus": {"en": "Usage Status", "ar": "جالة الاستخدام"},
+ "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
+ "totalApproval": {
+ "en": "Total approval unused",
+ "ar": "اجمالي الموافقات الغير مستخدمة"
+ },
+ "category": {"en": "Category: ", "ar": "الفئة"},
+ "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"},
+ "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"},
+ "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"},
+ "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"},
+ "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}
};
diff --git a/lib/core/model/feedback/COC_items.dart b/lib/core/model/feedback/COC_items.dart
new file mode 100644
index 00000000..068c8bee
--- /dev/null
+++ b/lib/core/model/feedback/COC_items.dart
@@ -0,0 +1,120 @@
+class COCItem {
+ Null appointment;
+ String appointmentClinicName;
+ String appointmentDate;
+ String appointmentProjectName;
+ String cOCID;
+ String cOCTitle;
+ String channel;
+ dynamic clinic;
+ String clinicID;
+ String date;
+ dynamic detail;
+ dynamic doctor;
+ String doctorID;
+ String formType;
+ int formTypeID;
+ dynamic identificationNo;
+ int itemID;
+ dynamic mobileNo;
+ dynamic naturename;
+ dynamic patientID;
+ dynamic patientName;
+ dynamic project;
+ dynamic projectID;
+ String solution;
+ String status;
+ String statusAr;
+ dynamic statusEn;
+
+ COCItem(
+ {this.appointment,
+ this.appointmentClinicName,
+ this.appointmentDate,
+ this.appointmentProjectName,
+ this.cOCID,
+ this.cOCTitle,
+ this.channel,
+ this.clinic,
+ this.clinicID,
+ this.date,
+ this.detail,
+ this.doctor,
+ this.doctorID,
+ this.formType,
+ this.formTypeID,
+ this.identificationNo,
+ this.itemID,
+ this.mobileNo,
+ this.naturename,
+ this.patientID,
+ this.patientName,
+ this.project,
+ this.projectID,
+ this.solution,
+ this.status,
+ this.statusAr,
+ this.statusEn});
+
+ COCItem.fromJson(Map json) {
+ appointment = json['Appointment'];
+ appointmentClinicName = json['AppointmentClinicName'];
+ appointmentDate = json['AppointmentDate'];
+ appointmentProjectName = json['AppointmentProjectName'];
+ cOCID = json['COCID'];
+ cOCTitle = json['COCTitle'];
+ channel = json['Channel'];
+ clinic = json['Clinic'];
+ clinicID = json['ClinicID'];
+ date = json['Date'];
+ detail = json['Detail'];
+ doctor = json['Doctor'];
+ doctorID = json['DoctorID'];
+ formType = json['FormType'];
+ formTypeID = json['FormTypeID'];
+ identificationNo = json['IdentificationNo'];
+ itemID = json['ItemID'];
+ mobileNo = json['MobileNo'];
+ naturename = json['Naturename'];
+ patientID = json['PatientID'];
+ patientName = json['PatientName'];
+ project = json['Project'];
+ projectID = json['ProjectID'];
+ solution = json['Solution'];
+ status = json['Status'];
+ statusAr = json['StatusAr'];
+ statusEn = json['StatusEn'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Appointment'] = this.appointment;
+ data['AppointmentClinicName'] = this.appointmentClinicName;
+ data['AppointmentDate'] = this.appointmentDate;
+ data['AppointmentProjectName'] = this.appointmentProjectName;
+ data['COCID'] = this.cOCID;
+ data['COCTitle'] = this.cOCTitle;
+ data['Channel'] = this.channel;
+ data['Clinic'] = this.clinic;
+ data['ClinicID'] = this.clinicID;
+ data['Date'] = this.date;
+ data['Detail'] = this.detail;
+ data['Doctor'] = this.doctor;
+ data['DoctorID'] = this.doctorID;
+ data['FormType'] = this.formType;
+ data['FormTypeID'] = this.formTypeID;
+ data['IdentificationNo'] = this.identificationNo;
+ data['ItemID'] = this.itemID;
+ data['MobileNo'] = this.mobileNo;
+ data['Naturename'] = this.naturename;
+ data['PatientID'] = this.patientID;
+ data['PatientName'] = this.patientName;
+ data['Project'] = this.project;
+ data['ProjectID'] = this.projectID;
+ data['Solution'] = this.solution;
+ data['Status'] = this.status;
+ data['StatusAr'] = this.statusAr;
+ data['StatusEn'] = this.statusEn;
+ return data;
+ }
+}
diff --git a/lib/core/model/feedback/request_insert_coc_item.dart b/lib/core/model/feedback/request_insert_coc_item.dart
new file mode 100644
index 00000000..e8b6fce5
--- /dev/null
+++ b/lib/core/model/feedback/request_insert_coc_item.dart
@@ -0,0 +1,132 @@
+class RequestInsertCOCItem {
+ bool isUserLoggedIn;
+ String mobileNo;
+ int identificationNo;
+ int patientID;
+ int patientOutSA;
+ int patientTypeID;
+ String tokenID;
+ String patientName;
+ int projectID;
+ String fileName;
+ String attachment;
+ String uILanguage;
+ String browserInfo;
+ String cOCTypeName;
+ String formTypeID;
+ String details;
+ String deviceInfo;
+ String deviceType;
+ String title;
+ String resolution;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ String sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+ int patientType;
+ double appVersion;
+
+ RequestInsertCOCItem(
+ {this.isUserLoggedIn,
+ this.mobileNo,
+ this.identificationNo,
+ this.patientID,
+ this.patientOutSA,
+ this.patientTypeID,
+ this.tokenID,
+ this.patientName,
+ this.projectID,
+ this.fileName,
+ this.attachment,
+ this.uILanguage,
+ this.browserInfo,
+ this.cOCTypeName,
+ this.formTypeID,
+ this.details,
+ this.deviceInfo,
+ this.deviceType,
+ this.title,
+ this.resolution,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID,
+ this.patientType,
+ this.appVersion});
+
+ RequestInsertCOCItem.fromJson(Map json) {
+ isUserLoggedIn = json['IsUserLoggedIn'];
+ mobileNo = json['MobileNo'];
+ identificationNo = json['IdentificationNo'];
+ patientID = json['PatientID'];
+ patientOutSA = json['PatientOutSA'];
+ patientTypeID = json['PatientTypeID'];
+ tokenID = json['TokenID'];
+ patientName = json['PatientName'];
+ projectID = json['ProjectID'];
+ fileName = json['FileName'];
+ attachment = json['Attachment'];
+ uILanguage = json['UILanguage'];
+ browserInfo = json['BrowserInfo'];
+ cOCTypeName = json['COCTypeName'];
+ formTypeID = json['FormTypeID'];
+ details = json['Details'];
+ deviceInfo = json['DeviceInfo'];
+ deviceType = json['DeviceType'];
+ title = json['Title'];
+ resolution = json['Resolution'];
+ versionID = json['VersionID'];
+ channel = json['Channel'];
+ languageID = json['LanguageID'];
+ iPAdress = json['IPAdress'];
+ generalid = json['generalid'];
+ sessionID = json['SessionID'];
+ isDentalAllowedBackend = json['isDentalAllowedBackend'];
+ deviceTypeID = json['DeviceTypeID'];
+ patientType = json['PatientType'];
+ appVersion = json['AppVersion'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['IsUserLoggedIn'] = this.isUserLoggedIn;
+ data['MobileNo'] = this.mobileNo;
+ data['IdentificationNo'] = this.identificationNo;
+ data['PatientID'] = this.patientID;
+ data['PatientOutSA'] = this.patientOutSA;
+ data['PatientTypeID'] = this.patientTypeID;
+ data['TokenID'] = this.tokenID;
+ data['PatientName'] = this.patientName;
+ data['ProjectID'] = this.projectID;
+ data['FileName'] = this.fileName;
+ data['Attachment'] = this.attachment;
+ data['UILanguage'] = this.uILanguage;
+ data['BrowserInfo'] = this.browserInfo;
+ data['COCTypeName'] = this.cOCTypeName;
+ data['FormTypeID'] = this.formTypeID;
+ data['Details'] = this.details;
+ data['DeviceInfo'] = this.deviceInfo;
+ data['DeviceType'] = this.deviceType;
+ data['Title'] = this.title;
+ data['Resolution'] = this.resolution;
+ data['VersionID'] = this.versionID;
+ data['Channel'] = this.channel;
+ data['LanguageID'] = this.languageID;
+ data['IPAdress'] = this.iPAdress;
+ data['generalid'] = this.generalid;
+ data['SessionID'] = this.sessionID;
+ data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
+ data['DeviceTypeID'] = this.deviceTypeID;
+ data['PatientType'] = this.patientType;
+ data['AppVersion'] = this.appVersion;
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
new file mode 100644
index 00000000..5f41f878
--- /dev/null
+++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
@@ -0,0 +1,72 @@
+class ReauestInsuranceApprovalModel {
+ 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;
+ int projectID;
+
+ ReauestInsuranceApprovalModel(
+ {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.projectID});
+
+ ReauestInsuranceApprovalModel.fromJson(Map json) {
+ 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'];
+ }
+
+ 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['PatientType'] = this.patientType;
+ data['EXuldAPPNO'] = this.eXuldAPPNO;
+ data['ProjectID'] = this.projectID;
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart
new file mode 100644
index 00000000..4df6d882
--- /dev/null
+++ b/lib/core/model/insurance/insurance_approval.dart
@@ -0,0 +1,129 @@
+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;
+ int projectID;
+ String doctorName;
+ String clinicName;
+ String patientDescription;
+ int approvalNo;
+ String approvalStatusDescption;
+ int unUsedCount;
+ //String companyName;
+ String expiryDate;
+ String rceiptOn;
+
+ 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.projectID,
+ this.doctorName,
+ this.clinicName,
+ this.patientDescription,
+ this.approvalNo,
+ this.approvalStatusDescption,
+ this.unUsedCount,
+ //this.companyName,
+ this.expiryDate,
+ this.rceiptOn,
+ this.approvalDetails});
+ InsuranceApprovalDetails x = InsuranceApprovalDetails();
+ 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]);
+ } catch (e) {
+ print(e);
+ }
+ }
+
+ 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['PatientType'] = this.patientType;
+ data['EXuldAPPNO'] = this.eXuldAPPNO;
+ data['ProjectID'] = this.projectID;
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart
new file mode 100644
index 00000000..1c02705b
--- /dev/null
+++ b/lib/core/model/insurance/insurance_card.dart
@@ -0,0 +1,90 @@
+import 'dart:convert';
+
+class InsuranceCardModel {
+ 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;
+ String groupName;
+ String companyName;
+ String subCategoryDesc;
+ String patientCardID;
+ String insurancePolicyNumber;
+ bool isActive;
+ String cardValidTo;
+
+ InsuranceCardModel({
+ this.insurancePolicyNumber,
+ this.subCategoryDesc,
+ 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.groupName,
+ this.companyName,
+ this.patientCardID,
+ this.isActive,
+ this.cardValidTo,
+ });
+
+ InsuranceCardModel.fromJson(Map json) {
+ isActive = json['IsActive'];
+ insurancePolicyNumber = json['InsurancePolicyNo'];
+ patientCardID = json['PatientCardID'];
+ companyName = json['CompanyName'];
+ groupName = json['GroupName'];
+ 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'];
+ subCategoryDesc = json['SubCategoryDesc'];
+ cardValidTo = json['CardValidTo'];
+ }
+
+ 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['PatientType'] = this.patientType;
+
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/insurance_card_update.dart b/lib/core/model/insurance/insurance_card_update.dart
new file mode 100644
index 00000000..fd5e0db5
--- /dev/null
+++ b/lib/core/model/insurance/insurance_card_update.dart
@@ -0,0 +1,66 @@
+import 'dart:convert';
+
+import 'package:intl/intl.dart';
+
+class InsuranceUpdateModel {
+ int patientID;
+ int patientType;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ String sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+ String createdOn;
+ String statusDescription;
+
+ InsuranceUpdateModel(
+ {this.patientID,
+ this.patientType,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID,
+ this.createdOn,
+ this.statusDescription});
+
+ InsuranceUpdateModel.fromJson(Map json) {
+ statusDescription = json['StatusDescription'];
+ patientID = json['PatientID'];
+ patientType = json['PatientType'];
+ 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'];
+ createdOn = json['CreatedOn'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['PatientID'] = this.patientID;
+ data['PatientType'] = this.patientType;
+ 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;
+ return data;
+ }
+}
diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart
new file mode 100644
index 00000000..26daaff0
--- /dev/null
+++ b/lib/core/model/labs/patient_lab_orders.dart
@@ -0,0 +1,156 @@
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+
+class PatientLabOrders {
+ int actualDoctorRate;
+ String clinicDescription;
+ String clinicDescriptionEnglish;
+ Null clinicDescriptionN;
+ int clinicID;
+ int doctorID;
+ String doctorImageURL;
+ String doctorName;
+ String doctorNameEnglish;
+ Null doctorNameN;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ String invoiceNo;
+ bool isActiveDoctorProfile;
+ bool isDoctorAllowVedioCall;
+ bool isExecludeDoctor;
+ bool isInOutPatient;
+ String isInOutPatientDescription;
+ String isInOutPatientDescriptionN;
+ bool isRead;
+ String nationalityFlagURL;
+ int noOfPatientsRate;
+ DateTime orderDate;
+ String orderNo;
+ String patientID;
+ String projectID;
+ String projectName;
+ Null projectNameN;
+ String qR;
+ String setupID;
+ List speciality;
+
+ PatientLabOrders(
+ {this.actualDoctorRate,
+ this.clinicDescription,
+ this.clinicDescriptionEnglish,
+ this.clinicDescriptionN,
+ this.clinicID,
+ this.doctorID,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorNameEnglish,
+ this.doctorNameN,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.invoiceNo,
+ this.isActiveDoctorProfile,
+ this.isDoctorAllowVedioCall,
+ this.isExecludeDoctor,
+ this.isInOutPatient,
+ this.isInOutPatientDescription,
+ this.isInOutPatientDescriptionN,
+ this.isRead,
+ this.nationalityFlagURL,
+ this.noOfPatientsRate,
+ this.orderDate,
+ this.orderNo,
+ this.patientID,
+ this.projectID,
+ this.projectName,
+ this.projectNameN,
+ this.qR,
+ this.setupID,
+ this.speciality});
+
+ PatientLabOrders.fromJson(Map json) {
+ actualDoctorRate = json['ActualDoctorRate'];
+ clinicDescription = json['ClinicDescription'];
+ clinicDescriptionEnglish = json['ClinicDescriptionEnglish'];
+ clinicDescriptionN = json['ClinicDescriptionN'];
+ clinicID = json['ClinicID'];
+ doctorID = json['DoctorID'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorNameEnglish = json['DoctorNameEnglish'];
+ doctorNameN = json['DoctorNameN'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ invoiceNo = json['InvoiceNo'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ isInOutPatient = json['IsInOutPatient'];
+ isInOutPatientDescription = json['IsInOutPatientDescription'];
+ isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
+ isRead = json['IsRead'];
+ nationalityFlagURL = json['NationalityFlagURL'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ orderDate = DateUtil.convertStringToDate(json['OrderDate']);
+ orderNo = json['OrderNo'];
+ patientID = json['PatientID'];
+ projectID = json['ProjectID'];
+ projectName = json['ProjectName'];
+ projectNameN = json['ProjectNameN'];
+ qR = json['QR'];
+ setupID = json['SetupID'];
+ // speciality = json['Speciality'].cast();
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['ClinicDescription'] = this.clinicDescription;
+ data['ClinicDescriptionEnglish'] = this.clinicDescriptionEnglish;
+ data['ClinicDescriptionN'] = this.clinicDescriptionN;
+ data['ClinicID'] = this.clinicID;
+ data['DoctorID'] = this.doctorID;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameEnglish'] = this.doctorNameEnglish;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['IsInOutPatient'] = this.isInOutPatient;
+ data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
+ data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
+ data['IsRead'] = this.isRead;
+ data['NationalityFlagURL'] = this.nationalityFlagURL;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['OrderDate'] = this.orderDate;
+ data['OrderNo'] = this.orderNo;
+ data['PatientID'] = this.patientID;
+ data['ProjectID'] = this.projectID;
+ data['ProjectName'] = this.projectName;
+ data['ProjectNameN'] = this.projectNameN;
+ data['QR'] = this.qR;
+ data['SetupID'] = this.setupID;
+ data['Speciality'] = this.speciality;
+ return data;
+ }
+}
+
+class PatientLabOrdersList {
+ String filterName = "";
+ List patientLabOrdersList = List();
+
+ PatientLabOrdersList(
+ {this.filterName, PatientLabOrders patientDoctorAppointment}) {
+ patientLabOrdersList.add(patientDoctorAppointment);
+ }
+}
diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart
new file mode 100644
index 00000000..2fbcb832
--- /dev/null
+++ b/lib/core/model/labs/patient_lab_special_result.dart
@@ -0,0 +1,32 @@
+class PatientLabSpecialResult {
+ String invoiceNo;
+ String moduleID;
+ String resultData;
+ String resultDataHTML;
+ Null resultDataTxt;
+
+ PatientLabSpecialResult(
+ {this.invoiceNo,
+ this.moduleID,
+ this.resultData,
+ this.resultDataHTML,
+ this.resultDataTxt});
+
+ PatientLabSpecialResult.fromJson(Map json) {
+ invoiceNo = json['InvoiceNo'];
+ moduleID = json['ModuleID'];
+ resultData = json['ResultData'];
+ resultDataHTML = json['ResultDataHTML'];
+ resultDataTxt = json['ResultDataTxt'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['InvoiceNo'] = this.invoiceNo;
+ data['ModuleID'] = this.moduleID;
+ data['ResultData'] = this.resultData;
+ data['ResultDataHTML'] = this.resultDataHTML;
+ data['ResultDataTxt'] = this.resultDataTxt;
+ return data;
+ }
+}
diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart
new file mode 100644
index 00000000..ce9263ef
--- /dev/null
+++ b/lib/core/model/labs/request_patient_lab_orders.dart
@@ -0,0 +1,64 @@
+class RequestPatientLabOrders {
+ 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;
+
+ RequestPatientLabOrders(
+ {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});
+
+ RequestPatientLabOrders.fromJson(Map json) {
+ 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'];
+ }
+
+ 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['PatientType'] = this.patientType;
+ return data;
+ }
+}
diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart
new file mode 100644
index 00000000..bdeb3930
--- /dev/null
+++ b/lib/core/model/labs/request_patient_lab_special_result.dart
@@ -0,0 +1,84 @@
+class RequestPatientLabSpecialResult {
+ String invoiceNo;
+ String orderNo;
+ String setupID;
+ String projectID;
+ int clinicID;
+ 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;
+
+ RequestPatientLabSpecialResult(
+ {this.invoiceNo,
+ this.orderNo,
+ this.setupID,
+ this.projectID,
+ this.clinicID,
+ 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});
+
+ RequestPatientLabSpecialResult.fromJson(Map json) {
+ invoiceNo = json['InvoiceNo'];
+ orderNo = json['OrderNo'];
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ clinicID = json['ClinicID'];
+ 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'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['InvoiceNo'] = this.invoiceNo;
+ data['OrderNo'] = this.orderNo;
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['ClinicID'] = this.clinicID;
+ 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['PatientType'] = this.patientType;
+ return data;
+ }
+}
diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart
new file mode 100644
index 00000000..118da906
--- /dev/null
+++ b/lib/core/model/labs/request_send_lab_report_email.dart
@@ -0,0 +1,112 @@
+class RequestSendLabReportEmail {
+ 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;
+ String to;
+ String dateofBirth;
+ String patientIditificationNum;
+ String patientMobileNumber;
+ String patientName;
+ String setupID;
+ String projectName;
+ String clinicName;
+ String doctorName;
+ String projectID;
+ String invoiceNo;
+ String orderDate;
+
+ RequestSendLabReportEmail(
+ {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.to,
+ this.dateofBirth,
+ this.patientIditificationNum,
+ this.patientMobileNumber,
+ this.patientName,
+ this.setupID,
+ this.projectName,
+ this.clinicName,
+ this.doctorName,
+ this.projectID,
+ this.invoiceNo,
+ this.orderDate});
+
+ RequestSendLabReportEmail.fromJson(Map json) {
+ 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'];
+ to = json['To'];
+ dateofBirth = json['DateofBirth'];
+ patientIditificationNum = json['PatientIditificationNum'];
+ patientMobileNumber = json['PatientMobileNumber'];
+ patientName = json['PatientName'];
+ setupID = json['SetupID'];
+ projectName = json['ProjectName'];
+ clinicName = json['ClinicName'];
+ doctorName = json['DoctorName'];
+ projectID = json['ProjectID'];
+ invoiceNo = json['InvoiceNo'];
+ orderDate = json['OrderDate'];
+ }
+
+ 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['PatientType'] = this.patientType;
+ data['To'] = this.to;
+ data['DateofBirth'] = this.dateofBirth;
+ data['PatientIditificationNum'] = this.patientIditificationNum;
+ data['PatientMobileNumber'] = this.patientMobileNumber;
+ data['PatientName'] = this.patientName;
+ data['SetupID'] = this.setupID;
+ data['ProjectName'] = this.projectName;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorName'] = this.doctorName;
+ data['ProjectID'] = this.projectID;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['OrderDate'] = this.orderDate;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/perscription_pharmacy.dart b/lib/core/model/prescriptions/perscription_pharmacy.dart
new file mode 100644
index 00000000..5180689f
--- /dev/null
+++ b/lib/core/model/prescriptions/perscription_pharmacy.dart
@@ -0,0 +1,108 @@
+class PharmacyPrescriptions {
+ String expiryDate;
+ double sellingPrice;
+ int quantity;
+ int itemID;
+ int locationID;
+ int projectID;
+ String setupID;
+ String locationDescription;
+ Null locationDescriptionN;
+ String itemDescription;
+ Null itemDescriptionN;
+ String alias;
+ int locationTypeID;
+ int barcode;
+ Null companybarcode;
+ int cityID;
+ String cityName;
+ int distanceInKilometers;
+ String latitude;
+ int locationType;
+ String longitude;
+ String phoneNumber;
+ String projectImageURL;
+ Null sortOrder;
+
+ PharmacyPrescriptions(
+ {this.expiryDate,
+ this.sellingPrice,
+ this.quantity,
+ this.itemID,
+ this.locationID,
+ this.projectID,
+ this.setupID,
+ this.locationDescription,
+ this.locationDescriptionN,
+ this.itemDescription,
+ this.itemDescriptionN,
+ this.alias,
+ this.locationTypeID,
+ this.barcode,
+ this.companybarcode,
+ this.cityID,
+ this.cityName,
+ this.distanceInKilometers,
+ this.latitude,
+ this.locationType,
+ this.longitude,
+ this.phoneNumber,
+ this.projectImageURL,
+ this.sortOrder});
+
+ PharmacyPrescriptions.fromJson(Map json) {
+ expiryDate = json['ExpiryDate'];
+ sellingPrice = json['SellingPrice'];
+ quantity = json['Quantity'];
+ itemID = json['ItemID'];
+ locationID = json['LocationID'];
+ projectID = json['ProjectID'];
+ setupID = json['SetupID'];
+ locationDescription = json['LocationDescription'];
+ locationDescriptionN = json['LocationDescriptionN'];
+ itemDescription = json['ItemDescription'];
+ itemDescriptionN = json['ItemDescriptionN'];
+ alias = json['Alias'];
+ locationTypeID = json['LocationTypeID'];
+ barcode = json['Barcode'];
+ companybarcode = json['Companybarcode'];
+ cityID = json['CityID'];
+ cityName = json['CityName'];
+ distanceInKilometers = json['DistanceInKilometers'];
+ latitude = json['Latitude'];
+ locationType = json['LocationType'];
+ longitude = json['Longitude'];
+ phoneNumber = json['PhoneNumber'];
+ projectImageURL = json['ProjectImageURL'];
+ sortOrder = json['SortOrder'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ExpiryDate'] = this.expiryDate;
+ data['SellingPrice'] = this.sellingPrice;
+ data['Quantity'] = this.quantity;
+ data['ItemID'] = this.itemID;
+ data['LocationID'] = this.locationID;
+ data['ProjectID'] = this.projectID;
+ data['SetupID'] = this.setupID;
+ data['LocationDescription'] = this.locationDescription;
+ data['LocationDescriptionN'] = this.locationDescriptionN;
+ data['ItemDescription'] = this.itemDescription;
+ data['ItemDescriptionN'] = this.itemDescriptionN;
+ data['Alias'] = this.alias;
+ data['LocationTypeID'] = this.locationTypeID;
+ data['Barcode'] = this.barcode;
+ data['Companybarcode'] = this.companybarcode;
+ data['CityID'] = this.cityID;
+ data['CityName'] = this.cityName;
+ data['DistanceInKilometers'] = this.distanceInKilometers;
+ data['Latitude'] = this.latitude;
+ data['LocationType'] = this.locationType;
+ data['Longitude'] = this.longitude;
+ data['PhoneNumber'] = this.phoneNumber;
+ data['ProjectImageURL'] = this.projectImageURL;
+ data['SortOrder'] = this.sortOrder;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart
new file mode 100644
index 00000000..203eaaff
--- /dev/null
+++ b/lib/core/model/prescriptions/prescription_report_enh.dart
@@ -0,0 +1,144 @@
+class PrescriptionReportEnh {
+ String address;
+ int appointmentNo;
+ String clinic;
+ Null companyName;
+ int days;
+ String doctorName;
+ int doseDailyQuantity;
+ String frequency;
+ int frequencyNumber;
+ Null image;
+ Null imageExtension;
+ String imageSRCUrl;
+ Null imageString;
+ String imageThumbUrl;
+ String isCovered;
+ String itemDescription;
+ int itemID;
+ String orderDate;
+ int patientID;
+ String patientName;
+ String phoneOffice1;
+ Null prescriptionQR;
+ int prescriptionTimes;
+ Null productImage;
+ Null productImageBase64;
+ String productImageString;
+ int projectID;
+ String projectName;
+ String remarks;
+ String route;
+ String sKU;
+ int scaleOffset;
+ String startDate;
+
+ 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});
+
+ PrescriptionReportEnh.fromJson(Map json) {
+ address = json['Address'];
+ appointmentNo = json['AppointmentNo'];
+ clinic = json['Clinic'];
+ companyName = json['CompanyName'];
+ days = json['Days'];
+ doctorName = json['DoctorName'];
+ doseDailyQuantity = json['DoseDailyQuantity'];
+ frequency = json['Frequency'];
+ frequencyNumber = json['FrequencyNumber'];
+ image = json['Image'];
+ imageExtension = json['ImageExtension'];
+ imageSRCUrl = json['ImageSRCUrl'];
+ imageString = json['ImageString'];
+ imageThumbUrl = json['ImageThumbUrl'];
+ isCovered = json['IsCovered'];
+ itemDescription = json['ItemDescription'];
+ itemID = json['ItemID'];
+ orderDate = json['OrderDate'];
+ patientID = json['PatientID'];
+ patientName = json['PatientName'];
+ phoneOffice1 = json['PhoneOffice1'];
+ prescriptionQR = json['PrescriptionQR'];
+ prescriptionTimes = json['PrescriptionTimes'];
+ productImage = json['ProductImage'];
+ productImageBase64 = json['ProductImageBase64'];
+ productImageString = json['ProductImageString'];
+ projectID = json['ProjectID'];
+ projectName = json['ProjectName'];
+ remarks = json['Remarks'];
+ route = json['Route'];
+ sKU = json['SKU'];
+ scaleOffset = json['ScaleOffset'];
+ startDate = json['StartDate'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Address'] = this.address;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['Clinic'] = this.clinic;
+ data['CompanyName'] = this.companyName;
+ data['Days'] = this.days;
+ data['DoctorName'] = this.doctorName;
+ data['DoseDailyQuantity'] = this.doseDailyQuantity;
+ data['Frequency'] = this.frequency;
+ data['FrequencyNumber'] = this.frequencyNumber;
+ data['Image'] = this.image;
+ data['ImageExtension'] = this.imageExtension;
+ data['ImageSRCUrl'] = this.imageSRCUrl;
+ data['ImageString'] = this.imageString;
+ data['ImageThumbUrl'] = this.imageThumbUrl;
+ data['IsCovered'] = this.isCovered;
+ data['ItemDescription'] = this.itemDescription;
+ data['ItemID'] = this.itemID;
+ data['OrderDate'] = this.orderDate;
+ data['PatientID'] = this.patientID;
+ data['PatientName'] = this.patientName;
+ data['PhoneOffice1'] = this.phoneOffice1;
+ data['PrescriptionQR'] = this.prescriptionQR;
+ data['PrescriptionTimes'] = this.prescriptionTimes;
+ data['ProductImage'] = this.productImage;
+ data['ProductImageBase64'] = this.productImageBase64;
+ data['ProductImageString'] = this.productImageString;
+ data['ProjectID'] = this.projectID;
+ data['ProjectName'] = this.projectName;
+ data['Remarks'] = this.remarks;
+ data['Route'] = this.route;
+ data['SKU'] = this.sKU;
+ data['ScaleOffset'] = this.scaleOffset;
+ data['StartDate'] = this.startDate;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart
new file mode 100644
index 00000000..739bb838
--- /dev/null
+++ b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart
@@ -0,0 +1,60 @@
+class RequestGetListPharmacyForPrescriptions {
+ int latitude;
+ int longitude;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ String sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+ int itemID;
+
+ RequestGetListPharmacyForPrescriptions(
+ {this.latitude,
+ this.longitude,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID,
+ this.itemID});
+
+ RequestGetListPharmacyForPrescriptions.fromJson(Map json) {
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ 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'];
+ itemID = json['ItemID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ 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['ItemID'] = this.itemID;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/request_prescription_report_enh.dart b/lib/core/model/prescriptions/request_prescription_report_enh.dart
new file mode 100644
index 00000000..42b89c15
--- /dev/null
+++ b/lib/core/model/prescriptions/request_prescription_report_enh.dart
@@ -0,0 +1,84 @@
+class RequestPrescriptionReportEnh {
+ 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 appointmentNo;
+ String setupID;
+ int episodeID;
+ int clinicID;
+ int projectID;
+
+ RequestPrescriptionReportEnh(
+ {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.appointmentNo,
+ this.setupID,
+ this.episodeID,
+ this.clinicID,
+ this.projectID});
+
+ RequestPrescriptionReportEnh.fromJson(Map json) {
+ 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'];
+ appointmentNo = json['AppointmentNo'];
+ setupID = json['SetupID'];
+ episodeID = json['EpisodeID'];
+ clinicID = json['ClinicID'];
+ projectID = json['ProjectID'];
+ }
+
+ 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['PatientType'] = this.patientType;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['SetupID'] = this.setupID;
+ data['EpisodeID'] = this.episodeID;
+ data['ClinicID'] = this.clinicID;
+ data['ProjectID'] = this.projectID;
+ return data;
+ }
+}
diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart
new file mode 100644
index 00000000..2efe4481
--- /dev/null
+++ b/lib/core/model/radiology/final_radiology.dart
@@ -0,0 +1,187 @@
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+
+class FinalRadiology {
+ String setupID;
+ int projectID;
+ Null patientID;
+ int invoiceLineItemNo;
+ int invoiceNo;
+ int doctorID;
+ int clinicID;
+ DateTime orderDate;
+ String reportData;
+ String imageURL;
+ String procedureID;
+ int appointmentNo;
+ Null dIAPacsURL;
+ bool isRead;
+ String readOn;
+ var admissionNo;
+ bool isInOutPatient;
+ int actualDoctorRate;
+ String clinicDescription;
+ String dIAPACSURL;
+ String doctorImageURL;
+ String doctorName;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isExecludeDoctor;
+ String isInOutPatientDescription;
+ String isInOutPatientDescriptionN;
+ String nationalityFlagURL;
+ int noOfPatientsRate;
+ int orderNo;
+ String projectName;
+ String qR;
+ String reportDataHTML;
+ String reportDataTextString;
+ List speciality;
+ bool isCVI;
+ bool isRadMedicalReport;
+
+ FinalRadiology(
+ {this.setupID,
+ this.projectID,
+ this.patientID,
+ this.invoiceLineItemNo,
+ this.invoiceNo,
+ this.doctorID,
+ this.clinicID,
+ this.orderDate,
+ this.reportData,
+ this.imageURL,
+ this.procedureID,
+ this.appointmentNo,
+ this.dIAPacsURL,
+ this.isRead,
+ this.readOn,
+ this.admissionNo,
+ this.isInOutPatient,
+ this.actualDoctorRate,
+ this.clinicDescription,
+ this.dIAPACSURL,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isExecludeDoctor,
+ this.isInOutPatientDescription,
+ this.isInOutPatientDescriptionN,
+ this.nationalityFlagURL,
+ this.noOfPatientsRate,
+ this.orderNo,
+ this.projectName,
+ this.qR,
+ this.reportDataHTML,
+ this.reportDataTextString,
+ this.speciality,
+ this.isCVI,
+ this.isRadMedicalReport});
+
+ FinalRadiology.fromJson(Map json) {
+ try {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ patientID = json['PatientID'];
+ invoiceLineItemNo = json['InvoiceLineItemNo'];
+ invoiceNo = json['InvoiceNo'];
+ doctorID = json['DoctorID'];
+ clinicID = json['ClinicID'];
+ orderDate = DateUtil.convertStringToDate(json['OrderDate']);
+ reportData = json['ReportData'];
+ imageURL = json['ImageURL'];
+ procedureID = json['ProcedureID'];
+ appointmentNo = json['AppointmentNo'];
+ dIAPacsURL = json['DIAPacsURL'];
+ isRead = json['IsRead'];
+ readOn = json['ReadOn'];
+ admissionNo = json['AdmissionNo'];
+ isInOutPatient = json['IsInOutPatient'];
+ actualDoctorRate = json['ActualDoctorRate'];
+ clinicDescription = json['ClinicDescription'];
+ dIAPACSURL = json['DIA_PACS_URL'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ isInOutPatientDescription = json['IsInOutPatientDescription'];
+ isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
+ nationalityFlagURL = json['NationalityFlagURL'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ orderNo = json['OrderNo'];
+ projectName = json['ProjectName'];
+ qR = json['QR'];
+ reportDataHTML = json['ReportDataHTML'];
+ reportDataTextString = json['ReportDataTextString'];
+ // speciality = json['Speciality'].cast();
+ isCVI = json['isCVI'];
+ isRadMedicalReport = json['isRadMedicalReport'];
+ } catch (e) {
+ print(e);
+ }
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['PatientID'] = this.patientID;
+ data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['DoctorID'] = this.doctorID;
+ data['ClinicID'] = this.clinicID;
+ data['OrderDate'] = this.orderDate;
+ data['ReportData'] = this.reportData;
+ data['ImageURL'] = this.imageURL;
+ data['ProcedureID'] = this.procedureID;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['DIAPacsURL'] = this.dIAPacsURL;
+ data['IsRead'] = this.isRead;
+ data['ReadOn'] = this.readOn;
+ data['AdmissionNo'] = this.admissionNo;
+ data['IsInOutPatient'] = this.isInOutPatient;
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['ClinicDescription'] = this.clinicDescription;
+ data['DIA_PACS_URL'] = this.dIAPACSURL;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
+ data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
+ data['NationalityFlagURL'] = this.nationalityFlagURL;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['OrderNo'] = this.orderNo;
+ data['ProjectName'] = this.projectName;
+ data['QR'] = this.qR;
+ data['ReportDataHTML'] = this.reportDataHTML;
+ data['ReportDataTextString'] = this.reportDataTextString;
+ data['Speciality'] = this.speciality;
+ data['isCVI'] = this.isCVI;
+ data['isRadMedicalReport'] = this.isRadMedicalReport;
+ return data;
+ }
+}
+
+class FinalRadiologyList {
+ String filterName = "";
+ List finalRadiologyList = List();
+
+ FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) {
+ finalRadiologyList.add(finalRadiology);
+ }
+}
diff --git a/lib/core/model/radiology/request_patient_rad_orders_details.dart b/lib/core/model/radiology/request_patient_rad_orders_details.dart
new file mode 100644
index 00000000..9e3458d5
--- /dev/null
+++ b/lib/core/model/radiology/request_patient_rad_orders_details.dart
@@ -0,0 +1,92 @@
+class RequestPatientRadOrdersDetails {
+ int projectID;
+ int orderNo;
+ int invoiceNo;
+ String setupID;
+ String procedureID;
+ bool isMedicalReport;
+ bool isCVI;
+ 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;
+
+ RequestPatientRadOrdersDetails(
+ {this.projectID,
+ this.orderNo,
+ this.invoiceNo,
+ this.setupID,
+ this.procedureID,
+ this.isMedicalReport,
+ this.isCVI,
+ 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});
+
+ RequestPatientRadOrdersDetails.fromJson(Map json) {
+ projectID = json['ProjectID'];
+ orderNo = json['OrderNo'];
+ invoiceNo = json['InvoiceNo'];
+ setupID = json['SetupID'];
+ procedureID = json['ProcedureID'];
+ isMedicalReport = json['IsMedicalReport'];
+ isCVI = json['isCVI'];
+ 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'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProjectID'] = this.projectID;
+ data['OrderNo'] = this.orderNo;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['SetupID'] = this.setupID;
+ data['ProcedureID'] = this.procedureID;
+ data['IsMedicalReport'] = this.isMedicalReport;
+ data['isCVI'] = this.isCVI;
+ 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['PatientType'] = this.patientType;
+ return data;
+ }
+}
diff --git a/lib/core/model/radiology/request_send_rad_report_email.dart b/lib/core/model/radiology/request_send_rad_report_email.dart
new file mode 100644
index 00000000..6d68653d
--- /dev/null
+++ b/lib/core/model/radiology/request_send_rad_report_email.dart
@@ -0,0 +1,116 @@
+class RequestSendRadReportEmail {
+ int channel;
+ String clinicName;
+ String dateofBirth;
+ int deviceTypeID;
+ String doctorName;
+ String generalid;
+ int invoiceNo;
+ String iPAdress;
+ bool isDentalAllowedBackend;
+ int languageID;
+ String orderDate;
+ int patientID;
+ String patientIditificationNum;
+ String patientMobileNumber;
+ String patientName;
+ int patientOutSA;
+ int patientType;
+ int patientTypeID;
+ int projectID;
+ String projectName;
+ String radResult;
+ String sessionID;
+ String setupID;
+ String to;
+ String tokenID;
+ double versionID;
+
+ RequestSendRadReportEmail(
+ {this.channel,
+ this.clinicName,
+ this.dateofBirth,
+ this.deviceTypeID,
+ this.doctorName,
+ this.generalid,
+ this.invoiceNo,
+ this.iPAdress,
+ this.isDentalAllowedBackend,
+ this.languageID,
+ this.orderDate,
+ this.patientID,
+ this.patientIditificationNum,
+ this.patientMobileNumber,
+ this.patientName,
+ this.patientOutSA,
+ this.patientType,
+ this.patientTypeID,
+ this.projectID,
+ this.projectName,
+ this.radResult,
+ this.sessionID,
+ this.setupID,
+ this.to,
+ this.tokenID,
+ this.versionID});
+
+ RequestSendRadReportEmail.fromJson(Map json) {
+ channel = json['Channel'];
+ clinicName = json['ClinicName'];
+ dateofBirth = json['DateofBirth'];
+ deviceTypeID = json['DeviceTypeID'];
+ doctorName = json['DoctorName'];
+ generalid = json['generalid'];
+ invoiceNo = json['InvoiceNo'];
+ iPAdress = json['IPAdress'];
+ isDentalAllowedBackend = json['isDentalAllowedBackend'];
+ languageID = json['LanguageID'];
+ orderDate = json['OrderDate'];
+ patientID = json['PatientID'];
+ patientIditificationNum = json['PatientIditificationNum'];
+ patientMobileNumber = json['PatientMobileNumber'];
+ patientName = json['PatientName'];
+ patientOutSA = json['PatientOutSA'];
+ patientType = json['PatientType'];
+ patientTypeID = json['PatientTypeID'];
+ projectID = json['ProjectID'];
+ projectName = json['ProjectName'];
+ radResult = json['RadResult'];
+ sessionID = json['SessionID'];
+ setupID = json['SetupID'];
+ to = json['To'];
+ tokenID = json['TokenID'];
+ versionID = json['VersionID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['Channel'] = this.channel;
+ data['ClinicName'] = this.clinicName;
+ data['DateofBirth'] = this.dateofBirth;
+ data['DeviceTypeID'] = this.deviceTypeID;
+ data['DoctorName'] = this.doctorName;
+ data['generalid'] = this.generalid;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['IPAdress'] = this.iPAdress;
+ data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
+ data['LanguageID'] = this.languageID;
+ data['OrderDate'] = this.orderDate;
+ data['PatientID'] = this.patientID;
+ data['PatientIditificationNum'] = this.patientIditificationNum;
+ data['PatientMobileNumber'] = this.patientMobileNumber;
+ data['PatientName'] = this.patientName;
+ data['PatientOutSA'] = this.patientOutSA;
+ data['PatientType'] = this.patientType;
+ data['PatientTypeID'] = this.patientTypeID;
+ data['ProjectID'] = this.projectID;
+ data['ProjectName'] = this.projectName;
+ data['RadResult'] = this.radResult;
+ data['SessionID'] = this.sessionID;
+ data['SetupID'] = this.setupID;
+ data['To'] = this.to;
+ data['TokenID'] = this.tokenID;
+ data['VersionID'] = this.versionID;
+ return data;
+ }
+}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index a412b035..651650cf 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -14,17 +14,31 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// body: null);
class BaseAppClient {
- post(
- String endPoint, {
- Map body,
- Function(dynamic response, int statusCode) onSuccess,
- Function(String error, int statusCode) onFailure,
- }) async {
+ post(String endPoint,
+ {Map body,
+ Function(dynamic response, int statusCode) onSuccess,
+ Function(String error, int statusCode) onFailure,
+ bool isAllowAny = false}) async {
String url = BASE_URL + endPoint;
try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// String token = await sharedPref.getString(TOKEN);
+ body['SetupID'] = SETUP_ID;
+ body['VersionID'] = VERSION_ID;
+ body['Channel'] = CHANNEL;
+ body['LanguageID'] = LANGUAGE;
+ body['IPAdress'] = IP_ADDRESS;
+ body['generalid'] = GENERAL_ID;
+ body['PatientOutSA'] = PATIENT_OUT_SA;
+ body['SessionID'] = SESSION_ID;
+ body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
+ body['DeviceTypeID'] = DeviceTypeID;
+ body['PatientType'] = PATIENT_TYPE;
+ body['PatientTypeID'] = PATIENT_TYPE_ID;
+ body['TokenID'] = '@dm!n';
+ body['PatientID'] = 1231755;
+
print("URL : $url");
print("Body : ${json.encode(body)}");
diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart
new file mode 100644
index 00000000..eaf2f94a
--- /dev/null
+++ b/lib/core/service/feedback/feedback_service.dart
@@ -0,0 +1,65 @@
+import 'dart:io';
+
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
+import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+
+class FeedbackService extends BaseService {
+ List cOCItemList = List();
+ RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
+
+ Future sendCOCItem(
+ {String title,
+ String details,
+ String cOCTypeName,
+ String attachment}) async {
+ hasError = false;
+
+ _requestInsertCOCItem.attachment = attachment;
+ _requestInsertCOCItem.title = title;
+ _requestInsertCOCItem.details = details;
+ _requestInsertCOCItem.cOCTypeName = cOCTypeName;
+ _requestInsertCOCItem.formTypeID = cOCTypeName;
+ _requestInsertCOCItem.mobileNo =
+ "966537503378"; //TODO Change it to be dynamic
+ _requestInsertCOCItem.isUserLoggedIn = true;
+ _requestInsertCOCItem.projectID = 1231755;
+ _requestInsertCOCItem.patientName = "TAMER FANASHEH";
+ _requestInsertCOCItem.fileName = "";
+ _requestInsertCOCItem.uILanguage = "ar"; //TODO Change it to be dynamic
+ _requestInsertCOCItem.browserInfo = Platform.localHostname;
+ _requestInsertCOCItem.deviceInfo = Platform.localHostname;
+ _requestInsertCOCItem.resolution = "400x847";
+ _requestInsertCOCItem.projectID = 0;
+ _requestInsertCOCItem.identificationNo = 2344670985;
+
+ await baseAppClient
+ .post(SEND_FEEDBACK, onSuccess: (dynamic response, int statusCode) {
+ var asd = "";
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestInsertCOCItem.toJson());
+ }
+
+ Future getStatusCOC() async {
+ hasError = false;
+ Map body = new Map();
+ body['IdentificationNo'] = '2344670985';
+ body['MobileNo'] = '966537503378';
+ body['Searching_type'] = '1';
+
+ await baseAppClient.post(GET_STATUS_FOR_COCO,
+ onSuccess: (dynamic response, int statusCode) {
+ cOCItemList = [];
+ response['ListCOCItems'].forEach((cOC) {
+ cOCItemList.add(COCItem.fromJson(cOC));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+}
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
new file mode 100644
index 00000000..6f0d2142
--- /dev/null
+++ b/lib/core/service/insurance_service.dart
@@ -0,0 +1,112 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
+
+class InsuranceCardService extends BaseService {
+ List _cardList = List();
+ List _cardUpdated = List();
+ List _insuranceApproval = List();
+
+ List get cardList => _cardList;
+ List get updatedCard => _cardUpdated;
+ List get insuranceApproval => _insuranceApproval;
+
+ clearInsuranceCard() {
+ _cardList.clear();
+ }
+
+ clearUpdatedList() {
+ _cardUpdated.clear();
+ }
+
+ InsuranceCardModel _insuranceCardModel = InsuranceCardModel(
+ channel: 3,
+ deviceTypeID: 2,
+ generalid: "Cs2020@2016\$2958",
+ iPAdress: "10.20.10.20",
+ isDentalAllowedBackend: false,
+ languageID: 1,
+ patientID: 1231755,
+ patientOutSA: 0,
+ patientType: 1,
+ patientTypeID: 1,
+ sessionID: "uoKFXSLUwEaHYPwKZNA",
+ tokenID: "@dm!n",
+ versionID: 5.5,
+ );
+
+ InsuranceUpdateModel _insuranceUpdateModel = InsuranceUpdateModel(
+ channel: 3,
+ deviceTypeID: 2,
+ generalid: "Cs2020@2016\$2958",
+ iPAdress: "10.20.10.20",
+ isDentalAllowedBackend: false,
+ patientID: 1231755,
+ patientType: 1,
+ versionID: 5.5,
+ languageID: 2,
+ patientOutSA: 0,
+ sessionID: "ENRSJBKXnzCuuVQ",
+ );
+
+ InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
+ versionID: 5.5,
+ channel: 3,
+ languageID: LANGUAGE_ID,
+ iPAdress: "10.20.10.20",
+ generalid: "Cs2020@2016\$2958",
+ patientOutSA: 0,
+ sessionID: "DypNmtMkivzURHjeYg",
+ isDentalAllowedBackend: false,
+ deviceTypeID: 2,
+ patientID: 1231755,
+ tokenID: "@dm!n",
+ 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) {
+ response['List_PatientInsuranceCard'].forEach((item) {
+ _cardList.add(InsuranceCardModel.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _insuranceCardModel.toJson());
+ }
+
+ Future getInsuranceUpdate() async {
+ hasError = false;
+ // _cardList.clear();
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED,
+ onSuccess: (dynamic response, int statusCode) {
+ response['List_PatientInsuranceCardHistory'].forEach((item) {
+ _cardUpdated.add(InsuranceUpdateModel.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _insuranceUpdateModel.toJson());
+ }
+
+ Future getInsuranceApproval() async {
+ hasError = false;
+ // _cardList.clear();
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['HIS_Approval_List'].forEach((item) {
+ _insuranceApproval.add(InsuranceApprovalModel.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _insuranceApprovalModel.toJson());
+ }
+}
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
new file mode 100644
index 00000000..cad5696a
--- /dev/null
+++ b/lib/core/service/medical/labs_service.dart
@@ -0,0 +1,91 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_appointmentt.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_special_result.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+class LabsService extends BaseService {
+
+
+ RequestPatientLabOrders _requestPatientLabOrders = RequestPatientLabOrders();
+ List patientLabOrdersList = List();
+
+
+ Future getPatientLabOrdersList() async {
+ await baseAppClient.post(GET_Patient_LAB_ORDERS,
+ onSuccess: (dynamic response, int statusCode) {
+ patientLabOrdersList.clear();
+ response['ListPLO'].forEach((hospital) {
+ patientLabOrdersList
+ .add(PatientLabOrders.fromJson(hospital));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestPatientLabOrders.toJson());
+ }
+
+
+ RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
+
+
+ List patientLabSpecialResult = List();
+
+ Future getLaboratoryResult(
+ {String projectID, int clinicID, String invoiceNo, String orderNo}) async {
+ hasError = false;
+ _requestPatientLabSpecialResult.projectID = projectID;
+ _requestPatientLabSpecialResult.clinicID = clinicID;
+ _requestPatientLabSpecialResult.invoiceNo = invoiceNo;//'1800296522';//;
+ _requestPatientLabSpecialResult.orderNo = orderNo;
+
+ await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
+ onSuccess: (dynamic response, int statusCode) {
+ patientLabSpecialResult.clear();
+ response['ListPLSR'].forEach((hospital) {
+ patientLabSpecialResult
+ .add(PatientLabSpecialResult.fromJson(hospital));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestPatientLabSpecialResult.toJson());
+ }
+
+ RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
+
+ Future sendLabReportEmail(
+ {PatientLabOrders patientLabOrder}) async {
+
+ _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
+ _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
+ _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
+ _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
+ _requestSendLabReportEmail.patientName = 'Tamer';//TODO Change it
+ _requestSendLabReportEmail.patientIditificationNum = '2344670985';//TODO change it
+ _requestSendLabReportEmail.dateofBirth = '/Date(536743800000+0300)/';//TODO change it
+ _requestSendLabReportEmail.to = 'Tamer.fanasheh@gmail.com';//TODO change it
+ _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
+ _requestSendLabReportEmail.patientMobileNumber = '537503378';//TODO change it
+ _requestSendLabReportEmail.projectName = patientLabOrder.projectName;
+
+ await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
+ onSuccess: (dynamic response, int statusCode) {
+ AppToast.showSuccessToast(message: 'A copy has been sent to the email');
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestSendLabReportEmail.toJson());
+ }
+
+
+}
diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart
index 3e7259f7..294ef897 100644
--- a/lib/core/service/medical/prescriptions_service.dart
+++ b/lib/core/service/medical/prescriptions_service.dart
@@ -1,8 +1,12 @@
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_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
+import 'package:diplomaticquarterapp/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report.dart';
+import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart';
@@ -137,13 +141,83 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.projectID = projectID;
hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL,
- onSuccess: (dynamic response, int statusCode){
- var asd = "";
-
- },
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
+
+ RequestGetListPharmacyForPrescriptions
+ requestGetListPharmacyForPrescriptions =
+ RequestGetListPharmacyForPrescriptions(
+ latitude: 0,
+ longitude: 0,
+ versionID: 5.5,
+ channel: 3,
+ languageID: 2,
+ iPAdress: '10.20.10.20',
+ generalid: 'Cs2020@2016\$2958',
+ patientOutSA: 0,
+ sessionID: 'HGNerTUSXhpaHXBg',
+ isDentalAllowedBackend: false,
+ deviceTypeID: 2,
+ );
+ List pharmacyPrescriptionsList = List();
+
+ Future getListPharmacyForPrescriptions({int itemId}) async {
+ hasError = false;
+ requestGetListPharmacyForPrescriptions.itemID = itemId;
+ await baseAppClient.post(GET_PHARMACY_LIST,
+ onSuccess: (dynamic response, int statusCode) {
+ pharmacyPrescriptionsList.clear();
+ response['PharmList'].forEach((prescriptions) {
+ pharmacyPrescriptionsList
+ .add(PharmacyPrescriptions.fromJson(prescriptions));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: requestGetListPharmacyForPrescriptions.toJson());
+ }
+
+
+ RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh(
+ versionID: 5.5,
+ channel: 3,
+ languageID: 2,
+ iPAdress: '10.20.10.20',
+ generalid: 'Cs2020@2016\$2958',
+ patientOutSA: 0,
+ sessionID: 'bQQdesEKpyYKTFMVNeg',
+ isDentalAllowedBackend: false,
+ deviceTypeID: 2,
+ patientID: 1231755,
+ tokenID: '@dm!n',
+ patientTypeID: 1,
+ patientType: 1,
+ setupID: '91877',
+ appointmentNo: 5926390,
+ episodeID: 140251928,
+ clinicID: 25,
+ projectID: 12
+
+ );
+
+ List prescriptionReportEnhList = List();
+ Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder})async{
+ hasError = false;
+ // _requestPrescriptionReportEnh.appointmentNo = int.parse(prescriptionsOrder.appointmentNo);
+ // _requestPrescriptionReportEnh.patientID = prescriptionsOrder.projectID;
+
+ await baseAppClient.post(GET_PRESCRIPTION_REPORT_ENH,
+ onSuccess: (dynamic response, int statusCode) {
+ prescriptionReportEnhList.clear();
+ response['ListPRM'].forEach((prescriptions) {
+ prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestPrescriptionReportEnh.toJson());
+ }
}
diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart
new file mode 100644
index 00000000..e14206d5
--- /dev/null
+++ b/lib/core/service/medical/radiology_service.dart
@@ -0,0 +1,98 @@
+import 'package:diplomaticquarterapp/config/config.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_appointmentt.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart';
+import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_special_result.dart';
+import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart';
+import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
+import 'package:diplomaticquarterapp/core/model/radiology/request_send_rad_report_email.dart';
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+class RadiologyService extends BaseService {
+ List finalRadiologyList = List();
+ String url = '';
+
+ Future getRadImageURL({int invoiceNo, int lineItem,int projectId}) async {
+ hasError = false;
+ final Map body = new Map();
+ body['InvoiceNo'] = invoiceNo;
+ body['LineItemNo'] = lineItem;
+ body['ProjectID'] = projectId;
+
+ await baseAppClient.post(GET_RAD_IMAGE_URL,
+ isAllowAny: true,
+ onSuccess: (dynamic response, int statusCode) {
+ url = response['Data'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future getPatientRadOrders () async {
+ hasError = false;
+ await baseAppClient.post(GET_PATIENT_ORDERS,
+ onSuccess: (dynamic response, int statusCode) {
+ finalRadiologyList.clear();
+ response['FinalRadiologyList'].forEach((radiology) {
+ finalRadiologyList.add(FinalRadiology.fromJson(radiology));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+ Future getPatientRadOrdersDetails() async {
+ hasError = false;
+ await baseAppClient.post(GET_PATIENT_ORDERS,
+ onSuccess: (dynamic response, int statusCode) {
+ finalRadiologyList.clear();
+ response['FinalRadiologyList'].forEach((radiology) {
+ finalRadiologyList.add(FinalRadiology.fromJson(radiology));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: Map());
+ }
+
+ RequestSendRadReportEmail _requestSendRadReportEmail =
+ RequestSendRadReportEmail();
+
+ Future sendRadReportEmail(
+ {FinalRadiology finalRadiology}) async {
+ _requestSendRadReportEmail.projectID = finalRadiology.projectID;
+ _requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription;
+ _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo;
+ _requestSendRadReportEmail.setupID = finalRadiology.setupID;
+ _requestSendRadReportEmail.doctorName = finalRadiology.doctorName;
+ _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate.year}-${finalRadiology.orderDate.month}-${finalRadiology.orderDate.day}';
+ _requestSendRadReportEmail.patientIditificationNum = '2344670985';//TODO change it
+ _requestSendRadReportEmail.patientMobileNumber = '537503378';//TODO change it
+ _requestSendRadReportEmail.patientName = 'TAMER FANASHE';//TODO change it
+ _requestSendRadReportEmail.patientIditificationNum = '2344670985';//TODO change it
+ _requestSendRadReportEmail.projectName = finalRadiology.projectName;
+ _requestSendRadReportEmail.radResult = 'asd';//finalRadiology.reportData;
+ _requestSendRadReportEmail.to = 'Tamer.fanasheh@gmail.com';
+ _requestSendRadReportEmail.dateofBirth = '/Date(536743800000+0300)/';
+
+ hasError = false;
+ await baseAppClient.post(SEND_RAD_REPORT_EMAIL,
+ isAllowAny: true,
+ onSuccess: (dynamic response, int statusCode) {
+
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: _requestSendRadReportEmail.toJson());
+ }
+}
diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart
new file mode 100644
index 00000000..1176caf7
--- /dev/null
+++ b/lib/core/viewModels/feedback/feedback_view_model.dart
@@ -0,0 +1,44 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
+import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+
+import '../../../locator.dart';
+
+class FeedbackViewModel extends BaseViewModel {
+ FeedbackService _feedbackService = locator();
+
+ List get cOCItemList => _feedbackService.cOCItemList;
+
+ Future sendCOCItem(
+ {String title,
+ String details,
+ String cOCTypeName,
+ String attachment}) async {
+ setState(ViewState.BusyLocal);
+ await _feedbackService.sendCOCItem(
+ title: title,
+ details: details,
+ cOCTypeName: cOCTypeName,
+ attachment: attachment);
+ if (_feedbackService.hasError) {
+ error = _feedbackService.error;
+ setState(ViewState.ErrorLocal);
+ return false;
+ } else {
+ setState(ViewState.Idle);
+ return true;
+ }
+ }
+
+ getCOC() async {
+ setState(ViewState.Busy);
+ await _feedbackService.getStatusCOC();
+ if (_feedbackService.hasError) {
+ error = _feedbackService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+}
diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart
new file mode 100644
index 00000000..1d13257f
--- /dev/null
+++ b/lib/core/viewModels/insurance_card_View_model.dart
@@ -0,0 +1,57 @@
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
+import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
+
+import 'base_view_model.dart';
+import '../../locator.dart';
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
+import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
+
+class InsuranceViewModel extends BaseViewModel {
+ bool hasError = false;
+
+ InsuranceCardService _insuranceCardService = locator();
+
+ List get insurance => _insuranceCardService.cardList;
+ List get insuranceUpdate =>
+ _insuranceCardService.updatedCard;
+ List get insuranceApproval =>
+ _insuranceCardService.insuranceApproval;
+
+ Future getInsurance() async {
+ hasError = false;
+ _insuranceCardService.clearInsuranceCard();
+ setState(ViewState.Busy);
+ await _insuranceCardService.getInsurance();
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future getInsuranceUpdated() async {
+ hasError = false;
+ //_insuranceCardService.clearInsuranceCard();
+ setState(ViewState.Busy);
+ await _insuranceCardService.getInsuranceUpdate();
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ Future getInsuranceApproval() async {
+ hasError = false;
+ //_insuranceCardService.clearInsuranceCard();
+ setState(ViewState.Busy);
+ await _insuranceCardService.getInsuranceApproval();
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
+}
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
new file mode 100644
index 00000000..1efdfb7c
--- /dev/null
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -0,0 +1,106 @@
+
+import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
+import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
+
+import '../../../locator.dart';
+import '../base_view_model.dart';
+
+class LabsViewModel extends BaseViewModel {
+ FilterType filterType = FilterType.Clinic;
+ LabsService _labsService = locator();
+
+ List _patientLabOrdersListClinic = List();
+ List _patientLabOrdersListHospital = List();
+
+ List get patientLabOrdersList =>
+ filterType == FilterType.Clinic
+ ? _patientLabOrdersListClinic
+ : _patientLabOrdersListHospital;
+
+ void getLabs() async {
+ setState(ViewState.Busy);
+ await _labsService.getPatientLabOrdersList();
+ if (_labsService.hasError) {
+ error = _labsService.error;
+ setState(ViewState.Error);
+ } else {
+ _labsService.patientLabOrdersList.forEach((element) {
+ List patientLabOrdersClinic =
+ _patientLabOrdersListClinic
+ .where((elementClinic) =>
+ elementClinic.filterName == element.clinicDescription)
+ .toList();
+
+ if (patientLabOrdersClinic.length != 0) {
+ _patientLabOrdersListClinic[_patientLabOrdersListClinic
+ .indexOf(patientLabOrdersClinic[0])]
+ .patientLabOrdersList
+ .add(element);
+ } else {
+ _patientLabOrdersListClinic.add(PatientLabOrdersList(
+ filterName: element.clinicDescription,
+ patientDoctorAppointment: element));
+ }
+
+ // doctor list sort via project
+ List patientLabOrdersHospital =
+ _patientLabOrdersListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.projectName,
+ )
+ .toList();
+
+ if (patientLabOrdersHospital.length != 0) {
+ _patientLabOrdersListHospital[_patientLabOrdersListHospital
+ .indexOf(patientLabOrdersHospital[0])]
+ .patientLabOrdersList
+ .add(element);
+ } else {
+ _patientLabOrdersListHospital.add(PatientLabOrdersList(
+ filterName: element.projectName,
+ patientDoctorAppointment: element));
+ }
+ });
+
+ setState(ViewState.Idle);
+ }
+ }
+
+ setFilterType(FilterType filterType) {
+ this.filterType = filterType;
+ notifyListeners();
+ }
+
+ List get patientLabSpecialResult =>
+ _labsService.patientLabSpecialResult;
+
+ getLaboratoryResult(
+ {String projectID,
+ int clinicID,
+ String invoiceNo,
+ String orderNo}) async {
+ setState(ViewState.Busy);
+ await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,orderNo: orderNo,projectID: projectID,clinicID: clinicID);
+ if (_labsService.hasError) {
+ error = _labsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+ sendLabReportEmail({PatientLabOrders patientLabOrder}) async {
+ setState(ViewState.Busy);
+ await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder);
+ if (_labsService.hasError) {
+ error = _labsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+}
diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart
index 6ad25380..f67df015 100644
--- a/lib/core/viewModels/medical/prescriptions_view_model.dart
+++ b/lib/core/viewModels/medical/prescriptions_view_model.dart
@@ -1,11 +1,13 @@
+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_enh.dart';
+import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
import '../../../core/model/prescriptions/Prescriptions.dart';
import '../../../core/service/medical/prescriptions_service.dart';
-
import '../../../locator.dart';
import '../base_view_model.dart';
@@ -16,12 +18,18 @@ class PrescriptionsViewModel extends BaseViewModel {
List _prescriptionsOrderListClinic = List();
List _prescriptionsOrderListHospital = List();
+
List get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List get prescriptionsList =>
_prescriptionsService.prescriptionsList;
+ List get prescriptionsHistory => _prescriptionsService.prescriptionsOrderList;
+
+ List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList ;
+
+
List get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
@@ -105,7 +113,7 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
- sendPrescriptionEmail(
+ sendPrescriptionEmail(
{String appointmentDate,
int patientID,
String clinicName,
@@ -124,5 +132,29 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
+ getListPharmacyForPrescriptions({int itemId}) async {
+ setState(ViewState.Busy);
+ await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId);
+ if (_prescriptionsService.hasError) {
+ error = _prescriptionsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
+
+
+ List get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
+
+ getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
+ setState(ViewState.Busy);
+ await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder);
+ if (_prescriptionsService.hasError) {
+ error = _prescriptionsService.error;
+ setState(ViewState.Error);
+ } else {
+ setState(ViewState.Idle);
+ }
+ }
}
diff --git a/lib/core/viewModels/medical/radiology_view_model.dart b/lib/core/viewModels/medical/radiology_view_model.dart
new file mode 100644
index 00000000..26d40361
--- /dev/null
+++ b/lib/core/viewModels/medical/radiology_view_model.dart
@@ -0,0 +1,101 @@
+import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
+import 'package:diplomaticquarterapp/core/service/medical/radiology_service.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+
+import '../../../locator.dart';
+import '../base_view_model.dart';
+
+class RadiologyViewModel extends BaseViewModel {
+ FilterType filterType = FilterType.Clinic;
+ RadiologyService _radiologyService = locator();
+
+ List _finalRadiologyListClinic = List();
+ List _finalRadiologyListHospital = List();
+
+ List get finalRadiologyList =>
+ filterType == FilterType.Clinic
+ ? _finalRadiologyListClinic
+ : _finalRadiologyListHospital;
+
+ void getPatientRadOrders() async {
+ setState(ViewState.Busy);
+ await _radiologyService.getPatientRadOrders();
+ if (_radiologyService.hasError) {
+ error = _radiologyService.error;
+ setState(ViewState.Error);
+ } else {
+ _radiologyService.finalRadiologyList.forEach((element) {
+ List finalRadiologyListClinic =
+ _finalRadiologyListClinic
+ .where((elementClinic) =>
+ elementClinic.filterName == element.clinicDescription)
+ .toList();
+
+ if (finalRadiologyListClinic.length != 0) {
+ _finalRadiologyListClinic[
+ finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])]
+ .finalRadiologyList
+ .add(element);
+ } else {
+ _finalRadiologyListClinic.add(FinalRadiologyList(
+ filterName: element.clinicDescription, finalRadiology: element));
+ }
+
+ // FinalRadiologyList list sort via project
+ List finalRadiologyListHospital =
+ _finalRadiologyListHospital
+ .where(
+ (elementClinic) =>
+ elementClinic.filterName == element.projectName,
+ )
+ .toList();
+
+ if (finalRadiologyListHospital.length != 0) {
+ _finalRadiologyListHospital[finalRadiologyListHospital
+ .indexOf(finalRadiologyListHospital[0])]
+ .finalRadiologyList
+ .add(element);
+ } else {
+ _finalRadiologyListHospital.add(FinalRadiologyList(
+ filterName: element.projectName, finalRadiology: element));
+ }
+ });
+
+ setState(ViewState.Idle);
+ }
+ }
+
+ String get radImageURL => _radiologyService.url;
+
+ getRadImageURL({int invoiceNo, int lineItem,int projectId}) async {
+ setState(ViewState.Busy);
+ await _radiologyService.getRadImageURL(invoiceNo: invoiceNo,lineItem: lineItem,projectId: projectId);
+ if (_radiologyService.hasError) {
+ error = _radiologyService.error;
+ setState(ViewState.Error);
+ } else
+ setState(ViewState.Idle);
+ }
+
+ sendRadReportEmail(
+ {FinalRadiology finalRadiology}) async {
+ setState(ViewState.BusyLocal);
+ await _radiologyService.sendRadReportEmail(
+ finalRadiology: finalRadiology
+ );
+ if (_radiologyService.hasError) {
+ error = _radiologyService.error;
+ AppToast.showErrorToast(message: error);
+ } else {
+ AppToast.showSuccessToast(message: 'A copy has been sent to the email');
+ }
+ setState(ViewState.Idle);
+ }
+
+ setFilterType(FilterType filterType) {
+ this.filterType = filterType;
+ notifyListeners();
+ }
+}
diff --git a/lib/locator.dart b/lib/locator.dart
index 92d89283..5806ca70 100644
--- a/lib/locator.dart
+++ b/lib/locator.dart
@@ -1,14 +1,22 @@
import 'package:diplomaticquarterapp/routes.dart';
import 'package:get_it/get_it.dart';
+import 'core/service/feedback/feedback_service.dart';
import 'core/service/hospital_service.dart';
+import 'core/service/medical/labs_service.dart';
import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart';
+import 'core/service/medical/radiology_service.dart';
+import 'core/viewModels/feedback/feedback_view_model.dart';
import 'core/viewModels/hospital_view_model.dart';
+import 'core/viewModels/medical/labs_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart';
+import 'core/viewModels/medical/radiology_view_model.dart';
import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart';
+import 'core/service/insurance_service.dart';
+import 'core/viewModels/insurance_card_View_model.dart';
GetIt locator = GetIt.instance;
@@ -19,10 +27,19 @@ void setupLocator() {
locator.registerLazySingleton(() => PharmacyService());
locator.registerLazySingleton(() => MyDoctorService());
locator.registerLazySingleton(() => PrescriptionsService());
+ locator.registerLazySingleton(() => LabsService());
+ locator.registerLazySingleton(() => RadiologyService());
+ locator.registerLazySingleton(() => FeedbackService());
+ locator.registerLazySingleton(() => InsuranceCardService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
locator.registerFactory(() => PharmacyViewModel());
locator.registerFactory(() => MyDoctorViewModel());
locator.registerFactory(() => PrescriptionsViewModel());
+ locator.registerFactory(() => LabsViewModel());
+ locator.registerFactory(() => RadiologyViewModel());
+ locator.registerFactory(() => FeedbackViewModel());
+
+ locator.registerFactory(() => InsuranceViewModel());
}
diff --git a/lib/models/Authentication/check_activation_code_request.dart b/lib/models/Authentication/check_activation_code_request.dart
index 71440dc4..a4bf79c3 100644
--- a/lib/models/Authentication/check_activation_code_request.dart
+++ b/lib/models/Authentication/check_activation_code_request.dart
@@ -22,7 +22,7 @@ class CheckActivationCodeReq {
Null sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
-
+ bool forRegisteration;
CheckActivationCodeReq(
{this.patientMobileNumber,
this.mobileNo,
@@ -46,7 +46,8 @@ class CheckActivationCodeReq {
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
- this.deviceTypeID});
+ this.deviceTypeID,
+ this.forRegisteration});
CheckActivationCodeReq.fromJson(Map json) {
patientMobileNumber = json['PatientMobileNumber'];
@@ -72,6 +73,7 @@ class CheckActivationCodeReq {
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
+ forRegisteration = json['ForRegisteration'];
}
Map toJson() {
@@ -99,6 +101,7 @@ class CheckActivationCodeReq {
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
+ data['ForRegisteration'] = this.forRegisteration;
return data;
}
}
diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart
new file mode 100644
index 00000000..ebefcfcf
--- /dev/null
+++ b/lib/models/Authentication/register_user_requet.dart
@@ -0,0 +1,151 @@
+class RegisterUserRequest {
+ Patientobject patientobject;
+ String patientIdentificationID;
+ int patientMobileNumber;
+ String logInTokenID;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ Null sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+
+ RegisterUserRequest(
+ {this.patientobject,
+ this.patientIdentificationID,
+ this.patientMobileNumber,
+ this.logInTokenID,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID});
+
+ RegisterUserRequest.fromJson(Map json) {
+ patientobject = json['Patientobject'] != null
+ ? new Patientobject.fromJson(json['Patientobject'])
+ : null;
+ patientIdentificationID = json['PatientIdentificationID'];
+ patientMobileNumber = json['PatientMobileNumber'];
+ logInTokenID = json['LogInTokenID'];
+ 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'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.patientobject != null) {
+ data['Patientobject'] = this.patientobject.toJson();
+ }
+ data['PatientIdentificationID'] = this.patientIdentificationID;
+ data['PatientMobileNumber'] = this.patientMobileNumber;
+ data['LogInTokenID'] = this.logInTokenID;
+ 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;
+ return data;
+ }
+}
+
+class Patientobject {
+ bool tempValue;
+ int patientIdentificationType;
+ String patientIdentificationNo;
+ int mobileNumber;
+ int patientOutSA;
+ String firstName;
+ String middleName;
+ String lastName;
+ dynamic strDateofBirth;
+ String dateofBirth;
+ int gender;
+ String nationalityID;
+ String dateofBirthN;
+ String emailAddress;
+ String sourceType;
+ String preferredLanguage;
+ String marital;
+
+ Patientobject(
+ {this.tempValue,
+ this.patientIdentificationType,
+ this.patientIdentificationNo,
+ this.mobileNumber,
+ this.patientOutSA,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.strDateofBirth,
+ this.dateofBirth,
+ this.gender,
+ this.nationalityID,
+ this.dateofBirthN,
+ this.emailAddress,
+ this.sourceType,
+ this.preferredLanguage,
+ this.marital});
+
+ Patientobject.fromJson(Map json) {
+ tempValue = json['TempValue'];
+ patientIdentificationType = json['PatientIdentificationType'];
+ patientIdentificationNo = json['PatientIdentificationNo'];
+ mobileNumber = json['MobileNumber'];
+ patientOutSA = json['PatientOutSA'];
+ firstName = json['FirstName'];
+ middleName = json['MiddleName'];
+ lastName = json['LastName'];
+ strDateofBirth = json['StrDateofBirth'];
+ dateofBirth = json['DateofBirth'];
+ gender = json['Gender'];
+ nationalityID = json['NationalityID'];
+ dateofBirthN = json['DateofBirthN'];
+ emailAddress = json['EmailAddress'];
+ sourceType = json['SourceType'];
+
+ preferredLanguage = json['PreferredLanguage'];
+ marital = json['Marital'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['TempValue'] = this.tempValue;
+ data['PatientIdentificationType'] = this.patientIdentificationType;
+ data['PatientIdentificationNo'] = this.patientIdentificationNo;
+ data['MobileNumber'] = this.mobileNumber;
+ data['PatientOutSA'] = this.patientOutSA;
+ data['FirstName'] = this.firstName;
+ data['MiddleName'] = this.middleName;
+ data['LastName'] = this.lastName;
+ data['StrDateofBirth'] = this.strDateofBirth;
+ data['DateofBirth'] = this.dateofBirth;
+ data['Gender'] = this.gender;
+ data['NationalityID'] = this.nationalityID;
+ data['DateofBirthN'] = this.dateofBirthN;
+ data['EmailAddress'] = this.emailAddress;
+ data['SourceType'] = this.sourceType;
+
+ data['PreferredLanguage'] = this.preferredLanguage;
+ data['Marital'] = this.marital;
+ return data;
+ }
+}
diff --git a/lib/models/Authentication/registered_authenticated_user_req.dart b/lib/models/Authentication/registered_authenticated_user_req.dart
new file mode 100644
index 00000000..c261d062
--- /dev/null
+++ b/lib/models/Authentication/registered_authenticated_user_req.dart
@@ -0,0 +1,104 @@
+class RegisteredAuthenticatedUserRequest {
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ String sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+ int patientID;
+ String tokenID;
+ String voipToken;
+ int patientTypeID;
+ int patientType;
+ String deviceToken;
+ String deviceType;
+ String patientMobileNumber;
+ String nationalID;
+ int gender;
+ int loginType;
+ String mACAddress;
+ int latitude;
+ int longitude;
+
+ RegisteredAuthenticatedUserRequest(
+ {this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID,
+ this.patientID,
+ this.tokenID,
+ this.voipToken,
+ this.patientTypeID,
+ this.patientType,
+ this.deviceToken,
+ this.deviceType,
+ this.patientMobileNumber,
+ this.nationalID,
+ this.gender,
+ this.loginType,
+ this.mACAddress,
+ this.latitude,
+ this.longitude});
+
+ RegisteredAuthenticatedUserRequest.fromJson(Map json) {
+ 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'];
+ voipToken = json['VoipToken'];
+ patientTypeID = json['PatientTypeID'];
+ patientType = json['PatientType'];
+ deviceToken = json['DeviceToken'];
+ deviceType = json['DeviceType'];
+ patientMobileNumber = json['PatientMobileNumber'];
+ nationalID = json['NationalID'];
+ gender = json['Gender'];
+ loginType = json['LoginType'];
+ mACAddress = json['MACAddress'];
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ }
+
+ 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['VoipToken'] = this.voipToken;
+ data['PatientTypeID'] = this.patientTypeID;
+ data['PatientType'] = this.patientType;
+ data['DeviceToken'] = this.deviceToken;
+ data['DeviceType'] = this.deviceType;
+ data['PatientMobileNumber'] = this.patientMobileNumber;
+ data['NationalID'] = this.nationalID;
+ data['Gender'] = this.gender;
+ data['LoginType'] = this.loginType;
+ data['MACAddress'] = this.mACAddress;
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ return data;
+ }
+}
diff --git a/lib/pages/base/base_view.dart b/lib/pages/base/base_view.dart
index 3ed2baad..f6853123 100644
--- a/lib/pages/base/base_view.dart
+++ b/lib/pages/base/base_view.dart
@@ -35,4 +35,10 @@ class _BaseViewState extends State> {
child: Consumer(builder: widget.builder),
);
}
+
+ @override
+ void dispose() {
+ if (model != null) model = null;
+ super.dispose();
+ }
}
diff --git a/lib/pages/family/my-family.dart b/lib/pages/family/my-family.dart
new file mode 100644
index 00000000..9d1a39e9
--- /dev/null
+++ b/lib/pages/family/my-family.dart
@@ -0,0 +1,51 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
+import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/routes.dart';
+
+class MyFamily extends StatefulWidget {
+ @override
+ _MyFamily createState() => _MyFamily();
+}
+
+class _MyFamily extends State {
+ bool isLoading = true;
+ @override
+ void initState() {
+ isLoading = true;
+ // checkUser(context);
+ super.initState();
+ }
+
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ appBarTitle: TranslationBase.of(context).myFamilyFiles,
+ isShowAppBar: true,
+ body: SingleChildScrollView(
+ padding: EdgeInsets.all(20),
+ child: Stack(
+ children: [
+ TabBar(
+ tabs: [
+ Tab(icon: Icon(Icons.directions_car)),
+ Tab(icon: Icon(Icons.directions_transit)),
+ ],
+ ),
+ TabBarView(
+ children: [
+ Icon(Icons.directions_car),
+ Icon(Icons.directions_transit),
+ ],
+ )
+ ],
+ )));
+ }
+}
diff --git a/lib/pages/feedback/Status_feedback_page.dart b/lib/pages/feedback/Status_feedback_page.dart
new file mode 100644
index 00000000..7fc01d06
--- /dev/null
+++ b/lib/pages/feedback/Status_feedback_page.dart
@@ -0,0 +1,98 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+class StatusFeedbackPage extends StatefulWidget {
+ @override
+ _StatusFeedbackPageState createState() => _StatusFeedbackPageState();
+}
+
+class _StatusFeedbackPageState extends State {
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getCOC(),
+ builder: (_, model, widget) => AppScaffold(
+ baseViewModel: model,
+ body: Container(
+ margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0,bottom: MediaQuery.of(context).size.height * 0.1 ),
+ padding: EdgeInsets.all(15.0),
+ child: ListView.builder(
+ itemCount: model.cOCItemList.length,
+ itemBuilder: (context, index) => Container(
+ decoration: BoxDecoration(
+ shape: BoxShape.rectangle,
+ border: Border.all(color: Colors.white, width: 0.5),
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ color: Colors.white,
+ ),
+ margin: EdgeInsets.all(4),
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 8,),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
+ children: [
+ Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Texts('${model.cOCItemList[index].cOCTitle}'),
+ Texts(
+ 'Number :${model.cOCItemList[index].itemID}',
+ variant: 'overline',
+ ),
+ ],
+ ),
+ Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Texts('${model.cOCItemList[index].status}'),
+ Texts(
+ '${model.cOCItemList[index].date}',
+ variant: 'overline',
+ ),
+ ],
+ ),
+ ],
+ ),
+ Texts('${model.cOCItemList[index].formType}'),
+ Divider(height: 4.5,color: Colors.grey[500],)
+ ],
+ ),
+ ),
+ )),
+ ),
+ bottomSheet: Container(
+ height: MediaQuery.of(context).size.height * 0.13,
+ width: double.infinity,
+ padding: EdgeInsets.all(8.0),
+ child: Center(
+ child: Container(
+ height: MediaQuery.of(context).size.height * 0.1,
+ width: MediaQuery.of(context).size.width * 0.8,
+ child: Button(
+ label: 'Search',
+ loading: model.state == ViewState.BusyLocal,
+ onTap: () {
+ //TODO When come back
+ },
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart
new file mode 100644
index 00000000..92bfaff7
--- /dev/null
+++ b/lib/pages/feedback/feedback_home_page.dart
@@ -0,0 +1,118 @@
+import 'dart:ui';
+
+import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+import 'Status_feedback_page.dart';
+
+class FeedbackHomePage extends StatefulWidget {
+ @override
+ _FeedbackHomePageState createState() => _FeedbackHomePageState();
+}
+
+class _FeedbackHomePageState extends State
+ with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ @override
+ void initState() {
+ super.initState();
+ _tabController = TabController(length: 2, vsync: this);
+ }
+
+ @override
+ void dispose() {
+ super.dispose();
+ _tabController.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: 'Feedback',
+ body: Scaffold(
+ extendBodyBehindAppBar: true,
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(65.0),
+ child: Stack(
+ children: [
+ Positioned(
+ bottom: 1,
+ left: 0,
+ right: 0,
+ child: BackdropFilter(
+ filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
+ child: Container(
+ color: Theme.of(context)
+ .scaffoldBackgroundColor
+ .withOpacity(0.8),
+ height: 70.0,
+ ),
+ ),
+ ),
+ Center(
+ child: Container(
+ height: 60.0,
+ margin: EdgeInsets.only(top: 10.0),
+ width: MediaQuery.of(context).size.width * 0.9,
+ decoration: BoxDecoration(
+ border: Border(
+ bottom: BorderSide(
+ color: Theme.of(context).dividerColor,
+ width: 0.7),
+ ),
+ color: Colors.white),
+ child: Center(
+ child: TabBar(
+ isScrollable: true,
+ controller: _tabController,
+ indicatorWeight: 5.0,
+ indicatorSize: TabBarIndicatorSize.label,
+ indicatorColor: Colors.red[800],
+ labelColor: Theme.of(context).primaryColor,
+ labelPadding:
+ EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
+ unselectedLabelColor: Colors.grey[800],
+ tabs: [
+ Container(
+ width: MediaQuery.of(context).size.width * 0.30,
+ child: Center(
+ child: Texts('Send'),
+ ),
+ ),
+ Container(
+ width: MediaQuery.of(context).size.width * 0.30,
+ child: Center(
+ child: Texts('Status'),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ body: Column(
+ children: [
+ Expanded(
+ child: TabBarView(
+ physics: BouncingScrollPhysics(),
+ controller: _tabController,
+ children: [
+ SendFeedbackPage(),
+ StatusFeedbackPage()
+ ],
+ ),
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart
new file mode 100644
index 00000000..801a0a37
--- /dev/null
+++ b/lib/pages/feedback/send_feedback_page.dart
@@ -0,0 +1,563 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
+
+enum MessageType {
+ ComplaintOnAnAppointment,
+ ComplaintWithoutAppointment,
+ Question,
+ Compliment,
+ Suggestion,
+ NON
+}
+
+class SendFeedbackPage extends StatefulWidget {
+ @override
+ _SendFeedbackPageState createState() => _SendFeedbackPageState();
+}
+
+class _SendFeedbackPageState extends State {
+ TextEditingController titleController = TextEditingController();
+ TextEditingController messageController = TextEditingController();
+ MessageType messageType = MessageType.NON;
+ String _selected = "not selected";
+ List images = [];
+ String title;
+
+ String message;
+ final formKey = GlobalKey();
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ builder: (_, model, widget) => AppScaffold(
+ baseViewModel: model,
+ body: Container(
+ height: MediaQuery.of(context).size.height * 0.8,
+ child: SingleChildScrollView(
+ child: Form(
+ key: formKey,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(
+ height: 65,
+ ),
+ Container(
+ margin: EdgeInsets.only(left: 20, right: 20, top: 8),
+ child: Texts(
+ 'We\'d love to hear your feedback about the health care services and online services. Please fill in the required fields',
+ //يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة
+ textAlign: TextAlign.center,
+ variant: 'body2Link',
+ ),
+ ),
+ InkWell(
+ onTap: () {
+ confirmBox();
+ },
+ child: Container(
+ margin: EdgeInsets.only(left: 10, right: 10, top: 15),
+ height: 50,
+ decoration: BoxDecoration(
+ border: Border.all(color: Colors.grey),
+ borderRadius: BorderRadius.circular(7),
+ color: Colors.white,
+ shape: BoxShape.rectangle,
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ child: Texts(
+ _selected,
+ variant: 'bodyText',
+ ),
+ margin: EdgeInsets.only(left: 10),
+ ),
+ Icon(
+ Icons.arrow_drop_down,
+ size: 22,
+ color: Colors.grey,
+ )
+ ],
+ ),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(left: 10, right: 10, top: 15),
+ child: TextFields(
+ hintText: 'Title',
+ controller: titleController,
+ fontSize: 13.5,
+ hintColor: Colors.black,
+ fontWeight: FontWeight.w600,
+ validator: (value) {
+ if (value == null)
+ return "please Enter title";
+ else
+ return null;
+ },
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(left: 10, right: 10, top: 15),
+ child: TextFields(
+ hintText: 'message',
+ fontSize: 13.5,
+ hintColor: Colors.black,
+ fontWeight: FontWeight.w600,
+ maxLines: 25,
+ minLines: 13,
+ controller: messageController,
+ validator: (value) {
+ if (value == null)
+ return "please Enter message";
+ else
+ return null;
+ }),
+ ),
+ InkWell(
+ onTap: () {
+ ImageOptions.showImageOptions(context, (String image) {
+ setState(() {
+ images.add(image);
+ });
+ });
+ },
+ child: Container(
+ margin: EdgeInsets.only(left: 10, right: 10, top: 15),
+ height: 50,
+ decoration: BoxDecoration(
+ border: Border.all(color: Colors.grey),
+ borderRadius: BorderRadius.circular(7),
+ color: Colors.white,
+ shape: BoxShape.rectangle,
+ ),
+ child: Center(
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Icon(Icons.attach_file),
+ Texts(
+ 'selected attachment',
+ variant: 'bodyText',
+ textAlign: TextAlign.center,
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ...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,
+ 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],
+ ))
+ ],
+ ),
+ )),
+ SizedBox(
+ height: 30,
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ bottomSheet: Container(
+ height: MediaQuery.of(context).size.height * 0.13,
+ width: double.infinity,
+ padding: EdgeInsets.all(8.0),
+ child: Center(
+ child: Container(
+ height: MediaQuery.of(context).size.height * 0.1,
+ width: MediaQuery.of(context).size.width * 0.8,
+ child: Button(
+ label: 'Send',
+ loading: model.state == ViewState.BusyLocal,
+ onTap: () {
+ final form = formKey.currentState;
+ if (form.validate()) if (messageType != MessageType.NON)
+ model
+ .sendCOCItem(
+ title: titleController.text,
+ attachment: images.length > 0 ? images[0] : "",
+ details: messageController.text,
+ cOCTypeName: getCOCName())
+ .then((value) {
+ if (value) {
+ setState(() {
+ titleController.text = "";
+ messageController.text = "";
+ images = [];
+ messageType = MessageType.NON;
+ });
+ AppToast.showSuccessToast(message: "Your feedback was sended");
+
+ } else {
+ AppToast.showErrorToast(message: model.error);
+
+ }
+ });
+ else {
+ AppToast.showErrorToast(message: "Please select COC");
+ }
+ },
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ String getCOCName() {
+ switch (messageType) {
+ case MessageType.ComplaintOnAnAppointment:
+ return "1";
+ break;
+ case MessageType.ComplaintWithoutAppointment:
+ return "2";
+ break;
+ case MessageType.Question:
+ return "3";
+ break;
+ case MessageType.Compliment:
+ return "4";
+ break;
+ case MessageType.Suggestion:
+ return "5";
+ break;
+ case MessageType.NON:
+ return "";
+ break;
+ }
+ return "";
+ }
+
+ // Show Dialog function
+ void confirmBox() {
+ showDialog(
+ context: context,
+ child: FeedbackTypeDialog(
+ onValueChange: _onValueChange,
+ initialValue: messageType,
+ onValueSelected: () {
+ setState(() {
+ switch (messageType) {
+ case MessageType.ComplaintOnAnAppointment:
+ _selected = "Complaint on an appointment";
+ break;
+ case MessageType.ComplaintWithoutAppointment:
+ _selected = "Complaint without appointment";
+ break;
+ case MessageType.Question:
+ _selected = "Question";
+ break;
+ case MessageType.Compliment:
+ _selected = "Compliment";
+ break;
+ case MessageType.Suggestion:
+ _selected = "Suggestion";
+ break;
+ case MessageType.NON:
+ break;
+ }
+ });
+ Navigator.pop(context);
+ },
+ ));
+ }
+
+ void _onValueChange(MessageType value) {
+ setState(() {
+ messageType = value;
+ });
+ }
+}
+
+class FeedbackTypeDialog extends StatefulWidget {
+ const FeedbackTypeDialog(
+ {this.onValueChange, this.initialValue, this.onValueSelected});
+
+ final MessageType initialValue;
+ final void Function(MessageType) onValueChange;
+ final GestureTapCallback onValueSelected;
+
+ @override
+ State createState() => new FeedbackTypeDialogState();
+}
+
+class FeedbackTypeDialogState extends State {
+ MessageType _messageType;
+
+ @override
+ void initState() {
+ super.initState();
+ _messageType = widget.initialValue;
+ }
+
+ Widget build(BuildContext context) {
+ return new SimpleDialog(
+ title: Text(
+ "Message Type",
+ textAlign: TextAlign.center,
+ ),
+ children: [
+ Container(
+ // padding: const EdgeInsets.all(10.0),
+ child: Column(
+ children: [
+ Divider(
+ height: 2.5,
+ color: Colors.grey[500],
+ ),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ _messageType = MessageType.ComplaintOnAnAppointment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ child: ListTile(
+ title: const Text('Complaint on an appointment'),
+ leading: Radio(
+ value: MessageType.ComplaintOnAnAppointment,
+ groupValue: _messageType,
+ activeColor: Colors.red[800],
+ onChanged: (MessageType value) {
+ setState(() {
+ _messageType = MessageType.ComplaintOnAnAppointment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ height: 5.0,
+ ),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ _messageType = MessageType.ComplaintWithoutAppointment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ child: ListTile(
+ title: const Text('Complaint without appointment'),
+ leading: Radio(
+ value: MessageType.ComplaintWithoutAppointment,
+ groupValue: _messageType,
+ activeColor: Colors.red[800],
+ onChanged: (MessageType value) {
+ setState(() {
+ _messageType =
+ MessageType.ComplaintWithoutAppointment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ height: 5.0,
+ ),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ _messageType = MessageType.Question;
+ widget.onValueChange(_messageType);
+ });
+ },
+ child: ListTile(
+ title: const Text('Question'),
+ leading: Radio(
+ value: MessageType.Question,
+ groupValue: _messageType,
+ activeColor: Colors.red[800],
+ onChanged: (MessageType value) {
+ setState(() {
+ _messageType = MessageType.Question;
+ widget.onValueChange(_messageType);
+ });
+ },
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ height: 5.0,
+ ),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ _messageType = MessageType.Compliment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ child: ListTile(
+ title: const Text('compliment'),
+ leading: Radio(
+ value: MessageType.Compliment,
+ groupValue: _messageType,
+ activeColor: Colors.red[800],
+ onChanged: (MessageType value) {
+ setState(() {
+ _messageType = MessageType.Compliment;
+ widget.onValueChange(_messageType);
+ });
+ },
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ height: 5.0,
+ ),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ _messageType = MessageType.Suggestion;
+ widget.onValueChange(_messageType);
+ });
+ },
+ child: ListTile(
+ title: const Text('Suggestion'),
+ leading: Radio(
+ value: MessageType.Suggestion,
+ groupValue: _messageType,
+ activeColor: Colors.red[800],
+ onChanged: (MessageType value) {
+ setState(() {
+ _messageType = MessageType.Suggestion;
+ widget.onValueChange(_messageType);
+ });
+ },
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(
+ height: 5.0,
+ ),
+ Divider(
+ height: 2.5,
+ color: Colors.grey[500],
+ ),
+ SizedBox(
+ height: 5,
+ ),
+ Row(
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.pop(context);
+ },
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Container(
+ child: Center(
+ child: Texts(
+ 'cancel',
+ color: Colors.red,
+ ))),
+ ),
+ )),
+ Container(
+ width: 1,
+ height: 30,
+ color: Colors.grey[500],
+ ),
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: widget.onValueSelected,
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Texts(
+ 'ok',
+ fontWeight: FontWeight.w400,
+ )),
+ ),
+ )),
+ ],
+ )
+ ],
+ )),
+ ],
+ );
+ }
+}
diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart
new file mode 100644
index 00000000..041adb82
--- /dev/null
+++ b/lib/pages/insurance/insurance_approval_screen.dart
@@ -0,0 +1,418 @@
+import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:flutter/cupertino.dart';
+import '../base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+
+class InsuranceApproval extends StatefulWidget {
+ @override
+ _InsuranceApprovalState createState() => _InsuranceApprovalState();
+}
+
+class _InsuranceApprovalState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getInsuranceApproval(),
+ builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
+ AppScaffold(
+ isShowAppBar: true,
+ baseViewModel: model,
+ appBarTitle: TranslationBase.of(context).approvals,
+ body: SingleChildScrollView(
+ child: Container(
+ margin: EdgeInsets.only(
+ left: SizeConfig.screenWidth * 0.004,
+ right: SizeConfig.screenWidth * 0.004,
+ top: SizeConfig.screenWidth * 0.04,
+ ),
+ child: Column(
+ children: [
+ Container(
+ width: double.infinity,
+ height: SizeConfig.screenHeight * 0.09,
+ color: Color(0xffEEEEEE),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Text(
+ TranslationBase.of(context).totalApproval,
+ style: TextStyle(
+ color: Color(0xff60688B),
+ fontSize: 19.0,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ if (model.insuranceApproval.length > 0)
+ Container(
+ width: SizeConfig.widthMultiplier * 18.0,
+ height: SizeConfig.heightMultiplier * 2.8,
+ decoration: BoxDecoration(
+ color: Color(0xffC5272D),
+ borderRadius: BorderRadius.circular(19.0)),
+ child: Center(
+ child: Text(
+ model.insuranceApproval[0].unUsedCount
+ .toString(),
+ style: TextStyle(
+ color: Colors.white, fontSize: 19.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: Color(0xffB8372C),
+ borderRadius:
+ BorderRadius.circular(
+ 16.0)),
+ width: 95.0,
+ padding:
+ EdgeInsets.only(left: 11.5),
+ child: Text(
+ model.insuranceApproval[index]
+ .patientDescription ==
+ null
+ ? ''
+ : model
+ .insuranceApproval[
+ index]
+ .patientDescription,
+ style: TextStyle(
+ color: Colors.white),
+ ),
+ )
+ : Container(
+ decoration: BoxDecoration(
+ color: Color(0xff505A5D),
+ borderRadius:
+ BorderRadius.circular(
+ 16.0)),
+ width: 95.0,
+ padding:
+ EdgeInsets.only(left: 11.5),
+ child: Text(
+ model.insuranceApproval[index]
+ .patientDescription ==
+ null
+ ? ''
+ : model
+ .insuranceApproval[
+ index]
+ .patientDescription,
+ style: TextStyle(
+ color: Colors.white),
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.symmetric(
+ vertical: 10.0),
+ child: Text(
+ model.insuranceApproval[index]
+ .clinicName,
+ style: TextStyle(
+ fontSize: 20.0,
+ color: Color(0xff60686B),
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ),
+ Text(
+ model.insuranceApproval[index]
+ .doctorName,
+ style: TextStyle(
+ fontSize: 17.0,
+ fontStyle: FontStyle.italic),
+ ),
+ ],
+ ),
+ ),
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(
+ vertical: 12.0, horizontal: 12.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ TranslationBase.of(context)
+ .approvalNo +
+ model.insuranceApproval[index]
+ .approvalNo
+ .toString(),
+ style: TextStyle(
+ fontSize: 18.0,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Text(
+ TranslationBase.of(context)
+ .procedureStatus +
+ model.insuranceApproval[index]
+ .approvalStatusDescption,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 17.5),
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Text(
+ TranslationBase.of(context)
+ .unusedCount +
+ model.insuranceApproval[index]
+ .unUsedCount
+ .toString(),
+ style: TextStyle(
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600),
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+// Text(
+// 'Company Name: ' +
+// model.insuranceApproval[index]
+// .companyName ==
+// null
+// ? '000'
+// : model
+// .insuranceApproval[index].companyName,
+// style: TextStyle(
+// fontSize: 17.5,
+// fontWeight: FontWeight.w600),
+// ),
+ Text(
+ TranslationBase.of(context)
+ .companyName,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 17.5,
+ ),
+ ),
+
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Text(
+ TranslationBase.of(context)
+ .receiptOn +
+ convertDateFormat(model
+ .insuranceApproval[index]
+ .rceiptOn),
+ style: TextStyle(
+ fontSize: 17.5,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ Text(
+ TranslationBase.of(context)
+ .expiryDate +
+ convertDateFormat(model
+ .insuranceApproval[index]
+ .expiryDate),
+ style: TextStyle(
+ 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]
+ .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),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 1.0,
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ )),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ convertDateFormat(String Date) {
+ const start = "/Date(";
+ const end = "+0300)";
+
+ 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');
+
+ return newDate.toString();
+ }
+}
diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart
new file mode 100644
index 00000000..282538c2
--- /dev/null
+++ b/lib/pages/insurance/insurance_card_screen.dart
@@ -0,0 +1,153 @@
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:flutter/cupertino.dart';
+import '../base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
+import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
+import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+
+class InsuranceCard extends StatefulWidget {
+ @override
+ _InsuranceCardState createState() => _InsuranceCardState();
+}
+
+class _InsuranceCardState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getInsurance(),
+ builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
+ AppScaffold(
+ isShowAppBar: true,
+ baseViewModel: model,
+ appBarTitle: TranslationBase.of(context).insuranceCards,
+ body: Container(
+ margin: EdgeInsets.only(
+ left: SizeConfig.screenWidth * 0.004,
+ right: SizeConfig.screenWidth * 0.004,
+ top: SizeConfig.screenWidth * 0.04),
+ child: ListView.builder(
+ itemCount: model.insurance == null ? 0 : model.insurance.length,
+ itemBuilder: (BuildContext context, int index) {
+ return RoundedContainer(
+ backgroundColor: Colors.white,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ExpansionTile(
+ title: Container(
+ height: 65.0,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: EdgeInsets.symmetric(vertical: 15.0),
+ child: Texts(
+ model.insurance[index].groupName,
+ ),
+ ),
+ ],
+ ),
+ ),
+ children: [
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 0.5,
+ ),
+ Texts(
+ TranslationBase.of(context).companyName +
+ model.insurance[index].companyName,
+ fontSize: 20.0,
+ ),
+ Divider(
+ color: Colors.black,
+ height: 25.0,
+ thickness: 0.5,
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ Text(
+ TranslationBase.of(context).category +
+ model.insurance[index].subCategoryDesc,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).expirationDate +
+ convertDateFormat(
+ model.insurance[index].cardValidTo),
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).patientCard +
+ model.insurance[index].patientCardID,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ Text(
+ TranslationBase.of(context).policyNumber +
+ model
+ .insurance[index].insurancePolicyNumber,
+ style: TextStyle(fontSize: 18.5),
+ ),
+ ],
+ ),
+ Column(
+ children: [
+ model.insurance[index].isActive == true
+ ? Text('Active',
+ style: TextStyle(
+ color: Colors.green,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ : Text('Not Active',
+ style: TextStyle(
+ color: Colors.red,
+ fontWeight: FontWeight.w900,
+ fontSize: 17.9))
+ ],
+ ),
+ SizedBox(
+ height: 14.5,
+ ),
+ if (model.insurance[index].isActive == true)
+ Container(
+ child: Button(
+ label: TranslationBase.of(context).seeDetails,
+ ),
+ width: 400.0,
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }),
+ ),
+ ),
+ );
+ }
+
+ convertDateFormat(String exDate) {
+ const start = "/Date(";
+ const end = "+0300)";
+
+ final startIndex = exDate.indexOf(start);
+ final endIndex = exDate.indexOf(end, startIndex + start.length);
+
+ var date = new DateTime.fromMillisecondsSinceEpoch(
+ int.parse(exDate.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/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart
new file mode 100644
index 00000000..9ef7c524
--- /dev/null
+++ b/lib/pages/insurance/insurance_update_screen.dart
@@ -0,0 +1,311 @@
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:flutter/cupertino.dart';
+import '../base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
+import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
+import 'package:rating_bar/rating_bar.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+
+class InsuranceUpdate extends StatefulWidget {
+ @override
+ _InsuranceUpdateState createState() => _InsuranceUpdateState();
+}
+
+class _InsuranceUpdateState extends State
+ with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ @override
+ void initState() {
+ super.initState();
+ _tabController = TabController(length: 2, vsync: this);
+ }
+
+ void dispose() {
+ super.dispose();
+ _tabController.dispose();
+ }
+
+ Widget build(BuildContext context) {
+ return BaseView(
+ onModelReady: (model) => model.getInsuranceUpdated(),
+ builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
+ AppScaffold(
+ appBarTitle: 'Insurance Cards',
+ isShowAppBar: true,
+ baseViewModel: model,
+ body: Scaffold(
+ extendBodyBehindAppBar: true,
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(70.0),
+ child: Stack(
+ children: [
+ Center(
+ child: Container(
+ height: 60.0,
+ margin: EdgeInsets.only(top: 10.0),
+ width: MediaQuery.of(context).size.width * 1.9,
+ decoration: BoxDecoration(
+ border: Border(
+ bottom: BorderSide(
+ color: Theme.of(context).dividerColor,
+ width: 5.7,
+ ),
+ ),
+ color: Colors.white,
+ ),
+ child: Center(
+ child: TabBar(
+ controller: _tabController,
+ isScrollable: true,
+ indicatorWeight: 4.0,
+ indicatorColor: Colors.red,
+ labelColor: Theme.of(context).primaryColor,
+ labelPadding: EdgeInsets.symmetric(
+ horizontal: 13.0, vertical: 2.0),
+ unselectedLabelColor: Colors.grey,
+ tabs: [
+ Container(
+ width: MediaQuery.of(context).size.width * 0.35,
+ child: Center(
+ child: Texts('Card'),
+ ),
+ ),
+ Container(
+ width: MediaQuery.of(context).size.width * 0.35,
+ child: Center(
+ child: Texts('History'),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ body: Column(
+ children: [
+ Expanded(
+ child: TabBarView(
+ physics: BouncingScrollPhysics(),
+ controller: _tabController,
+ children: [
+ Container(
+ child: ListView.builder(
+ itemCount: model.insuranceUpdate == null
+ ? 0
+ : model.insuranceUpdate.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Container(
+ margin: EdgeInsets.all(10.0),
+ child: Card(
+ margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Flex(
+ direction: Axis.horizontal,
+ children: [
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0,
+ left: 10.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text("TAMER FANASHEH ",
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ 'File No.' +
+ model
+ .insuranceUpdate[
+ index]
+ .patientID
+ .toString(),
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ model.insuranceUpdate[index]
+ .createdOn,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 1,
+ child: Container(
+// height: MediaQuery.of(context).size.height * 0.12,
+ margin: EdgeInsets.only(top: 20.0),
+ child: Column(
+ children: [
+ Container(
+ child: Button(
+ label: 'Fetch',
+ ),
+ height: SizeConfig
+ .heightMultiplier *
+ 3.8,
+ width:
+ SizeConfig.screenWidth *
+ 4.2,
+ ),
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }),
+ ),
+ Container(
+ child: ListView.builder(
+ itemCount: model.insuranceUpdate == null
+ ? 0
+ : model.insuranceUpdate.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Container(
+ margin: EdgeInsets.all(10.0),
+ child: Card(
+ margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Flex(
+ direction: Axis.horizontal,
+ children: [
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0,
+ left: 10.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text("TAMER FANASHEH ",
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ 'File No.' +
+ model
+ .insuranceUpdate[
+ index]
+ .patientID
+ .toString(),
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ Text(
+ model.insuranceUpdate[index]
+ .createdOn,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ letterSpacing: 1.0)),
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 1,
+ child: Container(
+// height: MediaQuery.of(context).size.height * 0.12,
+ margin: EdgeInsets.only(top: 20.0),
+ child: Column(
+ children: [
+ Image.asset(
+ "assets/images/new-design/confirm_button.png",
+ width: 30.0,
+ height: 30.0),
+ Container(
+ margin: EdgeInsets.only(
+ top: 13.5, left: 2.0),
+ child: Text(
+ model
+ .insuranceUpdate[
+ index]
+ .statusDescription,
+ textAlign:
+ TextAlign.center,
+ style: TextStyle(
+ fontSize: 12.0)),
+ ),
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }),
+ ),
+ ////////////////
+ ],
+ ))
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart
index 6169fdf4..b172cffc 100644
--- a/lib/pages/landing/home_page.dart
+++ b/lib/pages/landing/home_page.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/hospital_view_model.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
@@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import '../base/base_view.dart';
+import '../feedback/feedback_home_page.dart';
class HomePage extends StatefulWidget {
@override
@@ -18,54 +20,38 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State {
@override
Widget build(BuildContext context) {
- return BaseView(
- onModelReady: (model) => model.getMedicine(),
- builder: (BuildContext context, PharmacyViewModel model, Widget child) =>
- AppScaffold(
- baseViewModel: model,
- body: Column(
- children: [
- InkWell(
- onTap: () {
- model.getMedicine();
- },
- child: Container(
- child: Texts('call api'),
+ return AppScaffold(
+ body: Container(
+ width: double.infinity,
+ child: FractionallySizedBox(
+ widthFactor: 0.95,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ InkWell(
+ onTap: ()=>Navigator.push(context, FadePage(page: FeedbackHomePage())),
+ child: Container(
+ margin: EdgeInsets.only(top: 12),
+ width: double.infinity,
+ height: 180,
+ decoration: BoxDecoration(
+ shape: BoxShape.rectangle,
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12.0),
+ border: Border.all(
+ color: Colors.grey[400],
+ width: 1.0,
+ ),
+ ),
+ child: Center(
+ child: Texts('Feedback'),
+ ),
+ ),
),
- ),
- Expanded(
- child: _getHospitals(model.pharmacy),
- )
-// BaseView(
-// onModelReady: (dctorViewModel) => dctorViewModel.getHospitals(),
-// builder: (BuildContext context, DoctorViewModel dctorViewModel,
-// Widget child) =>
-// InkWell(
-// onTap: () {
-// dctorViewModel.getHospitals();
-// },
-// child: Container(
-// width: double.infinity,
-// height: 150,
-// child: NetworkBaseView(
-// baseViewModel: dctorViewModel,
-// child: Container(
-// child: Texts('The API 2'),
-// ),
-// ),
-// ),
-// ),
-// ),
- ],
+ ],
+ ),
),
),
);
}
-
- Widget _getHospitals(List hospitals) => ListView.builder(
- itemCount: hospitals.length,
- itemBuilder: (BuildContext context, int index) => Container(
- child: Texts(hospitals[index].itemDes),
- ),
- );
}
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index 07a6bf24..c3bee59e 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
-import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
+import 'package:permission_handler/permission_handler.dart';
import 'home_page.dart';
class LandingPage extends StatefulWidget {
@@ -39,10 +40,19 @@ class _LandingPageState extends State {
if (token != null) {
checkUserStatus(token);
}
-
+ requestPermissions();
//assert(token != null);
});
}
+ void requestPermissions() async {
+ await [
+ Permission.location,
+ Permission.storage,
+ Permission.camera,
+ Permission.photos,
+ Permission.accessMediaLocation
+ ].request();
+ }
@override
Widget build(BuildContext context) {
@@ -70,7 +80,8 @@ class _LandingPageState extends State {
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
- children: [Container(), MedicalProfilePage(), MyAdmissionsPage(), ToDo(), BookingOptions()],
+ children: [
+ HomePage(), MedicalProfilePage(), MyAdmissionsPage(), ToDo()],
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab),
);
@@ -91,14 +102,23 @@ class _LandingPageState extends State {
}
}
- void checkUserStatus(token) {
+ void checkUserStatus(token) async {
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value));
+ if (await sharedPref.getObject(USER_PROFILE) != null) {
+ var data =
+ AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
+ if (data != null)
+ authService.registeredAuthenticatedUser(data, token, 0, 0);
+ // setState(() {
+ // this.user = data;
+ // print(this.user);
+ // });
+ }
}
void setUserValues(value) async {
- print(value);
sharedPref.setObject(IMEI_USER_DATA, value);
}
}
diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart
index 3d5f181e..5c5add4d 100644
--- a/lib/pages/login/confirm-login.dart
+++ b/lib/pages/login/confirm-login.dart
@@ -1,14 +1,15 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
-import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
-
+import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
-import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
@@ -18,7 +19,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:flutter/services.dart';
-import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
+import 'package:intl/intl.dart';
import 'package:local_auth/local_auth.dart';
class ConfirmLogin extends StatefulWidget {
@@ -28,16 +29,16 @@ class ConfirmLogin extends StatefulWidget {
class _ConfirmLogin extends State {
final LocalAuthentication auth = LocalAuthentication();
- List _availableBiometrics;
+ var _availableBiometrics;
var sharedPref = new AppSharedPreferences();
bool authenticated;
final authService = new AuthProvider();
int mobileNumber;
String errorMsg = '';
- var user;
+ SelectDeviceIMEIRES user;
bool isLoading = false;
- CheckPatientAuthenticationReq registerd_data;
-
+ var registerd_data;
+ bool isMoreOption = false;
var zipCode;
var patientOutSA;
@@ -54,6 +55,13 @@ class _ConfirmLogin extends State {
bool onlySMSBox = false;
var userData;
+
+ static BuildContext _context;
+
+ static bool _loading;
+
+ int fingrePrintBefore;
+
@override
void initState() {
_getAvailableBiometrics();
@@ -76,248 +84,168 @@ class _ConfirmLogin extends State {
children: [
Expanded(
flex: 3,
- child: Column(
- mainAxisAlignment:
- MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Image.asset(
- 'assets/images/habib-logo.png',
- height: 80,
- width: 80,
- ),
- this.onlySMSBox == false
- ? AppText(
- TranslationBase.of(context)
- .verifyLoginWith,
- fontSize:
- SizeConfig.textMultiplier * 3.5,
- textAlign: TextAlign.left,
- )
- : AppText(
- TranslationBase.of(context)
- .verifyFingerprint2,
- fontSize:
- SizeConfig.textMultiplier * 2.5,
- textAlign: TextAlign.left,
+ child: user != null && isMoreOption == false
+ ? Column(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Image.asset(
+ 'assets/images/habib-logo.png',
+ height: 80,
+ width: 80,
+ ),
+ AppText(
+ TranslationBase.of(context)
+ .welcomeBack +
+ ' ' +
+ user.name,
+ fontSize: SizeConfig.textMultiplier * 4,
+ ),
+ AppText(
+ TranslationBase.of(context).accountInfo,
+ fontSize: SizeConfig.textMultiplier * 3,
+ ),
+ Card(
+ color: Colors.grey[300],
+ child: Row(
+ children: [
+ Expanded(
+ child: ListTile(
+ title: Text(
+ TranslationBase.of(context)
+ .lastLoginAt,
+ textAlign: TextAlign.center,
+ ),
+ subtitle: Text(
+ user.editedOn != null
+ ? formatDate(DateUtil
+ .convertStringToDate(
+ user.editedOn))
+ : '--',
+ textAlign:
+ TextAlign.center),
+ )),
+ Expanded(
+ child: ListTile(
+ title: Text(
+ TranslationBase.of(context)
+ .lastLoginWith,
+ textAlign:
+ TextAlign.center),
+ subtitle: Text(
+ getType(user.logInType,
+ context),
+ textAlign:
+ TextAlign.center),
+ ))
+ ],
+ ))
+ ],
+ )
+ : Column(
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Image.asset(
+ 'assets/images/habib-logo.png',
+ height: 80,
+ width: 80,
),
- ])),
- Expanded(
- flex: 4,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- onlySMSBox == false
- ? Row(
+ this.onlySMSBox == false
+ ? AppText(
+ TranslationBase.of(context)
+ .verifyLoginWith,
+ fontSize:
+ SizeConfig.textMultiplier *
+ 3.5,
+ textAlign: TextAlign.left,
+ )
+ : AppText(
+ TranslationBase.of(context)
+ .verifyFingerprint2,
+ fontSize:
+ SizeConfig.textMultiplier *
+ 2.5,
+ textAlign: TextAlign.left,
+ ),
+ ])),
+ user != null && isMoreOption == false
+ ? Expanded(
+ flex: 2,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: InkWell(
+ onTap: () => {
+ authenticateUser(
+ 3,
+ BiometricType
+ .face.index)
+ },
+ child: getButton(
+ user.logInType))),
+ Expanded(child: getButton(5))
+ ])
+ ]))
+ : Expanded(
+ flex: 4,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ onlySMSBox == false
+ ? Row(
+ mainAxisAlignment:
+ MainAxisAlignment.center,
+ children: [
+ Expanded(child: getButton(3)),
+ Expanded(child: getButton(2))
+ ],
+ )
+ : SizedBox(),
+ Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
- Expanded(
- child: InkWell(
- onTap: () => {
- authenticateUser(
- 3,
- BiometricType
- .face.index)
- },
- child: RoundedContainer(
- backgroundColor:
- BiometricType.face
- .index ==
- 1
- ? Colors.white
- : Colors.white
- .withOpacity(
- .7),
- borderColor: Colors.grey,
- showBorder: true,
- child: Padding(
- padding:
- EdgeInsets.fromLTRB(
- 20, 10, 20, 10),
- child: Column(
- mainAxisAlignment:
- MainAxisAlignment
- .center,
- children: [
- Image.asset(
- 'assets/images/login/101.png',
- height: SizeConfig
- .imageSizeMultiplier *
- 13,
- width: SizeConfig
- .imageSizeMultiplier *
- 16,
- ),
- SizedBox(
- height: 20,
- ),
- AppText(
- TranslationBase.of(
- context)
- .verifyFaceID,
- fontSize: SizeConfig
- .textMultiplier *
- 2,
- )
- ],
- ),
- )))),
- Expanded(
- child: InkWell(
- onTap: () => {
- authenticateUser(
- 2,
- BiometricType
- .fingerprint
- .index)
- },
- child: RoundedContainer(
- backgroundColor:
- BiometricType
- .fingerprint
- .index ==
- 1
- ? Colors.white
- : Colors.white
- .withOpacity(
- .7),
- borderColor: Colors.grey,
- showBorder: true,
- child: Padding(
- padding:
- EdgeInsets.fromLTRB(
- 25, 10, 25, 10),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/login/102.png',
- height: SizeConfig
- .imageSizeMultiplier *
- 13,
- width: SizeConfig
- .imageSizeMultiplier *
- 16,
- ),
- SizedBox(
- height: 20,
- ),
- AppText(
- TranslationBase.of(
- context)
- .verifyFingerprint,
- fontSize: SizeConfig
- .textMultiplier *
- 2,
- )
- ],
- ),
- ))))
+ Expanded(child: getButton(1)),
+ Expanded(child: getButton(4))
],
- )
- : SizedBox(),
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: InkWell(
- onTap: () =>
- {authenticateUser(1, true)},
- child: RoundedContainer(
- borderColor: Colors.grey,
- showBorder: true,
- child: Padding(
- padding: EdgeInsets.fromLTRB(
- 20, 10, 20, 10),
- child: Column(
- mainAxisAlignment:
- MainAxisAlignment
- .center,
- children: [
- Image.asset(
- 'assets/images/login/103.png',
- height: SizeConfig
- .imageSizeMultiplier *
- 13,
- width: SizeConfig
- .imageSizeMultiplier *
- 16,
- ),
- SizedBox(
- height: 20,
- ),
- AppText(
- TranslationBase.of(
- context)
- .verifySMS,
- fontSize: SizeConfig
- .textMultiplier *
- 2,
- )
- ],
- ),
- )))),
- Expanded(
- child: InkWell(
- onTap: () =>
- {authenticateUser(4, true)},
- child: RoundedContainer(
- borderColor: Colors.grey,
- showBorder: true,
- child: Padding(
- padding: EdgeInsets.fromLTRB(
- 25, 10, 25, 10),
- child: Column(
- children: [
- Image.asset(
- 'assets/images/login/104.png',
- height: SizeConfig
- .imageSizeMultiplier *
- 13,
- width: SizeConfig
- .imageSizeMultiplier *
- 16,
- ),
- SizedBox(
- height: 20,
- ),
- AppText(
- TranslationBase.of(
- context)
- .verifyWhatsApp,
- fontSize: SizeConfig
- .textMultiplier *
- 2,
- )
- ],
- ),
- ))))
- ],
- ),
- ]),
- ),
+ ),
+ ]),
+ ),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
- // Row(
- // children: [
- // Expanded(
- // child: RaisedButton(
- // color: Colors.grey,
- // textColor: Colors.white,
- // child:
- // Text(TranslationBase.of(context).registerNow),
- // onPressed: () => {
- // Navigator.of(context).pushNamed(
- // REGISTER,
- // )
- // },
- // ))
- // ],
- // ),
+ user != null
+ ? Row(
+ children: [
+ Expanded(
+ child: DefaultButton(
+ TranslationBase.of(context)
+ .useAnotherAccount,
+ () => {
+ Navigator.of(context).pushNamed(
+ LOGIN_TYPE,
+ )
+ },
+ )),
+ ],
+ )
+ : SizedBox(),
],
))
],
@@ -340,8 +268,13 @@ class _ConfirmLogin extends State {
}
authenticateUser(type, isActive) {
+ if (type == 2 || type == 3) {
+ fingrePrintBefore = type;
+ }
this.selectedOption =
- type; //this.selectedOption && !this.onlySMSBox ? this.selectedOption : this.fingrePrintBefore ? this.fingrePrintBefore : el.value;
+ (user != null && (user.logInType == 3 || user.logInType == 2))
+ ? user.logInType
+ : fingrePrintBefore != null ? fingrePrintBefore : type;
switch (type) {
case 1:
@@ -360,32 +293,55 @@ class _ConfirmLogin extends State {
break;
}
sharedPref.setInt(LAST_LOGIN,
- type); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
+ this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
}
loginWithSMS(type, isActive) {
//if (!el.disabled) {
- if (this.user != null && this.registerd_data != null) {
+ if (this.user != null && this.registerd_data == null) {
this.checkUserAuthentication(type);
} else {
if (this.loginTokenID != null) {
+ // Future.delayed(Duration(seconds: 1), () {
this.sendActivationCode(type);
+ // });
} else {
this.checkUserAuthentication(type);
}
}
}
- checkUserAuthentication(type) {}
+ checkUserAuthentication(type) {
+ showLoader(true);
+ var req = getCommonRequest();
+ var request = CheckPatientAuthenticationReq.fromJson(req.toJson());
+
+ sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request);
+ authService.checkPatientAuthentication(request).then((value) => {
+ if (value['isSMSSent'])
+ {
+ sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']),
+ this.loginTokenID = value['LogInTokenID'],
+ sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request),
+ // Future.delayed(Duration(seconds: 1), () {
+ this.sendActivationCode(type)
+ // })
+ }
+ else
+ {
+ if (value['IsAuthenticated']) {this.checkActivationCode()}
+ }
+ });
+ }
sendActivationCode(type) {
var request = this.getCommonRequest();
loading(true);
this.authService.sendActivationCode(request).then((result) => {
- if (result['isSMSSent'] == true)
+ if (result != null && result['isSMSSent'] == true)
{loading(false), this.startSMSService(type)}
else
- {}
+ {loading(false)}
});
}
@@ -418,7 +374,7 @@ class _ConfirmLogin extends State {
getMobileInfo(request) {
this.authService.getLoginInfo(request).then((result) => {
- if (!result['SMSLoginRequired'])
+ if (result['SMSLoginRequired'] == false)
{
this.loginTokenID = result.logInTokenID,
this.patientOutSA = result.patientOutSA,
@@ -433,10 +389,12 @@ class _ConfirmLogin extends State {
}
else
{
- if (result['IsAuthenticated'])
+ if (result['IsAuthenticated'] == true)
{
setState(() {
+ isMoreOption = true;
this.onlySMSBox = true;
+ // this.fingrePrintBefore = true;
}),
//sharedPref.setBool(ONLY_SMS, true),
@@ -453,30 +411,47 @@ class _ConfirmLogin extends State {
});
}
+ setUser() async {
+ if (await sharedPref.getObject(IMEI_USER_DATA) != null)
+ user = SelectDeviceIMEIRES.fromJson(
+ await sharedPref.getObject(IMEI_USER_DATA));
+ }
+
setDefault() async {
// this.user = this.cs.sharedService.getSharedData(
// AuthenticationService.IMEI_USER_DATA,
// false
// );
- this.registerd_data = CheckPatientAuthenticationReq.fromJson(
- await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
+
+ setState(() {
+ setUser();
+ });
+
+ if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) {
+ isMoreOption = true;
+ this.registerd_data = CheckPatientAuthenticationReq.fromJson(
+ await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
+ }
this.mobileNumber = this.registerd_data != null
? this.registerd_data.patientMobileNumber
- : int.parse(this.user.Mobile);
+ : int.parse(this.user.mobile);
this.zipCode = this.registerd_data != null
? this.registerd_data.zipCode
- : this.user.OutSA ? "971" : "966";
+ : this.user.outSA == true ? "971" : "966";
this.patientOutSA = this.registerd_data != null
? this.registerd_data.zipCode == "966" ? 0 : 1
- : this.user.OutSA;
+ : this.user.outSA;
if (this.registerd_data != null) {
this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
this.loginType = this.registerd_data.searchType;
}
this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
- this.lastLogin = await sharedPref.getInt(
- LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
+ this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
+ ? await sharedPref.getInt(LAST_LOGIN)
+ : user.logInType;
+
+ //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
}
getCommonRequest() {
@@ -484,41 +459,75 @@ class _ConfirmLogin extends State {
request.patientMobileNumber = this.mobileNumber;
request.mobileNo = '0' + this.mobileNumber.toString();
request.deviceToken = this.deviceToken;
- request.projectOutSA = this.patientOutSA;
+ request.projectOutSA = this.patientOutSA == true ? 1 : 0;
request.loginType = this.selectedOption;
request.oTPSendType = this.selectedOption == 1 ? 1 : 2;
request.zipCode = this.zipCode;
- request.isRegister = false;
+
request.logInTokenID = this.loginTokenID ?? "";
+
if (this.registerd_data != null) {
- request.searchType = this.registerd_data.searchType == 1
- ? this.registerd_data.searchType
- : 1;
- request.patientID = this.registerd_data.patientID != 0
- ? this.registerd_data.patientID
- : 0;
- request.patientIdentificationID =
- request.nationalID = this.registerd_data.patientIdentificationID;
+ request.searchType = this.registerd_data.searchType ?? 1;
+ request.patientID = this.registerd_data.patientID ?? 0;
+ request.patientIdentificationID = request.nationalID =
+ this.registerd_data.patientIdentificationID ?? '0';
+
+ request.isRegister = this.registerd_data.isRegister;
} else {
- request.searchType = request.searchType == 1 ? request.searchType : 2;
- request.patientID = int.parse(this.user.PatientID);
- request.patientID = request.nationalID =
- request.nationalID != null ? request.nationalID : 0;
+ request.searchType = request.searchType ?? 2;
+ request.patientID = this.user.patientID ?? 0;
+ request.nationalID = request.nationalID ?? '0';
+ request.patientIdentificationID = request.patientIdentificationID ?? '0';
+ request.isRegister = false;
}
+ request.deviceTypeID = request.searchType;
return request;
}
- checkActivationCode({value}) {
- loading(true);
+ checkActivationCode({value}) async {
+ SMSOTP.showLoadingDialog(context, true);
var request = this.getCommonRequest().toJson();
- this.authService.checkActivationCode(request, value).then((result) => {
- this.userData =
- result.list, //AuthenticatedUser.fromJson(result['List'][0]),
- this.sharedPref.setObject(USER_PROFILE, result.list),
- this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
- this.checkIfUserAgreedBefore(result),
- loading(false)
- });
+
+ this
+ .authService
+ .checkActivationCode(request, value)
+ .then((result) => {
+ if (result is Map)
+ {
+ result = CheckActivationCode.fromJson(result),
+ if (this.registerd_data != null &&
+ this.registerd_data.isRegister == true)
+ {
+ Navigator.of(context).pushNamed(
+ REGISTER_INFO,
+ )
+ }
+ else
+ {
+ this.userData = result
+ .list, //AuthenticatedUser.fromJson(result['List'][0]),
+ this.sharedPref.setObject(USER_PROFILE, result.list),
+ this.loginTokenID = result.logInTokenID,
+ this
+ .sharedPref
+ .setObject(LOGIN_TOKEN_ID, result.logInTokenID),
+ this
+ .sharedPref
+ .setString(TOKEN, result.authenticationTokenID),
+ this.checkIfUserAgreedBefore(result),
+ // Navigator.of(context).pop(),
+ SMSOTP.showLoadingDialog(context, false),
+ }
+ }
+ else
+ {
+ // Navigator.of(context).pop(),
+ SMSOTP.showLoadingDialog(context, false),
+ Future.delayed(Duration(seconds: 1), () {
+ AppToast.showErrorToast(message: result);
+ }),
+ }
+ });
}
checkIfUserAgreedBefore(CheckActivationCode result) {
@@ -526,13 +535,17 @@ class _ConfirmLogin extends State {
if (result.isNeedUserAgreement) {
//move to agreement page.
} else {
- goToHome();
+ insertIMEI();
}
}
+ insertIMEI() {
+ authService.insertDeviceImei().then((value) => {goToHome()});
+ }
+
goToHome() {
- authService.insertDeviceImei().then((value) => print(value));
- // Navigator.of(context).pushNamed(HOME);
+ // authService.insertDeviceImei().then((value) => print(value));
+ Navigator.of(context).pushNamed(HOME);
// const request = new LoginRequest();
// if (this.loginType === AuthenticationService.IDENTIFCIATION_LOGIN_TYPE) {
// request.PatientID = 0;
@@ -570,4 +583,185 @@ class _ConfirmLogin extends State {
isLoading = flag;
});
}
+
+ Widget getButton(flag) {
+ switch (flag) {
+ case 4:
+ return InkWell(
+ onTap: () => {authenticateUser(4, true)},
+ child: RoundedContainer(
+ borderColor: Colors.grey,
+ showBorder: true,
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/login/104.png',
+ height: SizeConfig.imageSizeMultiplier * 13,
+ width: SizeConfig.imageSizeMultiplier * 16,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).verifyWhatsApp,
+ fontSize: SizeConfig.textMultiplier * 2,
+ )
+ ],
+ ),
+ )));
+ break;
+ case 1:
+ return InkWell(
+ onTap: () => {authenticateUser(1, true)},
+ child: RoundedContainer(
+ borderColor: Colors.grey,
+ showBorder: true,
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'assets/images/login/103.png',
+ height: SizeConfig.imageSizeMultiplier * 13,
+ width: SizeConfig.imageSizeMultiplier * 16,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).verifySMS,
+ fontSize: SizeConfig.textMultiplier * 2,
+ )
+ ],
+ ),
+ )));
+ break;
+ case 2:
+ return InkWell(
+ onTap: () => {authenticateUser(2, BiometricType.fingerprint.index)},
+ child: RoundedContainer(
+ backgroundColor: BiometricType.fingerprint.index == 1
+ ? Colors.white
+ : Colors.white.withOpacity(.7),
+ borderColor: Colors.grey,
+ showBorder: true,
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/login/102.png',
+ height: SizeConfig.imageSizeMultiplier * 13,
+ width: SizeConfig.imageSizeMultiplier * 16,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).verifyFingerprint,
+ fontSize: SizeConfig.textMultiplier * 2,
+ )
+ ],
+ ),
+ )));
+ break;
+ case 3:
+ return InkWell(
+ onTap: () => {authenticateUser(3, BiometricType.face.index)},
+ child: RoundedContainer(
+ backgroundColor: BiometricType.face.index == 1
+ ? Colors.white
+ : Colors.white.withOpacity(.7),
+ borderColor: Colors.grey,
+ showBorder: true,
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'assets/images/login/101.png',
+ height: SizeConfig.imageSizeMultiplier * 13,
+ width: SizeConfig.imageSizeMultiplier * 16,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).verifyFaceID,
+ fontSize: SizeConfig.textMultiplier * 2,
+ )
+ ],
+ ),
+ )));
+ break;
+
+ default:
+ return InkWell(
+ onTap: () => {
+ setState(() {
+ isMoreOption = true;
+ })
+ },
+ child: RoundedContainer(
+ backgroundColor: BiometricType.fingerprint.index == 1
+ ? Colors.white
+ : Colors.white.withOpacity(.7),
+ borderColor: Colors.grey,
+ showBorder: true,
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(0, 0, 0, 5),
+ child: Column(
+ children: [
+ Image.asset(
+ 'assets/images/login/more_icon.png',
+ height: SizeConfig.imageSizeMultiplier * 13,
+ width: SizeConfig.imageSizeMultiplier * 16,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).moreVerification,
+ fontSize: SizeConfig.textMultiplier * 2,
+ textAlign: TextAlign.center,
+ )
+ ],
+ ),
+ )));
+ }
+ }
+
+ getType(type, context) {
+ switch (type) {
+ case 1:
+ return TranslationBase.of(context).verifySMS;
+ break;
+ case 2:
+ return TranslationBase.of(context).verifyFingerprint;
+ break;
+ case 3:
+ return TranslationBase.of(context).verifyFaceID;
+ break;
+ case 4:
+ return TranslationBase.of(context).verifyWhatsApp;
+ break;
+ default:
+ return TranslationBase.of(context).verifySMS;
+ break;
+ }
+ }
+
+ formatDate(date) {
+ return DateFormat('MMM dd, yyy, kk:mm').format(date);
+ }
+
+ showLoader(bool isTrue) {
+ setState(() {
+ isLoading = isTrue;
+ });
+ }
}
diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart
index 5197b652..3706f452 100644
--- a/lib/pages/login/register.dart
+++ b/lib/pages/login/register.dart
@@ -185,6 +185,7 @@ class _Register extends State {
// if (this.loginType == 1) {
request.patientIdentificationID = int.parse(nationalIDorFile.text);
request.patientID = 0;
+ request.isRegister = true;
// } else {
// request.patientIdentificationID = 0;
// request.patientID = int.parse(nationalIDorFile.text);
@@ -223,18 +224,19 @@ class _Register extends State {
nRequest['LogInTokenID'] = response['LogInTokenID'];
if (response['hasFile'] == true) {
AppToast.showErrorToast(message: response['ErrorEndUserMessage']);
- //confirm box need to implement
- // this.cs.confirmLogin();
} else {
nRequest['forRegister'] = true;
+ nRequest['isRegister'] = true;
+ nRequest["PatientIdentificationID"] =
+ nRequest["PatientIdentificationID"].toString();
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
-
+ sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
this.chekUserData(response['LogInTokenID']);
}
} else {
- if (response['ErrorCode'] == '-986') {
- AppToast.showErrorToast(message: response['ErrorEndUserMessage']);
- }
+ // if (response['ErrorCode'] == '-986') {
+ AppToast.showErrorToast(message: response);
+ //}
}
}
@@ -262,11 +264,14 @@ class _Register extends State {
result = CheckUserStatusResponse.fromJson(result),
sharedPref.setObject(NHIC_DATA, result),
Navigator.of(context).pushNamed(
- REGISTER_INFO,
+ CONFIRM_LOGIN,
)
+ // Navigator.of(context).pushNamed(
+ // REGISTER_INFO,
+ // )
}
else
- {AppToast.showErrorToast(message: result['ErrorEndUserMessage'])}
+ {AppToast.showErrorToast(message: result)}
//this.onRegister();
});
}
diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart
index c9bce380..4cce1dc8 100644
--- a/lib/pages/medical/doctor/doctor_home_page.dart
+++ b/lib/pages/medical/doctor/doctor_home_page.dart
@@ -1,5 +1,4 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
-import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@@ -9,7 +8,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:intl/intl.dart';
import 'doctor_profile_page.dart';
diff --git a/lib/pages/medical/doctor/doctor_profile_page.dart b/lib/pages/medical/doctor/doctor_profile_page.dart
index 61bfd804..79f8c69e 100644
--- a/lib/pages/medical/doctor/doctor_profile_page.dart
+++ b/lib/pages/medical/doctor/doctor_profile_page.dart
@@ -117,7 +117,7 @@ class _DoctorProfilePageState extends State
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
- model.doctorRating.doctorRate.toDouble() ??
+ model.doctorRating.doctorRate?.toDouble() ??
0.0,
size: 35.0,
filledColor: Colors.yellow[700],
diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart
new file mode 100644
index 00000000..216b8adb
--- /dev/null
+++ b/lib/pages/medical/labs/laboratory_result_page.dart
@@ -0,0 +1,39 @@
+import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
+import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/medical/laboratory_result_widget.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+class LaboratoryResultPage extends StatelessWidget {
+ final PatientLabOrders patientLabOrders;
+
+ LaboratoryResultPage({Key key, this.patientLabOrders});
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView