Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into blood_pressure

 Conflicts:
	lib/pages/parent_categorise_page.dart
	lib/pages/sub_categorise_page.dart
merge-requests/389/head
hussam al-habibeh 4 years ago
commit f1c2dbbbfc

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,85 @@
[
{
"id": 1,
"questionEN": "Is the test intended for travel?",
"questionAR": "هل تجري التحليل بغرض السفر؟",
"ans": 2
},
{
"id": 2,
"questionEN": "Coming from outside KSA within last 2 weeks?",
"questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟",
"ans": 2
},
{
"id": 3,
"questionEN": "Do you currently have fever?",
"questionAR": "هل تعاني حاليا من حرارة؟",
"ans": 2
},
{
"id": 4,
"questionEN": "Did you have fever in last 2 weeks?",
"questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟",
"ans": 2
},
{
"id": 5,
"questionEN": "Do you have a sore throat?",
"questionAR": "هل لديك التهاب في الحلق؟",
"ans": 2
},
{
"id": 6,
"questionEN": "Do you have a runny nose?",
"questionAR": "هل لديك سيلان بالأنف؟"
},
{
"id": 7,
"questionEN": "Do you have a cough?",
"questionAR": "هل لديك سعال؟",
"ans": 2
},
{
"id": 8,
"questionEN": "Do you have shortness of breath?",
"questionAR": "هل تعانين من ضيق في التنفس؟",
"ans": 2
},
{
"id": 9,
"questionEN": "Do you have nausea?",
"questionAR": "هل تعانين من غثيان؟",
"ans": 2
},
{
"id": 10,
"questionEN": "Do you have vomiting?",
"questionAR": "هل تعاني من القيء؟",
"ans": 2
},
{
"id": 11,
"questionEN": "Do you have a headache?",
"questionAR": "هل تعاني من صداع في الرأس؟",
"ans": 2
},
{
"id": 12,
"questionEN": "Do you have muscle pain?",
"questionAR": "هل تعانين من آلام عضلية؟",
"ans": 2
},
{
"id": 13,
"questionEN": "Do you have joint pain?",
"questionAR": "هل تعانين من آلام المفاصل؟",
"ans": 2
},
{
"id": 14,
"questionEN": "Do you have diarrhea?",
"questionAR": "هل لديك اسهال؟",
"ans": 2
}
]

