Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix-issues

 Conflicts:
	lib/core/enum/master_lookup_key.dart
	lib/core/service/base/lookup-service.dart
merge-requests/289/head
hussam al-habibeh 5 years ago
commit 546b520d7b

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.doctor_app_flutter"
minSdkVersion 18
targetSdkVersion 29
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -73,10 +73,10 @@ dependencies {
implementation 'com.opentok.android:opentok-android-sdk:2.16.5'
//permissions
implementation 'pub.devrel:easypermissions:0.4.0'
implementation 'com.google.firebase:firebase-core:9.6.1'
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
apply plugin: 'com.google.gms.google-services'
}
apply plugin: 'com.google.gms.google-services'

@ -1,34 +1,41 @@
{
"project_info": {
"project_number": "1008895414777",
"project_id": "doctorapp-9f172",
"storage_bucket": "doctorapp-9f172.appspot.com"
"project_number": "1097451043303",
"project_id": "doctor-app-35ddc",
"storage_bucket": "doctor-app-35ddc.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1008895414777:android:d00fe21d6955c21b1f6d28",
"mobilesdk_app_id": "1:1097451043303:android:f82ecce9562ecaad866542",
"android_client_info": {
"package_name": "com.example.doctor_app_flutter"
}
},
"oauth_client": [
{
"client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com",
"client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCNncEIj8ehVUSxV89rx0x1NaWp8t1YVkw"
"current_key": "AIzaSyChu44P8Dp8jtRqnoDR2mdjqKgSKQq-FPY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com",
"client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.hmg.doctorApp"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre</string>
<key>API_KEY</key>
<string>AIzaSyAKPayaNaI-2RN6S4PH5W9wYExmEgoBUvo</string>
<key>GCM_SENDER_ID</key>
<string>1097451043303</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.hmg.doctorApp</string>
<key>PROJECT_ID</key>
<string>doctor-app-35ddc</string>
<key>STORAGE_BUCKET</key>
<string>doctor-app-35ddc.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:1097451043303:ios:0e9b87e77dcf397d866542</string>
</dict>
</plist>

@ -1,9 +1,235 @@
PODS:
- abseil/algorithm (0.20200225.0):
- abseil/algorithm/algorithm (= 0.20200225.0)
- abseil/algorithm/container (= 0.20200225.0)
- abseil/algorithm/algorithm (0.20200225.0):
- abseil/base/config
- abseil/algorithm/container (0.20200225.0):
- abseil/algorithm/algorithm
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/base (0.20200225.0):
- abseil/base/atomic_hook (= 0.20200225.0)
- abseil/base/base (= 0.20200225.0)
- abseil/base/base_internal (= 0.20200225.0)
- abseil/base/bits (= 0.20200225.0)
- abseil/base/config (= 0.20200225.0)
- abseil/base/core_headers (= 0.20200225.0)
- abseil/base/dynamic_annotations (= 0.20200225.0)
- abseil/base/endian (= 0.20200225.0)
- abseil/base/errno_saver (= 0.20200225.0)
- abseil/base/exponential_biased (= 0.20200225.0)
- abseil/base/log_severity (= 0.20200225.0)
- abseil/base/malloc_internal (= 0.20200225.0)
- abseil/base/periodic_sampler (= 0.20200225.0)
- abseil/base/pretty_function (= 0.20200225.0)
- abseil/base/raw_logging_internal (= 0.20200225.0)
- abseil/base/spinlock_wait (= 0.20200225.0)
- abseil/base/throw_delegate (= 0.20200225.0)
- abseil/base/atomic_hook (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/base (0.20200225.0):
- abseil/base/atomic_hook
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/base/dynamic_annotations
- abseil/base/log_severity
- abseil/base/raw_logging_internal
- abseil/base/spinlock_wait
- abseil/meta/type_traits
- abseil/base/base_internal (0.20200225.0):
- abseil/base/config
- abseil/meta/type_traits
- abseil/base/bits (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/config (0.20200225.0)
- abseil/base/core_headers (0.20200225.0):
- abseil/base/config
- abseil/base/dynamic_annotations (0.20200225.0)
- abseil/base/endian (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/errno_saver (0.20200225.0):
- abseil/base/config
- abseil/base/exponential_biased (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/log_severity (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/malloc_internal (0.20200225.0):
- abseil/base/base
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/base/dynamic_annotations
- abseil/base/raw_logging_internal
- abseil/base/periodic_sampler (0.20200225.0):
- abseil/base/core_headers
- abseil/base/exponential_biased
- abseil/base/pretty_function (0.20200225.0)
- abseil/base/raw_logging_internal (0.20200225.0):
- abseil/base/atomic_hook
- abseil/base/config
- abseil/base/core_headers
- abseil/base/log_severity
- abseil/base/spinlock_wait (0.20200225.0):
- abseil/base/base_internal
- abseil/base/core_headers
- abseil/base/errno_saver
- abseil/base/throw_delegate (0.20200225.0):
- abseil/base/config
- abseil/base/raw_logging_internal
- abseil/container/compressed_tuple (0.20200225.0):
- abseil/utility/utility
- abseil/container/inlined_vector (0.20200225.0):
- abseil/algorithm/algorithm
- abseil/base/core_headers
- abseil/base/throw_delegate
- abseil/container/inlined_vector_internal
- abseil/memory/memory
- abseil/container/inlined_vector_internal (0.20200225.0):
- abseil/base/core_headers
- abseil/container/compressed_tuple
- abseil/memory/memory
- abseil/meta/type_traits
- abseil/types/span
- abseil/memory (0.20200225.0):
- abseil/memory/memory (= 0.20200225.0)
- abseil/memory/memory (0.20200225.0):
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/meta (0.20200225.0):
- abseil/meta/type_traits (= 0.20200225.0)
- abseil/meta/type_traits (0.20200225.0):
- abseil/base/config
- abseil/numeric/int128 (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/strings/internal (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/base/endian
- abseil/base/raw_logging_internal
- abseil/meta/type_traits
- abseil/strings/str_format (0.20200225.0):
- abseil/strings/str_format_internal
- abseil/strings/str_format_internal (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/numeric/int128
- abseil/strings/strings
- abseil/types/span
- abseil/strings/strings (0.20200225.0):
- abseil/base/base
- abseil/base/bits
- abseil/base/config
- abseil/base/core_headers
- abseil/base/endian
- abseil/base/raw_logging_internal
- abseil/base/throw_delegate
- abseil/memory/memory
- abseil/meta/type_traits
- abseil/numeric/int128
- abseil/strings/internal
- abseil/time (0.20200225.0):
- abseil/time/internal (= 0.20200225.0)
- abseil/time/time (= 0.20200225.0)
- abseil/time/internal (0.20200225.0):
- abseil/time/internal/cctz (= 0.20200225.0)
- abseil/time/internal/cctz (0.20200225.0):
- abseil/time/internal/cctz/civil_time (= 0.20200225.0)
- abseil/time/internal/cctz/time_zone (= 0.20200225.0)
- abseil/time/internal/cctz/civil_time (0.20200225.0):
- abseil/base/config
- abseil/time/internal/cctz/time_zone (0.20200225.0):
- abseil/base/config
- abseil/time/internal/cctz/civil_time
- abseil/time/time (0.20200225.0):
- abseil/base/base
- abseil/base/core_headers
- abseil/base/raw_logging_internal
- abseil/numeric/int128
- abseil/strings/strings
- abseil/time/internal/cctz/civil_time
- abseil/time/internal/cctz/time_zone
- abseil/types (0.20200225.0):
- abseil/types/any (= 0.20200225.0)
- abseil/types/bad_any_cast (= 0.20200225.0)
- abseil/types/bad_any_cast_impl (= 0.20200225.0)
- abseil/types/bad_optional_access (= 0.20200225.0)
- abseil/types/bad_variant_access (= 0.20200225.0)
- abseil/types/compare (= 0.20200225.0)
- abseil/types/optional (= 0.20200225.0)
- abseil/types/span (= 0.20200225.0)
- abseil/types/variant (= 0.20200225.0)
- abseil/types/any (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/types/bad_any_cast
- abseil/utility/utility
- abseil/types/bad_any_cast (0.20200225.0):
- abseil/base/config
- abseil/types/bad_any_cast_impl
- abseil/types/bad_any_cast_impl (0.20200225.0):
- abseil/base/config
- abseil/base/raw_logging_internal
- abseil/types/bad_optional_access (0.20200225.0):
- abseil/base/config
- abseil/base/raw_logging_internal
- abseil/types/bad_variant_access (0.20200225.0):
- abseil/base/config
- abseil/base/raw_logging_internal
- abseil/types/compare (0.20200225.0):
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/types/optional (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/memory/memory
- abseil/meta/type_traits
- abseil/types/bad_optional_access
- abseil/utility/utility
- abseil/types/span (0.20200225.0):
- abseil/algorithm/algorithm
- abseil/base/core_headers
- abseil/base/throw_delegate
- abseil/meta/type_traits
- abseil/types/variant (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/types/bad_variant_access
- abseil/utility/utility
- abseil/utility/utility (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/meta/type_traits
- Alamofire (4.9.1)
- barcode_scan (0.0.1):
- Flutter
- MTBBarcodeScanner
- SwiftProtobuf
- BoringSSL-GRPC (0.0.7):
- BoringSSL-GRPC/Implementation (= 0.0.7)
- BoringSSL-GRPC/Interface (= 0.0.7)
- BoringSSL-GRPC/Implementation (0.0.7):
- BoringSSL-GRPC/Interface (= 0.0.7)
- BoringSSL-GRPC/Interface (0.0.7)
- cloud_firestore (0.14.3):
- Firebase/CoreOnly (~> 6.33.0)
- Firebase/Firestore (~> 6.33.0)
- firebase_core
- Flutter
- cloud_firestore_web (0.1.0):
- Flutter
- connectivity (0.0.1):
- Flutter
- Reachability
@ -13,12 +239,40 @@ PODS:
- Flutter
- device_info (0.0.1):
- Flutter
- Firebase/Analytics (6.33.0):
- Firebase/Core
- Firebase/Auth (6.33.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 6.9.2)
- Firebase/Core (6.33.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.8.3)
- Firebase/CoreOnly (6.33.0):
- FirebaseCore (= 6.10.3)
- Firebase/Firestore (6.33.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 1.18.0)
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- firebase_core (0.5.3):
- Firebase/Storage (6.33.0):
- Firebase/CoreOnly
- FirebaseStorage (~> 3.9.0)
- firebase_analytics (6.2.0):
- Firebase/Analytics (~> 6.33.0)
- Firebase/CoreOnly (~> 6.33.0)
- firebase_core
- Flutter
- firebase_analytics_web (0.1.0):
- Flutter
- firebase_auth (0.18.3):
- Firebase/Auth (~> 6.33.0)
- Firebase/CoreOnly (~> 6.33.0)
- firebase_core
- Flutter
- firebase_auth_web (0.1.0):
- Flutter
- firebase_core (0.5.2):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
- firebase_core_web (0.1.0):
@ -28,6 +282,25 @@ PODS:
- Firebase/Messaging (~> 6.33.0)
- firebase_core
- Flutter
- firebase_storage (5.0.1):
- Firebase/CoreOnly (~> 6.33.0)
- Firebase/Storage (~> 6.33.0)
- firebase_core
- Flutter
- FirebaseAnalytics (6.8.3):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleAppMeasurement (= 6.8.3)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- FirebaseAuth (6.9.2):
- FirebaseCore (~> 6.10)
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/Environment (~> 6.7)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseCore (6.10.3):
- FirebaseCoreDiagnostics (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
@ -37,6 +310,18 @@ PODS:
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/Logger (~> 6.7)
- nanopb (~> 1.30906.0)
- FirebaseFirestore (1.18.0):
- abseil/algorithm (= 0.20200225.0)
- abseil/base (= 0.20200225.0)
- abseil/memory (= 0.20200225.0)
- abseil/meta (= 0.20200225.0)
- abseil/strings/strings (= 0.20200225.0)
- abseil/time (= 0.20200225.0)
- abseil/types (= 0.20200225.0)
- FirebaseCore (~> 6.10)
- "gRPC-C++ (~> 1.28.0)"
- leveldb-library (~> 1.22)
- nanopb (~> 1.30906.0)
- FirebaseInstallations (1.7.0):
- FirebaseCore (~> 6.10)
- GoogleUtilities/Environment (~> 6.7)
@ -55,11 +340,20 @@ PODS:
- GoogleUtilities/Reachability (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- Protobuf (>= 3.9.2, ~> 3.9)
- FirebaseStorage (3.9.1):
- FirebaseCore (~> 6.10)
- GTMSessionFetcher/Core (~> 1.1)
- Flutter (1.0.0)
- flutter_flexible_toast (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
- GoogleAppMeasurement (6.8.3):
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- GoogleUtilities/MethodSwizzler (~> 6.7)
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0)
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
@ -70,6 +364,8 @@ PODS:
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (6.7.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.7.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.7.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
@ -79,10 +375,36 @@ PODS:
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger
- "gRPC-C++ (1.28.2)":
- "gRPC-C++/Implementation (= 1.28.2)"
- "gRPC-C++/Interface (= 1.28.2)"
- "gRPC-C++/Implementation (1.28.2)":
- abseil/container/inlined_vector (= 0.20200225.0)
- abseil/memory/memory (= 0.20200225.0)
- abseil/strings/str_format (= 0.20200225.0)
- abseil/strings/strings (= 0.20200225.0)
- abseil/types/optional (= 0.20200225.0)
- "gRPC-C++/Interface (= 1.28.2)"
- gRPC-Core (= 1.28.2)
- "gRPC-C++/Interface (1.28.2)"
- gRPC-Core (1.28.2):
- gRPC-Core/Implementation (= 1.28.2)
- gRPC-Core/Interface (= 1.28.2)
- gRPC-Core/Implementation (1.28.2):
- abseil/container/inlined_vector (= 0.20200225.0)
- abseil/memory/memory (= 0.20200225.0)
- abseil/strings/str_format (= 0.20200225.0)
- abseil/strings/strings (= 0.20200225.0)
- abseil/types/optional (= 0.20200225.0)
- BoringSSL-GRPC (= 0.0.7)
- gRPC-Core/Interface (= 1.28.2)
- gRPC-Core/Interface (1.28.2)
- GTMSessionFetcher/Core (1.5.0)
- hexcolor (0.0.1):
- Flutter
- imei_plugin (0.0.1):
- Flutter
- leveldb-library (1.22)
- local_auth (0.0.1):
- Flutter
- maps_launcher (0.0.1):
@ -132,13 +454,20 @@ PODS:
DEPENDENCIES:
- Alamofire
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
- cloud_firestore_web (from `.symlinks/plugins/cloud_firestore_web/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_analytics_web (from `.symlinks/plugins/firebase_analytics_web/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_auth_web (from `.symlinks/plugins/firebase_auth_web/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- firebase_storage (from `.symlinks/plugins/firebase_storage/ios`)
- Flutter (from `Flutter`)
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
@ -164,15 +493,26 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- abseil
- Alamofire
- BoringSSL-GRPC
- Firebase
- FirebaseAnalytics
- FirebaseAuth
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseFirestore
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- FirebaseStorage
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleUtilities
- "gRPC-C++"
- gRPC-Core
- GTMSessionFetcher
- leveldb-library
- MTBBarcodeScanner
- nanopb
- OpenTok
@ -185,6 +525,10 @@ SPEC REPOS:
EXTERNAL SOURCES:
barcode_scan:
:path: ".symlinks/plugins/barcode_scan/ios"
cloud_firestore:
:path: ".symlinks/plugins/cloud_firestore/ios"
cloud_firestore_web:
:path: ".symlinks/plugins/cloud_firestore_web/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
@ -193,12 +537,22 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_macos/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
firebase_analytics:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_analytics_web:
:path: ".symlinks/plugins/firebase_analytics_web/ios"
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_auth_web:
:path: ".symlinks/plugins/firebase_auth_web/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_core_web:
:path: ".symlinks/plugins/firebase_core_web/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
firebase_storage:
:path: ".symlinks/plugins/firebase_storage/ios"
Flutter:
:path: Flutter
flutter_flexible_toast:
@ -243,28 +597,46 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_windows/ios"
SPEC CHECKSUMS:
abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879
cloud_firestore: 19c6f947dd14be9d71695ea23eefde67cd8829c8
cloud_firestore_web: 9ec3dc7f5f98de5129339802d491c1204462bfec
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_analytics: 52ba26fcfb9cc90f76b36c4e5200cc0a7e9024eb
firebase_analytics_web: 7d539061ea4af07563a0e21044af89cab70efec0
firebase_auth: 240419f6b00dea39c60a2a9c4379c16c4a4b02fb
firebase_auth_web: 0955c07bcc06e84af76b9d4e32e6f31518f2d7de
firebase_core: 350ba329d1641211bc6183a3236893cafdacfea7
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
firebase_storage: d5cf595245e1770ef7081b026f603771bf5dd547
FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193
FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseFirestore: adff4877869ca91a11250cc0989a6cd56bad163f
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1
FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a
FirebaseStorage: 15e0f15ef3c7fec3d1899d68623e47d4447066b4
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
"gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2
gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd
leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
@ -292,4 +664,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.0

@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
29211E4225C172B700DD740D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 29211E4125C172B700DD740D /* GoogleService-Info.plist */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@ -34,6 +35,8 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
29211CD725C165D600DD740D /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = "<group>"; };
29211E4125C172B700DD740D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@ -108,6 +111,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
29211E4125C172B700DD740D /* GoogleService-Info.plist */,
29211CD725C165D600DD740D /* RunnerRelease.entitlements */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@ -204,6 +209,7 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
29211E4225C172B700DD740D /* GoogleService-Info.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
@ -354,7 +360,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -437,7 +443,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -486,7 +492,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -530,6 +536,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;

@ -1,7 +1,6 @@
import UIKit
import Flutter
import OpenTok
// Created by Mohammad Aljammal & Elham Rababah on 24/06/20.
// Copyright © 2020 Cloud. All rights reserved.
@ -23,7 +22,6 @@ import OpenTok
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
let videoCallChannel = FlutterMethodChannel(name: "Dr.cloudSolution/videoCall",
binaryMessenger: controller.binaryMessenger)

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre</string>
<key>API_KEY</key>
<string>AIzaSyAKPayaNaI-2RN6S4PH5W9wYExmEgoBUvo</string>
<key>GCM_SENDER_ID</key>
<string>1097451043303</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.hmg.doctorApp</string>
<key>PROJECT_ID</key>
<string>doctor-app-35ddc</string>
<key>STORAGE_BUCKET</key>
<string>doctor-app-35ddc.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:1097451043303:ios:0e9b87e77dcf397d866542</string>
</dict>
</plist>

@ -47,10 +47,13 @@
<false/>
<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} always camera use</string>
<string>App requires access to camera incase you are interested to attach images to your Qr Code.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need to upload image</string>
<key>NSMicrophoneUsageDescription</key>
<string>${PRODUCT_NAME} always Microphone use</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
</dict>
</plist>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>

@ -191,6 +191,8 @@ const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList';
const DRUG_TO_DRUG =
'Services/DoctorApplication.svc/REST/DrugToDrugInteraction';
const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile';
const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards';
const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes';
var selectedPatientType = 1;

@ -49,9 +49,11 @@ const Map<String, Map<String, String>> localizedValues = {
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Refer Patient', 'ar': 'إحالة مريض'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},
'myReferredPatient': {'en': 'My Referred Patient', 'ar': 'مرضاي المحالين'},
'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'},
'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'},
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},
'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'},
'lastName': {'en': 'Last Name', 'ar': 'اسم العائلة'},
@ -215,7 +217,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Please fill all fields..!',
'ar': 'الرجاء ملأ جميع الحقول..!'
},
'replay2': {'en': 'Replay', 'ar': 'رد الطبيب'},
'replay2': {'en': 'Reply', 'ar': 'رد الطبيب'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدليات'},
'price': {'en': 'Price', 'ar': 'السعر'},
@ -666,4 +668,36 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "You have to add chief complaint fields correctly .",
'ar': "يجب عليك إضافة حقول شكوى الرئيس بشكل صحيح"
},
'referralStatus': {
'en': "Referral Status : ",
'ar': "حالة الإحالة :"
},
'referralRemark': {
'en': "Referral Remark : ",
'ar': "ملاحظة الإحالة :"
},
'ICDName': {
'en': "ICDName",
'ar': "اسم ال ICD"
}, 'patient-name': {
'en': "Patient Name",
'ar': "اسم المريص"
},
'icd': {'en': "ICD", 'ar': "التصنيف الدولي للأمراض"},
'days': {'en': "Days", 'ar': "أيام"},
'months': {'en': "Months", 'ar': "أشهر"},
'years': {'en': "Years", 'ar': "سنين"},
'hr': {'en': "HR", 'ar': "س"},
'min': {'en': "Min", 'ar': "د"},
'appointmentNumber': {'en': "Appointment Number", 'ar': "رقم الموعد"},
'referralStatusHold': {'en': "Hold", 'ar': "معلق"},
'referralStatusActive': {'en': "Active", 'ar': "نشط"},
'referralStatusCancelled': {'en': "Cancelled", 'ar': "ملغاة"},
'referralStatusCompleted': {'en': "Completed", 'ar': "مكتمل"},
'referralStatusNotSeen': {'en': "NotSeen", 'ar': "لم يرى"},
'clinicSearch': {'en': "Search Clinic", 'ar': "بحث عن عيادة"},
'doctorSearch': {'en': "Search Doctor", 'ar': "بحث عن طبيب"},
// 'icd': {'en': "ICD", 'ar': " "},
};

@ -19,6 +19,8 @@ enum MasterKeysService {
MedicationFrequency,
MedicationDoseTime,
MedicationIndications,
Speciality,
AdmissionRequestType,
}
extension SelectedMasterKeysService on MasterKeysService {
@ -81,6 +83,8 @@ extension SelectedMasterKeysService on MasterKeysService {
break;
case MasterKeysService.MedicationIndications:
return 450;
case MasterKeysService.AdmissionRequestType:
return 2019;
break;
}
}

@ -0,0 +1,26 @@
class WardModel{
String description;
String descriptionN;
int floorID;
bool isActive;
WardModel(
{this.description, this.descriptionN, this.floorID, this.isActive});
WardModel.fromJson(Map<String, dynamic> json) {
description = json['description'];
descriptionN = json['descriptionN'];
floorID = json['floorID'];
isActive = json['isActive'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['description'] = this.description;
data['descriptionN'] = this.descriptionN;
data['floorID'] = this.floorID;
data['isActive'] = this.isActive;
return data;
}
}

@ -44,6 +44,7 @@ class LookupService extends BaseService {
List<MasterKeyModel> listOfICD10 = [];
List<MasterKeyModel> listOfTemperatureMethods = [];
List<MasterKeyModel> listOfSpeciality = [];
List<dynamic> listOfAdmissionType = [];
Future getMasterLookup(MasterKeysService masterKeys) async {
hasError = false;
@ -183,6 +184,13 @@ class LookupService extends BaseService {
medicationIndicationsList.add(v);
});
break;
case MasterKeysService.AdmissionRequestType:
listOfAdmissionType.clear();
entryList.forEach((v) {
// listOfAdmissionType.add(MasterKeyModel.fromJson(v));
listOfAdmissionType.add(v);
});
break;
}
}
}

@ -1,9 +1,14 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/ward-model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class AdmissionRequestService extends LookupService {
List<dynamic> doctorsList = [];
List<dynamic> specialityList = [];
List<dynamic> wardList = [];
List<dynamic> diagnosisTypesList = [];
List<dynamic> allergiesLookupList = [];
setSpecialityList() {
specialityList.clear();
@ -12,6 +17,13 @@ class AdmissionRequestService extends LookupService {
});
}
setAllergies() {
allergiesLookupList.clear();
allergiesList.forEach((element) {
allergiesLookupList.add(element.toJson());
});
}
Future getDoctorsList() async {
hasError = false;
@ -28,4 +40,50 @@ class AdmissionRequestService extends LookupService {
body: Map(),
);
}
Future getWardList() async {
hasError = false;
await baseAppClient.post(
GET_WARDS,
onSuccess: (dynamic response, int statusCode) {
wardList.clear();
if (response['AdmissionMasterList'] != null &&
response['AdmissionMasterList']['entityList'] != null) {
response['AdmissionMasterList']['entityList'].forEach((v) {
// wardList.add(WardModel.fromJson(v));
wardList.add(v);
});
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: Map(),
);
}
Future getDiagnosisTypesList() async {
hasError = false;
await baseAppClient.post(
GET_DIAGNOSIS_TYPES,
onSuccess: (dynamic response, int statusCode) {
diagnosisTypesList.clear();
if (response['AdmissionDiagnosisList'] != null &&
response['AdmissionDiagnosisList']['entityList'] != null) {
response['AdmissionDiagnosisList']['entityList'].forEach((v) {
// diagnosisTypesList.add(MasterKeyModel.fromJson(v));
diagnosisTypesList.add(v);
});
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: Map(),
);
}
}

@ -32,13 +32,14 @@ class PatientReferralService extends LookupService {
"Channel": 9,
"TokenID": "",
"SessionID": "i1UJwCTSqt",
"IsLoginForDoctorApp": true
"IsLoginForDoctorApp": true,
// "MemberID": memberID
};
dynamic localRes;
await baseAppClient.post(url, onSuccess: (response, statusCode) async {
if (response['MessageStatus'] == 1) {
projectsList = response['ListProject'];
projectsList = response['ProjectInfo'];
} else {
// handel error
projectsList = ListProject;

@ -41,7 +41,7 @@ class UcafService extends LookupService {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
// body['AppointmentNo'] = patient.appointmentNo;
body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(

@ -43,7 +43,7 @@ class VitalSignsService extends BaseService {
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientMRN;
body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo;
// body['EpisodeID'] = patient.episodeNo;
body['PatientTypeID'] = 1;
body['PatientType'] = 1;
body['DeviceTypeID'] = 1;

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/admissionRequest/ward-model.dart';
import 'package:doctor_app_flutter/core/service/patient-admission-request-service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
@ -15,20 +16,24 @@ class AdmissionRequestViewModel extends BaseViewModel{
List<dynamic> get speciality => _admissionRequestService.specialityList;
List<dynamic> get wardList => _admissionRequestService.wardList;
List<dynamic> get admissionTypeList => _admissionRequestService.listOfAdmissionType;
List<dynamic> get diagnosisTypesList => _admissionRequestService.diagnosisTypesList;
List<dynamic> get allergiesList => _admissionRequestService.allergiesLookupList;
String selectedLanguage;
Future getLanguage() async {
selectedLanguage = await sharedPref.getString(APP_Language);
}
Future getMasterLookup() async {
setState(ViewState.Busy);
Future getSpecialityList() async {
await getLanguage();
await _admissionRequestService.getMasterLookup(MasterKeysService.Speciality);
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.Error);
} else {
await getMasterLookup(MasterKeysService.Speciality);
if (!_admissionRequestService.hasError) {
_admissionRequestService.setSpecialityList();
await getClinicDoctors();
}
@ -43,4 +48,42 @@ class AdmissionRequestViewModel extends BaseViewModel{
} else
setState(ViewState.Idle);
}
Future getWards() async {
setState(ViewState.Busy);
await _admissionRequestService.getWardList();
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getDiagnosis() async {
setState(ViewState.Busy);
await _admissionRequestService.getDiagnosisTypesList();
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future getAllergies() async {
await getMasterLookup(MasterKeysService.Allergies);
if (!_admissionRequestService.hasError) {
_admissionRequestService.setAllergies();
}
}
Future getMasterLookup(MasterKeysService keysService) async {
setState(ViewState.Busy);
await _admissionRequestService.getMasterLookup(keysService);
if (_admissionRequestService.hasError) {
error = _admissionRequestService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -8,6 +8,8 @@ import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import '../../locator.dart';
@ -40,8 +42,8 @@ class PatientReferralViewModel extends BaseViewModel {
error = _referralPatientService.error;
setState(ViewState.Error);
} else {
if(patientReferral.length == 0){
await getMasterLookup(MasterKeysService.physiotherapyGoals);
if (patientReferral.length == 0) {
await getMasterLookup(MasterKeysService.physiotherapyGoals);
} else {
setState(ViewState.Idle);
}
@ -94,8 +96,8 @@ class PatientReferralViewModel extends BaseViewModel {
DoctorProfileModel doctorProfile = await getDoctorProfile();
if (doctorProfile != null) {
dynamic _selectedBranch = {
"ID": doctorProfile.projectID,
"Desciption": doctorProfile.projectName
"facilityId": doctorProfile.projectID,
"facilityName": doctorProfile.projectName
};
return _selectedBranch;
}
@ -126,24 +128,22 @@ class PatientReferralViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async {
Future responseReferral(
PendingReferral pendingReferral, bool isAccepted) async {
setState(ViewState.Busy);
await _referralPatientService.responseReferral(pendingReferral, isAccepted);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future makeReferral(PatiantInformtion patient,
String isoStringDate,
int projectID,
int clinicID,
int doctorID,
String remarks) async {
Future makeReferral(PatiantInformtion patient, String isoStringDate,
int projectID, int clinicID, int doctorID, String remarks) async {
setState(ViewState.Busy);
await _referralPatientService.makeReferral(patient, isoStringDate, projectID, clinicID, doctorID, remarks);
await _referralPatientService.makeReferral(
patient, isoStringDate, projectID, clinicID, doctorID, remarks);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
@ -152,18 +152,40 @@ class PatientReferralViewModel extends BaseViewModel {
}
}
Future getPatientDetails(String fromDate, String toDate, int patientMrn, int appointmentNo) async {
Future getPatientDetails(
String fromDate, String toDate, int patientMrn, int appointmentNo) async {
setState(ViewState.Busy);
await _referralPatientService.getPatientArrivalList(toDate, fromDate: fromDate, patientMrn: patientMrn, appointmentNo: appointmentNo);
await _referralPatientService.getPatientArrivalList(toDate,
fromDate: fromDate,
patientMrn: patientMrn,
appointmentNo: appointmentNo);
if (_referralPatientService.hasError) {
error = _referralPatientService.error;
setState(ViewState.Error);
error = _referralPatientService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
/*
* model
.getPatientArrivalList()*/
String getReferralStatusNameByCode(int statusCode, BuildContext context) {
switch (statusCode) {
case 1:
return TranslationBase.of(context).referralStatusHold;
case 2:
return TranslationBase.of(context).referralStatusActive;
case 4:
return TranslationBase.of(context).referralStatusCancelled;
case 46:
return TranslationBase.of(context).referralStatusCompleted;
case 63:
return TranslationBase.of(context).referralStatusNotSeen;
default:
return "-";
}
}
}

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import '../../locator.dart';
@ -13,7 +14,9 @@ class VitalSignsViewModel extends BaseViewModel {
VitalSignsService _vitalSignService = locator<VitalSignsService>();
VitalSignData get patientVitalSigns => _vitalSignService.patientVitalSigns;
List<VitalSignHistory> get patientVitalSignsHistory => _vitalSignService.patientVitalSignsHistory;
List<VitalSignHistory> get patientVitalSignsHistory =>
_vitalSignService.patientVitalSignsHistory;
String heightCm = "0";
String weightKg = "0";
@ -34,8 +37,16 @@ class VitalSignsViewModel extends BaseViewModel {
}
}
Future getPatientVitalSignHistory(PatiantInformtion patient, String from, String to) async {
Future getPatientVitalSignHistory(
PatiantInformtion patient, String from, String to) async {
setState(ViewState.Busy);
if (from == null || from == "0") {
from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
if (to == null || to == "0") {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
await _vitalSignService.getPatientVitalSignsHistory(patient, from, to);
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
@ -48,9 +59,7 @@ class VitalSignsViewModel extends BaseViewModel {
if (weightKg == "0" || weightKg == null || weightKg == 'null') {
weightKg = element.weightKg.toString();
}
if (bodyMax == "0" ||
bodyMax == null ||
bodyMax == 'null') {
if (bodyMax == "0" || bodyMax == null || bodyMax == 'null') {
bodyMax = element.bodyMassIndex.toString();
}
if (temperatureCelcius == "0" ||
@ -84,24 +93,24 @@ class VitalSignsViewModel extends BaseViewModel {
return "Normal";
} else if (bodyMassIndex <= 30) {
return "Overweight";
} else { // > 30.0
} else {
// > 30.0
return "Obese";
}
}
String getTempratureMethod(int temperatureCelciusMethod){
// temperatureCelciusMethod ( vital sign response field )- master 2005
if(temperatureCelciusMethod == 1){
String getTempratureMethod(int temperatureCelciusMethod) {
// temperatureCelciusMethod ( vital sign response field )- master 2005
if (temperatureCelciusMethod == 1) {
return "Oral";
} else if(temperatureCelciusMethod == 2){
} else if (temperatureCelciusMethod == 2) {
return "Axilla";
} else if(temperatureCelciusMethod == 3){
} else if (temperatureCelciusMethod == 3) {
return "Rectal";
} else if(temperatureCelciusMethod == 4){
} else if (temperatureCelciusMethod == 4) {
return "Tympanic";
} else if(temperatureCelciusMethod == 5){
} else if (temperatureCelciusMethod == 5) {
return "Temporal";
}
}
}

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hexcolor/hexcolor.dart';
@ -13,7 +14,9 @@ import './routes.dart';
import 'config/config.dart';
import 'locator.dart';
void main() {
void main()async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
setupLocator();
runApp(MyApp());
}

@ -8,7 +8,7 @@ class VitalSignData {
var bodyMassIndex;
int fio2;
int headCircumCm;
int heightCm;
var heightCm;
int idealBodyWeightLbs;
bool isPainManagementDone;
bool isVitalsRequired;
@ -26,10 +26,10 @@ class VitalSignData {
int respirationPattern;
int sao2;
int status;
int temperatureCelcius;
var temperatureCelcius;
int temperatureCelciusMethod;
int waistSizeInch;
int weightKg;
var waistSizeInch;
var weightKg;
VitalSignData(
{this.appointmentNo,

@ -64,7 +64,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
projectsProvider = Provider.of<ProjectViewModel>(context);
projectsProvider.getDoctorClinicsList();
_firebaseMessaging.setAutoInitEnabled(true);
// _firebaseMessaging.setAutoInitEnabled(true);
_firebaseMessaging.requestNotificationPermissions(
const IosNotificationSettings(
sound: true, badge: true, alert: true, provisional: true));
_firebaseMessaging.onIosSettingsRegistered
.listen((IosNotificationSettings settings) {
print("Settings registered: $settings");
});
_firebaseMessaging.getToken().then((String token) async {
if (token != '') {
DEVICE_TOKEN = token;

@ -76,7 +76,9 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "7") {
_selectedType == "7" || ((_patientSearchFormValues.From == "0" ||
_patientSearchFormValues.To == "0") &&
_selectedType == "6") ) {
// helpers.showErrorToast("Please Choose The Dates");
} else {
setState(() {

@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
@ -615,9 +616,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
.white,
),
AppText(
item
.age
.toString(),
" ${DateUtils.getAgeByBirthday(item.dateofBirth, context)}",
fontSize: 1.8 *
SizeConfig
.textMultiplier,

@ -284,7 +284,24 @@ class DiagnosisWidget extends StatelessWidget {
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${diagnosis.icdCode10ID} ${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}",
"${diagnosisCondition != null ? model.selectedLanguage == 'ar' ? diagnosisCondition.nameAr : diagnosisCondition.nameEn : "-"}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).icd}: ",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${diagnosis.icdCode10ID}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),

@ -144,24 +144,31 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
],
),
Row(
children: [
AppText(
"${TranslationBase.of(context).temperature}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
AppText(
"${model.patientVitalSigns.temperatureCelcius}(C), ${model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32}(F)",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
],
SizedBox(
width: 4,
),
Expanded(
child: Row(
children: [
AppText(
"${TranslationBase.of(context).temperature}",
fontSize: SizeConfig.textMultiplier * 1.8,
color: Colors.black,
fontWeight: FontWeight.w700,
),
SizedBox(
width: 8,
),
Expanded(
child: AppText(
"${model.patientVitalSigns.temperatureCelcius}(C), ${(model.patientVitalSigns.temperatureCelcius * (9 / 5) + 32).toStringAsFixed(2)}(F)",
fontSize: SizeConfig.textMultiplier * 2,
color: Colors.grey.shade800,
fontWeight: FontWeight.normal,
),
),
],
),
),
],
),
@ -215,19 +222,19 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.additionalTextComplaints,
helpers.parseHtmlString(model
.patientChiefComplaintList[0]
.chiefComplaint),
false),
enabled: false,
controller: _additionalComplaintsController,
keyboardType: TextInputType.text,
/*minLines: 4,
maxLines: 6,*/
)),
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.additionalTextComplaints,
helpers.parseHtmlString(model
.patientChiefComplaintList[0]
.chiefComplaint),
false),
enabled: false,
controller: _additionalComplaintsController,
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 15,
)),
SizedBox(
height: 16,
),
@ -356,7 +363,9 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
false),
enabled: true,
controller: _signsController,
keyboardType: TextInputType.text,
keyboardType: TextInputType.multiline,
minLines: null,
maxLines: null,
)),
SizedBox(
height: 16,

@ -14,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
import 'admission-request_second-screen.dart';
class AdmissionRequestDetailScreen extends StatefulWidget {
@override
@ -35,7 +34,7 @@ class _AdmissionRequestDetailScreenState
final screenSize = MediaQuery.of(context).size;
return BaseView<AdmissionRequestViewModel>(
onModelReady: (model) => model.getMasterLookup(),
onModelReady: (model) => model.getSpecialityList(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).admissionRequest,
@ -178,6 +177,10 @@ class _AdmissionRequestDetailScreenState
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
usingSearch: true,
hintSearchText:
TranslationBase.of(context)
.doctorSearch,
okText:
TranslationBase.of(context)
.ok,

@ -1,18 +1,24 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-viewmodel.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../../../routes.dart';
@ -33,15 +39,17 @@ class _AdmissionRequestSecondScreenState
bool _preAnesthesiaReferred = false;
dynamic _selectedWard;
dynamic _selectedAdmissionType;
dynamic _selectedDiagnosis;
dynamic _selectedAllergies;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<AdmissionRequestViewModel>(
// onModelReady: (model) => model.getMasterLookup(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).admissionRequest,
@ -179,40 +187,44 @@ class _AdmissionRequestSecondScreenState
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0
onTap: model.wardList != null &&
model.wardList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/
null,
openListDialogField('description',
'description', model.wardList,
(selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
}
: () async {
await model.getWards();
if (model.state == ViewState.Idle &&
model.wardList.length > 0) {
openListDialogField('description',
'description', model.wardList,
(selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).ward,
/* _selectedWard != null
? _selectedWard['DoctorName']
:*/
null,
_selectedWard != null
? _selectedWard['description']
: null,
true),
enabled: false,
),
@ -238,41 +250,51 @@ class _AdmissionRequestSecondScreenState
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0
onTap: model.admissionTypeList != null &&
model.admissionTypeList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/
null,
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
}
: () async {
await model.getMasterLookup(
MasterKeysService
.AdmissionRequestType);
if (model.state == ViewState.Idle &&
model.admissionTypeList.length >
0) {
openListDialogField('nameEn',
'id', model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.admissionType,
/* _admissionType != null
? _admissionType['DoctorName']
:*/
null,
_selectedAdmissionType != null
? _selectedAdmissionType[
'nameEn']
: null,
true),
enabled: false,
),
@ -284,41 +306,51 @@ class _AdmissionRequestSecondScreenState
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0
onTap: model.diagnosisTypesList != null &&
model.diagnosisTypesList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/
null,
openListDialogField('nameEn', 'id',
model.diagnosisTypesList,
(selectedValue) {
setState(() {
_selectedDiagnosis =
selectedValue;
});
});
}
: () async {
await model.getDiagnosis();
if (model.state == ViewState.Idle &&
model.diagnosisTypesList
.length >
0) {
openListDialogField(
'nameEn',
'id',
model.diagnosisTypesList,
(selectedValue) {
setState(() {
_selectedDiagnosis =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.diagnosis,
/* _admissionType != null
? _admissionType['DoctorName']
:*/
null,
_selectedDiagnosis != null
? _selectedDiagnosis['nameEn']
: null,
true),
enabled: false,
),
@ -347,41 +379,48 @@ class _AdmissionRequestSecondScreenState
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap:
/*model.doctorsList != null &&
model.doctorsList.length > 0
onTap: model.allergiesList != null &&
model.allergiesList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
:*/
null,
openListDialogField('nameEn', 'id',
model.allergiesList,
(selectedValue) {
setState(() {
_selectedAllergies =
selectedValue;
});
});
}
: () async {
await model.getAllergies();
if (model.state == ViewState.Idle &&
model.allergiesList.length >
0) {
openListDialogField('nameEn',
'id', model.allergiesList,
(selectedValue) {
setState(() {
_selectedAllergies =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.allergies,
/* _admissionType != null
? _admissionType['DoctorName']
:*/
null,
_selectedAllergies != null
? _selectedAllergies['nameEn']
: null,
true),
enabled: false,
),
@ -426,4 +465,59 @@ class _AdmissionRequestSecondScreenState
updateDate(picked);
}
}
void openListDialogField(String attributeName, String attributeValueId,
List<dynamic> list, Function(dynamic selectedValue) okFunction) {
ListSelectDialog dialog = ListSelectDialog(
list: list,
attributeName: attributeName,
attributeValueId: attributeValueId,
usingSearch: true,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
okFunction(selectedValue);
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
/*
onTap: model.wardList != null &&
model.wardList.length > 0
? () {
openListDialogField('description',
'description', model.wardList,
(selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
}
: () async {
await model.getWards();
if (model.state == ViewState.Idle &&
model.wardList.length > 0) {
openListDialogField('description',
'description', model.wardList,
(selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
*/
}

@ -117,6 +117,12 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
marginBottom: 5,
fontWeight: FontWeight.bold,
),
AppText(
notesList[index]
["AdmissionNo"],
marginLeft: 10,
color: Colors.grey[600],
),
AppText(
convertDateFormat(
notesList[index]
@ -128,18 +134,24 @@ class _PatientsOrdersState extends State<PatientsOrdersScreen> {
),
),
children: <Widget>[
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
AppText(
notesList[index]["Notes"],
margin: 5,
)
],
Divider(
color: Colors.black,
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
notesList[index]["Notes"],
margin: 5,
),
],
)
],
),
],
));

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
@ -40,7 +42,8 @@ class MyReferralDetailScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
body: model.patientArrivalList != null
body: model.patientArrivalList != null &&
model.patientArrivalList.length > 0
? Column(
children: [
Expanded(
@ -75,6 +78,7 @@ class MyReferralDetailScreen extends StatelessWidget {
),
),
PatientReferralItemWidget(
"${pendingReferral.patientID}",
patientName: pendingReferral.patientName,
referralStatus: null,
isReferredTo: false,
@ -84,6 +88,7 @@ class MyReferralDetailScreen extends StatelessWidget {
pendingReferral.referredByDoctorInfo,
clinicDescription: null,
remark: pendingReferral.remarksFromSource,
referredOn: pendingReferral.referredOn,
),
SizedBox(
child: GridView.count(
@ -144,8 +149,12 @@ class MyReferralDetailScreen extends StatelessWidget {
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, true);
handler: () async {
await model.responseReferral(
pendingReferral, true);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),
@ -160,8 +169,12 @@ class MyReferralDetailScreen extends StatelessWidget {
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: () {
model.responseReferral(pendingReferral, false);
handler: () async {
await model.responseReferral(
pendingReferral, true);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
},
),
),

@ -23,8 +23,7 @@ class MyReferralPatientScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
body: model.pendingReferral == null ||
model.pendingReferral.length == 0
body: model.pendingReferral == null || model.pendingReferral.length == 0
? Center(
child: AppText(
TranslationBase.of(context).referralEmptyMsg,
@ -62,6 +61,7 @@ class MyReferralPatientScreen extends StatelessWidget {
...List.generate(
model.pendingReferral.length,
(index) => PatientReferralItemWidget(
"${model.pendingReferral[index].patientID}",
patientName: model.pendingReferral[index].patientName,
referralStatus: null,
isReferredTo: false,
@ -72,13 +72,13 @@ class MyReferralPatientScreen extends StatelessWidget {
clinicDescription: null,
remark:
model.pendingReferral[index].remarksFromSource,
referredOn: model.pendingReferral[index].referredOn,
infoIcon: InkWell(
onTap: () {
Navigator.of(context).pushNamed(
MY_REFERRAL_DETAIL,
arguments: {
'referral': model.pendingReferral[index]
});
Navigator.of(context)
.pushNamed(MY_REFERRAL_DETAIL, arguments: {
'referral': model.pendingReferral[index]
});
},
child: Icon(
Icons.info_outline,

@ -1,26 +1,22 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../QR_reader_screen.dart';
class PatientMakeReferralScreen extends StatefulWidget {
// previous design page is: ReferPatientScreen
@override
@ -74,14 +70,14 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
if (model.state == ViewState.BusyLocal)
/*if (model.state == ViewState.BusyLocal)
Container(
color: Colors.white,
width: 50,
height: 50,
child: AppLoaderWidget(
containerColor: Colors.white,
)),
)),*/
Column(
children: [
PatientPageHeaderWidget(patient),
@ -95,17 +91,19 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
model.patientReferral.length == 0
? ReferralForm(model, screenSize)
: PatientReferralItemWidget(
patientName: model.patientReferral[0].patientName,
referralStatus: "${model.patientReferral[0].referralStatus}",
isReferredTo: true,
isSameBranch: model.patientReferral[0]
.isReferralDoctorSameBranch,
referralDoctorName:
model.patientReferral[0].referredByDoctorInfo,
clinicDescription: null,
remark:
model.patientReferral[0].remarksFromSource
),
"${model.patientReferral[0].patientID}",
patientName: model.patientReferral[0].patientName,
referralStatus:
"${model.patientReferral[0].referralStatus}",
isReferredTo: true,
isSameBranch: model
.patientReferral[0].isReferralDoctorSameBranch,
referralDoctorName:
model.patientReferral[0].referredByDoctorInfo,
clinicDescription: null,
remark: model.patientReferral[0].remarksFromSource,
referredOn: model.patientReferral[0].referredOn,
),
],
),
if (model.patientReferral.length == 0)
@ -124,7 +122,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
.makeReferral(
patient,
appointmentDate.toIso8601String(),
_selectedBranch['ID'],
_selectedBranch['facilityId'],
_selectedClinic['ClinicID'],
_selectedDoctor['DoctorID'],
_remarksController.text)
@ -180,7 +178,12 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
model.getDoctorBranch().then((value) {
_selectedBranch = value;
if (_referTo['id'] == 1) {
model.getClinics(_selectedBranch['ID']);
GifLoaderDialogUtils.showMyDialog(context);
model
.getClinics(_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
}
});
});
@ -196,7 +199,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referTo,
_referTo != null ? _referTo['name'] : null,
true),
@ -217,15 +220,19 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
? () {
ListSelectDialog dialog = ListSelectDialog(
list: model.branchesList,
attributeName: 'Desciption',
attributeValueId: 'ID',
attributeName: 'facilityName',
attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedBranch = selectedValue;
_selectedClinic = null;
_selectedDoctor = null;
model.getClinics(_selectedBranch['ID']);
GifLoaderDialogUtils.showMyDialog(context);
model
.getClinics(_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(context));
});
},
);
@ -239,10 +246,10 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).branch,
_selectedBranch != null
? _selectedBranch['Desciption']
? _selectedBranch['facilityName']
: null,
true),
enabled: false,
@ -263,13 +270,19 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
list: model.clinicsList,
attributeName: 'ClinicDescription',
attributeValueId: 'ClinicID',
usingSearch: true,
hintSearchText: TranslationBase.of(context).clinicSearch,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
_selectedDoctor = null;
_selectedClinic = selectedValue;
model.getClinicDoctors(
_selectedClinic['ClinicID'].toString());
GifLoaderDialogUtils.showMyDialog(context);
model
.getClinicDoctors(
_selectedClinic['ClinicID'].toString())
.then((_) =>
GifLoaderDialogUtils.hideDialog(context));
});
},
);
@ -283,7 +296,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).clinic,
_selectedClinic != null
? _selectedClinic['ClinicDescription']
@ -307,6 +320,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
list: model.doctorsList,
attributeName: 'DoctorName',
attributeValueId: 'DoctorID',
usingSearch: true,
hintSearchText: TranslationBase.of(context).doctorSearch,
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
@ -324,7 +339,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).doctor,
_selectedDoctor != null
? _selectedDoctor['DoctorName']
@ -342,7 +357,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
child: InkWell(
onTap: () => _selectDate(context, model),
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).chooseAppointment,
appointmentDate != null
? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}"
@ -361,7 +376,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
),
Container(
child: TextField(
decoration: textFieldSelectorDecoration(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).remarks, null, false),
enabled: true,
controller: _remarksController,
@ -440,49 +455,4 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
});*/
}
}
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.arrow_drop_down,
color: Colors.black,
)
: null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: 2.0,
)),
);
}
}

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -14,7 +15,7 @@ class ReferredPatientScreen extends StatelessWidget {
onModelReady: (model) => model.getMyReferredPatient(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
appBarTitle: TranslationBase.of(context).referredPatient,
body: model.listMyReferredPatientModel == null ||
model.listMyReferredPatientModel.length == 0
? Center(
@ -45,10 +46,11 @@ class ReferredPatientScreen extends StatelessWidget {
...List.generate(
model.listMyReferredPatientModel.length,
(index) => PatientReferralItemWidget(
"${model.getReferredPatientItem(index).patientId}",
patientName:
"${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}",
referralStatus:
"${model.getReferredPatientItem(index).referralStatus}",
"${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}",
isReferredTo: true,
isSameBranch: model
.getReferredPatientItem(index)
@ -62,6 +64,12 @@ class ReferredPatientScreen extends StatelessWidget {
remark: model
.getReferredPatientItem(index)
.referringDoctorRemarks,
referredOn: model
.getReferredPatientItem(index)
.referralDate !=
null
? DateUtils.convertDateFromServerFormat(model.getReferredPatientItem(index).referralDate, "dd/MM/yyyy")
: null,
),
),
],

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -9,13 +10,15 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class VitalSignDetailsScreen extends StatelessWidget {
int appointmentNo;
int projectID;
bool isNotOneAppointment;
VitalSignDetailsScreen({this.appointmentNo, this.projectID,this.isNotOneAppointment=true});
VitalSignDetailsScreen(
{this.appointmentNo, this.projectID, this.isNotOneAppointment = true});
@override
Widget build(BuildContext context) {
@ -23,10 +26,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient'];
String from = routeArgs['from'];
String to = routeArgs['to'];
String imageBasePath = 'assets/images/';
String imageBasePath = 'assets/images/';
return BaseView<VitalSignsViewModel>(
onModelReady: (model) => model.getPatientVitalSignHistory(patient, from, to),
onModelReady: (model) =>
model.getPatientVitalSignHistory(patient, from, to),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
baseViewModel: mode,
@ -38,16 +42,19 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () =>isNotOneAppointment? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Height,
pageTitle: TranslationBase.of(context).height,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Height,
pageTitle:
TranslationBase.of(context).height,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).height,
@ -58,16 +65,19 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Weight,
pageTitle: TranslationBase.of(context).weight,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Weight,
pageTitle:
TranslationBase.of(context).weight,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: VitalSignItem(
des: TranslationBase.of(context).weight,
imagePath: "${imageBasePath}vital_weight.png",
@ -80,17 +90,20 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.BodyMeasurements,
pageTitle: TranslationBase.of(context)
.bodyMeasurements,
vitalList: mode.patientVitalSignsHistory,
),
),
): null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey:
vitalSignDetails.BodyMeasurements,
pageTitle: TranslationBase.of(context)
.bodyMeasurements,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: VitalSignItem(
des: TranslationBase.of(context).body,
imagePath: "${imageBasePath}vital_body_mass.png",
@ -99,21 +112,24 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Temperature,
pageTitle:
TranslationBase.of(context).temperature,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Temperature,
pageTitle: TranslationBase.of(context)
.temperature,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: Container(
child: VitalSignItem(
des: TranslationBase.of(context).temperature,
imagePath: "${imageBasePath}vital_temperature.png",
imagePath:
"${imageBasePath}vital_temperature.png",
lastVal: mode.temperatureCelcius,
unit: TranslationBase.of(context).tempC,
),
@ -124,16 +140,19 @@ class VitalSignDetailsScreen extends StatelessWidget {
Row(
children: <Widget>[
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.heart,
pageTitle: TranslationBase.of(context).heart,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.heart,
pageTitle:
TranslationBase.of(context).heart,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: VitalSignItem(
des: TranslationBase.of(context).heart,
imagePath: "${imageBasePath}vital_heart_rate.png",
@ -142,17 +161,19 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
),
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Respiration,
pageTitle:
TranslationBase.of(context).respirationRate,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Respiration,
pageTitle: TranslationBase.of(context)
.respirationRate,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: VitalSignItem(
des: TranslationBase.of(context).respirationRate,
imagePath: "${imageBasePath}vital_respiration.png",
@ -166,19 +187,23 @@ class VitalSignDetailsScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () => isNotOneAppointment ? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.BloodPressure,
pageTitle: TranslationBase.of(context).bloodPressure,
vitalList: mode.patientVitalSignsHistory,
),
),
):null,
onTap: () => isNotOneAppointment
? Navigator.push(
context,
FadePage(
page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.BloodPressure,
pageTitle: TranslationBase.of(context)
.bloodPressure,
vitalList: mode.patientVitalSignsHistory,
),
),
)
: null,
child: VitalSignItem(
des: TranslationBase.of(context).bloodPressure,
imagePath: "${imageBasePath}vital_blood-pressure.png",
imagePath:
"${imageBasePath}vital_blood-pressure.png",
lastVal: mode.bloodPressure,
unit: TranslationBase.of(context).sysDias,
),
@ -189,7 +214,12 @@ class VitalSignDetailsScreen extends StatelessWidget {
),
)
: Center(
child: AppText('No Data'),
child: AppText(
TranslationBase.of(context).vitalSignEmptyMsg,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
),
),
);

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
class DateUtils {
@ -32,7 +34,7 @@ class DateUtils {
return date;
}
static String differenceBetweenDateAndCurrentInYearMonthDay(DateTime firstDate) {
static String differenceBetweenDateAndCurrentInYearMonthDay(DateTime firstDate, BuildContext context) {
DateTime now = DateTime.now();
// now = now.add(Duration(days: 400, minutes: 0));
var difference = firstDate.difference(now);
@ -49,12 +51,10 @@ class DateUtils {
final monthAgo = new DateTime(now.year, now.month - 1, firstDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$days Days, $months Months, $years Years";
return "$days ${TranslationBase.of(context).days}, $months ${TranslationBase.of(context).months}, $years ${TranslationBase.of(context).years}";
}
static String differenceBetweenDateAndCurrent(DateTime firstDate) {
static String differenceBetweenDateAndCurrent(DateTime firstDate, BuildContext context) {
DateTime now = DateTime.now();
// DateTime now = nows.add(Duration(days: 400, minutes: 25, hours: 0));
var difference = now.difference(firstDate);
@ -67,10 +67,10 @@ class DateUtils {
double hoursInOneDay = difference.inHours / difference.inDays;
return "$days Days, $hours HR, $minutes Min";
return "$days ${TranslationBase.of(context).days}, $hours ${TranslationBase.of(context).hr}, $minutes ${TranslationBase.of(context).min}";
}
static String differenceBetweenServerDateAndCurrent(String str) {
static String differenceBetweenServerDateAndCurrent(String str, BuildContext context) {
const start = "/Date(";
const end = "+0300)";
@ -81,7 +81,7 @@ class DateUtils {
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
return differenceBetweenDateAndCurrent(date);
return differenceBetweenDateAndCurrent(date, context);
}
/// get month by
@ -216,5 +216,23 @@ class DateUtils {
return 12;
}
}
static String getAgeByBirthday(dynamic birthday, BuildContext context){
// https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now();
int years = now.year - birthDate .year;
int months = now.month - birthDate.month;
int days = now.day - birthDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$years ${TranslationBase.of(context).years} $months ${TranslationBase.of(context).months} $days ${TranslationBase.of(context).days}";
}
}

@ -117,6 +117,10 @@ class TranslationBase {
String get myReferredPatient =>
localizedValues['myReferredPatient'][locale.languageCode];
String get referredPatient =>
localizedValues['referredPatient'][locale.languageCode];
String get referredOn =>
localizedValues['referredOn'][locale.languageCode];
String get firstName => localizedValues['firstName'][locale.languageCode];
@ -1013,21 +1017,30 @@ class TranslationBase {
String get createdBy => localizedValues['createdBy'][locale.languageCode];
String get editedBy => localizedValues['editedBy'][locale.languageCode];
String get currentMedications =>
localizedValues['currentMedications'][locale.languageCode];
String get noItem => localizedValues['noItem'][locale.languageCode];
String get postUcafSuccessMsg =>
localizedValues['postUcafSuccessMsg'][locale.languageCode];
String get vitalSignDetailEmpty =>
localizedValues['vitalSignDetailEmpty'][locale.languageCode];
String get onlyOfftimeHoliday =>
localizedValues['onlyOfftimeHoliday'][locale.languageCode];
String get active => localizedValues['active'][locale.languageCode];
String get hold => localizedValues['hold'][locale.languageCode];
String get loading => localizedValues['loading'][locale.languageCode];
String get assessmentErrorMsg =>
localizedValues['assessmentErrorMsg'][locale.languageCode];
String get examinationErrorMsg =>
localizedValues['examinationErrorMsg'][locale.languageCode];
@ -1036,6 +1049,34 @@ class TranslationBase {
String get chiefComplaintErrorMsg =>
localizedValues['chiefComplaintErrorMsg'][locale.languageCode];
String get ICDName =>
localizedValues['ICDName'][locale.languageCode];
String get referralStatus =>
localizedValues['referralStatus'][locale.languageCode];
String get referralRemark =>
localizedValues['referralRemark'][locale.languageCode];
String get icd => localizedValues['icd'][locale.languageCode];
String get days => localizedValues['days'][locale.languageCode];
String get hr => localizedValues['hr'][locale.languageCode];
String get min => localizedValues['min'][locale.languageCode];
String get months => localizedValues['months'][locale.languageCode];
String get years => localizedValues['years'][locale.languageCode];
String get referralStatusHold => localizedValues['referralStatusHold'][locale.languageCode];
String get referralStatusActive => localizedValues['referralStatusActive'][locale.languageCode];
String get referralStatusCancelled => localizedValues['referralStatusCancelled'][locale.languageCode];
String get referralStatusCompleted => localizedValues['referralStatusCompleted'][locale.languageCode];
String get referralStatusNotSeen => localizedValues['referralStatusNotSeen'][locale.languageCode];
String get clinicSearch => localizedValues['clinicSearch'][locale.languageCode];
String get doctorSearch => localizedValues['doctorSearch'][locale.languageCode];
String get patientName =>
localizedValues['patient-name'][locale.languageCode];
String get appointmentNumber =>
localizedValues['appointmentNumber'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -340,14 +340,15 @@ class _LoginFormState extends State<LoginForm> {
projectIdController.text = projectsList[0]['facilityName'];
});
} else {
print(res);
// handel error
setState(() {
projectsList = ListProject;
});
// setState(() {
// projectsList = ListProject;
// });
}
}).catchError((err) {
setState(() {
projectsList = ListProject;
print(err);
});
print(err);
});
@ -386,6 +387,6 @@ class _LoginFormState extends State<LoginForm> {
getProjectsList(value);
}
}
_isInit = false;
//_isInit = false;
}
}

@ -4,15 +4,18 @@ import 'package:flutter/material.dart';
class PatientReferralItemWidget extends StatelessWidget {
final String patientName;
final String patientID;
final String referralStatus;
final isReferredTo;
final isSameBranch;
final String referralDoctorName;
final String clinicDescription;
final String remark;
final String referredOn;
final Widget infoIcon;
PatientReferralItemWidget({
PatientReferralItemWidget(
this.patientID, {
this.patientName,
this.referralStatus,
this.isReferredTo = false,
@ -20,6 +23,7 @@ class PatientReferralItemWidget extends StatelessWidget {
this.referralDoctorName,
this.clinicDescription,
this.remark,
this.referredOn,
this.infoIcon,
});
@ -35,27 +39,30 @@ class PatientReferralItemWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Center(
child: AppText(
"${patientName}",
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
if (referralStatus != null)
Container(
color: Color(0xFF4BA821),
padding: EdgeInsets.all(4),
child: AppText(
referralStatus
/*referralStatus == "46"
? TranslationBase.of(context).approved
: TranslationBase.of(context).rejected*/,
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Row(
children: [
AppText(
TranslationBase.of(context).referralStatus,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Container(
color: Color(0xFF4BA821),
padding: EdgeInsets.all(4),
child: AppText(
referralStatus
/*referralStatus == "46"
? TranslationBase.of(context).approved
: TranslationBase.of(context).rejected*/
,
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
],
),
SizedBox(
height: 8,
@ -66,7 +73,7 @@ class PatientReferralItemWidget extends StatelessWidget {
isReferredTo
? "${TranslationBase.of(context).referTo}: "
: "${TranslationBase.of(context).referredFrom}: ",
color: Colors.black,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
@ -74,8 +81,8 @@ class PatientReferralItemWidget extends StatelessWidget {
isSameBranch
? TranslationBase.of(context).sameBranch
: TranslationBase.of(context).otherBranch,
color: Colors.grey,
fontWeight: FontWeight.normal,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
@ -83,11 +90,26 @@ class PatientReferralItemWidget extends StatelessWidget {
SizedBox(
height: 8,
),
AppText(
"${TranslationBase.of(context).dr} $referralDoctorName",
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).referralDoctor} : ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Expanded(
child: AppText(
referralDoctorName != null
? "${TranslationBase.of(context).dr} $referralDoctorName"
: "-",
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
],
),
SizedBox(
height: 8,
@ -97,14 +119,14 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [
AppText(
"${TranslationBase.of(context).clinic}: ",
color: Colors.black,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
clinicDescription,
color: Colors.grey,
fontWeight: FontWeight.normal,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
@ -112,11 +134,78 @@ class PatientReferralItemWidget extends StatelessWidget {
SizedBox(
height: 8,
),
AppText(
remark,
color: Colors.grey,
fontWeight: FontWeight.normal,
fontSize: 12,
Row(
children: [
AppText(
"${TranslationBase.of(context).patientID}: ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
patientID ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 8,
),
Row(
children: [
AppText(
"${TranslationBase.of(context).patientName}: ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
patientName ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 8,
),
Row(
children: [
AppText(
TranslationBase.of(context).referralRemark,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
remark,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 8,
),
Row(
children: [
AppText(
TranslationBase.of(context).referredOn,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
referredOn ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 16,

@ -18,23 +18,7 @@ import './profile_medical_info_widget.dart';
class PatientProfileWidget extends StatelessWidget {
PatiantInformtion patient;
String getPatientAge(dynamic birthday){
// https://leechy.dev/calculate-dates-diff-in-dart
DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday);
final now = DateTime.now();
int years = now.year - birthDate .year;
int months = now.month - birthDate.month;
int days = now.day - birthDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$years Yr $months Mnth $days Day";
}
@override
Widget build(BuildContext context) {
@ -133,7 +117,7 @@ class PatientProfileWidget extends StatelessWidget {
height: 4,
),
AppText(
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${getPatientAge(patient.dateofBirth)/*patient.age*/}",
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth, context)/*patient.age*/}",
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
@ -313,7 +297,7 @@ class PatientProfileWidget extends StatelessWidget {
patient.createdOn != null
? DateUtils
.differenceBetweenServerDateAndCurrent(
patient.createdOn)
patient.createdOn, context)
: "",
color: Colors.black,
fontWeight: FontWeight.normal,

@ -8,7 +8,6 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -140,14 +139,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
icon: 'note.png'),
if (selectedPatientType != 0 && selectedPatientType != 5)
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ORDERS,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).list,
icon: 'radiology-1.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,

@ -120,13 +120,25 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Container(
width: MediaQuery.of(context).size.width * 0.6,
child: AppText(
selectedAllergy.remark ?? '',
fontSize: 10,
color: Colors.grey,
),
child: Row(
children: [
AppText(
selectedAllergy.remark != null ||
selectedAllergy.remark == ''
? TranslationBase.of(context).remarks + " : "
: '',
fontWeight: FontWeight.bold,
fontSize: 13,
),
Container(
width: MediaQuery.of(context).size.width * 0.55,
child: AppText(
selectedAllergy.remark ?? '',
fontSize: 10,
color: Colors.grey,
),
),
],
),
),
DividerWithSpacesAround()
@ -398,6 +410,8 @@ class _AddAllergiesState extends State<AddAllergies> {
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hasLabelText: remarkController.text != ''?true:false,
showLabelText: true,
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,

@ -267,19 +267,21 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase
.of(context)
hasLabelText: complaintsController.text != ''
? true
: false,
hintText: TranslationBase.of(context)
.addChiefComplaints,
fontSize: 13.5,
// hintColor: Colors.black,
showLabelText: true,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: complaintsController,
validator: (value) {
if (value == null || value == "")
return TranslationBase
.of(context)
return TranslationBase.of(context)
.emptyMessage;
else if (value.length < 25)
return TranslationBase
@ -296,6 +298,10 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: illnessController.text != ''
? true
: false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.historyOfPresentIllness,
@ -322,17 +328,23 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context)
hasLabelText: medicationController.text != ''
? true
: false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.currentMedications,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 2,
maxLines: 23,
minLines: 1,
controller: medicationController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;

@ -210,7 +210,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day.toString(),
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
Helpers.getMonth(assessment.createdOn !=null?DateTime.parse(assessment.createdOn).month:DateTime.now().month).toUpperCase(),
@ -225,6 +225,32 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).ICDName +" : ",
fontWeight: FontWeight
.bold,
fontSize: 13,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.29,
child: AppText(
assessment
.selectedICD.description
.toString(),
fontSize: 10,
color: Colors.grey,
),
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
@ -233,7 +259,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).appointmentNo,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
assessment
@ -248,15 +274,21 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).condition + " : ",
fontWeight: FontWeight
.bold,
fontSize: 13,
),
AppText(
projectViewModel.isArabic?assessment
.selectedDiagnosisCondition
.nameAr : assessment
.selectedDiagnosisCondition
.nameEn,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 10,
color: Colors.grey,
),
],
),
@ -268,7 +300,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).dType+' : ',
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
projectViewModel.isArabic?assessment
@ -290,7 +322,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
TranslationBase.of(context).doc,
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
AppText(
assessment.doctorName??'',
@ -309,11 +341,19 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
SizedBox(
height: 6,
),
AppText(
assessment.remark != null ||
assessment.remark == ''
? TranslationBase.of(context).remarks + " : "
: '',
fontWeight: FontWeight.bold,
fontSize: 13,
),
Container(
width: MediaQuery
.of(context)
.size
.width * 0.5,
.width * 0.38,
child: AppText(
assessment.remark ?? "",
fontSize: 10,
@ -335,7 +375,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
"ICD : ".toUpperCase(),
fontWeight: FontWeight
.bold,
fontSize: 16,
fontSize: 13,
),
Container(
child: AppText(
@ -520,7 +560,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
AppText(
TranslationBase.of(context).addAssessmentDetails.toUpperCase(),
fontWeight: FontWeight.bold,
fontSize: 16,
fontSize: 13,
),
SizedBox(
height: 16,
@ -529,9 +569,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hintText: "Appointment Number",
hintText: TranslationBase.of(context).appointmentNumber,
fontSize: 13.5,
// hintColor: Colors.black,
hasLabelText: appointmentIdController.text != ''?true:false,
showLabelText: true,
fontWeight: FontWeight.w600,
readOnly: true,
controller: appointmentIdController,
@ -695,6 +737,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
hasLabelText: remarkController.text != ''?true:false,
showLabelText: true,
controller: remarkController,
onChanged:(value) {
widget.mySelectedAssessment.remark = remarkController.text;

@ -319,6 +319,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
margin: EdgeInsets.only(
left: 0, right: 0, top: 15),
child: TextFields(
hasLabelText: remarksController.text != ''?true:false,
showLabelText: true,
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,

@ -137,6 +137,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase
.of(context)
.addProgressNote,
@ -361,6 +362,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields(
hasLabelText: progressNoteController.text != ''?true:false,
showLabelText: true,
hintText: TranslationBase.of(context).addProgressNote,
fontSize: 13.5,
// hintColor: Colors.black,

@ -74,7 +74,9 @@ class TextFields extends StatefulWidget {
this.autoValidate = false,
this.fillColor,
this.hintColor,
this.onTapTextFields})
this.hasBorder = true,
this.onTapTextFields,
this.hasLabelText = false, this.showLabelText= false})
: super(key: key);
final String hintText;
@ -111,6 +113,9 @@ class TextFields extends StatefulWidget {
final bool borderOnlyError;
final Color hintColor;
final Color fillColor;
final bool hasBorder;
final bool showLabelText;
bool hasLabelText;
@override
_TextFieldsState createState() => _TextFieldsState();
@ -208,93 +213,140 @@ class _TextFieldsState extends State<TextFields> {
offset: Offset(0.0, 13.0),
blurRadius: focus ? 34.0 : 12.0)
]),
child: TextFormField(
onTap: widget.onTapTextFields,
keyboardAppearance: Theme.of(context).brightness,
scrollPhysics: BouncingScrollPhysics(),
autovalidate: widget.autoValidate,
textCapitalization: widget.textCapitalization,
onFieldSubmitted: widget.inputAction == TextInputAction.next
? (widget.onSubmit != null
? widget.onSubmit
: (val) {
_focusNode.nextFocus();
})
: widget.onSubmit,
textInputAction: widget.inputAction,
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
initialValue: widget.initialValue,
onChanged: widget.onChanged,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,
controller: widget.controller,
keyboardType: widget.keyboardType,
readOnly: _determineReadOnly(),
obscureText: widget.type == "password" && !view ? true : false,
autofocus: widget.autoFocus ?? false,
validator: widget.validator,
onSaved: widget.onSaved,
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly,
_mobileFormatter,
]
: widget.inputFormatters,
decoration: InputDecoration(
counterText: "",
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor,
),
contentPadding: widget.padding != null
? widget.padding
: EdgeInsets.symmetric(
child: Column(
children: [
TextFormField(
onTap: widget.onTapTextFields,
keyboardAppearance: Theme.of(context).brightness,
scrollPhysics: BouncingScrollPhysics(),
autovalidate: widget.autoValidate,
textCapitalization: widget.textCapitalization,
onFieldSubmitted: widget.inputAction == TextInputAction.next
? (widget.onSubmit != null
? widget.onSubmit
: (val) {
_focusNode.nextFocus();
})
: widget.onSubmit,
textInputAction: widget.inputAction,
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
initialValue: widget.initialValue,
onChanged: (value){
if(widget.showLabelText) {
if((value== null || value =='' )) {
setState(() {
widget.hasLabelText = false;
});
}else{
setState(() {
widget.hasLabelText = true;
});
}
}
widget.onChanged(value);
} ,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,
controller: widget.controller,
keyboardType: widget.keyboardType,
readOnly: _determineReadOnly(),
obscureText: widget.type == "password" && !view ? true : false,
autofocus: widget.autoFocus ?? false,
validator: widget.validator,
onSaved: widget.onSaved,
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly,
_mobileFormatter,
]
: widget.inputFormatters,
decoration: InputDecoration(
labelText: widget.hasLabelText ? widget.hintText : null,
labelStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme
.of(context)
.hintColor,
),
counterText: "",
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme
.of(context)
.hintColor,
),
contentPadding: widget.padding != null
? widget.padding
: EdgeInsets.symmetric(
vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0,
horizontal: 16.0),
filled: true,
fillColor: widget.bare
? Colors.transparent
: Theme.of(context).backgroundColor,
suffixIcon: _buildSuffixIcon(),
prefixIcon: widget.prefixIcon,
errorStyle: TextStyle(
fontSize: 12.0,
fontWeight: widget.fontWeight,
height: widget.borderOnlyError ? 0.0 : null),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0),
filled: true,
fillColor: widget.bare
? Colors.transparent
: Theme
.of(context)
.backgroundColor,
suffixIcon: _buildSuffixIcon(),
prefixIcon: widget.prefixIcon,
errorStyle: TextStyle(
fontSize: 12.0,
fontWeight: widget.fontWeight,
height: widget.borderOnlyError ? 0.0 : null),
errorBorder: OutlineInputBorder(
borderSide: widget.hasBorder ? BorderSide(
color: Theme
.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0) : BorderSide(
color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder ? BorderRadius.circular(
widget.bare ? 0.0 : 8.0) : BorderRadius.circular(0.0),),
focusedErrorBorder: OutlineInputBorder(
borderSide: widget.hasBorder ? BorderSide(
color: Theme
.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0) : BorderSide(
color: Colors.transparent, width: 0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedBorder: OutlineInputBorder(
borderSide: widget.hasBorder ? BorderSide(
color: Colors.grey, width: 1.0) : BorderSide(
color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder ? BorderRadius.circular(
widget.bare ? 0.0 : 8.0) : BorderRadius.circular(0.0),),
disabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder ? BorderSide(
color: Colors.grey, width: 1.0) : BorderSide(
color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder ? BorderRadius.circular(
widget.bare ? 0.0 : 8.0) : BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder ? BorderSide(
color: Colors.grey, width: 1.0) : BorderSide(
color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder ? BorderRadius.circular(
widget.bare ? 0.0 : 8.0) : BorderRadius.circular(0.0),
),
),
),
),
],
),
));
}
}

@ -2,6 +2,8 @@ import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
class ListSelectDialog extends StatefulWidget {
@ -12,24 +14,32 @@ class ListSelectDialog extends StatefulWidget {
final Function(dynamic) okFunction;
dynamic selectedValue;
final Widget searchWidget;
final bool usingSearch;
final String hintSearchText;
ListSelectDialog(
{@required this.list,
@required this.attributeName,
@required this.attributeValueId,
@required this.okText,
@required this.okFunction,
this.searchWidget});
ListSelectDialog({
@required this.list,
@required this.attributeName,
@required this.attributeValueId,
@required this.okText,
@required this.okFunction,
this.searchWidget,
this.usingSearch = false,
this.hintSearchText,
});
@override
_ListSelectDialogState createState() => _ListSelectDialogState();
}
class _ListSelectDialogState extends State<ListSelectDialog> {
List<dynamic> items = List();
@override
void initState() {
super.initState();
widget.selectedValue = widget.selectedValue ?? widget.list[0];
items.addAll(widget.list);
super.initState();
}
@override
@ -47,8 +57,8 @@ class _ListSelectDialogState extends State<ListSelectDialog> {
Widget continueButton = FlatButton(
child: Text(this.widget.okText),
onPressed: () {
this.widget.okFunction(widget.selectedValue);
Navigator.of(context).pop();
this.widget.okFunction(widget.selectedValue);
});
// set up the AlertDialog
AlertDialog alert = AlertDialog(
@ -69,7 +79,21 @@ class _ListSelectDialogState extends State<ListSelectDialog> {
child: Column(
children: [
if (widget.searchWidget != null) widget.searchWidget,
...widget.list
if(widget.usingSearch)
Container(
height: MediaQuery.of(context).size.height * 0.070,
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
widget.hintSearchText ?? TranslationBase
.of(context)
.search, null, false, suffixIcon: Icon(Icons.search,)),
enabled: true,
keyboardType: TextInputType.text,
onChanged: (value) {
filterSearchResults(value);
},
)),
...items
.map((item) => RadioListTile(
title: Text("${item[widget.attributeName].toString()}"),
groupValue: widget.selectedValue[widget.attributeValueId]
@ -95,4 +119,27 @@ class _ListSelectDialogState extends State<ListSelectDialog> {
static closeAlertDialog(BuildContext context) {
Navigator.of(context).pop();
}
void filterSearchResults(String query) {
List<dynamic> dummySearchList = List();
dummySearchList.addAll(widget.list);
if (query.isNotEmpty) {
List<dynamic> dummyListData = List();
dummySearchList.forEach((item) {
if ("${item[widget.attributeName].toString()}".toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item);
}
});
setState(() {
items.clear();
items.addAll(dummyListData);
});
return;
} else {
setState(() {
items.clear();
items.addAll(widget.list);
});
}
}
}

@ -105,7 +105,7 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.13"
version: "1.11.0"
build_runner_core:
dependency: transitive
description:
@ -510,7 +510,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
version: "0.6.2"
json_annotation:
dependency: transitive
description:
@ -706,7 +706,7 @@ packages:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.2+4"
version: "4.3.3"
pub_semver:
dependency: transitive
description:
@ -776,7 +776,7 @@ packages:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+3"
version: "0.0.2+2"
shelf:
dependency: transitive
description:
@ -935,7 +935,7 @@ packages:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
win32:
dependency: transitive
description:

@ -62,8 +62,9 @@ dependencies:
#chart
fl_chart: ^0.12.1
#firebase
firebase_messaging: ^7.0.0
# Firebase
firebase_messaging: ^7.0.3
#GIF image
flutter_gifimage: ^1.0.1

Loading…
Cancel
Save