Merge branch 'development' into development_new_design_2.0

# Conflicts:
#	lib/pages/login/login.dart
#	lib/uitl/translations_delegate_base.dart
#	lib/widgets/data_display/medical/LabResult/LabResultWidget.dart
#	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
merge-requests/390/head
Sikander Saleem 3 years ago
commit 6191377914

@ -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

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

@ -220,6 +220,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */, EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -305,6 +306,23 @@
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"; 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; showEnvVarsInLog = 0;
}; };
29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
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 = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;

@ -79,6 +79,12 @@ const GET_Patient_LAB_RESULT =
'Services/Patients.svc/REST/GetPatientLabResults'; 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults'; '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_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';

@ -435,6 +435,10 @@ const Map localizedValues = {
"en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine",
"ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" "ar": " يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء"
}, },
"pleaseSelectAllQuestionToContinue": {
"en": "Please answer all questions to continue...",
"ar": "يرجى الإجابة على جميع الأسئلة للمتابعة..."
},
"StartDay": {"en": "Start Day", "ar": "يوم البداية"}, "StartDay": {"en": "Start Day", "ar": "يوم البداية"},
"EndDay": {"en": "End Day", "ar": "يوم الانتهاء"}, "EndDay": {"en": "End Day", "ar": "يوم الانتهاء"},
"Days": {"en": "Days ", "ar": "أيام"}, "Days": {"en": "Days ", "ar": "أيام"},
@ -1382,4 +1386,9 @@ const Map localizedValues = {
"book-video-livecare-2": {"en": "I don't need to visit the clinic", "ar": "اتصال فيديو لا احتاج الحضور الى العيادة"}, "book-video-livecare-2": {"en": "I don't need to visit the clinic", "ar": "اتصال فيديو لا احتاج الحضور الى العيادة"},
"no-thankyou": {"en": "No Thanks", "ar": "لا شكرا"}, "no-thankyou": {"en": "No Thanks", "ar": "لا شكرا"},
"visit-clinic": {"en": "Schedule appointment with the doctor", "ar": "ارغب في حجز موعد مجدول مع الطبيب"}, "visit-clinic": {"en": "Schedule appointment with the doctor", "ar": "ارغب في حجز موعد مجدول مع الطبيب"},
"generate-covid-certificate": {"en": "Generate Covid-19 Certificate", "ar": "إنشاء شهادة كورونا"},
"is-report-outside-ksa": {"en": "Is the certificate needed for outside KSA?", "ar": "هل الشهادة مطلوبة من خارج المملكة؟"},
"passport-number": {"en": "Passport Number", "ar": "رقم جواز السفر"},
"enter-passport-number": {"en": "Please confirm or update your passport number:", "ar": "الرجاء تأكيد أو تحديث رقم جواز السفر الخاص بك:"},
"valid-passport-number": {"en": "Please enter valid passport number", "ar": "الرجاء إدخال رقم جواز سفر صالح"},
}; };

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