@ -1 +1 @@
269226e53e3ba1b1460fd3df51f89f77
e52eba3667a38bec777870899c15ae7d

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -277,6 +277,11 @@ PODS:
- Flutter
- file_picker_web (0.0.1):
- Flutter
- Firebase/Analytics (6.33.0):
- Firebase/Core
- Firebase/Core (6.33.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.8.3)
- Firebase/CoreOnly (6.33.0):
- FirebaseCore (= 6.10.3)
- Firebase/Firestore (6.33.0):
@ -285,6 +290,13 @@ PODS:
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- firebase_analytics (6.3.0):
- Firebase/Analytics (~> 6.33.0)
- Firebase/CoreOnly (~> 6.33.0)
- firebase_core
- Flutter
- firebase_analytics_web (0.1.0):
- Flutter
- firebase_core (0.5.3):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
@ -295,6 +307,15 @@ PODS:
- Firebase/Messaging (~> 6.33.0)
- firebase_core
- Flutter
- FirebaseAnalytics (6.8.3):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleAppMeasurement (= 6.8.3)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- FirebaseCore (6.10.3):
- FirebaseCoreDiagnostics (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
@ -352,11 +373,17 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- geolocator (6.1.9):
- geolocator (6.2.0):
- Flutter
- google_maps_flutter (0.0.1):
- Flutter
- GoogleMaps (< 3.10)
- GoogleAppMeasurement (6.8.3):
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0)
- GoogleMaps (3.9.0):
@ -372,6 +399,8 @@ PODS:
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
@ -435,6 +464,8 @@ PODS:
- nanopb/encode (1.30906.0)
- native_device_orientation (0.0.1):
- Flutter
- nfc_in_flutter (1.0.0):
- Flutter
- NVActivityIndicatorView (5.1.1):
- NVActivityIndicatorView/Base (= 5.1.1)
- NVActivityIndicatorView/Base (5.1.1)
@ -446,7 +477,7 @@ PODS:
- Flutter
- path_provider_windows (0.0.1):
- Flutter
- "permission_handler (5.0.1+1)":
- "permission_handler (5.1.0+2)":
- Flutter
- PromisesObjC (1.2.11)
- Protobuf (3.13.0)
@ -477,9 +508,9 @@ PODS:
- SwiftyGif (5.4.0)
- TOCropViewController (2.5.5)
- Try (2.1.1)
- "twilio_programmable_video (0.5.0+4)":
- "twilio_programmable_video (0.6.4+1)":
- Flutter
- TwilioVideo (~> 3.4)
- TwilioVideo (~> 3.7)
- TwilioVideo (3.8.0)
- url_launcher (0.0.1):
- Flutter
@ -518,6 +549,8 @@ DEPENDENCIES:
- device_info (from `.symlinks/plugins/device_info/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- file_picker_web (from `.symlinks/plugins/file_picker_web/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_analytics_web (from `.symlinks/plugins/firebase_analytics_web/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
@ -542,6 +575,7 @@ DEPENDENCIES:
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`)
- nfc_in_flutter (from `.symlinks/plugins/nfc_in_flutter/ios`)
- NVActivityIndicatorView
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@ -578,6 +612,7 @@ SPEC REPOS:
- DKImagePickerController
- DKPhotoGallery
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseFirestore
@ -585,6 +620,7 @@ SPEC REPOS:
- FirebaseInstanceID
- FirebaseMessaging
- FMDB
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleMaps
- GoogleUtilities
@ -626,6 +662,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios"
file_picker_web:
:path: ".symlinks/plugins/file_picker_web/ios"
firebase_analytics:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_analytics_web:
:path: ".symlinks/plugins/firebase_analytics_web/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_core_web:
@ -674,6 +714,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/maps_launcher/ios"
native_device_orientation:
:path: ".symlinks/plugins/native_device_orientation/ios"
nfc_in_flutter:
:path: ".symlinks/plugins/nfc_in_flutter/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_linux:
@ -746,9 +788,12 @@ SPEC CHECKSUMS:
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
file_picker_web: 37b10786e88885124fac99dc899866e78a132ef3
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
firebase_analytics: 36a619088c46224900829f14f4daa71585693a6f
firebase_analytics_web: 7d539061ea4af07563a0e21044af89cab70efec0
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseFirestore: adff4877869ca91a11250cc0989a6cd56bad163f
@ -764,8 +809,9 @@ SPEC CHECKSUMS:
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator: 057a0c63a43e9c5296d8ad845a3ac8e6df23d899
geolocator: f5e3de65e241caba7ce3e8a618803387bda73384
google_maps_flutter: c7f9c73576de1fbe152a227bfd6e6c4ae8088619
GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleMaps: 4b5346bddfe6911bb89155d43c903020170523ac
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
@ -785,12 +831,13 @@ SPEC CHECKSUMS:
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
native_device_orientation: e24d00be281de72996640885d80e706142707660
nfc_in_flutter: c656fbfb1ec5b9d021da87b0c87629d62fd5264d
NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
@ -807,7 +854,7 @@ SPEC CHECKSUMS:
SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
twilio_programmable_video: 6a41593640f3d86af60b22541fd457b22deaae7f
twilio_programmable_video: ce33772ea8275b413c0ab5c5aa2e35f9da2d4066
TwilioVideo: c13a51ceca375e91620eb7578d2573c90cf53b46
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
@ -822,6 +869,6 @@ SPEC CHECKSUMS:
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
wifi: d7d77c94109e36c4175d845f0a5964eadba71060
PODFILE CHECKSUM: ac5efa1ac3c9555d0008dc18004313c84746da62
PODFILE CHECKSUM: 900f7dc480de5b961c031ed418407e0e40ed455c
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.1

@ -220,7 +220,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */,
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -306,36 +306,36 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "Thin Binary";
outputPaths = (
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */ = {
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;

@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -33,7 +33,8 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver
const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
const DRIVER_LOCATION =
'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
@ -41,37 +42,60 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials
const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
const WIFI_CREDENTIALS =
"Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor
const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_MY_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages';
const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_PRE_POST_IMAGES =
'Services/Doctors.svc/REST/GetDoctorPrePostImages';
const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT =
'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL =
'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const SEND_COVID_LAB_RESULT_EMAIL =
'Services/Notifications.svc/REST/GenerateCOVIDReport';
const COVID_PASSPORT_UPDATE =
'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate';
const GET_PATIENT_PASSPORT_NUMBER =
'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
const SEND_RAD_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@ -80,28 +104,47 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GET_VISUAL_TRIAGE_QUESTIONS =
"services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const GET_AMBULANCE_REQUEST =
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
const UPDATE_PRESS_ORDER =
'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_ORDERS = 'rc/api/Transportation/get';
const CANCEL_AMBULANCE_REQUEST = "rc/api/Transportation/update";
const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE =
'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add";
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -110,13 +153,15 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
const GET_BABYINFORMATION_REQUEST =
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
const GET_USERINFORMATION_REQUEST =
'Services/Community.svc/REST/GetUserInformation_New';
///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@ -138,21 +183,29 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const GET_BLOOD_REQUEST =
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const SAVE_BLOOD_REQUEST =
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const GET_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
const INSERT_REQUEST_FOR_MEDICAL_REPORT =
'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const IS_LAST_APPOITMENT_RATED =
'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO =
'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@ -164,7 +217,8 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
const GET_ACTIVE_APPOINTMENTS_LIST_URL =
"Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@ -173,87 +227,124 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
const GET_DENTAL_DOCTORS_LIST_URL =
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment
const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
const INSERT_SPECIFIC_APPOINTMENT =
"Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
const GET_PATIENT_SHARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const DOCTOR_SCHEDULE_URL =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_REPORT_EYE_EMAIL =
"Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL =
"Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
"Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment
const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
const CONFIRM_APPOINTMENT =
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
const INSERT_VIDA_REQUEST =
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR
const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
const GENERATE_QR_APPOINTMENT =
"Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR
const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
const EMAIL_QR_APPOINTMENT =
"Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status
const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
const CHECK_PAYMENT_STATUS =
"Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const HIS_CREATE_ADVANCE_PAYMENT =
"Services/Patients.svc/REST/HIS_CreateAdvancePayment";
const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const ADD_ADVANCE_NUMBER_REQUEST =
'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const IS_ALLOW_ASK_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST =
'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_CLINICS =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINICS =
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_FEES =
'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const ADD_NEW_CALL_FOR_PATIENT_ER =
'Services/DoctorApplication.svc/REST/NewCallForPatientER';
const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_LIVECARE_HISTORY =
'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const CANCEL_LIVECARE_REQUEST =
'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const UPDATE_HEALTH_TERMS =
'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_PATIENT_HEALTH_STATS =
'Services/Patients.svc/REST/Med_GetTransactionsSts';
const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
const SEND_CHECK_IN_NFC_REQUEST =
'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
const HAS_DENTAL_PLAN =
'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
@ -274,16 +365,21 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_PATIENT_INSURANCE_DETAILS =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
const UPLOAD_INSURANCE_CARD =
'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_DWH";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus_DWH";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@ -293,56 +389,84 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID =
'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PROJECT_LIST =
'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_PAYMENT_INFO =
'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_FREE_SLOTS =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
const GET_PATIENT_LAST_RECORD =
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const GET_DIABETIC_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_CALL_INFO_HOURS_RESULT =
'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const UPDATE_DIABETIC_RESULT =
'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
const DEACTIVATE_DIABETIC_STATUS =
'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS =
'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const UPDATE_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
const SEND_AVERAGE_BLOOD_WEIGHT_REPORT =
'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
const SEND_AVERAGE_BLOOD_PRESSURE_REPORT =
'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
const UPDATE_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT =
'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@ -350,25 +474,35 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
const H2O_GET_USER_PROGRESS =
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_GET_USER_DETAIL =
"Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
const H2O_UPDATE_USER_DETAIL =
"Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_UNDO_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_RELATIONSHIP_TYPES =
"Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders
const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS =
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
const GET_ANCILLARY_ORDERS_DETAILS =
'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
@ -379,7 +513,8 @@ const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime";
const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
const PHARMACY_GET_COUNTRY = "countries";
const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer";
// const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer";
const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/getorcreateCustomer";
const GET_PHARMACY_BANNER = "promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts";
@ -400,34 +535,50 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders";
const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation";
const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount";
const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const GET_LACUM_ACCOUNT_INFORMATION =
"Services/Patients.svc/REST/GetLakumAccountInformation";
const GET_LACUM_GROUP_INFORMATION =
"Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const LACUM_ACCOUNT_ACTIVATE =
"Services/Patients.svc/REST/LakumAccountActivation";
const LACUM_ACCOUNT_DEACTIVATE =
"Services/Patients.svc/REST/LakumAccountDeactivation";
const CREATE_LAKUM_ACCOUNT =
"Services/Patients.svc/REST/PHR_CreateLakumAccount";
const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care
const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const HHC_GET_ALL_SERVICES =
"Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const HHC_GET_ALL_CMC_SERVICES =
"Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER =
"Services/Patients.svc/REST/PatientER_UpdatePresOrder";
const GET_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
const GET_CMC_ORDER_DETAIL_BY_ID =
"Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const GET_PATIENT_ALL_PRES_ORD =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";
@ -460,7 +611,8 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const GET_DISEASE_BY_CLINIC_ID =
'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10;
@ -476,13 +628,17 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids=';
const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
const GET_DOCTOR_LIST_CALCULATION =
"Services/Doctors.svc/REST/GetCallculationDoctors";
const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments";
const GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC =
"Services/Patients.svc/REST/GetDentalAppointments";
const GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo";
const GET_DENTAL_APPOINTMENT_INVOICE =
"Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo";
const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental";
const SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL =
"Services/Notifications.svc/REST/SendInvoiceForDental";
class AppGlobal {
static var context;

File diff suppressed because it is too large Load Diff

@ -31,3 +31,5 @@ const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
const H2O_UNIT = 'H2O_UNIT';
const H2O_REMINDER = 'H2O_REMINDER';
const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA';
const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL';

@ -0,0 +1,319 @@
class AmbulanceRequestOrdersModel {
String statusText;
int paymentStatus;
dynamic clientRequestid;
dynamic paymentStatusText;
dynamic projectName;
String nearestProjectName;
double paymentAmount;
WFOrder wFOrder;
String serviceText;
bool isSentForApproval;
int exaCartOrderId;
bool isTimer;
int timeSeconds;
int totalPendingSeconds;
int timeMinute;
int timeHour;
int timeTotalSeconds;
int timeTotalMinute;
int timeTotalHour;
dynamic approvalStatus;
bool isActive;
int clickButton;
dynamic orderHistory;
String pickupLocation;
String dropOffLocation;
String clinicName;
String doctorName;
String branch;
String time;
dynamic notes;
int id;
String patientId;
int patientOutSa;
bool isOutPatient;
int projectId;
int nearestProjectId;
dynamic longitude;
dynamic latitude;
dynamic appointmentNo;
dynamic dischargeId;
int statusId;
int serviceId;
int channel;
Orderpayment orderpayment;
dynamic orderselectedservice;
dynamic wforder;
dynamic orderapprovalobj;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
AmbulanceRequestOrdersModel(
{this.statusText,
this.paymentStatus,
this.clientRequestid,
this.paymentStatusText,
this.projectName,
this.nearestProjectName,
this.paymentAmount,
this.wFOrder,
this.serviceText,
this.isSentForApproval,
this.exaCartOrderId,
this.isTimer,
this.timeSeconds,
this.totalPendingSeconds,
this.timeMinute,
this.timeHour,
this.timeTotalSeconds,
this.timeTotalMinute,
this.timeTotalHour,
this.approvalStatus,
this.isActive,
this.clickButton,
this.orderHistory,
this.pickupLocation,
this.dropOffLocation,
this.clinicName,
this.doctorName,
this.branch,
this.time,
this.notes,
this.id,
this.patientId,
this.patientOutSa,
this.isOutPatient,
this.projectId,
this.nearestProjectId,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeId,
this.statusId,
this.serviceId,
this.channel,
this.orderpayment,
this.orderselectedservice,
this.wforder,
this.orderapprovalobj,
this.created,
this.createdBy,
this.modified,
this.modifiedBy,
this.isDeleted});
AmbulanceRequestOrdersModel.fromJson(Map<String, dynamic> json) {
statusText = json['statusText'];
paymentStatus = json['paymentStatus'];
clientRequestid = json['clientRequestid'];
paymentStatusText = json['paymentStatusText'];
projectName = json['projectName'];
nearestProjectName = json['nearestProjectName'];
paymentAmount = json['paymentAmount'];
wFOrder = json['wF_order'] != null ? new WFOrder.fromJson(json['wF_order']) : null;
serviceText = json['serviceText'];
isSentForApproval = json['isSentForApproval'];
exaCartOrderId = json['exaCart_OrderId'];
isTimer = json['isTimer'];
timeSeconds = json['timeSeconds'];
totalPendingSeconds = json['totalPendingSeconds'];
timeMinute = json['timeMinute'];
timeHour = json['timeHour'];
timeTotalSeconds = json['timeTotalSeconds'];
timeTotalMinute = json['timeTotalMinute'];
timeTotalHour = json['timeTotalHour'];
approvalStatus = json['approvalStatus'];
isActive = json['isActive'];
clickButton = json['clickButton'];
orderHistory = json['orderHistory'];
pickupLocation = json['pickupLocation'];
dropOffLocation = json['dropOffLocation'];
clinicName = json['clinicName'];
doctorName = json['doctorName'];
branch = json['branch'];
time = json['time'];
notes = json['notes'];
id = json['id'];
patientId = json['patientId'];
patientOutSa = json['patientOutSa'];
isOutPatient = json['isOutPatient'];
projectId = json['projectId'];
nearestProjectId = json['nearestProjectId'];
longitude = json['longitude'];
latitude = json['latitude'];
appointmentNo = json['appointmentNo'];
dischargeId = json['dischargeId'];
statusId = json['statusId'];
serviceId = json['serviceId'];
channel = json['channel'];
orderpayment = json['orderpayment'] != null ? new Orderpayment.fromJson(json['orderpayment']) : null;
orderselectedservice = json['orderselectedservice'];
wforder = json['wforder'];
orderapprovalobj = json['orderapprovalobj'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['statusText'] = this.statusText;
data['paymentStatus'] = this.paymentStatus;
data['clientRequestid'] = this.clientRequestid;
data['paymentStatusText'] = this.paymentStatusText;
data['projectName'] = this.projectName;
data['nearestProjectName'] = this.nearestProjectName;
data['paymentAmount'] = this.paymentAmount;
if (this.wFOrder != null) {
data['wF_order'] = this.wFOrder.toJson();
}
data['serviceText'] = this.serviceText;
data['isSentForApproval'] = this.isSentForApproval;
data['exaCart_OrderId'] = this.exaCartOrderId;
data['isTimer'] = this.isTimer;
data['timeSeconds'] = this.timeSeconds;
data['totalPendingSeconds'] = this.totalPendingSeconds;
data['timeMinute'] = this.timeMinute;
data['timeHour'] = this.timeHour;
data['timeTotalSeconds'] = this.timeTotalSeconds;
data['timeTotalMinute'] = this.timeTotalMinute;
data['timeTotalHour'] = this.timeTotalHour;
data['approvalStatus'] = this.approvalStatus;
data['isActive'] = this.isActive;
data['clickButton'] = this.clickButton;
data['orderHistory'] = this.orderHistory;
data['pickupLocation'] = this.pickupLocation;
data['dropOffLocation'] = this.dropOffLocation;
data['clinicName'] = this.clinicName;
data['doctorName'] = this.doctorName;
data['branch'] = this.branch;
data['time'] = this.time;
data['notes'] = this.notes;
data['id'] = this.id;
data['patientId'] = this.patientId;
data['patientOutSa'] = this.patientOutSa;
data['isOutPatient'] = this.isOutPatient;
data['projectId'] = this.projectId;
data['nearestProjectId'] = this.nearestProjectId;
data['longitude'] = this.longitude;
data['latitude'] = this.latitude;
data['appointmentNo'] = this.appointmentNo;
data['dischargeId'] = this.dischargeId;
data['statusId'] = this.statusId;
data['serviceId'] = this.serviceId;
data['channel'] = this.channel;
if (this.orderpayment != null) {
data['orderpayment'] = this.orderpayment.toJson();
}
data['orderselectedservice'] = this.orderselectedservice;
data['wforder'] = this.wforder;
data['orderapprovalobj'] = this.orderapprovalobj;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}
class WFOrder {
dynamic wfButtonsDTO;
int id;
int orderId;
int previousStep;
int nextStep;
int serviceId;
dynamic order;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
WFOrder({this.wfButtonsDTO, this.id, this.orderId, this.previousStep, this.nextStep, this.serviceId, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
WFOrder.fromJson(Map<String, dynamic> json) {
wfButtonsDTO = json['wf_ButtonsDTO'];
id = json['id'];
orderId = json['orderId'];
previousStep = json['previousStep'];
nextStep = json['nextStep'];
serviceId = json['serviceId'];
order = json['order'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['wf_ButtonsDTO'] = this.wfButtonsDTO;
data['id'] = this.id;
data['orderId'] = this.orderId;
data['previousStep'] = this.previousStep;
data['nextStep'] = this.nextStep;
data['serviceId'] = this.serviceId;
data['order'] = this.order;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}
class Orderpayment {
int id;
int orderId;
dynamic clientRequestId;
double totalAmount;
int paymentStatus;
dynamic order;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
Orderpayment({this.id, this.orderId, this.clientRequestId, this.totalAmount, this.paymentStatus, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
Orderpayment.fromJson(Map<String, dynamic> json) {
id = json['id'];
orderId = json['orderId'];
clientRequestId = json['clientRequestId'];
totalAmount = json['totalAmount'];
paymentStatus = json['paymentStatus'];
order = json['order'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['orderId'] = this.orderId;
data['clientRequestId'] = this.clientRequestId;
data['totalAmount'] = this.totalAmount;
data['paymentStatus'] = this.paymentStatus;
data['order'] = this.order;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}

@ -8,7 +8,7 @@ class PatientER {
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
dynamic patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
@ -164,7 +164,7 @@ class PatientER {
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['PatientID'] = this.patientID.toString();
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;

@ -0,0 +1,200 @@
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
class PatientER_RC {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
bool patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
String patientID;
String tokenID;
int patientTypeID;
int patientType;
int orderServiceID;
String patientIdentificationID;
dynamic patientOutSa;
int projectID;
int lineItemNo;
TransportationDetails transportationDetails;
PatientERTransportationMethod patientERTransportationMethod;
PatientER_RC(
{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.orderServiceID,
this.patientIdentificationID,
this.patientOutSa,
this.projectID,
this.lineItemNo,
this.transportationDetails});
PatientER_RC.fromJson(Map<String, dynamic> 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'];
orderServiceID = json['OrderServiceID'];
patientIdentificationID = json['PatientIdentificationID'];
patientOutSa = json['patientOutSa'];
projectID = json['projectID'];
lineItemNo = json['lineItemNo'];
transportationDetails = json['transportationDetails'] != null
? new TransportationDetails.fromJson(json['transportationDetails'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
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['OrderServiceID'] = this.orderServiceID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['patientOutSa'] = this.patientOutSa;
data['projectID'] = this.projectID;
data['lineItemNo'] = this.lineItemNo;
if (this.transportationDetails != null) {
data['transportationDetails'] = this.transportationDetails.toJson();
}
return data;
}
}
class TransportationDetails {
int direction;
int haveAppointment;
int tripType;
int pickupUrgency;
int pickupSpot;
String pickupDateTime;
String transportationType;
int ambulate;
String notes;
int requesterFileNo;
String requesterMobileNo;
bool requesterIsOutSA;
String pickupLocationName;
String dropoffLocationName;
String pickupLatitude;
String pickupLongitude;
String dropoffLatitude;
String dropoffLongitude;
String appointmentNo;
String appointmentClinicName;
String appointmentDoctorName;
String appointmentBranch;
String appointmentTime;
TransportationDetails(
{this.direction,
this.haveAppointment,
this.tripType,
this.pickupUrgency,
this.pickupSpot,
this.pickupDateTime,
this.transportationType,
this.ambulate,
this.notes,
this.requesterFileNo,
this.requesterMobileNo,
this.requesterIsOutSA,
this.pickupLocationName,
this.dropoffLocationName,
this.pickupLatitude,
this.pickupLongitude,
this.dropoffLatitude,
this.dropoffLongitude,
this.appointmentNo,
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime});
TransportationDetails.fromJson(Map<String, dynamic> json) {
direction = json['direction'];
haveAppointment = json['haveAppointment'];
tripType = json['tripType'];
pickupUrgency = json['pickupUrgency'];
pickupSpot = json['pickupSpot'];
pickupDateTime = json['pickupDateTime'];
transportationType = json['transportationType'];
ambulate = json['ambulate'];
notes = json['notes'];
requesterFileNo = json['requesterFileNo'];
requesterMobileNo = json['requesterMobileNo'];
requesterIsOutSA = json['requesterIsOutSA'];
pickupLocationName = json['pickupLocationName'];
dropoffLocationName = json['dropoffLocationName'];
pickupLatitude = json['pickup_Latitude'];
pickupLongitude = json['pickup_Longitude'];
dropoffLatitude = json['dropoff_Latitude'];
dropoffLongitude = json['dropoff_Longitude'];
appointmentNo = json['appointmentNo'];
appointmentClinicName = json['appointmentClinicName'];
appointmentDoctorName = json['appointmentDoctorName'];
appointmentBranch = json['appointmentBranch'];
appointmentTime = json['appointmentTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['direction'] = this.direction;
data['haveAppointment'] = this.haveAppointment;
data['tripType'] = this.tripType;
data['pickupUrgency'] = this.pickupUrgency;
data['pickupSpot'] = this.pickupSpot;
data['pickupDateTime'] = this.pickupDateTime;
data['transportationType'] = this.transportationType;
data['ambulate'] = this.ambulate;
data['notes'] = this.notes;
data['requesterFileNo'] = this.requesterFileNo;
data['requesterMobileNo'] = this.requesterMobileNo;
data['requesterIsOutSA'] = this.requesterIsOutSA;
data['pickupLocationName'] = this.pickupLocationName;
data['dropoffLocationName'] = this.dropoffLocationName;
data['pickup_Latitude'] = this.pickupLatitude;
data['pickup_Longitude'] = this.pickupLongitude;
data['dropoff_Latitude'] = this.dropoffLatitude;
data['dropoff_Longitude'] = this.dropoffLongitude;
data['appointmentNo'] = this.appointmentNo;
data['appointmentClinicName'] = this.appointmentClinicName;
data['appointmentDoctorName'] = this.appointmentDoctorName;
data['appointmentBranch'] = this.appointmentBranch;
data['appointmentTime'] = this.appointmentTime;
return data;
}
}

@ -1,79 +1,56 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientERTransportationMethod {
dynamic id;
DateTime createDate;
DateTime lastEditDate;
dynamic createdBy;
dynamic lastEditBy;
bool isActive;
String title;
String titleAR;
int id;
String serviceID;
int orderServiceID;
String text;
String textN;
dynamic price;
dynamic isDefault;
dynamic visibility;
dynamic durationId;
String description;
String descriptionAR;
dynamic totalPrice;
dynamic vAT;
dynamic priceVAT;
dynamic priceTotal;
bool isEnabled;
int orderId;
int quantity;
PatientERTransportationMethod(
{
this.id,
this.createDate,
this.lastEditDate,
this.createdBy,
this.lastEditBy,
this.isActive,
this.title,
this.titleAR,
{this.id,
this.serviceID,
this.orderServiceID,
this.text,
this.textN,
this.price,
this.isDefault,
this.visibility,
this.durationId,
this.description,
this.descriptionAR,
this.totalPrice,
this.vAT});
this.priceVAT,
this.priceTotal,
this.isEnabled,
this.orderId,
this.quantity});
PatientERTransportationMethod.fromJson(
Map<String, dynamic> json) {
id = json['Id'];
createDate = DateUtil.convertStringToDate(json['CreateDate']);
lastEditDate = DateUtil.convertStringToDate(json['LastEditDate']);
createdBy = json['CreatedBy'];
lastEditBy = json['LastEditBy'];
isActive = json['IsActive'];
title = json['Title'];
titleAR = json['TitleAR'];
price = json['Price'];
isDefault = json['isDefault'];
visibility = json['Visibility'];
durationId = json['DurationId'];
description = json['Description'];
descriptionAR = json['DescriptionAR'];
totalPrice = json['TotalPrice'];
vAT = json['VAT'];
PatientERTransportationMethod.fromJson(Map<String, dynamic> json) {
id = json['id'];
serviceID = json['serviceID'];
orderServiceID = json['orderServiceID'];
text = json['text'];
textN = json['textN'];
price = json['price'];
priceVAT = json['priceVAT'];
priceTotal = json['priceTotal'];
isEnabled = json['isEnabled'];
orderId = json['orderId'];
quantity = json['quantity'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Id'] = this.id;
data['CreateDate'] = this.createDate;
data['LastEditDate'] = this.lastEditDate;
data['CreatedBy'] = this.createdBy;
data['LastEditBy'] = this.lastEditBy;
data['IsActive'] = this.isActive;
data['Title'] = this.title;
data['TitleAR'] = this.titleAR;
data['Price'] = this.price;
data['isDefault'] = this.isDefault;
data['Visibility'] = this.visibility;
data['DurationId'] = this.durationId;
data['Description'] = this.description;
data['DescriptionAR'] = this.descriptionAR;
data['TotalPrice'] = this.totalPrice;
data['VAT'] = this.vAT;
data['id'] = this.id;
data['serviceID'] = this.serviceID;
data['orderServiceID'] = this.orderServiceID;
data['text'] = this.text;
data['textN'] = this.textN;
data['price'] = this.price;
data['priceVAT'] = this.priceVAT;
data['priceTotal'] = this.priceTotal;
data['isEnabled'] = this.isEnabled;
data['orderId'] = this.orderId;
data['quantity'] = this.quantity;
return data;
}
}
}

@ -29,38 +29,39 @@ class RequestInsertCOCItem {
int deviceTypeID;
int patientType;
double appVersion;
bool forDemo;
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});
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,
this.forDemo});
RequestInsertCOCItem.fromJson(Map<String, dynamic> json) {
isUserLoggedIn = json['IsUserLoggedIn'];
@ -93,6 +94,7 @@ class RequestInsertCOCItem {
deviceTypeID = json['DeviceTypeID'];
patientType = json['PatientType'];
appVersion = json['AppVersion'];
forDemo = json['ForDemo'];
}
Map<String, dynamic> toJson() {
@ -127,6 +129,8 @@ class RequestInsertCOCItem {
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientType'] = this.patientType;
data['AppVersion'] = this.appVersion;
data['ForDemo'] = this.forDemo;
return data;
}
}

@ -1,15 +1,29 @@
class LabResultList {
String filterName = "";
List<LabResult> patientLabResultList = List();
LabResultList({this.filterName, LabResult lab}) {
patientLabResultList.add(lab);
}
}
class LabResult {
String description;
dynamic femaleInterpretativeData;
int gender;
bool isCertificateAllowed;
int lineItemNo;
dynamic maleInterpretativeData;
String notes;
dynamic notes;
int orderLineItemNo;
int orderNo;
String packageID;
int patientID;
String projectID;
String referanceRange;
String resultValue;
int resultValueBasedLineItemNo;
String resultValueFlag;
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
@ -21,37 +35,47 @@ class LabResult {
LabResult(
{this.description,
this.femaleInterpretativeData,
this.gender,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
this.femaleInterpretativeData,
this.gender,
this.isCertificateAllowed,
this.lineItemNo,
this.maleInterpretativeData,
this.notes,
this.orderLineItemNo,
this.orderNo,
this.packageID,
this.patientID,
this.projectID,
this.referanceRange,
this.resultValue,
this.resultValueBasedLineItemNo,
this.resultValueFlag,
this.sampleCollectedOn,
this.sampleReceivedOn,
this.setupID,
this.superVerifiedOn,
this.testCode,
this.uOM,
this.verifiedOn,
this.verifiedOnDateTime});
LabResult.fromJson(Map<String, dynamic> json) {
description = json['Description'];
femaleInterpretativeData = json['FemaleInterpretativeData'];
gender = json['Gender'];
isCertificateAllowed = json['IsCertificateAllowed'];
lineItemNo = json['LineItemNo'];
maleInterpretativeData = json['MaleInterpretativeData'];
notes = json['Notes'];
orderLineItemNo = json['OrderLineItemNo'];
orderNo = json['OrderNo'];
packageID = json['PackageID'];
patientID = json['PatientID'];
projectID = json['ProjectID'];
referanceRange = json['ReferanceRange'];
resultValue = json['ResultValue'];
resultValueBasedLineItemNo = json['ResultValueBasedLineItemNo'];
resultValueFlag = json['ResultValueFlag'];
sampleCollectedOn = json['SampleCollectedOn'];
sampleReceivedOn = json['SampleReceivedOn'];
setupID = json['SetupID'];
@ -67,14 +91,19 @@ class LabResult {
data['Description'] = this.description;
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
data['Gender'] = this.gender;
data['IsCertificateAllowed'] = this.isCertificateAllowed;
data['LineItemNo'] = this.lineItemNo;
data['MaleInterpretativeData'] = this.maleInterpretativeData;
data['Notes'] = this.notes;
data['OrderLineItemNo'] = this.orderLineItemNo;
data['OrderNo'] = this.orderNo;
data['PackageID'] = this.packageID;
data['PatientID'] = this.patientID;
data['ProjectID'] = this.projectID;
data['ReferanceRange'] = this.referanceRange;
data['ResultValue'] = this.resultValue;
data['ResultValueBasedLineItemNo'] = this.resultValueBasedLineItemNo;
data['ResultValueFlag'] = this.resultValueFlag;
data['SampleCollectedOn'] = this.sampleCollectedOn;
data['SampleReceivedOn'] = this.sampleReceivedOn;
data['SetupID'] = this.setupID;
@ -86,13 +115,3 @@ class LabResult {
return data;
}
}
class LabResultList {
String filterName = "";
List<LabResult> patientLabResultList = List();
LabResultList({this.filterName, LabResult lab}) {
patientLabResultList.add(lab);
}
}

@ -1,59 +1,37 @@
class RecommendedProductModel {
List<Products> products;
RecommendedProductModel({this.products});
RecommendedProductModel.fromJson(Map<String, dynamic> json) {
if (json['products'] != null) {
products = new List<Products>();
json['products'].forEach((v) {
products.add(new Products.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.products != null) {
data['products'] = this.products.map((v) => v.toJson()).toList();
}
return data;
}
}
class Products {
String id;
dynamic id;
bool visibleIndividually;
String name;
String namen;
String shortDescription;
String shortDescriptionn;
String fullDescription;
String fullDescriptionn;
dynamic name;
dynamic namen;
List<LocalizedNames> localizedNames;
dynamic shortDescription;
dynamic shortDescriptionn;
dynamic fullDescription;
dynamic fullDescriptionn;
bool markasNew;
bool showOnHomePage;
dynamic metaKeywords;
dynamic metaDescription;
dynamic metaTitle;
// dynamic metaKeywords;
// dynamic metaDescription;
// dynamic metaTitle;
bool allowCustomerReviews;
dynamic approvedRatingSum;
dynamic notApprovedRatingSum;
dynamic approvedTotalReviews;
dynamic notApprovedTotalReviews;
String sku;
dynamic sku;
bool isRx;
bool prescriptionRequired;
dynamic rxMessage;
dynamic rxMessagen;
dynamic manufacturerPartNumber;
dynamic gtin;
// dynamic manufacturerPartNumber;
// dynamic gtin;
bool isGiftCard;
bool requireOtherProducts;
bool automaticallyAddRequiredProducts;
bool isDownload;
bool unlimitedDownloads;
dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays;
// dynamic downloadExpirationDays;
bool hasSampleDownload;
bool hasUserAgreement;
bool isRecurring;
@ -70,8 +48,8 @@ class Products {
bool useMultipleWarehouses;
dynamic manageInventoryMethodId;
dynamic stockQuantity;
String stockAvailability;
String stockAvailabilityn;
dynamic stockAvailability;
dynamic stockAvailabilityn;
bool displayStockAvailability;
bool displayStockQuantity;
dynamic minStockQuantity;
@ -79,19 +57,19 @@ class Products {
bool allowBackInStockSubscriptions;
dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity;
dynamic allowedQuantities;
// Null allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton;
bool disableWishlistButton;
bool availableForPreOrder;
dynamic preOrderAvailabilityStartDateTimeUtc;
// dynamic preOrderAvailabilityStartDateTimeUtc;
bool callForPrice;
dynamic price;
dynamic oldPrice;
dynamic productCost;
dynamic specialPrice;
dynamic specialPriceStartDateTimeUtc;
dynamic specialPriceEndDateTimeUtc;
// dynamic specialPrice;
// dynamic specialPriceStartDateTimeUtc;
// dynamic specialPriceEndDateTimeUtc;
bool customerEntersPrice;
dynamic minimumCustomerEnteredPrice;
dynamic maximumCustomerEnteredPrice;
@ -100,148 +78,174 @@ class Products {
dynamic basepriceBaseAmount;
bool hasTierPrices;
bool hasDiscountsApplied;
dynamic discountName;
dynamic discountNamen;
dynamic discountDescription;
dynamic discountDescriptionn;
dynamic discountPercentage;
String currency;
String currencyn;
double weight;
// dynamic discountName;
// dynamic discountNamen;
// dynamic discountDescription;
// dynamic discountDescriptionn;
// dynamic discountPercentage;
dynamic currency;
dynamic currencyn;
dynamic weight;
dynamic length;
dynamic width;
dynamic height;
dynamic availableStartDateTimeUtc;
dynamic availableEndDateTimeUtc;
// dynamic availableStartDateTimeUtc;
// dynamic availableEndDateTimeUtc;
dynamic displayOrder;
bool published;
bool deleted;
String createdOnUtc;
String updatedOnUtc;
String productType;
dynamic createdOnUtc;
dynamic updatedOnUtc;
dynamic productType;
dynamic parentGroupedProductId;
dynamic vendorId;
String seName;
// List<dynamic> roleIds;
// List<dynamic> discountIds;
// List<dynamic> storeIds;
List<dynamic> manufacturerIds;
// List<dynamic> reviews;
List<Images> images;
// List<dynamic> attributes;
List<Specifications> specifications;
// List<dynamic> associatedProductIds;
// List<dynamic> tags;
dynamic vendorId;
dynamic seName;
bool isinwishlist;
Products({
this.id,
this.visibleIndividually,
this.name,
this.namen,
this.shortDescription,
this.shortDescriptionn,
this.fullDescription,
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
this.approvedTotalReviews,
this.notApprovedTotalReviews,
this.sku,
this.isRx,
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
this.manufacturerPartNumber,
this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
this.recurringCycleLength,
this.recurringTotalCycles,
this.isRental,
this.rentalPriceLength,
this.isShipEnabled,
this.isFreeShipping,
this.shipSeparately,
this.additionalShippingCharge,
this.isTaxExempt,
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
this.useMultipleWarehouses,
this.manageInventoryMethodId,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.displayStockAvailability,
this.displayStockQuantity,
this.minStockQuantity,
this.notifyAdminForQuantityBelow,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
this.availableForPreOrder,
this.preOrderAvailabilityStartDateTimeUtc,
this.callForPrice,
this.price,
this.oldPrice,
this.productCost,
this.specialPrice,
this.specialPriceStartDateTimeUtc,
this.specialPriceEndDateTimeUtc,
this.customerEntersPrice,
this.minimumCustomerEnteredPrice,
this.maximumCustomerEnteredPrice,
this.basepriceEnabled,
this.basepriceAmount,
this.basepriceBaseAmount,
this.hasTierPrices,
this.hasDiscountsApplied,
this.discountName,
this.discountNamen,
this.discountDescription,
this.discountDescriptionn,
this.discountPercentage,
this.currency,
this.currencyn,
this.weight,
this.length,
this.width,
this.height,
this.availableStartDateTimeUtc,
this.availableEndDateTimeUtc,
this.displayOrder,
this.published,
this.deleted,
this.createdOnUtc,
this.updatedOnUtc,
this.productType,
this.parentGroupedProductId,
this.vendorId,
this.seName,
this.images,
});
RecommendedProductModel(
{this.id,
this.visibleIndividually,
this.name,
this.namen,
this.localizedNames,
this.shortDescription,
this.shortDescriptionn,
this.fullDescription,
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
// this.metaKeywords,
// this.metaDescription,
// this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
this.approvedTotalReviews,
this.notApprovedTotalReviews,
this.sku,
this.isRx,
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
// this.manufacturerPartNumber,
// this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
// this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
this.recurringCycleLength,
this.recurringTotalCycles,
this.isRental,
this.rentalPriceLength,
this.isShipEnabled,
this.isFreeShipping,
this.shipSeparately,
this.additionalShippingCharge,
this.isTaxExempt,
this.isTelecommunicationsOrBroadcastingOrElectronicServices,
this.useMultipleWarehouses,
this.manageInventoryMethodId,
this.stockQuantity,
this.stockAvailability,
this.stockAvailabilityn,
this.displayStockAvailability,
this.displayStockQuantity,
this.minStockQuantity,
this.notifyAdminForQuantityBelow,
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
// this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
this.availableForPreOrder,
// this.preOrderAvailabilityStartDateTimeUtc,
this.callForPrice,
this.price,
this.oldPrice,
this.productCost,
// this.specialPrice,
// this.specialPriceStartDateTimeUtc,
// this.specialPriceEndDateTimeUtc,
this.customerEntersPrice,
this.minimumCustomerEnteredPrice,
this.maximumCustomerEnteredPrice,
this.basepriceEnabled,
this.basepriceAmount,
this.basepriceBaseAmount,
this.hasTierPrices,
this.hasDiscountsApplied,
// this.discountName,
// this.discountNamen,
// this.discountDescription,
// this.discountDescriptionn,
// this.discountPercentage,
this.currency,
this.currencyn,
this.weight,
this.length,
this.width,
this.height,
// this.availableStartDateTimeUtc,
// this.availableEndDateTimeUtc,
this.displayOrder,
this.published,
this.deleted,
this.createdOnUtc,
this.updatedOnUtc,
this.productType,
this.parentGroupedProductId,
// this.roleIds,
// this.discountIds,
// this.storeIds,
this.manufacturerIds,
// this.reviews,
this.images,
// this.attributes,
this.specifications,
// this.associatedProductIds,
// this.tags,
this.vendorId,
this.seName,
this.isinwishlist});
Products.fromJson(Map<String, dynamic> json) {
RecommendedProductModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
visibleIndividually = json['visible_individually'];
name = json['name'];
namen = json['namen'];
if (json['localized_names'] != null) {
localizedNames = new List<LocalizedNames>();
json['localized_names'].forEach((v) {
localizedNames.add(new LocalizedNames.fromJson(v));
});
}
shortDescription = json['short_description'];
shortDescriptionn = json['short_descriptionn'];
fullDescription = json['full_description'];
fullDescriptionn = json['full_descriptionn'];
markasNew = json['markas_new'];
showOnHomePage = json['show_on_home_page'];
metaKeywords = json['meta_keywords'];
metaDescription = json['meta_description'];
metaTitle = json['meta_title'];
// metaKeywords = json['meta_keywords'];
// metaDescription = json['meta_description'];
// metaTitle = json['meta_title'];
allowCustomerReviews = json['allow_customer_reviews'];
approvedRatingSum = json['approved_rating_sum'];
notApprovedRatingSum = json['not_approved_rating_sum'];
@ -252,16 +256,16 @@ class Products {
prescriptionRequired = json['prescription_required'];
rxMessage = json['rx_message'];
rxMessagen = json['rx_messagen'];
manufacturerPartNumber = json['manufacturer_part_number'];
gtin = json['gtin'];
// manufacturerPartNumber = json['manufacturer_part_number'];
// gtin = json['gtin'];
isGiftCard = json['is_gift_card'];
requireOtherProducts = json['require_other_products'];
automaticallyAddRequiredProducts =
json['automatically_add_required_products'];
json['automatically_add_required_products'];
isDownload = json['is_download'];
unlimitedDownloads = json['unlimited_downloads'];
maxNumberOfDownloads = json['max_number_of_downloads'];
downloadExpirationDays = json['download_expiration_days'];
// downloadExpirationDays = json['download_expiration_days'];
hasSampleDownload = json['has_sample_download'];
hasUserAgreement = json['has_user_agreement'];
isRecurring = json['is_recurring'];
@ -275,7 +279,7 @@ class Products {
additionalShippingCharge = json['additional_shipping_charge'];
isTaxExempt = json['is_tax_exempt'];
isTelecommunicationsOrBroadcastingOrElectronicServices =
json['is_telecommunications_or_broadcasting_or_electronic_services'];
json['is_telecommunications_or_broadcasting_or_electronic_services'];
useMultipleWarehouses = json['use_multiple_warehouses'];
manageInventoryMethodId = json['manage_inventory_method_id'];
stockQuantity = json['stock_quantity'];
@ -288,21 +292,21 @@ class Products {
allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions'];
orderMinimumQuantity = json['order_minimum_quantity'];
orderMaximumQuantity = json['order_maximum_quantity'];
allowedQuantities = json['allowed_quantities'];
// allowedQuantities = json['allowed_quantities'];
allowAddingOnlyExistingAttributeCombinations =
json['allow_adding_only_existing_attribute_combinations'];
json['allow_adding_only_existing_attribute_combinations'];
disableBuyButton = json['disable_buy_button'];
disableWishlistButton = json['disable_wishlist_button'];
availableForPreOrder = json['available_for_pre_order'];
preOrderAvailabilityStartDateTimeUtc =
json['pre_order_availability_start_date_time_utc'];
// preOrderAvailabilityStartDateTimeUtc =
// json['pre_order_availability_start_date_time_utc'];
callForPrice = json['call_for_price'];
price = json['price'];
oldPrice = json['old_price'];
productCost = json['product_cost'];
specialPrice = json['special_price'];
specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc'];
specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc'];
// specialPrice = json['special_price'];
// specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc'];
// specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc'];
customerEntersPrice = json['customer_enters_price'];
minimumCustomerEnteredPrice = json['minimum_customer_entered_price'];
maximumCustomerEnteredPrice = json['maximum_customer_entered_price'];
@ -311,19 +315,19 @@ class Products {
basepriceBaseAmount = json['baseprice_base_amount'];
hasTierPrices = json['has_tier_prices'];
hasDiscountsApplied = json['has_discounts_applied'];
discountName = json['discount_name'];
discountNamen = json['discount_namen'];
discountDescription = json['discount_description'];
discountDescriptionn = json['discount_Descriptionn'];
discountPercentage = json['discount_percentage'];
// discountName = json['discount_name'];
// discountNamen = json['discount_namen'];
// discountDescription = json['discount_description'];
// discountDescriptionn = json['discount_Descriptionn'];
// discountPercentage = json['discount_percentage'];
currency = json['currency'];
currencyn = json['currencyn'];
weight = json['weight'];
length = json['length'];
width = json['width'];
height = json['height'];
availableStartDateTimeUtc = json['available_start_date_time_utc'];
availableEndDateTimeUtc = json['available_end_date_time_utc'];
// availableStartDateTimeUtc = json['available_start_date_time_utc'];
// availableEndDateTimeUtc = json['available_end_date_time_utc'];
displayOrder = json['display_order'];
published = json['published'];
deleted = json['deleted'];
@ -331,14 +335,64 @@ class Products {
updatedOnUtc = json['updated_on_utc'];
productType = json['product_type'];
parentGroupedProductId = json['parent_grouped_product_id'];
vendorId = json['vendor_id'];
seName = json['se_name'];
// if (json['role_ids'] != null) {
// roleIds = new List<Null>();
// json['role_ids'].forEach((v) {
// roleIds.add(new Null.fromJson(v));
// });
// }
// if (json['discount_ids'] != null) {
// discountIds = new List<Null>();
// json['discount_ids'].forEach((v) {
// discountIds.add(new Null.fromJson(v));
// });
// }
// if (json['store_ids'] != null) {
// storeIds = new List<Null>();
// json['store_ids'].forEach((v) {
// storeIds.add(new Null.fromJson(v));
// });
// }
manufacturerIds = json['manufacturer_ids'].cast<dynamic>();
// if (json['reviews'] != null) {
// reviews = new List<Null>();
// json['reviews'].forEach((v) {
// reviews.add(new Null.fromJson(v));
// });
// }
if (json['images'] != null) {
images = new List<Images>();
json['images'].forEach((v) {
images.add(new Images.fromJson(v));
});
}
// if (json['attributes'] != null) {
// attributes = new List<Null>();
// json['attributes'].forEach((v) {
// attributes.add(new Null.fromJson(v));
// });
// }
if (json['specifications'] != null) {
specifications = new List<Specifications>();
json['specifications'].forEach((v) {
specifications.add(new Specifications.fromJson(v));
});
}
// if (json['associated_product_ids'] != null) {
// associatedProductIds = new List<Null>();
// json['associated_product_ids'].forEach((v) {
// associatedProductIds.add(new Null.fromJson(v));
// });
// }
// if (json['tags'] != null) {
// tags = new List<Null>();
// json['tags'].forEach((v) {
// tags.add(new Null.fromJson(v));
// });
// }
vendorId = json['vendor_id'];
seName = json['se_name'];
isinwishlist = json['isinwishlist'];
}
Map<String, dynamic> toJson() {
@ -347,15 +401,19 @@ class Products {
data['visible_individually'] = this.visibleIndividually;
data['name'] = this.name;
data['namen'] = this.namen;
if (this.localizedNames != null) {
data['localized_names'] =
this.localizedNames.map((v) => v.toJson()).toList();
}
data['short_description'] = this.shortDescription;
data['short_descriptionn'] = this.shortDescriptionn;
data['full_description'] = this.fullDescription;
data['full_descriptionn'] = this.fullDescriptionn;
data['markas_new'] = this.markasNew;
data['show_on_home_page'] = this.showOnHomePage;
data['meta_keywords'] = this.metaKeywords;
data['meta_description'] = this.metaDescription;
data['meta_title'] = this.metaTitle;
// data['meta_keywords'] = this.metaKeywords;
// data['meta_description'] = this.metaDescription;
// data['meta_title'] = this.metaTitle;
data['allow_customer_reviews'] = this.allowCustomerReviews;
data['approved_rating_sum'] = this.approvedRatingSum;
data['not_approved_rating_sum'] = this.notApprovedRatingSum;
@ -366,8 +424,8 @@ class Products {
data['prescription_required'] = this.prescriptionRequired;
data['rx_message'] = this.rxMessage;
data['rx_messagen'] = this.rxMessagen;
data['manufacturer_part_number'] = this.manufacturerPartNumber;
data['gtin'] = this.gtin;
// data['manufacturer_part_number'] = this.manufacturerPartNumber;
// data['gtin'] = this.gtin;
data['is_gift_card'] = this.isGiftCard;
data['require_other_products'] = this.requireOtherProducts;
data['automatically_add_required_products'] =
@ -375,7 +433,7 @@ class Products {
data['is_download'] = this.isDownload;
data['unlimited_downloads'] = this.unlimitedDownloads;
data['max_number_of_downloads'] = this.maxNumberOfDownloads;
data['download_expiration_days'] = this.downloadExpirationDays;
// data['download_expiration_days'] = this.downloadExpirationDays;
data['has_sample_download'] = this.hasSampleDownload;
data['has_user_agreement'] = this.hasUserAgreement;
data['is_recurring'] = this.isRecurring;
@ -403,22 +461,22 @@ class Products {
this.allowBackInStockSubscriptions;
data['order_minimum_quantity'] = this.orderMinimumQuantity;
data['order_maximum_quantity'] = this.orderMaximumQuantity;
data['allowed_quantities'] = this.allowedQuantities;
// data['allowed_quantities'] = this.allowedQuantities;
data['allow_adding_only_existing_attribute_combinations'] =
this.allowAddingOnlyExistingAttributeCombinations;
data['disable_buy_button'] = this.disableBuyButton;
data['disable_wishlist_button'] = this.disableWishlistButton;
data['available_for_pre_order'] = this.availableForPreOrder;
data['pre_order_availability_start_date_time_utc'] =
this.preOrderAvailabilityStartDateTimeUtc;
// data['pre_order_availability_start_date_time_utc'] =
// this.preOrderAvailabilityStartDateTimeUtc;
data['call_for_price'] = this.callForPrice;
data['price'] = this.price;
data['old_price'] = this.oldPrice;
data['product_cost'] = this.productCost;
data['special_price'] = this.specialPrice;
data['special_price_start_date_time_utc'] =
this.specialPriceStartDateTimeUtc;
data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
// data['special_price'] = this.specialPrice;
// data['special_price_start_date_time_utc'] =
// this.specialPriceStartDateTimeUtc;
// data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc;
data['customer_enters_price'] = this.customerEntersPrice;
data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice;
data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice;
@ -427,19 +485,19 @@ class Products {
data['baseprice_base_amount'] = this.basepriceBaseAmount;
data['has_tier_prices'] = this.hasTierPrices;
data['has_discounts_applied'] = this.hasDiscountsApplied;
data['discount_name'] = this.discountName;
data['discount_namen'] = this.discountNamen;
data['discount_description'] = this.discountDescription;
data['discount_Descriptionn'] = this.discountDescriptionn;
data['discount_percentage'] = this.discountPercentage;
// data['discount_name'] = this.discountName;
// data['discount_namen'] = this.discountNamen;
// data['discount_description'] = this.discountDescription;
// data['discount_Descriptionn'] = this.discountDescriptionn;
// data['discount_percentage'] = this.discountPercentage;
data['currency'] = this.currency;
data['currencyn'] = this.currencyn;
data['weight'] = this.weight;
data['length'] = this.length;
data['width'] = this.width;
data['height'] = this.height;
data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
// data['available_start_date_time_utc'] = this.availableStartDateTimeUtc;
// data['available_end_date_time_utc'] = this.availableEndDateTimeUtc;
data['display_order'] = this.displayOrder;
data['published'] = this.published;
data['deleted'] = this.deleted;
@ -447,19 +505,65 @@ class Products {
data['updated_on_utc'] = this.updatedOnUtc;
data['product_type'] = this.productType;
data['parent_grouped_product_id'] = this.parentGroupedProductId;
data['vendor_id'] = this.vendorId;
data['se_name'] = this.seName;
// if (this.roleIds != null) {
// data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList();
// }
// if (this.discountIds != null) {
// data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList();
// }
// if (this.storeIds != null) {
// data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList();
// }
data['manufacturer_ids'] = this.manufacturerIds;
// if (this.reviews != null) {
// data['reviews'] = this.reviews.map((v) => v.toJson()).toList();
// }
if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList();
}
// if (this.attributes != null) {
// data['attributes'] = this.attributes.map((v) => v.toJson()).toList();
// }
if (this.specifications != null) {
data['specifications'] =
this.specifications.map((v) => v.toJson()).toList();
}
// if (this.associatedProductIds != null) {
// data['associated_product_ids'] =
// this.associatedProductIds.map((v) => v.toJson()).toList();
// }
// if (this.tags != null) {
// data['tags'] = this.tags.map((v) => v.toJson()).toList();
// }
data['vendor_id'] = this.vendorId;
data['se_name'] = this.seName;
data['isinwishlist'] = this.isinwishlist;
return data;
}
}
class LocalizedNames {
dynamic languageId;
String localizedName;
LocalizedNames({this.languageId, this.localizedName});
LocalizedNames.fromJson(Map<String, dynamic> json) {
languageId = json['language_id'];
localizedName = json['localized_name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['language_id'] = this.languageId;
data['localized_name'] = this.localizedName;
return data;
}
}
class Images {
int id;
int position;
dynamic id;
dynamic position;
String src;
String thumb;
String attachment;
@ -484,3 +588,40 @@ class Images {
return data;
}
}
class Specifications {
dynamic id;
dynamic displayOrder;
String defaultValue;
String defaultValuen;
String name;
String nameN;
Specifications(
{this.id,
this.displayOrder,
this.defaultValue,
this.defaultValuen,
this.name,
this.nameN});
Specifications.fromJson(Map<String, dynamic> json) {
id = json['id'];
displayOrder = json['display_order'];
defaultValue = json['default_value'];
defaultValuen = json['default_valuen'];
name = json['name'];
nameN = json['nameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['display_order'] = this.displayOrder;
data['default_value'] = this.defaultValue;
data['default_valuen'] = this.defaultValuen;
data['name'] = this.name;
data['nameN'] = this.nameN;
return data;
}
}

@ -13,7 +13,7 @@ class SickLeave {
int appointmentNo;
int admissionNo;
int actualDoctorRate;
String appointmentDate;
DateTime appointmentDate;
String clinicName;
String doctorImageURL;
String doctorName;
@ -80,7 +80,7 @@ class SickLeave {
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
actualDoctorRate = json['ActualDoctorRate'];
appointmentDate = json['AppointmentDate'];
appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']);
clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class AncillaryOrdersService extends BaseService {
List<AncillaryOrdersListModel> _ancillaryLists = List();
@ -20,6 +21,8 @@ class AncillaryOrdersService extends BaseService {
_ancillaryLists = [];
response['AncillaryOrderList'].forEach((item) {
ancillaryLists.add(AncillaryOrdersListModel.fromJson(item));
print("response of ancillary Lists__________");
print(response);
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -27,175 +30,25 @@ class AncillaryOrdersService extends BaseService {
}, body: body);
}
Future getOrdersDetails(appointmentNo, orderNo) async {
Future getOrdersDetails(appointmentNo, orderNo, projectID) async {
Map<String, dynamic> body = Map();
body['AppointmentNo_Vida'] = appointmentNo;
body['OrderNo'] = orderNo;
body['ProjectID'] = projectID;
// "OrderNo=$orderNo&AppointmentNo_Vida=$appointmentNo&ProjectID=$projectID"
hasError = false;
await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS,
onSuccess: (dynamic response, int statusCode) {
_ancillaryProcLists = [];
response['AncillaryOrderProcList'] = [
{
"AncillaryOrderProcList": [
{
"ApprovalLineItemNo": 0,
"ApprovalNo": 0,
"ApprovalStatus": "",
"ApprovalStatusID": 0,
"CompanyShare": 501.3,
"CompanyShareWithTax": 576.5,
"CompanyTaxAmount": 75.19,
"DiscountAmount": 55.7,
"DiscountCategory": 1,
"DiscountType": "P",
"DiscountTypeValue": 10,
"IsApprovalCreated": false,
"IsApprovalRequired": false,
"IsCovered": false,
"OrderDate": "/Date(1601758800000+0300)/",
"OrderLineItemNo": 1,
"OrderNo": 2020000001,
"PartnerID": 0,
"PartnerShare": 0,
"PartnerShareType": "P",
"PatientShare": 0,
"PatientShareWithTax": 0,
"PatientTaxAmount": 0,
"ProcPrice": 557,
"ProcedureCategoryID": 2,
"ProcedureCategoryName": "LABORATORY",
"ProcedureID": "02013001",
"ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O",
"TaxAmount": 75.19,
"TaxPct": 15
},
{
"ApprovalLineItemNo": 0,
"ApprovalNo": 0,
"ApprovalStatus": "",
"ApprovalStatusID": 0,
"CompanyShare": 90,
"CompanyShareWithTax": 103.5,
"CompanyTaxAmount": 13.5,
"DiscountAmount": 10,
"DiscountCategory": 1,
"DiscountType": "P",
"DiscountTypeValue": 10,
"IsApprovalCreated": false,
"IsApprovalRequired": true,
"IsCovered": false,
"OrderDate": "/Date(1601758800000+0300)/",
"OrderLineItemNo": 4,
"OrderNo": 2020000001,
"PartnerID": 0,
"PartnerShare": 0,
"PartnerShareType": "P",
"PatientShare": 0,
"PatientShareWithTax": 0,
"PatientTaxAmount": 0,
"ProcPrice": 100,
"ProcedureCategoryID": 2,
"ProcedureCategoryName": "LABORATORY",
"ProcedureID": "02014011",
"ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)",
"TaxAmount": 13.5,
"TaxPct": 15
},
{
"ApprovalLineItemNo": 0,
"ApprovalNo": 0,
"ApprovalStatus": "",
"ApprovalStatusID": 0,
"CompanyShare": 347.76,
"CompanyShareWithTax": 399.92,
"CompanyTaxAmount": 52.16,
"DiscountAmount": 38.64,
"DiscountCategory": 1,
"DiscountType": "P",
"DiscountTypeValue": 10,
"IsApprovalCreated": false,
"IsApprovalRequired": false,
"IsCovered": false,
"OrderDate": "/Date(1601758800000+0300)/",
"OrderLineItemNo": 3,
"OrderNo": 2020000001,
"PartnerID": 0,
"PartnerShare": 0,
"PartnerShareType": "P",
"PatientShare": 0,
"PatientShareWithTax": 0,
"PatientTaxAmount": 0,
"ProcPrice": 386.4,
"ProcedureCategoryID": 2,
"ProcedureCategoryName": "LABORATORY",
"ProcedureID": "02019302",
"ProcedureName": "21-HYDROXYLASE ABS - S.O",
"TaxAmount": 52.16,
"TaxPct": 15
},
{
"ApprovalLineItemNo": 0,
"ApprovalNo": 0,
"ApprovalStatus": "",
"ApprovalStatusID": 0,
"CompanyShare": 1323,
"CompanyShareWithTax": 1521.45,
"CompanyTaxAmount": 198.45,
"DiscountAmount": 147,
"DiscountCategory": 1,
"DiscountType": "P",
"DiscountTypeValue": 10,
"IsApprovalCreated": false,
"IsApprovalRequired": true,
"IsCovered": false,
"OrderDate": "/Date(1601758800000+0300)/",
"OrderLineItemNo": 5,
"OrderNo": 2020000001,
"PartnerID": 0,
"PartnerShare": 0,
"PartnerShareType": "P",
"PatientShare": 0,
"PatientShareWithTax": 0,
"PatientTaxAmount": 0,
"ProcPrice": 1470,
"ProcedureCategoryID": 3,
"ProcedureCategoryName": "RADIOLOGY",
"ProcedureID": "03033065",
"ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)",
"TaxAmount": 198.45,
"TaxPct": 15
}
],
"AppointmentDate": "/Date(1601499600000+0300)/",
"AppointmentNo": 2016053756,
"ClinicID": 1,
"ClinicName": "INTERNAL MEDICINE CLINIC",
"CompanyID": 0,
"CompanyName": "Blood Donation Investigation",
"DoctorID": 1485,
"DoctorName": "ANAS ABDULLAH",
"ErrCode": null,
"GroupID": 2,
"InsurancePolicyNo": "45976500",
"Message": "Success",
"PatientCardID": "232332323",
"PatientID": 3072055,
"PatientName": "MAYA KHALED SADDIQ",
"PatientType": 1,
"PolicyID": 2,
"PolicyName": "Test",
"ProjectID": 15,
"SetupID": "010266",
"StatusCode": 1,
"SubCategoryID": 2,
"SubPolicyNo": "234234"
}
];
response['AncillaryOrderProcList'].forEach((item) {
ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item));
// ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(response['AncillaryOrderProcList']));
print("----------------------------------");
print("Test data");
print(response);
});
//Future.value(_ancillaryProcLists);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -118,7 +118,8 @@ class BaseAppClient {
}
print("URL : $url");
print("Body : ${json.encode(body)}");
final jsonBody = json.encode(body);
print(jsonBody);
if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), body: json.encode(body), headers: headers);

@ -1,45 +1,49 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:flutter/cupertino.dart';
import '../base_service.dart';
class AmService extends BaseService {
List<PatientERTransportationMethod> amModelList = List();
List<PatientAllPresOrders> patientAllPresOrdersList = List();
List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList = List();
bool hasPendingOrder = false;
int pendingOrderID = 0;
String pendingOrderStatus = "";
String pendingOrderStatusAR = "";
PickUpRequestPresOrder pickUpRequestPresOrder;
AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder;
Future getAllTransportationOrders() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['IdentificationNo'] = user.patientIdentificationNo;
await baseAppClient.post(GET_AMBULANCE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.get(GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(), isExternal: false, onSuccess: (dynamic response, int statusCode) {
amModelList.clear();
response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
response['data']['transportationservices'].forEach((item) {
amModelList.add(PatientERTransportationMethod.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
});
}
Future getPatientAllPresOrdersList() async {
hasError = false;
hasPendingOrder = false;
pickUpRequestPresOrder = null;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((item) {
if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) {
@ -59,15 +63,48 @@ class AmService extends BaseService {
}, body: Map());
}
Future getPatientAllPresOrdersListRC(dynamic patientID) async {
hasError = false;
hasPendingOrder = false;
pickUpRequestPresOrder = null;
Map<String, dynamic> body = Map();
body['patientId'] = patientID.toString();
body['PatientID'] = patientID.toString();
await baseAppClient.post(GET_ALL_TRANSPORTATIONS_ORDERS, onSuccess: (dynamic response, int statusCode) {
patientAmbulanceRequestOrdersList.clear();
hasPendingOrder = false;
pendingOrderID = 0;
pendingAmbulanceRequestOrder = null;
response['data'].forEach((item) {
patientAmbulanceRequestOrdersList.add(AmbulanceRequestOrdersModel.fromJson(item));
if (item['statusId'] == 1) {
hasPendingOrder = true;
pendingOrderID = item['orderpayment']['id'];
pendingOrderStatus = item['statusText'];
pendingOrderStatusAR = item['statusText'];
pendingAmbulanceRequestOrder = AmbulanceRequestOrdersModel.fromJson(item);
}
});
print(patientAmbulanceRequestOrdersList.length);
print(hasPendingOrder);
print(pendingOrderID);
print(pendingOrderStatus);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getOrderDetails() async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = pendingOrderID;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
onSuccess: (dynamic response, int statusCode) {
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
.forEach((item) {
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, onSuccess: (dynamic response, int statusCode) {
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'].forEach((item) {
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
});
}, onFailure: (String error, int statusCode) {
@ -84,24 +121,34 @@ class AmService extends BaseService {
body['RejectionReason'] = '';
body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(UPDATE_PRESS_ORDER, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}, onFailure: (String error, int statusCode) {
Future updatePressOrderRC({@required int presOrderID, @required String patientID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['Id'] = presOrderID;
body['StatusId'] = 6;
body['ClickButton'] = 14;
body['PatientID'] = patientID;
await baseAppClient.post(CANCEL_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertERPressOrder({@required PatientER patientER}) async {
Future insertERPressOrder({@required PatientER_RC patientER}) async {
hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
var body = patientER.toJson();
print(body);
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patientER.toJson());
}, body: body);
}
}

@ -7,9 +7,6 @@ class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
hasError = false;
@ -23,21 +20,15 @@ class ErService extends BaseService {
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
dynamic localRes;
await baseAppClient.post(GET_NEAREST_HOSPITAL,
onSuccess: (dynamic response, int statusCode) {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList
.add(ProjectAvgERWaitingTime.fromJson(vital));
});
projectAvgERWaitingTimeModelList.forEach((element) {
Latitude = '${element.latitude}';
Longitude = '${element.longitude}';
PhoneNumber = '${element.phoneNumber}';
});
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.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';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -11,41 +12,46 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List();
RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
List<AppointmentHistory> appointHistoryList = List();
List<AppoitmentAllHistoryResultList> appointHistoryList = List();
Future sendCOCItem(
{String title,
String details,
String cOCTypeName,
String attachment,
AppointmentHistory appointHistory}) async {
AppoitmentAllHistoryResultList appointHistory}) async {
hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_requestInsertCOCItem.attachment = attachment;
_requestInsertCOCItem.title = title;
_requestInsertCOCItem.details = details;
_requestInsertCOCItem.cOCTypeName = cOCTypeName;
_requestInsertCOCItem.formTypeID = cOCTypeName;
_requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.mobileNo =
"966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.isUserLoggedIn = true;
_requestInsertCOCItem.projectID = user.projectID;
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
_requestInsertCOCItem.fileName = "";
_requestInsertCOCItem.appVersion = VERSION_ID;
_requestInsertCOCItem.uILanguage = languageID; //TODO Change it to be dynamic
_requestInsertCOCItem.uILanguage =
languageID; //TODO Change it to be dynamic
_requestInsertCOCItem.browserInfo = Platform.localHostname;
_requestInsertCOCItem.deviceInfo = Platform.localHostname;
_requestInsertCOCItem.resolution = "400x847";
_requestInsertCOCItem.projectID = 0;
_requestInsertCOCItem.identificationNo =
int.parse(user.patientIdentificationNo);
if (BASE_URL.contains('uat')) {
_requestInsertCOCItem.forDemo = true;
}
final Map<String, dynamic> body = _requestInsertCOCItem.toJson();
if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate);
body['AppointmentDate'] = appointHistory.appointmentDate;
body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID;
@ -65,9 +71,13 @@ class FeedbackService extends BaseService {
hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>();
body['IdentificationNo'] = user.patientIdentificationNo;
body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['MobileNo'] =
"966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['Searching_type'] = '1';
if (BASE_URL.contains('uat')) {
body['ForDemo'] = true;
}
await baseAppClient.post(GET_STATUS_FOR_COCO,
onSuccess: (dynamic response, int statusCode) {
cOCItemList = [];
@ -88,7 +98,8 @@ class FeedbackService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) {
appointHistoryList.add(AppointmentHistory.fromJson(appoint));
appointHistoryList
.add(AppoitmentAllHistoryResultList.fromJson(appoint));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -3,21 +3,18 @@ import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart';
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_orders.dart';
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 {
List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList() async {
hasError = false;
Map<String,dynamic> body = Map();
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_Patient_LAB_ORDERS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_Patient_LAB_ORDERS, onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear();
response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
@ -28,26 +25,20 @@ class LabsService extends BaseService {
}, body: body);
}
RequestPatientLabSpecialResult _requestPatientLabSpecialResult =
RequestPatientLabSpecialResult();
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult(
{String projectID,
int clinicID,
String invoiceNo,
String orderNo}) async {
Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
@ -67,8 +58,7 @@ class LabsService extends BaseService {
body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
await baseAppClient.post(GET_Patient_LAB_RESULT,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_Patient_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear();
labResultList.clear();
response['ListPLR'].forEach((lab) {
@ -80,7 +70,65 @@ class LabsService extends BaseService {
}, body: body);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async {
Future generateCovidLabReport(LabResult covidLabResult, String isOutsideKSA) async {
hasError = false;
Map<String, dynamic> body = Map();
body['To'] = user.emailAddress;
body['OrderNo'] = covidLabResult.orderNo;
body['OrderLineItemNo'] = covidLabResult.orderLineItemNo;
body['LineItemNo'] = covidLabResult.resultValueBasedLineItemNo;
body['CertificateFormat'] = 5;
body['GeneratedBy'] = 102;
body['ShowPassportNumber'] = isOutsideKSA;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = covidLabResult.setupID;
body['ProjectID'] = covidLabResult.projectID;
dynamic localRes;
await baseAppClient.post(SEND_COVID_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future updateCovidPassportNumber(String passportNumber) async {
hasError = false;
Map<String, dynamic> body = Map();
body['PassportNo'] = passportNumber;
dynamic localRes;
await baseAppClient.post(COVID_PASSPORT_UPDATE, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getCovidPassportNumber() async {
hasError = false;
Map<String, dynamic> body = Map();
dynamic localRes;
await baseAppClient.post(GET_PATIENT_PASSPORT_NUMBER, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo;
@ -90,9 +138,8 @@ class LabsService extends BaseService {
body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure;
await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT,
onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, onSuccess: (dynamic response, int statusCode) {
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab));
});
@ -102,28 +149,23 @@ class LabsService extends BaseService {
}, body: body);
}
RequestSendLabReportEmail _requestSendLabReportEmail =
RequestSendLabReportEmail();
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 = user.firstName +" "+ user.lastName;
_requestSendLabReportEmail.patientIditificationNum =
user.patientIdentificationNo;
_requestSendLabReportEmail.patientName = user.firstName + " " + user.lastName;
_requestSendLabReportEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = user.dateofBirth;
_requestSendLabReportEmail.to = user.emailAddress;
_requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
_requestSendLabReportEmail.patientMobileNumber = user.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = user.setupID;
_requestSendLabReportEmail.setupID = user.setupID;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendLabReportEmail.toJson());

@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:flutter/cupertino.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
List<DoctorScheduleResponse> doctorScheduleResponse = List();
List<String> freeSlots = [];
getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
if(isActiveAppointment) {
if (isActiveAppointment) {
body['IsActiveAppointment'] = true;
body['isDentalAllowedBackend'] = false;
}
@ -37,12 +40,51 @@ class MedicalService extends BaseService {
body['RequesterMobileNo'] = user.mobileNumber;
body['RequesterIsOutSA'] = user.outSA;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
getSchedule(DoctorList doctorRequest) async {
Map<String, dynamic> request;
request = {
'DoctorID': doctorRequest.doctorID,
'ProjectID': doctorRequest.projectID,
'ClinicID': doctorRequest.clinicID,
'DoctorWorkingHoursDays': 7
};
dynamic localRes;
await baseAppClient.post(DOCTOR_SCHEDULE_URL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
doctorScheduleResponse.clear();
localRes['List_DoctorWorkingHoursTable'].forEach((item) =>
{doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
getFreeSlot(DoctorList doctorRequest) async {
Map<String, dynamic> request;
request = {
'DoctorID': doctorRequest.doctorID,
'ProjectID': doctorRequest.projectID,
'ClinicID': doctorRequest.clinicID,
'DoctorWorkingHoursDays': 7
};
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
freeSlots.clear();
localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item));
// localRes['List_DoctorWorkingHoursTable'].forEach((item) =>
// {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))});
}
}

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
double totalAdvanceBalanceAmount;
dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List();
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class PharmacyModuleService extends BaseService {
final AppSharedPreferences sharedPref = AppSharedPreferences();
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
String url = "";
@ -114,6 +113,7 @@ class PharmacyModuleService extends BaseService {
}
Future getTopManufacturerList() async {
hasError = false;
Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try {
await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER,

@ -45,8 +45,6 @@ class PrescriptionService extends BaseService {
_prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
print(_prescriptionsList.length);
print("response is -------------"+response);
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -12,8 +12,10 @@ class AnciallryOrdersViewModel extends BaseViewModel {
AncillaryOrdersService _ancillaryService = locator<AncillaryOrdersService>();
List<AncillaryOrdersListModel> get ancillaryLists =>
_ancillaryService.ancillaryLists;
List<AncillaryOrdersListProcListModel> get ancillaryListsDetails =>
_ancillaryService.ancillaryProcLists;
Future getOrders() async {
hasError = false;
setState(ViewState.Busy);
@ -25,10 +27,10 @@ class AnciallryOrdersViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getOrdersDetails(appointmentNo, orderNo) async {
Future getOrdersDetails(appointmentNo, orderNo, projectID) async {
hasError = false;
setState(ViewState.Busy);
await _ancillaryService.getOrdersDetails(appointmentNo, orderNo);
await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID );
if (_ancillaryService.hasError) {
error = _ancillaryService.error;
setState(ViewState.ErrorLocal);

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
@ -27,12 +29,17 @@ class AmRequestViewModel extends BaseViewModel {
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList;
List<AmbulanceRequestOrdersModel> get patientAmbulanceRequestOrdersList =>
_amService.patientAmbulanceRequestOrdersList;
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
bool get hasPendingOrder =>_amService.hasPendingOrder;
PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder;
AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder;
Future getAppointmentHistory() async {
setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
@ -60,7 +67,18 @@ class AmRequestViewModel extends BaseViewModel {
error = _hospitalService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
// getPatientAllPresOrdersList();
getPatientAllPresOrdersListRC();
}
Future getPatientAllPresOrdersListRC() async {
setState(ViewState.Busy);
await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user.patientID);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getPatientAllPresOrdersList() async {
@ -87,22 +105,23 @@ class AmRequestViewModel extends BaseViewModel {
Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _amService.updatePressOrder(presOrderID: presOrderID);
// await _amService.updatePressOrder(presOrderID: presOrderID);
await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user.patientID.toString());
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
getPatientAllPresOrdersListRC();
}
Future insertERPressOrder({@required PatientER patientER}) async {
Future insertERPressOrder({@required PatientER_RC patientER}) async {
setState(ViewState.Busy);
await _amService.insertERPressOrder(patientER: patientER);
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.ErrorLocal);
} else
getAmRequestOrders();
// getAmRequestOrders();
getPatientAllPresOrdersListRC();
}
}

@ -2,6 +2,7 @@ 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 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel {
List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
List<AppointmentHistory> get appointHistoryList =>
List<AppoitmentAllHistoryResultList> get appointHistoryList =>
_feedbackService.appointHistoryList;
Future<bool> sendCOCItem(
@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel {
String details,
String cOCTypeName,
String attachment,
AppointmentHistory appointHistory}) async {
AppoitmentAllHistoryResultList appointHistory}) async {
setState(ViewState.BusyLocal);
await _feedbackService.sendCOCItem(
title: title,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/eye/AppointmentFilter.dart';
import 'package:diplomaticquarterapp/core/service/medical/EyeService.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class EyeViewModel extends BaseViewModel {
EyeService _eyeService = locator<EyeService>();
@ -20,31 +21,35 @@ class EyeViewModel extends BaseViewModel {
error = _eyeService.error;
setState(ViewState.Error);
} else {
_eyeService.appoimentAllHistoryResultList.forEach((element) {
List<AppointmentFilter> _appointmentFilter = appointmentFilter
.where(
(elementFilter) =>
elementFilter.filterName == element.projectName,
)
.toList();
if (_appointmentFilter.length != 0) {
appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])]
.appointmentAllHistoryResultList
.add(element);
} else {
appointmentFilter.add(AppointmentFilter(
element,
element.projectName,
));
}
});
if (_eyeService.appoimentAllHistoryResultList.length == 0) {
new AppToast().backWithEmpty();
} else {
_eyeService.appoimentAllHistoryResultList.forEach((element) {
List<AppointmentFilter> _appointmentFilter = appointmentFilter
.where(
(elementFilter) =>
elementFilter.filterName == element.projectName,
)
.toList();
if (_appointmentFilter.length != 0) {
appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])]
.appointmentAllHistoryResultList
.add(element);
} else {
appointmentFilter.add(AppointmentFilter(
element,
element.projectName,
));
}
});
}
setState(ViewState.Idle);
}
}
sendGlassesPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async {
sendGlassesPrescriptionEmail(
{int appointmentNo, String projectName, int projectID}) async {
setState(ViewState.Busy);
await _eyeService.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo,
@ -58,7 +63,8 @@ class EyeViewModel extends BaseViewModel {
}
}
sendContactLensPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async {
sendContactLensPrescriptionEmail(
{int appointmentNo, String projectName, int projectID}) async {
setState(ViewState.Busy);
await _eyeService.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo,
@ -71,6 +77,4 @@ class EyeViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
}

@ -4,17 +4,45 @@ import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
class MedicalViewModel extends BaseViewModel {
MedicalService _medicalService = locator<MedicalService>();
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList;
List<DoctorScheduleResponse> get getDoctorScheduleList =>
_medicalService.doctorScheduleResponse;
List<String> get freeSlots => _medicalService.freeSlots;
getAppointmentHistory() async {
if (authenticatedUserObject.isLogin) {
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}
getDoctorSchedule(DoctorList doctorRequest) async {
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
await _medicalService.getSchedule(doctorRequest);
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}
getFreeSlots(DoctorList doctorRequest) async {
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
await _medicalService.getAppointmentHistory();
await _medicalService.getFreeSlot(doctorRequest);
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);

@ -38,7 +38,7 @@ class MyBalanceViewModel extends BaseViewModel {
//===========================
double get totalAdvanceBalanceAmount =>
dynamic get totalAdvanceBalanceAmount =>
_myBalanceService.totalAdvanceBalanceAmount;
String get updatedRegisterBloodMessage =>

@ -55,30 +55,30 @@ class OrderPreviewViewModel extends BaseViewModel {
}
}
Future changeProductQuantity(ShoppingCart product) async {
Future <ShoppingCartResponse> changeProductQuantity(ShoppingCart product) async {
setState(ViewState.Busy);
await _orderService.changeProductQuantity(product.id, product).then((res) {
_handleGetShoppingCartResponse(res);
});
var resp = await _orderService.changeProductQuantity(product.id, product);
var object = _handleGetShoppingCartResponse(resp);
if (_orderService.hasError) {
error = _orderService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
return object;
}
Future deleteProduct(ShoppingCart product) async {
Future<ShoppingCartResponse> deleteProduct(ShoppingCart product) async {
setState(ViewState.Busy);
await _orderService.deleteProduct(product.id).then((res) {
_handleGetShoppingCartResponse(res);
});
var resp = await _orderService.deleteProduct(product.id);
var object = _handleGetShoppingCartResponse(resp);
if (_orderService.hasError) {
error = _orderService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
return object;
}
Future deleteShoppingCart() async {
@ -94,12 +94,12 @@ class OrderPreviewViewModel extends BaseViewModel {
}
}
_handleGetShoppingCartResponse(Map res) {
ShoppingCartResponse _handleGetShoppingCartResponse(Map res) {
totalAdditionalShippingCharge = 0;
if (res == null) {
error = "response is null";
setState(ViewState.Error);
return;
return null;
}
print(res);
cartResponse.itemCount = res["item_count"];
@ -115,6 +115,7 @@ class OrderPreviewViewModel extends BaseViewModel {
totalAdditionalShippingCharge += shoppingCart.product.additionalShippingCharge;
});
cartResponse.updateShoppingCard();
return cartResponse;
}
String getPaymentOptionImage(PaymentOption paymentOption) {

@ -33,10 +33,12 @@ class PharmacyModuleViewModel extends BaseViewModel {
List<PharmacyProduct> get lastVisitedProducts =>
_pharmacyService.lastVisitedProducts;
List<PharmacyProduct> get recommendedProductList =>
List <RecommendedProductModel> get recommendedProductList =>
_recommendedProductService.recommendedList;
// List<Map<String, dynamic>> get recommendedProductList =>
// _recommendedProductService.recommendedList;
List<Prescriptions> get prescriptionsList =>
_prescriptionService.prescriptionsList;
@ -74,6 +76,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future generatePharmacyToken() async {
setState(ViewState.Busy);
await _pharmacyService.generatePharmacyToken();
@ -137,7 +140,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
}
}
/////////////RecommendedProducts
//////////////////////////////////////////RecommendedProducts
getRecommendedProducts(productId) async {
hasError = false;
setState(ViewState.Busy);

@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';

@ -0,0 +1,76 @@
class DentalProceduresModel {
List<ListIsPatientHasOnGoingEstimation> listIsPatientHasOnGoingEstimation;
DentalProceduresModel({this.listIsPatientHasOnGoingEstimation});
DentalProceduresModel.fromJson(Map<String, dynamic> json) {
if (json['List_IsPatientHasOnGoingEstimation'] != null) {
listIsPatientHasOnGoingEstimation =
new List<ListIsPatientHasOnGoingEstimation>();
json['List_IsPatientHasOnGoingEstimation'].forEach((v) {
listIsPatientHasOnGoingEstimation
.add(new ListIsPatientHasOnGoingEstimation.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listIsPatientHasOnGoingEstimation != null) {
data['List_IsPatientHasOnGoingEstimation'] = this
.listIsPatientHasOnGoingEstimation
.map((v) => v.toJson())
.toList();
}
return data;
}
}
class ListIsPatientHasOnGoingEstimation {
dynamic setupID;
dynamic estimationNo;
int projectID;
String procedureId;
int patientID;
int sequenceNo;
int neededTime;
String procedureName;
dynamic procedureNameN;
ListIsPatientHasOnGoingEstimation(
{this.setupID,
this.estimationNo,
this.projectID,
this.procedureId,
this.patientID,
this.sequenceNo,
this.neededTime,
this.procedureName,
this.procedureNameN});
ListIsPatientHasOnGoingEstimation.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
estimationNo = json['EstimationNo'];
projectID = json['ProjectID'];
procedureId = json['ProcedureId'];
patientID = json['PatientID'];
sequenceNo = json['sequenceNo'];
neededTime = json['NeededTime'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['EstimationNo'] = this.estimationNo;
data['ProjectID'] = this.projectID;
data['ProcedureId'] = this.procedureId;
data['PatientID'] = this.patientID;
data['sequenceNo'] = this.sequenceNo;
data['NeededTime'] = this.neededTime;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
return data;
}
}

@ -1,60 +1,61 @@
class AncillaryOrdersListProcListModel {
List<AncillaryOrderProcList> ancillaryOrderProcList;
List<AncillaryOrderProcDetailsList> ancillaryOrderProcDetailsList;
String appointmentDate;
dynamic appointmentNo;
dynamic clinicID;
int appointmentNo;
int clinicID;
String clinicName;
dynamic companyID;
int companyID;
String companyName;
dynamic doctorID;
int doctorID;
String doctorName;
Null errCode;
dynamic groupID;
int groupID;
String insurancePolicyNo;
String message;
String patientCardID;
dynamic patientID;
int patientID;
String patientName;
dynamic patientType;
dynamic policyID;
int patientType;
int policyID;
String policyName;
dynamic projectID;
int projectID;
String setupID;
dynamic statusCode;
dynamic subCategoryID;
int statusCode;
int subCategoryID;
String subPolicyNo;
AncillaryOrdersListProcListModel(
{this.ancillaryOrderProcList,
this.appointmentDate,
this.appointmentNo,
this.clinicID,
this.clinicName,
this.companyID,
this.companyName,
this.doctorID,
this.doctorName,
this.errCode,
this.groupID,
this.insurancePolicyNo,
this.message,
this.patientCardID,
this.patientID,
this.patientName,
this.patientType,
this.policyID,
this.policyName,
this.projectID,
this.setupID,
this.statusCode,
this.subCategoryID,
this.subPolicyNo});
{this.ancillaryOrderProcDetailsList,
this.appointmentDate,
this.appointmentNo,
this.clinicID,
this.clinicName,
this.companyID,
this.companyName,
this.doctorID,
this.doctorName,
this.errCode,
this.groupID,
this.insurancePolicyNo,
this.message,
this.patientCardID,
this.patientID,
this.patientName,
this.patientType,
this.policyID,
this.policyName,
this.projectID,
this.setupID,
this.statusCode,
this.subCategoryID,
this.subPolicyNo});
AncillaryOrdersListProcListModel.fromJson(Map<String, dynamic> json) {
if (json['AncillaryOrderProcList'] != null) {
ancillaryOrderProcList = new List<AncillaryOrderProcList>();
json['AncillaryOrderProcList'].forEach((v) {
ancillaryOrderProcList.add(new AncillaryOrderProcList.fromJson(v));
if (json['AncillaryOrderProcDetailsList'] != null) {
ancillaryOrderProcDetailsList = new List<AncillaryOrderProcDetailsList>();
json['AncillaryOrderProcDetailsList'].forEach((v) {
ancillaryOrderProcDetailsList
.add(new AncillaryOrderProcDetailsList.fromJson(v));
});
}
appointmentDate = json['AppointmentDate'];
@ -84,9 +85,9 @@ class AncillaryOrdersListProcListModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.ancillaryOrderProcList != null) {
data['AncillaryOrderProcList'] =
this.ancillaryOrderProcList.map((v) => v.toJson()).toList();
if (this.ancillaryOrderProcDetailsList != null) {
data['AncillaryOrderProcDetailsList'] =
this.ancillaryOrderProcDetailsList.map((v) => v.toJson()).toList();
}
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
@ -115,7 +116,7 @@ class AncillaryOrdersListProcListModel {
}
}
class AncillaryOrderProcList {
class AncillaryOrderProcDetailsList {
dynamic approvalLineItemNo;
dynamic approvalNo;
String approvalStatus;
@ -147,39 +148,39 @@ class AncillaryOrderProcList {
dynamic taxAmount;
dynamic taxPct;
AncillaryOrderProcList(
AncillaryOrderProcDetailsList(
{this.approvalLineItemNo,
this.approvalNo,
this.approvalStatus,
this.approvalStatusID,
this.companyShare,
this.companyShareWithTax,
this.companyTaxAmount,
this.discountAmount,
this.discountCategory,
this.discountType,
this.discountTypeValue,
this.isApprovalCreated,
this.isApprovalRequired,
this.isCovered,
this.orderDate,
this.orderLineItemNo,
this.orderNo,
this.partnerID,
this.partnerShare,
this.partnerShareType,
this.patientShare,
this.patientShareWithTax,
this.patientTaxAmount,
this.procPrice,
this.procedureCategoryID,
this.procedureCategoryName,
this.procedureID,
this.procedureName,
this.taxAmount,
this.taxPct});
this.approvalNo,
this.approvalStatus,
this.approvalStatusID,
this.companyShare,
this.companyShareWithTax,
this.companyTaxAmount,
this.discountAmount,
this.discountCategory,
this.discountType,
this.discountTypeValue,
this.isApprovalCreated,
this.isApprovalRequired,
this.isCovered,
this.orderDate,
this.orderLineItemNo,
this.orderNo,
this.partnerID,
this.partnerShare,
this.partnerShareType,
this.patientShare,
this.patientShareWithTax,
this.patientTaxAmount,
this.procPrice,
this.procedureCategoryID,
this.procedureCategoryName,
this.procedureID,
this.procedureName,
this.taxAmount,
this.taxPct});
AncillaryOrderProcList.fromJson(Map<String, dynamic> json) {
AncillaryOrderProcDetailsList.fromJson(Map<String, dynamic> json) {
approvalLineItemNo = json['ApprovalLineItemNo'];
approvalNo = json['ApprovalNo'];
approvalStatus = json['ApprovalStatus'];

@ -61,15 +61,15 @@ class Wishlist {
productAttributes: List<dynamic>.from(json["product_attributes"].map((x) => x)),
customerEnteredPrice: json["customer_entered_price"],
quantity: json["quantity"],
discountAmountInclTax: json["discount_amount_incl_tax"],
discountAmountInclTax: json["discount_amount_incl_tax"] != null ? json["discount_amount_incl_tax"] :0.0,
subtotal: json["subtotal"],
subtotalWithVat: json["subtotal_with_vat"],
subtotalVatAmount: json["subtotal_vat_amount"],
subtotalVatRate: json["subtotal_vat_rate"],
currency: json["currency"],
currencyn: json["currencyn"],
rentalStartDateUtc: json["rental_start_date_utc"],
rentalEndDateUtc: json["rental_end_date_utc"],
rentalStartDateUtc: json["rental_start_date_utc"] != null ? DateTime.parse(json["rental_start_date_utc"]) : DateTime.now(),
rentalEndDateUtc: json["rental_end_date_utc"] != null ? DateTime.parse(json["rental_end_date_utc"]) : DateTime.now(),
createdOnUtc: DateTime.parse(json["created_on_utc"]),
updatedOnUtc: DateTime.parse(json["updated_on_utc"]),
shoppingCartType: json["shopping_cart_type"],
@ -172,7 +172,7 @@ class Customer {
systemName: json["system_name"],
lastIpAddress: json["last_ip_address"],
createdOnUtc: DateTime.parse(json["created_on_utc"]),
lastLoginDateUtc: DateTime.parse(json["last_login_date_utc"]),
lastLoginDateUtc: json["last_login_date_utc"] != null ? DateTime.parse(json["last_login_date_utc"]) : DateTime.now(),
lastActivityDateUtc: DateTime.parse(json["last_activity_date_utc"]),
registeredInStoreId: json["registered_in_store_id"],
roleIds: List<dynamic>.from(json["role_ids"].map((x) => x)),
@ -335,9 +335,9 @@ class Product {
this.fullDescriptionn,
this.markasNew,
this.showOnHomePage,
this.metaKeywords,
this.metaDescription,
this.metaTitle,
// this.metaKeywords,
// this.metaDescription,
// this.metaTitle,
this.allowCustomerReviews,
this.approvedRatingSum,
this.notApprovedRatingSum,
@ -348,15 +348,15 @@ class Product {
this.prescriptionRequired,
this.rxMessage,
this.rxMessagen,
this.manufacturerPartNumber,
this.gtin,
// this.manufacturerPartNumber,
// this.gtin,
this.isGiftCard,
this.requireOtherProducts,
this.automaticallyAddRequiredProducts,
this.isDownload,
this.unlimitedDownloads,
this.maxNumberOfDownloads,
this.downloadExpirationDays,
// this.downloadExpirationDays,
this.hasSampleDownload,
this.hasUserAgreement,
this.isRecurring,
@ -382,7 +382,7 @@ class Product {
this.allowBackInStockSubscriptions,
this.orderMinimumQuantity,
this.orderMaximumQuantity,
this.allowedQuantities,
// this.allowedQuantities,
this.allowAddingOnlyExistingAttributeCombinations,
this.disableBuyButton,
this.disableWishlistButton,
@ -448,9 +448,9 @@ class Product {
String fullDescriptionn;
bool markasNew;
bool showOnHomePage;
dynamic metaKeywords;
dynamic metaDescription;
dynamic metaTitle;
// dynamic metaKeywords;
// dynamic metaDescription;
// dynamic metaTitle;
bool allowCustomerReviews;
dynamic approvedRatingSum;
dynamic notApprovedRatingSum;
@ -461,15 +461,15 @@ class Product {
bool prescriptionRequired;
dynamic rxMessage;
dynamic rxMessagen;
dynamic manufacturerPartNumber;
dynamic gtin;
// dynamic manufacturerPartNumber;
// dynamic gtin;
bool isGiftCard;
bool requireOtherProducts;
bool automaticallyAddRequiredProducts;
bool isDownload;
bool unlimitedDownloads;
dynamic maxNumberOfDownloads;
dynamic downloadExpirationDays;
// dynamic downloadExpirationDays;
bool hasSampleDownload;
bool hasUserAgreement;
bool isRecurring;
@ -495,7 +495,7 @@ class Product {
bool allowBackInStockSubscriptions;
dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity;
dynamic allowedQuantities;
// dynamic allowedQuantities;
bool allowAddingOnlyExistingAttributeCombinations;
bool disableBuyButton;
bool disableWishlistButton;
@ -561,9 +561,9 @@ class Product {
fullDescriptionn: json["full_descriptionn"],
markasNew: json["markas_new"],
showOnHomePage: json["show_on_home_page"],
metaKeywords: json["meta_keywords"],
metaDescription: json["meta_description"],
metaTitle: json["meta_title"],
// metaKeywords: json["meta_keywords"],
// metaDescription: json["meta_description"],
// metaTitle: json["meta_title"],
allowCustomerReviews: json["allow_customer_reviews"],
approvedRatingSum: json["approved_rating_sum"],
notApprovedRatingSum: json["not_approved_rating_sum"],
@ -572,17 +572,17 @@ class Product {
sku: json["sku"],
isRx: json["is_rx"],
prescriptionRequired: json["prescription_required"],
rxMessage: json["rx_message"],
rxMessagen: json["rx_messagen"],
manufacturerPartNumber: json["manufacturer_part_number"],
gtin: json["gtin"],
rxMessage: json["rx_message"] != null ? json["rx_message"] : "" ,
rxMessagen: json["rx_messagen"] != null ? json["rx_messagen"] : "",
// manufacturerPartNumber: json["manufacturer_part_number"],
// gtin: json["gtin"],
isGiftCard: json["is_gift_card"],
requireOtherProducts: json["require_other_products"],
automaticallyAddRequiredProducts: json["automatically_add_required_products"],
isDownload: json["is_download"],
unlimitedDownloads: json["unlimited_downloads"],
maxNumberOfDownloads: json["max_number_of_downloads"],
downloadExpirationDays: json["download_expiration_days"],
// downloadExpirationDays: json["download_expiration_days"],
hasSampleDownload: json["has_sample_download"],
hasUserAgreement: json["has_user_agreement"],
isRecurring: json["is_recurring"],
@ -608,19 +608,19 @@ class Product {
allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"],
orderMinimumQuantity: json["order_minimum_quantity"],
orderMaximumQuantity: json["order_maximum_quantity"],
allowedQuantities: json["allowed_quantities"],
// allowedQuantities: json["allowed_quantities"],
allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"],
disableBuyButton: json["disable_buy_button"],
disableWishlistButton: json["disable_wishlist_button"],
availableForPreOrder: json["available_for_pre_order"],
preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"],
preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"] != null ? DateTime.parse(json["pre_order_availability_start_date_time_utc"]) : DateTime.now(),
callForPrice: json["call_for_price"],
price: json["price"].toDouble(),
oldPrice: json["old_price"],
productCost: json["product_cost"].toDouble(),
specialPrice: json["special_price"],
specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"],
specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"],
specialPrice: json["special_price"] != null ? json["special_price"] : 0.0 ,
specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"] != null ? DateTime.parse(json["special_price_start_date_time_utc"]) : DateTime.now(),
specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"] != null ? DateTime.parse(json["special_price_end_date_time_utc"]) : DateTime.now(),
customerEntersPrice: json["customer_enters_price"],
minimumCustomerEnteredPrice: json["minimum_customer_entered_price"],
maximumCustomerEnteredPrice: json["maximum_customer_entered_price"],
@ -675,9 +675,9 @@ class Product {
"full_descriptionn": fullDescriptionn,
"markas_new": markasNew,
"show_on_home_page": showOnHomePage,
"meta_keywords": metaKeywords,
"meta_description": metaDescription,
"meta_title": metaTitle,
// "meta_keywords": metaKeywords,
// "meta_description": metaDescription,
// "meta_title": metaTitle,
"allow_customer_reviews": allowCustomerReviews,
"approved_rating_sum": approvedRatingSum,
"not_approved_rating_sum": notApprovedRatingSum,
@ -688,15 +688,15 @@ class Product {
"prescription_required": prescriptionRequired,
"rx_message": rxMessage,
"rx_messagen": rxMessagen,
"manufacturer_part_number": manufacturerPartNumber,
"gtin": gtin,
// "manufacturer_part_number": manufacturerPartNumber,
// "gtin": gtin,
"is_gift_card": isGiftCard,
"require_other_products": requireOtherProducts,
"automatically_add_required_products": automaticallyAddRequiredProducts,
"is_download": isDownload,
"unlimited_downloads": unlimitedDownloads,
"max_number_of_downloads": maxNumberOfDownloads,
"download_expiration_days": downloadExpirationDays,
// "download_expiration_days": downloadExpirationDays,
"has_sample_download": hasSampleDownload,
"has_user_agreement": hasUserAgreement,
"is_recurring": isRecurring,
@ -722,7 +722,7 @@ class Product {
"allow_back_in_stock_subscriptions": allowBackInStockSubscriptions,
"order_minimum_quantity": orderMinimumQuantity,
"order_maximum_quantity": orderMaximumQuantity,
"allowed_quantities": allowedQuantities,
// "allowed_quantities": allowedQuantities,
"allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations,
"disable_buy_button": disableBuyButton,
"disable_wishlist_button": disableWishlistButton,

@ -33,11 +33,15 @@ class CMCLocationPage extends StatefulWidget {
class _CMCLocationPageState extends State<CMCLocationPage> {
double latitude = 0;
double longitude = 0;
bool showCurrentLocation = false;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
if(latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true;
}
super.initState();
}
@ -149,7 +153,7 @@ class _CMCLocationPageState extends State<CMCLocationPage> {
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
));
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -44,6 +45,7 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
bool showCurrentLocation = false;
@override
void initState() {
@ -56,14 +58,26 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget
.model.addressesList[widget.model.addressesList.length - 1].latLong;
List latLongArr = latLong.split(',');
setLatitudeAndLongitude({bool isSetState = false, String latLong}) async {
if (latLong == null){
if(widget.model.addressesList.isEmpty) {
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
setState(() {
showCurrentLocation = true;
});
} else {
latLong = widget
.model.addressesList[widget.model.addressesList.length - 1].latLong;
}
}
if(!showCurrentLocation) {
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
}
@override
@ -144,9 +158,11 @@ class _NewCMCStepTowPageState extends State<NewCMCStepTowPage> {
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
Container(
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),

@ -43,9 +43,8 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(

@ -279,12 +279,13 @@ class MobileNumberTextFiled extends StatelessWidget {
const MobileNumberTextFiled({
Key key,
this.controller,
this.code
this.code, this.onChange
}) : super(key: key);
final TextEditingController controller;
final String code;
final Function onChange;
@override
Widget build(BuildContext context) {
@ -313,6 +314,7 @@ class MobileNumberTextFiled extends StatelessWidget {
margin: EdgeInsets.all(5),
child: TextField(
controller: controller,
onChanged: onChange,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
border: InputBorder.none, hintText: '5xxxxxxxx'),

@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -409,16 +411,17 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
15;
this.widget.createEReferralRequestModel.preferredBranchName =
"Arryan Hospital";
// this.widget.createEReferralRequestModel.fullName= "";
this.widget.createEReferralRequestModel.otherRelationship =
"";
// this.widget.createEReferralRequestModel.;
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
await model
.createEReferral(this.widget.createEReferralRequestModel);
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else{
AppToast.showSuccessToast(message: "Referral sent successfully");
}
},
loading: model.state == ViewState.BusyLocal,
disabled: medicalReportImages.length == 0,

@ -47,6 +47,7 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
onModelReady: (model) => model.getAllCities(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
@ -86,6 +87,11 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
? "Enter Patient Identification No"
: "Enter Referral Number",
controller: _searchTextController,
onChanged: (_){
setState(() {
});
},
),
SizedBox(
height: 12,
@ -113,6 +119,12 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
),
MobileNumberTextFiled(
controller: _mobileTextController,
onChange: (_){
setState(() {
});
},
code: _selectedCountry == null
? "11"
: _selectedCountry["code"],

@ -33,12 +33,16 @@ class _LocationPageState
extends State<LocationPage> {
double latitude = 0;
double longitude = 0;
bool showCurrentLocation = false;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
if(latitude == 0.0 && longitude == 0.0) {
showCurrentLocation = true;
}
super.initState();
}
@ -141,7 +145,7 @@ class _LocationPageState
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
));
}

@ -46,6 +46,8 @@ class _NewHomeHealthCareStepTowPageState
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
bool showCurrentLocation = false;
@override
void initState() {
@ -60,13 +62,25 @@ class _NewHomeHealthCareStepTowPageState
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
if (latLong == null){
if(widget.model.addressesList.isEmpty) {
setState(() {
showCurrentLocation = true;
});
} else {
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
}
}
if(!showCurrentLocation) {
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
@ -147,8 +161,9 @@ class _NewHomeHealthCareStepTowPageState
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
useCurrentLocation: showCurrentLocation,
),
if(widget.model.addressesList.isNotEmpty)
Container(
child: InkWell(
onTap: () =>

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -56,8 +58,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
var weather = '--';
WeatherService _weatherService = WeatherService();
@ -65,12 +66,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
});
super.initState();
}
@ -109,14 +106,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
TranslationBase.of(context).healthWeatherIndicators,
color: Colors.white,
fontWeight: FontWeight.w600,
),
Texts(
TranslationBase.of(context)
.healthTipsBasedOnCurrentWeather,
TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
color: Colors.white,
fontSize: 14,
),
@ -144,11 +139,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
width: 60,
height: 60,
),
Directionality(
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
],
),
Texts(
@ -173,8 +164,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
);
},
imageLocation:
'assets/images/new-design/my_file_bottom_bar.png',
imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile,
),
ServicesContainer(
@ -196,8 +186,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
),
imageLocation:
'assets/images/new-design/booking_icon_active.png',
imageLocation: 'assets/images/new-design/booking_icon_active.png',
title: TranslationBase.of(context).bookAppo,
),
ServicesContainer(
@ -207,8 +196,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: PaymentService(),
),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService,
),
ServicesContainer(
@ -218,17 +206,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: AnicllaryOrders(),
),
),
imageLocation:
'assets/images/comprehensive_medical_checkup_logo.png',
imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png',
title: TranslationBase.of(context).anicllaryOrders,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(page: CovidDrivethruLocation()),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest,
),
ServicesContainer(
@ -247,12 +233,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
ServicesContainer(
onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy),
ServicesContainer(
@ -262,8 +242,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
imageLocation: 'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
@ -281,8 +260,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(),
),
),
imageLocation:
'assets/images/new-design/family_menu_icon_red.png',
imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
title: TranslationBase.of(context).myFamily,
),
if (projectViewModel.havePrivilege(35))
@ -291,8 +269,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
@ -300,18 +277,17 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
},
imageLocation:
'assets/images/new-design/upcoming_icon_bottom_bar.png',
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(42))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle),
// if (projectViewModel.havePrivilege(42))
// ServicesContainer(
// onTap: () => Navigator.push(
// context,
// FadePage(page: SymptomInfo()),
// ),
// imageLocation: 'assets/images/new-design/body_icon.png',
// title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36))
ServicesContainer(
onTap: () => Navigator.push(
@ -328,8 +304,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
imageLocation: 'assets/images/new-design/health_calculator_icon.png',
title: TranslationBase.of(context).calculators,
),
ServicesContainer(
@ -339,20 +314,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
imageLocation: 'assets/images/new-design/health_convertor_icon.png',
title: TranslationBase.of(context).converters,
),
if (projectViewModel.havePrivilege(38))
ServicesContainer(
onTap: () =>
Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o,
),
@ -360,10 +327,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(
page: SmartWatchInstructions()
),
),
imageLocation:
'assets/images/new-design/smartwatch_icon.png',
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer(
@ -373,15 +341,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ParkingPage(),
),
),
imageLocation:
'assets/images/new-design/parking_system_icon.png',
imageLocation: 'assets/images/new-design/parking_system_icon.png',
title: TranslationBase.of(context).parking,
),
ServicesContainer(
onTap: () => launch(
"https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
@ -389,12 +354,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews,
),
ServicesContainer(
@ -436,8 +399,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -451,8 +413,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
});
} else {
setState(() {
weather =
data != null ? data['Temperature'].toString() + '\u2103' : '--';
weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
});
}
}

@ -95,7 +95,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
.map(
(item) => InkWell(
onTap: () {
ancillaryOrdersDetails(item);
ancillaryOrdersDetails(item, model.ancillaryLists[0].projectID);
},
child: Container(
decoration: BoxDecoration(
@ -166,11 +166,11 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
.toList());
}
ancillaryOrdersDetails(item) {
ancillaryOrdersDetails(item, projectId) {
Navigator.push(
context,
FadePage(
page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo),
page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo,projectId ),
),
);
}

@ -8,11 +8,15 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart';
class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo;
final dynamic orderNo;
AnicllaryOrdersDetails(this.appoNo, this.orderNo);
final dynamic projectID;
AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID);
@override
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
}
@ -30,8 +34,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
@override
Widget build(BuildContext context) {
return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) =>
model.getOrdersDetails(widget.appoNo, widget.orderNo),
onModelReady: (model) => model.getOrdersDetails(
widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
@ -64,7 +68,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
children: [
Button(
label: TranslationBase.of(context).payNow,
onTap: () {},
backgroundColor: Colors.red[800],
onTap: () {
Navigator.push(
context,
FadePage(
page: OrdersPayment(),
),
);
},
)
],
)
@ -89,7 +101,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
fontSize: 20,
),
Texts(
model.ancillaryListsDetails[0].patientID.toString(),
model.ancillaryLists[0].patientID.toString(),
)
],
),
@ -126,7 +138,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
children: [
Texts(
TranslationBase.of(context).invoiceNo,
fontWeight: FontWeight.bold,
// fontWeight: FontWeight.bold,
color: Colors.red[500],
),
Texts(" : "),
Texts(
@ -136,24 +149,26 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
),
Row(
children: [
Texts(
TranslationBase.of(context).date,
fontWeight: FontWeight.bold,
),
// Texts(
// TranslationBase.of(context).invoiceDate,
// // fontWeight: FontWeight.bold,
// color: Colors.red[500],
// ),
Texts(" : "),
Texts(
DateUtil.getFormattedDate(
DateUtil.convertStringToDate(
model.ancillaryListsDetails[0].appointmentDate),
"MMM dd,yyyy"),
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
model.ancillaryListsDetails[0].appointmentDate),
),
)
],
),
Row(
children: [
Texts(
TranslationBase.of(context).date,
fontWeight: FontWeight.bold,
TranslationBase.of(context).doctorName,
// fontWeight: FontWeight.bold,
color: Colors.red[500],
),
Texts(" : "),
Texts(
@ -206,13 +221,46 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
Divider(
color: Colors.red[800],
thickness: 3,
)
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
children: [],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
TranslationBase.of(context).price,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).vat,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).total,
color: Colors.grey[500],
fontSize: 14,
),
]),
],
),
Divider(
color: Colors.black26,
),
],
));
}
Widget getAncillaryDetails(model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList,
Map newMap = groupBy(
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList,
(obj) => obj.procedureCategoryName);
print(newMap);
@ -247,7 +295,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
String getTotalValue(value) {
double total = 0.0;
value.ancillaryListsDetails[0].ancillaryOrderProcList
value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList
.forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2);
}

@ -0,0 +1,20 @@
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
class OrdersPayment extends StatefulWidget {
@override
_OrdersPaymentState createState() => _OrdersPaymentState();
}
class _OrdersPaymentState extends State<OrdersPayment> {
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -1,12 +1,12 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -49,22 +49,29 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker,
description: TranslationBase.of(context).h2oInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png')
],
showHomeAppBarIcon: false,
baseViewModel: model,
isHelp: true,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
),
model.isLogin
? IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
)
: Container(),
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -64,6 +64,7 @@ class _BloodCholesterolState extends State<BloodCholesterol> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).bloodCholesterol,
isShowDecPage: false,
body: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(

@ -7,8 +7,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
const activeCardColor = Color(0xff70777A);
const inactiveCardColor = Color(0xffFAFAFd);
const activeCardColor = Color(0xff515a5d);
const activeTextColor = Color(0xffFAFAFA);
const inactiveCardColor = Color(0xffFAFAFA);
const inactiveTextColor = Color(0xff60686B);
class BloodSugar extends StatefulWidget {
@override
@ -20,6 +22,8 @@ Color color;
class _BloodSugarState extends State<BloodSugar> {
Color cardMGColor = inactiveCardColor;
Color cardMMOLColor = inactiveCardColor;
Color textMGColor = inactiveTextColor;
Color textMMOLColor = inactiveTextColor;
void updateColor(int type) {
//MG/DLT card
@ -30,6 +34,8 @@ class _BloodSugarState extends State<BloodSugar> {
} else {
cardMGColor = inactiveCardColor;
}
textMGColor = activeTextColor;
textMMOLColor = inactiveTextColor;
}
if (type == 2) {
if (cardMMOLColor == inactiveCardColor) {
@ -38,6 +44,8 @@ class _BloodSugarState extends State<BloodSugar> {
} else {
cardMMOLColor = inactiveCardColor;
}
textMGColor = inactiveTextColor;
textMMOLColor = activeTextColor;
}
}
@ -45,7 +53,7 @@ class _BloodSugarState extends State<BloodSugar> {
if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text);
inputValue = inputValue / 15;
inputValue = inputValue / 18;
unit = 'mmol/l';
} else if (cardMMOLColor == activeCardColor) {
inputValue = double.parse(textController.text);
@ -74,217 +82,237 @@ class _BloodSugarState extends State<BloodSugar> {
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Padding(
body: Container(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 0.7,
child: Column(
//crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 350.0,
child: Text(
TranslationBase.of(context).convertBloodSugarStatement,
//textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0),
),
),
SizedBox(
height: 15.0,
),
Container(
color: Colors.white,
height: 120.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
//crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: Row(
children: [
Texts(
TranslationBase.of(context).convertFrom,
)
],
),
),
SizedBox(
height: 9.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
//crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 8),
child: Text(
TranslationBase.of(context).convertBloodSugarStatement,
//textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0),
),
),
SizedBox(
height: 12.0,
),
Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 8),
child: Column(
children: [
GestureDetector(
onTap: () {
setState(() {
updateColor(1);
if (textController.text.isNotEmpty) {
inputValue =
double.parse(textController.text);
inputValue = inputValue / 15;
}
unit = 'mmol/l';
});
},
child: Container(
height: 65.0,
width: 150.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Row(
children: [
Texts(
TranslationBase.of(context).convertFrom,
)
],
),
),
SizedBox(
height: 8.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 16.0,
),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColor(1);
calculateBloodSugar();
});
},
child: Container(
height: 65.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0,
3), // changes position of shadow
),
],
color: cardMGColor,
borderRadius:
BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Texts(
'MG/DLt TO \nMMOL/L',
color: textMGColor,
),
),
),
],
color: cardMGColor,
borderRadius: BorderRadius.circular(3.0),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Texts('MG/DLt TO \nMMOL/L'),
SizedBox(
width: 12.0,
),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColor(2);
if (textController.text.isNotEmpty) {
inputValue =
double.parse(textController.text);
inputValue = inputValue / 18;
}
unit = 'mg/dlt';
});
},
child: Container(
height: 65.0,
width: 150.0,
decoration: BoxDecoration(
color: cardMMOLColor,
borderRadius: BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColor(2);
calculateBloodSugar();
});
},
child: Container(
height: 65.0,
decoration: BoxDecoration(
color: cardMMOLColor,
borderRadius:
BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(0,
3), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0),
child: Texts(
'MMOL/L TO MG/DLt ',
color: textMMOLColor,
),
),
),
],
),
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0),
child: Texts('\nMMOL/L TO MG/DLt '),
SizedBox(
width: 16.0,
),
),
],
),
],
),
],
),
),
),
),
SizedBox(
height: 25.0,
),
Container(
height: 65.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
SizedBox(
height: 24.0,
),
Container(
height: 65.0,
padding: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
// FilteringTextInputFormatter.digitsOnly
],
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText: TranslationBase.of(context).enterReadingValue,
border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black45)),
labelStyle: TextStyle(
color: Colors.black87,
],
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText:
TranslationBase.of(context).enterReadingValue,
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
),
border: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white)),
labelStyle: TextStyle(
color: Colors.black87,
),
),
),
),
),
),
SizedBox(
height: 25.0,
),
Visibility(
visible: _visible,
child: Container(
height: 115.0,
width: 350.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(15.0),
SizedBox(
height: 24.0,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).result + ": "),
Row(
Visibility(
visible: _visible,
child: Container(
height: 115.0,
width: 350.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(15.0),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
inputValue.toStringAsFixed(3),
style: TextStyle(fontSize: 35.0),
),
Padding(
padding: EdgeInsets.only(left: 4.0, top: 10.0),
child: Text(
unit.toString(),
style: TextStyle(
color: Color(0xffC5273A),
fontSize: 15.0,
fontWeight: FontWeight.w500,
Texts(TranslationBase.of(context).result + ": "),
Row(
children: [
Text(
inputValue.toStringAsFixed(2),
style: TextStyle(fontSize: 35.0),
),
),
Padding(
padding:
EdgeInsets.only(left: 4.0, top: 10.0),
child: Text(
unit.toString(),
style: TextStyle(
color: Color(0xffC5273A),
fontSize: 15.0,
fontWeight: FontWeight.w500,
),
),
),
],
),
],
),
],
),
),
),
),
),
SizedBox(
height: 30.0,
],
),
Flexible(
child: Container(
height: 50.0,
width: 150.0,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
onTap: () {
setState(() {
_visible == false
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar();
});
},
),
),
),
],
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16),
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
color: Color(0XFF515A5D),
onTap: () {
setState(() {
_visible == false
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar();
});
},
),
),
),
],
),
),
);

@ -66,6 +66,7 @@ class _TriglyceridesState extends State<Triglycerides> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).triglycerides,
isShowDecPage: false,
body: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(

@ -8,7 +8,8 @@ class MyWebView extends StatelessWidget {
final String title;
final String selectedUrl;
final Completer<WebViewController> _controller = Completer<WebViewController>();
final Completer<WebViewController> _controller =
Completer<WebViewController>();
MyWebView({
@required this.title,
@ -20,6 +21,7 @@ class MyWebView extends StatelessWidget {
return AppScaffold(
isShowAppBar: true,
appBarTitle: title,
isShowDecPage: false,
body: WebView(
initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted,

@ -56,28 +56,28 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AuthenticatedUser authenticatedUser;
GetAllSharedRecordsByStatusList selectedPatientFamily;
AdvanceModel advanceModel = AdvanceModel();
List_BloodGroupDetailsModel bloodDetails =
List_BloodGroupDetailsModel(bloodGroup: "A-");
List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-");
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
var checkedValue = false;
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectProvider;
@override
void initState() {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectProvider.isLogin) getAuthUser();
});
super.initState();
getAuthUser();
}
@override
Widget build(BuildContext context) {
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context);
projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getCities(), //model.getHospitals(),
@ -102,22 +102,16 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12,
),
InkWell(
onTap: () =>
confirmSelectHospitalDialog(model.CitiesModelList),
onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),
//model.hospitals
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(projectProvider, context)),
Icon(Icons.arrow_drop_down)
],
children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)],
),
),
),
@ -132,9 +126,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -156,9 +148,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -175,16 +165,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Row(
children: [
Container(
child: Text(
TranslationBase.of(context).viewTermsConditions),
child: Text(TranslationBase.of(context).viewTermsConditions),
),
SizedBox(
width: MediaQuery.of(context).size.height * 0.10,
),
InkWell(
onTap: () {
Navigator.of(context)
.push(FadePage(page: UserAgreementPage()));
Navigator.of(context).push(FadePage(page: UserAgreementPage()));
},
child: Container(
child: Texts(
@ -220,12 +208,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 10,
),
Text(
TranslationBase.of(context)
.iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: checkedValue
? Color(0xFFc5272d)
: Colors.black),
TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black),
),
],
),
@ -247,23 +231,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_) => AssetGiffyDialog(
title: Text(
"",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.asset(
'assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(
TranslationBase.of(context).cancel),
image: Image.asset('assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
));
},
child: Container(
width: 250,
height: 200,
child: Image.asset(
'assets/images/BloodChrt_EN.png')),
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')),
),
),
),
@ -293,19 +269,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
label: TranslationBase.of(context).save,
onTap: () async {
if (_selectedHospital == null) {
AppToast.showErrorToast(
message: TranslationBase.of(context).selectCity);
AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
return;
}
bloodDetails.city = projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(
message: model.updatedRegisterBloodMessage);
AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
} else {
AppToast.showErrorToast(message: model.error);
}
@ -325,8 +297,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
setState(() {
if (value == BeneficiaryType.MyAccount) {
_fileTextController.text = model.user.patientID.toString();
advanceModel.depositorName =
model.user.firstName + " " + model.user.lastName;
advanceModel.depositorName = model.user.firstName + " " + model.user.lastName;
} else
_fileTextController.text = "";
@ -453,8 +424,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
);
}
void confirmSelectFamilyDialog(
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
showDialog(
context: context,
child: SelectPatientFamilyDialog(
@ -463,8 +433,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onValueSelected: (value) {
setState(() {
selectedPatientFamily = value;
_fileTextController.text =
selectedPatientFamily.patientID.toString();
_fileTextController.text = selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName;
});
},
@ -538,12 +507,9 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary;
}
String getHospitalName(
ProjectViewModel projectProvider, BuildContext context) {
String getHospitalName(ProjectViewModel projectProvider, BuildContext context) {
if (_selectedHospital != null)
return projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
else
return TranslationBase.of(context).selectCity;
// return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital;
@ -558,8 +524,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});

@ -218,7 +218,9 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
false,
null,
null);
}
onBrowserLoadStart(String url) {

@ -640,6 +640,8 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -1,11 +1,18 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -22,12 +29,18 @@ class _DentalComplaintsState extends State<DentalComplaints> {
List<ListDentalChiefComplain> complaintsList = [];
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isDataLoaded = false;
bool hasDentalPlan = false;
var languageID;
int totalAppointmentTime = 0;
List<DoctorList> doctorsList = [];
DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = List();
@override
void initState() {
WidgetsBinding.instance
.addPostFrameCallback((_) => getChiefComplaintsList());
WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan());
super.initState();
}
@ -38,37 +51,206 @@ class _DentalComplaintsState extends State<DentalComplaints> {
appBarTitle: "Symptoms",
body: Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: ListView.builder(
itemCount: complaintsList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.only(bottom: 10.0),
child: DentalComplaintCard(
listDentalChiefComplain: complaintsList[index],
languageID: languageID,
child: !hasDentalPlan
? ListView.builder(
itemCount: complaintsList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.only(bottom: 10.0),
child: DentalComplaintCard(
listDentalChiefComplain: complaintsList[index],
languageID: languageID,
),
);
},
)
: Container(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).dentalProcedureList, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold, letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Table(
children: getProceduresData(),
),
),
...List.generate(
patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
isExpand: true,
title: patientDoctorAppointmentListHospital[index].filterName + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.map((doctor) {
return DoctorView(
doctor: doctor,
isLiveCareAppointment: false,
);
}).toList(),
)),
)
],
),
),
);
},
),
),
);
}
List<TableRow> getProceduresData() {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Container(
child: Container(
child: Center(
child: Text(TranslationBase.of(context).procedureName, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
Container(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Center(
child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
],
),
);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
tableRow.add(TableRow(children: [
Container(
child: Container(
child: Center(
child: Text(procedure.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
),
Container(
child: Container(
child: Center(
child: Text(procedure.neededTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
),
]));
});
tableRow.add(
TableRow(
children: [
Container(
child: Container(
child: Center(
child: Text(TranslationBase.of(context).totalTimeNeeded, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
Container(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Center(
child: Text(totalAppointmentTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
),
],
),
);
return tableRow;
}
getLanguageID() async {
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
}
checkIfHasDentalPlan() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkIfHasDentalPlan(widget.searchInfo.ProjectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['List_IsPatientHasOnGoingEstimation'].length != 0) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).continuePlan,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () => {Navigator.of(context).pop(), continueDentalPlan()},
cancelFunction: () => {getChiefComplaintsList()});
dialog.showAlertDialog(context);
} else {
getChiefComplaintsList();
}
}
}).catchError((err) {
print(err);
});
}
continueDentalPlan() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
int appoTime = 0;
service.getDoctorsList(int.parse("17"), widget.searchInfo.ProjectID, false, context, isContinueDentalPlan: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_IsPatientHasOnGoingEstimation']);
dentalProceduresModel = DentalProceduresModel.fromJson(res);
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
appoTime += procedure.neededTime;
});
setState(() {
hasDentalPlan = true;
totalAppointmentTime = appoTime;
});
if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() {
res['List_DentalChiefComplain'].forEach((v) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v));

@ -103,14 +103,26 @@ class _DoctorProfileState extends State<DoctorProfile>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.doctor.doctorImageURL,
fit: BoxFit.fill, height: 120.0, width: 120.0),
),
Row(
children: [
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.doctor.doctorImageURL,
fit: BoxFit.fill, height: 120.0, width: 120.0),
),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.asset('assets/images/drSchedul.png'),
),
)
],
),
Container(
margin: EdgeInsets.only(top: 10.0),
@ -178,14 +190,11 @@ class _DoctorProfileState extends State<DoctorProfile>
)),
),
),
if(widget.docProfileList.isDoctorHasPrePostImages == true)
if (widget.docProfileList.isDoctorHasPrePostImages == true)
Container(
height: 50,
alignment: Alignment.center,
child: prePostImagesButton(context)
),
child: prePostImagesButton(context)),
Container(
child: Divider(
color: Colors.grey[500],
@ -234,7 +243,7 @@ class _DoctorProfileState extends State<DoctorProfile>
);
}
Widget prePostImagesButton(BuildContext context){
Widget prePostImagesButton(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(10),
child: MaterialButton(
@ -242,7 +251,10 @@ class _DoctorProfileState extends State<DoctorProfile>
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () => openDoctorPrePostImages(),
child: Text(TranslationBase.of(context).beforeAfterImages, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
child: Text(
TranslationBase.of(context).beforeAfterImages,
style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),
),
),
);
}
@ -287,23 +299,24 @@ class _DoctorProfileState extends State<DoctorProfile>
});
}
openDoctorPrePostImages(){
openDoctorPrePostImages() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService().getDoctorPrePostImages(widget.docProfileList, context).then((images) {
DoctorsListService()
.getDoctorPrePostImages(widget.docProfileList, context)
.then((images) {
GifLoaderDialogUtils.hideDialog(context);
showDialog(
context: context, barrierDismissible: true,
builder: (ctx){
context: context,
barrierDismissible: true,
builder: (ctx) {
return DoctorPostPreImagesContent(doctorPrePostImages: images);
}
);
});
// Navigator.push(
// context,
// FadePage(
// page: DoctorPostPreImagesPage(doctorPrePostImages: images,)
// )
// );
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
@ -612,6 +625,4 @@ class _DoctorProfileState extends State<DoctorProfile>
selectedDate: DocAvailableAppointments.selectedDate,
selectedTime: DocAvailableAppointments.selectedTime)));
}
}

@ -21,9 +21,11 @@ class DocAvailableAppointments extends StatefulWidget {
static String selectedDate;
static String selectedTime;
bool isLiveCareAppointment;
final dynamic doctorSchedule;
DocAvailableAppointments(
{@required this.doctor, @required this.isLiveCareAppointment});
{@required this.doctor,
this.doctorSchedule,
@required this.isLiveCareAppointment});
@override
_DocAvailableAppointmentsState createState() =>
@ -67,6 +69,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
WidgetsBinding.instance.addPostFrameCallback((_) async {
getCurrentLanguage();
if (widget.isLiveCareAppointment)
getDoctorScheduledFreeSlots(context, widget.doctor);
else {
@ -107,9 +110,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
}
void _onCalendarCreated(
DateTime first, DateTime last, CalendarFormat format) {
print('CALLBACK: _onCalendarCreated');
}
DateTime first, DateTime last, CalendarFormat format) {}
@override
Widget build(BuildContext context) {
@ -350,9 +351,24 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
freeSlotsResponse = res['FreeTimeSlots'];
print("res['FreeTimeSlots']");
print(res['FreeTimeSlots'].length);
_getJSONSlots().then((value) => {
setState(() => {_events.clear(), _events = value})
});
_getJSONSlots().then((value) {
setState(() => {
_events.clear(),
_events = value,
if (widget.doctorSchedule != null)
{
_calendarController.setSelectedDay(
DateUtil.convertStringToDate(
widget.doctorSchedule['Date']),
isProgrammatic: true),
_onDaySelected(
DateUtil.convertStringToDate(
widget.doctorSchedule['Date']),
List())
}
});
});
} else {
DocAvailableAppointments.areAppointmentsAvailable = false;
}

@ -0,0 +1,355 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class LiveCareBookAppointment extends StatefulWidget {
final dynamic clinicName;
final dynamic liveCareClinicID;
final dynamic liveCareServiceID;
LiveCareBookAppointment(
{this.clinicName, this.liveCareClinicID, this.liveCareServiceID});
@override
_LiveCareBookAppointmentState createState() =>
_LiveCareBookAppointmentState();
}
class _LiveCareBookAppointmentState extends State<LiveCareBookAppointment> {
AppSharedPreferences sharedPref = AppSharedPreferences();
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(5.0),
child: Text(TranslationBase.of(context).clinicAcceptLivecare,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.all(15.0),
padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
decoration: BoxDecoration(
color: Color(0xff20bc44),
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Text(TranslationBase.of(context).livecareModalTop,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.all(15.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/liveCare_mobile_care.svg",
width: 150.0),
),
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 7.0),
child: Text(
TranslationBase.of(context).whyLivecare,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
letterSpacing: 1.0,
color: Colors.black)),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width:
MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(
left: 5.0, right: 5.0, bottom: 10.0),
child: Text(
TranslationBase.of(context)
.livecarePoint1,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width:
MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(
left: 5.0, right: 5.0, bottom: 10.0),
child: Text(
TranslationBase.of(context)
.livecarePoint5,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width:
MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(
left: 5.0, right: 5.0, bottom: 10.0),
child: Text(
TranslationBase.of(context)
.livecarePoint2,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width:
MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(
left: 5.0, right: 5.0, bottom: 10.0),
child: Text(
TranslationBase.of(context)
.livecarePoint3,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset(
"assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width:
MediaQuery.of(context).size.width * 0.4,
margin:
EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(
TranslationBase.of(context)
.livecarePoint4,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
],
),
],
),
)
],
),
),
Container(
child: Text(TranslationBase.of(context).livecareSummary,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0,
letterSpacing: 0.5,
color: Colors.black)),
),
Container(
child: InkWell(
onTap: () {
sharedPref.setString(
LIVECARE_CLINIC_DATA,
widget.clinicName +
"-" +
widget.liveCareClinicID +
"-" +
widget.liveCareServiceID);
Navigator.pop(context, "livecare");
},
child: Container(
decoration: BoxDecoration(
color: Colors.grey[700],
borderRadius:
BorderRadius.all(Radius.circular(10.0))),
margin: EdgeInsets.only(top: 10.0),
padding: EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon_white.svg",
width: 70),
),
Container(
width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(
10.0, 0.0, 10.0, 0.0),
child: Text(
TranslationBase.of(context)
.bookImmediateLivecare,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16.0,
letterSpacing: 0.7,
color: Colors.white)),
),
Container(
margin:
EdgeInsets.only(top: 5.0, left: 10.0),
child: Text(
TranslationBase.of(context)
.bookVideoLivecare2,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 13.0,
color: Colors.white)),
)
],
),
),
],
)),
),
),
Container(
child: InkWell(
onTap: () {
Navigator.pop(context, "schedule");
},
child: Container(
decoration: BoxDecoration(
color: Colors.grey[700],
borderRadius:
BorderRadius.all(Radius.circular(10.0))),
margin: EdgeInsets.only(top: 10.0),
padding: EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Image.asset(
"assets/images/new-design/doctor_white.png",
width: 50),
),
Container(
width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(
28.0, 0.0, 28.0, 0.0),
child: Text(
TranslationBase.of(context).noThankyou,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16.0,
letterSpacing: 0.7,
color: Colors.white)),
),
Container(
margin: EdgeInsets.only(
top: 5.0, left: 28.0, right: 28.0),
child: Text(
TranslationBase.of(context).visitClinic,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 13.0,
color: Colors.white)),
)
],
),
),
],
)),
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: InkWell(
onTap: () {
Navigator.pop(context, "false");
},
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(TranslationBase.of(context).cancel,
style: TextStyle(
fontSize: 16.0,
letterSpacing: 0.5,
color: Color(0xffc5272d))),
],
),
),
),
],
),
),
));
}
}

