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-update-with-lab-changes
hussam al-habibeh 5 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 # 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. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -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,7 +220,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */, EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */, 29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */,
); );
buildRules = ( 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"; 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;
}; };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 29B24CD65FDFD6111DD04897 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "Thin Binary"; name = "[CP] Copy Pods Resources";
outputPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; 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; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Copy Pods Resources"; name = "Thin Binary";
outputFileListPaths = ( outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;

@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
//const BASE_PHARMACY_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/'; const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs // Pharmacy Production URLs
const BASE_PHARMACY_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 PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; 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'; const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver // Delivery Driver
const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; const DRIVER_LOCATION =
'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather //weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; 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'; const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials // 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 ///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_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
const GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; const GET_DOCTOR_PRE_POST_IMAGES =
const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; 'Services/Doctors.svc/REST/GetDoctorPrePostImages';
const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; const GET_DOCTOR_RATING_NOTES =
'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
const GET_DOCTOR_RATING_DETAILS =
'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTIONS_ALL_ORDERS =
const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; const GET_PRESCRIPTION_REPORT =
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; '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 ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const GET_Patient_LAB_SPECIAL_RESULT =
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; const SEND_LAB_RESULT_EMAIL =
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; '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_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 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 ///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@ -80,28 +104,47 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory'; '/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN ///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 ///Er Nearest
const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online ///ED Online
const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; const ER_GET_VISUAL_TRIAGE_QUESTIONS =
const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
const ER_SAVE_TRIAGE_INFORMATION =
"services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic = const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest ///Er Nearest
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; const GET_AMBULANCE_REQUEST =
const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; const GET_PATIENT_ALL_PRES_ORDERS =
const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; 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 /// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
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 ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; 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'; const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation ///babyInformation
const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; const GET_BABYINFORMATION_REQUEST =
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID ///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation ///userInformation
const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; const GET_USERINFORMATION_REQUEST =
'Services/Community.svc/REST/GetUserInformation_New';
///Update email ///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; 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'; const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails ///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 GET_BLOOD_AGREEMENT =
const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
const SAVE_BLOOD_AGREEMENT =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports ///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; const INSERT_REQUEST_FOR_MEDICAL_REPORT =
const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; const IS_LAST_APPOITMENT_RATED =
const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; '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'; 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"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list //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 //URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; 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"; const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list //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 //URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment //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 //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 //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 //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 //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 //URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR //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 //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 //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 //URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; 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 IS_ALLOW_ASK_DOCTOR =
const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; 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 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 = const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; "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 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 GET_LIVECARE_HISTORY =
const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; 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 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 //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
@ -274,16 +365,21 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; const GET_PAtIENTS_INSURANCE =
const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; "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 INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; const GET_PATIENT_INSURANCE_DETAILS =
const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; "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 = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; 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 SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; 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 SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; '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 = const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; '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 = const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; '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 ///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 ///My Trackers
const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; const GET_DIABETIC_RESULT_AVERAGE =
const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; const GET_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; const ADD_DIABTEC_RESULT =
const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; const GET_BLOOD_PRESSURE_RESULT =
const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; '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 = const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; const GET_CALL_INFO_HOURS_RESULT =
const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV =
const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; const UPDATE_DIABETIC_RESULT =
const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; const DEACTIVATE_DIABETIC_STATUS =
const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
const DEACTIVATE_BLOOD_PRESSURES_STATUS =
const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
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 GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; 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'; const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O // H2O
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; const H2O_GET_USER_PROGRESS =
const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; const H2O_INSERT_USER_ACTIVITY =
const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; 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 //E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; const GET_ALL_RELATIONSHIP_TYPES =
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; "Services/Patients.svc/REST/GetAllRelationshipTypes";
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; 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 GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders // 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 //Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; // 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_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
const PHARMACY_GET_COUNTRY = "countries"; 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_BANNER = "promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; 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 = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders"; const ORDER_SHOPPING_CART = "orders";
const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; const GET_LACUM_ACCOUNT_INFORMATION =
const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; "Services/Patients.svc/REST/GetLakumAccountInformation";
const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; const GET_LACUM_GROUP_INFORMATION =
const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; const LACUM_ACCOUNT_ACTIVATE =
const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; "Services/Patients.svc/REST/LakumAccountActivation";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; 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 PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?"; const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?"; const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care // Home Health Care
const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; const HHC_GET_ALL_SERVICES =
const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; const HHC_GET_ALL_CMC_SERVICES =
const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; 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 GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PATIENT_ALL_PRES_ORD =
const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; '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 PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";
@ -460,7 +611,8 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS = 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='; '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_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 SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10; const TIMER_MIN = 10;
@ -476,13 +628,17 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids='; 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 { class AppGlobal {
static var context; 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 PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
const H2O_UNIT = 'H2O_UNIT'; const H2O_UNIT = 'H2O_UNIT';
const H2O_REMINDER = 'H2O_REMINDER'; 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; int languageID;
String iPAdress; String iPAdress;
String generalid; String generalid;
int patientOutSA; dynamic patientOutSA;
String sessionID; String sessionID;
bool isDentalAllowedBackend; bool isDentalAllowedBackend;
int deviceTypeID; int deviceTypeID;
@ -164,7 +164,7 @@ class PatientER {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID.toString();
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; 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 { class PatientERTransportationMethod {
dynamic id; int id;
DateTime createDate; String serviceID;
DateTime lastEditDate; int orderServiceID;
dynamic createdBy; String text;
dynamic lastEditBy; String textN;
bool isActive;
String title;
String titleAR;
dynamic price; dynamic price;
dynamic isDefault; dynamic priceVAT;
dynamic visibility; dynamic priceTotal;
dynamic durationId; bool isEnabled;
String description; int orderId;
String descriptionAR; int quantity;
dynamic totalPrice;
dynamic vAT;
PatientERTransportationMethod( PatientERTransportationMethod(
{ {this.id,
this.id, this.serviceID,
this.createDate, this.orderServiceID,
this.lastEditDate, this.text,
this.createdBy, this.textN,
this.lastEditBy,
this.isActive,
this.title,
this.titleAR,
this.price, this.price,
this.isDefault, this.priceVAT,
this.visibility, this.priceTotal,
this.durationId, this.isEnabled,
this.description, this.orderId,
this.descriptionAR, this.quantity});
this.totalPrice,
this.vAT});
PatientERTransportationMethod.fromJson( PatientERTransportationMethod.fromJson(Map<String, dynamic> json) {
Map<String, dynamic> json) { id = json['id'];
id = json['Id']; serviceID = json['serviceID'];
createDate = DateUtil.convertStringToDate(json['CreateDate']); orderServiceID = json['orderServiceID'];
lastEditDate = DateUtil.convertStringToDate(json['LastEditDate']); text = json['text'];
createdBy = json['CreatedBy']; textN = json['textN'];
lastEditBy = json['LastEditBy']; price = json['price'];
isActive = json['IsActive']; priceVAT = json['priceVAT'];
title = json['Title']; priceTotal = json['priceTotal'];
titleAR = json['TitleAR']; isEnabled = json['isEnabled'];
price = json['Price']; orderId = json['orderId'];
isDefault = json['isDefault']; quantity = json['quantity'];
visibility = json['Visibility'];
durationId = json['DurationId'];
description = json['Description'];
descriptionAR = json['DescriptionAR'];
totalPrice = json['TotalPrice'];
vAT = json['VAT'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['Id'] = this.id; data['id'] = this.id;
data['CreateDate'] = this.createDate; data['serviceID'] = this.serviceID;
data['LastEditDate'] = this.lastEditDate; data['orderServiceID'] = this.orderServiceID;
data['CreatedBy'] = this.createdBy; data['text'] = this.text;
data['LastEditBy'] = this.lastEditBy; data['textN'] = this.textN;
data['IsActive'] = this.isActive; data['price'] = this.price;
data['Title'] = this.title; data['priceVAT'] = this.priceVAT;
data['TitleAR'] = this.titleAR; data['priceTotal'] = this.priceTotal;
data['Price'] = this.price; data['isEnabled'] = this.isEnabled;
data['isDefault'] = this.isDefault; data['orderId'] = this.orderId;
data['Visibility'] = this.visibility; data['quantity'] = this.quantity;
data['DurationId'] = this.durationId;
data['Description'] = this.description;
data['DescriptionAR'] = this.descriptionAR;
data['TotalPrice'] = this.totalPrice;
data['VAT'] = this.vAT;
return data; return data;
} }
} }

@ -29,38 +29,39 @@ class RequestInsertCOCItem {
int deviceTypeID; int deviceTypeID;
int patientType; int patientType;
double appVersion; double appVersion;
bool forDemo;
RequestInsertCOCItem( RequestInsertCOCItem(
{this.isUserLoggedIn, {this.isUserLoggedIn,
this.mobileNo, this.mobileNo,
this.identificationNo, this.identificationNo,
this.patientID, this.patientID,
this.patientOutSA, this.patientOutSA,
this.patientTypeID, this.patientTypeID,
this.tokenID, this.tokenID,
this.patientName, this.patientName,
this.projectID, this.projectID,
this.fileName, this.fileName,
this.attachment, this.attachment,
this.uILanguage, this.uILanguage,
this.browserInfo, this.browserInfo,
this.cOCTypeName, this.cOCTypeName,
this.formTypeID, this.formTypeID,
this.details, this.details,
this.deviceInfo, this.deviceInfo,
this.deviceType, this.deviceType,
this.title, this.title,
this.resolution, this.resolution,
this.versionID, this.versionID,
this.channel, this.channel,
this.languageID, this.languageID,
this.iPAdress, this.iPAdress,
this.generalid, this.generalid,
this.sessionID, this.sessionID,
this.isDentalAllowedBackend, this.isDentalAllowedBackend,
this.deviceTypeID, this.deviceTypeID,
this.patientType, this.patientType,
this.appVersion}); this.appVersion,
this.forDemo});
RequestInsertCOCItem.fromJson(Map<String, dynamic> json) { RequestInsertCOCItem.fromJson(Map<String, dynamic> json) {
isUserLoggedIn = json['IsUserLoggedIn']; isUserLoggedIn = json['IsUserLoggedIn'];
@ -93,6 +94,7 @@ class RequestInsertCOCItem {
deviceTypeID = json['DeviceTypeID']; deviceTypeID = json['DeviceTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
appVersion = json['AppVersion']; appVersion = json['AppVersion'];
forDemo = json['ForDemo'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -127,6 +129,8 @@ class RequestInsertCOCItem {
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['AppVersion'] = this.appVersion; data['AppVersion'] = this.appVersion;
data['ForDemo'] = this.forDemo;
return data; return data;
} }
} }

@ -1,15 +1,29 @@
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; dynamic femaleInterpretativeData;
int gender; int gender;
bool isCertificateAllowed;
int lineItemNo; int lineItemNo;
dynamic maleInterpretativeData; dynamic maleInterpretativeData;
String notes; dynamic 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;
@ -21,37 +35,47 @@ class LabResult {
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);
}
}

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

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.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_list_model.dart';
import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class AncillaryOrdersService extends BaseService { class AncillaryOrdersService extends BaseService {
List<AncillaryOrdersListModel> _ancillaryLists = List(); List<AncillaryOrdersListModel> _ancillaryLists = List();
@ -20,6 +21,8 @@ class AncillaryOrdersService extends BaseService {
_ancillaryLists = []; _ancillaryLists = [];
response['AncillaryOrderList'].forEach((item) { response['AncillaryOrderList'].forEach((item) {
ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); ancillaryLists.add(AncillaryOrdersListModel.fromJson(item));
print("response of ancillary Lists__________");
print(response);
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -27,175 +30,25 @@ class AncillaryOrdersService extends BaseService {
}, body: body); }, body: body);
} }
Future getOrdersDetails(appointmentNo, orderNo) async { Future getOrdersDetails(appointmentNo, orderNo, projectID) async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['AppointmentNo_Vida'] = appointmentNo;
body['OrderNo'] = orderNo;
body['ProjectID'] = projectID;
// "OrderNo=$orderNo&AppointmentNo_Vida=$appointmentNo&ProjectID=$projectID"
hasError = false; hasError = false;
await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_ancillaryProcLists = []; _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) { response['AncillaryOrderProcList'].forEach((item) {
ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(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) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

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

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

@ -7,9 +7,6 @@ class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List(); List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
hasError = false; hasError = false;
@ -23,21 +20,15 @@ class ErService extends BaseService {
body['Latitude'] = lat ?? 0; body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0; body['Longitude'] = long ?? 0;
dynamic localRes;
await baseAppClient.post(GET_NEAREST_HOSPITAL, await baseAppClient.post(GET_NEAREST_HOSPITAL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
projectAvgERWaitingTimeModelList.clear(); localRes = response;
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList
.add(ProjectAvgERWaitingTime.fromJson(vital));
});
projectAvgERWaitingTimeModelList.forEach((element) {
Latitude = '${element.latitude}';
Longitude = '${element.longitude}';
PhoneNumber = '${element.phoneNumber}';
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, 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/COC_items.dart';
import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart';
import 'package:diplomaticquarterapp/core/service/base_service.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/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -11,41 +12,46 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService { class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List(); List<COCItem> cOCItemList = List();
RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
List<AppointmentHistory> appointHistoryList = List(); List<AppoitmentAllHistoryResultList> appointHistoryList = List();
Future sendCOCItem( Future sendCOCItem(
{String title, {String title,
String details, String details,
String cOCTypeName, String cOCTypeName,
String attachment, String attachment,
AppointmentHistory appointHistory}) async { AppoitmentAllHistoryResultList appointHistory}) async {
hasError = false; hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_requestInsertCOCItem.attachment = attachment; _requestInsertCOCItem.attachment = attachment;
_requestInsertCOCItem.title = title; _requestInsertCOCItem.title = title;
_requestInsertCOCItem.details = details; _requestInsertCOCItem.details = details;
_requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.cOCTypeName = cOCTypeName;
_requestInsertCOCItem.formTypeID = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName;
_requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); _requestInsertCOCItem.mobileNo =
"966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.isUserLoggedIn = true;
_requestInsertCOCItem.projectID = user.projectID; _requestInsertCOCItem.projectID = user.projectID;
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
_requestInsertCOCItem.fileName = ""; _requestInsertCOCItem.fileName = "";
_requestInsertCOCItem.appVersion = VERSION_ID; _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.browserInfo = Platform.localHostname;
_requestInsertCOCItem.deviceInfo = Platform.localHostname; _requestInsertCOCItem.deviceInfo = Platform.localHostname;
_requestInsertCOCItem.resolution = "400x847"; _requestInsertCOCItem.resolution = "400x847";
_requestInsertCOCItem.projectID = 0; _requestInsertCOCItem.projectID = 0;
_requestInsertCOCItem.identificationNo = _requestInsertCOCItem.identificationNo =
int.parse(user.patientIdentificationNo); int.parse(user.patientIdentificationNo);
if (BASE_URL.contains('uat')) {
_requestInsertCOCItem.forDemo = true;
}
final Map<String, dynamic> body = _requestInsertCOCItem.toJson(); final Map<String, dynamic> body = _requestInsertCOCItem.toJson();
if (appointHistory != null) { if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo; body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate); body['AppointmentDate'] = appointHistory.appointmentDate;
body['ClinicID'] = appointHistory.clinicID; body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName; body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID; body['DoctorID'] = appointHistory.doctorID;
@ -65,9 +71,13 @@ class FeedbackService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
body['IdentificationNo'] = user.patientIdentificationNo; body['IdentificationNo'] = user.patientIdentificationNo;
body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); body['MobileNo'] =
"966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['Searching_type'] = '1'; body['Searching_type'] = '1';
if (BASE_URL.contains('uat')) {
body['ForDemo'] = true;
}
await baseAppClient.post(GET_STATUS_FOR_COCO, await baseAppClient.post(GET_STATUS_FOR_COCO,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
cOCItemList = []; cOCItemList = [];
@ -88,7 +98,8 @@ class FeedbackService extends BaseService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
appointHistoryList = []; appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) { response['AppoimentAllHistoryResultList'].forEach((appoint) {
appointHistoryList.add(AppointmentHistory.fromJson(appoint)); appointHistoryList
.add(AppoitmentAllHistoryResultList.fromJson(appoint));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; 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/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());

@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:flutter/cupertino.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 { class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List(); List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
List<DoctorScheduleResponse> doctorScheduleResponse = List();
List<String> freeSlots = [];
getAppointmentHistory({bool isActiveAppointment = false}) async { getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
if(isActiveAppointment) { if (isActiveAppointment) {
body['IsActiveAppointment'] = true; body['IsActiveAppointment'] = true;
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
} }
@ -37,12 +40,51 @@ class MedicalService extends BaseService {
body['RequesterMobileNo'] = user.mobileNumber; body['RequesterMobileNo'] = user.mobileNumber;
body['RequesterIsOutSA'] = user.outSA; body['RequesterIsOutSA'] = user.outSA;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, 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) { getFreeSlot(DoctorList doctorRequest) async {
hasError = true; Map<String, dynamic> request;
super.error = error; request = {
}, body: body); '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 { class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List(); List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
double totalAdvanceBalanceAmount; dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List(); List<PatientInfo> patientInfoList = List();
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse();

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

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

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

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; 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/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.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/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
@ -27,12 +29,17 @@ class AmRequestViewModel extends BaseViewModel {
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList => List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList; _medicalService.appoitmentAllHistoryResultList;
List<AmbulanceRequestOrdersModel> get patientAmbulanceRequestOrdersList =>
_amService.patientAmbulanceRequestOrdersList;
List<HospitalsModel> get hospitals => _hospitalService.hospitals; List<HospitalsModel> get hospitals => _hospitalService.hospitals;
bool get hasPendingOrder =>_amService.hasPendingOrder; bool get hasPendingOrder =>_amService.hasPendingOrder;
PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder; PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder;
AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder;
Future getAppointmentHistory() async { Future getAppointmentHistory() async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true); await _medicalService.getAppointmentHistory(isActiveAppointment: true);
@ -60,7 +67,18 @@ class AmRequestViewModel extends BaseViewModel {
error = _hospitalService.error; error = _hospitalService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else } 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 { Future getPatientAllPresOrdersList() async {
@ -87,22 +105,23 @@ class AmRequestViewModel extends BaseViewModel {
Future updatePressOrder({@required int presOrderID}) async { Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy); 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) { if (_amService.hasError) {
error = _amService.error; error = _amService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else } else
getPatientAllPresOrdersList(); getPatientAllPresOrdersListRC();
} }
Future insertERPressOrder({@required PatientER patientER}) async { Future insertERPressOrder({@required PatientER_RC patientER}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _amService.insertERPressOrder(patientER: patientER); await _amService.insertERPressOrder(patientER: patientER);
if (_amService.hasError) { if (_amService.hasError) {
error = _amService.error; error = _amService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } 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/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.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/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel {
List<COCItem> get cOCItemList => _feedbackService.cOCItemList; List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
List<AppointmentHistory> get appointHistoryList => List<AppoitmentAllHistoryResultList> get appointHistoryList =>
_feedbackService.appointHistoryList; _feedbackService.appointHistoryList;
Future<bool> sendCOCItem( Future<bool> sendCOCItem(
@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel {
String details, String details,
String cOCTypeName, String cOCTypeName,
String attachment, String attachment,
AppointmentHistory appointHistory}) async { AppoitmentAllHistoryResultList appointHistory}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _feedbackService.sendCOCItem( await _feedbackService.sendCOCItem(
title: title, 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/service/medical/EyeService.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class EyeViewModel extends BaseViewModel { class EyeViewModel extends BaseViewModel {
EyeService _eyeService = locator<EyeService>(); EyeService _eyeService = locator<EyeService>();
@ -20,31 +21,35 @@ class EyeViewModel extends BaseViewModel {
error = _eyeService.error; error = _eyeService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_eyeService.appoimentAllHistoryResultList.forEach((element) { if (_eyeService.appoimentAllHistoryResultList.length == 0) {
List<AppointmentFilter> _appointmentFilter = appointmentFilter new AppToast().backWithEmpty();
.where( } else {
(elementFilter) => _eyeService.appoimentAllHistoryResultList.forEach((element) {
elementFilter.filterName == element.projectName, List<AppointmentFilter> _appointmentFilter = appointmentFilter
) .where(
.toList(); (elementFilter) =>
elementFilter.filterName == element.projectName,
if (_appointmentFilter.length != 0) { )
appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])] .toList();
.appointmentAllHistoryResultList
.add(element);
} else {
appointmentFilter.add(AppointmentFilter(
element,
element.projectName,
));
}
});
if (_appointmentFilter.length != 0) {
appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])]
.appointmentAllHistoryResultList
.add(element);
} else {
appointmentFilter.add(AppointmentFilter(
element,
element.projectName,
));
}
});
}
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
sendGlassesPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async { sendGlassesPrescriptionEmail(
{int appointmentNo, String projectName, int projectID}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _eyeService.sendGlassesPrescriptionEmail( await _eyeService.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo, 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); setState(ViewState.Busy);
await _eyeService.sendContactLensPrescriptionEmail( await _eyeService.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo, appointmentNo: appointmentNo,
@ -71,6 +77,4 @@ class EyeViewModel extends BaseViewModel {
setState(ViewState.Idle); 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/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.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 { class MedicalViewModel extends BaseViewModel {
MedicalService _medicalService = locator<MedicalService>(); MedicalService _medicalService = locator<MedicalService>();
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList => List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList; _medicalService.appoitmentAllHistoryResultList;
List<DoctorScheduleResponse> get getDoctorScheduleList =>
_medicalService.doctorScheduleResponse;
List<String> get freeSlots => _medicalService.freeSlots;
getAppointmentHistory() async { 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); setState(ViewState.Busy);
await _medicalService.getAppointmentHistory(); await _medicalService.getFreeSlot(doctorRequest);
if (_medicalService.hasError) { if (_medicalService.hasError) {
error = _medicalService.error; error = _medicalService.error;
setState(ViewState.Error); setState(ViewState.Error);

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

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

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

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

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

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

@ -279,12 +279,13 @@ class MobileNumberTextFiled extends StatelessWidget {
const MobileNumberTextFiled({ const MobileNumberTextFiled({
Key key, Key key,
this.controller, this.controller,
this.code this.code, this.onChange
}) : super(key: key); }) : super(key: key);
final TextEditingController controller; final TextEditingController controller;
final String code; final String code;
final Function onChange;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -313,6 +314,7 @@ class MobileNumberTextFiled extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: TextField( child: TextField(
controller: controller, controller: controller,
onChanged: onChange,
keyboardType: TextInputType.phone, keyboardType: TextInputType.phone,
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, hintText: '5xxxxxxxx'), 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/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -409,16 +411,17 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
15; 15;
this.widget.createEReferralRequestModel.preferredBranchName = this.widget.createEReferralRequestModel.preferredBranchName =
"Arryan Hospital"; "Arryan Hospital";
// this.widget.createEReferralRequestModel.fullName= "";
this.widget.createEReferralRequestModel.otherRelationship = this.widget.createEReferralRequestModel.otherRelationship =
""; "";
// this.widget.createEReferralRequestModel.;
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
await model await model
.createEReferral(this.widget.createEReferralRequestModel); .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, loading: model.state == ViewState.BusyLocal,
disabled: medicalReportImages.length == 0, disabled: medicalReportImages.length == 0,

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

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

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

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

@ -95,7 +95,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
.map( .map(
(item) => InkWell( (item) => InkWell(
onTap: () { onTap: () {
ancillaryOrdersDetails(item); ancillaryOrdersDetails(item, model.ancillaryLists[0].projectID);
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -166,11 +166,11 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders>
.toList()); .toList());
} }
ancillaryOrdersDetails(item) { ancillaryOrdersDetails(item, projectId) {
Navigator.push( Navigator.push(
context, context,
FadePage( 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:diplomaticquarterapp/uitl/date_uitl.dart';
import "package:collection/collection.dart"; import "package:collection/collection.dart";
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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 { class AnicllaryOrdersDetails extends StatefulWidget {
final dynamic appoNo; final dynamic appoNo;
final dynamic orderNo; final dynamic orderNo;
AnicllaryOrdersDetails(this.appoNo, this.orderNo); final dynamic projectID;
AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID);
@override @override
_AnicllaryOrdersState createState() => _AnicllaryOrdersState(); _AnicllaryOrdersState createState() => _AnicllaryOrdersState();
} }
@ -30,8 +34,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AnciallryOrdersViewModel>( return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) => onModelReady: (model) => model.getOrdersDetails(
model.getOrdersDetails(widget.appoNo, widget.orderNo), widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
@ -64,7 +68,15 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
children: [ children: [
Button( Button(
label: TranslationBase.of(context).payNow, 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, fontSize: 20,
), ),
Texts( Texts(
model.ancillaryListsDetails[0].patientID.toString(), model.ancillaryLists[0].patientID.toString(),
) )
], ],
), ),
@ -126,7 +138,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
children: [ children: [
Texts( Texts(
TranslationBase.of(context).invoiceNo, TranslationBase.of(context).invoiceNo,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.red[500],
), ),
Texts(" : "), Texts(" : "),
Texts( Texts(
@ -136,24 +149,26 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
), ),
Row( Row(
children: [ children: [
Texts( // Texts(
TranslationBase.of(context).date, // TranslationBase.of(context).invoiceDate,
fontWeight: FontWeight.bold, // // fontWeight: FontWeight.bold,
), // color: Colors.red[500],
// ),
Texts(" : "), Texts(" : "),
Texts( Texts(
DateUtil.getFormattedDate( DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate( DateUtil.convertStringToDate(
model.ancillaryListsDetails[0].appointmentDate), model.ancillaryListsDetails[0].appointmentDate),
"MMM dd,yyyy"), ),
) )
], ],
), ),
Row( Row(
children: [ children: [
Texts( Texts(
TranslationBase.of(context).date, TranslationBase.of(context).doctorName,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.red[500],
), ),
Texts(" : "), Texts(" : "),
Texts( Texts(
@ -206,13 +221,46 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
Divider( Divider(
color: Colors.red[800], color: Colors.red[800],
thickness: 3, 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) { Widget getAncillaryDetails(model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcList, Map newMap = groupBy(
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList,
(obj) => obj.procedureCategoryName); (obj) => obj.procedureCategoryName);
print(newMap); print(newMap);
@ -247,7 +295,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
String getTotalValue(value) { String getTotalValue(value) {
double total = 0.0; double total = 0.0;
value.ancillaryListsDetails[0].ancillaryOrderProcList value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList
.forEach((result) => {total += result.companyShareWithTax}); .forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2); 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 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart'; 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/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.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/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_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/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.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( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker, 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, showHomeAppBarIcon: false,
baseViewModel: model, baseViewModel: model,
isHelp: true, isHelp: true,
appBarIcons: [ appBarIcons: [
IconButton( model.isLogin
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), ? IconButton(
color: Colors.white, icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
onPressed: () { color: Colors.white,
Navigator.push( onPressed: () {
context, Navigator.push(
FadePage( context,
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), FadePage(
), page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
); ),
}, );
), },
)
: Container(),
], ],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

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

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

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

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

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

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

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

@ -1,11 +1,18 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.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/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.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/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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/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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -22,12 +29,18 @@ class _DentalComplaintsState extends State<DentalComplaints> {
List<ListDentalChiefComplain> complaintsList = []; List<ListDentalChiefComplain> complaintsList = [];
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
bool isDataLoaded = false; bool isDataLoaded = false;
bool hasDentalPlan = false;
var languageID; var languageID;
int totalAppointmentTime = 0;
List<DoctorList> doctorsList = [];
DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = List();
@override @override
void initState() { void initState() {
WidgetsBinding.instance WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan());
.addPostFrameCallback((_) => getChiefComplaintsList());
super.initState(); super.initState();
} }
@ -38,37 +51,206 @@ class _DentalComplaintsState extends State<DentalComplaints> {
appBarTitle: "Symptoms", appBarTitle: "Symptoms",
body: Container( body: Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: ListView.builder( child: !hasDentalPlan
itemCount: complaintsList.length, ? ListView.builder(
itemBuilder: (BuildContext context, int index) { itemCount: complaintsList.length,
return Container( itemBuilder: (BuildContext context, int index) {
margin: EdgeInsets.only(bottom: 10.0), return Container(
child: DentalComplaintCard( margin: EdgeInsets.only(bottom: 10.0),
listDentalChiefComplain: complaintsList[index], child: DentalComplaintCard(
languageID: languageID, 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 { getLanguageID() async {
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); 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() { getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
getLanguageID(); getLanguageID();
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service.getChiefComplaintsList(widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context).then((res) {
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() { setState(() {
res['List_DentalChiefComplain'].forEach((v) { res['List_DentalChiefComplain'].forEach((v) {
complaintsList.add(new ListDentalChiefComplain.fromJson(v)); complaintsList.add(new ListDentalChiefComplain.fromJson(v));

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

@ -21,9 +21,11 @@ class DocAvailableAppointments extends StatefulWidget {
static String selectedDate; static String selectedDate;
static String selectedTime; static String selectedTime;
bool isLiveCareAppointment; bool isLiveCareAppointment;
final dynamic doctorSchedule;
DocAvailableAppointments( DocAvailableAppointments(
{@required this.doctor, @required this.isLiveCareAppointment}); {@required this.doctor,
this.doctorSchedule,
@required this.isLiveCareAppointment});
@override @override
_DocAvailableAppointmentsState createState() => _DocAvailableAppointmentsState createState() =>
@ -67,6 +69,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance.addPostFrameCallback((_) async {
getCurrentLanguage(); getCurrentLanguage();
if (widget.isLiveCareAppointment) if (widget.isLiveCareAppointment)
getDoctorScheduledFreeSlots(context, widget.doctor); getDoctorScheduledFreeSlots(context, widget.doctor);
else { else {
@ -107,9 +110,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
} }
void _onCalendarCreated( void _onCalendarCreated(
DateTime first, DateTime last, CalendarFormat format) { DateTime first, DateTime last, CalendarFormat format) {}
print('CALLBACK: _onCalendarCreated');
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -350,9 +351,24 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
freeSlotsResponse = res['FreeTimeSlots']; freeSlotsResponse = res['FreeTimeSlots'];
print("res['FreeTimeSlots']"); print("res['FreeTimeSlots']");
print(res['FreeTimeSlots'].length); 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 { } else {
DocAvailableAppointments.areAppointmentsAvailable = false; 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/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.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/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.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/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/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;
@ -36,6 +42,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false; bool isLoaded = false;
bool isProjectLoaded = false; bool isProjectLoaded = false;
ListClinicCentralized selectedClinic;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -65,13 +76,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
}, },
), ),
Text(TranslationBase.of(context).nearestAppo, Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
style: TextStyle(fontSize: 16.0, letterSpacing: 0.9)),
], ],
), ),
widget.clnicIds != null && widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true
widget.clnicIds.length > 1 &&
isLoaded == true
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: clinicsList.map<Widget>((result) { children: clinicsList.map<Widget>((result) {
@ -84,14 +92,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (!isDentalSelectedAndSupported()) { if (!isDentalSelectedAndSupported()) {
projectDropdownValue = ""; projectDropdownValue = "";
getDoctorsList(context); getDoctorsList(context);
} } else {}
}); });
}, },
title: Text(result.clinicDescription, title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0))));
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
letterSpacing: 1.0))));
}).toList()) }).toList())
: Container( : Container(
height: 60.0, height: 60.0,
@ -112,23 +116,28 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue, value: dropdownValue,
items: clinicsList.map((item) { items: clinicsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
value: item.clinicID.toString(), value: item.clinicID.toString() + "-" + item.isLiveCareClinicAndOnline.toString() + "-" + item.liveCareClinicID.toString() + "-" + item.liveCareServiceID.toString(),
child: new Text(item.clinicDescription), 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(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
print(newValue);
dropdownValue = newValue; dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) { if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = ""; projectDropdownValue = "";
getDoctorsList(context); getDoctorsList(context);
} else {
print("Dental");
} }
}); });
}, },
), ),
)), )),
isDentalSelectedAndSupported() == true || isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded)
(nearestAppo && isProjectLoaded)
? Container( ? Container(
height: 60.0, height: 60.0,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -167,9 +176,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
} }
bool isDentalSelectedAndSupported() { bool isDentalSelectedAndSupported() {
return dropdownValue != "" && if (dropdownValue != null)
(dropdownValue == "17") && return dropdownValue != "" && (dropdownValue.split("-")[0] == "17") && isMobileAppDentalAllow;
isMobileAppDentalAllow; else
return false;
} }
getClinicsList() { getClinicsList() {
@ -215,85 +225,87 @@ class _SearchByClinicState extends State<SearchByClinic> {
// TODO Mosa_REMARk to come back later // TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo(); SearchInfo searchInfo = new SearchInfo();
if (dropdownValue == "17") { if (dropdownValue.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ProjectID = int.parse(projectDropdownValue);
searchInfo.ClinicID = int.parse(dropdownValue); searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]);
searchInfo.date = DateTime.now(); searchInfo.date = DateTime.now();
GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo); 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 { } else {
List<DoctorList> doctorsList = []; callDoctorsSearchAPI();
List<String> arr = []; }
List<String> arrDistance = []; }
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
DoctorsListService service = new DoctorsListService(); callDoctorsSearchAPI() {
service GifLoaderDialogUtils.showMyDialog(context);
.getDoctorsList( List<DoctorList> doctorsList = [];
int.parse(dropdownValue), List<String> arr = [];
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, List<String> arrDistance = [];
nearestAppo, List<String> result;
context) int numAll;
.then((res) { List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
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();
if (doctorByHospital.length != 0) { DoctorsListService service = new DoctorsListService();
_patientDoctorAppointmentListHospital[ service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
_patientDoctorAppointmentListHospital GifLoaderDialogUtils.hideDialog(context);
.indexOf(doctorByHospital[0])] if (res['MessageStatus'] == 1) {
.patientDoctorAppointmentList setState(() {
.add(element); if (res['DoctorList'].length != 0) {
} else { doctorsList.clear();
_patientDoctorAppointmentListHospital.add( res['DoctorList'].forEach((v) {
PatientDoctorAppointmentList( doctorsList.add(new DoctorList.fromJson(v));
filterName: element.projectName, });
distanceInKMs: doctorsList.forEach((element) {
element.projectDistanceInKiloMeters.toString(), List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
patientDoctorAppointment: element)); .where(
} (elementClinic) => elementClinic.filterName == element.projectName,
}); )
} else {} .toList();
});
result = LinkedHashSet<String>.from(arr).toList(); if (doctorByHospital.length != 0) {
numAll = result.length; _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
navigateToSearchResults( } else {
context, doctorsList, _patientDoctorAppointmentListHospital); _patientDoctorAppointmentListHospital
} else { .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); }
} });
}).catchError((err) { } else {}
GifLoaderDialogUtils.hideDialog(context); });
print(err);
AppToast.showErrorToast(message: err); 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( Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
BuildContext context, SearchInfo searchInfo) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -302,20 +314,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
); );
} }
Future navigateToSearchResults( Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
isProjectLoaded = false; isProjectLoaded = false;
Navigator.push( Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
.then((value) { .then((value) {
getProjectsList(); getProjectsList();
}); });
@ -324,9 +325,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() { filterClinic() {
setState(() { setState(() {
if (widget.clnicIds != null && widget.clnicIds.length > 0) { if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList();
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList();
isLoaded = true; 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/models/Appointments/doctor_pre_post_image.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DoctorPostPreImagesPage extends StatefulWidget{ class DoctorPostPreImagesContent 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{
final DoctorPrePostImages doctorPrePostImages; final DoctorPrePostImages doctorPrePostImages;
const DoctorPostPreImagesContent({this.doctorPrePostImages}); const DoctorPostPreImagesContent({this.doctorPrePostImages});
@ -70,14 +13,13 @@ class DoctorPostPreImagesContent extends StatefulWidget{
DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState(); DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState();
} }
class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var images = widget.doctorPrePostImages; var images = widget.doctorPrePostImages;
return Material( return Center(
color: Colors.transparent, child: Material(
child: Center( color: Colors.transparent,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@ -85,31 +27,45 @@ class DoctorPostPreImagesContentState extends State<DoctorPostPreImagesContent>{
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Text("Before", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), Text(
SizedBox(height: 10,), "Before",
Image.memory(images.getPreBytes(), errorBuilder: (ctx,err, trace){ style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
return Container( ),
color: Colors.grey.withOpacity(0.25), 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)), Divider(color: Colors.grey.withOpacity(0.5)),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Text("After", style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),), Text(
SizedBox(height: 10,), "After",
Image.memory(images.getPostBytes(),errorBuilder: (ctx,err, trace){ style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1),
return Container( ),
color: Colors.grey.withOpacity(0.25), 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/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/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
} }
class _ChildVaccinesPageState extends State<ChildVaccinesPage> class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
var checkedValue = false; var checkedValue = false;
String addEmail = ""; String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(), onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, 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, appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
fillColor: Colors.red, fillColor: Colors.red,
hintText: model.user.emailAddress, hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,
hintColor: Colors.black, hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onChanged: (text) { onChanged: (text) {
addEmail = text; addEmail = text;
model.user.emailAddress == addEmail model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
? checkedValue = false
: checkedValue = true;
}, },
validator: (value) { validator: (value) {
if (value == null) { if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
// //
onTap: () { onTap: () {
model.user.emailAddress = addEmail.toString(); model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString(); // bloodDetails.city=_selectedHospital.toString();
// bloodDetails. // 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:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; 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 'covid-dirvethru-questions.dart';
class CovidDrivethruLocation extends StatefulWidget { class CovidDrivethruLocation extends StatefulWidget {
@override @override
@ -32,18 +33,14 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = ""; String projectID = "";
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
WidgetsBinding.instance
.addPostFrameCallback((_) => getProjectsList(context));
imagesInfo.add( imagesInfo.add(
ImagesInfo( ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
); );
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
@ -57,9 +54,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
@ -73,31 +68,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo, child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
style: TextStyle(fontSize: 16.0, color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.grey[700])),
), ),
Container( Container(
height: 60.0, height: 60.0,
@ -113,18 +94,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress), hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue, value: selectedProject,
items: projectsList.map((item) { items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item.iD.toString(), value: item,
child: new Text(item.projectName), child: new Text(item.projectName),
); );
}).toList(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
projectDropdownValue = newValue; selectedProject = newValue;
setProjectLocation(newValue); setProjectLocation(newValue);
}); });
}, },
@ -133,15 +114,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected isLocationSelected
? Container( ? Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.black)),
) )
: Container(), : Container(),
isLocationSelected isLocationSelected
@ -150,16 +124,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0), border: Border.all(color: Colors.grey[400], width: 1.0),
), ),
child: Image.network( child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
"https://maps.googleapis.com/maps/api/staticmap?center=" + this.projectLat +
this.projectLat + "," +
"," + this.projectLong +
this.projectLong + "&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" + this.projectLat +
this.projectLat + "," +
"," + this.projectLong +
this.projectLong + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
) )
: SizedBox( : SizedBox(
height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
@ -185,8 +158,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
getDirections(); getDirections();
}, },
child: Text(TranslationBase.of(context).getDirections, child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -203,8 +175,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: minWidth: MediaQuery.of(context).size.width * 0.7,
MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
@ -214,8 +185,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
back(); back();
}, },
child: Text(TranslationBase.of(context).back, child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -228,8 +198,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: minWidth: MediaQuery.of(context).size.width * 0.7,
MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
@ -239,8 +208,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
next(); next();
}, },
child: Text(TranslationBase.of(context).next, child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -260,20 +228,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getDirections() { getDirections() {
if (isLocationSelected) { if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat), MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
double.parse(projectLong), this.projectName);
} else { } else {
Utils.showErrorToast( Utils.showErrorToast("Please select address from the dropdown menu to get directions");
"Please select address from the dropdown menu to get directions");
} }
} }
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");
} }
} }
@ -281,34 +246,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
Navigator.of(context).popAndPushNamed(HOME); Navigator.of(context).popAndPushNamed(HOME);
} }
setProjectLocation(newValue) { setProjectLocation(DriveThroughTestingCenterModel newValue) {
print(newValue);
setState(() { setState(() {
this.projectLat = this.projectLat = newValue.latitude.toString();
projectsList[(int.parse(newValue) - 1)].latitude.toString(); this.projectLong = newValue.longitude.toString();
this.projectLong = this.projectName = newValue.projectName;
projectsList[(int.parse(newValue) - 1)].longitude.toString(); this.projectID = newValue.projectID.toString();
this.projectName = projectsList[(int.parse(newValue) - 1)].projectName;
this.projectID =
projectsList[(int.parse(newValue) - 1)].projectID.toString();
isLocationSelected = true; isLocationSelected = true;
}); });
} }
getPaymentInfo(BuildContext context, String projectID) { getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) {
.getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
covidPaymentInfoResponse = covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
}); });
Navigator.push( Navigator.push(
context, context,
@ -328,8 +284,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse = CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) { service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -353,6 +308,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) { service.getCovidProjectsList(context).then((res) {
projectsList.clear();
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) {

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

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

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.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/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -29,6 +30,10 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
PageController pageController; PageController pageController;
PatientER _patientER = PatientER(); PatientER _patientER = PatientER();
PatientER_RC _patientER_RC = PatientER_RC();
TransportationDetails transportationDetails = new TransportationDetails();
_changeCurrentTab(int tab) { _changeCurrentTab(int tab) {
setState(() { setState(() {
currentIndex = tab; currentIndex = tab;
@ -41,12 +46,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
void initState() { void initState() {
super.initState(); super.initState();
pageController = new PageController(); pageController = new PageController();
_patientER_RC.transportationDetails = transportationDetails;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
body: widget.amRequestViewModel.pickUpRequestPresOrder != null body: widget.amRequestViewModel.pendingAmbulanceRequestOrder != null
? SingleChildScrollView( ? SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
@ -64,36 +70,32 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
children: [ children: [
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).reqId, title: TranslationBase.of(context).reqId,
value: widget.amRequestViewModel.pickUpRequestPresOrder value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.presOrderID .id
.toString(), .toString(),
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).status, title: TranslationBase.of(context).status,
value: widget.amRequestViewModel.pickUpRequestPresOrder.status ==0?TranslationBase.of(context).pending:'', value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.statusText,
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).pickupDate, title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted( value: getDate(widget.amRequestViewModel.pendingAmbulanceRequestOrder.created),
DateUtil.convertStringToDate(widget
.amRequestViewModel
.pickUpRequestPresOrder
.lastEditDate)),
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).pickupLocation, title: TranslationBase.of(context).pickupLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.pickupLocationName, .pickupLocation,
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).dropoffLocation, title: TranslationBase.of(context).dropoffLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.dropoffLocationName, .dropOffLocation,
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).transportMethod, title: TranslationBase.of(context).transportMethod,
value: widget value: widget
.amRequestViewModel.pickUpRequestPresOrder.title, .amRequestViewModel.pendingAmbulanceRequestOrder.serviceText,
), ),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -112,7 +114,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
onTap: () { onTap: () {
widget.amRequestViewModel.updatePressOrder( widget.amRequestViewModel.updatePressOrder(
presOrderID: widget.amRequestViewModel presOrderID: widget.amRequestViewModel
.pickUpRequestPresOrder.presOrderID); .pendingAmbulanceRequestOrder.id);
}, },
), ),
) )
@ -143,21 +145,25 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
SelectTransportationMethod( SelectTransportationMethod(
changeCurrentTab: _changeCurrentTab, changeCurrentTab: _changeCurrentTab,
patientER: _patientER, patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel, amRequestViewModel: widget.amRequestViewModel,
), ),
PickupLocation( PickupLocation(
changeCurrentTab: _changeCurrentTab, changeCurrentTab: _changeCurrentTab,
patientER: _patientER, patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel, amRequestViewModel: widget.amRequestViewModel,
), ),
BillAmount( BillAmount(
changeCurrentTab: _changeCurrentTab, changeCurrentTab: _changeCurrentTab,
patientER: _patientER, patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel, amRequestViewModel: widget.amRequestViewModel,
), ),
Summary( Summary(
changeCurrentTab: _changeCurrentTab, changeCurrentTab: _changeCurrentTab,
patientER: _patientER, patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel, 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/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.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/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BillAmount extends StatefulWidget { class BillAmount extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER; final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel; final AmRequestViewModel amRequestViewModel;
BillAmount( BillAmount({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
@override @override
_BillAmountState createState() => _BillAmountState(); _BillAmountState createState() => _BillAmountState();
@ -27,23 +24,19 @@ class BillAmount extends StatefulWidget {
class _BillAmountState extends State<BillAmount> { class _BillAmountState extends State<BillAmount> {
Ambulate _ambulate = Ambulate.None; Ambulate _ambulate = Ambulate.None;
String note =""; String note = "";
@override @override
void initState() { void initState() {
// if (widget.patientER_RC.transportationDetails.ambulate != null) {
if(widget.patientER.ambulate!=null) // setState(() {
{ // _ambulate = widget.patientER.ambulate;
setState(() { // note = widget.patientER.requesterNote;
_ambulate = widget.patientER.ambulate; // });
note = widget.patientER.requesterNote; // }
});
}
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -61,9 +54,7 @@ class _BillAmountState extends State<BillAmount> {
height: 10, height: 10,
), ),
Table( Table(
border: TableBorder.symmetric( border: TableBorder.symmetric(inside: BorderSide(width: 1.0, color: Colors.grey[300]), outside: BorderSide(width: 1.0, color: Colors.grey[300])),
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
children: [ children: [
TableRow( TableRow(
children: [ children: [
@ -96,7 +87,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}', TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.price}',
color: Colors.black, color: Colors.black,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 15, fontSize: 15,
@ -126,7 +117,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}', TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceVAT}',
color: Colors.black, color: Colors.black,
fontSize: 15, fontSize: 15,
textAlign: TextAlign.start, textAlign: TextAlign.start,
@ -167,7 +158,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}', TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}',
color: Colors.black, color: Colors.black,
fontSize: 15, fontSize: 15,
textAlign: TextAlign.start, textAlign: TextAlign.start,
@ -181,8 +172,13 @@ class _BillAmountState extends State<BillAmount> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Texts(TranslationBase.of(context).selectAmbulate,bold: true,), Texts(
SizedBox(height: 5,), TranslationBase.of(context).selectAmbulate,
bold: true,
),
SizedBox(
height: 5,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -196,8 +192,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
@ -226,8 +221,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
@ -235,7 +229,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio( leading: Radio(
value: Ambulate.Walker, value: Ambulate.Walker,
groupValue: _ambulate, groupValue: _ambulate,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
_ambulate = value; _ambulate = value;
@ -248,7 +241,9 @@ class _BillAmountState extends State<BillAmount> {
), ),
], ],
), ),
SizedBox(height: 5,), SizedBox(
height: 5,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -262,8 +257,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
@ -271,7 +265,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio( leading: Radio(
value: Ambulate.Stretcher, value: Ambulate.Stretcher,
groupValue: _ambulate, groupValue: _ambulate,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
_ambulate = value; _ambulate = value;
@ -293,8 +286,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
@ -302,7 +294,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio( leading: Radio(
value: Ambulate.None, value: Ambulate.None,
groupValue: _ambulate, groupValue: _ambulate,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
_ambulate = value; _ambulate = value;
@ -315,17 +306,18 @@ class _BillAmountState extends State<BillAmount> {
), ),
], ],
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).notes, hintText: TranslationBase.of(context).notes,
initialValue: note, initialValue: note,
onChanged: (value){ onChanged: (value) {
setState(() { setState(() {
note = value; note = value;
}); });
}, },
), ),
SizedBox( SizedBox(
height: 100, height: 100,
), ),
@ -342,9 +334,9 @@ class _BillAmountState extends State<BillAmount> {
textColor: Colors.white, textColor: Colors.white,
onTap: () { onTap: () {
setState(() { setState(() {
widget.patientER.ambulate = _ambulate; widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER.requesterNote = note; widget.patientER_RC.transportationDetails.notes = note;
widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); // widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.changeCurrentTab(3); widget.changeCurrentTab(3);
}); });
}, },

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

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.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/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/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -17,23 +18,17 @@ enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget { class SelectTransportationMethod extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER; final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel; final AmRequestViewModel amRequestViewModel;
SelectTransportationMethod( SelectTransportationMethod({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
@override @override
_SelectTransportationMethodState createState() => _SelectTransportationMethodState createState() => _SelectTransportationMethodState();
_SelectTransportationMethodState();
} }
class _SelectTransportationMethodState class _SelectTransportationMethodState extends State<SelectTransportationMethod> {
extends State<SelectTransportationMethod> { PatientERTransportationMethod _erTransportationMethod = PatientERTransportationMethod();
PatientERTransportationMethod _erTransportationMethod =
PatientERTransportationMethod();
Direction _direction = Direction.FromHospital; Direction _direction = Direction.FromHospital;
Way _way = Way.OneWay; Way _way = Way.OneWay;
@ -42,18 +37,23 @@ class _SelectTransportationMethodState
@override @override
void initState() { void initState() {
super.initState(); super.initState();
if (widget.patientER.direction != null) { // if (widget.patientER.direction != null) {
_direction = widget.patientER.direction == 0 // _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital;
? Direction.ToHospital // _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
: Direction.FromHospital; // _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; // } else {
_erTransportationMethod = widget.amRequestViewModel // if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
.amRequestModeList[(widget.patientER.selectedAmbulate - 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 { } else {
if (widget.amRequestViewModel.amRequestModeList.length != 0) if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[
widget.amRequestViewModel.amRequestModeList.length - 1];
} }
} }
@override @override
@ -78,8 +78,7 @@ class _SelectTransportationMethodState
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
_erTransportationMethod = _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[index];
widget.amRequestViewModel.amRequestModeList[index];
}); });
}, },
child: Container( child: Container(
@ -95,14 +94,9 @@ class _SelectTransportationMethodState
Expanded( Expanded(
flex: 3, flex: 3,
child: ListTile( child: ListTile(
title: Texts(projectViewModel.isArabic title: Texts(projectViewModel.isArabic ? widget.amRequestViewModel.amRequestModeList[index].textN : widget.amRequestViewModel.amRequestModeList[index].text),
? widget.amRequestViewModel
.amRequestModeList[index].titleAR
: widget.amRequestViewModel
.amRequestModeList[index].title),
leading: Radio( leading: Radio(
value: widget value: widget.amRequestViewModel.amRequestModeList[index],
.amRequestViewModel.amRequestModeList[index],
groupValue: _erTransportationMethod, groupValue: _erTransportationMethod,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
@ -114,8 +108,7 @@ class _SelectTransportationMethodState
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: Texts(TranslationBase.of(context).sar + child: Texts(TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
) )
], ],
), ),
@ -181,8 +174,7 @@ class _SelectTransportationMethodState
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: title: Texts(TranslationBase.of(context).fromHospital),
Texts(TranslationBase.of(context).fromHospital),
leading: Radio( leading: Radio(
value: Direction.FromHospital, value: Direction.FromHospital,
groupValue: _direction, groupValue: _direction,
@ -211,7 +203,7 @@ class _SelectTransportationMethodState
height: 5, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(bottom:65 ), margin: EdgeInsets.only(bottom: 65),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -225,13 +217,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: title: Texts(TranslationBase.of(context).oneDirec),
Texts(TranslationBase.of(context).oneDirec),
leading: Radio( leading: Radio(
value: Way.OneWay, value: Way.OneWay,
groupValue: _way, groupValue: _way,
@ -256,13 +246,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
border: border: Border.all(color: Colors.grey, width: 0.5),
Border.all(color: Colors.grey, width: 0.5),
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: title: Texts(TranslationBase.of(context).twoDirec),
Texts(TranslationBase.of(context).twoDirec),
leading: Radio( leading: Radio(
value: Way.TwoWays, value: Way.TwoWays,
groupValue: _way, groupValue: _way,
@ -300,28 +288,33 @@ class _SelectTransportationMethodState
textColor: Colors.white, textColor: Colors.white,
onTap: () { onTap: () {
setState(() { setState(() {
widget.patientER.transportationMethodId = (widget // widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
.amRequestViewModel.amRequestModeList // widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
.indexOf(_erTransportationMethod) + // widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
1); // widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER.direction = // widget.patientER.patientERTransportationMethod = _erTransportationMethod;
_direction == Direction.ToHospital ? 1 : 0; // widget.patientER.orderServiceID = _orderService.getIdOrderService();
widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1; // widget.patientER.pickupUrgency = 1;
widget.patientER.selectedAmbulate = (widget // widget.patientER.lineItemNo = 1;
.amRequestViewModel.amRequestModeList // widget.patientER.cost = _erTransportationMethod.price.toDouble();
.indexOf(_erTransportationMethod) + // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
1); // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.patientER.patientERTransportationMethod = // widget.changeCurrentTab(1);
_erTransportationMethod;
widget.patientER.orderServiceID = // widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
_orderService.getIdOrderService(); widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0;
widget.patientER.pickupUrgency = 1; widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER.lineItemNo = 1; widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER.cost = _erTransportationMethod.price; widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.id.toString();
widget.patientER.vAT = _erTransportationMethod.vAT ?? 0; widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER.totalPrice = widget.patientER_RC.transportationDetails.pickupUrgency = 1;
_erTransportationMethod.totalPrice; // 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); widget.changeCurrentTab(1);
}); });
}, },
label: TranslationBase.of(context).next, 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.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
class Summary extends StatefulWidget { class Summary extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
final PatientER patientER; final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel; 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 @override
_SummaryState createState() => _SummaryState(); _SummaryState createState() => _SummaryState();
@ -32,7 +34,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).rrtSummary), Texts(TranslationBase.of(context).rrtSummary),
SizedBox(height: 5,), SizedBox(
height: 5,
),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -43,54 +47,95 @@ class _SummaryState extends State<Summary> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,), Texts(
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,), TranslationBase.of(context).transportMethod,
SizedBox(height: 8,), color: Colors.grey,
),
Texts(TranslationBase.of(context).directions,color: Colors.grey,), Texts(
Texts(widget.patientER.direction ==0? TranslationBase.of(context).toHospital:TranslationBase.of(context).fromHospital,bold: true,), '${widget.patientER_RC.patientERTransportationMethod.text}',
SizedBox(height: 8,), bold: true,
),
Texts(TranslationBase.of(context).pickupLocation,color: Colors.grey,), SizedBox(
Texts('${widget.patientER.pickupLocationName}',bold: true,), height: 8,
SizedBox(height: 8,), ),
Texts(
Texts(TranslationBase.of(context).dropoffLocation,color: Colors.grey,), TranslationBase.of(context).directions,
Texts('${widget.patientER.dropoffLocationName}',bold: true,), color: Colors.grey,
SizedBox(height: 8,), ),
Texts(
Texts(TranslationBase.of(context).selectAmbulate,color: Colors.grey,), widget.patientER_RC.transportationDetails.direction == 0 ? TranslationBase.of(context).toHospital : TranslationBase.of(context).fromHospital,
Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,), bold: true,
SizedBox(height: 8,), ),
SizedBox(
Texts(TranslationBase.of(context).notes,color: Colors.grey,), height: 8,
Texts('${widget.patientER.requesterNote?? '---'}',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,), SizedBox(
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,), height: 20,
SizedBox(height: 5,), ),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container( Container(
height: 55, height: 55,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')],
Texts(TranslationBase.of(context).patientShareTotal+':'),
Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}')
],
), ),
), ),
SizedBox(height: 130), SizedBox(height: 130),
], ],
), ),
), ),
@ -99,15 +144,13 @@ class _SummaryState extends State<Summary> {
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
width: double.maxFinite, width: double.maxFinite,
height: 90, height: 90,
child:SecondaryButton( child: SecondaryButton(
color: Colors.grey[800], color: Colors.grey[800],
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).send, label: TranslationBase.of(context).send,
onTap: () async { 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/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -44,36 +45,39 @@ class _DdServicesPageState extends State<DdServicesPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold( return AppScaffold(
appBar: AppBar( appBarTitle: 'ED Online',
elevation: 0, isShowDecPage: true,
textTheme: TextTheme( isShowAppBar: true,
headline6: TextStyle( // appBarTitle: AppBar(
color: Theme.of(context).textTheme.headline1.color, // elevation: 0,
fontWeight: FontWeight.bold), // textTheme: TextTheme(
), // headline6: TextStyle(
title: Text( // color: Theme.of(context).textTheme.headline1.color,
'ED Online', // fontWeight: FontWeight.bold),
style: TextStyle( // ),
fontWeight: FontWeight.bold, // title: Text(
color: Theme.of(context).textTheme.headline1.color, // 'ED Online',
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), // style: TextStyle(
// bold: true, // fontWeight: FontWeight.bold,
// color: Colors.white, // color: Theme.of(context).textTheme.headline1.color,
), // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
leading: Builder( // // bold: true,
builder: (BuildContext context) { // // color: Colors.white,
return IconButton( // ),
icon: Icon(Icons.arrow_back), // leading: Builder(
color: Theme.of(context).textTheme.headline1.color, // builder: (BuildContext context) {
onPressed: () { // return IconButton(
showConfirmMessage(context); // icon: Icon(Icons.arrow_back),
}, // color: Theme.of(context).textTheme.headline1.color,
); // onPressed: () {
}, // showConfirmMessage(context);
), // },
centerTitle: true, // );
), // },
// ),
// centerTitle: true,
// ),
body: PageView( body: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart'; import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'widgets/card_position.dart'; import 'widgets/card_position.dart';
class NearestEr extends StatelessWidget { class NearestEr extends StatefulWidget {
static const String _url = "assets/images/"; static const String _url = "assets/images/";
int appointmentNo; int appointmentNo;
@ -18,91 +17,89 @@ class NearestEr extends StatelessWidget {
NearestEr({this.appointmentNo, this.projectID}); 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2; final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>( return AppScaffold(
onModelReady: appointmentNo != null && projectID != null isShowAppBar: true,
? (model) => model.getProjectAvgERWaitingTimeOrders( isShowDecPage: false,
id: appointmentNo, projectID: projectID) appBarTitle: TranslationBase.of(context).NearestEr,
: (model) => model.getProjectAvgERWaitingTimeOrders(), body: projectAvgERWaitingTimeModelList.length > 0
builder: (_, mode, widget) => AppScaffold( ? Container(
isShowAppBar: true, child: ListView(
isShowDecPage: false, children: <Widget>[
appBarTitle: TranslationBase.of(context).NearestEr, Text("${TranslationBase.of(context).NearestErDesc}",
baseViewModel: mode, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))),
body: mode.ProjectAvgERWaitingTimeModeList.length > 0 Container(
? Container( margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: ListView( child: GridView.count(
children: <Widget>[ crossAxisCount: 2,
Text( childAspectRatio: (itemWidth / itemWidth),
"${TranslationBase.of(context).NearestErDesc}", crossAxisSpacing: 10,
textAlign: TextAlign.center, mainAxisSpacing: 10,
style: TextStyle( controller: new ScrollController(keepScrollOffset: false),
fontSize: 18.0, shrinkWrap: true,
letterSpacing: 1.0, padding: const EdgeInsets.all(4.0),
fontWeight: FontWeight.w900, children: List.generate(7, (index) {
color: new Color(0xFF60686b))), return Container(
Container( child: CardPosition(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0), waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(),
child: GridView.count( text: projectAvgERWaitingTimeModelList[index].projectName.toString(),
crossAxisCount: 2, image: 'assets/images/new-design/find_us_icon.png',
childAspectRatio: (itemWidth / itemWidth), subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
crossAxisSpacing: 10, type: projectAvgERWaitingTimeModelList[index].iD.toString(),
mainAxisSpacing: 10, telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(),
controller: networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(),
new ScrollController(keepScrollOffset: false), latitude: projectAvgERWaitingTimeModelList[index].latitude,
shrinkWrap: true, longitude: projectAvgERWaitingTimeModelList[index].longitude,
padding: const EdgeInsets.all(4.0), projectname: projectAvgERWaitingTimeModelList[index].projectName,
children: List.generate(7, (index) { cardSize: itemWidth,
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,
),
);
}),
),
), ),
], ),
), ],
)
: 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/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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:diplomaticquarterapp/widgets/others/OrderLogItem.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -19,7 +16,7 @@ class OrderLogPage extends StatelessWidget {
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: ListView.builder( child: ListView.builder(
itemCount: amRequestViewModel.patientAllPresOrdersList.length, itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length,
itemBuilder: (context, index) => Container( itemBuilder: (context, index) => Container(
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -31,49 +28,41 @@ class OrderLogPage extends StatelessWidget {
children: [ children: [
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).reqId, title: TranslationBase.of(context).reqId,
value: amRequestViewModel.patientAllPresOrdersList[index].iD value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].id.toString(),
.toString(),
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).orderStatus, title: TranslationBase.of(context).orderStatus,
value: amRequestViewModel value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusText,
.patientAllPresOrdersList[index].description,
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).pickupDate, title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted( value: getDate(amRequestViewModel.patientAmbulanceRequestOrdersList[index].created),
DateUtil.convertStringToDate(amRequestViewModel
.patientAllPresOrdersList[index].createdOn)),
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).pickupLocation, title: TranslationBase.of(context).pickupLocation,
value: amRequestViewModel value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].pickupLocation,
.patientAllPresOrdersList[index].pickupLocationName,
), ),
OrderLogItem( OrderLogItem(
title: TranslationBase.of(context).dropoffLocation, title: TranslationBase.of(context).dropoffLocation,
value: amRequestViewModel value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].dropOffLocation,
.patientAllPresOrdersList[index].dropoffLocationName,
), ),
if(amRequestViewModel.patientAllPresOrdersList[index].status==1) if (amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusId == 1)
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
width: double.maxFinite, width: double.maxFinite,
margin: EdgeInsets.only(bottom: 4,left: 4,right: 4), margin: EdgeInsets.only(bottom: 4, left: 4, right: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomRight: Radius.circular(12), bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(12), bottomLeft: Radius.circular(12),
), ),
color: Colors.white color: Colors.white),
),
child: SecondaryButton( child: SecondaryButton(
color: Colors.red[900], color: Colors.red[900],
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).cancel, label: TranslationBase.of(context).cancel,
onTap: () { 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/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-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RRTMainScreen extends StatefulWidget{ class RRTMainScreen extends StatefulWidget {
@override @override
State<StatefulWidget> createState() => RRTMainScreenState(); State<StatefulWidget> createState() => RRTMainScreenState();
} }
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0; int currentIndex = 0;
TabController tabController; TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true); PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel; RRTViewModel viewModel;
bool loadingData; bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.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); tabController = TabController(length: 2, vsync: this);
} }
TranslationBase localize; TranslationBase localize;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: localize.rapidResponseTeam, appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true, isShowAppBar: true,
body: BaseView<RRTViewModel>( description: TranslationBase.of(context).rrtDDetails,
onModelReady: (vm) async { imagesInfo: imagesInfo,
viewModel = vm; body: BaseView<RRTViewModel>(
loadingData = true; onModelReady: (vm) async {
await vm.loadRequiredData().then((value){ viewModel = vm;
}).whenComplete(() => setState(() => loadingData = false)); loadingData = true;
}, await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
builder: (ctx, vm, widget) => content(), },
) builder: (ctx, vm, widget) => content(),
); ));
} }
Widget content(){ Widget content() {
if(loadingData == true){ if (loadingData == true) {
return Center(child: CircularProgressIndicator()); return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error) // 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( return Column(
children: [ children: [tabBar(), Expanded(child: contentPager())],
tabBar(),
Expanded(
child: contentPager()
)
],
); );
}else{ } else {
return Container( return Container(
alignment: Alignment.center, 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( Widget tabBar() => Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar( child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab( 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( 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( Widget contentPager() => PageView(
onPageChanged: onPageChanged, onPageChanged: onPageChanged,
controller: pageController, controller: pageController,
children: [ children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders), RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
], ],
); );
void onPageChanged(int index) { void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut); pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -1,6 +1,7 @@
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; //import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -20,6 +21,7 @@ class CardPosition extends StatelessWidget {
final longitude; final longitude;
final projectname; final projectname;
final cardSize; final cardSize;
final String waitingTime;
const CardPosition( const CardPosition(
{ {
@ -32,7 +34,8 @@ class CardPosition extends StatelessWidget {
@required this.latitude, @required this.latitude,
@required this.longitude, @required this.longitude,
@required this.projectname , @required this.projectname ,
@required this.cardSize , @required this.cardSize,
@required this.waitingTime ,
}); });
@override @override
@ -83,31 +86,26 @@ class CardPosition extends StatelessWidget {
} }
Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async { Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async {
var localize = TranslationBase.of(context);
showDialog( showDialog(
context: context,builder: (_) => AssetGiffyDialog( context: context,builder: (_) => AssetGiffyDialog(
title: Text(projectname, entryAnimation: EntryAnimation.BOTTOM,
style: TextStyle( image:Image.network(networkImage, fit: BoxFit.cover,),
fontSize: 22.0, fontWeight: FontWeight.w600), title: Text(projectname,
),image:Image.network(networkImage, fit: BoxFit.cover,), style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
buttonOkText:Text("LOCATION"), ),
buttonOkColor: Colors.grey, description: Text("${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", textAlign: TextAlign.center,),
buttonCancelText:Text('CAll') , buttonOkText:Text("LOCATION", style: TextStyle(color: Colors.white),),
buttonCancelColor: Colors.grey, buttonOkColor: Colors.grey,
onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);}, buttonCancelText:Text('CAll', style: TextStyle(color: Colors.white),) ,
onCancelButtonPressed :() {launch("tel://" +telephone);} 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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'widgets/AppointmentActions.dart'; import 'widgets/AppointmentActions.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class AppointmentDetails extends StatefulWidget { class AppointmentDetails extends StatefulWidget {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
static bool isLoading = false; static bool isLoading = false;
final dynamic doctorSchedule;
static bool showFooterButton = false; static bool showFooterButton = false;
AppointmentDetails({@required this.appo}); AppointmentDetails({@required this.appo, this.doctorSchedule});
@override @override
_AppointmentDetailsState createState() => _AppointmentDetailsState(); _AppointmentDetailsState createState() => _AppointmentDetailsState();
@ -33,13 +35,20 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
static TabController _tabController; static TabController _tabController;
AppSharedPreferences sharedPref = AppSharedPreferences();
List<DoctorRateDetails> doctorDetailsList = List(); List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false; 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(); super.initState();
} }
@ -82,155 +91,196 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
body: Container( body: Container(
color: new Color(0xFFf6f6f6), color: new Color(0xFFf6f6f6),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Stack(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Column(
color: Colors.white, crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, Container(
children: <Widget>[ color: Colors.white,
Container( child: Column(
margin: EdgeInsets.only(top: 20.0), crossAxisAlignment: CrossAxisAlignment.start,
alignment: Alignment.center, children: <Widget>[
child: ClipRRect( Container(
borderRadius: BorderRadius.circular(100.0), margin: EdgeInsets.only(top: 20.0),
child: Image.network(widget.appo.doctorImageURL, alignment: Alignment.center,
fit: BoxFit.fill, height: 120.0, width: 120.0), child: ClipRRect(
), borderRadius: BorderRadius.circular(100.0),
), child: Image.network(widget.appo.doctorImageURL,
Container( fit: BoxFit.fill, height: 120.0, width: 120.0),
margin: ),
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), ),
alignment: Alignment.center, Container(
child: Text( margin: EdgeInsets.only(
widget.appo.doctorTitle + top: 10.0, left: 10.0, right: 10.0),
" " + alignment: Alignment.center,
widget.appo.doctorNameObj, child: Text(
textAlign: TextAlign.center, widget.appo.doctorTitle +
style: TextStyle( " " +
fontSize: 20.0, widget.appo.doctorNameObj,
color: Colors.grey[900], textAlign: TextAlign.center,
letterSpacing: 1.0)), style: TextStyle(
), fontSize: 20.0,
Container( color: Colors.grey[900],
margin: EdgeInsets.only(top: 10.0), letterSpacing: 1.0)),
alignment: Alignment.center, ),
child: Text( Container(
getDoctorSpeciality(widget.appo.doctorSpeciality), margin: EdgeInsets.only(top: 10.0),
style: TextStyle( alignment: Alignment.center,
fontSize: 12.0, child: Text(
color: Colors.grey[900], getDoctorSpeciality(widget.appo.doctorSpeciality),
letterSpacing: 1.0)), style: TextStyle(
), fontSize: 12.0,
Container( color: Colors.grey[900],
margin: EdgeInsets.only(top: 5.0), letterSpacing: 1.0)),
alignment: Alignment.center, ),
child: RatingBar.readOnly( Container(
initialRating: widget.appo.actualDoctorRate.toDouble(), margin: EdgeInsets.only(top: 5.0),
size: 35.0, alignment: Alignment.center,
filledColor: Colors.yellow[700], child: RatingBar.readOnly(
emptyColor: Colors.grey[500], initialRating:
isHalfAllowed: true, widget.appo.actualDoctorRate.toDouble(),
halfFilledIcon: Icons.star_half, size: 35.0,
filledIcon: Icons.star, filledColor: Colors.yellow[700],
emptyIcon: Icons.star, emptyColor: Colors.grey[500],
), isHalfAllowed: true,
), halfFilledIcon: Icons.star_half,
InkWell( filledIcon: Icons.star,
onTap: () { emptyIcon: Icons.star,
getDoctorRatingsDetails(); ),
}, ),
child: Container( InkWell(
margin: EdgeInsets.only(top: 5.0), onTap: () {
alignment: Alignment.center, getDoctorRatingsDetails();
child: Text( },
"(" + child: Container(
widget.appo.noOfPatientsRate.toString() + margin: EdgeInsets.only(top: 5.0),
" " + alignment: Alignment.center,
TranslationBase.of(context).reviews + child: Text(
")", "(" +
style: TextStyle( widget.appo.noOfPatientsRate.toString() +
fontSize: 14.0, " " +
color: Colors.blue[800], TranslationBase.of(context).reviews +
letterSpacing: 1.0, ")",
decoration: TextDecoration.underline, style: TextStyle(
)), fontSize: 14.0,
), color: Colors.blue[800],
), letterSpacing: 1.0,
Container( decoration: TextDecoration.underline,
alignment: Alignment.center, )),
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted( ),
DateUtil.convertStringToDate( ),
widget.appo.appointmentDate), Container(
projectViewModel.isArabic ? "ar" : "en")), alignment: Alignment.center,
), child: Text(
Container( DateUtil.getWeekDayMonthDayYearDateFormatted(
alignment: Alignment.center, DateUtil.convertStringToDate(
child: Text(widget.appo.startTime.substring(0, 5)), widget.appo.appointmentDate),
), projectViewModel.isArabic ? "ar" : "en")),
Container( ),
margin: EdgeInsets.only(top: 10.0), Container(
child: Divider( alignment: Alignment.center,
color: Colors.grey[500], child: Text(widget.appo.startTime.substring(0, 5)),
), ),
), Container(
TabBar( margin: EdgeInsets.only(top: 10.0),
onTap: (index) { child: Divider(
setState(() { color: Colors.grey[500],
if (index == 1) { ),
if (widget.appo.clinicID == 17 || ),
widget.appo.clinicID == 23 || TabBar(
widget.appo.isExecludeDoctor) { onTap: (index) {
_tabController.index = setState(() {
_tabController.previousIndex; if (index == 1) {
AppointmentDetails.showFooterButton = false; if (widget.appo.clinicID == 17 ||
} else { widget.appo.clinicID == 23 ||
AppointmentDetails.showFooterButton = true; widget.appo.isExecludeDoctor) {
} _tabController.index =
} _tabController.previousIndex;
}); AppointmentDetails.showFooterButton = false;
}, } else {
tabs: [ AppointmentDetails.showFooterButton = true;
Tab( }
child: Text(TranslationBase.of(context).appoActions, }
style: TextStyle(color: Colors.black))), });
widget.appo.clinicID == 17 || },
widget.appo.clinicID == 23 || tabs: [
widget.appo.isExecludeDoctor Tab(
? Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text( child: Text(
TranslationBase.of(context).availableAppo, TranslationBase.of(context).appoActions,
style: TextStyle(color: Colors.black)), 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, 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; docObj.doctorImageURL = widget.appo.doctorImageURL;
return docObj; 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/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
@ -685,7 +686,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
navigateToInsertComplaint() { navigateToInsertComplaint() {
Navigator.push(context, FadePage(page: FeedbackHomePage())); Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
} }
rateAppointment() { 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, authenticatedUser,
widget.browser, widget.browser,
appo.isLiveCareAppointment, appo.isLiveCareAppointment,
null,
null,
appo.appointmentDate, appo.appointmentDate,
appo.appointmentNo, appo.appointmentNo,
appo.clinicID, appo.clinicID,

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

@ -1,5 +1,7 @@
import 'dart:ui'; 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/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -10,6 +12,10 @@ import 'package:flutter/material.dart';
import 'status_feedback_page.dart'; import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget { class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key);
@override @override
_FeedbackHomePageState createState() => _FeedbackHomePageState(); _FeedbackHomePageState createState() => _FeedbackHomePageState();
} }
@ -105,7 +111,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, 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/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.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/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
@ -27,6 +30,10 @@ import 'appointment_history.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget { class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
_SendFeedbackPageState createState() => _SendFeedbackPageState(); _SendFeedbackPageState createState() => _SendFeedbackPageState();
} }
@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController messageController = TextEditingController(); TextEditingController messageController = TextEditingController();
List<String> images = []; List<String> images = [];
String title; String title;
AppointmentHistory appointHistory; AppoitmentAllHistoryResultList appointHistory;
bool isShowListAppointHistory = true; bool isShowListAppointHistory = true;
String message; String message;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
@ -73,11 +80,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
setMessageType(MessageType messageType) { setMessageType(MessageType messageType) {
setState(() { setState(() {
this.messageType = messageType; this.messageType = messageType;
this.appointHistory = widget.appointment;
});
}
@override
void initState() {
setState(() {
this.messageType = widget.messageType;
this.appointHistory = widget.appointment;
}); });
requestPermissions();
super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true, allowAny: true,
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -138,14 +157,59 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isShowListAppointHistory = true; isShowListAppointHistory = true;
}); });
}, },
child: Container( child: Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
color: Colors.white, decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row( child: Row(
children: <Widget>[ 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( Expanded(
flex: 4, flex: 4,
child: Column( child: Column(
@ -176,9 +240,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
), ),
Texts( Texts(
DateUtil DateUtil
.getMonthDayYearDateFormatted( .getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
appointHistory
.appointmentDate),
variant: 'caption3', variant: 'caption3',
), ),
StarRating( StarRating(
@ -272,10 +334,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bold: true, bold: true,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted(model DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
.appointHistoryList[
index]
.appointmentDate),
variant: 'caption3', variant: 'caption3',
), ),
StarRating( StarRating(
@ -350,8 +409,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
controller: messageController, controller: messageController,
suffixIcon: Icons.mic, suffixIcon: Icons.mic,
onSuffixTap: () { onSuffixTap: () {
requestPermissions();
openSpeechReco(); openSpeechReco();
}, },
onChanged: (v) { onChanged: (v) {
@ -615,6 +672,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
@override @override
void initState() { void initState() {
messageTypeDialog = widget.messageTypeDialog; messageTypeDialog = widget.messageTypeDialog;
super.initState(); 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/core/viewModels/pharmacy_categorise_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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 'package:flutter/src/widgets/image.dart' as flutterImage;
import 'base/base_view.dart'; import 'base/base_view.dart';
dynamic languageID;
class FinalProductsPage extends StatefulWidget { class FinalProductsPage extends StatefulWidget {
final String id; final String id;
final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed
@ -33,6 +36,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
color: Colors.blue, color: Colors.blue,
size: 29.0, size: 29.0,
); );
getLanguageID() async {
languageID = await sharedPref.getString(APP_LANGUAGE);
}
void initState() {
getLanguageID();
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyCategoriseViewModel>( return BaseView<PharmacyCategoriseViewModel>(
@ -55,7 +67,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
builder: (BuildContext context, PharmacyCategoriseViewModel model, builder: (BuildContext context, PharmacyCategoriseViewModel model,
Widget child) => Widget child) =>
PharmacyAppScaffold( PharmacyAppScaffold(
appBarTitle: "Products", appBarTitle: TranslationBase.of(context).products,
isBottomBar: false, isBottomBar: false,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -74,7 +86,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Texts( child: Texts(
'Products', TranslationBase.of(context).products,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
@ -213,11 +225,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
), ),
), ),
Container( Container(
width: model width: model.finalProducts[index].rxMessage != null
.finalProducts[
index]
.rxMessage !=
null
? MediaQuery.of( ? MediaQuery.of(
context) context)
.size .size
@ -235,23 +243,15 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
.circular( .circular(
6)), 6)),
), ),
child: Texts( child:model.finalProducts[index].rxMessage != null
model ? Texts( languageID == 'ar' ? model.finalProducts[index].rxMessagen
.finalProducts[ : model.finalProducts[index].rxMessage,
index]
.rxMessage !=
null
? model
.finalProducts[
index]
.rxMessage
: "",
color: Colors.white, color: Colors.white,
regular: true, regular: true,
fontSize: 10, fontSize: 10,
fontWeight: fontWeight:
FontWeight.w600, FontWeight.w600,
), ): Texts(""),
), ),
], ],
), ),

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

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

@ -43,7 +43,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: currentTab != 4 appBar: currentTab != 4 && currentTab != 3
? AppBar( ? AppBar(
backgroundColor: Color(0xff5AB145), backgroundColor: Color(0xff5AB145),
elevation: 0, elevation: 0,
@ -55,7 +55,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
), ),
child: InkWell( child: InkWell(
child: Padding( child: Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(5.0),
child: Row( child: Row(
//crossAxisAlignment: CrossAxisAlignment.center, //crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -172,7 +172,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print(response); print(response);
var product = PharmacyProduct.fromJson(response["products"][0]); product = PharmacyProduct.fromJson(response["products"][0]);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push(context, FadePage(page: ProductDetailPage(product))); Navigator.push(context, FadePage(page: ProductDetailPage(product)));
}, onFailure: (String error, int statusCode) { }, 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/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -28,6 +31,8 @@ class _LiveCareHomeState extends State<LiveCareHome>
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
@ -40,7 +45,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
imageAr: imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png')); 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory(); if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
}); });
super.initState(); super.initState();

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[ children: <Widget>[
Card( Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), 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( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),

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

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

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

Loading…
Cancel
Save