@ -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/lab_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.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/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_patient_lab_special_result.dart';
import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart'; import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class LabsService extends BaseService { class LabsService extends BaseService {
List<PatientLabOrders> patientLabOrdersList = List(); List<PatientLabOrders> patientLabOrdersList = List();
Future getPatientLabOrdersList() async { Future getPatientLabOrdersList() async {
hasError = false; hasError = false;
Map<String,dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_Patient_LAB_ORDERS, await baseAppClient.post(GET_Patient_LAB_ORDERS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientLabOrdersList.clear(); patientLabOrdersList.clear();
response['ListPLO'].forEach((hospital) { response['ListPLO'].forEach((hospital) {
patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); patientLabOrdersList.add(PatientLabOrders.fromJson(hospital));
@ -28,26 +25,20 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult();
RequestPatientLabSpecialResult();
List<PatientLabSpecialResult> patientLabSpecialResult = List(); List<PatientLabSpecialResult> patientLabSpecialResult = List();
List<LabResult> labResultList = List(); List<LabResult> labResultList = List();
List<LabOrderResult> labOrdersResultsList = List(); List<LabOrderResult> labOrdersResultsList = List();
Future getLaboratoryResult( Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
{String projectID,
int clinicID,
String invoiceNo,
String orderNo}) async {
hasError = false; hasError = false;
_requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.clinicID = clinicID;
_requestPatientLabSpecialResult.invoiceNo = invoiceNo; _requestPatientLabSpecialResult.invoiceNo = invoiceNo;
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
response['ListPLSR'].forEach((hospital) { response['ListPLSR'].forEach((hospital) {
patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital));
@ -67,8 +58,7 @@ class LabsService extends BaseService {
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID; body['ClinicID'] = patientLabOrder.clinicID;
await baseAppClient.post(GET_Patient_LAB_RESULT, await baseAppClient.post(GET_Patient_LAB_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); patientLabSpecialResult.clear();
labResultList.clear(); labResultList.clear();
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
@ -80,7 +70,65 @@ class LabsService extends BaseService {
}, body: body); }, 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; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['InvoiceNo'] = patientLabOrder.invoiceNo; body['InvoiceNo'] = patientLabOrder.invoiceNo;
@ -90,9 +138,8 @@ class LabsService extends BaseService {
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID; body['ClinicID'] = patientLabOrder.clinicID;
body['Procedure'] = procedure; body['Procedure'] = procedure;
await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { labOrdersResultsList.clear();
labOrdersResultsList.clear();
response['ListPLR'].forEach((lab) { response['ListPLR'].forEach((lab) {
labOrdersResultsList.add(LabOrderResult.fromJson(lab)); labOrdersResultsList.add(LabOrderResult.fromJson(lab));
}); });
@ -102,28 +149,23 @@ class LabsService extends BaseService {
}, body: body); }, body: body);
} }
RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail();
RequestSendLabReportEmail();
Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async { Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async {
_requestSendLabReportEmail.projectID = patientLabOrder.projectID; _requestSendLabReportEmail.projectID = patientLabOrder.projectID;
_requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo; _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = user.firstName +" "+ user.lastName; _requestSendLabReportEmail.patientName = user.firstName + " " + user.lastName;
_requestSendLabReportEmail.patientIditificationNum = _requestSendLabReportEmail.patientIditificationNum = user.patientIdentificationNo;
user.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = user.dateofBirth; _requestSendLabReportEmail.dateofBirth = user.dateofBirth;
_requestSendLabReportEmail.to = user.emailAddress; _requestSendLabReportEmail.to = user.emailAddress;
_requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}'; _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
_requestSendLabReportEmail.patientMobileNumber = user.mobileNumber; _requestSendLabReportEmail.patientMobileNumber = user.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName; _requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = user.setupID; _requestSendLabReportEmail.setupID = user.setupID;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestSendLabReportEmail.toJson()); }, body: _requestSendLabReportEmail.toJson());

@ -0,0 +1,168 @@
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) {
Navigator.push(
context,
FadePage(
page: CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: widget.proceduresList,
)));
} else {}
}).catchError((err) {
print(err);
});
}
}

@ -16,6 +16,8 @@ import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart';
class CovidDrivethruLocation extends StatefulWidget { class CovidDrivethruLocation extends StatefulWidget {
@override @override
_CovidDrivethruLocationState createState() => _CovidDrivethruLocationState(); _CovidDrivethruLocationState createState() => _CovidDrivethruLocationState();
@ -267,7 +269,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
next() { next() {
if (isLocationSelected) { if (isLocationSelected) {
getPaymentInfo(context, projectID); Navigator.push(
context,
FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList,)));
} else { } else {
Utils.showErrorToast( Utils.showErrorToast(
"Please select address from the dropdown menu to continue"); "Please select address from the dropdown menu to continue");

@ -0,0 +1,125 @@
import 'package:diplomaticquarterapp/core/service/medical/labs_service.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/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class PassportUpdatePage extends StatefulWidget {
@override
_PassportUpdatePageState createState() => _PassportUpdatePageState();
}
class _PassportUpdatePageState extends State<PassportUpdatePage> {
TextEditingController passportNumber = new TextEditingController();
bool _isButtonDisabled;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getPassportNumber());
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).passportNumber,
isShowAppBar: true,
isBottomBar: true,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(45.0),
child: Text(TranslationBase.of(context).enterPassportNumber, textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: SvgPicture.asset("assets/images/new-design/passport.svg", width: 250.0, fit: BoxFit.fill),
),
Container(
margin: EdgeInsets.only(left: 50.0, right: 50.0, top: 25.0),
child: TextFields(
keyboardType: TextInputType.text,
fontWeight: FontWeight.normal,
controller: passportNumber,
onChanged: (value) => {_onPassportTextChanged(value)},
padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).passportNumber,
))
],
),
),
),
bottomSheet: Container(
margin: EdgeInsets.only(top: 10.0, left: 30.0, right: 30.0, bottom: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
if (_isButtonDisabled == false)
updatePassportNumber();
else
AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber);
},
child: Text(TranslationBase.of(context).submit, style: TextStyle(fontSize: 18.0)),
),
),
),
);
}
_onPassportTextChanged(content) {
if (content.length >= 1) {
setState(() {
_isButtonDisabled = false;
});
} else {
setState(() {
_isButtonDisabled = true;
});
}
}
void updatePassportNumber() {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.updateCovidPassportNumber(passportNumber.text).then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(true);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
void getPassportNumber() {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidPassportNumber().then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']);
passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo'];
if(res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
_isButtonDisabled = false;
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}

@ -92,7 +92,7 @@ class AppToast {
double fontSize = 16, double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP, ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white, Color textColor = Colors.white,
int radius, int radius = 15,
int elevation, int elevation,
int imageSize = 32, int imageSize = 32,
}) { }) {
@ -107,7 +107,9 @@ class AppToast {
icon: ICON.CLOSE, icon: ICON.CLOSE,
radius: radius, radius: radius,
elevation: elevation, elevation: elevation,
imageSize: imageSize); imageSize: imageSize
);
} }
/// cancel toast /// cancel toast