@ -3,10 +3,13 @@ import "dart:collection";
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -14,6 +17,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;
@ -36,6 +42,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false;
bool isProjectLoaded = false;
ListClinicCentralized selectedClinic;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -65,13 +76,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
},
),
Text(TranslationBase.of(context).nearestAppo,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
],
),
widget.clnicIds != null &&
widget.clnicIds.length > 1 &&
isLoaded == true
widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: clinicsList.map<Widget>((result) {
@ -84,14 +92,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported()) {
projectDropdownValue = "";
getDoctorsList(context);
}
} else {}
});
},
title: Text(result.clinicDescription,
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
letterSpacing: 1.0))));
title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0))));
}).toList())
: Container(
height: 60.0,
@ -112,23 +116,28 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue,
items: clinicsList.map((item) {
return new DropdownMenuItem<String>(
value: item.clinicID.toString(),
child: new Text(item.clinicDescription),
value: item.clinicID.toString() + "-" + item.isLiveCareClinicAndOnline.toString() + "-" + item.liveCareClinicID.toString() + "-" + item.liveCareServiceID.toString(),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 15, width: 15, fit: BoxFit.cover) : Container(),
]),
);
}).toList(),
onChanged: (newValue) {
setState(() {
print(newValue);
dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = "";
getDoctorsList(context);
} else {
print("Dental");
}
});
},
),
)),
isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@ -167,9 +176,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
}
bool isDentalSelectedAndSupported() {
return dropdownValue != "" &&
(dropdownValue == "17") &&
isMobileAppDentalAllow;
if (dropdownValue != null)
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17") && isMobileAppDentalAllow;
else
return false;
}
getClinicsList() {
@ -215,85 +225,87 @@ class _SearchByClinicState extends State<SearchByClinic> {
// TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") {
if (dropdownValue.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]);
searchInfo.date = DateTime.now();
GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo);
} else if (dropdownValue.split("-")[1] == "true"
// && authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(clinicName: "Family Medicine", liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]),
),
).then((value) {
print(value);
if (value == "false") dropdownValue = "";
if (value == "livecare") {
Navigator.push(context, FadePage(page: LiveCareHome()));
}
if (value == "schedule") {
callDoctorsSearchAPI();
}
});
} else {
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
callDoctorsSearchAPI();
}
}
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
int.parse(dropdownValue),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
// print(res['DoctorList']);
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
callDoctorsSearchAPI() {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {}
});
DoctorsListService service = new DoctorsListService();
service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
});
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
});
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
@ -302,20 +314,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
);
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
getProjectsList();
});
@ -324,9 +325,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() {
setState(() {
if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList();
isLoaded = true;
}
});

@ -1,67 +1,10 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DoctorPostPreImagesPage extends StatefulWidget{
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesPage({this.doctorPrePostImages});
@override
State<StatefulWidget> createState() => DoctorPostPreImagesPageState();
}
class DoctorPostPreImagesPageState extends State<DoctorPostPreImagesPage>{
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return AppScaffold(
appBarTitle: TranslationBase.of(context).beforeAfterImages,
isShowAppBar: true,
isShowDecPage: false,
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 10),
child: Row(
children: [
Expanded(
child: Column(
children: [
Text("Before Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After Image", style: TextStyle(color: Colors.black, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
)
)
],
),
)
);
}
}
class DoctorPostPreImagesContent extends StatefulWidget{
class DoctorPostPreImagesContent extends StatefulWidget {
final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesContent({this.doctorPrePostImages});
@ -70,14 +13,13 @@ class DoctorPostPreImagesContent extends StatefulWidget{
DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState();
}
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent> {
@override
Widget build(BuildContext context) {
var images = widget.doctorPrePostImages;
return Material(
color: Colors.transparent,
child: Center(
return Center(
child: Material(
color: Colors.transparent,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@ -85,31 +27,45 @@ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
children: [
Expanded(
child: Column(
children: [
Text("Before", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
children: [
Text(
"Before",
style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
),
SizedBox(
height: 10,
),
Image.memory(
images.getPreBytes(),
errorBuilder: (ctx, err, trace) {
return Container(
color: Colors.grey.withOpacity(0.25),
);
},
)
),
],
)),
Divider(color: Colors.grey.withOpacity(0.5)),
Expanded(
child: Column(
children: [
Text("After", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),),
SizedBox(height: 10,),
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){
return Container(
color: Colors.grey.withOpacity(0.25),
);
},)
],
children: [
Text(
"After",
style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
),
SizedBox(
height: 10,
),
Image.memory(
images.getPostBytes(),
errorBuilder: (ctx, err, trace) {
return Container(
color: Colors.grey.withOpacity(0.25),
);
},
)
)
],
))
],
),
],
@ -117,5 +73,4 @@ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
),
);
}
}
}

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
}
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin {
class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController();
var checkedValue = false;
String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
isShowDecPage: true,
description: TranslationBase.of(context).childVaccineInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'),
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png')
],
appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
fillColor: Colors.red,
hintText: model.user.emailAddress,
hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail = text;
model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
},
validator: (value) {
if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
//
onTap: () {
model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(
message: TranslationBase.of(context).updateEmailMsg);
AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.

@ -0,0 +1,169 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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 'covid-payment-details.dart';
class CovidDirveThruQuestions extends StatefulWidget {
final String projectId;
final List<CovidTestProceduresResponse> proceduresList;
CovidDirveThruQuestions({@required this.projectId, @required this.proceduresList});
@override
CovidDirveThruQuestionsState createState() => CovidDirveThruQuestionsState();
}
class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
List qa;
@override
void initState() {
super.initState();
qa = getQuestionsFromJson();
}
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
var isArabic = localize.isArabic();
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(20),
child: Text(localize.covidSelectProcedure, style: TextStyle(fontSize: 17, letterSpacing: 1, fontWeight: FontWeight.bold)),
),
Expanded(
child: ListView.separated(
padding: EdgeInsets.symmetric(horizontal: 20),
itemCount: qa.length,
itemBuilder: (ctx, idx) {
var obj = qa[idx];
var qtext = isArabic ? obj["questionAR"] : obj["questionEN"];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(qtext, style: TextStyle(fontSize: 15, letterSpacing: 1.5)),
Row(
children: [
Radio<int>(
value: 1,
groupValue: obj["ans"],
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
});
}),
Text(localize.yes),
],
),
Row(
children: [
Radio<int>(
value: 0,
groupValue: obj["ans"],
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
});
}),
Text(localize.no),
],
)
],
),
);
},
separatorBuilder: (ctx, idx) => Divider(height: 0.25, color: Colors.grey.withOpacity(0.5)),
)),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child: FractionallySizedBox(
widthFactor: 1,
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
child: Text(
localize.next,
style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),
),
onPressed: next),
),
),
],
));
}
next() async {
bool all = true;
qa.forEach((element) {
all = all && (element["ans"] == 1 || element["ans"] == 0);
});
if (all) if (qa[0]["ans"] == 1) {
openPassportUpdatePage();
} else {
getPaymentInfo(context, widget.projectId);
}
else
AppToast.showErrorToast(message: localize.pleaseSelectAllQuestionToContinue);
}
openPassportUpdatePage() {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value);
if(value != null && value == true) {
getPaymentInfo(context, widget.projectId);
}
});
}
List getQuestionsFromJson() {
var questionsJson = """
[{"id":1,"questionEN":"Is the test intended for travel?","questionAR":"هل تجري التحليل بغرض السفر؟","ans":2},{"id":2,"questionEN":"Coming from outside KSA within last 2 weeks?","questionAR":"هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟","ans":2},{"id":3,"questionEN":"Do you currently have fever?","questionAR":"هل تعاني حاليا من حرارة؟","ans":2},{"id":4,"questionEN":"Did you have fever in last 2 weeks?","questionAR":"هل عانيت من حرارة في الأسبوعين الماضيين؟","ans":2},{"id":5,"questionEN":"Do you have a sore throat?","questionAR":"هل لديك التهاب في الحلق؟","ans":2},{"id":6,"questionEN":"Do you have a runny nose?","questionAR":"هل لديك سيلان بالأنف؟"},{"id":7,"questionEN":"Do you have a cough?","questionAR":"هل لديك سعال؟","ans":2},{"id":8,"questionEN":"Do you have shortness of breath?","questionAR":"هل تعانين من ضيق في التنفس؟","ans":2},{"id":9,"questionEN":"Do you have nausea?","questionAR":"هل تعانين من غثيان؟","ans":2},{"id":10,"questionEN":"Do you have vomiting?","questionAR":"هل تعاني من القيء؟","ans":2},{"id":11,"questionEN":"Do you have a headache?","questionAR":"هل تعاني من صداع في الرأس؟","ans":2},{"id":12,"questionEN":"Do you have muscle pain?","questionAR":"هل تعانين من آلام عضلية؟","ans":2},{"id":13,"questionEN":"Do you have joint pain?","questionAR":"هل تعانين من آلام المفاصل؟","ans":2},{"id":14,"questionEN":"Do you have diarrhea?","questionAR":"هل لديك اسهال؟","ans":2}]""";
var map = json.decode(questionsJson) as List;
return map;
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
Navigator.push(
context,
FadePage(
page: CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: widget.proceduresList,
)));
} else {}
}).catchError((err) {
print(err);
});
}
}