@ -2088,7 +2088,7 @@ class TranslationBase {
String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode];
String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode];
String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode];
String get type => localizedValues["type"][locale.languageCode]; String get type => localizedValues["type"][locale.languageCode];
String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode]; String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode];
@ -2126,6 +2126,12 @@ class TranslationBase {
String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; String get noThankyou => localizedValues["no-thankyou"][locale.languageCode];
String get visitClinic => localizedValues["visit-clinic"][locale.languageCode]; String get visitClinic => localizedValues["visit-clinic"][locale.languageCode];
String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode];
String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode];
String get passportNumber => localizedValues["passport-number"][locale.languageCode];
String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode];
String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {
@ -2142,3 +2148,7 @@ class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {
@override @override
bool shouldReload(TranslationBaseDelegate old) => false; bool shouldReload(TranslationBaseDelegate old) => false;
} }
extension xTranslationBase on TranslationBase{
isArabic() => locale.languageCode == "ar";
}

@ -1,12 +1,19 @@
import 'package:diplomaticquarterapp/core/model/labs/lab_result.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_orders.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import '../../text.dart'; import '../../text.dart';
import 'FlowChartPage.dart'; import 'FlowChartPage.dart';
@ -16,8 +23,11 @@ class LabResultWidget extends StatelessWidget {
final List<LabResult> patientLabResultList; final List<LabResult> patientLabResultList;
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
LabResult covidLabResult;
LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder}) : super(key: key); LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder}) : super(key: key);
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -63,11 +73,97 @@ class LabResultWidget extends StatelessWidget {
}, },
children: fullData(patientLabResultList, context), children: fullData(patientLabResultList, context),
), ),
checkIfCovidLab(patientLabResultList)
? Container(
margin: EdgeInsets.only(top: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
showKSADialog(context);
},
child: Text(TranslationBase.of(context).generateCovidCertificate, style: TextStyle(fontSize: 18.0)),
),
),
)
: Container(),
], ],
), ),
); );
} }
List<TableRow> fullData(List<LabResult> labResultList, context) {
generateCovidCertificate(BuildContext context, String isOutsideKSA) {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.generateCovidLabReport(covidLabResult, isOutsideKSA).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
openPassportUpdatePage(BuildContext context) {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value);
if(value != null && value == true) {
showConfirmMessage(context, projectViewModel.user.emailAddress, "yes");
}
});
}
void showKSADialog(BuildContext context) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).isReportOutsideKsa,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () => {
Navigator.of(context).pop(),
openPassportUpdatePage(context)
// showConfirmMessage(context, projectViewModel.user.emailAddress, "yes")
},
cancelFunction: () => {showConfirmMessage(context, projectViewModel.user.emailAddress, "no")});
dialog.showAlertDialog(context);
}
void showConfirmMessage(BuildContext context, String email, String isOutsideKSA) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: email,
onTapSendEmail: () {
generateCovidCertificate(context, isOutsideKSA);
},
),
);
}
bool checkIfCovidLab(List<LabResult> labResultList) {
bool isCovidResult = false;
labResultList.forEach((order) {
if (order.testCode.toUpperCase().contains("COVID") && order.isCertificateAllowed.toString() == "true") {
isCovidResult = true;
covidLabResult = order;
}
print(covidLabResult.testCode);
});
return isCovidResult;
}
List<TableRow> fullData(List<LabResult> labResultList, context) { List<TableRow> fullData(List<LabResult> labResultList, context) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(

@ -28,6 +28,7 @@ class ConfirmDialog {
child: Texts(this.cancelText), child: Texts(this.cancelText),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
cancelFunction();
}); });
Widget continueButton = FlatButton(child: Texts(okText), onPressed: okFunction); Widget continueButton = FlatButton(child: Texts(okText), onPressed: okFunction);

@ -23,23 +23,23 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PREAUTH_SERVICE_URL =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static String PRESCRIPTION_PAYMENT_WITH_ORDERID = static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live
// Packages // Packages
static String PACKAGES_REQUEST_PAYMENT_URL = static String PACKAGES_REQUEST_PAYMENT_URL =

Loading…
Cancel
Save