@ -14,7 +14,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart';
class CovidDrivethruLocation extends StatefulWidget {
@override
@ -32,18 +33,14 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = "";
List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
ProjectViewModel projectViewModel;
@override
void initState() {
WidgetsBinding.instance
.addPostFrameCallback((_) => getProjectsList(context));
imagesInfo.add(
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) {
@ -57,9 +54,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
@ -73,31 +68,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo,
style: TextStyle(fontSize: 16.0, color: Colors.black)),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.grey[700])),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
),
Container(
height: 60.0,
@ -113,18 +94,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue,
items: projectsList.map((item) {
return new DropdownMenuItem<String>(
value: item.iD.toString(),
value: selectedProject,
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
projectDropdownValue = newValue;
selectedProject = newValue;
setProjectLocation(newValue);
});
},
@ -133,15 +114,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
)
: Container(),
isLocationSelected
@ -150,16 +124,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
@ -185,8 +158,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -203,8 +175,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -214,8 +185,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -228,8 +198,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -239,8 +208,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -260,20 +228,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getDirections() {
if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat),
double.parse(projectLong), this.projectName);
MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to get directions");
Utils.showErrorToast("Please select address from the dropdown menu to get directions");
}
}
next() {
if (isLocationSelected) {
getPaymentInfo(context, projectID);
Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList)));
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to continue");
Utils.showErrorToast("Please select address from the dropdown menu to continue");
}
}
@ -281,34 +246,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
Navigator.of(context).popAndPushNamed(HOME);
}
setProjectLocation(newValue) {
print(newValue);
setProjectLocation(DriveThroughTestingCenterModel newValue) {
setState(() {
this.projectLat =
projectsList[(int.parse(newValue) - 1)].latitude.toString();
this.projectLong =
projectsList[(int.parse(newValue) - 1)].longitude.toString();
this.projectName = projectsList[(int.parse(newValue) - 1)].projectName;
this.projectID =
projectsList[(int.parse(newValue) - 1)].projectID.toString();
this.projectLat = newValue.latitude.toString();
this.projectLong = newValue.longitude.toString();
this.projectName = newValue.projectName;
this.projectID = newValue.projectID.toString();
isLocationSelected = true;
});
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) {
service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
Navigator.push(
context,
@ -328,8 +284,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse =
new CovidTestProceduresResponse();
CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) {
@ -353,6 +308,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) {
projectsList.clear();
if (res['MessageStatus'] == 1) {
setState(() {
res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) {

@ -30,7 +30,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override
void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0];
super.initState();
}
@ -336,14 +335,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
widget.covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentDetails(
// covidPaymentInfoResponse: covidPaymentInfoResponse,
// projectID: int.parse(projectID),
// proceduresList: proceduresList,
// )));
} else {}
}).catchError((err) {
print(err);

@ -191,6 +191,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -29,6 +30,10 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
PageController pageController;
PatientER _patientER = PatientER();
PatientER_RC _patientER_RC = PatientER_RC();
TransportationDetails transportationDetails = new TransportationDetails();
_changeCurrentTab(int tab) {
setState(() {
currentIndex = tab;
@ -41,12 +46,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
void initState() {
super.initState();
pageController = new PageController();
_patientER_RC.transportationDetails = transportationDetails;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
body: widget.amRequestViewModel.pickUpRequestPresOrder != null
body: widget.amRequestViewModel.pendingAmbulanceRequestOrder != null
? SingleChildScrollView(
child: Column(
children: [
@ -64,36 +70,32 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
children: [
OrderLogItem(
title: TranslationBase.of(context).reqId,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.presOrderID
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.id
.toString(),
),
OrderLogItem(
title: TranslationBase.of(context).status,
value: widget.amRequestViewModel.pickUpRequestPresOrder.status ==0?TranslationBase.of(context).pending:'',
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.statusText,
),
OrderLogItem(
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget
.amRequestViewModel
.pickUpRequestPresOrder
.lastEditDate)),
value: getDate(widget.amRequestViewModel.pendingAmbulanceRequestOrder.created),
),
OrderLogItem(
title: TranslationBase.of(context).pickupLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.pickupLocationName,
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.pickupLocation,
),
OrderLogItem(
title: TranslationBase.of(context).dropoffLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.dropoffLocationName,
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.dropOffLocation,
),
OrderLogItem(
title: TranslationBase.of(context).transportMethod,
value: widget
.amRequestViewModel.pickUpRequestPresOrder.title,
.amRequestViewModel.pendingAmbulanceRequestOrder.serviceText,
),
Container(
padding: EdgeInsets.all(10),
@ -112,7 +114,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
onTap: () {
widget.amRequestViewModel.updatePressOrder(
presOrderID: widget.amRequestViewModel
.pickUpRequestPresOrder.presOrderID);
.pendingAmbulanceRequestOrder.id);
},
),
)
@ -143,21 +145,25 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
SelectTransportationMethod(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
PickupLocation(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
BillAmount(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
Summary(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
],
@ -167,4 +173,9 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
),
);
}
String getDate(String date) {
return date.split("T")[0];
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,17 +10,13 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BillAmount extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
BillAmount(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
BillAmount({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_BillAmountState createState() => _BillAmountState();
@ -27,23 +24,19 @@ class BillAmount extends StatefulWidget {
class _BillAmountState extends State<BillAmount> {
Ambulate _ambulate = Ambulate.None;
String note ="";
String note = "";
@override
void initState() {
if(widget.patientER.ambulate!=null)
{
setState(() {
_ambulate = widget.patientER.ambulate;
note = widget.patientER.requesterNote;
});
}
// if (widget.patientER_RC.transportationDetails.ambulate != null) {
// setState(() {
// _ambulate = widget.patientER.ambulate;
// note = widget.patientER.requesterNote;
// });
// }
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -61,9 +54,7 @@ class _BillAmountState extends State<BillAmount> {
height: 10,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
border: TableBorder.symmetric(inside: BorderSide(width: 1.0, color: Colors.grey[300]), outside: BorderSide(width: 1.0, color: Colors.grey[300])),
children: [
TableRow(
children: [
@ -96,7 +87,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.price}',
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
@ -126,7 +117,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceVAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -167,7 +158,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -181,8 +172,13 @@ class _BillAmountState extends State<BillAmount> {
SizedBox(
height: 10,
),
Texts(TranslationBase.of(context).selectAmbulate,bold: true,),
SizedBox(height: 5,),
Texts(
TranslationBase.of(context).selectAmbulate,
bold: true,
),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
@ -196,8 +192,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -226,8 +221,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -235,7 +229,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -248,7 +241,9 @@ class _BillAmountState extends State<BillAmount> {
),
],
),
SizedBox(height: 5,),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
@ -262,8 +257,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -271,7 +265,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -293,8 +286,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -302,7 +294,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -315,17 +306,18 @@ class _BillAmountState extends State<BillAmount> {
),
],
),
SizedBox(height: 12,),
SizedBox(
height: 12,
),
NewTextFields(
hintText: TranslationBase.of(context).notes,
initialValue: note,
onChanged: (value){
onChanged: (value) {
setState(() {
note = value;
});
},
),
SizedBox(
height: 100,
),
@ -342,9 +334,9 @@ class _BillAmountState extends State<BillAmount> {
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientER.ambulate = _ambulate;
widget.patientER.requesterNote = note;
widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.notes = note;
// widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.changeCurrentTab(3);
});
},

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
@ -28,13 +29,10 @@ enum HaveAppointment { YES, NO }
class PickupLocation extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
PickupLocation(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_PickupLocationState createState() => _PickupLocationState();
@ -77,7 +75,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.patientER.direction == 1)
if (widget.patientER_RC.transportationDetails.direction == 1)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -112,8 +110,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Texts(getSelectFromMapName(context))),
Expanded(child: Texts(getSelectFromMapName(context))),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -179,8 +176,7 @@ class _PickupLocationState extends State<PickupLocation> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -213,8 +209,7 @@ class _PickupLocationState extends State<PickupLocation> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -254,11 +249,9 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 8,
),
InkWell(
onTap: () {
confirmSelectHospitalDialog(
widget.amRequestViewModel.hospitals);
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
},
child: Container(
padding: EdgeInsets.all(12),
@ -271,8 +264,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(
TranslationBase.of(context).pickupLocation)),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -284,7 +276,7 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
if (widget.patientER.direction == 0)
if (widget.patientER_RC.transportationDetails.direction == 0)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -294,8 +286,7 @@ class _PickupLocationState extends State<PickupLocation> {
),
InkWell(
onTap: () {
confirmSelectHospitalDialog(
widget.amRequestViewModel.hospitals);
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
},
child: Container(
padding: EdgeInsets.all(12),
@ -308,8 +299,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(
TranslationBase.of(context).pickupLocation)),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -354,8 +344,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Texts(getSelectFromMapName(context))),
Expanded(child: Texts(getSelectFromMapName(context))),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -387,77 +376,59 @@ class _PickupLocationState extends State<PickupLocation> {
textColor: Colors.white,
onTap: () {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(
message: TranslationBase.of(context).selectAll);
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER.direction == 0) {
widget.patientER.dropoffLocationLattitude =
_result.geometry.location.lat.toString();
widget.patientER.dropoffLocationLongitude =
_result.geometry.location.lng.toString();
widget.patientER.pickupLocationLattitude =
_selectedHospital.latitude;
widget.patientER.pickupLocationLongitude =
_selectedHospital.longitude;
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString();
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString();
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
widget.patientER.pickupLocationLattitude =
_selectedHospital.latitude;
widget.patientER.pickupLocationLongitude =
_selectedHospital.longitude;
widget.patientER.dropoffLocationLattitude =
_result.geometry.location.lat.toString();
widget.patientER.dropoffLocationLongitude =
_result.geometry.location.lng.toString();
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString();
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString();
}
widget.patientER.latitude =
widget.patientER.pickupLocationLattitude;
widget.patientER.longitude =
widget.patientER.pickupLocationLongitude;
widget.patientER.dropoffLocationName = widget.patientER.direction == 0?_result.formattedAddress:_selectedHospital.name;
widget.patientER.createdBy =
widget.amRequestViewModel.user.patientID;
widget.patientER.isOutPatient =
widget.amRequestViewModel.user.outSA;
widget.patientER.patientIdentificationID =
widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER.pickupDateTime =
DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER.pickupLocationName = widget.patientER.direction == 0?_selectedHospital.name:_result.formattedAddress;
widget.patientER.projectID =
widget.amRequestViewModel.user.projectID;
widget.patientER.requesterFileNo =
widget.amRequestViewModel.user.patientID;
widget.patientER.requesterIsOutSA = false;
widget.patientER.lineItemNo = 0;
widget.patientER.requesterMobileNo =
widget.amRequestViewModel.user.mobileNumber;
// widget.patientER.latitude =
// widget.patientER.pickupLocationLattitude;
// widget.patientER.longitude =
// widget.patientER.pickupLocationLongitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER.direction == 0 ? _result.formattedAddress : _selectedHospital.name;
// widget.patientER_RC.crea =
// widget.amRequestViewModel.user.patientID;
widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? true : false;
widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER.direction == 0 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID.toString();
widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
// widget.patientER.lineItemNo = 0;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
if (_haveAppointment == HaveAppointment.YES) {
widget.patientER.appointmentNo =
myAppointment.appointmentNo.toString();
widget.patientER.appointmentClinicName =
myAppointment.clinicName;
widget.patientER.appointmentDoctorName =
myAppointment.doctorNameObj;
widget.patientER.appointmentBranch =
myAppointment.projectName;
widget.patientER.appointmentTime =
myAppointment.appointmentDate;
widget.patientER.haveAppointment = true;
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();
widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName;
widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj;
widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName;
widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate;
widget.patientER_RC.transportationDetails.haveAppointment = 1;
} else {
widget.patientER.appointmentNo = "0";
widget.patientER.appointmentClinicName = null;
widget.patientER.appointmentDoctorName = null;
widget.patientER.appointmentBranch = null;
widget.patientER.appointmentTime = null;
widget.patientER.haveAppointment = false;
widget.patientER_RC.transportationDetails.appointmentNo = "0";
widget.patientER_RC.transportationDetails.appointmentClinicName = "";
widget.patientER_RC.transportationDetails.appointmentDoctorName = "";
widget.patientER_RC.transportationDetails.appointmentBranch = "";
widget.patientER_RC.transportationDetails.appointmentTime = "";
widget.patientER_RC.transportationDetails.haveAppointment = 0;
}
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
});
},
@ -487,27 +458,21 @@ class _PickupLocationState extends State<PickupLocation> {
}
String getSelectFromMapName(context) {
return _result != null
? _result.formattedAddress
: TranslationBase.of(context).selectMap;
return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap;
}
getAppointment() {
GifLoaderDialogUtils.showMyDialog(context);
widget.amRequestViewModel.getAppointmentHistory().then((value) {
if (widget.amRequestViewModel.state == ViewState.Error ||
widget.amRequestViewModel.state == ViewState.ErrorLocal) {
if (widget.amRequestViewModel.state == ViewState.Error || widget.amRequestViewModel.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: widget.amRequestViewModel.error);
} else if (widget
.amRequestViewModel.appoitmentAllHistoryResultList.length >
0) {
} else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: AvailableAppointmentsPage(
appointmentsAllHistoryList:
widget.amRequestViewModel.appoitmentAllHistoryResultList,
appointmentsAllHistoryList: widget.amRequestViewModel.appoitmentAllHistoryResultList,
),
),
).then((value) {
@ -527,8 +492,7 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() {
_haveAppointment = HaveAppointment.NO;
});
AppToast.showErrorToast(
message: TranslationBase.of(context).noAppointment);
AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment);
}
}).catchError((e) {
GifLoaderDialogUtils.hideDialog(context);

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -17,23 +18,17 @@ enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
SelectTransportationMethod(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
SelectTransportationMethod({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_SelectTransportationMethodState createState() =>
_SelectTransportationMethodState();
_SelectTransportationMethodState createState() => _SelectTransportationMethodState();
}
class _SelectTransportationMethodState
extends State<SelectTransportationMethod> {
PatientERTransportationMethod _erTransportationMethod =
PatientERTransportationMethod();
class _SelectTransportationMethodState extends State<SelectTransportationMethod> {
PatientERTransportationMethod _erTransportationMethod = PatientERTransportationMethod();
Direction _direction = Direction.FromHospital;
Way _way = Way.OneWay;
@ -42,18 +37,23 @@ class _SelectTransportationMethodState
@override
void initState() {
super.initState();
if (widget.patientER.direction != null) {
_direction = widget.patientER.direction == 0
? Direction.ToHospital
: Direction.FromHospital;
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
_erTransportationMethod = widget.amRequestViewModel
.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
// if (widget.patientER.direction != null) {
// _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital;
// _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
// _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
// } else {
// if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
// }
//RC API Revamp
if (widget.patientER_RC.transportationDetails.direction != null) {
_direction = widget.patientER_RC.transportationDetails.direction == 0 ? Direction.ToHospital : Direction.FromHospital;
_way = widget.patientER_RC.transportationDetails.tripType == 1 ? Way.OneWay : Way.TwoWays;
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER_RC.transportationDetails.ambulate - 1)];
} else {
if (widget.amRequestViewModel.amRequestModeList.length != 0)
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[
widget.amRequestViewModel.amRequestModeList.length - 1];
if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
}
}
@override
@ -78,8 +78,7 @@ class _SelectTransportationMethodState
(index) => InkWell(
onTap: () {
setState(() {
_erTransportationMethod =
widget.amRequestViewModel.amRequestModeList[index];
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[index];
});
},
child: Container(
@ -95,14 +94,9 @@ class _SelectTransportationMethodState
Expanded(
flex: 3,
child: ListTile(
title: Texts(projectViewModel.isArabic
? widget.amRequestViewModel
.amRequestModeList[index].titleAR
: widget.amRequestViewModel
.amRequestModeList[index].title),
title: Texts(projectViewModel.isArabic ? widget.amRequestViewModel.amRequestModeList[index].textN : widget.amRequestViewModel.amRequestModeList[index].text),
leading: Radio(
value: widget
.amRequestViewModel.amRequestModeList[index],
value: widget.amRequestViewModel.amRequestModeList[index],
groupValue: _erTransportationMethod,
onChanged: (value) {
setState(() {
@ -114,8 +108,7 @@ class _SelectTransportationMethodState
),
Expanded(
flex: 1,
child: Texts(TranslationBase.of(context).sar +
' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
child: Texts(TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
)
],
),
@ -181,8 +174,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).fromHospital),
title: Texts(TranslationBase.of(context).fromHospital),
leading: Radio(
value: Direction.FromHospital,
groupValue: _direction,
@ -211,7 +203,7 @@ class _SelectTransportationMethodState
height: 5,
),
Container(
margin: EdgeInsets.only(bottom:65 ),
margin: EdgeInsets.only(bottom: 65),
child: Row(
children: [
Expanded(
@ -225,13 +217,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).oneDirec),
title: Texts(TranslationBase.of(context).oneDirec),
leading: Radio(
value: Way.OneWay,
groupValue: _way,
@ -256,13 +246,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).twoDirec),
title: Texts(TranslationBase.of(context).twoDirec),
leading: Radio(
value: Way.TwoWays,
groupValue: _way,
@ -300,28 +288,33 @@ class _SelectTransportationMethodState
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientER.transportationMethodId = (widget
.amRequestViewModel.amRequestModeList
.indexOf(_erTransportationMethod) +
1);
widget.patientER.direction =
_direction == Direction.ToHospital ? 1 : 0;
widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER.selectedAmbulate = (widget
.amRequestViewModel.amRequestModeList
.indexOf(_erTransportationMethod) +
1);
widget.patientER.patientERTransportationMethod =
_erTransportationMethod;
widget.patientER.orderServiceID =
_orderService.getIdOrderService();
widget.patientER.pickupUrgency = 1;
widget.patientER.lineItemNo = 1;
widget.patientER.cost = _erTransportationMethod.price;
widget.patientER.vAT = _erTransportationMethod.vAT ?? 0;
widget.patientER.totalPrice =
_erTransportationMethod.totalPrice;
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.pickupUrgency = 1;
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
// widget.changeCurrentTab(1);
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.id.toString();
widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER_RC.transportationDetails.pickupUrgency = 1;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1);
});
},
label: TranslationBase.of(context).next,

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -6,14 +8,14 @@ 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 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
class Summary extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
Summary({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_SummaryState createState() => _SummaryState();
@ -32,7 +34,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).rrtSummary),
SizedBox(height: 5,),
SizedBox(
height: 5,
),
Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -43,54 +47,95 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).directions,color: Colors.grey,),
Texts(widget.patientER.direction ==0? TranslationBase.of(context).toHospital:TranslationBase.of(context).fromHospital,bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).pickupLocation,color: Colors.grey,),
Texts('${widget.patientER.pickupLocationName}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).dropoffLocation,color: Colors.grey,),
Texts('${widget.patientER.dropoffLocationName}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).selectAmbulate,color: Colors.grey,),
Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).notes,color: Colors.grey,),
Texts('${widget.patientER.requesterNote?? '---'}',bold: true,),
SizedBox(height: 8,),
Texts(
TranslationBase.of(context).transportMethod,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).directions,
color: Colors.grey,
),
Texts(
widget.patientER_RC.transportationDetails.direction == 0 ? TranslationBase.of(context).toHospital : TranslationBase.of(context).fromHospital,
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).pickupLocation,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.pickupLocationName}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).dropoffLocation,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.dropoffLocationName}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).selectAmbulate,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.ambulate}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).notes,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.notes ?? '---'}',
bold: true,
),
SizedBox(
height: 8,
),
],
),
),
SizedBox(height: 20,),
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,),
SizedBox(height: 5,),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container(
height: 55,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(TranslationBase.of(context).patientShareTotal+':'),
Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}')
],
children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')],
),
),
SizedBox(height: 130),
],
),
),
@ -99,15 +144,13 @@ class _SummaryState extends State<Summary> {
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child:SecondaryButton(
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER);
}
),
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
),
);
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -44,36 +45,39 @@ class _DdServicesPageState extends State<DdServicesPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
),
title: Text(
'ED Online',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
showConfirmMessage(context);
},
);
},
),
centerTitle: true,
),
return AppScaffold(
appBarTitle: 'ED Online',
isShowDecPage: true,
isShowAppBar: true,
// appBarTitle: AppBar(
// elevation: 0,
// textTheme: TextTheme(
// headline6: TextStyle(
// color: Theme.of(context).textTheme.headline1.color,
// fontWeight: FontWeight.bold),
// ),
// title: Text(
// 'ED Online',
// style: TextStyle(
// fontWeight: FontWeight.bold,
// color: Theme.of(context).textTheme.headline1.color,
// fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// // bold: true,
// // color: Colors.white,
// ),
// leading: Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.arrow_back),
// color: Theme.of(context).textTheme.headline1.color,
// onPressed: () {
// showConfirmMessage(context);
// },
// );
// },
// ),
// centerTitle: true,
// ),
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'widgets/card_position.dart';
class NearestEr extends StatelessWidget {
class NearestEr extends StatefulWidget {
static const String _url = "assets/images/";
int appointmentNo;
@ -18,91 +17,89 @@ class NearestEr extends StatelessWidget {
NearestEr({this.appointmentNo, this.projectID});
@override
_NearestErState createState() => _NearestErState();
}
class _NearestErState extends State<NearestEr> {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getERList());
super.initState();
}
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getProjectAvgERWaitingTimeOrders(
id: appointmentNo, projectID: projectID)
: (model) => model.getProjectAvgERWaitingTimeOrders(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
baseViewModel: mode,
body: mode.ProjectAvgERWaitingTimeModeList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text(
"${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.0,
letterSpacing: 1.0,
fontWeight: FontWeight.w900,
color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller:
new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[index]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[index].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[index]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName,
cardSize: itemWidth,
),
);
}),
),
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
body: projectAvgERWaitingTimeModelList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text("${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(),
text: projectAvgERWaitingTimeModelList[index].projectName.toString(),
image: 'assets/images/new-design/find_us_icon.png',
subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
type: projectAvgERWaitingTimeModelList[index].iD.toString(),
telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(),
networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(),
latitude: projectAvgERWaitingTimeModelList[index].latitude,
longitude: projectAvgERWaitingTimeModelList[index].longitude,
projectname: projectAvgERWaitingTimeModelList[index].projectName,
cardSize: itemWidth,
),
);
}),
),
],
),
)
: Center(
child: Texts('No Data'),
),
],
),
),
)
: Center(
child: Texts('No Data'),
),
);
}
getERList() async {
GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) {
setState(() {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital));
});
});
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
}

@ -1,9 +1,6 @@
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -19,7 +16,7 @@ class OrderLogPage extends StatelessWidget {
margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
child: ListView.builder(
itemCount: amRequestViewModel.patientAllPresOrdersList.length,
itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length,
itemBuilder: (context, index) => Container(
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
@ -31,49 +28,41 @@ class OrderLogPage extends StatelessWidget {
children: [
OrderLogItem(
title: TranslationBase.of(context).reqId,
value: amRequestViewModel.patientAllPresOrdersList[index].iD
.toString(),
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].id.toString(),
),
OrderLogItem(
title: TranslationBase.of(context).orderStatus,
value: amRequestViewModel
.patientAllPresOrdersList[index].description,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusText,
),
OrderLogItem(
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(amRequestViewModel
.patientAllPresOrdersList[index].createdOn)),
value: getDate(amRequestViewModel.patientAmbulanceRequestOrdersList[index].created),
),
OrderLogItem(
title: TranslationBase.of(context).pickupLocation,
value: amRequestViewModel
.patientAllPresOrdersList[index].pickupLocationName,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].pickupLocation,
),
OrderLogItem(
title: TranslationBase.of(context).dropoffLocation,
value: amRequestViewModel
.patientAllPresOrdersList[index].dropoffLocationName,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].dropOffLocation,
),
if(amRequestViewModel.patientAllPresOrdersList[index].status==1)
if (amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusId == 1)
Container(
padding: EdgeInsets.all(10),
width: double.maxFinite,
margin: EdgeInsets.only(bottom: 4,left: 4,right: 4),
margin: EdgeInsets.only(bottom: 4, left: 4, right: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(12),
bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(12),
),
color: Colors.white
),
color: Colors.white),
child: SecondaryButton(
color: Colors.red[900],
color: Colors.red[900],
textColor: Colors.white,
label: TranslationBase.of(context).cancel,
onTap: () {
amRequestViewModel.updatePressOrder(presOrderID:amRequestViewModel.pickUpRequestPresOrder.presOrderID );
amRequestViewModel.updatePressOrder(presOrderID: amRequestViewModel.pendingAmbulanceRequestOrder.id);
},
),
)
@ -83,4 +72,8 @@ class OrderLogPage extends StatelessWidget {
),
);
}
String getDate(String date) {
return date.split("T")[0];
}
}

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
@ -8,13 +8,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RRTMainScreen extends StatefulWidget{
class RRTMainScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() => RRTMainScreenState();
}
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0;
TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel;
bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png'));
tabController = TabController(length: 2, vsync: this);
}
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value){
}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
)
);
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
description: TranslationBase.of(context).rrtDDetails,
imagesInfo: imagesInfo,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
));
}
Widget content(){
if(loadingData == true){
Widget content() {
if (loadingData == true) {
return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){
} else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) {
return Column(
children: [
tabBar(),
Expanded(
child: contentPager()
)
],
children: [tabBar(), Expanded(child: contentPager())],
);
}else{
} else {
return Container(
alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,),
child: Text(
localize.somethingWentWrongTryLater,
style: TextStyle(color: Colors.red),
maxLines: 5,
),
);
}
}
Widget tabBar() => Container(
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
Tab(
child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
Tab(
child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
]
),
);
]),
);
Widget contentPager() => PageView(
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -1,6 +1,7 @@
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:url_launcher/url_launcher.dart';
@ -20,6 +21,7 @@ class CardPosition extends StatelessWidget {
final longitude;
final projectname;
final cardSize;
final String waitingTime;
const CardPosition(
{
@ -32,7 +34,8 @@ class CardPosition extends StatelessWidget {
@required this.latitude,
@required this.longitude,
@required this.projectname ,
@required this.cardSize ,
@required this.cardSize,
@required this.waitingTime ,
});
@override
@ -83,31 +86,26 @@ class CardPosition extends StatelessWidget {
}
Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async {
var localize = TranslationBase.of(context);
showDialog(
context: context,builder: (_) => AssetGiffyDialog(
title: Text(projectname,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),image:Image.network(networkImage, fit: BoxFit.cover,),
buttonOkText:Text("LOCATION"),
buttonOkColor: Colors.grey,
buttonCancelText:Text('CAll') ,
buttonCancelColor: Colors.grey,
onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);},
onCancelButtonPressed :() {launch("tel://" +telephone);}
) );
entryAnimation: EntryAnimation.BOTTOM,
image:Image.network(networkImage, fit: BoxFit.cover,),
title: Text(projectname,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),
description: Text("${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", textAlign: TextAlign.center,),
buttonOkText:Text("LOCATION", style: TextStyle(color: Colors.white),),
buttonOkColor: Colors.grey,
buttonCancelText:Text('CAll', style: TextStyle(color: Colors.white),) ,
buttonCancelColor: Colors.grey,
onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);},
onCancelButtonPressed :() {launch("tel://" +telephone);}
));
}
}
}

@ -11,19 +11,21 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'widgets/AppointmentActions.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class AppointmentDetails extends StatefulWidget {
AppoitmentAllHistoryResultList appo;
static bool isLoading = false;
final dynamic doctorSchedule;
static bool showFooterButton = false;
AppointmentDetails({@required this.appo});
AppointmentDetails({@required this.appo, this.doctorSchedule});
@override
_AppointmentDetailsState createState() => _AppointmentDetailsState();
@ -33,13 +35,20 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
with SingleTickerProviderStateMixin {
static TabController _tabController;
AppSharedPreferences sharedPref = AppSharedPreferences();
List<DoctorRateDetails> doctorDetailsList = List();
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false;
print(widget.appo.clinicID);
if (widget.doctorSchedule != null) {
_tabController =
new TabController(length: 2, vsync: this, initialIndex: 1);
widget.appo.appointmentDate = widget.doctorSchedule['Date'];
} else {
_tabController = new TabController(length: 2, vsync: this);
}
setTab();
super.initState();
}
@ -82,155 +91,196 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
body: Container(
color: new Color(0xFFf6f6f6),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
child: Stack(
children: <Widget>[
Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.appo.doctorImageURL,
fit: BoxFit.fill, height: 120.0, width: 120.0),
),
),
Container(
margin:
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
alignment: Alignment.center,
child: Text(
widget.appo.doctorTitle +
" " +
widget.appo.doctorNameObj,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(
getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating: widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
InkWell(
onTap: () {
getDoctorRatingsDetails();
},
child: Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
),
Container(
alignment: Alignment.center,
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")),
),
Container(
alignment: Alignment.center,
child: Text(widget.appo.startTime.substring(0, 5)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
),
),
TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor) {
_tabController.index =
_tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
}
}
});
},
tabs: [
Tab(
child: Text(TranslationBase.of(context).appoActions,
style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor
? Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.grey)),
)
: Tab(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.appo.doctorImageURL,
fit: BoxFit.fill, height: 120.0, width: 120.0),
),
),
Container(
margin: EdgeInsets.only(
top: 10.0, left: 10.0, right: 10.0),
alignment: Alignment.center,
child: Text(
widget.appo.doctorTitle +
" " +
widget.appo.doctorNameObj,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(
getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
InkWell(
onTap: () {
getDoctorRatingsDetails();
},
child: Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
),
Container(
alignment: Alignment.center,
child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")),
),
Container(
alignment: Alignment.center,
child: Text(widget.appo.startTime.substring(0, 5)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
),
),
TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor) {
_tabController.index =
_tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
}
}
});
},
tabs: [
Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
)
TranslationBase.of(context).appoActions,
style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor
? Tab(
child: Text(
TranslationBase.of(context)
.availableAppo,
style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text(
TranslationBase.of(context)
.availableAppo,
style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
),
],
),
),
Container(
height: MediaQuery.of(context).size.height * 0.87,
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
AppointmentActions(
appo: widget.appo,
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
doctorSchedule: widget.doctorSchedule,
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
],
controller: _tabController,
),
],
),
),
Container(
height: MediaQuery.of(context).size.height * 0.87,
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
AppointmentActions(
appo: widget.appo,
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
],
controller: _tabController,
),
),
],
),
_tabController.index == 1
? Positioned(
right: 30.0,
//top: 30.0,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
),
]),
height: 50,
width: 50,
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: IconButton(
icon: Image.asset('assets/images/drSchedul.png'),
onPressed: () {
openSchedule();
}),
),
))
: SizedBox(),
],
),
),
@ -564,4 +614,20 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
docObj.doctorImageURL = widget.appo.doctorImageURL;
return docObj;
}
void openSchedule() {
Navigator.push(
context,
FadePage(
page: SchedulePage(
appo: widget.appo,
doctorList: getDoctorObject(),
)));
}
setTab() async {
var scheduleDoctor = await sharedPref.getObject(DOCTOR_SCHEDULE_DATE_SEL);
widget.appo.appointmentDate = scheduleDoctor['Date'];
}
}

@ -0,0 +1,257 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
class SchedulePage extends StatefulWidget {
final DoctorList doctorList;
final AppoitmentAllHistoryResultList appo;
SchedulePage({
this.appo,
this.doctorList,
});
@override
_SchedulePageState createState() => _SchedulePageState();
}
class _SchedulePageState extends State<SchedulePage> {
DoctorsListService service;
PageController _pageController = PageController();
double currentPage = 0;
int selectedindex = 0;
List weeks = [];
List<DoctorScheduleResponse> doctorScheduleResponse = [];
int weekMS = 604800 * 1000;
DoctorList doctorList;
List<String> freeSlots = [];
bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences();
@override
void initState() {
this.doctorList = widget.doctorList;
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getDoctorSchedule(doctorList),
builder: (_, model, widget) => BaseView<MedicalViewModel>(
onModelReady: (model2) => model2.getFreeSlots(doctorList),
builder: (_, model2, widget2) {
if (model.freeSlots.length > 0 && isPageChange == false) {
this.freeSlots = model.freeSlots;
this.doctorScheduleResponse = model.getDoctorScheduleList;
this.generateWeeksSchedules();
}
return AppScaffold(
appBarTitle: TranslationBase.of(context).schedule,
isShowAppBar: true,
baseViewModel: model2,
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Container(
margin: EdgeInsets.only(top: 40),
child: PageView.builder(
controller: _pageController,
itemCount: weeks.length,
onPageChanged: (index) {
setState(() {
isPageChange = true;
this.currentPage = index.toDouble();
});
},
itemBuilder: (context, index) {
return Container(
child: ListView.builder(
itemCount: weeks[index].length,
itemBuilder: (context, index2) =>
InkWell(
onTap: () {
openBookAppointment(
weeks[index][index2]);
},
child: Row(
children: [
Expanded(
flex: 1,
child: Padding(
padding:
EdgeInsets.only(
left: 20),
child: Row(
children: [
Column(
children: [
Texts(
weeks[index][index2]
[
'DayName'],
fontSize:
13,
),
Texts(
getDayMonths(
DateUtil
.convertStringToDate(
weeks[index][index2]['Date'],
),
),
fontWeight:
FontWeight.bold,
fontSize:
18,
)
],
)
])),
),
Expanded(
flex: 3,
child: ClipRRect(
borderRadius:
const BorderRadius
.all(
Radius.circular(
20.0)),
child: Container(
padding:
EdgeInsets.only(
left:
10,
right:
10,
top: 20,
bottom:
20),
margin: EdgeInsets.only(
left: 20,
right: 20,
top: 7,
bottom: 7),
decoration: BoxDecoration(
boxShadow: [
weeks[index][index2]['fullDay'] ==
false
? BoxShadow(
color: Colors.green,
offset: Offset(-5, 0))
: BoxShadow(),
],
borderRadius:
const BorderRadius.all(Radius.circular(
10.0)),
color: Colors
.white),
child: Row(
children: [
Expanded(
child:
Texts(
weeks[index][index2]
[
'WorkingHours'],
fontWeight:
FontWeight.w400,
),
)
],
))),
)
],
))));
},
)),
PageViewIndicator(
isActive: true,
currentPage: this.currentPage,
length: weeks.length,
)
],
)));
}));
}
generateWeeksSchedules() {
this.weeks.clear();
for (var i = 0; i < 8; i++) {
var weekSchedule = generateNewWeekSchedule(i);
this.markWeekFreeDays(weekSchedule);
this.weeks.add(weekSchedule);
}
//print(this.weeks);
}
markWeekFreeDays(schedule) {
for (var workDay in schedule) {
workDay['fullDay'] = !this.hasFreeSlot(workDay['Date']);
}
}
generateNewWeekSchedule(weekIndex) {
var weekMSOffset = weekIndex * weekMS;
var newWeekSchedule = [];
for (var workDay in this.doctorScheduleResponse) {
Map<String, dynamic> newWorkDay = Map();
newWorkDay['Date'] = DateUtil.convertDateMSToJsonDate(
DateUtil.convertStringToDate(workDay.date).millisecondsSinceEpoch +
weekMSOffset);
newWorkDay['DayName'] = workDay.dayName;
newWorkDay['WorkingHours'] = workDay.workingHours;
newWeekSchedule.add(newWorkDay);
}
return newWeekSchedule;
}
hasFreeSlot(String jsonDate) {
var date = DateUtil.convertStringToDate(jsonDate);
var scheduleDay = date;
for (var event in this.freeSlots) {
var date = DateUtil.convertStringToDate(event);
var nDate = DateTime(date.year, date.month, date.day);
if (nDate.millisecondsSinceEpoch == scheduleDay.millisecondsSinceEpoch) {
return true;
}
}
return false;
}
String getDayMonths(DateTime dateTime) {
String dateFormat =
'${dateTime.day} ${DateUtil.getMonth(dateTime.month).toString().substring(0, 3)}';
return dateFormat;
}
openBookAppointment(selectedDate) {
//sharedPref.setObject(DOCTOR_SCHEDULE_DATE_SEL, selectedDate);
Navigator.push(
context,
FadePage(
page: AppointmentDetails(
appo: widget.appo,
doctorSchedule: selectedDate,
),
),
);
}
}

@ -0,0 +1,32 @@
class DoctorScheduleResponse {
String clinicName;
String date;
String dayName;
String projectName;
String workingHours;
DoctorScheduleResponse(
{this.clinicName,
this.date,
this.dayName,
this.projectName,
this.workingHours});
DoctorScheduleResponse.fromJson(Map<String, dynamic> json) {
clinicName = json['ClinicName'];
date = json['Date'];
dayName = json['DayName'];
projectName = json['ProjectName'];
workingHours = json['WorkingHours'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicName'] = this.clinicName;
data['Date'] = this.date;
data['DayName'] = this.dayName;
data['ProjectName'] = this.projectName;
data['WorkingHours'] = this.workingHours;
return data;
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
@ -685,7 +686,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
navigateToInsertComplaint() {
Navigator.push(context, FadePage(page: FeedbackHomePage()));
Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
}
rateAppointment() {

@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
class PageViewIndicator extends StatelessWidget {
final bool isActive;
final int length;
final double currentPage;
PageViewIndicator({
@required this.isActive,
@required this.length,
@required this.currentPage,
});
@override
Widget build(BuildContext context) {
return _indicator(this.isActive);
}
Widget _indicator(bool isActive) {
return Positioned(
top: 20,
left: 0,
right: 0,
child: Container(
margin: EdgeInsets.only(top: 0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
for (int i = 0; i < length; i++)
if (i == currentPage) ...[circleBar(true)] else circleBar(false),
],
),
),
);
}
Widget circleBar(bool isActive) {
return AnimatedContainer(
duration: Duration(milliseconds: 150),
margin: EdgeInsets.symmetric(horizontal: 3),
height: isActive ? 12 : 8,
width: isActive ? 12 : 8,
decoration: BoxDecoration(
color: isActive ? Colors.red : Colors.grey,
borderRadius: BorderRadius.all(Radius.circular(12))),
);
}
}

@ -774,6 +774,8 @@ class _ToDoState extends State<ToDo> {
authenticatedUser,
widget.browser,
appo.isLiveCareAppointment,
null,
null,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,

@ -5,7 +5,7 @@ class AppointmentHistory {
int projectID;
int appointmentNo;
DateTime appointmentDate;
Null appointmentDateN;
dynamic appointmentDateN;
int appointmentType;
String bookDate;
int patientType;
@ -26,14 +26,14 @@ class AppointmentHistory {
String confirmedOn;
int arrivalChangedBy;
DateTime arrivedOn;
Null editedBy;
Null editedOn;
Null doctorName;
Null doctorNameN;
dynamic editedBy;
dynamic editedOn;
dynamic doctorName;
dynamic doctorNameN;
String statusDesc;
Null statusDescN;
dynamic statusDescN;
bool vitalStatus;
Null vitalSignAppointmentNo;
dynamic vitalSignAppointmentNo;
int episodeID;
int actualDoctorRate;
String clinicName;
@ -55,8 +55,8 @@ class AppointmentHistory {
bool isMedicalReportRequested;
bool isOnlineCheckedIN;
String latitude;
Null listHISGetContactLensPerscription;
Null listHISGetGlassPerscription;
dynamic listHISGetContactLensPerscription;
dynamic listHISGetGlassPerscription;
String longitude;
int nextAction;
int noOfPatientsRate;

@ -1,5 +1,7 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -10,6 +12,10 @@ import 'package:flutter/material.dart';
import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key);
@override
_FeedbackHomePageState createState() => _FeedbackHomePageState();
}
@ -105,7 +111,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[SendFeedbackPage(), StatusFeedbackPage()],
children: <Widget>[SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()],
),
)
],

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'dart:convert';
import 'dart:io';
@ -27,6 +30,10 @@ import 'appointment_history.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override
_SendFeedbackPageState createState() => _SendFeedbackPageState();
}
@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController messageController = TextEditingController();
List<String> images = [];
String title;
AppointmentHistory appointHistory;
AppoitmentAllHistoryResultList appointHistory;
bool isShowListAppointHistory = true;
String message;
final formKey = GlobalKey<FormState>();
@ -73,11 +80,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
setMessageType(MessageType messageType) {
setState(() {
this.messageType = messageType;
this.appointHistory = widget.appointment;
});
}
@override
void initState() {
setState(() {
this.messageType = widget.messageType;
this.appointHistory = widget.appointment;
});
requestPermissions();
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>(
allowAny: true,
builder: (_, model, widget) => AppScaffold(
@ -138,14 +157,59 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
InkWell(
onTap: () {
setState(() {
isShowListAppointHistory = true;
isShowListAppointHistory = true;
});
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
bottomLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white,fontSize: 12),
),
)),
),
Expanded(
flex: 4,
child: Column(
@ -176,9 +240,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
Texts(
DateUtil
.getMonthDayYearDateFormatted(
appointHistory
.appointmentDate),
.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
),
StarRating(
@ -272,10 +334,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(model
.appointHistoryList[
index]
.appointmentDate),
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
),
StarRating(
@ -350,8 +409,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
controller: messageController,
suffixIcon: Icons.mic,
onSuffixTap: () {
requestPermissions();
openSpeechReco();
},
onChanged: (v) {
@ -615,6 +672,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
@override
void initState() {
messageTypeDialog = widget.messageTypeDialog;
super.initState();
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -12,6 +13,8 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter/src/widgets/image.dart' as flutterImage;
import 'base/base_view.dart';
dynamic languageID;
class FinalProductsPage extends StatefulWidget {
final String id;
final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed
@ -33,6 +36,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
color: Colors.blue,
size: 29.0,
);
getLanguageID() async {
languageID = await sharedPref.getString(APP_LANGUAGE);
}
void initState() {
getLanguageID();
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<PharmacyCategoriseViewModel>(
@ -55,7 +67,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
builder: (BuildContext context, PharmacyCategoriseViewModel model,
Widget child) =>
PharmacyAppScaffold(
appBarTitle: "Products",
appBarTitle: TranslationBase.of(context).products,
isBottomBar: false,
isShowAppBar: true,
backgroundColor: Colors.white,
@ -74,7 +86,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
Padding(
padding: EdgeInsets.all(8.0),
child: Texts(
'Products',
TranslationBase.of(context).products,
fontWeight: FontWeight.w600,
),
),
@ -213,11 +225,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
),
),
Container(
width: model
.finalProducts[
index]
.rxMessage !=
null
width: model.finalProducts[index].rxMessage != null
? MediaQuery.of(
context)
.size
@ -235,23 +243,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
.circular(
6)),
),
child: Texts(
model
.finalProducts[
index]
.rxMessage !=
null
? model
.finalProducts[
index]
.rxMessage
: "",
child:model.finalProducts[index].rxMessage != null
? Texts( languageID == 'ar' ? model.finalProducts[index].rxMessagen
: model.finalProducts[index].rxMessage,
color: Colors.white,
regular: true,
fontSize: 10,
fontWeight:
FontWeight.w600,
),
): Texts(""),
),
],
),

@ -46,7 +46,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo,
appBarIcons: [
IconButton(
model.isLogin ? IconButton(
padding: EdgeInsets.zero,
icon: Container(
decoration: BoxDecoration(
@ -64,7 +64,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
),
) : Container(),
],
body: Container(
margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),

@ -1,11 +1,10 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -21,7 +20,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -64,8 +62,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
@ -84,8 +81,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color: Colors.white.withOpacity(0.3),
@ -115,10 +111,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0),
),
Container(
margin: EdgeInsets.only(top: 5.0),
@ -140,12 +133,11 @@ class _HomePageState extends State<HomePage> {
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed:
(model.user != null && model.user.outSA == 1)
? () {}
: () {
navigateToCovidDriveThru();
},
onPressed: (model.user != null && model.user.outSA == 1)
? () {}
: () {
navigateToCovidDriveThru();
},
child: Center(
child: Center(
child: Center(
@ -177,13 +169,9 @@ class _HomePageState extends State<HomePage> {
height: 125,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset(
projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg',
projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg',
),
),
),
@ -200,10 +188,8 @@ class _HomePageState extends State<HomePage> {
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin)
? Container(
width: double.infinity,
@ -213,8 +199,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
@ -235,8 +220,7 @@ class _HomePageState extends State<HomePage> {
fontSize: 16,
),
Align(
alignment:
projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell(
onTap: () {
widget.goToMyProfile();
@ -274,8 +258,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
@ -302,8 +285,7 @@ class _HomePageState extends State<HomePage> {
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/verification_check.svg"),
child: SvgPicture.asset("assets/images/new-design/verification_check.svg"),
),
],
)
@ -318,8 +300,7 @@ class _HomePageState extends State<HomePage> {
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/pending.svg"),
child: SvgPicture.asset("assets/images/new-design/pending.svg"),
),
],
)
@ -407,8 +388,7 @@ class _HomePageState extends State<HomePage> {
width: 25,
height: 40,
),
Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, fontSize: 17)
Texts('${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17)
],
),
),
@ -465,9 +445,7 @@ class _HomePageState extends State<HomePage> {
),
),
),
if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67))
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
@ -487,9 +465,7 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -526,13 +502,10 @@ class _HomePageState extends State<HomePage> {
),
if (projectViewModel.havePrivilege(65))
DashboardItem(
onTap: () =>
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
onTap: () => (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -587,9 +560,7 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -630,14 +601,14 @@ class _HomePageState extends State<HomePage> {
SizedBox(
height: 8,
),
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
@ -668,7 +639,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
),
Container(
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EReferralPage()));
},
child: Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
@ -683,7 +659,7 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context).offersAndPackages,
TranslationBase.of(context).ereferral,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@ -699,51 +675,52 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
),
// ),
SizedBox(
height: 5,
),
@ -867,17 +844,7 @@ class _HomePageState extends State<HomePage> {
}
class DashboardItem extends StatelessWidget {
const DashboardItem(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4,
this.hasColorFilter = true})
const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true})
: super(key: key);
final bool hasBorder;
final String imageName;
@ -907,15 +874,12 @@ class DashboardItem extends StatelessWidget {
: HexColor('#050705').withOpacity(opacity)
: Colors.white,
borderRadius: BorderRadius.circular(6.0),
border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null
? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover,
colorFilter:
hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
)
: null,
),

@ -105,7 +105,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && model.count == 0) {
if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast(
message: TranslationBase.of(context).noBookedAppo);
} else {
@ -180,8 +180,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils.getCurrentLocation();
if (projectViewModel.isLogin) {
familyFileProvider.getSharedRecordByStatus();
}
});
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
HMGNetworkConnectivity(context, () {
GifLoaderDialogUtils.showMyDialog(context);
@ -195,7 +199,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
requestPermissions().then((results) {
registerGeofences();
// registerGeofences();
if (results[Permission.notification].isGranted)
_firebaseMessaging.getToken().then((String token) {
@ -471,8 +475,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
})
}
});
// familyFileProvider.getSharedRecordByStatus();
}
}
}
@ -481,6 +483,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
return Scaffold(
appBar: AppBar(
elevation: 0,

@ -43,7 +43,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: currentTab != 4
appBar: currentTab != 4 && currentTab != 3
? AppBar(
backgroundColor: Color(0xff5AB145),
elevation: 0,
@ -55,7 +55,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
),
child: InkWell(
child: Padding(
padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(5.0),
child: Row(
//crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
@ -172,7 +172,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) {
print(response);
var product = PharmacyProduct.fromJson(response["products"][0]);
product = PharmacyProduct.fromJson(response["products"][0]);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(context, FadePage(page: ProductDetailPage(product)));
}, onFailure: (String error, int statusCode) {

@ -1,3 +1,6 @@
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -28,6 +31,8 @@ class _LiveCareHomeState extends State<LiveCareHome>
ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this);
@ -40,7 +45,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory();
if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
});
super.initState();

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey,
color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),

@ -39,6 +39,9 @@ class _clinic_listState extends State<ClinicList> {
int currentSelectedIndex = 0;
LiveCareClinicsListResponse liveCareClinicsListResponse;
List<PatientERGetClinicsList> liveCareOnlineClinicsListResponse;
List<PatientERGetClinicsList> liveCareOfflineClinicsListResponse;
LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse;
bool isDataLoaded = false;
@ -57,14 +60,21 @@ class _clinic_listState extends State<ClinicList> {
bool isLiveCareTypeSelected = false;
String liveCareClinicIDs;
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
liveCareScheduleClinicsListResponse =
new LiveCareScheduleClinicsListResponse();
liveCareOnlineClinicsListResponse = new List();
liveCareOfflineClinicsListResponse = new List();
liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isLiveCareTypeSelected) openLiveCareSelectionDialog();
if (!isLiveCareTypeSelected) {
openLiveCareSelectionDialog();
}
});
getLanguageID();
@ -73,18 +83,14 @@ class _clinic_listState extends State<ClinicList> {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: currentSelectedLiveCareType == "immediate"
? getLiveCareImmediateClinicList()
: getLiveCareScheduleClinicList());
return SingleChildScrollView(child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList());
}
void startLiveCare() {
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse =
new ERAppointmentFeesResponse();
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
@ -94,9 +100,7 @@ class _clinic_listState extends State<ClinicList> {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
isError = false;
}
if (!isError)
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -154,8 +158,7 @@ class _clinic_listState extends State<ClinicList> {
service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
showLiveCarePaymentDialog(
getERAppointmentFeesList, res['WatingtimeInteger']);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -163,22 +166,16 @@ class _clinic_listState extends State<ClinicList> {
});
}
showLiveCarePaymentDialog(
GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: LiveCarePaymentDialog(
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName),
child: LiveCarePaymentDialog(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName),
),
);
},
@ -189,8 +186,7 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value) {
if (getERAppointmentFeesList.total == "0" ||
getERAppointmentFeesList.total == "0.0") {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
showLiveCareInfoDialog(getERAppointmentFeesList);
} else {
navigateToPaymentMethod(getERAppointmentFeesList, context);
@ -199,11 +195,9 @@ class _clinic_listState extends State<ClinicList> {
});
}
showLiveCareInfoDialog(
GetERAppointmentFeesList getERAppointmentFeesList) async {
showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -212,11 +206,9 @@ class _clinic_listState extends State<ClinicList> {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: LiveCareInfoDialog(),
@ -230,11 +222,8 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value) {
if (getERAppointmentFeesList.total == "0" ||
getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(authUser.patientID.toString() +
"" +
DateTime.now().millisecondsSinceEpoch.toString());
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
} else {
navigateToPaymentMethod(getERAppointmentFeesList, context);
}
@ -242,16 +231,14 @@ class _clinic_listState extends State<ClinicList> {
});
}
Future navigateToPaymentMethod(
GetERAppointmentFeesList getERAppointmentFeesList, context) async {
Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = selectedClinicID;
appo.appointmentNo = DateTime.now().millisecondsSinceEpoch;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -260,32 +247,16 @@ class _clinic_listState extends State<ClinicList> {
Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
print(value);
if (value != null) {
openPayment(value, authUser,
double.parse(getERAppointmentFeesList.total), appo);
openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
}
});
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser,
double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit,
appo: appo,
onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(
amount,
"LiveCare Payment",
Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo),
"12",
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod,
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString());
}
onBrowserLoadStart(String url) {
@ -317,19 +288,13 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo));
addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
} else {
AppToast.showErrorToast(message: res['Response_Message']);
}
@ -343,12 +308,9 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) {
service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: "New Call has been added successfully");
AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -370,13 +332,19 @@ class _clinic_listState extends State<ClinicList> {
print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) {
setState(() {
liveCareClinicsListResponse =
LiveCareClinicsListResponse.fromJson(res);
print(liveCareClinicsListResponse.patientERGetClinicsList.length);
selectedClinicID =
liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse
.patientERGetClinicsList[0].serviceName;
liveCareOnlineClinicsListResponse.clear();
liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res);
liveCareClinicsListResponse.patientERGetClinicsList.forEach((clinic) {
if (clinic.isOnline == 1) {
liveCareOnlineClinicsListResponse.add(clinic);
} else {
liveCareOfflineClinicsListResponse.add(clinic);
}
});
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceName;
isDataLoaded = true;
});
} else {
@ -399,14 +367,10 @@ class _clinic_listState extends State<ClinicList> {
print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) {
setState(() {
liveCareScheduleClinicsListResponse =
LiveCareScheduleClinicsListResponse.fromJson(res);
print(liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList.length);
selectedClinicID = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].clinicDesc;
liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res);
print(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length);
selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].clinicDesc;
isDataLoaded = true;
});
} else {
@ -420,33 +384,43 @@ class _clinic_listState extends State<ClinicList> {
});
}
openLiveCareSelectionDialog() {
Navigator.of(context)
.push(new MaterialPageRoute<String>(
builder: (BuildContext context) {
return LiveCareTypeSelect();
},
fullscreenDialog: true))
.then((value) {
if (value == null) {
Navigator.pop(context);
} else {
print(value);
isLiveCareTypeSelected = true;
if (value == "immediate") {
setState(() {
currentSelectedLiveCareType = "immediate";
});
getLiveCareClinicsList();
}
if (value == "schedule") {
setState(() {
currentSelectedLiveCareType = "schedule";
});
getLiveCareScheduleClinicsList();
openLiveCareSelectionDialog() async {
liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA);
if (liveCareClinicIDs != null) {
selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]);
setState(() {
currentSelectedLiveCareType = "immediate";
});
getLiveCareClinicsList();
startLiveCare();
} else {
Navigator.of(context)
.push(new MaterialPageRoute<String>(
builder: (BuildContext context) {
return LiveCareTypeSelect();
},
fullscreenDialog: true))
.then((value) {
if (value == null) {
Navigator.pop(context);
} else {
print(value);
isLiveCareTypeSelected = true;
if (value == "immediate") {
setState(() {
currentSelectedLiveCareType = "immediate";
});
getLiveCareClinicsList();
}
if (value == "schedule") {
setState(() {
currentSelectedLiveCareType = "schedule";
});
getLiveCareScheduleClinicsList();
}
}
}
});
});
}
}
Widget getLiveCareScheduleClinicList() {
@ -469,25 +443,15 @@ class _clinic_listState extends State<ClinicList> {
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList.length,
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]);
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID ==
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]
.serviceID
? true
: false,
clinicsHaveScheduleList:
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index],
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
),
);
@ -541,37 +505,51 @@ class _clinic_listState extends State<ClinicList> {
children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Text("Online Clinics: ",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
child: Text("Online Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOnlineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
},
child: ClinicCard(
isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOnlineClinicsListResponse[index],
languageID: languageID,
),
);
},
),
Container(
margin: EdgeInsets.all(15.0),
child: Text("Offline Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareClinicsListResponse
.patientERGetClinicsList.length,
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOfflineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
if(liveCareClinicsListResponse
.patientERGetClinicsList[index].isOnline == 1) {
updateSelectedIndex(liveCareClinicsListResponse
.patientERGetClinicsList[index]);
} else {
AppToast.showErrorToast(message: "Clinic is offline");
}
// if (liveCareClinicsListResponse.patientERGetClinicsList[index].isOnline == 1) {
// updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
// } else {
// AppToast.showErrorToast(message: "Clinic is offline");
// }
},
child: ClinicCard(
isSelected: selectedClinicID ==
liveCareClinicsListResponse
.patientERGetClinicsList[index]
.serviceID
? true
: false,
patientERGetClinicsList: liveCareClinicsListResponse
.patientERGetClinicsList[index],
isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOfflineClinicsListResponse[index],
languageID: languageID,
),
);
@ -617,11 +595,8 @@ class _clinic_listState extends State<ClinicList> {
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
service
.getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -631,34 +606,23 @@ class _clinic_listState extends State<ClinicList> {
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
});
this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -667,19 +631,8 @@ class _clinic_listState extends State<ClinicList> {
});
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
doctorsList: docList,
isLiveCareAppointment: true,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
}
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -611,11 +611,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.setUser(authenticatedUserObject.user);
getToDoCount();
pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save