diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 51b33a46..fdd8f424 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -14,7 +14,8 @@ + android:roundIcon="@mipmap/ic_launcher_round" + android:label="Doctors app"> + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4b..11e35ed2 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..a032e3d4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..4d0b9bac Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 00000000..675dfb3a Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b79..13a8a4aa 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..12301f4a Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..bf0d6d1d Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d43914..caf1fc21 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d3ae924e Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..e7d996be Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d3..f0ba70b5 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..9133b963 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..9605dda8 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372ee..0fce1189 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..67f0120e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..de8b067e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..ab983282 --- /dev/null +++ b/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #ffffff + \ No newline at end of file diff --git a/assets/fonts/DoctorApp.ttf b/assets/fonts/DoctorApp.ttf index 0cf36646..09f49270 100644 Binary files a/assets/fonts/DoctorApp.ttf and b/assets/fonts/DoctorApp.ttf differ diff --git a/assets/images/DrAppEmblemAnimation_v2.gif b/assets/images/DrAppEmblemAnimation_v2.gif new file mode 100644 index 00000000..fd2248b5 Binary files /dev/null and b/assets/images/DrAppEmblemAnimation_v2.gif differ diff --git a/assets/images/HMG_logo.png b/assets/images/HMG_logo.png new file mode 100644 index 00000000..480ba15e Binary files /dev/null and b/assets/images/HMG_logo.png differ diff --git a/assets/images/habib-logo.png b/assets/images/habib-logo.png new file mode 100644 index 00000000..bcb6a42b Binary files /dev/null and b/assets/images/habib-logo.png differ diff --git a/assets/images/inpatient.png b/assets/images/inpatient.png new file mode 100644 index 00000000..7a715654 Binary files /dev/null and b/assets/images/inpatient.png differ diff --git a/assets/images/menu.png b/assets/images/menu.png new file mode 100644 index 00000000..e62a00e6 Binary files /dev/null and b/assets/images/menu.png differ diff --git a/assets/images/no-data.png b/assets/images/no-data.png new file mode 100644 index 00000000..4fd47e0f Binary files /dev/null and b/assets/images/no-data.png differ diff --git a/assets/images/patient/ic_ref_arrow_left.png b/assets/images/patient/ic_ref_arrow_left.png new file mode 100644 index 00000000..09e05ab2 Binary files /dev/null and b/assets/images/patient/ic_ref_arrow_left.png differ diff --git a/assets/images/patient/ic_ref_arrow_up.png b/assets/images/patient/ic_ref_arrow_up.png new file mode 100644 index 00000000..8294cfed Binary files /dev/null and b/assets/images/patient/ic_ref_arrow_up.png differ diff --git a/assets/images/patient/vital_signs/oxg.png b/assets/images/patient/vital_signs/oxg.png new file mode 100644 index 00000000..344344e5 Binary files /dev/null and b/assets/images/patient/vital_signs/oxg.png differ diff --git a/assets/images/patient/vital_signs/painScale.png b/assets/images/patient/vital_signs/painScale.png new file mode 100644 index 00000000..36b6b9f0 Binary files /dev/null and b/assets/images/patient/vital_signs/painScale.png differ diff --git a/assets/images/qr_code.png b/assets/images/qr_code.png index 775a30bd..71a9e895 100644 Binary files a/assets/images/qr_code.png and b/assets/images/qr_code.png differ diff --git a/assets/images/saudi-arabia-flag.png b/assets/images/saudi-arabia-flag.png new file mode 100644 index 00000000..932eb11a Binary files /dev/null and b/assets/images/saudi-arabia-flag.png differ diff --git a/assets/images/soundWaveAnimation.gif b/assets/images/soundWaveAnimation.gif new file mode 100644 index 00000000..730e27eb Binary files /dev/null and b/assets/images/soundWaveAnimation.gif differ diff --git a/assets/images/update_rocket_image.png b/assets/images/update_rocket_image.png new file mode 100644 index 00000000..539604d7 Binary files /dev/null and b/assets/images/update_rocket_image.png differ diff --git a/assets/images/usa-flag.png b/assets/images/usa-flag.png new file mode 100644 index 00000000..63c17641 Binary files /dev/null and b/assets/images/usa-flag.png differ diff --git a/assets/images/verification_faceid_lg_icon.png b/assets/images/verification_faceid_lg_icon.png deleted file mode 100644 index dc206911..00000000 Binary files a/assets/images/verification_faceid_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_fingerprint_lg_icon.png b/assets/images/verification_fingerprint_lg_icon.png deleted file mode 100644 index 559c0671..00000000 Binary files a/assets/images/verification_fingerprint_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_sms_lg_icon.png b/assets/images/verification_sms_lg_icon.png deleted file mode 100644 index 9c316230..00000000 Binary files a/assets/images/verification_sms_lg_icon.png and /dev/null differ diff --git a/assets/images/verification_whatsapp_lg_icon.png b/assets/images/verification_whatsapp_lg_icon.png deleted file mode 100644 index 115a2e6d..00000000 Binary files a/assets/images/verification_whatsapp_lg_icon.png and /dev/null differ diff --git a/assets/images/verify-face.png b/assets/images/verify-face.png new file mode 100644 index 00000000..58e1f4a6 Binary files /dev/null and b/assets/images/verify-face.png differ diff --git a/assets/images/verify-finger.png b/assets/images/verify-finger.png new file mode 100644 index 00000000..15d60b03 Binary files /dev/null and b/assets/images/verify-finger.png differ diff --git a/assets/images/verify-sms.png b/assets/images/verify-sms.png new file mode 100644 index 00000000..e265e1f9 Binary files /dev/null and b/assets/images/verify-sms.png differ diff --git a/assets/images/verify-whtsapp.png b/assets/images/verify-whtsapp.png new file mode 100644 index 00000000..9a79516c Binary files /dev/null and b/assets/images/verify-whtsapp.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fab..e83c3bf5 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1,128 @@ { - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" + "images":[ + { + "idiom":"iphone", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"iphone", + "size":"20x20", + "scale":"3x", + "filename":"Icon-App-20x20@3x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"3x", + "filename":"Icon-App-29x29@3x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"3x", + "filename":"Icon-App-40x40@3x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"2x", + "filename":"Icon-App-60x60@2x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"3x", + "filename":"Icon-App-60x60@3x.png" + }, + { + "idiom":"iphone", + "size":"76x76", + "scale":"2x", + "filename":"Icon-App-76x76@2x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"1x", + "filename":"Icon-App-20x20@1x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"1x", + "filename":"Icon-App-40x40@1x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"1x", + "filename":"Icon-App-76x76@1x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"2x", + "filename":"Icon-App-76x76@2x.png" + }, + { + "idiom":"ipad", + "size":"83.5x83.5", + "scale":"2x", + "filename":"Icon-App-83.5x83.5@2x.png" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "scale" : "1x", + "filename" : "ItunesArtwork@2x.png" + } + ], + "info":{ + "version":1, + "author":"easyappicon" } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } } diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf03..a506606c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd96..002322b4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b0..c4197e69 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde1211..61d2e737 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e7..3c9f4819 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc2306..5b6d4029 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd96..002322b4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8f..049de742 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b860..f47f5fa2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b860..f47f5fa2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d164..1f53454b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d3..9a3d0236 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41e..cbec330f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f585..832249a6 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png new file mode 100644 index 00000000..b51b90aa Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 171125d9..645c587b 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -27,7 +27,10 @@ NSFaceIDUsageDescription We are using it for authentication - + NSAppleMusicUsageDescription + ${PRODUCT_NAME} requires access to use voice command + + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/lib/UpdatePage.dart b/lib/UpdatePage.dart new file mode 100644 index 00000000..16284ed1 --- /dev/null +++ b/lib/UpdatePage.dart @@ -0,0 +1,69 @@ +import 'dart:io' show Platform; + +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import 'widgets/shared/buttons/secondary_button.dart'; + +class UpdatePage extends StatelessWidget { + final String message; + final String androidLink; + final String iosLink; + + const UpdatePage({Key key, this.message, this.androidLink, this.iosLink}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return SafeArea( + child: AppScaffold( + isShowAppBar: false, + backgroundColor: Colors.white, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/update_rocket_image.png', + width: double.maxFinite,fit: BoxFit.fill, + ), + Image.asset('assets/images/HMG_logo.png'), + SizedBox(height: 8,), + AppText( + TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17, + fontWeight: FontWeight.w600, + ), + SizedBox(height: 12,), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText(message??"Update the app",fontSize: 12,), + ) + ], + ), + ), + bottomSheet: Container( + height: 80, + child: Container( + // padding: const EdgeInsets.all(8.0), + margin: EdgeInsets.all(15), + child: SecondaryButton( + color: Colors.red[800], + onTap: () { + if (Platform.isIOS) + launch(iosLink); + else + launch(androidLink); + }, + label: TranslationBase.of(context).updateNow.toUpperCase(), + ), + ), + ), + ), + ); + } +} diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 77545340..7ae40b0a 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -6,10 +6,13 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; import 'dart:io' show Platform; +import '../UpdatePage.dart'; + DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = new Helpers(); //ProjectProvider projectsProvider = new ProjectProvider(); @@ -31,12 +34,11 @@ Helpers helpers = new Helpers(); * */ class BaseAppClient { //TODO change the post fun to nun static when you change all service - post( - String endPoint, { - Map body, - Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, - }) async { + post(String endPoint, + {Map body, + Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure, + bool isAllowAny = false}) async { String url = BASE_URL + endPoint; try { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); @@ -68,6 +70,7 @@ class BaseAppClient { body['LanguageID'] = 2; body['stamp'] = STAMP; + // if(!body.containsKey("IPAdress")) body['IPAdress'] = IP_ADDRESS; body['VersionID'] = VERSION_ID; body['Channel'] = CHANNEL; @@ -85,7 +88,8 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); - + var asd = json.encode(body); + var asd2; if (await Helpers.checkConnection()) { final response = await http.post(url, body: json.encode(body), @@ -95,15 +99,24 @@ class BaseAppClient { }); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { - onFailure('Error While Fetching data', statusCode); + onFailure(Helpers.generateContactAdminMsg(), statusCode); } else { var parsed = json.decode(response.body.toString()); + + if (parsed['ErrorType'] == 4) { + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], + parsed['AndroidLink'], parsed['IOSLink']); + } + if (!parsed['IsAuthenticated']) { if (body['OTP_SendType'] != null) { onFailure(getError(parsed), statusCode); - } else { - await helpers.logout(); - helpers.showErrorToast('Your session expired Please login agian'); + } else if (!isAllowAny) { + await Helpers.logout(); + Helpers.showErrorToast('Your session expired Please login agian'); + } + if (isAllowAny) { + onFailure(getError(parsed), statusCode); } } else if (parsed['MessageStatus'] == 1) { if (!parsed['IsAuthenticated']) @@ -148,7 +161,7 @@ class BaseAppClient { : SETUP_ID; } - body['VersionID'] = VERSION_ID; + body['VersionID'] = 6.3; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; @@ -211,6 +224,10 @@ class BaseAppClient { if (parsed['Response_Message'] != null) { onSuccess(parsed, statusCode); } else { + if (parsed['ErrorType'] == 4) { + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], + parsed['AndroidLink'], parsed['IOSLink']); + } if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { onSuccess(parsed, statusCode); @@ -291,7 +308,7 @@ class BaseAppClient { } } if (error == null || error == "null" || error == "null\n") { - return "This server not work probably in this time"; + return Helpers.generateContactAdminMsg(); } return error; } diff --git a/lib/config/config.dart b/lib/config/config.dart index 06768cbc..3d34fd7c 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -18,6 +18,10 @@ const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor"; const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; + +const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = + "Services/Doctors.svc/REST/SearchDoctorsByTime"; + const GET_CLINICS_FOR_DOCTOR = 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; const PATIENT_GET_LIST_REFERAL_URL = @@ -64,6 +68,8 @@ const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; +const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor'; + const ADD_REFERRED_DOCTOR_REMARKS = 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; @@ -121,7 +127,7 @@ const GET_DASHBOARD = const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; const ARRIVED_PATIENT_URL = - 'Services/DoctorApplication.svc/REST/PatientArrivalList​'; + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; @@ -146,6 +152,9 @@ const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; const GET_PATIENT_ARRIVAL_LIST = 'Services/DoctorApplication.svc/REST/PatientArrivalList'; +const Verify_Referral_Doctor_Remarks = + 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; + ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_SPECIAL_RESULT = @@ -229,11 +238,17 @@ const GET_BOX_QUANTITY = ///GET ECG const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; +const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; + +const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; + const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +const GET_IN_PATIENT_ORDERS = + 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; ///Prescriptions const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; @@ -246,6 +261,18 @@ const SEND_PRESCRIPTION_EMAIL = const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; +const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; +const CREATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; + +const GET_PRESCRIPTION_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; + +const GET_INSURANCE_IN_PATIENT = + "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; + +const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; var selectedPatientType = 1; @@ -271,8 +298,8 @@ var SERVICES_PATIANT2 = [ "patientArrivalList" ]; var SERVICES_PATIANT_HEADER = [ - "Search Out-Patient", - "Search In-Patient", + "My OutPatient", + "My InPatient", "Discharge", "Referred", "Referral Discharge", @@ -300,8 +327,8 @@ const PRIMARY_COLOR = 0xff515B5D; const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; -const IP_ADDRESS = '11.11.11.11'; -const VERSION_ID = 5.3; +const IP_ADDRESS = '9.9.9.9'; +const VERSION_ID = 5.9; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 9fa9c35c..2bfceb67 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -30,9 +30,12 @@ const Map> localizedValues = { 'ar': 'ملاحضات وتفاصيل العيادة' }, 'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'}, + 'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'}, + 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, 'patient': {'en': 'Patient', 'ar': ' مريض'}, + 'patients': {'en': "Patient's", 'ar': ' مريض'}, 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, 'lab': {'en': 'Lab', 'ar': 'المختبر'}, 'result': {'en': 'Result', 'ar': 'نتيجة'}, @@ -43,15 +46,15 @@ const Map> localizedValues = { 'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'}, 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'service': {'en': 'Service', 'ar': 'خدمة'}, - 'referral': {'en': 'Referral', 'ar': 'االإحالة'}, - 'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'}, + 'referral': {'en': 'Referral', 'ar': 'الإحالة'}, + 'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'}, 'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'}, 'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'}, 'myReferral': {'en': 'My Referral', 'ar': 'إحالة'}, - 'myReferredPatient': {'en': 'My Referred Patient', 'ar': 'مرضاي المحالين'}, + 'myReferredPatient': {'en': 'Referred', 'ar': 'المحالين'}, 'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'}, 'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'}, 'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'}, @@ -128,27 +131,27 @@ const Map> localizedValues = { 'description': {'en': 'Description', 'ar': 'الوصف'}, 'value': {'en': 'Value', 'ar': 'القيمة'}, 'range': {'en': 'Range', 'ar': 'النطاق'}, - 'enterId': {'en': 'Enter ID', 'ar': 'الهوية'}, + 'enterId': {'en': 'User ID', 'ar': 'معرف المستخدم'}, 'pleaseEnterYourID': { 'en': 'Please enter your ID', 'ar': 'الرجاء ادخال الهوية' }, - 'enterPassword': {'en': 'Enter Password', 'ar': 'الرقم السري'}, + 'enterPassword': {'en': 'Password', 'ar': 'كلمه السر'}, 'pleaseEnterPassword': { 'en': 'Please Enter Password', 'ar': 'الرجاء ادخال الرقم السري' }, - 'selectYourProject': {'en': 'Select Your Project', 'ar': 'اختر المستشفى'}, + 'selectYourProject': {'en': 'Branch', 'ar': 'فرع'}, 'pleaseEnterYourProject': { 'en': 'Please Enter Your Project', 'ar': 'الرجاء ادخال مستشفى' }, - 'login': {'en': 'LOGIN', 'ar': 'تسجيل دخول'}, + 'login': {'en': 'Login', 'ar': 'تسجيل دخول'}, 'drSulaimanAlHabib': {'en': 'Dr Sulaiman Al Habib', 'ar': 'د.سليمان الحبيب'}, 'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'}, 'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '}, 'home': {'en': 'Home', 'ar': 'الرئيسية'}, - 'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, + 'services': {'en': 'Services', 'ar': 'الخدمات'}, 'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'}, 'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'}, 'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'}, @@ -287,6 +290,7 @@ const Map> localizedValues = { 'room': {'en': 'ROOM:', 'ar': 'الغرفة'}, 'bed': {'en': 'BED:', 'ar': 'السرير'}, 'next': {'en': 'Next', 'ar': 'التالي'}, + 'previous': {'en': 'Previous', 'ar': 'السابق'}, 'healthRecordInformation': { 'en': 'HEALTH RECORD INFORMATION', 'ar': 'معلومات السجل الصحي' @@ -305,6 +309,7 @@ const Map> localizedValues = { 'en': "No sick leave available, apply Now", 'ar': 'لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن' }, + 'no-sickleve': {'en': "No sick leave available", 'ar': 'لا توجد إجازة مرضية'}, 'applynow': {'en': "Apply Now", 'ar': 'قدم الآن'}, 'add-sickleave': {'en': "ADD SICK LEAVE", 'ar': 'أضف إجازة مرضية'}, 'add': {'en': "Add", 'ar': 'أضف'}, @@ -332,7 +337,7 @@ const Map> localizedValues = { 'branch': {'en': "Branch", 'ar': 'الفرع'}, 'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'}, 'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'}, - 'refer': {'en': "REFER", 'ar': 'إحالة'}, + 'refer': {'en': "Refer", 'ar': 'إحالة'}, 'rejected': {'en': "Rejected", 'ar': 'مرفوض'}, 'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'}, 'otherBranch': {'en': "Other Branch", 'ar': 'فرع آخر'}, @@ -377,11 +382,15 @@ const Map> localizedValues = { 'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'}, 'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'}, 'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'}, - 'yourBodyMassIndex': {'en': "Your Body Mass Index is", 'ar': 'مؤشر كتلة جسمك هو'}, + 'yourBodyMassIndex': { + 'en': "Your Body Mass Index is", + 'ar': 'مؤشر كتلة جسمك هو' + }, 'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'}, 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'}, 'bmiObese': {'en': "Obese", 'ar': 'سمين'}, + 'bmiObeseExtreme': {'en': "Extreme Obese", 'ar': 'سمنة مفرطة'}, 'method': {'en': "Method", 'ar': 'الطريقة'}, 'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'}, 'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'}, @@ -430,6 +439,7 @@ const Map> localizedValues = { 'en': "Expected Admission Date", 'ar': 'تاريخ القبول المتوقع' }, + 'admissionDate': {'en': "Admission Date", 'ar': 'تاريخ القبول'}, // 'emergencyAdmission': {'en': "EMERGENCY ADMISSION", 'ar': 'دخول الطوارئ'}, 'isSickLeaveRequired': { 'en': "Is Sick Leave Required", @@ -512,7 +522,7 @@ const Map> localizedValues = { 'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"}, 'searchHistory': {'en': "Search History", 'ar': " البحث"}, 'addSelectedHistories': { - 'en': "add selected histories", + 'en': "Add Selected Histories", 'ar': " اضافه تاريخ مرضي" }, 'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"}, @@ -567,11 +577,14 @@ const Map> localizedValues = { "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات" }, "register-user": {"en": "Register", "ar": "تسجيل"}, - "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, - "verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"}, - "verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"}, - "verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"}, - "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"}, + "verify-with-fingerprint": {"en": "Verify through Fingerprint", "ar": "بصمة"}, + "verify-with-faceid": {"en": "Verify through Face ID", "ar": "معرف الوجه"}, + "verify-with-sms": {"en": "Verify through SMS", "ar": "الرسائل القصيرة"}, + "verify-with-whatsapp": {"en": "Verify through WhatsApp", "ar": " الواتس اب"}, + "last-login": { + "en": "Last login details:", + "ar": "تفاصيل تسجيل الدخول الأخير:" + }, "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, "verify-fingerprint": { "en": @@ -587,11 +600,11 @@ const Map> localizedValues = { "en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال" }, - 'addAssessment': {'en': "Add ASSESSMENT", 'ar': "أضف التقييم"}, - 'assessment': {'en': "ASSESSMENT", 'ar': " التقييم"}, + 'addAssessment': {'en': "Add Assessment", 'ar': "أضف التقييم"}, + 'assessment': {'en': "Assessment", 'ar': " التقييم"}, 'physicalSystemExamination': { - 'en': "Physical/System Examination", - 'ar': " الفحص البدني / النظام" + 'en': "Physical System / Examination", + 'ar': "الفحص البدني / النظام" }, 'searchExamination': {'en': "Search Examination", 'ar': "فحص البحث"}, 'addExamination': {'en': "Add Examination", 'ar': "اضافه"}, @@ -705,7 +718,7 @@ const Map> localizedValues = { 'ar': " : استجابة الإحالة" }, 'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"}, - 'diagnosisDetail': {'en': "Diagnosis Detail : ", 'ar': "تفاصيل التشخيص"}, + 'diagnosisDetail': {'en': "Diagnosis Details", 'ar': "تفاصيل التشخيص"}, 'referralSuccessMsgAccept': { 'en': "Referral Accepted Successfully", 'ar': "تم قبول الإحالة بنجاح" @@ -816,4 +829,38 @@ const Map> localizedValues = { "en": "Extend Sick Leave Request", "ar": "تمديد طلب الإجازة المرضية" }, + "accepted": {"en": "Accepted", "ar": "وافقت"}, + "cancelled": {"en": "Cancelled", "ar": "ألغيت"}, + "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, + "searchHere": {"en": "Search here", "ar": "إبحث هنا"}, + "replied": {"en": "Replied", "ar": " تم الرد"}, + "typeHereToReply": {"en": "Type here to reply", "ar": "اكتب هنا للرد"}, + "remove": {"en": "Remove", "ar": "حذف"}, + "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, + "newSchedule": {"en": "New Schedule", "ar": "جدول جديد"}, + "enter_credentials": { + "en": "Enter the user credentials below", + "ar": "أدخل بيانات اعتماد المستخدم أدناه" + }, + "step": {"en": "Step", "ar": "خطوة"}, + "fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"}, + "applyOrRescheduleLeave": { + "en": "Apply Reschedule Leave", + "ar": "التقدم بطلب أو إعادة جدولة الإجازة" + }, + "myQRCode": {"en": "My QR Code", "ar": "My QR Code"}, + "patientIDMobilenational": { + "en": "Patient ID, National ID, Mobile Number", + "ar": "هوية المريض ، الهوية الوطنية ، رقم الهاتف المحمول" + }, + "updateNow": {"en": "Update Now", "ar": "تحديث الان"}, + "updateTheApp": {"en": "Update The App", "ar": "تحديث التطبيق"}, + "admission-date": {"en": "Admission Date", "ar": "تاريخ القبول"}, + "noOfDays": {"en": "No of days", "ar": "عدد الأيام"}, + "numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"}, + "replayBefore": {"en": "Replay Before", "ar": "رد قبل"}, + "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'}, + "refClinic": {"en": "Ref Clinic", "ar": "Ref Clinic"}, + "acknowledged": {"en": "Acknowledged", "ar": "إقرار"}, + "showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"}, }; diff --git a/lib/core/insurance_approval_request_model.dart b/lib/core/insurance_approval_request_model.dart new file mode 100644 index 00000000..02f71ecb --- /dev/null +++ b/lib/core/insurance_approval_request_model.dart @@ -0,0 +1,64 @@ +class InsuranceApprovalInPatientRequestModel { + int patientID; + int patientTypeID; + int eXuldAPPNO; + int projectID; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + + InsuranceApprovalInPatientRequestModel( + {this.patientID, + this.patientTypeID, + this.eXuldAPPNO, + this.projectID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); + + InsuranceApprovalInPatientRequestModel.fromJson(Map json) { + patientID = json['PatientID']; + patientTypeID = json['PatientTypeID']; + eXuldAPPNO = json['EXuldAPPNO']; + projectID = json['ProjectID']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['PatientTypeID'] = this.patientTypeID; + data['EXuldAPPNO'] = this.eXuldAPPNO; + data['ProjectID'] = this.projectID; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} diff --git a/lib/core/model/DischargeReferralPatient.dart b/lib/core/model/DischargeReferralPatient.dart new file mode 100644 index 00000000..523d8d0a --- /dev/null +++ b/lib/core/model/DischargeReferralPatient.dart @@ -0,0 +1,218 @@ +import 'package:doctor_app_flutter/util/date-utils.dart'; + +class DischargeReferralPatient { + dynamic rowID; + int projectID; + int lineItemNo; + int doctorID; + int patientID; + String doctorName; + dynamic doctorNameN; + String firstName; + String middleName; + String lastName; + dynamic firstNameN; + dynamic middleNameN; + dynamic lastNameN; + int gender; + String dateofBirth; + String mobileNumber; + String emailAddress; + String patientIdentificationNo; + int patientType; + String admissionNo; + String admissionDate; + String roomID; + String bedID; + dynamic nursingStationID; + dynamic description; + String nationalityName; + dynamic nationalityNameN; + int referralDoctor; + int referringDoctor; + int referralClinic; + int referringClinic; + int referralStatus; + DateTime referralDate; + String referringDoctorRemarks; + String referredDoctorRemarks; + String referralResponseOn; + int priority; + int frequency; + String mAXResponseTime; + String dischargeDate; + dynamic clinicID; + String age; + String clinicDescription; + String frequencyDescription; + String genderDescription; + bool isDoctorLate; + bool isDoctorResponse; + String nursingStationName; + String priorityDescription; + String referringClinicDescription; + String referringDoctorName; + + DischargeReferralPatient( + {this.rowID, + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.dischargeDate, + this.clinicID, + this.age, + this.clinicDescription, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName}); + + DischargeReferralPatient.fromJson(Map json) { + rowID = json['RowID']; + projectID = json['ProjectID']; + lineItemNo = json['LineItemNo']; + doctorID = json['DoctorID']; + patientID = json['PatientID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + mobileNumber = json['MobileNumber']; + emailAddress = json['EmailAddress']; + patientIdentificationNo = json['PatientIdentificationNo']; + patientType = json['PatientType']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + roomID = json['RoomID']; + bedID = json['BedID']; + nursingStationID = json['NursingStationID']; + description = json['Description']; + nationalityName = json['NationalityName']; + nationalityNameN = json['NationalityNameN']; + referralDoctor = json['ReferralDoctor']; + referringDoctor = json['ReferringDoctor']; + referralClinic = json['ReferralClinic']; + referringClinic = json['ReferringClinic']; + referralStatus = json['ReferralStatus']; + referralDate = DateUtils.convertStringToDate(json['ReferralDate']); + referringDoctorRemarks = json['ReferringDoctorRemarks']; + referredDoctorRemarks = json['ReferredDoctorRemarks']; + referralResponseOn = json['ReferralResponseOn']; + priority = json['Priority']; + frequency = json['Frequency']; + mAXResponseTime = json['MAXResponseTime']; + dischargeDate = json['DischargeDate']; + clinicID = json['ClinicID']; + age = json['Age']; + clinicDescription = json['ClinicDescription']; + frequencyDescription = json['FrequencyDescription']; + genderDescription = json['GenderDescription']; + isDoctorLate = json['IsDoctorLate']; + isDoctorResponse = json['IsDoctorResponse']; + nursingStationName = json['NursingStationName']; + priorityDescription = json['PriorityDescription']; + referringClinicDescription = json['ReferringClinicDescription']; + referringDoctorName = json['ReferringDoctorName']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ProjectID'] = this.projectID; + data['LineItemNo'] = this.lineItemNo; + data['DoctorID'] = this.doctorID; + data['PatientID'] = this.patientID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['MobileNumber'] = this.mobileNumber; + data['EmailAddress'] = this.emailAddress; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['PatientType'] = this.patientType; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['NursingStationID'] = this.nursingStationID; + data['Description'] = this.description; + data['NationalityName'] = this.nationalityName; + data['NationalityNameN'] = this.nationalityNameN; + data['ReferralDoctor'] = this.referralDoctor; + data['ReferringDoctor'] = this.referringDoctor; + data['ReferralClinic'] = this.referralClinic; + data['ReferringClinic'] = this.referringClinic; + data['ReferralStatus'] = this.referralStatus; + data['ReferralDate'] = this.referralDate; + data['ReferringDoctorRemarks'] = this.referringDoctorRemarks; + data['ReferredDoctorRemarks'] = this.referredDoctorRemarks; + data['ReferralResponseOn'] = this.referralResponseOn; + data['Priority'] = this.priority; + data['Frequency'] = this.frequency; + data['MAXResponseTime'] = this.mAXResponseTime; + data['DischargeDate'] = this.dischargeDate; + data['ClinicID'] = this.clinicID; + data['Age'] = this.age; + data['ClinicDescription'] = this.clinicDescription; + data['FrequencyDescription'] = this.frequencyDescription; + data['GenderDescription'] = this.genderDescription; + data['IsDoctorLate'] = this.isDoctorLate; + data['IsDoctorResponse'] = this.isDoctorResponse; + data['NursingStationName'] = this.nursingStationName; + data['PriorityDescription'] = this.priorityDescription; + data['ReferringClinicDescription'] = this.referringClinicDescription; + data['ReferringDoctorName'] = this.referringDoctorName; + return data; + } +} diff --git a/lib/core/model/MyReferralPatientModel.dart b/lib/core/model/MyReferralPatientModel.dart new file mode 100644 index 00000000..f2c9c425 --- /dev/null +++ b/lib/core/model/MyReferralPatientModel.dart @@ -0,0 +1,258 @@ +import 'package:doctor_app_flutter/util/date-utils.dart'; + +class MyReferralPatientModel { + dynamic rowID; + int projectID; + int lineItemNo; + int doctorID; + int patientID; + String doctorName; + dynamic doctorNameN; + String firstName; + String middleName; + String lastName; + dynamic firstNameN; + dynamic middleNameN; + dynamic lastNameN; + int gender; + String dateofBirth; + String mobileNumber; + String emailAddress; + String patientIdentificationNo; + int patientType; + String admissionNo; + String admissionDate; + String roomID; + String bedID; + dynamic nursingStationID; + dynamic description; + String nationalityName; + dynamic nationalityNameN; + String clinicDescription; + String clinicDescriptionN; + int referralDoctor; + int referringDoctor; + int referralClinic; + int referringClinic; + int referralStatus; + DateTime referralDate; + String referringDoctorRemarks; + String referredDoctorRemarks; + String referralResponseOn; + int priority; + int frequency; + String mAXResponseTime; + int episodeID; + int appointmentNo; + String appointmentDate; + int appointmentType; + int patientMRN; + String createdOn; + int clinicID; + String nationalityID; + String age; + String doctorImageURL; + String frequencyDescription; + String genderDescription; + bool isDoctorLate; + bool isDoctorResponse; + String nationalityFlagURL; + String nursingStationName; + String priorityDescription; + String referringClinicDescription; + String referringDoctorName; + + MyReferralPatientModel( + {this.rowID, + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.episodeID, + this.appointmentNo, + this.appointmentDate, + this.appointmentType, + this.patientMRN, + this.createdOn, + this.clinicID, + this.nationalityID, + this.age, + this.doctorImageURL, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nationalityFlagURL, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName}); + + MyReferralPatientModel.fromJson(Map json) { + rowID = json['RowID']; + projectID = json['ProjectID']; + lineItemNo = json['LineItemNo']; + doctorID = json['DoctorID']; + patientID = json['PatientID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + mobileNumber = json['MobileNumber']; + emailAddress = json['EmailAddress']; + patientIdentificationNo = json['PatientIdentificationNo']; + patientType = json['PatientType']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + roomID = json['RoomID']; + bedID = json['BedID']; + nursingStationID = json['NursingStationID']; + description = json['Description']; + nationalityName = json['NationalityName']; + nationalityNameN = json['NationalityNameN']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + referralDoctor = json['ReferralDoctor']; + referringDoctor = json['ReferringDoctor']; + referralClinic = json['ReferralClinic']; + referringClinic = json['ReferringClinic']; + referralStatus = json['ReferralStatus']; + referralDate = DateUtils.convertStringToDate(json['ReferralDate']); + referringDoctorRemarks = json['ReferringDoctorRemarks']; + referredDoctorRemarks = json['ReferredDoctorRemarks']; + referralResponseOn = json['ReferralResponseOn']; + priority = json['Priority']; + frequency = json['Frequency']; + mAXResponseTime = json['MAXResponseTime']; + episodeID = json['EpisodeID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentType = json['AppointmentType']; + patientMRN = json['PatientMRN']; + createdOn = json['CreatedOn']; + clinicID = json['ClinicID']; + nationalityID = json['NationalityID']; + age = json['Age']; + doctorImageURL = json['DoctorImageURL']; + frequencyDescription = json['FrequencyDescription']; + genderDescription = json['GenderDescription']; + isDoctorLate = json['IsDoctorLate']; + isDoctorResponse = json['IsDoctorResponse']; + nationalityFlagURL = json['NationalityFlagURL']; + nursingStationName = json['NursingStationName']; + priorityDescription = json['PriorityDescription']; + referringClinicDescription = json['ReferringClinicDescription']; + referringDoctorName = json['ReferringDoctorName']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ProjectID'] = this.projectID; + data['LineItemNo'] = this.lineItemNo; + data['DoctorID'] = this.doctorID; + data['PatientID'] = this.patientID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['MobileNumber'] = this.mobileNumber; + data['EmailAddress'] = this.emailAddress; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['PatientType'] = this.patientType; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['NursingStationID'] = this.nursingStationID; + data['Description'] = this.description; + data['NationalityName'] = this.nationalityName; + data['NationalityNameN'] = this.nationalityNameN; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['ReferralDoctor'] = this.referralDoctor; + data['ReferringDoctor'] = this.referringDoctor; + data['ReferralClinic'] = this.referralClinic; + data['ReferringClinic'] = this.referringClinic; + data['ReferralStatus'] = this.referralStatus; + data['ReferralDate'] = this.referralDate; + data['ReferringDoctorRemarks'] = this.referringDoctorRemarks; + data['ReferredDoctorRemarks'] = this.referredDoctorRemarks; + data['ReferralResponseOn'] = this.referralResponseOn; + data['Priority'] = this.priority; + data['Frequency'] = this.frequency; + data['MAXResponseTime'] = this.mAXResponseTime; + data['EpisodeID'] = this.episodeID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentType'] = this.appointmentType; + data['PatientMRN'] = this.patientMRN; + data['CreatedOn'] = this.createdOn; + data['ClinicID'] = this.clinicID; + data['NationalityID'] = this.nationalityID; + data['Age'] = this.age; + data['DoctorImageURL'] = this.doctorImageURL; + data['FrequencyDescription'] = this.frequencyDescription; + data['GenderDescription'] = this.genderDescription; + data['IsDoctorLate'] = this.isDoctorLate; + data['IsDoctorResponse'] = this.isDoctorResponse; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NursingStationName'] = this.nursingStationName; + data['PriorityDescription'] = this.priorityDescription; + data['ReferringClinicDescription'] = this.referringClinicDescription; + data['ReferringDoctorName'] = this.referringDoctorName; + return data; + } + + get patientName { + return this.firstName+" "+this.lastName; + } +} diff --git a/lib/core/model/Prescriptions/in_patient_prescription_model.dart b/lib/core/model/Prescriptions/in_patient_prescription_model.dart new file mode 100644 index 00000000..f6e88bf7 --- /dev/null +++ b/lib/core/model/Prescriptions/in_patient_prescription_model.dart @@ -0,0 +1,26 @@ +class InPatientPrescriptionRequestModel { + String vidaAuthTokenID; + dynamic patientMRN; + dynamic appNo; + dynamic admissionNo; + + InPatientPrescriptionRequestModel( + {this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo}); + + InPatientPrescriptionRequestModel.fromJson(Map json) { + vidaAuthTokenID = json['VidaAuthTokenID']; + patientMRN = json['PatientID']; + appNo = json['AppointmentNo']; + admissionNo = json['AdmissionNo']; + } + + Map toJson() { + final Map data = new Map(); + data['VidaAuthTokenID'] = this.vidaAuthTokenID; + data['PatientID'] = this.patientMRN; + data['AppointmentNo'] = this.appNo; + data['AdmissionNo'] = this.admissionNo; + + return data; + } +} diff --git a/lib/core/model/Prescriptions/prescription_in_patient.dart b/lib/core/model/Prescriptions/prescription_in_patient.dart new file mode 100644 index 00000000..c66bc8a4 --- /dev/null +++ b/lib/core/model/Prescriptions/prescription_in_patient.dart @@ -0,0 +1,200 @@ +class PrescriotionInPatient { + int admissionNo; + int authorizedBy; + dynamic bedNo; + String comments; + int createdBy; + String createdByName; + dynamic createdByNameN; + String createdOn; + String direction; + int directionID; + dynamic directionN; + String dose; + int editedBy; + dynamic iVDiluentLine; + int iVDiluentType; + dynamic iVDiluentVolume; + dynamic iVRate; + dynamic iVStability; + String itemDescription; + int itemID; + int lineItemNo; + int locationId; + int noOfDoses; + int orderNo; + int patientID; + String pharmacyRemarks; + String prescriptionDatetime; + int prescriptionNo; + String processedBy; + int projectID; + int refillID; + String refillType; + dynamic refillTypeN; + int reviewedPharmacist; + dynamic roomId; + String route; + int routeId; + dynamic routeN; + dynamic setupID; + String startDatetime; + int status; + String statusDescription; + dynamic statusDescriptionN; + String stopDatetime; + int unitofMeasurement; + String unitofMeasurementDescription; + dynamic unitofMeasurementDescriptionN; + + PrescriotionInPatient( + {this.admissionNo, + this.authorizedBy, + this.bedNo, + this.comments, + this.createdBy, + this.createdByName, + this.createdByNameN, + this.createdOn, + this.direction, + this.directionID, + this.directionN, + this.dose, + this.editedBy, + this.iVDiluentLine, + this.iVDiluentType, + this.iVDiluentVolume, + this.iVRate, + this.iVStability, + this.itemDescription, + this.itemID, + this.lineItemNo, + this.locationId, + this.noOfDoses, + this.orderNo, + this.patientID, + this.pharmacyRemarks, + this.prescriptionDatetime, + this.prescriptionNo, + this.processedBy, + this.projectID, + this.refillID, + this.refillType, + this.refillTypeN, + this.reviewedPharmacist, + this.roomId, + this.route, + this.routeId, + this.routeN, + this.setupID, + this.startDatetime, + this.status, + this.statusDescription, + this.statusDescriptionN, + this.stopDatetime, + this.unitofMeasurement, + this.unitofMeasurementDescription, + this.unitofMeasurementDescriptionN}); + + PrescriotionInPatient.fromJson(Map json) { + admissionNo = json['AdmissionNo']; + authorizedBy = json['AuthorizedBy']; + bedNo = json['BedNo']; + comments = json['Comments']; + createdBy = json['CreatedBy']; + createdByName = json['CreatedByName']; + createdByNameN = json['CreatedByNameN']; + createdOn = json['CreatedOn']; + direction = json['Direction']; + directionID = json['DirectionID']; + directionN = json['DirectionN']; + dose = json['Dose']; + editedBy = json['EditedBy']; + iVDiluentLine = json['IVDiluentLine']; + iVDiluentType = json['IVDiluentType']; + iVDiluentVolume = json['IVDiluentVolume']; + iVRate = json['IVRate']; + iVStability = json['IVStability']; + itemDescription = json['ItemDescription']; + itemID = json['ItemID']; + lineItemNo = json['LineItemNo']; + locationId = json['LocationId']; + noOfDoses = json['NoOfDoses']; + orderNo = json['OrderNo']; + patientID = json['PatientID']; + pharmacyRemarks = json['PharmacyRemarks']; + prescriptionDatetime = json['PrescriptionDatetime']; + prescriptionNo = json['PrescriptionNo']; + processedBy = json['ProcessedBy']; + projectID = json['ProjectID']; + refillID = json['RefillID']; + refillType = json['RefillType']; + refillTypeN = json['RefillTypeN']; + reviewedPharmacist = json['ReviewedPharmacist']; + roomId = json['RoomId']; + route = json['Route']; + routeId = json['RouteId']; + routeN = json['RouteN']; + setupID = json['SetupID']; + startDatetime = json['StartDatetime']; + status = json['Status']; + statusDescription = json['StatusDescription']; + statusDescriptionN = json['StatusDescriptionN']; + stopDatetime = json['StopDatetime']; + unitofMeasurement = json['UnitofMeasurement']; + unitofMeasurementDescription = json['UnitofMeasurementDescription']; + unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['AdmissionNo'] = this.admissionNo; + data['AuthorizedBy'] = this.authorizedBy; + data['BedNo'] = this.bedNo; + data['Comments'] = this.comments; + data['CreatedBy'] = this.createdBy; + data['CreatedByName'] = this.createdByName; + data['CreatedByNameN'] = this.createdByNameN; + data['CreatedOn'] = this.createdOn; + data['Direction'] = this.direction; + data['DirectionID'] = this.directionID; + data['DirectionN'] = this.directionN; + data['Dose'] = this.dose; + data['EditedBy'] = this.editedBy; + data['IVDiluentLine'] = this.iVDiluentLine; + data['IVDiluentType'] = this.iVDiluentType; + data['IVDiluentVolume'] = this.iVDiluentVolume; + data['IVRate'] = this.iVRate; + data['IVStability'] = this.iVStability; + data['ItemDescription'] = this.itemDescription; + data['ItemID'] = this.itemID; + data['LineItemNo'] = this.lineItemNo; + data['LocationId'] = this.locationId; + data['NoOfDoses'] = this.noOfDoses; + data['OrderNo'] = this.orderNo; + data['PatientID'] = this.patientID; + data['PharmacyRemarks'] = this.pharmacyRemarks; + data['PrescriptionDatetime'] = this.prescriptionDatetime; + data['PrescriptionNo'] = this.prescriptionNo; + data['ProcessedBy'] = this.processedBy; + data['ProjectID'] = this.projectID; + data['RefillID'] = this.refillID; + data['RefillType'] = this.refillType; + data['RefillTypeN'] = this.refillTypeN; + data['ReviewedPharmacist'] = this.reviewedPharmacist; + data['RoomId'] = this.roomId; + data['Route'] = this.route; + data['RouteId'] = this.routeId; + data['RouteN'] = this.routeN; + data['SetupID'] = this.setupID; + data['StartDatetime'] = this.startDatetime; + data['Status'] = this.status; + data['StatusDescription'] = this.statusDescription; + data['StatusDescriptionN'] = this.statusDescriptionN; + data['StopDatetime'] = this.stopDatetime; + data['UnitofMeasurement'] = this.unitofMeasurement; + data['UnitofMeasurementDescription'] = this.unitofMeasurementDescription; + data['UnitofMeasurementDescriptionN'] = this.unitofMeasurementDescriptionN; + return data; + } +} diff --git a/lib/core/model/ReferralRequest.dart b/lib/core/model/ReferralRequest.dart new file mode 100644 index 00000000..b3ad1f03 --- /dev/null +++ b/lib/core/model/ReferralRequest.dart @@ -0,0 +1,108 @@ +class ReferralRequest { + String roomID; + String referralClinic; + String referralDoctor; + int createdBy; + int editedBy; + int patientID; + int patientTypeID; + int referringClinic; + int referringDoctor; + int projectID; + int admissionNo; + String referringDoctorRemarks; + String priority; + String frequency; + String extension; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + + ReferralRequest( + {this.roomID, + this.referralClinic, + this.referralDoctor, + this.createdBy, + this.editedBy, + this.patientID, + this.patientTypeID, + this.referringClinic, + this.referringDoctor, + this.projectID, + this.admissionNo, + this.referringDoctorRemarks, + this.priority, + this.frequency, + this.extension, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); + + ReferralRequest.fromJson(Map json) { + roomID = json['RoomID']; + referralClinic = json['ReferralClinic']; + referralDoctor = json['ReferralDoctor']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + patientID = json['PatientID']; + patientTypeID = json['PatientTypeID']; + referringClinic = json['ReferringClinic']; + referringDoctor = json['ReferringDoctor']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + referringDoctorRemarks = json['ReferringDoctorRemarks']; + priority = json['Priority']; + frequency = json['Frequency']; + extension = json['Extension']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['RoomID'] = this.roomID; + data['ReferralClinic'] = this.referralClinic; + data['ReferralDoctor'] = this.referralDoctor; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + data['PatientID'] = this.patientID; + data['PatientTypeID'] = this.patientTypeID; + data['ReferringClinic'] = this.referringClinic; + data['ReferringDoctor'] = this.referringDoctor; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['ReferringDoctorRemarks'] = this.referringDoctorRemarks; + data['Priority'] = this.priority; + data['Frequency'] = this.frequency; + data['Extension'] = this.extension; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} diff --git a/lib/core/model/insurance_approval.dart b/lib/core/model/insurance_approval.dart index 894fad46..a3717c42 100644 --- a/lib/core/model/insurance_approval.dart +++ b/lib/core/model/insurance_approval.dart @@ -1,27 +1,41 @@ -class InsuranceApprovalDetails { +class ApporvalDetails { + int approvalNo; + String procedureName; + //String procedureNameN; String status; + String isInvoicedDesc; - InsuranceApprovalDetails({ - this.procedureName, - this.status, - this.isInvoicedDesc, - }); + ApporvalDetails( + {this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc}); - InsuranceApprovalDetails.fromJson(Map json) { - try { - isInvoicedDesc = json['IsInvoicedDesc']; - status = json['Status']; - procedureName = json['ProcedureName']; - } catch (e) { - print(e); - } + ApporvalDetails.fromJson(Map json) { + approvalNo = json['ApprovalNo']; + + procedureName = json['ProcedureName']; + + status = json['Status']; + + isInvoicedDesc = json['IsInvoicedDesc']; + } + + Map toJson() { + final Map data = new Map(); + + data['ApprovalNo'] = this.approvalNo; + + data['ProcedureName'] = this.procedureName; + + data['Status'] = this.status; + + data['IsInvoicedDesc'] = this.isInvoicedDesc; + return data; } } class InsuranceApprovalModel { - InsuranceApprovalDetails approvalDetails; + List apporvalDetails; double versionID; int channel; int languageID; @@ -43,6 +57,8 @@ class InsuranceApprovalModel { int approvalNo; String approvalStatusDescption; int unUsedCount; + String doctorImage; + String projectName; //String companyName; String expiryDate; @@ -74,10 +90,12 @@ class InsuranceApprovalModel { //this.companyName, this.expiryDate, this.rceiptOn, - this.approvalDetails, - this.appointmentNo}); + this.apporvalDetails, + this.appointmentNo, + this.doctorImage, + this.projectName}); - InsuranceApprovalDetails x = InsuranceApprovalDetails(); + //InsuranceApprovalDetails x = InsuranceApprovalDetails(); InsuranceApprovalModel.fromJson(Map json) { try { @@ -99,14 +117,20 @@ class InsuranceApprovalModel { deviceTypeID = json['DeviceTypeID']; patientID = json['PatientID']; tokenID = json['TokenID']; + projectName = json['ProjectName']; patientTypeID = json['PatientTypeID']; patientType = json['PatientType']; eXuldAPPNO = json['EXuldAPPNO']; projectID = json['ProjectID']; doctorName = json['DoctorName']; + doctorImage = json['DoctorImageURL']; clinicName = json['ClinicName']; - approvalDetails = - InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]); + if (json['ApporvalDetails'] != null) { + apporvalDetails = new List(); + json['ApporvalDetails'].forEach((v) { + apporvalDetails.add(new ApporvalDetails.fromJson(v)); + }); + } appointmentNo = json['AppointmentNo']; } catch (e) { print(e); @@ -126,6 +150,9 @@ class InsuranceApprovalModel { data['DeviceTypeID'] = this.deviceTypeID; data['PatientID'] = this.patientID; data['TokenID'] = this.tokenID; + data['DoctorImageURL'] = this.doctorImage; + data['ProjectName'] = this.projectName; + data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; if (appointmentNo == null) { @@ -138,3 +165,320 @@ class InsuranceApprovalModel { return data; } } + +// class InsuranceApprovalModel { +// String setupID; +// int projectID; +// int approvalNo; +// String approvalDate; +// int patientType; +// int patientID; +// int companyID; +// int subCategoryID; +// int doctorID; +// int clinicID; +// int approvalType; +// Null inpatientApprovalSubType; +// String validFrom; +// Null vaildDays; +// String validTo; +// Null isApprovalOnGross; +// Null isPackage; +// int requestedAmount; +// bool isDentalAllowedBackend; +// int patientTypeID; +// +// String companyApprovalNo; +// +// String submitOn; +// String receiptOn; +// +// int status; +// int eXuldAPPNO; +// String feedbackStatusOn; +// int authorizerID; +// String expiryDate; +// int appointmentNo; +// int admissionNo; +// +// int createdBy; +// String createdOn; +// int editedBy; +// String editedOn; +// +// String extendedOn; +// +// int noOrderAuthorizerID; +// bool isVerbalApproval; +// +// List apporvalDetails; +// String approvalStatusDescption; +// String clinicName; +// +// //Null companyName; +// String doctorImageURL; +// String doctorName; +// +// int doctorRate; +// String doctorTitle; +// int gender; +// String genderDescription; +// bool isActiveDoctorProfile; +// bool isExecludeDoctor; +// bool isInOutPatient; +// String isInOutPatientDescription; +// String isInOutPatientDescriptionN; +// bool isLiveCareAppointment; +// String projectName; +// +// String qR; +// List speciality; +// +// int totaUnUsedCount; +// int unUsedCount; +// +// InsuranceApprovalModel( +// {this.setupID, +// this.projectID, +// this.approvalNo, +// this.approvalDate, +// this.patientType, +// this.patientID, +// this.companyID, +// this.subCategoryID, +// this.doctorID, +// this.clinicID, +// this.approvalType, +// this.inpatientApprovalSubType, +// this.validFrom, +// this.vaildDays, +// this.validTo, +// this.isApprovalOnGross, +// this.isPackage, +// this.requestedAmount, +// this.patientTypeID, +// this.companyApprovalNo, +// this.eXuldAPPNO, +// this.submitOn, +// this.receiptOn, +// this.status, +// this.feedbackStatusOn, +// this.authorizerID, +// this.expiryDate, +// this.appointmentNo, +// this.admissionNo, +// this.createdBy, +// this.createdOn, +// this.editedBy, +// this.editedOn, +// this.extendedOn, +// this.noOrderAuthorizerID, +// this.isVerbalApproval, +// this.apporvalDetails, +// this.approvalStatusDescption, +// this.clinicName, +// this.doctorImageURL, +// this.doctorName, +// this.doctorRate, +// this.doctorTitle, +// this.gender, +// this.genderDescription, +// this.isActiveDoctorProfile, +// this.isExecludeDoctor, +// this.isInOutPatient, +// this.isInOutPatientDescription, +// this.isInOutPatientDescriptionN, +// this.isLiveCareAppointment, +// this.projectName, +// this.qR, +// this.speciality, +// this.totaUnUsedCount, +// this.unUsedCount, +// this.isDentalAllowedBackend}); +// +// InsuranceApprovalModel.fromJson(Map json) { +// eXuldAPPNO = json['EXuldAPPNO']; +// setupID = json['SetupID']; +// projectID = json['ProjectID']; +// approvalNo = json['ApprovalNo']; +// approvalDate = json['ApprovalDate']; +// patientType = json['PatientType']; +// patientID = json['PatientID']; +// companyID = json['CompanyID']; +// subCategoryID = json['SubCategoryID']; +// doctorID = json['DoctorID']; +// clinicID = json['ClinicID']; +// approvalType = json['ApprovalType']; +// inpatientApprovalSubType = json['InpatientApprovalSubType']; +// validFrom = json['ValidFrom']; +// vaildDays = json['VaildDays']; +// validTo = json['ValidTo']; +// isApprovalOnGross = json['IsApprovalOnGross']; +// isPackage = json['IsPackage']; +// requestedAmount = json['RequestedAmount']; +// +// companyApprovalNo = json['CompanyApprovalNo']; +// +// submitOn = json['SubmitOn']; +// receiptOn = json['ReceiptOn']; +// +// status = json['Status']; +// +// feedbackStatusOn = json['FeedbackStatusOn']; +// authorizerID = json['AuthorizerID']; +// expiryDate = json['ExpiryDate']; +// appointmentNo = json['AppointmentNo']; +// admissionNo = json['AdmissionNo']; +// +// createdBy = json['CreatedBy']; +// createdOn = json['CreatedOn']; +// editedBy = json['EditedBy']; +// editedOn = json['EditedOn']; +// +// extendedOn = json['ExtendedOn']; +// +// noOrderAuthorizerID = json['NoOrderAuthorizerID']; +// isVerbalApproval = json['isVerbalApproval']; +// +// if (json['ApporvalDetails'] != null) { +// apporvalDetails = new List(); +// json['ApporvalDetails'].forEach((v) { +// apporvalDetails.add(new ApporvalDetails.fromJson(v)); +// }); +// } +// approvalStatusDescption = json['ApprovalStatusDescption']; +// clinicName = json['ClinicName']; +// +// doctorImageURL = json['DoctorImageURL']; +// doctorName = json['DoctorName']; +// +// doctorRate = json['DoctorRate']; +// doctorTitle = json['DoctorTitle']; +// gender = json['Gender']; +// genderDescription = json['GenderDescription']; +// isActiveDoctorProfile = json['IsActiveDoctorProfile']; +// isExecludeDoctor = json['IsExecludeDoctor']; +// isInOutPatient = json['IsInOutPatient']; +// isInOutPatientDescription = json['IsInOutPatientDescription']; +// isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; +// isLiveCareAppointment = json['IsLiveCareAppointment']; +// projectName = json['ProjectName']; +// +// qR = json['QR']; +// speciality = json['Speciality'].cast(); +// +// totaUnUsedCount = json['TotaUnUsedCount']; +// unUsedCount = json['UnUsedCount']; +// } +// +// Map toJson() { +// final Map data = new Map(); +// data['SetupID'] = this.setupID; +// data['ProjectID'] = this.projectID; +// data['ApprovalNo'] = this.approvalNo; +// data['ApprovalDate'] = this.approvalDate; +// data['PatientType'] = this.patientType; +// data['PatientID'] = this.patientID; +// data['CompanyID'] = this.companyID; +// data['SubCategoryID'] = this.subCategoryID; +// data['DoctorID'] = this.doctorID; +// data['ClinicID'] = this.clinicID; +// data['ApprovalType'] = this.approvalType; +// data['InpatientApprovalSubType'] = this.inpatientApprovalSubType; +// data['ValidFrom'] = this.validFrom; +// data['VaildDays'] = this.vaildDays; +// data['ValidTo'] = this.validTo; +// data['IsApprovalOnGross'] = this.isApprovalOnGross; +// data['IsPackage'] = this.isPackage; +// data['RequestedAmount'] = this.requestedAmount; +// +// data['CompanyApprovalNo'] = this.companyApprovalNo; +// +// data['SubmitOn'] = this.submitOn; +// data['ReceiptOn'] = this.receiptOn; +// +// data['Status'] = this.status; +// +// data['FeedbackStatusOn'] = this.feedbackStatusOn; +// data['AuthorizerID'] = this.authorizerID; +// data['ExpiryDate'] = this.expiryDate; +// data['AppointmentNo'] = this.appointmentNo; +// data['AdmissionNo'] = this.admissionNo; +// +// data['CreatedBy'] = this.createdBy; +// data['CreatedOn'] = this.createdOn; +// data['EditedBy'] = this.editedBy; +// data['EditedOn'] = this.editedOn; +// data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; +// +// data['ExtendedOn'] = this.extendedOn; +// +// data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID; +// data['isVerbalApproval'] = this.isVerbalApproval; +// +// if (this.apporvalDetails != null) { +// data['ApporvalDetails'] = +// this.apporvalDetails.map((v) => v.toJson()).toList(); +// } +// data['ApprovalStatusDescption'] = this.approvalStatusDescption; +// data['ClinicName'] = this.clinicName; +// +// data['DoctorImageURL'] = this.doctorImageURL; +// data['DoctorName'] = this.doctorName; +// data['EXuldAPPNO'] = this.eXuldAPPNO; +// data['DoctorRate'] = this.doctorRate; +// data['DoctorTitle'] = this.doctorTitle; +// data['Gender'] = this.gender; +// data['GenderDescription'] = this.genderDescription; +// data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; +// data['IsExecludeDoctor'] = this.isExecludeDoctor; +// data['IsInOutPatient'] = this.isInOutPatient; +// data['IsInOutPatientDescription'] = this.isInOutPatientDescription; +// data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; +// data['IsLiveCareAppointment'] = this.isLiveCareAppointment; +// data['ProjectName'] = this.projectName; +// +// data['QR'] = this.qR; +// data['Speciality'] = this.speciality; +// +// data['TotaUnUsedCount'] = this.totaUnUsedCount; +// data['UnUsedCount'] = this.unUsedCount; +// return data; +// } +// } +// +// class ApporvalDetails { +// int approvalNo; +// +// String procedureName; +// //String procedureNameN; +// String status; +// +// String isInvoicedDesc; +// +// ApporvalDetails( +// {this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc}); +// +// ApporvalDetails.fromJson(Map json) { +// approvalNo = json['ApprovalNo']; +// +// procedureName = json['ProcedureName']; +// +// status = json['Status']; +// +// isInvoicedDesc = json['IsInvoicedDesc']; +// } +// +// Map toJson() { +// final Map data = new Map(); +// +// data['ApprovalNo'] = this.approvalNo; +// +// data['ProcedureName'] = this.procedureName; +// +// data['Status'] = this.status; +// +// data['IsInvoicedDesc'] = this.isInvoicedDesc; +// return data; +// } +// } diff --git a/lib/core/model/insurance_approval_in_patient_model.dart b/lib/core/model/insurance_approval_in_patient_model.dart new file mode 100644 index 00000000..f185a8bf --- /dev/null +++ b/lib/core/model/insurance_approval_in_patient_model.dart @@ -0,0 +1,277 @@ +class InsuranceApprovalInPatientModel { + String setupID; + int projectID; + int approvalNo; + int status; + String approvalDate; + int patientType; + int patientID; + int companyID; + bool subCategoryID; + int doctorID; + int clinicID; + int approvalType; + int inpatientApprovalSubType; + dynamic isApprovalOnGross; + String companyApprovalNo; + dynamic progNoteOrderNo; + String submitOn; + String receiptOn; + String expiryDate; + int admissionNo; + int admissionRequestNo; + String approvalStatusDescption; + dynamic approvalStatusDescptionN; + dynamic remarks; + List apporvalDetails; + String clinicName; + dynamic companyName; + String doctorName; + String projectName; + int totaUnUsedCount; + int unUsedCount; + String doctorImage; + + InsuranceApprovalInPatientModel( + {this.setupID, + this.projectID, + this.approvalNo, + this.status, + this.approvalDate, + this.patientType, + this.patientID, + this.companyID, + this.subCategoryID, + this.doctorID, + this.clinicID, + this.approvalType, + this.inpatientApprovalSubType, + this.isApprovalOnGross, + this.companyApprovalNo, + this.progNoteOrderNo, + this.submitOn, + this.receiptOn, + this.expiryDate, + this.admissionNo, + this.admissionRequestNo, + this.approvalStatusDescption, + this.approvalStatusDescptionN, + this.remarks, + this.apporvalDetails, + this.clinicName, + this.companyName, + this.doctorName, + this.projectName, + this.totaUnUsedCount, + this.unUsedCount, + this.doctorImage}); + + InsuranceApprovalInPatientModel.fromJson(Map json) { + setupID = json['SetupID']; + doctorImage = json['DoctorImageURL']; + projectID = json['ProjectID']; + approvalNo = json['ApprovalNo']; + status = json['Status']; + approvalDate = json['ApprovalDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + companyID = json['CompanyID']; + subCategoryID = json['SubCategoryID']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + approvalType = json['ApprovalType']; + inpatientApprovalSubType = json['InpatientApprovalSubType']; + isApprovalOnGross = json['IsApprovalOnGross']; + companyApprovalNo = json['CompanyApprovalNo']; + progNoteOrderNo = json['ProgNoteOrderNo']; + submitOn = json['SubmitOn']; + receiptOn = json['ReceiptOn']; + expiryDate = json['ExpiryDate']; + admissionNo = json['AdmissionNo']; + admissionRequestNo = json['AdmissionRequestNo']; + approvalStatusDescption = json['ApprovalStatusDescption']; + approvalStatusDescptionN = json['ApprovalStatusDescptionN']; + remarks = json['Remarks']; + if (json['ApporvalDetails'] != null) { + apporvalDetails = new List(); + json['ApporvalDetails'].forEach((v) { + apporvalDetails.add(new ApporvalDetails.fromJson(v)); + }); + } + clinicName = json['ClinicName']; + companyName = json['CompanyName']; + doctorName = json['DoctorName']; + projectName = json['ProjectName']; + totaUnUsedCount = json['TotaUnUsedCount']; + unUsedCount = json['UnUsedCount']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['DoctorImageURL'] = this.doctorImage; + data['ProjectID'] = this.projectID; + data['ApprovalNo'] = this.approvalNo; + data['Status'] = this.status; + data['ApprovalDate'] = this.approvalDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['CompanyID'] = this.companyID; + data['SubCategoryID'] = this.subCategoryID; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['ApprovalType'] = this.approvalType; + data['InpatientApprovalSubType'] = this.inpatientApprovalSubType; + data['IsApprovalOnGross'] = this.isApprovalOnGross; + data['CompanyApprovalNo'] = this.companyApprovalNo; + data['ProgNoteOrderNo'] = this.progNoteOrderNo; + data['SubmitOn'] = this.submitOn; + data['ReceiptOn'] = this.receiptOn; + data['ExpiryDate'] = this.expiryDate; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionRequestNo'] = this.admissionRequestNo; + data['ApprovalStatusDescption'] = this.approvalStatusDescption; + data['ApprovalStatusDescptionN'] = this.approvalStatusDescptionN; + data['Remarks'] = this.remarks; + if (this.apporvalDetails != null) { + data['ApporvalDetails'] = + this.apporvalDetails.map((v) => v.toJson()).toList(); + } + data['ClinicName'] = this.clinicName; + data['CompanyName'] = this.companyName; + data['DoctorName'] = this.doctorName; + data['ProjectName'] = this.projectName; + data['TotaUnUsedCount'] = this.totaUnUsedCount; + data['UnUsedCount'] = this.unUsedCount; + return data; + } +} + +class ApporvalDetails { + Null setupID; + Null projectID; + int approvalNo; + Null lineItemNo; + Null orderType; + Null procedureID; + Null toothNo; + Null price; + Null approvedAmount; + Null unapprovedPatientShare; + Null waivedAmount; + Null discountType; + Null discountValue; + Null shareType; + Null patientShareTypeValue; + Null companyShareTypeValue; + Null patientShare; + Null companyShare; + Null deductableAmount; + String disapprovedRemarks; + Null progNoteOrderNo; + Null progNoteLineItemNo; + Null invoiceTransactionType; + Null invoiceNo; + String procedureName; + String procedureNameN; + String status; + Null isInvoiced; + String isInvoicedDesc; + + ApporvalDetails( + {this.setupID, + this.projectID, + this.approvalNo, + this.lineItemNo, + this.orderType, + this.procedureID, + this.toothNo, + this.price, + this.approvedAmount, + this.unapprovedPatientShare, + this.waivedAmount, + this.discountType, + this.discountValue, + this.shareType, + this.patientShareTypeValue, + this.companyShareTypeValue, + this.patientShare, + this.companyShare, + this.deductableAmount, + this.disapprovedRemarks, + this.progNoteOrderNo, + this.progNoteLineItemNo, + this.invoiceTransactionType, + this.invoiceNo, + this.procedureName, + this.procedureNameN, + this.status, + this.isInvoiced, + this.isInvoicedDesc}); + + ApporvalDetails.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + approvalNo = json['ApprovalNo']; + lineItemNo = json['LineItemNo']; + orderType = json['OrderType']; + procedureID = json['ProcedureID']; + toothNo = json['ToothNo']; + price = json['Price']; + approvedAmount = json['ApprovedAmount']; + unapprovedPatientShare = json['UnapprovedPatientShare']; + waivedAmount = json['WaivedAmount']; + discountType = json['DiscountType']; + discountValue = json['DiscountValue']; + shareType = json['ShareType']; + patientShareTypeValue = json['PatientShareTypeValue']; + companyShareTypeValue = json['CompanyShareTypeValue']; + patientShare = json['PatientShare']; + companyShare = json['CompanyShare']; + deductableAmount = json['DeductableAmount']; + disapprovedRemarks = json['DisapprovedRemarks']; + progNoteOrderNo = json['ProgNoteOrderNo']; + progNoteLineItemNo = json['ProgNoteLineItemNo']; + invoiceTransactionType = json['InvoiceTransactionType']; + invoiceNo = json['InvoiceNo']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + status = json['Status']; + isInvoiced = json['IsInvoiced']; + isInvoicedDesc = json['IsInvoicedDesc']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ApprovalNo'] = this.approvalNo; + data['LineItemNo'] = this.lineItemNo; + data['OrderType'] = this.orderType; + data['ProcedureID'] = this.procedureID; + data['ToothNo'] = this.toothNo; + data['Price'] = this.price; + data['ApprovedAmount'] = this.approvedAmount; + data['UnapprovedPatientShare'] = this.unapprovedPatientShare; + data['WaivedAmount'] = this.waivedAmount; + data['DiscountType'] = this.discountType; + data['DiscountValue'] = this.discountValue; + data['ShareType'] = this.shareType; + data['PatientShareTypeValue'] = this.patientShareTypeValue; + data['CompanyShareTypeValue'] = this.companyShareTypeValue; + data['PatientShare'] = this.patientShare; + data['CompanyShare'] = this.companyShare; + data['DeductableAmount'] = this.deductableAmount; + data['DisapprovedRemarks'] = this.disapprovedRemarks; + data['ProgNoteOrderNo'] = this.progNoteOrderNo; + data['ProgNoteLineItemNo'] = this.progNoteLineItemNo; + data['InvoiceTransactionType'] = this.invoiceTransactionType; + data['InvoiceNo'] = this.invoiceNo; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + data['Status'] = this.status; + data['IsInvoiced'] = this.isInvoiced; + data['IsInvoicedDesc'] = this.isInvoicedDesc; + return data; + } +} diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index 2deb13f3..1c09696b 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -47,10 +47,10 @@ class LabResult { lineItemNo = json['LineItemNo']; maleInterpretativeData = json['MaleInterpretativeData']; notes = json['Notes']; - packageID = json['PackageID']; + packageID = json['PackageID'].toString(); patientID = json['PatientID']; - projectID = json['ProjectID']; - referanceRange = json['ReferanceRange']; + projectID = json['ProjectID'].toString(); + referanceRange = json['ReferenceRange'] ?? json['ReferanceRange']; resultValue = json['ResultValue']; sampleCollectedOn = json['SampleCollectedOn']; sampleReceivedOn = json['SampleReceivedOn']; diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index 07044b0e..62eac5cc 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -85,7 +85,7 @@ class PatientLabOrders { doctorTitle = json['DoctorTitle']; gender = json['Gender']; genderDescription = json['GenderDescription']; - invoiceNo = json['InvoiceNo']; + invoiceNo = json['InvoiceNo'].toString(); isActiveDoctorProfile = json['IsActiveDoctorProfile']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isExecludeDoctor = json['IsExecludeDoctor']; @@ -96,9 +96,9 @@ class PatientLabOrders { nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; orderDate = DateUtils.convertStringToDate(json['OrderDate']); - orderNo = json['OrderNo']; - patientID = json['PatientID']; - projectID = json['ProjectID']; + orderNo = json['OrderNo'].toString(); + patientID = json['PatientID'].toString(); + projectID = json['ProjectID'].toString(); projectName = json['ProjectName']; projectNameN = json['ProjectNameN']; qR = json['QR']; diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index bdeb3930..b48cf0e1 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -65,7 +65,7 @@ class RequestPatientLabSpecialResult { data['OrderNo'] = this.orderNo; data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; - data['ClinicID'] = this.clinicID; + data['ClinicID'] = this.clinicID ?? 0; data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; diff --git a/lib/core/model/medical_file_model.dart b/lib/core/model/medical_file_model.dart index f2b4ce3c..deebb2af 100644 --- a/lib/core/model/medical_file_model.dart +++ b/lib/core/model/medical_file_model.dart @@ -80,7 +80,7 @@ class Timelines { clinicName = json['ClinicName']; date = json['Date']; doctorId = json['DoctorId']; - doctorImage = json['DoctorImage']; + doctorImage = json['DoctorImageURL']; doctorName = json['DoctorName']; encounterNumber = json['EncounterNumber']; encounterType = json['EncounterType']; @@ -101,7 +101,7 @@ class Timelines { data['ClinicName'] = this.clinicName; data['Date'] = this.date; data['DoctorId'] = this.doctorId; - data['DoctorImage'] = this.doctorImage; + data['DoctorImageURL'] = this.doctorImage; data['DoctorName'] = this.doctorName; data['EncounterNumber'] = this.encounterNumber; data['EncounterType'] = this.encounterType; diff --git a/lib/core/model/medical_file_request_model.dart b/lib/core/model/medical_file_request_model.dart index c5a40bb7..8703141a 100644 --- a/lib/core/model/medical_file_request_model.dart +++ b/lib/core/model/medical_file_request_model.dart @@ -1,8 +1,9 @@ class MedicalFileRequestModel { int patientMRN; String vidaAuthTokenID; + String iPAdress; - MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID}); + MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress}); MedicalFileRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -13,6 +14,7 @@ class MedicalFileRequestModel { final Map data = new Map(); data['PatientMRN'] = this.patientMRN; data['VidaAuthTokenID'] = this.vidaAuthTokenID; + data['IPAdress'] = this.iPAdress; return data; } } diff --git a/lib/core/model/note/CreateNoteModel.dart b/lib/core/model/note/CreateNoteModel.dart new file mode 100644 index 00000000..ce076705 --- /dev/null +++ b/lib/core/model/note/CreateNoteModel.dart @@ -0,0 +1,88 @@ +class CreateNoteModel { + int visitType; + int admissionNo; + int projectID; + int patientTypeID; + int patientID; + int clinicID; + String notes; + int createdBy; + int editedBy; + String nursingRemarks; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + + CreateNoteModel( + {this.visitType, + this.admissionNo, + this.projectID, + this.patientTypeID, + this.patientID, + this.clinicID, + this.notes, + this.createdBy, + this.editedBy, + this.nursingRemarks, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); + + CreateNoteModel.fromJson(Map json) { + visitType = json['VisitType']; + admissionNo = json['AdmissionNo']; + projectID = json['ProjectID']; + patientTypeID = json['PatientTypeID']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + notes = json['Notes']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + nursingRemarks = json['NursingRemarks']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['VisitType'] = this.visitType; + data['AdmissionNo'] = this.admissionNo; + data['ProjectID'] = this.projectID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['Notes'] = this.notes; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + data['NursingRemarks'] = this.nursingRemarks; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} diff --git a/lib/core/model/note/note_model.dart b/lib/core/model/note/note_model.dart new file mode 100644 index 00000000..797f9b6d --- /dev/null +++ b/lib/core/model/note/note_model.dart @@ -0,0 +1,92 @@ +class NoteModel { + String setupID; + int projectID; + int patientID; + int patientType; + String admissionNo; + int lineItemNo; + int visitType; + String notes; + String assessmentDate; + String visitTime; + int status; + String nursingRemarks; + String createdOn; + String editedOn; + int createdBy; + int admissionClinicID; + String admissionClinicName; + Null doctorClinicName; + String doctorName; + String visitTypeDesc; + + NoteModel( + {this.setupID, + this.projectID, + this.patientID, + this.patientType, + this.admissionNo, + this.lineItemNo, + this.visitType, + this.notes, + this.assessmentDate, + this.visitTime, + this.status, + this.nursingRemarks, + this.createdOn, + this.editedOn, + this.createdBy, + this.admissionClinicID, + this.admissionClinicName, + this.doctorClinicName, + this.doctorName, + this.visitTypeDesc}); + + NoteModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + admissionNo = json['AdmissionNo']; + lineItemNo = json['LineItemNo']; + visitType = json['VisitType']; + notes = json['Notes']; + assessmentDate = json['AssessmentDate']; + visitTime = json['VisitTime']; + status = json['Status']; + nursingRemarks = json['NursingRemarks']; + createdOn = json['CreatedOn']; + editedOn = json['EditedOn']; + createdBy = json['CreatedBy']; + admissionClinicID = json['AdmissionClinicID']; + admissionClinicName = json['AdmissionClinicName']; + doctorClinicName = json['DoctorClinicName']; + doctorName = json['DoctorName']; + visitTypeDesc = json['VisitTypeDesc']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['AdmissionNo'] = this.admissionNo; + data['LineItemNo'] = this.lineItemNo; + data['VisitType'] = this.visitType; + data['Notes'] = this.notes; + data['AssessmentDate'] = this.assessmentDate; + data['VisitTime'] = this.visitTime; + data['Status'] = this.status; + data['NursingRemarks'] = this.nursingRemarks; + data['CreatedOn'] = this.createdOn; + data['EditedOn'] = this.editedOn; + data['CreatedBy'] = this.createdBy; + data['AdmissionClinicID'] = this.admissionClinicID; + data['AdmissionClinicName'] = this.admissionClinicName; + data['DoctorClinicName'] = this.doctorClinicName; + data['DoctorName'] = this.doctorName; + data['VisitTypeDesc'] = this.visitTypeDesc; + return data; + } +} diff --git a/lib/core/model/note/update_note_model.dart b/lib/core/model/note/update_note_model.dart new file mode 100644 index 00000000..20fd4b86 --- /dev/null +++ b/lib/core/model/note/update_note_model.dart @@ -0,0 +1,80 @@ +class UpdateNoteReqModel { + int projectID; + int createdBy; + int admissionNo; + int lineItemNo; + String notes; + bool verifiedNote; + bool cancelledNote; + int languageID; + String stamp; + String iPAdress; + double versionID; + int channel; + String tokenID; + String sessionID; + bool isLoginForDoctorApp; + bool patientOutSA; + int patientTypeID; + + UpdateNoteReqModel( + {this.projectID, + this.createdBy, + this.admissionNo, + this.lineItemNo, + this.notes, + this.verifiedNote, + this.cancelledNote, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA, + this.patientTypeID}); + + UpdateNoteReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + createdBy = json['CreatedBy']; + admissionNo = json['AdmissionNo']; + lineItemNo = json['LineItemNo']; + notes = json['Notes']; + verifiedNote = json['VerifiedNote']; + cancelledNote = json['CancelledNote']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['CreatedBy'] = this.createdBy; + data['AdmissionNo'] = this.admissionNo; + data['LineItemNo'] = this.lineItemNo; + data['Notes'] = this.notes; + data['VerifiedNote'] = this.verifiedNote; + data['CancelledNote'] = this.cancelledNote; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + return data; + } +} diff --git a/lib/core/model/prescription_req_model.dart b/lib/core/model/prescription_req_model.dart index 3eb71072..a45878d8 100644 --- a/lib/core/model/prescription_req_model.dart +++ b/lib/core/model/prescription_req_model.dart @@ -2,13 +2,16 @@ class PrescriptionReqModel { String vidaAuthTokenID; dynamic patientMRN; dynamic appNo; + dynamic admissionNo; - PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN, this.appNo}); + PrescriptionReqModel( + {this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo}); PrescriptionReqModel.fromJson(Map json) { vidaAuthTokenID = json['VidaAuthTokenID']; patientMRN = json['PatientMRN']; appNo = json['AppointmentNo']; + admissionNo = json['AdmissionNo']; } Map toJson() { @@ -16,6 +19,8 @@ class PrescriptionReqModel { data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['PatientMRN'] = this.patientMRN; data['AppointmentNo'] = this.appNo; + data['AdmissionNo'] = this.admissionNo; + return data; } } diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index 66433091..dcf365fe 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -1,47 +1,48 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class FinalRadiology { - String setupID; - int projectID; - Null patientID; - int invoiceLineItemNo; - int invoiceNo; - int doctorID; - int clinicID; + dynamic setupID; + dynamic projectID; + dynamic patientID; + dynamic invoiceLineItemNo; + dynamic invoiceNo; + dynamic doctorID; + dynamic clinicID; DateTime orderDate; - String reportData; - String imageURL; - String procedureID; - int appointmentNo; - Null dIAPacsURL; + DateTime reportDate; + dynamic reportData; + dynamic imageURL; + dynamic procedureID; + dynamic appodynamicmentNo; + dynamic dIAPacsURL; bool isRead; - String readOn; + dynamic readOn; var admissionNo; bool isInOutPatient; - int actualDoctorRate; - String clinicDescription; - String dIAPACSURL; - String doctorImageURL; - String doctorName; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; + dynamic actualDoctorRate; + dynamic clinicDescription; + dynamic dIAPACSURL; + dynamic doctorImageURL; + dynamic doctorName; + dynamic doctorRate; + dynamic doctorTitle; + dynamic gender; + dynamic genderDescription; bool isActiveDoctorProfile; bool isExecludeDoctor; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - String nationalityFlagURL; - int noOfPatientsRate; - int orderNo; - String projectName; - String qR; - String reportDataHTML; - String reportDataTextString; - List speciality; + dynamic isInOutPatientDescription; + dynamic isInOutPatientDescriptionN; + dynamic nationalityFlagURL; + dynamic noOfPatientsRate; + dynamic orderNo; + dynamic projectName; + dynamic qR; + dynamic reportDataHTML; + dynamic reportDataTextdynamic; + List speciality; bool isCVI; bool isRadMedicalReport; - bool isLiveCareAppointment; + bool isLiveCareAppodynamicment; FinalRadiology( {this.setupID, @@ -52,10 +53,11 @@ class FinalRadiology { this.doctorID, this.clinicID, this.orderDate, + this.reportDate, this.reportData, this.imageURL, this.procedureID, - this.appointmentNo, + this.appodynamicmentNo, this.dIAPacsURL, this.isRead, this.readOn, @@ -80,12 +82,12 @@ class FinalRadiology { this.projectName, this.qR, this.reportDataHTML, - this.reportDataTextString, + this.reportDataTextdynamic, this.speciality, this.isCVI, - this.isRadMedicalReport,this.isLiveCareAppointment}); + this.isRadMedicalReport,this.isLiveCareAppodynamicment}); - FinalRadiology.fromJson(Map json) { + FinalRadiology.fromJson(Map json) { try { setupID = json['SetupID']; projectID = json['ProjectID']; @@ -95,10 +97,11 @@ class FinalRadiology { doctorID = json['DoctorID']; clinicID = json['ClinicID']; orderDate = DateUtils.convertStringToDate(json['OrderDate']); + reportDate = DateUtils.convertStringToDate(json['ReportDate']); reportData = json['ReportData']; imageURL = json['ImageURL']; procedureID = json['ProcedureID']; - appointmentNo = json['AppointmentNo']; + appodynamicmentNo = json['AppodynamicmentNo']; dIAPacsURL = json['DIAPacsURL']; isRead = json['IsRead']; readOn = json['ReadOn']; @@ -122,20 +125,21 @@ class FinalRadiology { orderNo = json['OrderNo']; projectName = json['ProjectName']; qR = json['QR']; - isLiveCareAppointment = json['IsLiveCareAppointment']; + isLiveCareAppodynamicment = json['IsLiveCareAppodynamicment']; reportDataHTML = json['ReportDataHTML']; - reportDataTextString = json['ReportDataTextString']; - // speciality = json['Speciality'].cast(); + reportDataTextdynamic = json['ReportDataTextdynamic']; + // speciality = json['Speciality'].cast(); isCVI = json['isCVI']; isRadMedicalReport = json['isRadMedicalReport']; } catch (e) { print(e); + } } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['PatientID'] = this.patientID; @@ -147,7 +151,7 @@ class FinalRadiology { data['ReportData'] = this.reportData; data['ImageURL'] = this.imageURL; data['ProcedureID'] = this.procedureID; - data['AppointmentNo'] = this.appointmentNo; + data['AppodynamicmentNo'] = this.appodynamicmentNo; data['DIAPacsURL'] = this.dIAPacsURL; data['IsRead'] = this.isRead; data['ReadOn'] = this.readOn; @@ -172,7 +176,7 @@ class FinalRadiology { data['ProjectName'] = this.projectName; data['QR'] = this.qR; data['ReportDataHTML'] = this.reportDataHTML; - data['ReportDataTextString'] = this.reportDataTextString; + data['ReportDataTextdynamic'] = this.reportDataTextdynamic; data['Speciality'] = this.speciality; data['isCVI'] = this.isCVI; data['isRadMedicalReport'] = this.isRadMedicalReport; @@ -181,7 +185,7 @@ class FinalRadiology { } class FinalRadiologyList { - String filterName = ""; + dynamic filterName = ""; List finalRadiologyList = List(); FinalRadiologyList({this.filterName, FinalRadiology finalRadiology}) { diff --git a/lib/core/model/sick_leave_patient_model.dart b/lib/core/model/sick_leave_patient_model.dart new file mode 100644 index 00000000..e0637845 --- /dev/null +++ b/lib/core/model/sick_leave_patient_model.dart @@ -0,0 +1,144 @@ +class SickLeavePatientModel { + String setupID; + int projectID; + int patientID; + int patientType; + int clinicID; + int doctorID; + int requestNo; + String requestDate; + int sickLeaveDays; + int appointmentNo; + int admissionNo; + int actualDoctorRate; + String appointmentDate; + String clinicName; + String doctorImageURL; + String doctorName; + int doctorRate; + String doctorTitle; + int gender; + String genderDescription; + bool isActiveDoctorProfile; + bool isDoctorAllowVedioCall; + bool isExecludeDoctor; + bool isInOutPatient; + String isInOutPatientDescription; + String isInOutPatientDescriptionN; + bool isLiveCareAppointment; + int noOfPatientsRate; + dynamic patientName; + String projectName; + String qR; + List speciality; + String strRequestDate; + + SickLeavePatientModel( + {this.setupID, + this.projectID, + this.patientID, + this.patientType, + this.clinicID, + this.doctorID, + this.requestNo, + this.requestDate, + this.sickLeaveDays, + this.appointmentNo, + this.admissionNo, + this.actualDoctorRate, + this.appointmentDate, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isInOutPatient, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.isLiveCareAppointment, + this.noOfPatientsRate, + this.patientName, + this.projectName, + this.qR, + this.speciality, + this.strRequestDate}); + + SickLeavePatientModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + requestNo = json['RequestNo']; + requestDate = json['RequestDate']; + sickLeaveDays = json['SickLeaveDays']; + appointmentNo = json['AppointmentNo']; + admissionNo = json['AdmissionNo']; + actualDoctorRate = json['ActualDoctorRate']; + appointmentDate = json['AppointmentDate']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatient = json['IsInOutPatient']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + noOfPatientsRate = json['NoOfPatientsRate']; + patientName = json['PatientName']; + projectName = json['ProjectName']; + qR = json['QR']; + speciality = json['Speciality'].cast(); + strRequestDate = json['StrRequestDate']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['RequestNo'] = this.requestNo; + data['RequestDate'] = this.requestDate; + data['SickLeaveDays'] = this.sickLeaveDays; + data['AppointmentNo'] = this.appointmentNo; + data['AdmissionNo'] = this.admissionNo; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['AppointmentDate'] = this.appointmentDate; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['PatientName'] = this.patientName; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['Speciality'] = this.speciality; + data['StrRequestDate'] = this.strRequestDate; + return data; + } +} diff --git a/lib/core/model/sick_leave_patient_request_model.dart b/lib/core/model/sick_leave_patient_request_model.dart new file mode 100644 index 00000000..ec588316 --- /dev/null +++ b/lib/core/model/sick_leave_patient_request_model.dart @@ -0,0 +1,60 @@ +class SickLeavePatientRequestModel { + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + int deviceTypeID; + int patientType; + int patientTypeID; + String tokenID; + int patientID; + String sessionID; + + SickLeavePatientRequestModel( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.deviceTypeID, + this.patientType, + this.patientTypeID, + this.tokenID, + this.patientID, + this.sessionID}); + + SickLeavePatientRequestModel.fromJson(Map json) { + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + deviceTypeID = json['DeviceTypeID']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + sessionID = json['SessionID']; + } + + Map toJson() { + final Map data = new Map(); + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + data['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['SessionID'] = this.sessionID; + return data; + } +} diff --git a/lib/core/provider/robot_provider.dart b/lib/core/provider/robot_provider.dart new file mode 100644 index 00000000..a01b1318 --- /dev/null +++ b/lib/core/provider/robot_provider.dart @@ -0,0 +1,25 @@ +import 'dart:async'; + +class RobotProvider { + static final RobotProvider _singleton = RobotProvider._internal(); + var value; + StreamController controller = StreamController.broadcast(); + + getData() { + // return data; + } + intStream() { + controller.add({}); + } + + setValue(Map data) { + value = data; + controller.add(value); + } + + factory RobotProvider() { + return _singleton; + } + + RobotProvider._internal(); +} diff --git a/lib/core/service/DischargedPatientService.dart b/lib/core/service/DischargedPatientService.dart new file mode 100644 index 00000000..5eb0fabc --- /dev/null +++ b/lib/core/service/DischargedPatientService.dart @@ -0,0 +1,76 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; + +class DischargedPatientService extends BaseService { + List myDischargedPatients = List(); + + List myDischargeReferralPatients = List(); + + Future getDischargedPatient() async { + hasError = false; + Map body = Map(); + await getDoctorProfile(); + body['DoctorID'] = doctorProfile.doctorID; + body['FirstName'] = "0"; + body['MiddleName'] = "0"; + body['LastName'] = "0"; + body['PatientMobileNumber'] = "0"; + body['PatientIdentificationID'] = "0"; + body['PatientID'] = 0; + body['From'] = "0"; + body['To'] = "0"; + body['stamp'] = DateTime.now().toIso8601String(); + body['IsLoginForDoctorApp'] = true; + body['IPAdress'] = "11.11.11.11"; + body['PatientOutSA'] = false; + body['PatientTypeID'] = 1; + hasError = false; + myDischargedPatients.clear(); + await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, + onSuccess: (dynamic response, int statusCode) { + if (response['List_MyDischargePatient'] != null) { + response['List_MyDischargePatient'].forEach((v) { + myDischargedPatients.add(PatiantInformtion.fromJson(v)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future gtMyDischargeReferralPatient() async { + hasError = false; + Map body = Map(); + await getDoctorProfile(); + body['DoctorID'] = doctorProfile.doctorID; + body['FirstName'] = "0"; + body['MiddleName'] = "0"; + body['LastName'] = "0"; + body['PatientMobileNumber'] = "0"; + body['PatientIdentificationID'] = "0"; + body['PatientID'] = 0; + body['From'] = "0"; + body['To'] = "0"; + body['stamp'] = DateTime.now().toIso8601String(); + body['IsLoginForDoctorApp'] = true; + body['IPAdress'] = "11.11.11.11"; + body['PatientOutSA'] = false; + body['PatientTypeID'] = 1; + hasError = false; + myDischargeReferralPatients.clear(); + await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, + onSuccess: (dynamic response, int statusCode) { + if (response['List_MyDischargeReferralPatient'] != null) { + response['List_MyDischargeReferralPatient'].forEach((v) { + myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/InsuranceCardService.dart b/lib/core/service/InsuranceCardService.dart index 43c0e811..b736c34f 100644 --- a/lib/core/service/InsuranceCardService.dart +++ b/lib/core/service/InsuranceCardService.dart @@ -1,5 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/insurance_approval_request_model.dart'; import 'package:doctor_app_flutter/core/model/insurance_approval.dart'; +import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; @@ -10,27 +12,55 @@ class InsuranceCardService extends BaseService { patientType: 1, eXuldAPPNO: 0, projectID: 0); + InsuranceApprovalInPatientRequestModel + _insuranceApprovalInPatientRequestModel = + InsuranceApprovalInPatientRequestModel(); List _insuranceApproval = List(); - List get insuranceApproval => _insuranceApproval; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + List _insuranceApprovalInPatient = List(); + List get insuranceApprovalInPatient => + _insuranceApprovalInPatient; + + Future getInsuranceApprovalInPatient({int mrn}) async { + _insuranceApprovalInPatientRequestModel = + InsuranceApprovalInPatientRequestModel( + patientID: mrn, + patientTypeID: 1, + ); + hasError = false; + insuranceApprovalInPatient.clear(); + + await baseAppClient.post(GET_INSURANCE_IN_PATIENT, + onSuccess: (dynamic response, int statusCode) { + //prescriptionsList.clear(); + response['List_ApprovalMain_InPatient'].forEach((prescriptions) { + insuranceApprovalInPatient + .add(InsuranceApprovalInPatientModel.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _insuranceApprovalInPatientRequestModel.toJson()); + } + + Future getInsuranceApproval(PatiantInformtion patient, + {int appointmentNo, int projectId}) async { hasError = false; // _cardList.clear(); - if (appointmentNo != null) { - _insuranceApprovalModel.appointmentNo = appointmentNo; - _insuranceApprovalModel.eXuldAPPNO = null; - _insuranceApprovalModel.projectID = null; - } else { - _insuranceApprovalModel.appointmentNo = null; - _insuranceApprovalModel.eXuldAPPNO = 0; - _insuranceApprovalModel.projectID = 0; - } + // if (appointmentNo != null) { + // _insuranceApprovalModel.appointmentNo = appointmentNo; + // _insuranceApprovalModel.eXuldAPPNO = null; + // _insuranceApprovalModel.projectID = projectId; + // } else { + _insuranceApprovalModel.appointmentNo = null; + _insuranceApprovalModel.eXuldAPPNO = 0; + _insuranceApprovalModel.projectID = 0; + // } await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, - patient: patient, - onSuccess: (dynamic response, int statusCode) { + patient: patient, onSuccess: (dynamic response, int statusCode) { print(response['HIS_Approval_List'].length); _insuranceApproval.clear(); _insuranceApproval.length = 0; diff --git a/lib/core/service/MyReferralPatientService.dart b/lib/core/service/MyReferralPatientService.dart new file mode 100644 index 00000000..f58cea48 --- /dev/null +++ b/lib/core/service/MyReferralPatientService.dart @@ -0,0 +1,68 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; + +class MyReferralInPatientService extends BaseService { + List myReferralPatients = List(); + + Future getMyReferralPatientService() async { + hasError = false; + Map body = Map(); + await getDoctorProfile(); + body['DoctorID'] = doctorProfile.doctorID; + body['FirstName'] = "0"; + body['MiddleName'] = "0"; + body['LastName'] = "0"; + body['PatientMobileNumber'] = "0"; + body['PatientIdentificationID'] = "0"; + body['PatientID'] = 0; + body['From'] = "0"; + body['To'] = "0"; + body['stamp'] = DateTime.now().toIso8601String(); + body['IsLoginForDoctorApp'] = true; + body['IPAdress'] = "11.11.11.11"; + body['PatientOutSA'] = false; + body['PatientTypeID'] = 1; + myReferralPatients.clear(); + await baseAppClient.post( + GET_MY_REFERRAL_INPATIENT, + onSuccess: (dynamic response, int statusCode) { + if (response['List_MyReferralPatient'] != null) { + response['List_MyReferralPatient'].forEach((v) { + myReferralPatients.add(MyReferralPatientModel.fromJson(v)); + }); + } + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: body, + ); + } + + Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async { + hasError = false; + await getDoctorProfile(); + RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); + _requestAddReferredDoctorRemarks.projectID = referral.projectID; + _requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString(); + _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; + _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; + _requestAddReferredDoctorRemarks.patientID = referral.patientID; + _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor; + await baseAppClient.post( + ADD_REFERRED_DOCTOR_REMARKS, + body: _requestAddReferredDoctorRemarks.toJson(), + onSuccess: (dynamic body, int statusCode) { + + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } +} diff --git a/lib/core/service/PatientMuseService.dart b/lib/core/service/PatientMuseService.dart index 891029c3..35e5fe7b 100644 --- a/lib/core/service/PatientMuseService.dart +++ b/lib/core/service/PatientMuseService.dart @@ -7,9 +7,10 @@ class PatientMuseService extends BaseService { getECGPatient({int patientType, int patientOutSA,int patientID}) async { Map body = Map(); - body['PatientType'] = patientType; + body['PatientType'] = patientType==7 ? 1: patientType; body['PatientOutSA'] = patientOutSA; body['PatientID'] = patientID; + hasError = false; await baseAppClient.post( GET_ECG, onSuccess: (dynamic response, int statusCode) { @@ -22,7 +23,7 @@ class PatientMuseService extends BaseService { hasError = true; super.error = error; }, - body: body, + body: body ); } } diff --git a/lib/core/service/ReferralService.dart b/lib/core/service/ReferralService.dart new file mode 100644 index 00000000..2887abde --- /dev/null +++ b/lib/core/service/ReferralService.dart @@ -0,0 +1,46 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/ReferralRequest.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; + +class ReferralService extends BaseService { + + Future referralPatient( + {int admissionNo, + String roomID, + int referralClinic, + int referralDoctor, + int patientID, + int patientTypeID, + int priority, + int frequency, + String referringDoctorRemarks, + String extension}) async { + await getDoctorProfile(); + ReferralRequest referralRequest = ReferralRequest(); + referralRequest.admissionNo = admissionNo; + referralRequest.roomID = roomID; + referralRequest.referralClinic = referralClinic.toString(); + referralRequest.referralDoctor = referralDoctor.toString(); + referralRequest.patientID = patientID; + referralRequest.patientTypeID = patientTypeID; + referralRequest.priority = priority.toString(); + referralRequest.frequency = frequency.toString(); + referralRequest.referringDoctorRemarks = referringDoctorRemarks; + referralRequest.referringClinic = doctorProfile.clinicID; + referralRequest.referringDoctor = doctorProfile.doctorID; + referralRequest.extension = extension; + referralRequest.editedBy = doctorProfile.doctorID; + referralRequest.createdBy = doctorProfile.doctorID; + referralRequest.patientOutSA = false; + + await baseAppClient.post( + REFER_TO_DOCTOR, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: referralRequest.toJson(), + ); + } +} diff --git a/lib/core/service/SOAP_service.dart b/lib/core/service/SOAP_service.dart index d0cebe77..901445bf 100644 --- a/lib/core/service/SOAP_service.dart +++ b/lib/core/service/SOAP_service.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; @@ -20,7 +21,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'base/lookup-service.dart'; diff --git a/lib/core/service/auth_service.dart b/lib/core/service/auth_service.dart index e116ccdd..adb2d646 100644 --- a/lib/core/service/auth_service.dart +++ b/lib/core/service/auth_service.dart @@ -1,12 +1,13 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/imei_details.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/models/doctor/user_model.dart'; class AuthService extends BaseService { List _imeiDetails = []; List get dashboardItemsList => _imeiDetails; - + Map _loginInfo = {}; + Map get loginInfo => _loginInfo; Future selectDeviceImei(imei) async { try { // dynamic localRes; @@ -26,4 +27,36 @@ class AuthService extends BaseService { super.error = error; } } + + Future login(UserModel userInfo) async { + hasError = false; + _loginInfo = {}; + try { + await baseAppClient.post(LOGIN_URL, + onSuccess: (dynamic response, int statusCode) { + _loginInfo = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userInfo.toJson()); + } catch (error) { + hasError = true; + super.error = error; + } + + // await baseAppClient.post(SELECT_DEVICE_IMEI, + // onSuccess: (dynamic response, int statusCode) { + // _imeiDetails = []; + // response['List_DoctorDeviceDetails'].forEach((v) { + // _imeiDetails.add(GetIMEIDetailsModel.fromJson(v)); + // }); + // }, onFailure: (String error, int statusCode) { + // hasError = true; + // super.error = error; + // }, body: {}); + // } catch (error) { + // hasError = true; + // super.error = error; + // } + } } diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index 6f4c5d1e..42e2cc6d 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -1,10 +1,9 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.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/util/dr_app_shared_pref.dart'; class BaseService { String error; @@ -38,22 +37,24 @@ class BaseService { body['To'] = date; body['PageIndex'] = 0; body['PageSize'] = 0; - if(patientMrn == -1){ + if(patientMrn != -1){ body['PatientMRN'] = patientMrn; } - if(appointmentNo == -1){ + if(appointmentNo != -1){ body['AppointmentNo'] = appointmentNo; } await baseAppClient.post( - GET_PATIENT_ARRIVAL_LIST, + ARRIVED_PATIENT_URL, onSuccess: (dynamic response, int statusCode) { patientArrivalList.clear(); - response['patientArrivalList']['entityList'].forEach((v) { - PatiantInformtion item = PatiantInformtion.fromJson(v); - patientArrivalList.add(item); - }); + if(response['patientArrivalList']['entityList'] != null){ + response['patientArrivalList']['entityList'].forEach((v) { + PatiantInformtion item = PatiantInformtion.fromJson(v); + patientArrivalList.add(item); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/base/lookup-service.dart b/lib/core/service/base/lookup-service.dart index dd6310e8..7f277fa8 100644 --- a/lib/core/service/base/lookup-service.dart +++ b/lib/core/service/base/lookup-service.dart @@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:flutter/cupertino.dart'; import 'base_service.dart'; diff --git a/lib/core/service/doctor_reply_service.dart b/lib/core/service/doctor_reply_service.dart index 5025037d..2ffb3ee8 100644 --- a/lib/core/service/doctor_reply_service.dart +++ b/lib/core/service/doctor_reply_service.dart @@ -1,8 +1,10 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/model/hospitals_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; +import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/doctor/request_doctor_reply.dart'; +import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; class DoctorReplyService extends BaseService { @@ -11,7 +13,11 @@ class DoctorReplyService extends BaseService { RequestDoctorReply _requestDoctorReply = RequestDoctorReply(); + List _listMyReferralPatientModel = []; + List get listMyReferralPatientModel => _listMyReferralPatientModel; + Future getDoctorReply() async { + hasError = false; await baseAppClient.post(GT_MY_PATIENT_QUESTION, onSuccess: (dynamic response, int statusCode) { _listDoctorWorkingHoursTable.clear(); @@ -24,4 +30,33 @@ class DoctorReplyService extends BaseService { super.error = error; }, body: _requestDoctorReply.toJson(),); } + + Future replay( + String referredDoctorRemarks, ListGtMyPatientsQuestions model) async { + RequestMyReferralPatientModel _requestMyReferralPatient = + RequestMyReferralPatientModel(); + RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = + RequestAddReferredDoctorRemarks(); + + _requestAddReferredDoctorRemarks.admissionNo = model.admissionNo.toString(); + _requestAddReferredDoctorRemarks.patientID = model.patientID; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = + referredDoctorRemarks; + _requestAddReferredDoctorRemarks.lineItemNo = model.lineItemNo; + _requestAddReferredDoctorRemarks.referringDoctor = model.referringDoctor; + await baseAppClient.post( + ADD_REFERRED_DOCTOR_REMARKS, + body: _requestAddReferredDoctorRemarks.toJson(), + onSuccess: (dynamic body, int statusCode) { + print("succsss"); + // model.referredDoctorRemarks = referredDoctorRemarks; + // listMyReferralPatientModel[listMyReferralPatientModel.indexOf(model)] = + // model; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } } diff --git a/lib/core/service/labs_service.dart b/lib/core/service/labs_service.dart index 1a641d1f..f38294b5 100644 --- a/lib/core/service/labs_service.dart +++ b/lib/core/service/labs_service.dart @@ -12,16 +12,32 @@ import 'base/base_service.dart'; class LabsService extends BaseService { List patientLabOrdersList = List(); - Future getPatientLabOrdersList(PatiantInformtion patient) async { + Future getPatientLabOrdersList( + PatiantInformtion patient, bool isInpatient) async { hasError = false; Map body = Map(); - body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(GET_Patient_LAB_ORDERS, patient: patient, + String url = ""; + if (isInpatient) { + await getDoctorProfile(); + body['ProjectID'] = doctorProfile.projectID; + url = GET_PATIENT_LAB_OREDERS; + } else { + body['isDentalAllowedBackend'] = false; + url = GET_Patient_LAB_ORDERS; + } + + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabOrdersList.clear(); - response['ListPLO'].forEach((hospital) { - patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); - }); + if (!isInpatient) { + response['ListPLO'].forEach((hospital) { + patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); + }); + } else { + response['List_GetLabOreders'].forEach((hospital) { + patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -40,43 +56,65 @@ class LabsService extends BaseService { int clinicID, String invoiceNo, String orderNo, - PatiantInformtion patient}) async { + PatiantInformtion patient, + bool isInpatient = false}) async { hasError = false; + + Map body = Map(); _requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.invoiceNo = invoiceNo; _requestPatientLabSpecialResult.orderNo = orderNo; + body = _requestPatientLabSpecialResult.toJson(); - await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, - patient: patient, + await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); + response['ListPLSR'].forEach((hospital) { patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); }); + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _requestPatientLabSpecialResult.toJson()); + }, body: body); } - Future getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async { + Future getPatientLabResult( + {PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { hasError = false; + + String url = ""; + if (isInpatient) { + url = GET_PATIENT_LAB_RESULTS; + } else { + url = GET_Patient_LAB_RESULT; + } + Map body = Map(); body['InvoiceNo'] = patientLabOrder.invoiceNo; body['OrderNo'] = patientLabOrder.orderNo; body['isDentalAllowedBackend'] = false; body['SetupID'] = patientLabOrder.setupID; body['ProjectID'] = patientLabOrder.projectID; - body['ClinicID'] = patientLabOrder.clinicID; - await baseAppClient.postPatient(GET_Patient_LAB_RESULT, - patient: patient, + body['ClinicID'] = patientLabOrder.clinicID ?? 0; + + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); labResultList.clear(); - response['ListPLR'].forEach((lab) { - labResultList.add(LabResult.fromJson(lab)); - }); + + if(isInpatient){ + response['List_GetLabNormal'].forEach((hospital) { + labResultList.add(LabResult.fromJson(hospital)); + }); + }else { + response['ListPLR'].forEach((lab) { + labResultList.add(LabResult.fromJson(lab)); + }); + } + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -84,19 +122,22 @@ class LabsService extends BaseService { } Future getPatientLabOrdersResults( - {PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { hasError = false; Map body = Map(); - body['InvoiceNo'] = patientLabOrder.invoiceNo; - body['OrderNo'] = patientLabOrder.orderNo; + if (patientLabOrder != null) { + body['InvoiceNo'] = patientLabOrder.invoiceNo; + body['OrderNo'] = patientLabOrder.orderNo; + body['SetupID'] = patientLabOrder.setupID; + body['ProjectID'] = patientLabOrder.projectID; + body['ClinicID'] = patientLabOrder.clinicID; + } body['isDentalAllowedBackend'] = false; - body['SetupID'] = patientLabOrder.setupID; - body['ProjectID'] = patientLabOrder.projectID; - body['ClinicID'] = patientLabOrder.clinicID; body['Procedure'] = procedure; await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, - patient: patient, - onSuccess: (dynamic response, int statusCode) { + patient: patient, onSuccess: (dynamic response, int statusCode) { labOrdersResultsList.clear(); response['ListPLR'].forEach((lab) { labOrdersResultsList.add(LabOrderResult.fromJson(lab)); diff --git a/lib/core/service/medical_file_service.dart b/lib/core/service/medical_file_service.dart index f1ab6dcd..75fade97 100644 --- a/lib/core/service/medical_file_service.dart +++ b/lib/core/service/medical_file_service.dart @@ -1,7 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; import 'package:doctor_app_flutter/core/model/medical_file_request_model.dart'; -import 'package:doctor_app_flutter/core/model/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class MedicalFileService extends BaseService { @@ -16,6 +15,7 @@ class MedicalFileService extends BaseService { Future getMedicalFile({int mrn}) async { _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); + _fileRequestModel.iPAdress = "9.9.9.9"; hasError = false; _medicalFileList.clear(); await baseAppClient.post(GET_MEDICAL_FILE, diff --git a/lib/core/service/medicine_service.dart b/lib/core/service/medicine_service.dart index 5c716d6d..a734354d 100644 --- a/lib/core/service/medicine_service.dart +++ b/lib/core/service/medicine_service.dart @@ -1,8 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/doctor/request_schedule.dart'; import 'package:doctor_app_flutter/models/pharmacies/pharmacies_List_request_model.dart'; import 'package:doctor_app_flutter/models/pharmacies/pharmacies_items_request_model.dart'; diff --git a/lib/core/service/patient-admission-request-service.dart b/lib/core/service/patient-admission-request-service.dart index 093c4066..bdbf125e 100644 --- a/lib/core/service/patient-admission-request-service.dart +++ b/lib/core/service/patient-admission-request-service.dart @@ -1,8 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/admissionRequest/admission-request.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 clinicList = []; @@ -161,9 +159,12 @@ class AdmissionRequestService extends LookupService { ); } - Future getDietTypesList() async { + Future getDietTypesList(int patientMrn) async { hasError = false; + Map body = Map(); + body['patientMRN'] = patientMrn; + await baseAppClient.post( GET_DIET_TYPES, onSuccess: (dynamic response, int statusCode) { @@ -180,7 +181,7 @@ class AdmissionRequestService extends LookupService { hasError = true; super.error = error; }, - body: Map(), + body: body, ); } diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 3136b549..4ced36be 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -1,11 +1,10 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart'; import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart'; import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; +import 'package:doctor_app_flutter/models/patient/my_referral/clinic-doctor.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/models/patient/request_my_referral_patient_model.dart'; @@ -15,12 +14,14 @@ import 'base/lookup-service.dart'; class PatientReferralService extends LookupService { List projectsList = []; List clinicsList = []; - List doctorsList = []; + List doctorsList = List(); List listMyReferredPatientModel = []; List pendingReferralList = []; List patientReferralList = []; String setupID = "0"; + var frequencyList = []; + Future getProjectsList() async { hasError = false; const url = GET_PROJECTS; @@ -101,23 +102,31 @@ class PatientReferralService extends LookupService { ); } - Future getDoctorsList(String clinicId) async { + Future getDoctorsList(PatiantInformtion patient ,int clinicId, int branchId) async { hasError = false; DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest(); + _doctorsByClinicIdRequest.projectID = branchId; _doctorsByClinicIdRequest.clinicID = clinicId; - await baseAppClient.post( - PATIENT_GET_DOCTOR_BY_CLINIC_URL, + _doctorsByClinicIdRequest.patientID = patient.patientId; + _doctorsByClinicIdRequest.gender = patient.gender; + + + await baseAppClient.postPatient( + PATIENT_GET_DOCTOR_BY_CLINIC_Hospital, onSuccess: (dynamic response, int statusCode) { - doctorsList = []; - doctorsList = response['List_Doctors_All']; + doctorsList.clear(); + response['DoctorList'].forEach((v) { + doctorsList.add(ClinicDoctor.fromJson(v)); + }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: _doctorsByClinicIdRequest.toJson(), + patient: patient ); } @@ -136,7 +145,7 @@ class PatientReferralService extends LookupService { MyReferredPatientModel item = MyReferredPatientModel.fromJson(v); if (doctorProfile != null) { item.isReferralDoctorSameBranch = - doctorProfile.projectID == item.projectId; + doctorProfile.projectID == item.projectID; } else { item.isReferralDoctorSameBranch = false; } @@ -156,7 +165,7 @@ class PatientReferralService extends LookupService { hasError = false; DoctorProfileModel doctorProfile = await getDoctorProfile(); Map body = Map(); - body['ClinicID'] = 0; + // body['ClinicID'] = 0; body['DoctorID'] = doctorProfile.doctorID; await baseAppClient.post( @@ -182,7 +191,7 @@ class PatientReferralService extends LookupService { Future getPatientReferral(PatiantInformtion patient) async { hasError = false; Map body = Map(); - body['PatientMRN'] = patient.patientMRN; + body['PatientMRN'] = patient.patientMRN ?? patient.patientId; body['AppointmentNo'] = patient.appointmentNo; await baseAppClient.post( @@ -249,7 +258,7 @@ class PatientReferralService extends LookupService { .add({"goalId": element.id, "remarks": element.remarks}); }); - body['PatientMRN'] = patient.patientMRN; + body['PatientMRN'] = patient.patientMRN ?? patient.patientId; body['AppointmentNo'] = patient.appointmentNo; body['SetupID'] = setupID; body['appointmentDate'] = isoStringDate; @@ -275,4 +284,45 @@ class PatientReferralService extends LookupService { body: body, ); } + + Future getReferralFrequencyList() async { + hasError = false; + + Map body = Map(); + + await baseAppClient.post( + PATIENT_GET_LIST_REFERAL_URL, + onSuccess: (dynamic response, int statusCode) { + frequencyList = []; + frequencyList = response['list_STPReferralFrequency']; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: body, + ); + } + + + Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async { + hasError = false; + + Map body = Map(); + body['ProjectID'] = referredPatient.projectID; + body['AdmissionNo'] = referredPatient.admissionNo; + body['LineItemNo'] = referredPatient.lineItemNo; + + await baseAppClient.post( + Verify_Referral_Doctor_Remarks, + onSuccess: (dynamic response, int statusCode) { + + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: body, + ); + } } diff --git a/lib/core/service/patient-ucaf-service.dart b/lib/core/service/patient-ucaf-service.dart index 90a45ee2..ec2885f5 100644 --- a/lib/core/service/patient-ucaf-service.dart +++ b/lib/core/service/patient-ucaf-service.dart @@ -1,18 +1,16 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/prescription_model.dart'; -import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; 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'; class UcafService extends LookupService { List patientChiefComplaintList = []; - VitalSignData patientVitalSigns; + List patientVitalSignsHistory = []; List patientAssessmentList = []; List orderProcedureList = []; PrescriptionModel prescriptionList; @@ -38,21 +36,28 @@ class UcafService extends LookupService { }, body: body); } - Future getPatientVitalSign(PatiantInformtion patient) async { - patientVitalSigns = null; + Future getPatientVitalSignsHistory( + PatiantInformtion patient, String fromDate, String toDate) async { hasError = false; Map body = Map(); - body['PatientMRN'] = patient.patientMRN; - body['AppointmentNo'] = patient.appointmentNo; + body['PatientMRN'] = patient.patientId; // patient.patientMRN + // body['AppointmentNo'] = patient.appointmentNo; // body['EpisodeID'] = patient.episodeNo; + body['PatientTypeID'] = 1; + body['PatientType'] = 1; + body['DeviceTypeID'] = 1; + body['isDentalAllowedBackend'] = false; + body['From'] = fromDate; + body['To'] = toDate; await baseAppClient.post( GET_PATIENT_VITAL_SIGN_DATA, onSuccess: (dynamic response, int statusCode) { - if(response['VitalSignsList'] != null){ - if(response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0){ - patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]); - } + patientVitalSignsHistory.clear(); + if (response['VitalSignsHistory'] != null) { + response['VitalSignsHistory'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); } }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/patient-vital-signs-service.dart b/lib/core/service/patient-vital-signs-service.dart index 75bc955f..c302dbbd 100644 --- a/lib/core/service/patient-vital-signs-service.dart +++ b/lib/core/service/patient-vital-signs-service.dart @@ -1,10 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.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/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'; class VitalSignsService extends BaseService { VitalSignData patientVitalSigns; @@ -68,4 +66,29 @@ class VitalSignsService extends BaseService { body: body, ); } + + Future getInPatientVitalSignHistory(PatiantInformtion patient) async { + hasError = false; + Map body = Map(); + body['PatientID'] = patient.patientId; + body['InOutPatientType'] = 1; + body['PatientTypeID'] = 1; + + await baseAppClient.post( + GET_PATIENT_VITAL_SIGN, + onSuccess: (dynamic response, int statusCode) { + patientVitalSignsHistory.clear(); + if (response['List_DoctorPatientVitalSign'] != null) { + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); + } + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, + body: body, + ); + } } diff --git a/lib/core/service/patient_service.dart b/lib/core/service/patient_service.dart index 477d9d80..e15cc8d1 100644 --- a/lib/core/service/patient_service.dart +++ b/lib/core/service/patient_service.dart @@ -1,17 +1,17 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/doctor/request_schedule.dart'; -import 'package:doctor_app_flutter/models/patient/PatientArrivalEntity.dart'; import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart'; import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart'; import 'package:doctor_app_flutter/models/patient/get_list_stp_referral_frequency_request.dart'; import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result_req_model.dart'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; @@ -51,9 +51,9 @@ class PatientService extends BaseService { List get labResultList => _labResultList; // TODO: replace var with model - var _patientProgressNoteList = []; + List _patientProgressNoteList = []; - get patientProgressNoteList => _patientProgressNoteList; + List get patientProgressNoteList => _patientProgressNoteList; // TODO: replace var with model var _insuranceApporvalsList = []; @@ -130,49 +130,14 @@ class PatientService extends BaseService { "IsLoginForDoctorApp": patient.IsLoginForDoctorApp, "PatientOutSA": patient.PatientOutSA, "SearchType": patient.Searchtype, - "MobileNo": '' + "MobileNo": patient.MobileNo, + "IdentificationNo": patient.IdentificationNo }, ); return Future.value(localRes); } - Future getPatientVitalSign(patient) async { - hasError = false; - await baseAppClient.post( - GET_PATIENT_VITAL_SIGN, - onSuccess: (dynamic response, int statusCode) { - _patientVitalSignList = []; - response['List_DoctorPatientVitalSign'].forEach((v) { - _patientVitalSignList.add(new VitalSignResModel.fromJson(v)); - }); - - if (_patientVitalSignList.length > 0) { - List patientVitalSignOrderdSubListTemp = []; - patientVitalSignOrderdSubListTemp = _patientVitalSignList; - patientVitalSignOrderdSubListTemp - .sort((VitalSignResModel a, VitalSignResModel b) { - return b.vitalSignDate.microsecondsSinceEpoch - - a.vitalSignDate.microsecondsSinceEpoch; - }); - patientVitalSignOrderdSubList.clear(); - int length = patientVitalSignOrderdSubListTemp.length >= 20 - ? 20 - : patientVitalSignOrderdSubListTemp.length; - for (int x = 0; x < length; x++) { - patientVitalSignOrderdSubList - .add(patientVitalSignOrderdSubListTemp[x]); - } - } - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, - body: patient, - ); - } - Future getLabResultOrders(patient) async { hasError = false; await baseAppClient.post( @@ -312,7 +277,10 @@ class PatientService extends BaseService { PATIENT_PROGRESS_NOTE_URL, onSuccess: (dynamic response, int statusCode) { _patientProgressNoteList = []; - _patientProgressNoteList = response['List_GetPregressNoteForInPatient']; + // _patientProgressNoteList = + response['List_GetPregressNoteForInPatient'].forEach((v) { + _patientProgressNoteList.add(new NoteModel.fromJson(v)); + }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -322,6 +290,38 @@ class PatientService extends BaseService { ); } + Future updatePatientProgressNote(UpdateNoteReqModel req) async { + hasError = false; + + await baseAppClient.post( + UPDATE_PROGRESS_NOTE_FOR_INPATIENT, + onSuccess: (dynamic response, int statusCode) { + print("ok"); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: req.toJson(), + ); + } + + Future createPatientProgressNote(CreateNoteModel req) async { + hasError = false; + + await baseAppClient.post( + CREATE_PROGRESS_NOTE_FOR_INPATIENT, + onSuccess: (dynamic response, int statusCode) { + print("ok"); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: req.toJson(), + ); + } + Future getClinicsList() async { hasError = false; @@ -356,7 +356,7 @@ class PatientService extends BaseService { ); } - Future getDoctorsList(String clinicId) async { + Future getDoctorsList(int clinicId) async { hasError = false; _doctorsByClinicIdRequest.clinicID = clinicId; await baseAppClient.post( diff --git a/lib/core/service/prescription_service.dart b/lib/core/service/prescription_service.dart index 758f4595..dc74901e 100644 --- a/lib/core/service/prescription_service.dart +++ b/lib/core/service/prescription_service.dart @@ -3,17 +3,14 @@ import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/item_by_medicine_request_model.dart'; -import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; -import 'package:doctor_app_flutter/core/model/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; +import 'package:doctor_app_flutter/core/model/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug_request_model.dart'; -import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; 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/util/date-utils.dart'; @@ -112,9 +109,9 @@ class PrescriptionService extends LookupService { }, body: _drugRequestModel.toJson()); } - Future getMedicationList() async { + Future getMedicationList({String drug =''}) async { hasError = false; - _drugRequestModel.search = [""]; + _drugRequestModel.search = ["$drug"]; await baseAppClient.post(SEARCH_DRUG, onSuccess: (dynamic response, int statusCode) { allMedicationList = []; diff --git a/lib/core/service/prescriptions_service.dart b/lib/core/service/prescriptions_service.dart index c720eec9..90d65de9 100644 --- a/lib/core/service/prescriptions_service.dart +++ b/lib/core/service/prescriptions_service.dart @@ -1,6 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/in_patient_prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; @@ -15,12 +17,37 @@ import 'base/base_service.dart'; class PrescriptionsService extends BaseService { List prescriptionsList = List(); List prescriptionsOrderList = List(); + List prescriptionInPatientList = List(); + + InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = + InPatientPrescriptionRequestModel(); + + Future getPrescriptionInPatient({int mrn, String adn}) async { + _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel( + patientMRN: mrn, + admissionNo: adn, + ); + hasError = false; + prescriptionInPatientList.clear(); + + await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, + onSuccess: (dynamic response, int statusCode) { + prescriptionsList.clear(); + response['List_PrescriptionReportForInPatient'].forEach((prescriptions) { + prescriptionInPatientList + .add(PrescriotionInPatient.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _inPatientPrescriptionRequestModel.toJson()); + } Future getPrescriptions(PatiantInformtion patient) async { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(PRESCRIPTIONS,patient: patient, + await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) { prescriptionsList.clear(); response['PatientPrescriptionList'].forEach((prescriptions) { @@ -37,7 +64,9 @@ class PrescriptionsService extends BaseService { appointmentNo: 0, isDentalAllowedBackend: false); List prescriptionReportList = List(); - Future getPrescriptionReport({Prescriptions prescriptions,@required PatiantInformtion patient}) async { + Future getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { hasError = false; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; _requestPrescriptionReport.projectID = prescriptions.projectID; @@ -50,8 +79,7 @@ class PrescriptionsService extends BaseService { prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, - onSuccess: (dynamic response, int statusCode) { + patient: patient, onSuccess: (dynamic response, int statusCode) { prescriptionReportList.clear(); prescriptionReportEnhList.clear(); if (prescriptions.isInOutPatient) { @@ -82,11 +110,11 @@ class PrescriptionsService extends BaseService { ); List pharmacyPrescriptionsList = List(); - Future getListPharmacyForPrescriptions({int itemId,@required PatiantInformtion patient}) async { + Future getListPharmacyForPrescriptions( + {int itemId, @required PatiantInformtion patient}) async { hasError = false; requestGetListPharmacyForPrescriptions.itemID = itemId; - await baseAppClient.postPatient(GET_PHARMACY_LIST, - patient: patient, + await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, onSuccess: (dynamic response, int statusCode) { pharmacyPrescriptionsList.clear(); response['PharmList'].forEach((prescriptions) { @@ -107,7 +135,8 @@ class PrescriptionsService extends BaseService { List prescriptionReportEnhList = List(); Future getPrescriptionReportEnh( - {PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async { + {PrescriptionsOrder prescriptionsOrder, + @required PatiantInformtion patient}) async { ///This logic copy from the old app from class [order-history.component.ts] in line 45 bool isInPatient = false; prescriptionsList.forEach((element) { @@ -141,8 +170,7 @@ class PrescriptionsService extends BaseService { await baseAppClient.postPatient( isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, - onSuccess: (dynamic response, int statusCode) { + patient: patient, onSuccess: (dynamic response, int statusCode) { prescriptionReportEnhList.clear(); if (isInPatient) { @@ -163,20 +191,21 @@ class PrescriptionsService extends BaseService { super.error = error; }, body: _requestPrescriptionReportEnh.toJson()); } + Future getPrescriptionsOrders() async { Map body = Map(); body['isDentalAllowedBackend'] = false; await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) { - prescriptionsOrderList.clear(); - response['PatientER_GetPatientAllPresOrdersList'] - .forEach((prescriptionsOrder) { - prescriptionsOrderList - .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + prescriptionsOrderList.clear(); + response['PatientER_GetPatientAllPresOrdersList'] + .forEach((prescriptionsOrder) { + prescriptionsOrderList + .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } } diff --git a/lib/core/service/procedure_service.dart b/lib/core/service/procedure_service.dart index f61166b9..64d60002 100644 --- a/lib/core/service/procedure_service.dart +++ b/lib/core/service/procedure_service.dart @@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_request_model.dart'; -import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart'; @@ -10,8 +9,6 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_reque import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:flutter/foundation.dart'; - class ProcedureService extends BaseService { List _procedureList = List(); List get procedureList => _procedureList; diff --git a/lib/core/service/radiology_service.dart b/lib/core/service/radiology_service.dart index 9c1f5a60..b1c0fbd4 100644 --- a/lib/core/service/radiology_service.dart +++ b/lib/core/service/radiology_service.dart @@ -1,6 +1,5 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; -import 'package:doctor_app_flutter/core/model/radiology/request_send_rad_report_email.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:flutter/cupertino.dart'; @@ -14,7 +13,7 @@ class RadiologyService extends BaseService { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; - body['LineIt emNo'] = lineItem; + body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; await baseAppClient.postPatient(GET_RAD_IMAGE_URL, @@ -27,19 +26,31 @@ class RadiologyService extends BaseService { }, body: body); } - Future getPatientRadOrders(PatiantInformtion patient) async { + Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async { + String url = GET_PATIENT_ORDERS; + final Map body = new Map(); + if(isInPatient) { + url = GET_IN_PATIENT_ORDERS; + body['ProjectID'] = patient.projectId; + } + + hasError = false; - await baseAppClient.postPatient(GET_PATIENT_ORDERS, + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { finalRadiologyList.clear(); - response['FinalRadiologyList'].forEach((radiology) { + String label = "ListRAD"; + if(isInPatient) { + label ="List_GetRadOreders"; + } + response[label].forEach((radiology) { finalRadiologyList.add(FinalRadiology.fromJson(radiology)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: Map()); + }, body:body); } diff --git a/lib/core/service/referral_patient_service.dart b/lib/core/service/referral_patient_service.dart index e3ca6fae..9fc163bd 100644 --- a/lib/core/service/referral_patient_service.dart +++ b/lib/core/service/referral_patient_service.dart @@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; class ReferralPatientService extends BaseService { @@ -11,9 +10,6 @@ class ReferralPatientService extends BaseService { List get listMyReferralPatientModel => _listMyReferralPatientModel; - Helpers helpers = Helpers(); - - RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); diff --git a/lib/core/service/referred_patient_service.dart b/lib/core/service/referred_patient_service.dart index 7285d904..0af9b077 100644 --- a/lib/core/service/referred_patient_service.dart +++ b/lib/core/service/referred_patient_service.dart @@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/doctor/verify_referral_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart'; import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; class ReferredPatientService extends BaseService { List _listMyReferredPatientModel = []; @@ -34,31 +33,4 @@ class ReferredPatientService extends BaseService { ); } - Future verify(MyReferredPatientModel model) async { - _verifyreferraldoctorremarks.patientID = model.projectId; - _verifyreferraldoctorremarks.admissionNo = model.admissionNo; - _verifyreferraldoctorremarks.lineItemNo = model.lineItemNo; - _verifyreferraldoctorremarks.referredDoctorRemarks = - model.referredDoctorRemarks; - _verifyreferraldoctorremarks.referringDoctor = model.referringDoctor; - _verifyreferraldoctorremarks.firstName = model.firstName; - _verifyreferraldoctorremarks.middleName = model.middleName; - _verifyreferraldoctorremarks.lastName = model.lastName; - _verifyreferraldoctorremarks.patientMobileNumber = model.mobileNumber; - _verifyreferraldoctorremarks.patientIdentificationID = - model.patientIdentificationNo; - - await baseAppClient.post( - GET_MY_REFERRED_PATIENT, - onSuccess: (dynamic response, int statusCode) { - listMyReferredPatientModel[listMyReferredPatientModel.indexOf(model)] = - model; - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, - body: _verifyreferraldoctorremarks.toJson(), - ); - } } diff --git a/lib/core/service/sickleave_service.dart b/lib/core/service/sickleave_service.dart index 8a5babd5..bba9b31f 100644 --- a/lib/core/service/sickleave_service.dart +++ b/lib/core/service/sickleave_service.dart @@ -1,4 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/sick_leave_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/sick_leave_patient_request_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; @@ -16,6 +18,7 @@ class SickLeaveService extends BaseService { List reasonse = []; List get getAllSickLeave => _getAllsickLeave; List _getAllsickLeave = []; + List get coveringDoctorsList => _coveringDoctors; List _coveringDoctors = []; @@ -27,6 +30,14 @@ class SickLeaveService extends BaseService { dynamic get sickLeaveResponse => _sickLeaveResponse; dynamic _sickLeaveResponse; + + List get getAllSickLeavePatient => + _getAllsickLeavePatient; + List _getAllsickLeavePatient = []; + + SickLeavePatientRequestModel _sickLeavePatientRequestModel = + SickLeavePatientRequestModel(); + Future getStatistics(appoNo, patientMRN) async { hasError = false; await baseAppClient.post( @@ -104,6 +115,27 @@ class SickLeaveService extends BaseService { ); } + // Future getSickLeavePatient(patientMRN) async { + // _sickLeavePatientRequestModel = + // SickLeavePatientRequestModel(patientID: patientMRN, patientType: 1); + // hasError = false; + // await baseAppClient.post( + // GET_SICK_LEAVE_PATIENT, + // onSuccess: (dynamic response, int statusCode) { + // Future.value(response); + // _getAllsickLeavePatient.clear(); + // response['List_SickLeave'].forEach((v) { + // _getAllsickLeavePatient.add(SickLeavePatientModel.fromJson(v)); + // }); + // }, + // onFailure: (String error, int statusCode) { + // hasError = true; + // super.error = error; + // }, + // body: _sickLeavePatientRequestModel.toJson(), + // ); + // } + Future getRescheduleLeave() async { hasError = false; await baseAppClient.post( @@ -136,8 +168,10 @@ class SickLeaveService extends BaseService { onSuccess: (dynamic response, int statusCode) { offTime = []; response['MasterLookUpList']['entityList'].forEach((item) => { - if (item['code'] == '1' || item['code'] == '2') - {offTime.add(item)} + //if (item['code'] == '1' || item['code'] == '2') + // { + offTime.add(item) + //}// }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/viewModel/DischargedPatientViewModel.dart b/lib/core/viewModel/DischargedPatientViewModel.dart new file mode 100644 index 00000000..339e9505 --- /dev/null +++ b/lib/core/viewModel/DischargedPatientViewModel.dart @@ -0,0 +1,65 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class DischargedPatientViewModel extends BaseViewModel { + DischargedPatientService _dischargedPatientService = + locator(); + + List get myDischargedPatient => + _dischargedPatientService.myDischargedPatients; + + + + List get filterData => filterData2.isNotEmpty? filterData2:myDischargedPatient; + + List filterData2 = []; + + searchData(String str) { + var strExist = str.length > 0 ? true : false; + if (strExist) { + filterData2 = []; + for (var i = 0; i < myDischargedPatient.length; i++) { + String firstName = myDischargedPatient[i].firstName.toUpperCase(); + String lastName = myDischargedPatient[i].lastName.toUpperCase(); + String mobile = myDischargedPatient[i].mobileNumber.toUpperCase(); + String patientID = myDischargedPatient[i].patientId.toString(); + + if (firstName.contains(str.toUpperCase()) || + lastName.contains(str.toUpperCase()) || + mobile.contains(str) || + patientID.contains(str)) { + filterData2.add(myDischargedPatient[i]); + } + } + notifyListeners(); + } else { + filterData2 = myDischargedPatient; + notifyListeners(); + } + } + + + Future getDischargedPatient() async { + setState(ViewState.Busy); + await _dischargedPatientService.getDischargedPatient(); + if (_dischargedPatientService.hasError) { + error = _dischargedPatientService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future gtMyDischargeReferralPatient() async { + setState(ViewState.Busy); + await _dischargedPatientService.gtMyDischargeReferralPatient(); + if (_dischargedPatientService.hasError) { + error = _dischargedPatientService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModel/InsuranceViewModel.dart b/lib/core/viewModel/InsuranceViewModel.dart index b08469ef..54e61635 100644 --- a/lib/core/viewModel/InsuranceViewModel.dart +++ b/lib/core/viewModel/InsuranceViewModel.dart @@ -1,31 +1,45 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/insurance_approval.dart'; +import 'package:doctor_app_flutter/core/model/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/service/InsuranceCardService.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import '../../locator.dart'; -class InsuranceViewModel extends BaseViewModel{ - +class InsuranceViewModel extends BaseViewModel { InsuranceCardService _insuranceCardService = locator(); - List get insuranceApproval => _insuranceCardService.insuranceApproval; + List get insuranceApprovalInPatient => + _insuranceCardService.insuranceApprovalInPatient; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + Future getInsuranceApproval(PatiantInformtion patient, + {int appointmentNo, int projectId}) async { error = ""; setState(ViewState.Busy); if (appointmentNo != null) await _insuranceCardService.getInsuranceApproval(patient, - appointmentNo: appointmentNo); + appointmentNo: appointmentNo, projectId: projectId); else await _insuranceCardService.getInsuranceApproval(patient); + if (_insuranceCardService.hasError) { + error = "No Insurance Approval Found"; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getInsuranceInPatient({int mrn}) async { + //hasError = false; + //_insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _insuranceCardService.getInsuranceApprovalInPatient(mrn: mrn); if (_insuranceCardService.hasError) { error = _insuranceCardService.error; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } -} \ No newline at end of file +} diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index 600a83a5..274c983f 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; @@ -24,7 +25,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:flutter/material.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/auth_view_model.dart b/lib/core/viewModel/auth_view_model.dart index 87b89123..4e40fe31 100644 --- a/lib/core/viewModel/auth_view_model.dart +++ b/lib/core/viewModel/auth_view_model.dart @@ -1,22 +1,17 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/imei_details.dart'; import 'package:doctor_app_flutter/core/model/insert_imei_model.dart'; -import 'package:doctor_app_flutter/core/service/auth_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/auth/activation_Code_req_model.dart'; import 'package:doctor_app_flutter/models/auth/check_activation_code_request_model.dart'; import 'package:doctor_app_flutter/models/auth/send_activation_code_model2.dart'; import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:doctor_app_flutter/config/config.dart'; + import '../../models/doctor/user_model.dart'; -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } class AuthViewModel extends BaseViewModel { @@ -195,26 +190,19 @@ class AuthViewModel extends BaseViewModel { } } - /* - *@author: Elham Rababah - *@Date:17/5/2020 - *@param: docInfo - *@return:Future - *@desc: getDocProfiles - */ - Future getDocProfiles(docInfo, {bool allowChangeProfile = true}) async { + Future getDocProfiles(docInfo, + {bool allowChangeProfile = true}) async { try { dynamic localRes; await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) { localRes = response; - if(allowChangeProfile) { + if (allowChangeProfile) { doctorProfile = DoctorProfileModel.fromJson(response['DoctorProfileList'][0]); selectedClinicName = - response['DoctorProfileList'][0]['ClinicDescription']; + response['DoctorProfileList'][0]['ClinicDescription']; } - }, onFailure: (String error, int statusCode) { throw error; }, body: docInfo); diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index 9eb3c0fc..fede0793 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -1,6 +1,5 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/dasboard_service.dart'; -import 'package:doctor_app_flutter/core/service/medicine_service.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/doctor_replay_view_model.dart b/lib/core/viewModel/doctor_replay_view_model.dart index 29d3b125..6da7d904 100644 --- a/lib/core/viewModel/doctor_replay_view_model.dart +++ b/lib/core/viewModel/doctor_replay_view_model.dart @@ -19,4 +19,14 @@ class DoctorReplayViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + + Future replay(String referredDoctorRemarks, ListGtMyPatientsQuestions model) async { + setState(ViewState.BusyLocal); + await _doctorReplyService.replay(referredDoctorRemarks, model); + if (_doctorReplyService.hasError) { + error = _doctorReplyService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } } diff --git a/lib/core/viewModel/imei_view_model.dart b/lib/core/viewModel/imei_view_model.dart index 29253b1d..c2d16206 100644 --- a/lib/core/viewModel/imei_view_model.dart +++ b/lib/core/viewModel/imei_view_model.dart @@ -1,14 +1,15 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/imei_details.dart'; import 'package:doctor_app_flutter/core/service/auth_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/doctor/user_model.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; class IMEIViewModel extends BaseViewModel { AuthService _authService = locator(); List get imeiDetails => _authService.dashboardItemsList; - + get loginInfo => _authService.loginInfo; Future selectDeviceImei(imei) async { setState(ViewState.Busy); await _authService.selectDeviceImei(imei); @@ -18,4 +19,15 @@ class IMEIViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + + Future login(UserModel userInfo) async { + setState(ViewState.Busy); + await _authService.login(userInfo); + if (_authService.hasError) { + error = _authService.error; + Helpers.showErrorToast(error); + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } } diff --git a/lib/core/viewModel/labs_view_model.dart b/lib/core/viewModel/labs_view_model.dart index 43851649..020a6184 100644 --- a/lib/core/viewModel/labs_view_model.dart +++ b/lib/core/viewModel/labs_view_model.dart @@ -28,7 +28,7 @@ class LabsViewModel extends BaseViewModel { void getLabs(PatiantInformtion patient) async { setState(ViewState.Busy); - await _labsService.getPatientLabOrdersList(patient); + await _labsService.getPatientLabOrdersList(patient, true); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -89,7 +89,6 @@ class LabsViewModel extends BaseViewModel { List labResultLists = List(); List get labResultListsCoustom { - return labResultLists; } @@ -98,14 +97,16 @@ class LabsViewModel extends BaseViewModel { int clinicID, String invoiceNo, String orderNo, - PatiantInformtion patient}) async { + PatiantInformtion patient, + bool isInpatient}) async { setState(ViewState.Busy); await _labsService.getLaboratoryResult( invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, - patient: patient); + patient: patient, + isInpatient: isInpatient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -114,9 +115,11 @@ class LabsViewModel extends BaseViewModel { } } - getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async { + getPatientLabResult( + {PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { setState(ViewState.Busy); - await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder,patient: patient); + await _labsService.getPatientLabResult( + patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -149,10 +152,14 @@ class LabsViewModel extends BaseViewModel { } getPatientLabOrdersResults( - {PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getPatientLabOrdersResults( - patientLabOrder: patientLabOrder, procedure: procedure,patient: patient); + patientLabOrder: patientLabOrder, + procedure: procedure, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/leave_rechdule_response.dart b/lib/core/viewModel/leave_rechdule_response.dart index d7cab8bf..555e19cf 100644 --- a/lib/core/viewModel/leave_rechdule_response.dart +++ b/lib/core/viewModel/leave_rechdule_response.dart @@ -9,7 +9,8 @@ class GetRescheduleLeavesResponse { int requisitionNo; int requisitionType; int status; - + String createdOn; + String statusDescription; GetRescheduleLeavesResponse( {this.clinicId, this.coveringDoctorId, @@ -20,7 +21,9 @@ class GetRescheduleLeavesResponse { this.reasonId, this.requisitionNo, this.requisitionType, - this.status}); + this.status, + this.createdOn, + this.statusDescription}); GetRescheduleLeavesResponse.fromJson(Map json) { clinicId = json['clinicId']; @@ -33,6 +36,8 @@ class GetRescheduleLeavesResponse { requisitionNo = json['requisitionNo']; requisitionType = json['requisitionType']; status = json['status']; + createdOn = json['createdOn']; + statusDescription = json['statusDescription']; } Map toJson() { @@ -47,6 +52,8 @@ class GetRescheduleLeavesResponse { data['requisitionNo'] = this.requisitionNo; data['requisitionType'] = this.requisitionType; data['status'] = this.status; + data['createdOn'] = this.createdOn; + data['statusDescription'] = this.statusDescription; return data; } } diff --git a/lib/core/viewModel/medical_file_view_model.dart b/lib/core/viewModel/medical_file_view_model.dart index 67760908..194e8323 100644 --- a/lib/core/viewModel/medical_file_view_model.dart +++ b/lib/core/viewModel/medical_file_view_model.dart @@ -1,7 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; import 'package:doctor_app_flutter/core/service/medical_file_service.dart'; - import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; @@ -19,7 +18,7 @@ class MedicalFileViewModel extends BaseViewModel { await _medicalFileService.getMedicalFile(mrn: mrn); if (_medicalFileService.hasError) { error = _medicalFileService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else setState(ViewState.Idle); } diff --git a/lib/core/viewModel/medicine_view_model.dart b/lib/core/viewModel/medicine_view_model.dart index 9e83d63e..c318d401 100644 --- a/lib/core/viewModel/medicine_view_model.dart +++ b/lib/core/viewModel/medicine_view_model.dart @@ -1,7 +1,6 @@ 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/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/service/SOAP_service.dart'; import 'package:doctor_app_flutter/core/service/medicine_service.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; @@ -15,7 +14,7 @@ class MedicineViewModel extends BaseViewModel { PrescriptionService _prescriptionService = locator(); get pharmacyItemsList => _medicineService.pharmacyItemsList; - get searchText=>_medicineService.searchText; + get searchText => _medicineService.searchText; get pharmaciesList => _medicineService.pharmaciesList; get medicationStrengthList => _prescriptionService.medicationStrengthList; @@ -34,7 +33,6 @@ class MedicineViewModel extends BaseViewModel { List get patientAssessmentList => _prescriptionService.patientAssessmentList; - List get allMedicationList => _prescriptionService.allMedicationList; List get itemMedicineList => _prescriptionService.itemMedicineList; @@ -55,6 +53,18 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } + Future getPrescription({int mrn}) async { + //hasError = false; + //_insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _prescriptionService.getPrescription(mrn: mrn); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + Future getMedicineItem(String itemName) async { setState(ViewState.Busy); await _medicineService.getMedicineItem(itemName); @@ -65,9 +75,9 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getMedicationList() async { + Future getMedicationList({String drug}) async { setState(ViewState.Busy); - await _prescriptionService.getMedicationList(); + await _prescriptionService.getMedicationList(drug: drug); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/patient-admission-request-viewmodel.dart b/lib/core/viewModel/patient-admission-request-viewmodel.dart index 44261c26..9d43ec48 100644 --- a/lib/core/viewModel/patient-admission-request-viewmodel.dart +++ b/lib/core/viewModel/patient-admission-request-viewmodel.dart @@ -1,11 +1,8 @@ -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/admission-request.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'; import '../../locator.dart'; @@ -114,9 +111,9 @@ class AdmissionRequestViewModel extends BaseViewModel{ } } - Future getDietTypes() async { + Future getDietTypes(int patientMrn) async { setState(ViewState.BusyLocal); - await _admissionRequestService.getDietTypesList(); + await _admissionRequestService.getDietTypesList(patientMrn); if (_admissionRequestService.hasError) { error = _admissionRequestService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 00ef09f6..aaa0d35e 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -1,11 +1,15 @@ -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/DischargeReferralPatient.dart'; +import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart'; +import 'package:doctor_app_flutter/core/service/DischargedPatientService.dart'; +import 'package:doctor_app_flutter/core/service/MyReferralPatientService.dart'; +import 'package:doctor_app_flutter/core/service/ReferralService.dart'; import 'package:doctor_app_flutter/core/service/patient-doctor-referral-service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -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/clinic-doctor.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'; @@ -17,11 +21,29 @@ class PatientReferralViewModel extends BaseViewModel { PatientReferralService _referralPatientService = locator(); + ReferralService _referralService = locator(); + + MyReferralInPatientService _myReferralService = + locator(); + + DischargedPatientService _dischargedPatientService = locator(); + List get myDischargeReferralPatient => + _dischargedPatientService.myDischargeReferralPatients; + List get branchesList => _referralPatientService.projectsList; List get clinicsList => _referralPatientService.clinicsList; - List get doctorsList => _referralPatientService.doctorsList; + List get referralFrequencyList => + _referralPatientService.frequencyList; + + List doctorsList = []; + + List get clinicDoctorsList => + _referralPatientService.doctorsList; + + List get myReferralPatients => + _myReferralService.myReferralPatients; List get listMyReferredPatientModel => _referralPatientService.listMyReferredPatientModel; @@ -82,14 +104,20 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getClinicDoctors(String clinicId) async { + Future getClinicDoctors( + PatiantInformtion patient, int clinicId, int branchId) async { setState(ViewState.BusyLocal); - await _referralPatientService.getDoctorsList(clinicId); + await _referralPatientService.getDoctorsList(patient, clinicId, branchId); if (_referralPatientService.hasError) { error = _referralPatientService.error; setState(ViewState.ErrorLocal); - } else + } else { + doctorsList.clear(); + clinicDoctorsList.forEach((element) { + doctorsList.add(element.toJson()); + }); setState(ViewState.Idle); + } } Future getDoctorBranch() async { @@ -128,6 +156,25 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } + Future getMyReferralPatientService() async { + setState(ViewState.Busy); + await _myReferralService.getMyReferralPatientService(); + if (_myReferralService.hasError) { + error = _myReferralService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async{ + setState(ViewState.Busy); + await _myReferralService.replay(referredDoctorRemarks,referral); + if (_myReferralService.hasError) { + error = _myReferralService.error; + setState(ViewState.ErrorLocal); + } else + getMyReferralPatientService(); + } + Future responseReferral( PendingReferral pendingReferral, bool isAccepted) async { setState(ViewState.Busy); @@ -152,40 +199,176 @@ class PatientReferralViewModel extends BaseViewModel { } } + Future makeInPatientReferral( + {PatiantInformtion patient, + int projectID, + int clinicID, + int doctorID, + int frequencyCode, + int priority, + String referralDate, + String remarks, + String ext}) async { + setState(ViewState.Busy); + await _referralService.referralPatient( + patientID: patient.patientId, + roomID: patient.roomId, + referralClinic: clinicID, + admissionNo: patient.appointmentNo, + referralDoctor: doctorID, + patientTypeID: patient.patientType, + referringDoctorRemarks: remarks, + priority: priority, + frequency: frequencyCode, + extension: ext, + ); + if (_referralService.hasError) { + error = _referralService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + Future getPatientDetails( String fromDate, String toDate, int patientMrn, int appointmentNo) async { setState(ViewState.Busy); await _referralPatientService.getPatientArrivalList(toDate, - fromDate: fromDate, - patientMrn: patientMrn, - appointmentNo: appointmentNo); + fromDate: fromDate, patientMrn: patientMrn); + if (_referralPatientService.hasError) { + error = _referralPatientService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getReferralFrequencyList() async { + setState(ViewState.Busy); + await _referralPatientService.getReferralFrequencyList(); if (_referralPatientService.hasError) { error = _referralPatientService.error; setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future verifyReferralDoctorRemarks( + MyReferredPatientModel referredPatient) async { + setState(ViewState.Busy); + await _referralPatientService.verifyReferralDoctorRemarks(referredPatient); + if (_referralPatientService.hasError) { + error = _referralPatientService.error; + setState(ViewState.ErrorLocal); } else { + getMyReferredPatient(); setState(ViewState.Idle); } } - /* - * model - .getPatientArrivalList()*/ + Future gtMyDischargeReferralPatient() async { + setState(ViewState.Busy); + await _dischargedPatientService.gtMyDischargeReferralPatient(); + if (_dischargedPatientService.hasError) { + error = _dischargedPatientService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } String getReferralStatusNameByCode(int statusCode, BuildContext context) { switch (statusCode) { case 1: - return TranslationBase.of(context).referralStatusHold; + return TranslationBase.of(context).pending /*referralStatusHold*/; case 2: - return TranslationBase.of(context).referralStatusActive; + return TranslationBase.of(context).accepted /*referralStatusActive*/; case 4: - return TranslationBase.of(context).referralStatusCancelled; + return TranslationBase.of(context).rejected /*referralStatusCancelled*/; case 46: - return TranslationBase.of(context).referralStatusCompleted; + return TranslationBase.of(context).accepted /*referralStatusCompleted*/; case 63: - return TranslationBase.of(context).referralStatusNotSeen; + return TranslationBase.of(context).rejected /*referralStatusNotSeen*/; default: return "-"; } } + + PatiantInformtion getPatientFromReferral( + MyReferredPatientModel referredPatient) { + PatiantInformtion patient = PatiantInformtion(); + patient.doctorId = referredPatient.doctorID; + patient.doctorName = referredPatient.doctorName; + patient.patientId = referredPatient.patientID; + patient.firstName = referredPatient.firstName; + patient.middleName = referredPatient.middleName; + patient.lastName = referredPatient.lastName; + patient.gender = referredPatient.gender; + patient.dateofBirth = referredPatient.dateofBirth; + patient.mobileNumber = referredPatient.mobileNumber; + patient.emailAddress = referredPatient.emailAddress; + patient.patientIdentificationNo = referredPatient.patientIdentificationNo; + patient.patientType = referredPatient.patientType; + patient.admissionNo = referredPatient.admissionNo; + patient.admissionDate = referredPatient.admissionDate; + patient.roomId = referredPatient.roomID; + patient.bedId = referredPatient.bedID; + patient.nationalityName = referredPatient.nationalityName; + patient.nationalityFlagURL = referredPatient.nationalityFlagURL; + patient.age = referredPatient.age; + patient.clinicDescription = referredPatient.clinicDescription; + return patient; + } + + PatiantInformtion getPatientFromReferralO( + MyReferralPatientModel referredPatient) { + PatiantInformtion patient = PatiantInformtion(); + patient.doctorId = referredPatient.doctorID; + patient.doctorName = referredPatient.doctorName; + patient.patientId = referredPatient.patientID; + patient.firstName = referredPatient.firstName; + patient.middleName = referredPatient.middleName; + patient.lastName = referredPatient.lastName; + patient.gender = referredPatient.gender; + patient.dateofBirth = referredPatient.dateofBirth; + patient.mobileNumber = referredPatient.mobileNumber; + patient.emailAddress = referredPatient.emailAddress; + patient.patientIdentificationNo = referredPatient.patientIdentificationNo; + patient.patientType = referredPatient.patientType; + patient.admissionNo = referredPatient.admissionNo; + patient.admissionDate = referredPatient.admissionDate; + patient.roomId = referredPatient.roomID; + patient.bedId = referredPatient.bedID; + patient.nationalityName = referredPatient.nationalityName; + patient.nationalityFlagURL = referredPatient.nationalityFlagURL; + patient.age = referredPatient.age; + patient.clinicDescription = referredPatient.clinicDescription; + return patient; + } + + PatiantInformtion getPatientFromDischargeReferralPatient( + DischargeReferralPatient referredPatient) { + PatiantInformtion patient = PatiantInformtion(); + patient.doctorId = referredPatient.doctorID; + patient.doctorName = referredPatient.doctorName; + patient.patientId = referredPatient.patientID; + patient.firstName = referredPatient.firstName; + patient.middleName = referredPatient.middleName; + patient.lastName = referredPatient.lastName; + patient.gender = referredPatient.gender; + patient.dateofBirth = referredPatient.dateofBirth; + patient.mobileNumber = referredPatient.mobileNumber; + patient.emailAddress = referredPatient.emailAddress; + patient.patientIdentificationNo = referredPatient.patientIdentificationNo; + patient.patientType = referredPatient.patientType; + patient.admissionNo = referredPatient.admissionNo; + patient.admissionDate = referredPatient.admissionDate; + patient.roomId = referredPatient.roomID; + patient.bedId = referredPatient.bedID; + patient.nationalityName = referredPatient.nationalityName; + patient.nationalityFlagURL = '';// TODO from backend referredPatient.nationalityFlagURL; + patient.age = referredPatient.age; + patient.clinicDescription = referredPatient.clinicDescription; + return patient; + } } diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index f48ef485..530d92f4 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -9,7 +9,8 @@ import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; 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/util/date-utils.dart'; import 'package:flutter/material.dart'; import '../../locator.dart'; @@ -20,7 +21,8 @@ class UcafViewModel extends BaseViewModel { List get patientChiefComplaintList => _ucafService.patientChiefComplaintList; - VitalSignData get patientVitalSigns => _ucafService.patientVitalSigns; + List get patientVitalSignsHistory => + _ucafService.patientVitalSignsHistory; List get patientAssessmentList => _ucafService.patientAssessmentList; @@ -35,6 +37,13 @@ class UcafViewModel extends BaseViewModel { List get orderProcedures => _ucafService.orderProcedureList; String selectedLanguage; + String heightCm = "0"; + String weightKg = "0"; + String bodyMax = "0"; + String temperatureCelcius = "0"; + String hartRat = "0"; + String respirationBeatPerMinute = "0"; + String bloodPressure = "0 / 0"; resetDataInFirst(){ _ucafService.patientAssessmentList = []; @@ -48,13 +57,54 @@ class UcafViewModel extends BaseViewModel { Future getUCAFData(PatiantInformtion patient) async { setState(ViewState.Busy); - await _ucafService.getPatientVitalSign(patient); + + String from; + String to; + 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 _ucafService.getPatientVitalSignsHistory(patient, from, to); await _ucafService.getPatientChiefComplaint(patient); if (_ucafService.hasError) { error = _ucafService.error; setState(ViewState.Error); } else { + patientVitalSignsHistory.forEach((element) { + if (heightCm == "0" || heightCm == null || heightCm == 'null') { + heightCm = element.heightCm.toString(); + } + if (weightKg == "0" || weightKg == null || weightKg == 'null') { + weightKg = element.weightKg.toString(); + } + if (bodyMax == "0" || bodyMax == null || bodyMax == 'null') { + bodyMax = element.bodyMassIndex.toString(); + } + if (temperatureCelcius == "0" || + temperatureCelcius == null || + temperatureCelcius == 'null') { + temperatureCelcius = element.temperatureCelcius.toString(); + } + if (hartRat == "0" || hartRat == null || hartRat == 'null') { + hartRat = element.pulseBeatPerMinute.toString(); + } + if (respirationBeatPerMinute == "0" || + respirationBeatPerMinute == null || + respirationBeatPerMinute == 'null') { + respirationBeatPerMinute = + element.respirationBeatPerMinute.toString(); + } + if (bloodPressure == "0 / 0" || + bloodPressure == null || + bloodPressure == 'null') { + bloodPressure = element.bloodPressure.toString(); + } + }); + setState(ViewState.Idle); } } diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index 0a51f7f5..06e5371a 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -1,11 +1,9 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient-vital-signs-service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.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/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'; @@ -25,6 +23,13 @@ class VitalSignsViewModel extends BaseViewModel { String hartRat = "0"; String respirationBeatPerMinute = "0"; String bloodPressure = "0 / 0"; + String oxygenation = "0 - 0"; + String painScore = "-"; + String painLocation = "-"; + String painCharacter = "-"; + String painDuration = "-"; + String isPainDone = "-"; + String painFrequency = "-"; Future getPatientVitalSign(PatiantInformtion patient) async { setState(ViewState.Busy); @@ -37,8 +42,8 @@ class VitalSignsViewModel extends BaseViewModel { } } - Future getPatientVitalSignHistory( - PatiantInformtion patient, String from, String to) async { + Future getPatientVitalSignHistory(PatiantInformtion patient, String from, + String to, bool isInPatient) async { setState(ViewState.Busy); if (from == null || from == "0") { from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); @@ -47,7 +52,12 @@ class VitalSignsViewModel extends BaseViewModel { to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } - await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); + if (isInPatient) { + await _vitalSignService.getInPatientVitalSignHistory(patient); + } else { + await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); + } + if (_vitalSignService.hasError) { error = _vitalSignService.error; setState(ViewState.Error); @@ -81,6 +91,32 @@ class VitalSignsViewModel extends BaseViewModel { bloodPressure == 'null') { bloodPressure = element.bloodPressure.toString(); } + if (oxygenation == "0 - 0" || + oxygenation == null || + oxygenation == 'null') { + oxygenation = + "${element.sAO2.toString()} - ${element.fIO2.toString()}"; + } + if (painScore == null || painScore == "-") { + painScore = element.painScore.toString() != 'null' + ? element.painScore.toString() + : "-"; + painLocation = element.painLocation.toString() != 'null' + ? element.painLocation.toString() + : "-"; + painCharacter = element.painCharacter.toString() != 'null' + ? element.painCharacter.toString() + : "-"; + painDuration = element.painDuration.toString() != 'null' + ? element.painDuration.toString() + : "-"; + isPainDone = element.isPainManagementDone.toString() != 'null' + ? element.isPainManagementDone.toString() + : "-"; + painFrequency = element.painFrequency.toString() != 'null' + ? element.painFrequency.toString() + : "-"; + } }); setState(ViewState.Idle); } @@ -101,14 +137,16 @@ class VitalSignsViewModel extends BaseViewModel { int getBMIStatus() { var bodyMassIndex = double.parse(bodyMax); - if (bodyMassIndex <= 18.5) { + if (bodyMassIndex < 18.5) { return 1; - } else if (bodyMassIndex <= 25.0) { + } else if (bodyMassIndex >= 18.5 && bodyMassIndex <= 24.9) { return 2; - } else if (bodyMassIndex <= 30) { + } else if (bodyMassIndex >= 25 && bodyMassIndex <= 29.9) { return 3; - } else { + } else if (bodyMassIndex >= 30 && bodyMassIndex <= 34.9) { return 4; + } else { + return 5; } } diff --git a/lib/core/viewModel/patient_view_model.dart b/lib/core/viewModel/patient_view_model.dart index 5f4b6c9a..3a45036e 100644 --- a/lib/core/viewModel/patient_view_model.dart +++ b/lib/core/viewModel/patient_view_model.dart @@ -1,4 +1,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/service/patient_service.dart'; import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; @@ -39,7 +42,7 @@ class PatientViewModel extends BaseViewModel { get insuranceApporvalsList => _patientService.insuranceApporvalsList; - get patientProgressNoteList => _patientService.patientProgressNoteList; + List get patientProgressNoteList => _patientService.patientProgressNoteList; List get clinicsList => _patientService.clinicsList; @@ -62,20 +65,12 @@ class PatientViewModel extends BaseViewModel { if (_patientService.hasError) { error = _patientService.error; setState(ViewState.Error); + } else{ + setState(ViewState.Idle); } return localRes; } - Future getPatientVitalSign(patient) async { - setState(ViewState.Busy); - await _patientService.getPatientVitalSign(patient); - if (_patientService.hasError) { - error = _patientService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); - } - Future getLabResultOrders(patient) async { setState(ViewState.Busy); await _patientService.getLabResultOrders(patient); @@ -146,12 +141,41 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getPatientProgressNote(patient) async { - setState(ViewState.Busy); + Future getPatientProgressNote(patient, {bool isLocalBusy = false}) async { + if(isLocalBusy) { + setState(ViewState.BusyLocal); + }else{ + setState(ViewState.Busy); + } + await _patientService.getPatientProgressNote(patient); if (_patientService.hasError) { error = _patientService.error; - setState(ViewState.Error); + if(isLocalBusy) { + setState(ViewState.ErrorLocal); + }else{ + setState(ViewState.Error); + } + } else + setState(ViewState.Idle); + } + + Future updatePatientProgressNote(UpdateNoteReqModel req) async { + setState(ViewState.BusyLocal); + await _patientService.updatePatientProgressNote(req); + if (_patientService.hasError) { + error = _patientService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future createPatientProgressNote(CreateNoteModel req) async { + setState(ViewState.BusyLocal); + await _patientService.createPatientProgressNote(req); + if (_patientService.hasError) { + error = _patientService.error; + setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } @@ -170,7 +194,7 @@ class PatientViewModel extends BaseViewModel { } } - Future getDoctorsList(String clinicId) async { + Future getDoctorsList(int clinicId) async { setState(ViewState.BusyLocal); await _patientService.getDoctorsList(clinicId); if (_patientService.hasError) { diff --git a/lib/core/viewModel/prescription_view_model.dart b/lib/core/viewModel/prescription_view_model.dart index a07ae715..c266f3c0 100644 --- a/lib/core/viewModel/prescription_view_model.dart +++ b/lib/core/viewModel/prescription_view_model.dart @@ -1,19 +1,26 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; -import 'package:doctor_app_flutter/core/model/search_drug_model.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart'; +import 'package:doctor_app_flutter/core/service/prescriptions_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; 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:flutter/cupertino.dart'; class PrescriptionViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; bool hasError = false; PrescriptionService _prescriptionService = locator(); List get allMedicationList => @@ -26,6 +33,44 @@ class PrescriptionViewModel extends BaseViewModel { List get drugToDrug => _prescriptionService.drugToDrugList; List get itemMedicineList => _prescriptionService.itemMedicineList; + PrescriptionsService _prescriptionsService = locator(); + + List _prescriptionsOrderListClinic = List(); + List _prescriptionsOrderListHospital = List(); + + List get prescriptionReportList => + _prescriptionsService.prescriptionReportList; + + List get prescriptionsList => + _prescriptionsService.prescriptionsList; + + List get pharmacyPrescriptionsList => + _prescriptionsService.pharmacyPrescriptionsList; + List get prescriptionReportEnhList => + _prescriptionsService.prescriptionReportEnhList; + + List get prescriptionsOrderList => + filterType == FilterType.Clinic + ? _prescriptionsOrderListClinic + : _prescriptionsOrderListHospital; + + List get inPatientPrescription => + _prescriptionsService.prescriptionInPatientList; + + getPrescriptionsInPatient(PatiantInformtion patient) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionInPatient( + mrn: patient.patientId, adn: patient.admissionNo); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + setState(ViewState.Error); + } else { + _filterList(); + await _getPrescriptionsOrders(); + + setState(ViewState.Idle); + } + } Future getItem({int itemID}) async { hasError = false; @@ -66,9 +111,9 @@ class PrescriptionViewModel extends BaseViewModel { } } - Future getMedicationList() async { + Future getMedicationList({String drug}) async { setState(ViewState.Busy); - await _prescriptionService.getMedicationList(); + await _prescriptionService.getMedicationList(drug: drug); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -119,4 +164,116 @@ class PrescriptionViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } + + getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionReport( + prescriptions: prescriptions, patient: patient); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + getListPharmacyForPrescriptions( + {int itemId, @required PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _prescriptionsService.getListPharmacyForPrescriptions( + itemId: itemId, patient: patient); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + void _filterList() { + _prescriptionsService.prescriptionsList.forEach((element) { + /// PrescriptionsList list sort clinic + List prescriptionsByClinic = + _prescriptionsOrderListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); + + if (prescriptionsByClinic.length != 0) { + _prescriptionsOrderListClinic[ + _prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] + .prescriptionsList + .add(element); + } else { + _prescriptionsOrderListClinic.add(PrescriptionsList( + filterName: element.clinicDescription, prescriptions: element)); + } + + /// PrescriptionsList list sort via hospital + List prescriptionsByHospital = + _prescriptionsOrderListHospital + .where( + (elementClinic) => elementClinic.filterName == element.name, + ) + .toList(); + + if (prescriptionsByHospital.length != 0) { + _prescriptionsOrderListHospital[_prescriptionsOrderListHospital + .indexOf(prescriptionsByHospital[0])] + .prescriptionsList + .add(element); + } else { + _prescriptionsOrderListHospital.add(PrescriptionsList( + filterName: element.name, prescriptions: element)); + } + }); + } + + getPrescriptionReportEnh( + {PrescriptionsOrder prescriptionsOrder, + @required PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionReportEnh( + prescriptionsOrder: prescriptionsOrder, patient: patient); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + _getPrescriptionsOrders() async { + await _prescriptionsService.getPrescriptionsOrders(); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + getPrescriptions(PatiantInformtion patient, {String patientType}) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptions(patient); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error; + if (patientType == "7") + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); + } else { + _filterList(); + await _getPrescriptionsOrders(); + + setState(ViewState.Idle); + } + } } diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 6af34f4d..c68ec510 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -1,16 +1,27 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; +import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; +import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; +import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; -import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_valadate_request_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart'; +import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; +import 'package:doctor_app_flutter/core/service/labs_service.dart'; import 'package:doctor_app_flutter/core/service/procedure_service.dart'; +import 'package:doctor_app_flutter/core/service/radiology_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:flutter/cupertino.dart'; class ProcedureViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; bool hasError = false; ProcedureService _procedureService = locator(); List get procedureList => @@ -20,15 +31,40 @@ class ProcedureViewModel extends BaseViewModel { List get categoriesList => _procedureService.categoriesList; List get categoryList => _procedureService.categoryList; + RadiologyService _radiologyService = locator(); + LabsService _labsService = locator(); + List _finalRadiologyListClinic = List(); + List _finalRadiologyListHospital = List(); + List get finalRadiologyList => + filterType == FilterType.Clinic + ? _finalRadiologyListClinic + : _finalRadiologyListHospital; - Future getProcedure({int mrn}) async { + List get radiologyList => + _radiologyService.finalRadiologyList; + + List get labOrdersResultsList => + _labsService.labOrdersResultsList; + + List _patientLabOrdersListClinic = List(); + List _patientLabOrdersListHospital = List(); + + List get patientLabOrdersList => + filterType == FilterType.Clinic + ? _patientLabOrdersListClinic + : _patientLabOrdersListHospital; + + Future getProcedure({int mrn,String patientType}) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); await _procedureService.getProcedure(mrn: mrn); if (_procedureService.hasError) { error = _procedureService.error; - setState(ViewState.ErrorLocal); + if(patientType=="7") + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); } else setState(ViewState.Idle); } @@ -100,5 +136,234 @@ class ProcedureViewModel extends BaseViewModel { } else setState(ViewState.Idle); //await getProcedure(mrn: mrn); + + } + + void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async { + setState(ViewState.Busy); + await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient); + if (_radiologyService.hasError) { + error = _radiologyService.error; + if(patientType=="7") + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); + } else { + _radiologyService.finalRadiologyList.forEach((element) { + List finalRadiologyListClinic = + _finalRadiologyListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); + + if (finalRadiologyListClinic.length != 0) { + _finalRadiologyListClinic[ + finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])] + .finalRadiologyList + .add(element); + } else { + _finalRadiologyListClinic.add(FinalRadiologyList( + filterName: element.clinicDescription, finalRadiology: element)); + } + + // FinalRadiologyList list sort via project + List finalRadiologyListHospital = + _finalRadiologyListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); + + if (finalRadiologyListHospital.length != 0) { + _finalRadiologyListHospital[finalRadiologyListHospital + .indexOf(finalRadiologyListHospital[0])] + .finalRadiologyList + .add(element); + } else { + _finalRadiologyListHospital.add(FinalRadiologyList( + filterName: element.projectName, finalRadiology: element)); + } + }); + + setState(ViewState.Idle); + } + } + + String get radImageURL => _radiologyService.url; + + getRadImageURL( + {int invoiceNo, + int lineItem, + int projectId, + @required PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _radiologyService.getRadImageURL( + invoiceNo: invoiceNo, + lineItem: lineItem, + projectId: projectId, + patient: patient); + if (_radiologyService.hasError) { + error = _radiologyService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } + + List get patientLabSpecialResult => + _labsService.patientLabSpecialResult; + + List get labResultList => _labsService.labResultList; + + List labResultLists = List(); + + List get labResultListsCoustom { + return labResultLists; + } + + void getLabs(PatiantInformtion patient, {bool isInpatient = false}) async { + setState(ViewState.Busy); + await _labsService.getPatientLabOrdersList(patient, isInpatient); + if (_labsService.hasError) { + error = _labsService.error; + setState(ViewState.Error); + } else { + _labsService.patientLabOrdersList.forEach((element) { + List patientLabOrdersClinic = + _patientLabOrdersListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); + + if (patientLabOrdersClinic.length != 0) { + _patientLabOrdersListClinic[_patientLabOrdersListClinic + .indexOf(patientLabOrdersClinic[0])] + .patientLabOrdersList + .add(element); + } else { + _patientLabOrdersListClinic.add(PatientLabOrdersList( + filterName: element.clinicDescription, + patientDoctorAppointment: element)); + } + + // doctor list sort via project + List patientLabOrdersHospital = + _patientLabOrdersListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); + + if (patientLabOrdersHospital.length != 0) { + _patientLabOrdersListHospital[_patientLabOrdersListHospital + .indexOf(patientLabOrdersHospital[0])] + .patientLabOrdersList + .add(element); + } else { + _patientLabOrdersListHospital.add(PatientLabOrdersList( + filterName: element.projectName, + patientDoctorAppointment: element)); + } + }); + + setState(ViewState.Idle); + } + } + + getLaboratoryResult( + {String projectID, + int clinicID, + String invoiceNo, + String orderNo, + PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _labsService.getLaboratoryResult( + invoiceNo: invoiceNo, + orderNo: orderNo, + projectID: projectID, + clinicID: clinicID, + patient: patient); + if (_labsService.hasError) { + error = _labsService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + getPatientLabResult( + {PatientLabOrders patientLabOrder, PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _labsService.getPatientLabResult( + patientLabOrder: patientLabOrder, patient: patient); + if (_labsService.hasError) { + error = _labsService.error; + setState(ViewState.Error); + } else { + _labsService.labResultList.forEach((element) { + List patientLabOrdersClinic = labResultLists + .where( + (elementClinic) => elementClinic.filterName == element.testCode) + .toList(); + + if (patientLabOrdersClinic.length != 0) { + var value = + labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])] + .patientLabResultList + .where((e) => + e.sampleCollectedOn == element.sampleCollectedOn && + e.resultValue == element.resultValue) + .toList(); + if (value.isEmpty) + labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])] + .patientLabResultList + .add(element); + } else { + labResultLists + .add(LabResultList(filterName: element.testCode, lab: element)); + } + }); + setState(ViewState.Idle); + } + } + + getPatientLabOrdersResults( + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _labsService.getPatientLabOrdersResults( + patientLabOrder: patientLabOrder, + procedure: procedure, + patient: patient); + if (_labsService.hasError) { + error = _labsService.error; + setState(ViewState.Error); + } else { + bool isShouldClear = false; + if (_labsService.labOrdersResultsList.length == 1) { + labOrdersResultsList.forEach((element) { + if (element.resultValue.contains('/') || + element.resultValue.contains('*') || + element.resultValue.isEmpty) isShouldClear = true; + }); + } + if (isShouldClear) _labsService.labOrdersResultsList.clear(); + setState(ViewState.Idle); + } + } + + sendLabReportEmail({PatientLabOrders patientLabOrder, String mes}) async { + await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder); + if (_labsService.hasError) { + error = _labsService.error; + } else + DrAppToastMsg.showSuccesToast(mes); } } diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index e144042e..97974a04 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -4,10 +4,10 @@ import 'package:connectivity/connectivity.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; -import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/viewModel/radiology_view_model.dart b/lib/core/viewModel/radiology_view_model.dart index 3a194970..4e3768dc 100644 --- a/lib/core/viewModel/radiology_view_model.dart +++ b/lib/core/viewModel/radiology_view_model.dart @@ -20,9 +20,9 @@ class RadiologyViewModel extends BaseViewModel { ? _finalRadiologyListClinic : _finalRadiologyListHospital; - void getPatientRadOrders(PatiantInformtion patient) async { + void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async { setState(ViewState.Busy); - await _radiologyService.getPatientRadOrders(patient); + await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient); if (_radiologyService.hasError) { error = _radiologyService.error; setState(ViewState.Error); @@ -70,10 +70,17 @@ class RadiologyViewModel extends BaseViewModel { String get radImageURL => _radiologyService.url; - getRadImageURL({int invoiceNo, int lineItem, int projectId,@required PatiantInformtion patient}) async { + getRadImageURL( + {int invoiceNo, + int lineItem, + int projectId, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); await _radiologyService.getRadImageURL( - invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId,patient: patient); + invoiceNo: invoiceNo, + lineItem: lineItem, + projectId: projectId, + patient: patient); if (_radiologyService.hasError) { error = _radiologyService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/referred_view_model.dart b/lib/core/viewModel/referred_view_model.dart index b5e3ecdc..2aa996f6 100644 --- a/lib/core/viewModel/referred_view_model.dart +++ b/lib/core/viewModel/referred_view_model.dart @@ -20,13 +20,4 @@ class ReferredPatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future verify(MyReferredPatientModel model) async { - setState(ViewState.BusyLocal); - await _referralPatientService.verify(model); - if (_referralPatientService.hasError) { - error = _referralPatientService.error; - setState(ViewState.ErrorLocal); - } else - setState(ViewState.Idle); - } } diff --git a/lib/core/viewModel/sick_leave_view_model.dart b/lib/core/viewModel/sick_leave_view_model.dart index 80f9ea1d..d959f3aa 100644 --- a/lib/core/viewModel/sick_leave_view_model.dart +++ b/lib/core/viewModel/sick_leave_view_model.dart @@ -1,8 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/sickleave_service.dart'; -import 'package:doctor_app_flutter/core/service/medicine_service.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; -import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart'; import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import '../../locator.dart'; @@ -89,13 +87,14 @@ class SickLeaveViewModel extends BaseViewModel { } Future getCoveringDoctors() async { - setState(ViewState.Busy); + //setState(ViewState.Busy); await _sickLeaveService.getCoveringDoctors(); if (_sickLeaveService.hasError) { error = _sickLeaveService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); + // setState(ViewState.Error); + } + //else + // setState(ViewState.Idle); } Future addReschedule(request) async { diff --git a/lib/icons_app/config.json b/lib/icons_app/config.json index ee0723f4..2a88ccfa 100644 --- a/lib/icons_app/config.json +++ b/lib/icons_app/config.json @@ -480,12 +480,26 @@ "code": 59419, "src": "mfglabs" }, + { + "uid": "84aaf4992ded44854de2b7090335db03", + "css": "progress-notes", + "code": 59409, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M400 266.7V33.4A33.4 33.4 0 0 1 466.6 33.4V266.7ZM300 933.3A99.3 99.3 0 0 1 229.3 904.1 1011.6 1011.6 0 0 1 0 550.5V966.6A33.4 33.4 0 0 0 33.4 1000H833.3A33.4 33.4 0 0 0 866.7 966.6V933.3ZM1128 809.7A885.7 885.7 0 0 1 866.6 189.5V166.6A33.4 33.4 0 0 0 833.3 133.3H533.3V300A33.4 33.4 0 0 1 500 333.3H366.6A33.4 33.4 0 0 1 333.3 300V133.3H33.4A33.4 33.4 0 0 0 0 166.7V189.6A943.4 943.4 0 0 0 276.4 856.9 33.4 33.4 0 0 0 300 866.7H1104.5A33.4 33.4 0 0 0 1128.1 809.8ZM433.3 400H700A33.4 33.4 0 0 1 700 466.6H433.3A33.4 33.4 0 0 1 433.3 400ZM700 733.3H366.7A33.4 33.4 0 0 1 366.7 666.6H700A33.4 33.4 0 0 1 700 733.3ZM766.7 600H300A33.4 33.4 0 1 1 300 533.3H766.7A33.4 33.4 0 1 1 766.7 600Z", + "width": 1138 + }, + "search": [ + "progress-notes" + ] + }, { "uid": "740f78c2b53c8cc100a8b0d283bbd34f", "css": "home_icon-1", - "code": 59403, + "code": 59410, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { "path": "M973.1 435L973.1 435 565 27A92 92 0 0 0 434.9 27L27.2 434.7 26.8 435.1A92 92 0 0 0 88 591.9C88.9 591.9 89.9 591.9 90.8 591.9H107.1V892.1A107.9 107.9 0 0 0 214.8 999.9H374.4A29.3 29.3 0 0 0 403.7 970.6V735.3A49.2 49.2 0 0 1 452.9 686.2H547A49.2 49.2 0 0 1 596.2 735.3V970.7A29.3 29.3 0 0 0 625.5 1000H785.1A107.9 107.9 0 0 0 892.8 892.3V592H907.8A92.1 92.1 0 0 0 973 434.9ZM931.6 523.7A33.4 33.4 0 0 1 907.9 533.5H863.5A29.3 29.3 0 0 0 834.2 562.8V892.3A49.2 49.2 0 0 1 785.1 941.4H654.9V735.3A107.9 107.9 0 0 0 547 627.5H452.9A107.9 107.9 0 0 0 345.1 735.2V941.3H215A49.2 49.2 0 0 1 165.8 892.1V562.8A29.3 29.3 0 0 0 136.5 533.5H92.8L91.4 533.5A33.4 33.4 0 0 1 68.4 476.4H68.4L476.3 68.4A33.4 33.4 0 0 1 523.6 68.4L931.4 476.2 931.6 476.4A33.4 33.4 0 0 1 931.6 523.7ZM931.6 523.7", "width": 1000 @@ -497,9 +511,9 @@ { "uid": "a0ef39403e015fe3fe4252f11df60fda", "css": "home_icon_active-1", - "code": 59404, + "code": 59420, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { "path": "M973.1 435L973.1 435 565 27A92.1 92.1 0 0 0 434.9 27L27.1 434.7 26.7 435.1A92 92 0 0 0 88 592C88.9 592 89.9 592 90.8 592H107.1V892.2A107.9 107.9 0 0 0 214.8 999.9H374.4A29.3 29.3 0 0 0 403.7 970.6V735.4A49.2 49.2 0 0 1 452.9 686.2H547A49.2 49.2 0 0 1 596.2 735.4V970.7A29.3 29.3 0 0 0 625.5 1000H785.1A107.9 107.9 0 0 0 892.8 892.3V592.1H907.8A92.1 92.1 0 0 0 973 434.9ZM931.6 523.7A33.4 33.4 0 0 1 907.9 533.5H863.5A29.3 29.3 0 0 0 834.2 562.8V892.3A49.2 49.2 0 0 1 785.1 941.5H654.9V735.4A107.9 107.9 0 0 0 547 627.5H452.9A107.9 107.9 0 0 0 345.1 735.2V941.3H214.9A49.2 49.2 0 0 1 165.8 892.1V562.8A29.3 29.3 0 0 0 136.5 533.5H92.8L91.4 533.5A33.4 33.4 0 0 1 68.3 476.4H68.3L476.3 68.4A33.4 33.4 0 0 1 523.6 68.4L931.4 476.2 931.6 476.4A33.4 33.4 0 0 1 931.6 523.7ZM931.6 523.7", "width": 1000 @@ -511,9 +525,9 @@ { "uid": "9d734a7694af3729960d4b9060982cc0", "css": "menu_icon-1", - "code": 59407, + "code": 59421, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { "path": "M406.7 0H83.2A83.3 83.3 0 0 0 0 83.2V406.7A83.3 83.3 0 0 0 83.2 489.9H406.7A83.3 83.3 0 0 0 489.9 406.7V83.2A83.3 83.3 0 0 0 406.7 0ZM406.7 449.1H83.2A42.4 42.4 0 0 1 40.8 406.7V83.2A42.4 42.4 0 0 1 83.2 40.8H406.7A42.4 42.4 0 0 1 449 83.2V406.7H449A42.4 42.4 0 0 1 406.7 449.1ZM916.8 0H593.3A83.3 83.3 0 0 0 510.1 83.2V406.7A83.3 83.3 0 0 0 593.3 489.9H916.8A83.3 83.3 0 0 0 1000 406.7V83.2A83.3 83.3 0 0 0 916.8 0ZM959.1 406.7A42.4 42.4 0 0 1 916.8 449.1H593.3A42.4 42.4 0 0 1 550.9 406.7V83.2A42.4 42.4 0 0 1 593.3 40.8H916.8A42.4 42.4 0 0 1 959.1 83.2ZM406.7 510.1H83.2A83.3 83.3 0 0 0 0 593.3V916.8A83.3 83.3 0 0 0 83.2 1000H406.7A83.3 83.3 0 0 0 489.9 916.8V593.3A83.3 83.3 0 0 0 406.7 510.1ZM406.7 959.2H83.2A42.4 42.4 0 0 1 40.8 916.8V593.3A42.4 42.4 0 0 1 83.2 550.9H406.7A42.4 42.4 0 0 1 449 593.3V916.8H449A42.4 42.4 0 0 1 406.7 959.1ZM916.8 510.1H593.3A83.3 83.3 0 0 0 510.1 593.3V916.8A83.3 83.3 0 0 0 593.3 1000H916.8A83.3 83.3 0 0 0 1000 916.8V593.3A83.3 83.3 0 0 0 916.8 510.1ZM959.1 916.8A42.4 42.4 0 0 1 916.8 959.2H593.3A42.4 42.4 0 0 1 550.9 916.8V593.3A42.4 42.4 0 0 1 593.3 550.9H916.8A42.4 42.4 0 0 1 959.1 593.3Z", "width": 1000 @@ -523,59 +537,59 @@ ] }, { - "uid": "e2f6f0a56d4570c777c8bd5c50e38ea7", - "css": "menu_icon_active-1", - "code": 59409, + "uid": "692c2d7a7dd50e46b66699b0e1b27dab", + "css": "height", + "code": 59453, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M406.7 0H83.2A83.3 83.3 0 0 0 0 83.2V406.7A83.3 83.3 0 0 0 83.2 489.9H406.7A83.3 83.3 0 0 0 489.9 406.7V83.2A83.3 83.3 0 0 0 406.7 0ZM406.7 449.1H83.2A42.4 42.4 0 0 1 40.8 406.7V83.2A42.4 42.4 0 0 1 83.2 40.8H406.7A42.4 42.4 0 0 1 449 83.2V406.7H449A42.4 42.4 0 0 1 406.7 449.1ZM916.8 0H593.3A83.3 83.3 0 0 0 510.1 83.2V406.7A83.3 83.3 0 0 0 593.3 489.9H916.8A83.3 83.3 0 0 0 1000 406.7V83.2A83.3 83.3 0 0 0 916.8 0ZM959.1 406.7A42.4 42.4 0 0 1 916.8 449.1H593.3A42.4 42.4 0 0 1 550.9 406.7V83.2A42.4 42.4 0 0 1 593.3 40.8H916.8A42.4 42.4 0 0 1 959.1 83.2ZM406.7 510.1H83.2A83.3 83.3 0 0 0 0 593.3V916.8A83.3 83.3 0 0 0 83.2 1000H406.7A83.3 83.3 0 0 0 489.9 916.8V593.3A83.3 83.3 0 0 0 406.7 510.1ZM406.7 959.2H83.2A42.4 42.4 0 0 1 40.8 916.8V593.3A42.4 42.4 0 0 1 83.2 550.9H406.7A42.4 42.4 0 0 1 449 593.3V916.8H449A42.4 42.4 0 0 1 406.7 959.1ZM916.8 510.1H593.3A83.3 83.3 0 0 0 510.1 593.3V916.8A83.3 83.3 0 0 0 593.3 1000H916.8A83.3 83.3 0 0 0 1000 916.8V593.3A83.3 83.3 0 0 0 916.8 510.1ZM959.1 916.8A42.4 42.4 0 0 1 916.8 959.2H593.3A42.4 42.4 0 0 1 550.9 916.8V593.3A42.4 42.4 0 0 1 593.3 550.9H916.8A42.4 42.4 0 0 1 959.1 593.3Z", - "width": 1000 + "path": "M400 50V150H600V250H400V350H500V450H400V550H600V650H400V750H500V850H400V950A50 50 0 0 0 450 1000H750A50 50 0 0 0 800 950V50A50 50 0 0 0 750 0H450A50 50 0 0 0 400 50ZM0 200L150 29.3 300 200H200V1000H100V200Z", + "width": 800 }, "search": [ - "menu_icon_active" + "height" ] }, { - "uid": "f7eb1344b3a40f36bb4d32cdd0d76496", - "css": "message_icon-1", - "code": 59410, + "uid": "9e8380e2a5811e19ab4393d5a252df32", + "css": "qr-code-1", + "code": 59424, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M1182.9 44.3A100 100 0 0 0 1099.9 0.1H100A100 100 0 0 0 0 100V900A100 100 0 0 0 100 1000H1110.4A100 100 0 0 0 1200 900V100A100 100 0 0 0 1182.9 44.3ZM99.9 40H1100A60 60 0 0 1 1138.8 54.2L1061.2 128.2 734 440 612.8 555.7A20 20 0 0 1 589 555.7L466 440 60 54.3A60 60 0 0 1 100 40ZM39.9 90.4L423.2 454 40 820V100A59.7 59.7 0 0 1 40 90.4ZM1160 900A60 60 0 0 1 1107.6 960H100A60 60 0 0 1 40 900V874.6L452.2 481.6 562.4 586.4A60 60 0 0 0 571 592.2 58.4 58.4 0 0 0 600 600 63 63 0 0 0 640 586L748.8 482.4 1160 874.2ZM1160 100V819L776.8 454.7 1160 90.1A61.4 61.4 0 0 1 1160 100Z", - "width": 1200 + "path": "M650 0V350H1000V0ZM900 250H750V100H900ZM350 200V0H0V350H450V200H350ZM250 250H100V100H250ZM700 550H800V700H900V450H550V550H600V650.1H700.1ZM700 800H600V900H500V1000H700V900H800V1000H950V900H900V800H700ZM350 800V650H0V1000H350V900H500V800ZM250 900H100V750H250Z", + "width": 1000 }, "search": [ - "message_icon" + "qr-code" ] }, { - "uid": "ed4536ee2a51bde352570554ae089661", - "css": "message_icon_active-1", - "code": 59410, + "uid": "6ec3034cfbe5c91e478ef9b9437647ed", + "css": "arrival-patients-bg", + "code": 59470, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M1182.9 44.3A100 100 0 0 0 1099.9 0.1H100A100 100 0 0 0 0 100V900A100 100 0 0 0 100 1000H1110.4A100 100 0 0 0 1200 900V100A100 100 0 0 0 1182.9 44.3ZM99.9 40H1100A60 60 0 0 1 1138.8 54.2L1061.2 128.2 734 440 612.8 555.7A20 20 0 0 1 589 555.7L466 440 60 54.3A60 60 0 0 1 100 40ZM39.9 90.4L423.2 454 40 820V100A59.7 59.7 0 0 1 40 90.4ZM1160 900A60 60 0 0 1 1107.6 960H100A60 60 0 0 1 40 900V874.6L452.2 481.6 562.4 586.4A60 60 0 0 0 571 592.2 58.4 58.4 0 0 0 600 600 63 63 0 0 0 640 586L748.8 482.4 1160 874.2ZM1160 100V819L776.8 454.7 1160 90.1A61.4 61.4 0 0 1 1160 100Z", - "width": 1200 + "path": "M490.4 621.6L473.9 574.8A181.3 181.3 0 0 1 396.3 590.7 177.3 177.3 0 0 1 318 574.1L295.4 620.6A13.4 13.4 0 0 1 287.5 627.5Q281.1 629.6 274.3 631.6A117.4 117.4 0 0 0 304.2 686.6 127.3 127.3 0 0 0 493.5 682 264 264 0 0 1 513.6 634.6C508.3 633 503.4 631.3 498.7 629.8A13.4 13.4 0 0 1 490.4 621.6ZM481.4 761.4A266.9 266.9 0 0 1 483.6 727 150.9 150.9 0 0 1 396.3 753.3 149.3 149.3 0 0 1 284.6 704.8 146.4 146.4 0 0 1 248.5 639.1L233.3 643.4C129.4 672.5 0 708.8 0 820.7V960.8C0 977.1 7.5 1000 19.9 1000H630.7A265.8 265.8 0 0 1 481.4 761.4ZM401.8 191.2C406.8 191.6 411.6 192 416.4 192.4 457.3 196.1 484.2 198.5 510.1 141.7A13.4 13.4 0 0 1 534.2 141.2L535.5 143.8C552.2 161.8 563.7 195.1 571.3 227.6 572.5 212.4 573.2 199.7 573.2 194.7S573.3 184.3 573.4 178.8C574.2 139.6 575 95.1 536.5 56.1A193.6 193.6 0 0 0 393.6 0 191.5 191.5 0 0 0 255.3 62.7L251.6 67C228.8 92.4 203.1 121.1 205.1 202.5A286.9 286.9 0 0 0 212 238.8 146 146 0 0 1 243.5 163.5 70.6 70.6 0 0 1 297.2 140.4C317.1 140.4 324 160.1 330.5 179.2 340.6 208.3 351.7 240.7 398.9 243.5 374.6 216.4 378.9 206.6 380.9 201.9A19.2 19.2 0 0 1 401.8 191.2ZM541.8 420.1A12.9 12.9 0 0 1 549.2 418.1H549.6C571.7 418.1 597.4 384.9 607.2 343.8A25.6 25.6 0 0 0 599.3 314.8 13.4 13.4 0 0 0 584.2 319.5 13.4 13.4 0 0 1 572.8 328C572.5 328 572.1 328 571.7 328A13.4 13.4 0 0 1 558.3 315.8C555.8 285.8 544.9 209 523.9 172.9 491.9 226 452.4 222.4 414.1 219L413.5 219A270.3 270.3 0 0 0 438.7 245.4 13.4 13.4 0 0 1 431.6 268.5C337.9 281.9 317.5 223.1 305.3 187.9A89.4 89.4 0 0 0 296.5 167.2 44.1 44.1 0 0 0 263.2 181.7 131.4 131.4 0 0 0 236.8 255.7 309.1 309.1 0 0 0 235.3 305.2 15.4 15.4 0 0 1 210.2 321.3C204.3 315.1 198 313.1 192.9 315.9A24.5 24.5 0 0 0 185.6 343.8C195.3 384.9 221 418.1 243.2 418.1H243.8A13.4 13.4 0 0 1 257.2 431C258.1 443.9 265.2 510.1 318.6 543.8A143.4 143.4 0 0 0 396.4 563.9 146.4 146.4 0 0 0 474.3 544.3L474.6 544.1C528.8 510.5 534.9 444.1 535.6 431.1A13.4 13.4 0 0 1 541.9 420.1ZM746.8 522.7A238.6 238.6 0 1 0 985.5 761.3 238.7 238.7 0 0 0 746.8 522.7ZM881.7 796.9A17.9 17.9 0 0 1 863.9 814.7H792.4V888.4A17.9 17.9 0 0 1 774.6 906.2H712.1A17.9 17.9 0 0 1 694.2 888.4V814.7H620.6A17.9 17.9 0 0 1 602.7 796.9V734.4A17.9 17.9 0 0 1 620.6 716.5H694.2V645.1A17.9 17.9 0 0 1 712.1 627.3H774.6A17.9 17.9 0 0 1 792.4 645.1V716.5H863.9A17.9 17.9 0 0 1 881.7 734.4ZM765.6 725.4V654H721V725.4A17.9 17.9 0 0 1 703.1 743.3H629.4V787.9H703.1A17.9 17.9 0 0 1 721 805.8V879.4H765.6V805.8A17.9 17.9 0 0 1 783.5 787.9H854.9V743.3H783.5A17.9 17.9 0 0 1 765.6 725.4Z", + "width": 985 }, "search": [ - "message_icon_active" + "arrival-patients-bg" ] }, { - "uid": "f585c0032b4aa288a0dfb78f502d4d1c", - "css": "scdedule_icon_active-1", - "code": 59417, + "uid": "961571413453d8de8d1d6325705ef204", + "css": "search-bg", + "code": 59468, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M445.8 693.2A28.8 28.8 0 0 0 486.5 693.2L589.2 590.5A28.8 28.8 0 1 0 548.5 549.8L466.1 632.1 428.6 594.6A28.8 28.8 0 1 0 387.9 635.2ZM445.8 693.2M488.5 849.9A228.4 228.4 0 1 0 260.1 621.5 228.7 228.7 0 0 0 488.5 849.9ZM488.5 450.6A170.8 170.8 0 1 1 317.6 621.5 171 171 0 0 1 488.5 450.6ZM488.5 450.6M881.5 62.9H827.7V29.5A29.5 29.5 0 0 0 768.6 29.5V62.9H710.6V29.5A29.5 29.5 0 0 0 651.5 29.5V62.9H325.5V29.5A29.5 29.5 0 0 0 266.4 29.5V62.9H208.4V29.5A29.5 29.5 0 0 0 149.4 29.5V62.9H95.5A95.6 95.6 0 0 0 0 158.4V904.5A95.6 95.6 0 0 0 95.5 1000H881.5A95.6 95.6 0 0 0 976.9 904.5V158.4A95.6 95.6 0 0 0 881.5 62.9ZM918 904.5A36.5 36.5 0 0 1 881.5 940.9H95.5A36.5 36.5 0 0 1 59 904.5V308.4H917.9ZM59.1 158.4A36.5 36.5 0 0 1 95.5 121.9H149.4V155.3A29.5 29.5 0 0 0 208.4 155.3V121.9H266.4V155.3A29.5 29.5 0 0 0 325.5 155.3V121.9H651.5V155.3A29.5 29.5 0 0 0 710.6 155.3V121.9H768.6V155.3A29.5 29.5 0 0 0 827.7 155.3V121.9H881.5A36.5 36.5 0 0 1 918 158.4V249.3H59.1ZM59.1 158.4", - "width": 977 + "path": "M543.6 353.5A132.3 132.3 0 1 1 411.3 221.2 132.3 132.3 0 0 1 543.6 353.5ZM974.2 974.2A88.2 88.2 0 0 1 849.4 974.2S624.7 749.2 622.9 747A405.4 405.4 0 1 1 747 622.9C749.2 624.6 974.2 849.4 974.2 849.4A88.2 88.2 0 0 1 974.2 974.2ZM726 405.2A320.8 320.8 0 1 0 206.8 657.2 147 147 0 0 1 352.4 530H470A147.1 147.1 0 0 1 614.3 648.5 320 320 0 0 0 726 405.2Z", + "width": 1000 }, "search": [ - "scdedule_icon_active" + "search-bg" ] }, { @@ -583,7 +597,7 @@ "css": "referral-bg", "code": 59466, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { "path": "M681.4 793.1L735.5 860.8 683 913.3 659.1 793.8C663.5 793.4 667.9 793.1 672.4 793.1ZM791.7 793.1L758.6 834.5 725.5 793.1ZM835.9 793.1H844.8C849.4 793.1 853.7 793.4 858.1 793.8L834.2 913.3 781.7 860.8ZM913.8 655.2H912.8A154 154 0 0 0 913.8 637.9V586.2A34.5 34.5 0 0 1 913.8 655.2ZM603.4 482.8A103.6 103.6 0 0 1 706.9 379.3H810.3A103.6 103.6 0 0 1 913.8 482.8V551.7H844.8A34.5 34.5 0 0 1 810.3 517.3V448.3H775.9V465.5A86.3 86.3 0 0 1 689.7 551.7H603.4ZM603.4 655.2A34.5 34.5 0 0 1 603.4 586.2V637.9A154 154 0 0 0 604.5 655.2ZM637.9 637.9V586.2H689.6A120.4 120.4 0 0 0 781.2 543.9 69 69 0 0 0 844.8 586.2H879.3V637.9A120.7 120.7 0 1 1 637.9 637.9ZM1000 1000H517.2V948.3A155.4 155.4 0 0 1 625.3 800.5L655.5 951.7A17.3 17.3 0 0 0 667.4 964.8 17.6 17.6 0 0 0 672.4 965.5 17.3 17.3 0 0 0 684.6 960.5L758.6 886.5 832.6 960.5A17.2 17.2 0 0 0 861.7 951.7L891.9 800.5A155.5 155.5 0 0 1 999.9 948.3ZM164.1 413.8L218.3 481.5 165.8 534 141.9 414.5C146.3 414.1 150.7 413.8 155.2 413.8ZM274.5 413.8L241.4 455.2 208.3 413.8ZM318.6 413.8H327.6C332.1 413.8 336.5 414.1 340.9 414.5L317 534 264.5 481.5ZM396.6 275.9H395.5A154 154 0 0 0 396.5 258.6V206.9A34.5 34.5 0 0 1 396.5 275.9ZM86.2 103.5A103.6 103.6 0 0 1 189.7 0H293.1A103.6 103.6 0 0 1 396.6 103.5V172.4H327.6A34.5 34.5 0 0 1 293.1 137.9V69H258.6V86.2A86.3 86.3 0 0 1 172.4 172.4H86.2ZM86.2 275.9A34.5 34.5 0 1 1 86.2 206.9V258.6A154 154 0 0 0 87.2 275.9ZM120.7 258.6V206.9H172.4A120.4 120.4 0 0 0 264 164.6 69 69 0 0 0 327.6 206.9H362V258.6A120.7 120.7 0 1 1 120.7 258.6ZM482.8 620.7H0V569A155.4 155.4 0 0 1 108 421.2L138.2 572.4A17.3 17.3 0 0 0 150.2 585.5 17.6 17.6 0 0 0 155.1 586.2 17.3 17.3 0 0 0 167.3 581.2L241.3 507.2 315.3 581.2A17.2 17.2 0 0 0 344.4 572.3L374.6 421.2A155.5 155.5 0 0 1 482.7 569ZM172.4 827.6A17.2 17.2 0 0 0 155.2 810.3H127.8L206.9 731.3 286 810.3H258.6A17.2 17.2 0 0 0 241.4 827.6 206.9 206.9 0 0 0 333.5 999.6 172.6 172.6 0 0 1 172.4 827.6Z", "width": 1000 @@ -593,31 +607,1907 @@ ] }, { - "uid": "961571413453d8de8d1d6325705ef204", - "css": "search-bg", - "code": 59468, + "uid": "f7fb556e96e9f2dfe8d87fafd4952bc8", + "css": "search-1", + "code": 59425, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M543.6 353.5A132.3 132.3 0 1 1 411.3 221.2 132.3 132.3 0 0 1 543.6 353.5ZM974.2 974.2A88.2 88.2 0 0 1 849.4 974.2S624.7 749.2 622.9 747A405.4 405.4 0 1 1 747 622.9C749.2 624.6 974.2 849.4 974.2 849.4A88.2 88.2 0 0 1 974.2 974.2ZM726 405.2A320.8 320.8 0 1 0 206.8 657.2 147 147 0 0 1 352.4 530H470A147.1 147.1 0 0 1 614.3 648.5 320 320 0 0 0 726 405.2Z", + "path": "M402.7 804.7A401.8 401.8 0 0 0 649.6 719.9L915.7 986A50 50 0 0 0 986.5 915.3L720.3 649.2A402.6 402.6 0 1 0 402.7 804.7ZM188.8 188.6A302.4 302.4 0 1 1 188.8 616.2H188.8A301.2 301.2 0 0 1 187.1 190.2L188.6 188.6Z", + "width": 1001 + }, + "search": [ + "search" + ] + }, + { + "uid": "d158c7d34d65d4d174f62fd0e4a85721", + "css": "send", + "code": 59427, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1000.1 0L0 562.5 319.4 680.9 812.5 218.8 437.6 724.5 437.9 724.5 437.5 724.5V1000.1L616.7 790.9 843.7 875Z", "width": 1000 }, "search": [ - "search-bg" + "send" ] }, { - "uid": "6ec3034cfbe5c91e478ef9b9437647ed", - "css": "arrival-patients-bg", - "code": 59470, + "uid": "29b6fa307d6eeddd2d501aa1fbe72411", + "css": "view", + "code": 59430, "src": "custom_icons", - "selected": false, + "selected": true, "svg": { - "path": "M490.4 621.6L473.9 574.8A181.3 181.3 0 0 1 396.3 590.7 177.3 177.3 0 0 1 318 574.1L295.4 620.6A13.4 13.4 0 0 1 287.5 627.5Q281.1 629.6 274.3 631.6A117.4 117.4 0 0 0 304.2 686.6 127.3 127.3 0 0 0 493.5 682 264 264 0 0 1 513.6 634.6C508.3 633 503.4 631.3 498.7 629.8A13.4 13.4 0 0 1 490.4 621.6ZM481.4 761.4A266.9 266.9 0 0 1 483.6 727 150.9 150.9 0 0 1 396.3 753.3 149.3 149.3 0 0 1 284.6 704.8 146.4 146.4 0 0 1 248.5 639.1L233.3 643.4C129.4 672.5 0 708.8 0 820.7V960.8C0 977.1 7.5 1000 19.9 1000H630.7A265.8 265.8 0 0 1 481.4 761.4ZM401.8 191.2C406.8 191.6 411.6 192 416.4 192.4 457.3 196.1 484.2 198.5 510.1 141.7A13.4 13.4 0 0 1 534.2 141.2L535.5 143.8C552.2 161.8 563.7 195.1 571.3 227.6 572.5 212.4 573.2 199.7 573.2 194.7S573.3 184.3 573.4 178.8C574.2 139.6 575 95.1 536.5 56.1A193.6 193.6 0 0 0 393.6 0 191.5 191.5 0 0 0 255.3 62.7L251.6 67C228.8 92.4 203.1 121.1 205.1 202.5A286.9 286.9 0 0 0 212 238.8 146 146 0 0 1 243.5 163.5 70.6 70.6 0 0 1 297.2 140.4C317.1 140.4 324 160.1 330.5 179.2 340.6 208.3 351.7 240.7 398.9 243.5 374.6 216.4 378.9 206.6 380.9 201.9A19.2 19.2 0 0 1 401.8 191.2ZM541.8 420.1A12.9 12.9 0 0 1 549.2 418.1H549.6C571.7 418.1 597.4 384.9 607.2 343.8A25.6 25.6 0 0 0 599.3 314.8 13.4 13.4 0 0 0 584.2 319.5 13.4 13.4 0 0 1 572.8 328C572.5 328 572.1 328 571.7 328A13.4 13.4 0 0 1 558.3 315.8C555.8 285.8 544.9 209 523.9 172.9 491.9 226 452.4 222.4 414.1 219L413.5 219A270.3 270.3 0 0 0 438.7 245.4 13.4 13.4 0 0 1 431.6 268.5C337.9 281.9 317.5 223.1 305.3 187.9A89.4 89.4 0 0 0 296.5 167.2 44.1 44.1 0 0 0 263.2 181.7 131.4 131.4 0 0 0 236.8 255.7 309.1 309.1 0 0 0 235.3 305.2 15.4 15.4 0 0 1 210.2 321.3C204.3 315.1 198 313.1 192.9 315.9A24.5 24.5 0 0 0 185.6 343.8C195.3 384.9 221 418.1 243.2 418.1H243.8A13.4 13.4 0 0 1 257.2 431C258.1 443.9 265.2 510.1 318.6 543.8A143.4 143.4 0 0 0 396.4 563.9 146.4 146.4 0 0 0 474.3 544.3L474.6 544.1C528.8 510.5 534.9 444.1 535.6 431.1A13.4 13.4 0 0 1 541.9 420.1ZM746.8 522.7A238.6 238.6 0 1 0 985.5 761.3 238.7 238.7 0 0 0 746.8 522.7ZM881.7 796.9A17.9 17.9 0 0 1 863.9 814.7H792.4V888.4A17.9 17.9 0 0 1 774.6 906.2H712.1A17.9 17.9 0 0 1 694.2 888.4V814.7H620.6A17.9 17.9 0 0 1 602.7 796.9V734.4A17.9 17.9 0 0 1 620.6 716.5H694.2V645.1A17.9 17.9 0 0 1 712.1 627.3H774.6A17.9 17.9 0 0 1 792.4 645.1V716.5H863.9A17.9 17.9 0 0 1 881.7 734.4ZM765.6 725.4V654H721V725.4A17.9 17.9 0 0 1 703.1 743.3H629.4V787.9H703.1A17.9 17.9 0 0 1 721 805.8V879.4H765.6V805.8A17.9 17.9 0 0 1 783.5 787.9H854.9V743.3H783.5A17.9 17.9 0 0 1 765.6 725.4Z", - "width": 985 + "path": "M776.8 250A250 250 0 1 0 1026.8 500 250.2 250.2 0 0 0 776.8 250ZM757.8 425.9A57.4 57.4 0 0 0 700.9 482.8H618.1A141.3 141.3 0 0 1 757.8 343.1ZM1535.4 448.3C1450.9 343.1 1149.2-0.1 776.8-0.1S102.6 342.9 18.1 448.3A82.9 82.9 0 0 0 18.1 551.8C102.6 657 404.3 1000.1 776.8 1000.1S1450.9 657 1535.4 551.8A82.9 82.9 0 0 0 1535.4 448.3ZM776.8 862.1A362 362 0 1 1 1138.8 500 362 362 0 0 1 776.8 862.1Z", + "width": 1553 }, "search": [ - "arrival-patients-bg" + "view" + ] + }, + { + "uid": "6dd961ddeafa6f1221c571e3a96c5e0d", + "css": "warning", + "code": 59431, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1165.9 890.7L649.9 34.8A72.1 72.1 0 0 0 526.5 34.8L10.4 890.7A72.1 72.1 0 0 0 72.1 1000H1104.2A72.1 72.1 0 0 0 1165.9 890.7ZM588.5 296.1A48.8 48.8 0 0 1 643.3 342.4C643.3 432.8 632.7 562.8 632.7 653.2 632.7 676.8 606.8 686.9 588.6 686.9 564.3 686.9 543.7 677 543.7 653.2 543.7 562.8 533.1 432.8 533.1 342.4 533.1 312.8 557.3 296.1 588.5 296.1ZM589.3 856.1A58.5 58.5 0 1 1 647.1 797.6 59.4 59.4 0 0 1 589.3 856.1Z", + "width": 1176 + }, + "search": [ + "warning" + ] + }, + { + "uid": "1a56c6056532ad852281ae8316f6ac0a", + "css": "add", + "code": 59432, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M769.7 0H230.3A230.9 230.9 0 0 0 0 230.3V769.7A230.9 230.9 0 0 0 230.3 1000H769.7A230.9 230.9 0 0 0 1000 769.7V230.3A230.9 230.9 0 0 0 769.7 0ZM705.2 543.1H553.6A8.8 8.8 0 0 0 544.8 551.9V704A44.7 44.7 0 0 1 455.4 704V552A8.8 8.8 0 0 0 446.6 543.2H294.7A44.7 44.7 0 0 1 294.7 453.8H446.4A8.8 8.8 0 0 0 455.2 445V293.1A44.7 44.7 0 1 1 544.6 293.1V444.9A8.8 8.8 0 0 0 553.4 453.9H705.2A44.7 44.7 0 1 1 705.2 543.3Z", + "width": 1000 + }, + "search": [ + "add" + ] + }, + { + "uid": "84f81a72b1b0ffb0132cd1bbe1c22ca7", + "css": "close", + "code": 59433, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M591.6 500L981.2 110.4A64.8 64.8 0 1 0 889.4 19L499.8 408.6 110.2 19A64.8 64.8 0 0 0 19 110.6L408.6 500.2 19 889.8A64.8 64.8 0 1 0 110.6 981.4L500.2 591.8 889.8 981.4A64.8 64.8 0 1 0 981.4 889.8ZM591.6 500", + "width": 1000 + }, + "search": [ + "close" + ] + }, + { + "uid": "77819ffd4aac6bbd19e5760b252d420a", + "css": "back", + "code": 59434, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M14.6 535.8L464.3 985.3A50.5 50.5 0 1 0 535.8 914L121.8 500.1 535.8 86.2A50.5 50.5 0 0 0 464.3 14.7L14.6 464.3A51 51 0 0 0 14.6 535.8Z", + "width": 551 + }, + "search": [ + "back" + ] + }, + { + "uid": "c6bf117fcd1f7bb313ba6e9c3c2577ee", + "css": "qr-code-2", + "code": 59437, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M650 0V350H1000V0ZM900 250H750V100H900ZM350 200V0H0V350H450V200H350ZM250 250H100V100H250ZM700 550H800V700H900V450H550V550H600V650.1H700.1ZM700 800H600V900H500V1000H700V900H800V1000H950V900H900V800H700ZM350 800V650H0V1000H350V900H500V800ZM250 900H100V750H250Z", + "width": 1000 + }, + "search": [ + "qr-code" + ] + }, + { + "uid": "db7c621524e167c8d42abc9418ae711d", + "css": "health-summary", + "code": 59435, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M714.1 956.9H146.5A97 97 0 0 1 47.4 862.1V79.8A63 63 0 0 0 0 137.9V939.7A62.5 62.5 0 0 0 64.7 1000H652A63.3 63.3 0 0 0 714.1 956.9ZM714.1 956.9M799.6 862.1V435.3H312.3L312 462C312 462.3 312 461.2 312 463.4H519.4A17.2 17.2 0 1 1 519.4 497.9H310.1A32.1 32.1 0 0 1 287.8 487.8 38 38 0 0 1 277.5 461.2L277.7 435.4H241.3A16.9 16.9 0 0 1 224.1 418.5V416H172.3A17.2 17.2 0 0 1 155.1 398.9L154.5 324A17.8 17.8 0 0 1 171.8 306.2H171.8L224 307.2V304.9A18 18 0 0 1 241.2 286.6H799.6V209.1H653.6A56.2 56.2 0 0 1 597 152.5V0H146.4A63.1 63.1 0 0 0 81.4 58.1 16.8 16.8 0 0 1 81.9 60.3C81.9 61.2 81.9 62.1 81.9 63V862.1A62.6 62.6 0 0 0 146.4 922.4H733.8A63.6 63.6 0 0 0 799.6 862.1ZM172.5 543.1H456A17.2 17.2 0 1 1 456 577.6H172.5A17.2 17.2 0 0 1 172.5 543.1ZM665.8 829.7H172.5A17.2 17.2 0 0 1 172.5 795.2H665.8A17.2 17.2 0 0 1 665.8 829.7ZM665.8 745.6H172.5A17.2 17.2 0 0 1 172.5 711.2H665.8A17.2 17.2 0 1 1 665.8 745.6ZM665.8 661.6H172.5A17.2 17.2 0 0 1 172.5 627.1H665.8A17.2 17.2 0 1 1 665.8 661.6ZM665.8 661.6M773.5 174.6L631.5 27.6V152.5A21.8 21.8 0 0 0 653.6 174.5ZM773.5 174.6M898.7 336.6V386.6L937.2 361.6ZM898.7 336.6M258.6 321.1H864.2V400.9H258.6ZM258.6 321.1M224.1 381.5V341.5L189.2 341.1 189.4 381.5ZM224.1 381.5", + "width": 937 + }, + "search": [ + "health-summary" + ] + }, + { + "uid": "50d667f8b7f88d80bebfb19c6d88f412", + "css": "powered-by-cs", + "code": 59436, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M5611.5 942.8L5603.8 947.4A13.5 13.5 0 0 0 5599.7 942.5 9.5 9.5 0 0 0 5594.5 941.2 9.7 9.7 0 0 0 5587.9 943.5 6.9 6.9 0 0 0 5585.4 949C5585.4 952 5587.6 954.5 5592.2 956.3L5598.4 958.7A26.4 26.4 0 0 1 5609.6 966.3 16.8 16.8 0 0 1 5613.1 977.1 19.1 19.1 0 0 1 5607.4 991.4 19.7 19.7 0 0 1 5593 997.1 19.2 19.2 0 0 1 5579.5 992.2 22.3 22.3 0 0 1 5572.9 978.6L5582.5 976.5A16.5 16.5 0 0 0 5584.8 984.2 10.8 10.8 0 0 0 5600.7 985.3 10.2 10.2 0 0 0 5603.6 977.7 11 11 0 0 0 5603.1 974.4 9 9 0 0 0 5601.5 971.6 12.9 12.9 0 0 0 5598.7 969.2 27.3 27.3 0 0 0 5594.7 967L5588.6 964.6A17.4 17.4 0 0 1 5575.7 948.9 15.1 15.1 0 0 1 5581.1 937.1 19.5 19.5 0 0 1 5594.6 932.3 18.8 18.8 0 0 1 5611.6 942.8M5623.8 964.5A30.6 30.6 0 0 1 5633.5 941.8 31.8 31.8 0 0 1 5656.8 932.3 32.7 32.7 0 0 1 5689.3 964.9 30.8 30.8 0 0 1 5679.6 987.9 33.1 33.1 0 0 1 5634.4 988.9 30.8 30.8 0 0 1 5623.8 964.6M5633.3 964.7A23.2 23.2 0 0 0 5673 981.7 24.3 24.3 0 0 0 5673 948.1 22.2 22.2 0 0 0 5656.5 941.3 22.4 22.4 0 0 0 5640 948.1 22.6 22.6 0 0 0 5633.2 964.8M5713.1 933.5V987.3H5731.5V996.2H5703.5V933.5ZM5750.4 933.5V971.3A20.8 20.8 0 0 0 5753.1 983.1 14.1 14.1 0 0 0 5775.3 983.1 20.5 20.5 0 0 0 5777.9 971.3V933.5H5787.4V973.8A22.6 22.6 0 0 1 5781.2 990.2 23.8 23.8 0 0 1 5747.1 990.2 22.6 22.6 0 0 1 5740.9 973.8V933.5ZM5822.1 942.4V996.2H5812.6V942.4H5798.2V933.5H5836.5V942.4ZM5871.1 964.5A30.6 30.6 0 0 1 5880.8 941.8 31.8 31.8 0 0 1 5904 932.3 32.7 32.7 0 0 1 5936.6 964.9 30.8 30.8 0 0 1 5926.9 987.9 33.1 33.1 0 0 1 5881.7 988.9 30.8 30.8 0 0 1 5871 964.6M5880.6 964.7A23.2 23.2 0 0 0 5920.2 981.7 24.3 24.3 0 0 0 5920.2 948.1 22.2 22.2 0 0 0 5903.8 941.3 22.4 22.4 0 0 0 5887.2 948.1 22.6 22.6 0 0 0 5880.5 964.8M5950.9 996.2V929.2L5996.6 977.1V933.5H6006.1V1000L5960.4 952.3V996.1ZM6058.9 942.8L6051.3 947.4A13.8 13.8 0 0 0 6047.2 942.5 9.5 9.5 0 0 0 6041.9 941.2 9.7 9.7 0 0 0 6035.4 943.5 6.9 6.9 0 0 0 6032.8 949C6032.8 952 6035.1 954.5 6039.6 956.3L6045.9 958.7A26.4 26.4 0 0 1 6057 966.3 16.8 16.8 0 0 1 6060.5 977.1 19.1 19.1 0 0 1 6054.8 991.4 19.8 19.8 0 0 1 6040.4 997.1 19.2 19.2 0 0 1 6026.9 992.2 22.2 22.2 0 0 1 6020.4 978.6L6030 976.5A16.5 16.5 0 0 0 6032.2 984.2 9.9 9.9 0 0 0 6040.7 988.2 9.7 9.7 0 0 0 6048 985.3 10.1 10.1 0 0 0 6051 977.7 11 11 0 0 0 6050.5 974.4 9 9 0 0 0 6048.9 971.6 12.9 12.9 0 0 0 6046.1 969.2 27.3 27.3 0 0 0 6042 967L6036 964.6A17.4 17.4 0 0 1 6023.2 948.9 15.1 15.1 0 0 1 6028.6 937.1 19.5 19.5 0 0 1 6042 932.3 18.8 18.8 0 0 1 6059 942.8M5307.1 772.3A43.1 43.1 0 0 0 5292 754.6 42 42 0 0 0 5267.6 747.8 55.5 55.5 0 0 0 5245.7 752.3 61 61 0 0 0 5227.1 764.7 68.4 68.4 0 0 0 5213.5 783.5 71.1 71.1 0 0 0 5206.5 807.5 65.9 65.9 0 0 0 5207.7 831.8 49 49 0 0 0 5216.9 850.5 43 43 0 0 0 5232.4 862.7 49.2 49.2 0 0 0 5253.5 867 49.2 49.2 0 0 0 5279 860.1 64.7 64.7 0 0 0 5298.9 841.7L5327.2 860.1A101.6 101.6 0 0 1 5295.8 887 89.4 89.4 0 0 1 5251.4 897.6 90 90 0 0 1 5215.8 890.7 78.4 78.4 0 0 1 5188.5 871.8 75.1 75.1 0 0 1 5172.1 843.2 85.8 85.8 0 0 1 5168.8 807.5 103.1 103.1 0 0 1 5179.8 771.3 99.5 99.5 0 0 1 5201.9 742.7 102.6 102.6 0 0 1 5270.1 717.2 77.9 77.9 0 0 1 5312.2 727.9 73.7 73.7 0 0 1 5338.2 754.7ZM5455.3 892.5H5346.6L5384.6 722.3H5422.1L5391 862.4H5462.2ZM5669.4 843.6A98.2 98.2 0 0 1 5647.5 872 99.3 99.3 0 0 1 5617.3 890.8 97.5 97.5 0 0 1 5580.9 897.6 85.2 85.2 0 0 1 5546 890.6 76.5 76.5 0 0 1 5519.2 871.3 77.4 77.4 0 0 1 5503.3 842.7 83 83 0 0 1 5500.5 807.5 105.7 105.7 0 0 1 5511.2 771.6 98.4 98.4 0 0 1 5563.1 724 97 97 0 0 1 5599.5 717.2 84.4 84.4 0 0 1 5634.4 724.3 76.4 76.4 0 0 1 5677 772.4 82.7 82.7 0 0 1 5679.8 807.5 105.8 105.8 0 0 1 5669.1 843.6M5641.6 784.3A50.6 50.6 0 0 0 5633.7 765.3 40.1 40.1 0 0 0 5618.9 752.5 46.2 46.2 0 0 0 5597.4 747.8 51.9 51.9 0 0 0 5575.2 752.5 59.4 59.4 0 0 0 5557.3 765.3 66.2 66.2 0 0 0 5544.5 784.3 80.3 80.3 0 0 0 5538 807.5 69.2 69.2 0 0 0 5538.7 830.6 50.7 50.7 0 0 0 5546.7 849.5 40.2 40.2 0 0 0 5561.5 862.2 46.2 46.2 0 0 0 5582.9 866.9 52.2 52.2 0 0 0 5605.1 862.2 60.8 60.8 0 0 0 5623.1 849.5 67.1 67.1 0 0 0 5635.8 830.6 78.5 78.5 0 0 0 5642.4 807.5 70.2 70.2 0 0 0 5641.6 784.3M5864.8 834.8A84.6 84.6 0 0 1 5854.8 859.3 76.6 76.6 0 0 1 5813.5 892.7 93.5 93.5 0 0 1 5782.5 897.6 76.3 76.3 0 0 1 5751.1 891.5 62.6 62.6 0 0 1 5728.4 874.9 58.7 58.7 0 0 1 5716 850.5 64.1 64.1 0 0 1 5715.9 821.3Q5722.3 792.1 5726.2 773.1C5728.8 760.5 5730.9 750.8 5732.3 743.9S5734.8 732 5735.4 728.8 5736.4 723.4 5736.5 722.4H5774.8L5752.6 825.4A39.5 39.5 0 0 0 5752.2 840 32.9 32.9 0 0 0 5757.3 853.4 30 30 0 0 0 5768.2 863.2 33.9 33.9 0 0 0 5785 867 41.7 41.7 0 0 0 5800.7 864.1 45.6 45.6 0 0 0 5813.6 856.3 48.7 48.7 0 0 0 5823.2 845.1 42.6 42.6 0 0 0 5828.6 831.5L5853.4 722.3H5891.7ZM6063.9 842.6A90.3 90.3 0 0 1 6042.6 869.4 93.8 93.8 0 0 1 6012.6 886.4 108.4 108.4 0 0 1 5976.1 892.4H5896.7L5934.5 722.2H5993A94.2 94.2 0 0 1 6028.4 728.6 74.2 74.2 0 0 1 6055.1 746.3 71.1 71.1 0 0 1 6071.2 773.2 78.9 78.9 0 0 1 6074.4 807.3 98.4 98.4 0 0 1 6063.8 842.4M6035.4 785.5A44.4 44.4 0 0 0 6027.3 768 39.2 39.2 0 0 0 6012.6 756.4 49.2 49.2 0 0 0 5991.5 752.2H5965.3L5940.8 862.1H5976.8A55 55 0 0 0 5998.4 857.8 63.4 63.4 0 0 0 6016.7 846.1 62.3 62.3 0 0 0 6030 828.6 59.9 59.9 0 0 0 6036.5 807.3 65.7 65.7 0 0 0 6035.5 785.4M5877.9 372.8S5868.5 321.5 5791.5 321.5A102.2 102.2 0 0 0 5714.5 228.1S5701.4 135.9 5642.7 114.9L5844.1 166.3S5881.4 166.3 5877.9 231.6ZM5591.9 98.6L5226.6 0.6S5174.1-7.6 5172.9 40.2 5172.9 312.1 5172.9 312.1 5224.3 228.1 5359.7 243.9C5359.7 243.9 5384.2 98.6 5521.9 165.1A82.7 82.7 0 0 1 5591.9 98.6M5591.3 395S5599.4 347.1 5636.8 360 5739.5 403.1 5739.5 403.1A54 54 0 0 1 5766.2 460.4L5759.6 516.3A27.3 27.3 0 0 1 5719.6 537.4L5600.5 487.1A35 35 0 0 1 5586.5 448.2ZM5441.9 434.5S5448.3 407.5 5469.2 416.2 5526.2 444.5 5526.2 444.5A30.8 30.8 0 0 1 5539.4 478.1L5533.6 509.7A15.6 15.6 0 0 1 5510 520.3L5443.9 487.3A20 20 0 0 1 5437.4 464.5ZM5832.1 408.8S5838.5 381.8 5859.3 390.4 5916.3 418.8 5916.3 418.8A30.9 30.9 0 0 1 5929.5 452.4L5923.7 484A15.6 15.6 0 0 1 5900.1 494.6L5834 461.6A20 20 0 0 1 5827.5 438.8ZM5520.3 255.2S5525.7 232.5 5543.2 239.8 5591.3 263.7 5591.3 263.7A26 26 0 0 1 5602.5 292L5597.6 318.7A13.2 13.2 0 0 1 5577.7 327.6L5522 299.9A16.9 16.9 0 0 1 5516.4 280.6ZM5687.2 300.9S5691.8 281.5 5706.7 287.7 5747.5 308 5747.5 308A22.1 22.1 0 0 1 5757 332.1L5752.8 354.8A11.2 11.2 0 0 1 5735.9 362.3L5688.6 338.7A14.3 14.3 0 0 1 5683.9 322.4ZM5600.9 555S5605.4 535.7 5620.3 541.9 5661.1 562.2 5661.1 562.2A22 22 0 0 1 5670.6 586.2L5666.4 608.9A11.1 11.1 0 0 1 5649.6 616.5L5602.3 592.9A14.3 14.3 0 0 1 5597.6 576.6ZM5403.2 300.9S5407.7 281.5 5422.6 287.7 5463.4 308 5463.4 308A22.1 22.1 0 0 1 5472.9 332.1L5468.7 354.8A11.2 11.2 0 0 1 5451.9 362.3L5404.6 338.7A14.3 14.3 0 0 1 5399.9 322.4ZM5943.5 607.8S5948.1 588.5 5963 594.7 6003.8 615 6003.8 615A22.1 22.1 0 0 1 6013.3 639L6009.1 661.7A11.1 11.1 0 0 1 5992.2 669.2L5944.9 645.7A14.4 14.4 0 0 1 5940.2 629.4ZM5785 603.8S5787.7 592.4 5796.5 596.1 5820.5 608.1 5820.5 608.1A13 13 0 0 1 5826.1 622.2L5823.7 635.6A6.6 6.6 0 0 1 5813.7 640L5785.9 626.1A8.5 8.5 0 0 1 5783.1 616.5ZM5332.2 445.1S5334.9 433.7 5343.7 437.4 5367.7 449.4 5367.7 449.4A13 13 0 0 1 5373.3 463.5L5370.8 476.9A6.6 6.6 0 0 1 5360.9 481.3L5333 467.4A8.4 8.4 0 0 1 5330.3 457.7ZM5261 326.8S5263.7 315.5 5272.5 319.1 5296.5 331.1 5296.5 331.1A13 13 0 0 1 5302.1 345.2L5299.6 358.6A6.6 6.6 0 0 1 5289.7 363L5261.8 349.1A8.4 8.4 0 0 1 5259.1 339.5ZM5218.3 680.7H5212.9C5206.5 680.7 5202.4 678.7 5200.8 674.5A11.8 11.8 0 0 1 5188.6 680.7C5178.1 680.7 5172.9 673.9 5172.9 660.3 5172.9 647 5178.1 640.4 5188.6 640.4H5205.3V664.3C5205.3 670.4 5208 673.4 5213.4 673.4H5218.2ZM5197.4 647.2H5189.1A7.1 7.1 0 0 0 5182.3 650.7 20.4 20.4 0 0 0 5180.7 660.2 21.1 21.1 0 0 0 5182.3 669.7 7 7 0 0 0 5189.1 673.3 6.9 6.9 0 0 0 5195.8 669.7 21 21 0 0 0 5197.5 660.2ZM5190.1 627.8A4.5 4.5 0 0 1 5185.7 632.4 4.5 4.5 0 0 1 5181.6 627.8 4.5 4.5 0 0 1 5185.9 623.2 4.5 4.5 0 0 1 5190.3 627.8M5201.3 627.8A4.6 4.6 0 0 1 5197 632.4 4.5 4.5 0 0 1 5192.8 627.8 4.4 4.4 0 0 1 5197 623.2 4.5 4.5 0 0 1 5201.3 627.8M5238.1 664.9A15.8 15.8 0 0 1 5233.9 676.3 14.8 14.8 0 0 1 5222.6 680.7H5216.3V673.4H5222.2Q5230.3 673.4 5230.3 664.3V643L5238.1 640.5ZM5233.2 693.3A4.3 4.3 0 1 1 5224.7 693.3 4.3 4.3 0 1 1 5233.2 693.3M5268.4 680.7H5259.7A10.4 10.4 0 0 1 5248.8 669.2V625.8L5256.6 623.1V668.9C5256.6 671.8 5257.9 673.2 5260.6 673.2H5268.4ZM5321.5 680.7H5266.3V673.4H5303.3V670.2A45.7 45.7 0 0 0 5301.6 655.5 10.6 10.6 0 0 0 5290.7 647.9 16.4 16.4 0 0 0 5278.2 654.9L5272.6 649.2A24.6 24.6 0 0 1 5290.7 640.5 17.5 17.5 0 0 1 5308 650.2 46.9 46.9 0 0 1 5311.3 670.1V673.1H5321.5ZM5394.5 680.7H5319.6V673.2H5329.4V650.6L5337.2 648.2V673.2H5353.5V646.9L5361.3 644.4V673.3H5377.8V642.9L5385.6 640.5V673.3H5394.5ZM5413.5 664.9A16.2 16.2 0 0 1 5409.3 676.3 14.9 14.9 0 0 1 5398 680.7H5392.7V673.2H5397.6C5402.9 673.2 5405.7 670.2 5405.7 664.1V625.8L5413.5 623.4ZM5432 680.7H5424.2V625.8L5432 623.1ZM5527.1 678.3C5527.1 691.4 5519.8 697.8 5505 697.8A20.9 20.9 0 0 1 5487.1 690.4 40.6 40.6 0 0 1 5481.3 670L5489.2 667.2A31.6 31.6 0 0 0 5492.7 684.8 14.4 14.4 0 0 0 5505.1 689.9 18.8 18.8 0 0 0 5515.3 687.7 10.7 10.7 0 0 0 5519.2 678.4V625.9L5527 623.3ZM5578.7 680.7H5568.9A21.9 21.9 0 0 1 5563.5 692.7 15.2 15.2 0 0 1 5551.6 697.9 17 17 0 0 1 5541.9 695.4L5538.4 687.2A27 27 0 0 0 5551.4 690.4 10.4 10.4 0 0 0 5561.1 680.6H5554.7A16.3 16.3 0 0 1 5541.9 675.3 18.9 18.9 0 0 1 5537.7 662.4 25.8 25.8 0 0 1 5541.3 648.1 14.3 14.3 0 0 1 5554.1 641.5C5564.5 641.5 5569.8 648.5 5569.8 662.4 5569.8 665.2 5569.8 668.8 5569.6 673.3H5578.6ZM5562 662.5A26.2 26.2 0 0 0 5560.9 653.5 6.7 6.7 0 0 0 5554.1 649C5548.4 649 5545.6 653.5 5545.6 662.5 5545.6 669.8 5548.6 673.4 5554.7 673.4H5562ZM5611.8 680.7H5606.4A14.6 14.6 0 0 1 5594.9 675.9 14.2 14.2 0 0 1 5583.3 680.7H5576.7V673.2H5582.8C5588.3 673.2 5591 670.2 5591 664.1V625.8L5598.8 623.1V664.5C5598.8 670.3 5601.5 673.1 5606.9 673.1H5611.7ZM5653.5 680.7H5609.7V673.4H5645.6V670.2A45.5 45.5 0 0 0 5643.8 655.5 10.6 10.6 0 0 0 5633.1 647.9 16.6 16.6 0 0 0 5620.5 654.9L5614.9 649.2A24.7 24.7 0 0 1 5633.1 640.5 17.6 17.6 0 0 1 5650.3 650.2 48.7 48.7 0 0 1 5653.5 670.1ZM6139 744.3A28.9 28.9 0 0 1 6130.3 765.5 29.7 29.7 0 0 1 6088.2 765.5 29 29 0 0 1 6079.5 744.3 27.8 27.8 0 0 1 6082.3 731.7 28.9 28.9 0 0 1 6090.3 721.5 28.5 28.5 0 0 1 6109 714.6 29.2 29.2 0 0 1 6121.4 717.2 28.6 28.6 0 0 1 6134.2 728.1 29.6 29.6 0 0 1 6139 744.4M6109.1 718.9A23.5 23.5 0 0 0 6091.6 726.4 25.8 25.8 0 0 0 6091.6 762.5 24.5 24.5 0 0 0 6126.9 762.5 25.1 25.1 0 0 0 6134.2 744.3 27.6 27.6 0 0 0 6131.4 732.6 24 24 0 0 0 6123.8 723.5 24.9 24.9 0 0 0 6109.1 718.8M6112.2 747.2L6123.4 761.6H6115.4L6105.1 748V761.6H6098.6V727.2H6105.5A17.3 17.3 0 0 1 6116 729.7 9.5 9.5 0 0 1 6119.6 737.4 10.2 10.2 0 0 1 6117.7 743.4 9.4 9.4 0 0 1 6112.7 747ZM6105.1 742.4H6106.2C6110.9 742.4 6113.3 740.7 6113.3 737.5S6111 732.9 6106.5 732.9H6105Z", + "width": 6139 + }, + "search": [ + "powered-by-cs" + ] + }, + { + "uid": "d22e70eb076c0432112b21f188078144", + "css": "ecg", + "code": 59438, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M34.6 0H965.4A34.6 34.6 0 0 1 1000 34.6V464.3L698.3 464.3A35.7 35.7 0 0 0 665 487.3L598.8 660.6 433.1 226.5A35.5 35.5 0 0 0 399.8 203.5H399.8A35.5 35.5 0 0 0 366.4 226.4L275.4 464.5 0 464.3V34.6A34.6 34.6 0 0 1 34.6 0ZM965.4 1000A34.6 34.6 0 0 0 1000 965.4V535.7L722.9 535.7 632.2 773.5A35.7 35.7 0 0 1 565.4 773.5L399.7 339.3 333.4 512.8A35.7 35.7 0 0 1 300 535.8H300L0.2 535.8V965.4A34.6 34.6 0 0 0 34.8 1000H965.4Z", + "width": 1000 + }, + "search": [ + "ecg" + ] + }, + { + "uid": "742f19f79dc108f718fea3d8f79078b1", + "css": "create-episode", + "code": 59439, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M825.8 83.3A125 125 0 0 0 708.4 0H125A125.4 125.4 0 0 0 0 125V708.4A125 125 0 0 0 83.3 825.9V291.7A208.3 208.3 0 0 1 291.7 83.3ZM875 166.7H291.6A125.4 125.4 0 0 0 166.7 291.6V875A125.4 125.4 0 0 0 291.6 1000H875A125.4 125.4 0 0 0 1000 875V291.6A125.4 125.4 0 0 0 875 166.7ZM750 625H625V750A41.7 41.7 0 0 1 541.7 750V625H416.7A41.7 41.7 0 1 1 416.7 541.7H541.7V416.7A41.7 41.7 0 1 1 625 416.7V541.7H750A41.7 41.7 0 0 1 750 625Z", + "width": 1000 + }, + "search": [ + "create-episode" + ] + }, + { + "uid": "2ba8ebad7ef116f8bea385f28153e2d1", + "css": "booked", + "code": 59440, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M907.9 1000H162.7A163.1 163.1 0 0 1 0 837.9V321.9H1070.7V837.9A163.1 163.1 0 0 1 907.9 1000.3ZM71.4 393.3V837.9A91.7 91.7 0 0 0 162.7 928.8H907.9A91.7 91.7 0 0 0 999.2 837.9V393.3ZM1070.7 393H0V235.7A163.1 163.1 0 0 1 162.7 72.1H907.9A163.1 163.1 0 0 1 1070.6 235.7ZM71.4 321.9H999.2V235.7A91.7 91.7 0 0 0 907.9 143.6H162.7A91.7 91.7 0 0 0 71.4 235.7ZM46.8 357.6V937.5H1017.1V357.6ZM356.9 717.3A35.7 35.7 0 1 1 392.6 681.6 35.7 35.7 0 0 1 356.9 717.3ZM535.3 717.3A35.7 35.7 0 1 1 571 681.6 35.7 35.7 0 0 1 535.3 717.3ZM713.8 717.3A35.7 35.7 0 1 1 749.4 681.6 35.7 35.7 0 0 1 713.8 717.3Z", + "width": 1071 + }, + "search": [ + "booked" + ] + }, + { + "uid": "2b6d9d51ce00485109e1548f1318cd5c", + "css": "admission-req", + "code": 59441, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 1000H1101.9V598.3H0ZM518.7 689.9H583.2V762.6H655.9V827.1H583.2V899.8H518.7V827.1H445.9V762.6H518.6ZM64.5 458.4H1037.3V533.7H64.5ZM422.6 178C422.6 176.1 422.6 174.2 422.4 172.3H219.5C219.5 174.2 219.3 176.1 219.3 178A101.7 101.7 0 0 0 309.7 278.9H332.1A101.7 101.7 0 0 0 422.6 178ZM288.7 279H258.4A129.4 129.4 0 0 0 129.9 393.8H288.7V279ZM383.6 279H353.3V393.8H512.1A129.4 129.4 0 0 0 383.6 279ZM425.1 107.8L444.1 22.7A344.4 344.4 0 0 0 198.1 22.7L217 107.8ZM639.1 241.7H972.7V393.9H639.1Z", + "width": 1102 + }, + "search": [ + "admission-req" + ] + }, + { + "uid": "68d26212e04d7c6eb8c87d3d2c656220", + "css": "walkin", + "code": 59442, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M271.2 118.6H305.1A50.4 50.4 0 0 0 334.2 164.4 101.6 101.6 0 1 0 254.2 203.4 100 100 0 0 0 307.5 188.3 85.2 85.2 0 0 1 271.2 118.6ZM168 639.4L135.6 779.7 33.9 932.2 118.6 1000 254.2 813.6 274.5 746.2 171.1 642.8C170 641.7 169.1 640.5 168 639.4ZM108.3 529.8A238 238 0 0 1 101.7 475.1V385L0 508.4 67.8 576.4ZM383.6 583.9L227.8 498.8 155.6 335.8 186.6 322 254.4 474.6 372.9 539.4 440.7 576.4 491.6 491.4 373 420.2V271.2A67.8 67.8 0 0 0 305.1 203.4H203.4A67.8 67.8 0 0 0 135.6 271.2V475.2A203.2 203.2 0 0 0 195.1 618.9L339.1 762.9 389.9 983.2H491.6L440.8 712Z", + "width": 492 + }, + "search": [ + "walkin" + ] + }, + { + "uid": "579dfe811674561f24e9f789ce658182", + "css": "health-bmi", + "code": 59450, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M215.7 571.7C214.2 589.1 226 680.9 232 716.9 234.9 734 242.9 761.8 240 776.5A216.6 216.6 0 0 0 237 839.2C238.4 848.6 242.9 892 236.5 907.9A500.9 500.9 0 0 0 227.1 958.9C211.1 999.1 220.1 997.1 220.1 997.1 225 1003.2 233.5 997.6 233.5 997.6A8.2 8.2 0 0 0 244.4 996.6 9.9 9.9 0 0 0 256.4 996.1 12.2 12.2 0 0 0 269.8 993C273.7 995 274.7 992.5 274.7 992.5 286.7 991.7 268 953.5 268 953.5A104.5 104.5 0 0 1 272.5 900C301.6 813.7 303 790.8 291.4 758.3 288.1 748.9 287.3 745.2 288.8 741.1 292.3 731.7 289.8 693.9 294 678.8 302.2 649.9 310.3 576.4 314.5 542.1 320.1 495.9 294.4 434 294.4 434 288.8 408.8 297 319 297 319 308.6 336.9 308.1 368.6 308.1 368.6 306.3 401.9 335 452.7 335 452.7A135.3 135.3 0 0 1 354 495.1C354 501.1 352.7 515.8 352.7 515.8L353.2 528.5A181.9 181.9 0 0 1 354.9 548.4C352.8 581.7 358 575.4 358 575.4 362.5 575.4 367.4 548.6 367.4 548.6A114.7 114.7 0 0 0 369.5 584C373.9 593.2 377.2 582.4 377.2 580.2 378.4 537.8 381 548.9 381 548.9 383.4 583.3 386.5 591 391.9 588.3 396.1 586.4 392.3 547.1 392.3 547.1 399.4 570.4 404.7 574.1 404.7 574.1 416.4 582.4 409.2 559.7 407.6 555.2A128.9 128.9 0 0 1 398.7 523.1C409.5 544.5 417.6 543.7 417.6 543.7 428.1 540.3 408.4 510 396.8 495.5A118.2 118.2 0 0 1 381.1 472.2 280.5 280.5 0 0 1 374.8 430.2 126.3 126.3 0 0 0 364.3 375.9C348.3 350.3 345.3 302.6 345.3 302.6L344.6 222C339 167 298.5 166.6 298.5 166.6 257.5 160.5 251.8 147.3 251.8 147.3 243.2 134.8 248.1 110.8 248.1 110.8A43.5 43.5 0 0 0 258.1 89.4C270 80.3 269.4 66.9 263.9 67 259.5 67.1 260.5 63.4 260.5 63.4 268 3.1 214.4 0 214.4 0H206.2S152.6 3.1 160.1 63.4C160.1 63.4 161.1 67.1 156.6 67 151.1 66.8 150.6 80.3 162.5 89.4A43.5 43.5 0 0 0 172.5 110.8S177.4 134.8 168.8 147.2C168.8 147.2 163.1 160.5 122.1 166.6 122.1 166.6 81.5 167 76 222L75.2 302.6S72.3 350.3 56.2 375.9A126.8 126.8 0 0 0 45.8 430.2 282.3 282.3 0 0 1 39.5 472.3 116.9 116.9 0 0 1 23.8 495.5C12.1 510-7.5 540.2 3 543.7 3 543.7 11.2 544.5 21.9 523.1A127.6 127.6 0 0 1 13.1 555.2C11.4 559.6 4.1 582.3 15.8 574.2 15.8 574.2 21.2 570.4 28.3 547.1 28.3 547.1 24.5 586.4 28.7 588.4 34.2 591 37.2 583.3 39.7 548.9 39.7 548.9 42.2 537.8 43.4 580.2 43.5 582.4 46.7 593.3 51.1 584A113.1 113.1 0 0 0 53.2 548.6S58 575.4 62.6 575.4C62.6 575.4 67.9 581.7 65.7 548.4A167.4 167.4 0 0 1 67.4 528.6L68 515.8S66.6 501.2 66.6 495.1A135.1 135.1 0 0 1 85.6 452.7S114.3 401.9 112.4 368.7C112.4 368.7 112 337 123.6 319 123.6 319 131.8 408.8 126.2 434 126.2 434 100.4 496 106.1 542.2 110.3 576.5 118.4 649.9 126.6 678.9 130.9 693.9 128.4 731.7 131.8 741.2 133.3 745.3 132.5 749.1 129.2 758.4 117.6 790.9 119.1 813.8 148.2 900.1A103.5 103.5 0 0 1 152.6 953.6S134 991.8 145.9 992.6C145.9 992.6 146.9 995.1 150.9 993.1A12.3 12.3 0 0 0 164.3 996.1 9.9 9.9 0 0 0 176.2 996.7 8.2 8.2 0 0 0 187.1 997.7S195.5 1003.4 200.5 997.2C200.5 997.2 209.4 999.2 193.6 959A498.5 498.5 0 0 0 184.1 908C177.8 892.1 182.3 848.6 183.6 839.3A220.4 220.4 0 0 0 180.7 776.5C177.8 761.8 185.7 734 188.7 716.9 194.7 680.9 206.5 589.1 205.1 571.7L209.9 573.4A9.9 9.9 0 0 0 215.7 571.7Z", + "width": 421 + }, + "search": [ + "health-bmi" + ] + }, + { + "uid": "389526f53cb47083744673fb25e56e5e", + "css": "health-bmi-r", + "code": 59451, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M215.7 571.7C214.2 589.1 226 680.9 232 716.9 234.9 734 242.9 761.8 240 776.5A216.6 216.6 0 0 0 237 839.2C238.4 848.6 242.9 892 236.5 907.9A500.9 500.9 0 0 0 227.1 958.9C211.1 999.1 220.1 997.1 220.1 997.1 225 1003.2 233.5 997.6 233.5 997.6A8.2 8.2 0 0 0 244.4 996.6 9.9 9.9 0 0 0 256.4 996.1 12.2 12.2 0 0 0 269.8 993C273.7 995 274.7 992.5 274.7 992.5 286.7 991.7 268 953.5 268 953.5A104.5 104.5 0 0 1 272.5 900C301.6 813.7 303 790.8 291.4 758.3 288.1 748.9 287.3 745.2 288.8 741.1 292.3 731.7 289.8 693.9 294 678.8 302.2 649.9 310.3 576.4 314.5 542.1 320.1 495.9 294.4 434 294.4 434 288.8 408.8 297 319 297 319 308.6 336.9 308.1 368.6 308.1 368.6 306.3 401.9 335 452.7 335 452.7A135.3 135.3 0 0 1 354 495.1C354 501.1 352.7 515.8 352.7 515.8L353.2 528.5A181.9 181.9 0 0 1 354.9 548.4C352.8 581.7 358 575.4 358 575.4 362.5 575.4 367.4 548.6 367.4 548.6A114.7 114.7 0 0 0 369.5 584C373.9 593.2 377.2 582.4 377.2 580.2 378.4 537.8 381 548.9 381 548.9 383.4 583.3 386.5 591 391.9 588.3 396.1 586.4 392.3 547.1 392.3 547.1 399.4 570.4 404.7 574.1 404.7 574.1 416.4 582.4 409.2 559.7 407.6 555.2A128.9 128.9 0 0 1 398.7 523.1C409.5 544.5 417.6 543.7 417.6 543.7 428.1 540.3 408.4 510 396.8 495.5A118.2 118.2 0 0 1 381.1 472.2 280.5 280.5 0 0 1 374.8 430.2 126.3 126.3 0 0 0 364.3 375.9C348.3 350.3 345.3 302.6 345.3 302.6L344.6 222C339 167 298.5 166.6 298.5 166.6 257.5 160.5 251.8 147.3 251.8 147.3 243.2 134.8 248.1 110.8 248.1 110.8A43.5 43.5 0 0 0 258.1 89.4C270 80.3 269.4 66.9 263.9 67 259.5 67.1 260.5 63.4 260.5 63.4 268 3.1 214.4 0 214.4 0H206.2S152.6 3.1 160.1 63.4C160.1 63.4 161.1 67.1 156.6 67 151.1 66.8 150.6 80.3 162.5 89.4A43.5 43.5 0 0 0 172.5 110.8S177.4 134.8 168.8 147.2C168.8 147.2 163.1 160.5 122.1 166.6 122.1 166.6 81.5 167 76 222L75.2 302.6S72.3 350.3 56.2 375.9A126.8 126.8 0 0 0 45.8 430.2 282.3 282.3 0 0 1 39.5 472.3 116.9 116.9 0 0 1 23.8 495.5C12.1 510-7.5 540.2 3 543.7 3 543.7 11.2 544.5 21.9 523.1A127.6 127.6 0 0 1 13.1 555.2C11.4 559.6 4.1 582.3 15.8 574.2 15.8 574.2 21.2 570.4 28.3 547.1 28.3 547.1 24.5 586.4 28.7 588.4 34.2 591 37.2 583.3 39.7 548.9 39.7 548.9 42.2 537.8 43.4 580.2 43.5 582.4 46.7 593.3 51.1 584A113.1 113.1 0 0 0 53.2 548.6S58 575.4 62.6 575.4C62.6 575.4 67.9 581.7 65.7 548.4A167.4 167.4 0 0 1 67.4 528.6L68 515.8S66.6 501.2 66.6 495.1A135.1 135.1 0 0 1 85.6 452.7S114.3 401.9 112.4 368.7C112.4 368.7 112 337 123.6 319 123.6 319 131.8 408.8 126.2 434 126.2 434 100.4 496 106.1 542.2 110.3 576.5 118.4 649.9 126.6 678.9 130.9 693.9 128.4 731.7 131.8 741.2 133.3 745.3 132.5 749.1 129.2 758.4 117.6 790.9 119.1 813.8 148.2 900.1A103.5 103.5 0 0 1 152.6 953.6S134 991.8 145.9 992.6C145.9 992.6 146.9 995.1 150.9 993.1A12.3 12.3 0 0 0 164.3 996.1 9.9 9.9 0 0 0 176.2 996.7 8.2 8.2 0 0 0 187.1 997.7S195.5 1003.4 200.5 997.2C200.5 997.2 209.4 999.2 193.6 959A498.5 498.5 0 0 0 184.1 908C177.8 892.1 182.3 848.6 183.6 839.3A220.4 220.4 0 0 0 180.7 776.5C177.8 761.8 185.7 734 188.7 716.9 194.7 680.9 206.5 589.1 205.1 571.7L209.9 573.4A9.9 9.9 0 0 0 215.7 571.7Z", + "width": 421 + }, + "search": [ + "health-bmi-r" + ] + }, + { + "uid": "b10e8135ab3032dd84d104a1d1600e59", + "css": "reschedule-", + "code": 59443, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M484.5 67.2L7.6 3.6A17.9 17.9 0 0 0 0 17.9V920.2A17.9 17.9 0 0 0 15.5 937.9L479.8 999.8A17.9 17.9 0 0 0 493.8 995.7 17.5 17.5 0 0 0 500 982.3V84.9A17.9 17.9 0 0 0 484.5 67.2ZM423.3 512.6L369.7 566.3A17.9 17.9 0 0 1 344.4 541L367.5 518H89.3A17.9 17.9 0 1 1 89.3 482.3H367.6L344.5 459.2A17.9 17.9 0 0 1 369.8 433.9L423.5 487.6A17.9 17.9 0 0 1 423.5 512.8ZM535.7 201.4A336 336 0 0 1 643 165V17.9A17.9 17.9 0 0 0 625.2 0H251.5L489.4 31.7A53.7 53.7 0 0 1 535.9 84.9V201.4ZM535.7 928.5H625A17.9 17.9 0 0 0 642.9 910.6V834.8A336 336 0 0 1 535.5 798.4ZM696.4 196.4A301.3 301.3 0 0 0 535.7 242.9V286.2A267.5 267.5 0 1 1 831.7 730.9C831.2 731.2 830.9 731.7 830.4 732A13.8 13.8 0 0 1 828.6 732.7 266.1 266.1 0 0 1 535.7 713.9V757.2A303.5 303.5 0 1 0 696.4 196.4ZM598.2 329.9A17.9 17.9 0 0 1 573.8 323.3L565.3 308.5A234.4 234.4 0 0 0 535.7 332.9V667.1A234.5 234.5 0 0 0 565.3 691.5L573.8 676.7A17.9 17.9 0 1 1 604.8 694.5L596.3 709.2A229.9 229.9 0 0 0 678.6 731.3V714.3A17.9 17.9 0 1 1 714.3 714.3V731.2A229.9 229.9 0 0 0 796.6 709.1L788.3 694.5A17.9 17.9 0 1 1 819.2 676.6L827.7 691.4A233.9 233.9 0 0 0 888 631.1L873.3 622.6A17.9 17.9 0 1 1 891.2 591.7L905.8 599.9A229.7 229.7 0 0 0 927.9 517.7H910.9A17.9 17.9 0 0 1 910.9 482H927.8A229.7 229.7 0 0 0 905.7 399.7L891.1 408A17.9 17.9 0 1 1 873.2 377.1L887.9 368.6A233.9 233.9 0 0 0 827.7 308.3L819.2 323A17.9 17.9 0 1 1 788.2 305.1L796.5 290.5A229.8 229.8 0 0 0 714.2 268.4V285.4A17.9 17.9 0 1 1 678.5 285.4V268.4A229.9 229.9 0 0 0 596.2 290.4L604.7 305.1A17.9 17.9 0 0 1 598.2 329.9ZM678.6 449.6V374.9A17.9 17.9 0 0 1 714.3 374.9V449.6A53.7 53.7 0 0 1 746.8 482H785.8A17.9 17.9 0 1 1 785.8 517.7H746.8A53.5 53.5 0 1 1 678.7 449.6Z", + "width": 1000 + }, + "search": [ + "reschedule-" + ] + }, + { + "uid": "b3149ed370567049bc19ff11fb449d92", + "css": "edit", + "code": 59444, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M571.4 635.7A88.7 88.7 0 0 1 537 657L412.7 698.4A87.7 87.7 0 0 1 384.9 702.9H384.9A87.9 87.9 0 0 1 301.5 587.2L342.9 462.9A88.3 88.3 0 0 1 364.1 428.6L632.7 160.1H107.4A107.5 107.5 0 0 0 0 267.6V892.6A107.5 107.5 0 0 0 107.4 999.8H732.4A107.5 107.5 0 0 0 839.9 892.4V367.3ZM405.7 469.9A29.3 29.3 0 0 0 398.6 481.4L357.2 605.7A29.3 29.3 0 0 0 394.2 642.7L518.5 601.3A29.3 29.3 0 0 0 530 594.2L895.9 228.2 771.7 103.9ZM930.5 14.3A48.8 48.8 0 0 0 861.4 14.3L813.1 62.6 937.4 186.9 985.7 138.6A48.8 48.8 0 0 0 985.7 69.5Z", + "width": 1000 + }, + "search": [ + "edit" + ] + }, + { + "uid": "62eceb513690fcf588af5818c18d0094", + "css": "lab-results", + "code": 59445, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M633.4 0L547 23.2 523.8 109.6 587 172.8 673.4 149.6C681.4 120.9 688.9 92.1 696.6 63.3ZM206.2 20.1V53.8H239.8C240.2 143.1 239.8 232.1 239.8 321.2 237.7 325.8 72 689.9 4.2 893.4A102.8 102.8 0 0 0 6.2 957.1 75.5 75.5 0 0 0 22.3 985.5 44.5 44.5 0 0 0 54.1 1000H628.1A44.5 44.5 0 0 0 659.9 985.5 75.5 75.5 0 0 0 676.1 957.1 102.8 102.8 0 0 0 678 893.4C610.2 689.9 444.4 325.9 442.5 321.2 442.8 232.1 442.7 143 442.7 53.8H476.5V20.1ZM815 52.1L728.6 75.2 705.6 161.6 768.8 224.9 855.2 201.7C862.7 172.9 870.6 144.1 878.4 115.3ZM408.8 53.8V222.8L273.6 223.2 273.6 54.3ZM684.3 177L597.9 200.2 574.7 286.6 638 349.8 724.4 326.6Q735.9 283.4 747.4 240.2ZM712.8 391.5V425.3H746.6V847.5A357 357 0 0 0 753 948 70.1 70.1 0 0 0 779.3 985.8 89.1 89.1 0 0 0 831 999.4 89 89 0 0 0 882.7 985.8 69.7 69.7 0 0 0 908.9 948 356.8 356.8 0 0 0 915.4 847.5V425.3H949.1V391.6ZM780.2 425.3H881.7V560.4H780.3ZM464.5 611.6A46.1 46.1 0 0 1 433.7 669.3 45.5 45.5 0 0 1 416.8 671L398.3 713.8A65.5 65.5 0 0 1 419 780.9L461.3 804.7A45.3 45.3 0 0 1 476.3 796.7 46.3 46.3 0 1 1 445.4 854.4 45.3 45.3 0 0 1 444.2 833.8L402.6 810.4A66.5 66.5 0 0 1 373.6 828.7 67.5 67.5 0 0 1 289.6 783.9 66.7 66.7 0 0 1 289.3 746.5L260.3 730.2A45.3 45.3 0 0 1 242.9 740.3 46.2 46.2 0 1 1 273.6 682.6 45.3 45.3 0 0 1 275.3 700L306.3 717.5A64.3 64.3 0 0 1 368 698.9L386.4 656.5A45.3 45.3 0 0 1 375.9 638.7 48.8 48.8 0 0 1 418.7 579.7 43.1 43.1 0 0 1 464.5 611.8Z", + "width": 949 + }, + "search": [ + "lab-results" + ] + }, + { + "uid": "b8c24ee4205dd048e10770f7e63b6315", + "css": "logout", + "code": 59447, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 0A500 500 0 1 0 1000 500 500.5 500.5 0 0 0 500 0ZM470.7 167.9A29.3 29.3 0 1 1 529.3 167.9V402.3A29.3 29.3 0 0 1 470.7 402.3ZM500 822.3A322.2 322.2 0 0 1 371.2 204.7 29.3 29.3 0 0 1 394.7 258.4 263.7 263.7 0 1 0 605.6 258.4 29.3 29.3 0 0 1 629.1 204.8 322.2 322.2 0 0 1 500 822.3Z", + "width": 1000 + }, + "search": [ + "logout" + ] + }, + { + "uid": "64a64005d594ba0971f9384a182f3e62", + "css": "obese-bmi", + "code": 59448, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M307.3 571.7C305.2 589.1 322 680.9 330.6 716.9 334.8 734 346.1 761.8 342 776.5A153.3 153.3 0 0 0 337.7 839.2C339.7 848.6 346 892 337 907.9A369.5 369.5 0 0 0 323.5 958.9C300.8 999.1 313.6 997.1 313.6 997.1 320.6 1003.2 332.7 997.6 332.7 997.6A15.3 15.3 0 0 0 348.1 996.6 18.9 18.9 0 0 0 365.2 996.1 22.4 22.4 0 0 0 384.2 993C389.9 995 391.3 992.5 391.3 992.5 408.3 991.7 381.8 953.5 381.8 953.5A76.3 76.3 0 0 1 388.1 900C429.5 813.7 431.7 790.8 415.1 758.3 410.4 748.9 409.2 745.2 411.4 741.1 416.3 731.7 412.7 693.9 418.8 678.8 430.5 649.9 442 576.4 448 542.1 456.1 495.9 419.4 434 419.4 434 411.4 408.8 423.1 319 423.1 319 439.6 336.9 439 368.6 439 368.6 436.4 401.9 477.2 452.7 477.2 452.7A118.4 118.4 0 0 1 504.3 495.1C504.3 501.1 502.4 515.8 502.4 515.8L503.2 528.5A129.3 129.3 0 0 1 505.7 548.3C502.6 581.6 510.2 575.3 510.2 575.3 516.5 575.3 523.5 548.5 523.5 548.5 523.5 555.4 521.1 576.1 526.4 583.9 532.7 593.2 537.4 582.3 537.5 580.1 539.2 537.8 542.8 548.9 542.8 548.9 546.3 583.2 550.7 591 558.4 588.3 564.3 586.3 558.9 547.1 558.9 547.1 569 570.4 576.7 574.1 576.7 574.1 593.3 582.3 583 559.6 580.7 555.1A99.2 99.2 0 0 1 568 523C583.4 544.5 595 543.6 595 543.6 610 540.3 581.9 509.9 565.4 495.4A126 126 0 0 1 543 472.2 203.5 203.5 0 0 1 534 430.1C532.4 392.3 519.1 375.9 519.1 375.9 496.3 350.3 492 302.5 492 302.5L491 221.9C483 166.9 425.3 166.5 425.3 166.5 366.9 160.4 358.8 147.2 358.8 147.2 346.4 134.7 353.5 110.8 353.5 110.8A38.7 38.7 0 0 0 367.7 89.4C384.7 80.2 383.9 66.8 376 66.9 369.7 67 371.2 63.4 371.2 63.4 381.9 3.1 305.5 0 305.5 0H293.9S217.5 3.1 228.1 63.4C228.1 63.4 229.6 67.1 223.2 67 215.4 66.8 214.6 80.3 231.6 89.4A38.7 38.7 0 0 0 245.8 110.8S252.9 134.8 240.5 147.2C240.5 147.2 232.4 160.5 174 166.6 174 166.6 116.2 167 108.3 222L107.2 302.6S103 350.3 80.2 375.9C80.2 375.9 66.9 392.4 65.4 430.2A204.8 204.8 0 0 1 56.4 472.3 124.6 124.6 0 0 1 33.9 495.5C17.3 510-10.7 540.2 4.3 543.7 4.3 543.7 16 544.5 31.3 523.1A98.1 98.1 0 0 1 18.7 555.2C16.3 559.6 6 582.3 22.6 574.2 22.6 574.2 30.3 570.4 40.4 547.1 40.4 547.1 35 586.4 41 588.4 48.8 591 53.1 583.3 56.6 548.9 56.6 548.9 60.2 537.8 61.9 580.2 62 582.4 66.5 593.3 72.9 584 78.3 576.2 75.9 555.5 75.9 548.6 75.9 548.6 82.8 575.4 89.2 575.4 89.2 575.4 96.8 581.7 93.7 548.4A119.1 119.1 0 0 1 96.2 528.5L96.9 515.8S95 501.1 95 495.1A118.3 118.3 0 0 1 122.1 452.7S162.9 401.8 160.3 368.6C160.3 368.6 159.7 336.9 176.2 319 176.2 319 187.9 408.8 180 434 180 434 143.2 495.9 151.3 542.1 157.3 576.5 168.8 649.9 180.5 678.8 186.6 693.8 183 731.7 187.9 741.1 190.1 745.2 188.9 749 184.2 758.3 167.7 790.8 169.8 813.7 211.3 900A75.6 75.6 0 0 1 217.6 953.5S191.1 991.7 208.1 992.5C208.1 992.5 209.4 995 215.1 993A22.4 22.4 0 0 0 234.2 996.1 18.8 18.8 0 0 0 251.2 996.6 15.2 15.2 0 0 0 266.7 997.6S278.7 1003.3 285.8 997.1C285.8 997.1 298.5 999.1 275.9 958.9A367.7 367.7 0 0 0 262.5 907.9C253.4 892.1 259.9 848.6 261.8 839.2A155.9 155.9 0 0 0 257.5 776.5C253.3 761.8 264.7 734 268.9 716.9 277.5 680.9 294.3 589.1 292.2 571.7L299.2 573.4A18.3 18.3 0 0 0 307.3 571.7Z", + "width": 599 + }, + "search": [ + "obese-bmi" + ] + }, + { + "uid": "8def4a3c24de0ce8f44b7815c2c60e8b", + "css": "livecare", + "code": 59449, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M359.7 999.9H201.4A198.3 198.3 0 0 1 123.3 984 203.2 203.2 0 0 1 16.1 877 197.1 197.1 0 0 1 0.2 799.1V200.7A197.7 197.7 0 0 1 16.1 122.7 203 203 0 0 1 123.2 15.8 197.7 197.7 0 0 1 201 0H943.2A197.7 197.7 0 0 1 1021.2 15.9 202.9 202.9 0 0 1 1128.1 123 197.7 197.7 0 0 1 1143.3 200.8V348.4A165.5 165.5 0 0 0 1143.3 658.1V798.8A198.3 198.3 0 0 1 1127.7 876.9 202.3 202.3 0 0 1 1020.9 984.1 197.7 197.7 0 0 1 943 1000H769.8A523.4 523.4 0 0 0 826.4 943.9 52.2 52.2 0 0 0 837.9 902.6 762.6 762.6 0 0 0 945.5 700.1 735.6 735.6 0 0 0 974.8 593.4 534.2 534.2 0 0 0 985 493.3 353.7 353.7 0 0 0 969.2 377.4 151.4 151.4 0 0 0 923.5 309.3 216.9 216.9 0 0 0 851 271.4C822.4 261.7 789.4 254.2 754.4 246.2H754.4L754.4 246.2A54 54 0 0 0 706.1 215.5 54.9 54.9 0 1 0 706.1 325.4 52.7 52.7 0 0 0 738.4 313.3L739.7 313.7H739.7L740.6 313.7C775.5 321.8 803.1 328.4 826 335.7A149.3 149.3 0 0 1 880.4 363.5 93 93 0 0 1 908.6 411.4 320 320 0 0 1 916.7 493.8 460.9 460.9 0 0 1 907.2 582.5 666.4 666.4 0 0 1 880.5 677.7 743.1 743.1 0 0 1 838.7 772.4 656 656 0 0 1 784.3 859 52.4 52.4 0 0 0 748.2 876.5 370.9 370.9 0 0 1 670.2 946.2 179.5 179.5 0 0 1 459.8 946.2 368 368 0 0 1 381.8 876.9 52.4 52.4 0 0 0 345.7 859.4 659.1 659.1 0 0 1 291.2 772.5 747 747 0 0 1 249.4 677.3 664.2 664.2 0 0 1 222.6 582.1 463.2 463.2 0 0 1 213.1 493.3 323.7 323.7 0 0 1 221.1 410.8 92.7 92.7 0 0 1 249.2 362.9 148.8 148.8 0 0 1 303.6 335.1C326.8 327.8 355.9 321 389.6 313.1L390.3 313.1H390.3L390.8 312.7A54.1 54.1 0 0 0 423.8 324.9 54.8 54.8 0 1 0 423.8 215 53.1 53.1 0 0 0 394.5 223.7 59.5 59.5 0 0 0 374.6 245.6H374.6L373.9 245.6C230.3 278.8 143.6 298.8 143.6 492.9A534.1 534.1 0 0 0 153.9 593.2 737.8 737.8 0 0 0 183.2 700 757.5 757.5 0 0 0 291.6 902.9 52 52 0 0 0 303.2 944.1 529.8 529.8 0 0 0 359.1 999.6H359.1ZM1787.8 895.3H1706.6A70 70 0 0 1 1669.9 884.8L1332 671.5A33.4 33.4 0 0 1 1316.4 643.4V622.6A165.3 165.3 0 0 0 1316.4 384.5V347A33.4 33.4 0 0 1 1332 318.9L1669.9 105.6A66.9 66.9 0 0 1 1706.6 95.1H1787.8A33.5 33.5 0 0 1 1821.5 128.2V862.6A32.9 32.9 0 0 1 1811.7 886 33.5 33.5 0 0 1 1787.9 895.7ZM467.9 673.5H485.2L539.5 673.5C546 673.5 551.4 666.6 551.7 656.7V611.6C551.7 601.9 556 594.4 562.7 593.9L579.3 593.9C586.1 594.4 590.7 602 590.7 611.6V656.8C590.7 666.8 595.5 673.2 602.1 673.2L675.3 673.2 675.3 617.1C675.3 607.5 670.7 600 663.9 599.6L634.6 599.6C628.1 599.6 623.1 592.7 622.8 582.7L622.8 567.6C622.8 557.6 628.2 550.8 634.7 550.8H664C670.7 550.3 675.1 542.4 675.1 532.8V463.3A29.8 29.8 0 0 1 652.4 477.4H602.8C596.3 477.4 590.9 484.7 590.6 494.4V539.7C590.6 549.6 585.3 556.6 578.8 556.6L564.1 556.6C557.6 556.6 552.4 549.8 552.1 539.9V494C552.1 484.1 546.7 477.4 540.2 477.4H468.1V533.3C468.1 543 472.6 550.6 479.4 551.2L508.7 551.2C515.3 551.6 520.1 559.6 520.1 569.2V582.1C520.1 591.8 515.6 599.5 508.8 599.9H479.5C472.8 600.4 468.3 608.1 468.3 617.6ZM716 459.1V693.1A29.7 29.7 0 0 1 686 721.3H455.4A29.3 29.3 0 0 1 425.6 693.1V459.1A29.7 29.7 0 0 1 455.4 430.5H685.9A30.2 30.2 0 0 1 716 459.1ZM468.1 673.5H485.5L539.7 673.5C546.2 673.5 551.6 666.6 551.9 656.7V611.6C551.9 601.9 556.2 594.4 562.9 593.9L579.6 593.9C586.2 594.4 590.8 602 590.8 611.6V657.2C590.8 667.2 595.7 673.6 602.2 673.6L675.4 673.6 675.4 617.5C675.4 607.8 670.8 600.4 664.1 599.9L634.8 599.9C628.3 599.9 623.2 593 622.9 583.1L622.9 567.9C622.9 558 628.3 551.2 634.9 551.2H664.2C670.9 550.7 675.2 542.8 675.2 533.2V463.3A29.8 29.8 0 0 1 652.6 477.4H602.9C596.5 477.4 591.1 484.7 590.8 494.4V539.4C590.8 549.3 585.4 556.3 578.9 556.3L563.9 556.3C557.4 556.3 552.2 549.5 551.9 539.6V494.2C551.9 484.2 546.5 477.6 539.9 477.6H468.1V533.4C468.1 543.1 472.6 550.8 479.4 551.3L508.7 551.3C515.3 551.7 520.1 559.7 520.1 569.3V582.3C520.1 591.9 515.6 599.6 508.8 600.1H479.5C472.8 600.5 468.3 608.2 468.3 617.8ZM1202.1 400.4A96.2 96.2 0 1 1 1106 496.6H1106A96.2 96.2 0 0 1 1202.1 400.4Z", + "width": 1821 + }, + "search": [ + "livecare" + ] + }, + { + "uid": "a02f08ac7cc84e1f52f4753adda54c87", + "css": "modify-episode", + "code": 59452, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M825.8 83.3A125 125 0 0 0 708.3 0H125A125.4 125.4 0 0 0 0 125V708.3A125 125 0 0 0 83.3 825.8V291.7A208.3 208.3 0 0 1 291.7 83.3ZM875 1000H291.7A125.8 125.8 0 0 1 166.7 875V291.6A125.7 125.7 0 0 1 291.7 166.6H875A125.7 125.7 0 0 1 1000 291.6V875A125.7 125.7 0 0 1 875 1000ZM650.9 428.6H650.9L370.5 709A21.9 21.9 0 0 0 365.1 717.8L333.1 813A22.3 22.3 0 0 0 338.6 836 22.6 22.6 0 0 0 354.6 842.5 21.4 21.4 0 0 0 361.7 841.4L456.9 809.7A22.5 22.5 0 0 0 465.6 804.3L746 523.8 650.8 428.6ZM746.2 349A37.4 37.4 0 0 0 719.7 359.9L682.7 397 777.9 492.1 814.9 455.1A37.1 37.1 0 0 0 825.9 428.6 36.8 36.8 0 0 0 814.9 402.2L772.6 359.8A37.4 37.4 0 0 0 746.1 349.1Z", + "width": 1000 + }, + "search": [ + "modify-episode" + ] + }, + { + "uid": "abc3d36a67f52088185b185d6ec822cd", + "css": "obese-bmi-r", + "code": 59454, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M307.3 571.7C305.2 589.1 322 680.9 330.6 716.9 334.8 734 346.1 761.8 342 776.5A153.3 153.3 0 0 0 337.7 839.2C339.7 848.6 346 892 337 907.9A369.5 369.5 0 0 0 323.5 958.9C300.8 999.1 313.6 997.1 313.6 997.1 320.6 1003.2 332.7 997.6 332.7 997.6A15.3 15.3 0 0 0 348.1 996.6 18.9 18.9 0 0 0 365.2 996.1 22.4 22.4 0 0 0 384.2 993C389.9 995 391.3 992.5 391.3 992.5 408.3 991.7 381.8 953.5 381.8 953.5A76.3 76.3 0 0 1 388.1 900C429.5 813.7 431.7 790.8 415.1 758.3 410.4 748.9 409.2 745.2 411.4 741.1 416.3 731.7 412.7 693.9 418.8 678.8 430.5 649.9 442 576.4 448 542.1 456.1 495.9 419.4 434 419.4 434 411.4 408.8 423.1 319 423.1 319 439.6 336.9 439 368.6 439 368.6 436.4 401.9 477.2 452.7 477.2 452.7A118.4 118.4 0 0 1 504.3 495.1C504.3 501.1 502.4 515.8 502.4 515.8L503.2 528.5A129.3 129.3 0 0 1 505.7 548.3C502.6 581.6 510.2 575.3 510.2 575.3 516.5 575.3 523.5 548.5 523.5 548.5 523.5 555.4 521.1 576.1 526.4 583.9 532.7 593.2 537.4 582.3 537.5 580.1 539.2 537.8 542.8 548.9 542.8 548.9 546.3 583.2 550.7 591 558.4 588.3 564.3 586.3 558.9 547.1 558.9 547.1 569 570.4 576.7 574.1 576.7 574.1 593.3 582.3 583 559.6 580.7 555.1A99.2 99.2 0 0 1 568 523C583.4 544.5 595 543.6 595 543.6 610 540.3 581.9 509.9 565.4 495.4A126 126 0 0 1 543 472.2 203.5 203.5 0 0 1 534 430.1C532.4 392.3 519.1 375.9 519.1 375.9 496.3 350.3 492 302.5 492 302.5L491 221.9C483 166.9 425.3 166.5 425.3 166.5 366.9 160.4 358.8 147.2 358.8 147.2 346.4 134.7 353.5 110.8 353.5 110.8A38.7 38.7 0 0 0 367.7 89.4C384.7 80.2 383.9 66.8 376 66.9 369.7 67 371.2 63.4 371.2 63.4 381.9 3.1 305.5 0 305.5 0H293.9S217.5 3.1 228.1 63.4C228.1 63.4 229.6 67.1 223.2 67 215.4 66.8 214.6 80.3 231.6 89.4A38.7 38.7 0 0 0 245.8 110.8S252.9 134.8 240.5 147.2C240.5 147.2 232.4 160.5 174 166.6 174 166.6 116.2 167 108.3 222L107.2 302.6S103 350.3 80.2 375.9C80.2 375.9 66.9 392.4 65.4 430.2A204.8 204.8 0 0 1 56.4 472.3 124.6 124.6 0 0 1 33.9 495.5C17.3 510-10.7 540.2 4.3 543.7 4.3 543.7 16 544.5 31.3 523.1A98.1 98.1 0 0 1 18.7 555.2C16.3 559.6 6 582.3 22.6 574.2 22.6 574.2 30.3 570.4 40.4 547.1 40.4 547.1 35 586.4 41 588.4 48.8 591 53.1 583.3 56.6 548.9 56.6 548.9 60.2 537.8 61.9 580.2 62 582.4 66.5 593.3 72.9 584 78.3 576.2 75.9 555.5 75.9 548.6 75.9 548.6 82.8 575.4 89.2 575.4 89.2 575.4 96.8 581.7 93.7 548.4A119.1 119.1 0 0 1 96.2 528.5L96.9 515.8S95 501.1 95 495.1A118.3 118.3 0 0 1 122.1 452.7S162.9 401.8 160.3 368.6C160.3 368.6 159.7 336.9 176.2 319 176.2 319 187.9 408.8 180 434 180 434 143.2 495.9 151.3 542.1 157.3 576.5 168.8 649.9 180.5 678.8 186.6 693.8 183 731.7 187.9 741.1 190.1 745.2 188.9 749 184.2 758.3 167.7 790.8 169.8 813.7 211.3 900A75.6 75.6 0 0 1 217.6 953.5S191.1 991.7 208.1 992.5C208.1 992.5 209.4 995 215.1 993A22.4 22.4 0 0 0 234.2 996.1 18.8 18.8 0 0 0 251.2 996.6 15.2 15.2 0 0 0 266.7 997.6S278.7 1003.3 285.8 997.1C285.8 997.1 298.5 999.1 275.9 958.9A367.7 367.7 0 0 0 262.5 907.9C253.4 892.1 259.9 848.6 261.8 839.2A155.9 155.9 0 0 0 257.5 776.5C253.3 761.8 264.7 734 268.9 716.9 277.5 680.9 294.3 589.1 292.2 571.7L299.2 573.4A18.3 18.3 0 0 0 307.3 571.7Z", + "width": 599 + }, + "search": [ + "obese-bmi-r" + ] + }, + { + "uid": "6155f39d20a8f84da651fa66bdcabfeb", + "css": "ovrweight-bmi", + "code": 59455, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M240.4 571.7C238.7 589.1 251.9 680.9 258.6 716.9 261.9 734 270.7 761.8 267.5 776.5A194.7 194.7 0 0 0 264.2 839.2C265.7 848.6 270.7 892 263.6 907.9A454.8 454.8 0 0 0 253.1 958.9C235.3 999.1 245.3 997.1 245.3 997.1 250.8 1003.2 260.3 997.6 260.3 997.6A9.9 9.9 0 0 0 272.4 996.6 12 12 0 0 0 285.7 996.1 14.6 14.6 0 0 0 300.6 993C305.1 995 306.1 992.5 306.1 992.5 319.5 991.7 298.7 953.5 298.7 953.5A94.6 94.6 0 0 1 303.6 900C336.1 813.7 337.7 790.8 324.7 758.3 321.1 748.9 320.2 745.2 321.8 741.1 325.7 731.7 322.9 693.9 327.6 678.8 336.8 649.9 345.8 576.4 350.5 542.1 356.8 495.9 328.1 434 328.1 434 321.9 408.8 331.1 319 331.1 319 343.9 336.9 343.4 368.6 343.4 368.6 341.4 401.9 373.3 452.7 373.3 452.7A128.3 128.3 0 0 1 394.5 495.1C394.5 501.1 393 515.8 393 515.8L393.6 528.5A163.7 163.7 0 0 1 395.6 548.4C393.2 581.6 399.1 575.4 399.1 575.4 404.1 575.4 409.5 548.6 409.5 548.6 409.5 555.5 407.6 576.1 411.8 583.9 416.8 593.2 420.4 582.3 420.5 580.1 421.8 537.8 424.6 548.9 424.6 548.9 427.4 583.2 430.8 591 436.8 588.3 441.4 586.3 437.2 547.1 437.2 547.1 445.1 570.4 451.1 574.1 451.1 574.1 464.1 582.3 456.1 559.7 454.3 555.2A118.2 118.2 0 0 1 444.3 523C456.4 544.5 465.4 543.7 465.4 543.7 477.2 540.3 455.1 510 442.3 495.4A118.3 118.3 0 0 1 424.7 472.2 253.7 253.7 0 0 1 417.7 430.2C416.5 392.3 406.1 375.9 406.1 375.9 388.2 350.3 384.9 302.5 384.9 302.5L384.1 221.9C377.8 166.9 332.7 166.5 332.7 166.5 287.1 160.5 280.7 147.3 280.7 147.3 271 134.8 276.6 110.8 276.6 110.8A41.5 41.5 0 0 0 287.7 89.4C301 80.3 300.4 66.9 294.2 67 289.3 67.1 290.4 63.4 290.4 63.4 298.7 3.1 239 0 239 0H229.9S170.1 3.1 178.4 63.4C178.4 63.4 179.6 67.1 174.6 67 168.4 66.8 167.9 80.3 181.1 89.4A41.4 41.4 0 0 0 192.3 110.8S197.8 134.8 188.1 147.2C188.1 147.2 181.8 160.5 136.1 166.6 136.1 166.6 90.9 167 84.7 222L83.8 302.6S80.5 350.3 62.6 375.9C62.6 375.9 52.3 392.4 51.1 430.2A255.3 255.3 0 0 1 44 472.3 117.1 117.1 0 0 1 26.5 495.5C13.5 510-8.4 540.2 3.3 543.7 3.3 543.7 12.5 544.5 24.4 523.1A117 117 0 0 1 14.6 555.2C12.7 559.6 4.6 582.3 17.7 574.2 17.7 574.2 23.7 570.4 31.5 547.1 31.5 547.1 27.3 586.4 32 588.4 38.1 591 41.5 583.3 44.2 548.9 44.2 548.9 47.1 537.8 48.4 580.2 48.4 582.4 52 593.3 57 584 61.2 576.2 59.3 555.5 59.3 548.6 59.3 548.6 64.7 575.4 69.7 575.4 69.7 575.4 75.7 581.7 73.2 548.4A150.7 150.7 0 0 1 75.2 528.6L75.8 515.8S74.3 501.2 74.3 495.1A128.1 128.1 0 0 1 95.5 452.7S127.5 401.9 125.4 368.7C125.4 368.7 125 337 137.8 319 137.8 319 146.9 408.8 140.7 434 140.7 434 112 496 118.3 542.2 123 576.5 132 649.9 141.2 678.9 145.9 693.9 143.1 731.7 146.9 741.2 148.7 745.3 147.8 749.1 144 758.4 131.2 790.8 132.9 813.7 165.3 900A93.8 93.8 0 0 1 170.2 953.5S149.5 991.7 162.7 992.5C162.7 992.5 163.8 995 168.3 993A14.6 14.6 0 0 0 183.2 996.1 12 12 0 0 0 196.5 996.6 9.9 9.9 0 0 0 208.6 997.6S218 1003.3 223.6 997.1C223.6 997.1 233.5 999.1 215.8 958.9A452.6 452.6 0 0 0 205.3 907.9C198.2 892 203.2 848.5 204.7 839.2A198.1 198.1 0 0 0 201.4 776.5C198.1 761.8 207 734 210.2 716.9 217 680.9 230.2 589.1 228.5 571.7L233.9 573.4A11.9 11.9 0 0 0 240.4 571.7Z", + "width": 469 + }, + "search": [ + "ovrweight-bmi" + ] + }, + { + "uid": "2d2f5e7a3046c40afa3ccb117d321149", + "css": "order-prescription", + "code": 59456, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M596.3 192.4A28.8 28.8 0 0 0 588.5 172.7L434.6 9.1A28.9 28.9 0 0 0 413.6 0H404V202H596.3ZM596.3 192.4M567.2 567.5A164.8 164.8 0 0 1 596.3 570.1V259.7H375.1A28.9 28.9 0 0 1 346.3 230.8V0H28.9A28.9 28.9 0 0 0 0 28.9V769.5A28.9 28.9 0 0 0 28.9 798.3H271.5A163.6 163.6 0 0 1 288.4 778.6L451.6 615.5A162.4 162.4 0 0 1 567.2 567.5ZM240.4 336.6H269.3V307.8A28.9 28.9 0 1 1 327 307.8V336.6H355.9A28.9 28.9 0 1 1 355.9 394.3H327V423.2A28.9 28.9 0 0 1 269.3 423.2V394.3H240.4A28.9 28.9 0 0 1 240.4 336.6ZM144.3 509.8H452A28.9 28.9 0 1 1 452 567.5H144.3A28.9 28.9 0 0 1 144.3 509.8ZM336.6 682.9H144.3A28.9 28.9 0 1 1 144.3 625.2H336.6A28.9 28.9 0 1 1 336.6 682.9ZM336.6 682.9M329.1 819.4A105.8 105.8 0 1 0 478.8 969L540 907.8 390.4 758.1ZM329.1 819.4M642 656.2A105.8 105.8 0 0 0 492.4 656.2L431.2 717.4 580.8 867 642 805.8A105.9 105.9 0 0 0 642 656.2ZM642 656.2", + "width": 673 + }, + "search": [ + "order-prescription" + ] + }, + { + "uid": "6e8d360bfcc0238a6164f21160b4203f", + "css": "order-procedures", + "code": 59457, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1040.4 721.4L997.6 778.4 1054.8 821.3H926A142.7 142.7 0 0 0 788.2 714.3H430.9A142.7 142.7 0 0 0 293.1 821.3H214.3A142.8 142.8 0 0 1 214.3 535.6H293.1A142.7 142.7 0 0 0 430.9 642.6H788.1A142.7 142.7 0 0 0 925.9 535.6H1004.8A214.3 214.3 0 1 0 1004.8 107H926A142.7 142.7 0 0 0 788.1 0H430.9A142.7 142.7 0 0 0 293.1 107H261.9L128.6 7.2 85.7 64.3 142.8 107H0V178.6H142.8L85.7 221.4 128.6 278.6 261.9 178.6H293.2A142.7 142.7 0 0 0 431 285.5H788.1A142.7 142.7 0 0 0 926 178.6H1004.9A142.8 142.8 0 1 1 1004.9 464.3H926A142.7 142.7 0 0 0 788.2 357.3H430.9A142.7 142.7 0 0 0 293.1 464.3H214.3A214.3 214.3 0 1 0 214.3 892.8H293.1A142.7 142.7 0 0 0 430.9 999.8H788.1A142.7 142.7 0 0 0 926 892.8H1054.9L997.7 935.7 1040.4 992.8 1218.9 857.2ZM1040.4 721.4", + "width": 1219 + }, + "search": [ + "order-procedures" + ] + }, + { + "uid": "d6fe7b7abad6762bf429e2025e6db5d5", + "css": "ovrweight-bmi-r", + "code": 59458, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M240.4 571.7C238.7 589.1 251.9 680.9 258.6 716.9 261.9 734 270.7 761.8 267.5 776.5A194.7 194.7 0 0 0 264.2 839.2C265.7 848.6 270.7 892 263.6 907.9A454.8 454.8 0 0 0 253.1 958.9C235.3 999.1 245.3 997.1 245.3 997.1 250.8 1003.2 260.3 997.6 260.3 997.6A9.9 9.9 0 0 0 272.4 996.6 12 12 0 0 0 285.7 996.1 14.6 14.6 0 0 0 300.6 993C305.1 995 306.1 992.5 306.1 992.5 319.5 991.7 298.7 953.5 298.7 953.5A94.6 94.6 0 0 1 303.6 900C336.1 813.7 337.7 790.8 324.7 758.3 321.1 748.9 320.2 745.2 321.8 741.1 325.7 731.7 322.9 693.9 327.6 678.8 336.8 649.9 345.8 576.4 350.5 542.1 356.8 495.9 328.1 434 328.1 434 321.9 408.8 331.1 319 331.1 319 343.9 336.9 343.4 368.6 343.4 368.6 341.4 401.9 373.3 452.7 373.3 452.7A128.3 128.3 0 0 1 394.5 495.1C394.5 501.1 393 515.8 393 515.8L393.6 528.5A163.7 163.7 0 0 1 395.6 548.4C393.2 581.6 399.1 575.4 399.1 575.4 404.1 575.4 409.5 548.6 409.5 548.6 409.5 555.5 407.6 576.1 411.8 583.9 416.8 593.2 420.4 582.3 420.5 580.1 421.8 537.8 424.6 548.9 424.6 548.9 427.4 583.2 430.8 591 436.8 588.3 441.4 586.3 437.2 547.1 437.2 547.1 445.1 570.4 451.1 574.1 451.1 574.1 464.1 582.3 456.1 559.7 454.3 555.2A118.2 118.2 0 0 1 444.3 523C456.4 544.5 465.4 543.7 465.4 543.7 477.2 540.3 455.1 510 442.3 495.4A118.3 118.3 0 0 1 424.7 472.2 253.7 253.7 0 0 1 417.7 430.2C416.5 392.3 406.1 375.9 406.1 375.9 388.2 350.3 384.9 302.5 384.9 302.5L384.1 221.9C377.8 166.9 332.7 166.5 332.7 166.5 287.1 160.5 280.7 147.3 280.7 147.3 271 134.8 276.6 110.8 276.6 110.8A41.5 41.5 0 0 0 287.7 89.4C301 80.3 300.4 66.9 294.2 67 289.3 67.1 290.4 63.4 290.4 63.4 298.7 3.1 239 0 239 0H229.9S170.1 3.1 178.4 63.4C178.4 63.4 179.6 67.1 174.6 67 168.4 66.8 167.9 80.3 181.1 89.4A41.4 41.4 0 0 0 192.3 110.8S197.8 134.8 188.1 147.2C188.1 147.2 181.8 160.5 136.1 166.6 136.1 166.6 90.9 167 84.7 222L83.8 302.6S80.5 350.3 62.6 375.9C62.6 375.9 52.3 392.4 51.1 430.2A255.3 255.3 0 0 1 44 472.3 117.1 117.1 0 0 1 26.5 495.5C13.5 510-8.4 540.2 3.3 543.7 3.3 543.7 12.5 544.5 24.4 523.1A117 117 0 0 1 14.6 555.2C12.7 559.6 4.6 582.3 17.7 574.2 17.7 574.2 23.7 570.4 31.5 547.1 31.5 547.1 27.3 586.4 32 588.4 38.1 591 41.5 583.3 44.2 548.9 44.2 548.9 47.1 537.8 48.4 580.2 48.4 582.4 52 593.3 57 584 61.2 576.2 59.3 555.5 59.3 548.6 59.3 548.6 64.7 575.4 69.7 575.4 69.7 575.4 75.7 581.7 73.2 548.4A150.7 150.7 0 0 1 75.2 528.6L75.8 515.8S74.3 501.2 74.3 495.1A128.1 128.1 0 0 1 95.5 452.7S127.5 401.9 125.4 368.7C125.4 368.7 125 337 137.8 319 137.8 319 146.9 408.8 140.7 434 140.7 434 112 496 118.3 542.2 123 576.5 132 649.9 141.2 678.9 145.9 693.9 143.1 731.7 146.9 741.2 148.7 745.3 147.8 749.1 144 758.4 131.2 790.8 132.9 813.7 165.3 900A93.8 93.8 0 0 1 170.2 953.5S149.5 991.7 162.7 992.5C162.7 992.5 163.8 995 168.3 993A14.6 14.6 0 0 0 183.2 996.1 12 12 0 0 0 196.5 996.6 9.9 9.9 0 0 0 208.6 997.6S218 1003.3 223.6 997.1C223.6 997.1 233.5 999.1 215.8 958.9A452.6 452.6 0 0 0 205.3 907.9C198.2 892 203.2 848.5 204.7 839.2A198.1 198.1 0 0 0 201.4 776.5C198.1 761.8 207 734 210.2 716.9 217 680.9 230.2 589.1 228.5 571.7L233.9 573.4A11.9 11.9 0 0 0 240.4 571.7Z", + "width": 469 + }, + "search": [ + "ovrweight-bmi-r" + ] + }, + { + "uid": "d3a35963df4d21d3ec3cf69077ac511e", + "css": "respiration-rate", + "code": 59459, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M989.3 410.2C907.2 230.7 805.1 123.6 716.1 123.6A91.6 91.6 0 0 0 667.3 137C595.3 181.3 592 319.6 591.9 334.9 591.9 339.7 590.8 377.9 590 431.1L560.9 420.4V20.1A20.3 20.3 0 0 0 540.6-0.2H499.9A20.3 20.3 0 0 0 479.6 20.1V420.4L450.5 431.1C449.7 378 448.7 339.9 448.6 335.3 448.6 319.6 445.2 181.3 373.2 137A91.6 91.6 0 0 0 324.4 123.6C235.5 123.6 133.3 230.8 51.2 410.3-57.1 647.8 39 972 43.2 985.6A20.1 20.1 0 0 0 67.1 999.3 1776.9 1776.9 0 0 0 243.4 946.2C369.2 900.2 434.5 855.1 442.6 808.2A2836.5 2836.5 0 0 0 451.6 473.7L506.5 453.4H534.7L589.6 473.7A2835.8 2835.8 0 0 0 598.6 808.2C606.7 855.1 671.8 900.2 797.8 946.2A1778.4 1778.4 0 0 0 974.1 999.5 20.1 20.1 0 0 0 998 985.7C1001.8 972 1097.9 647.8 989.3 410.2ZM393.1 500.5L249.7 574.6V634.8L260.7 668.2 288.1 694.8A20.3 20.3 0 0 1 260.1 723.7L230.5 695.2 197 732.2A20.3 20.3 0 0 1 167.2 705.1L209.4 658.4V595.3L130.2 636.3A20.3 20.3 0 1 1 111.7 600.5L129.3 591.4 97.8 566.3A20.3 20.3 0 0 1 122.9 534.8L168.5 571.2 278.8 514.3 184.4 442.5A20.3 20.3 0 0 1 208.8 410.4L239.3 433.5 241.9 410.2A20.3 20.3 0 0 1 281.9 414.6L276.5 461.8 318.5 493.7 374.5 464.8A20.3 20.3 0 1 1 393 500.5ZM942.9 566.3L911.4 591.4 929 600.5A20.3 20.3 0 1 1 910.5 636.3L831.4 595.3V658.2L873.7 705A20.3 20.3 0 0 1 843.8 732.1L810.3 695.1 780.8 723.6A20.3 20.3 0 0 1 752.7 694.7L780.1 668.1 791.1 634.7V574.5L647.7 500.4A20.3 20.3 0 1 1 666.2 464.6L722.2 493.6 764.2 461.7 759 414.5A20.3 20.3 0 1 1 799 410L801.6 433.4 832.1 410.2A20.3 20.3 0 0 1 856.5 442.3L761.9 514 872.2 570.9 917.9 534.5A20.3 20.3 0 0 1 943 566Z", + "width": 1041 + }, + "search": [ + "respiration-rate" + ] + }, + { + "uid": "230620f957b8bbd4c6ea89c460c5c676", + "css": "patient-sick-leave", + "code": 59460, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M664.4 0H92.6A92.7 92.7 0 0 0 0 92.6V907.4A92.7 92.7 0 0 0 92.6 1000H664.3A92.7 92.7 0 0 0 756.9 907.4V92.6A92.7 92.7 0 0 0 664.4 0ZM118.7 167.8L176.4 68.5A20.8 20.8 0 1 1 212.4 89.3L173 157.2H587.9L556.4 87.4A20.8 20.8 0 1 1 594.4 70.1L639.1 169.5A20.8 20.8 0 0 1 620.1 198.9H136.8A20.8 20.8 0 0 1 118.7 167.8ZM644.6 608.6H492.4A20.8 20.8 0 0 1 472.7 594.7L458.3 554.1 423.7 813.6A20.8 20.8 0 0 1 403.7 831.6H403.1A20.8 20.8 0 0 1 382.7 814.7L312.5 452.1 266.5 606.1A20.8 20.8 0 0 1 246.6 621H112.3A20.8 20.8 0 1 1 112.3 579.5H231.1L296.8 358.9A20.8 20.8 0 0 1 337.2 360.9L399.1 681.8 428.4 463.2A20.8 20.8 0 0 1 446.8 445.3 21.3 21.3 0 0 1 468.7 459.1L507 567.1H644.5A20.8 20.8 0 1 1 644.5 608.6Z", + "width": 757 + }, + "search": [ + "patient-sick-leave" + ] + }, + { + "uid": "9990a08bacced53295a9059a091f3dca", + "css": "progress-notes-1", + "code": 59461, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M400 266.7V33.4A33.4 33.4 0 0 1 466.6 33.4V266.7ZM300 933.3A99.3 99.3 0 0 1 229.3 904.1 1011.6 1011.6 0 0 1 0 550.5V966.6A33.4 33.4 0 0 0 33.4 1000H833.3A33.4 33.4 0 0 0 866.7 966.6V933.3ZM1128 809.7A885.7 885.7 0 0 1 866.6 189.5V166.6A33.4 33.4 0 0 0 833.3 133.3H533.3V300A33.4 33.4 0 0 1 500 333.3H366.6A33.4 33.4 0 0 1 333.3 300V133.3H33.4A33.4 33.4 0 0 0 0 166.7V189.6A943.4 943.4 0 0 0 276.4 856.9 33.4 33.4 0 0 0 300 866.7H1104.5A33.4 33.4 0 0 0 1128.1 809.8ZM433.3 400H700A33.4 33.4 0 0 1 700 466.6H433.3A33.4 33.4 0 0 1 433.3 400ZM700 733.3H366.7A33.4 33.4 0 0 1 366.7 666.6H700A33.4 33.4 0 0 1 700 733.3ZM766.7 600H300A33.4 33.4 0 1 1 300 533.3H766.7A33.4 33.4 0 1 1 766.7 600Z", + "width": 1138 + }, + "search": [ + "progress-notes" + ] + }, + { + "uid": "626836408cae9059f8c1866b3a23b23f", + "css": "temperature", + "code": 59462, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M394.7 0A131.7 131.7 0 0 1 526.3 131.8V686.9A187 187 0 0 1 579 815.8 184.2 184.2 0 1 1 263.2 686.9V131.6A131.4 131.4 0 0 1 394.7 0ZM394.7 315.8A26.5 26.5 0 0 0 368.4 342.1V741.3A79 79 0 1 0 473.7 815.8 79.9 79.9 0 0 0 421.1 741.3V342.1A26.7 26.7 0 0 0 394.7 315.8ZM184.2 631.6A26.3 26.3 0 1 1 184.2 684.3H52.6A26.3 26.3 0 1 1 52.6 631.6ZM710.6 289.6A105.3 105.3 0 0 1 815.7 394.7 25.8 25.8 0 0 1 789.5 422.3 26.5 26.5 0 0 1 763.1 394.9 52.6 52.6 0 0 0 657.9 394.9V553A52.6 52.6 0 1 0 763.2 553 26.3 26.3 0 0 1 815.8 553 105.3 105.3 0 0 1 605.3 553V394.7A105.3 105.3 0 0 1 710.6 289.6ZM184.2 552.6A26.3 26.3 0 1 1 184.2 605.3H157.9A26.3 26.3 0 0 1 157.9 552.6ZM184.2 447.4A26.3 26.3 0 0 1 210.6 473.7 26.7 26.7 0 0 1 184.2 500H105.3A26.3 26.3 0 0 1 78.9 473.7 26 26 0 0 1 105.3 447.4ZM921.1 289.5A52.6 52.6 0 1 1 868.5 342.1 52.6 52.6 0 0 1 921.1 289.6ZM184.2 342.1A26.3 26.3 0 1 1 184.2 394.8H78.9A26.3 26.3 0 0 1 78.9 342.1ZM184.2 236.9A26.3 26.3 0 0 1 184.2 289.5H131.6A26.3 26.3 0 0 1 131.6 236.9ZM184.2 131.6A26.3 26.3 0 1 1 184.2 184.3H26.3A26.3 26.3 0 1 1 26.3 131.6Z", + "width": 974 + }, + "search": [ + "temperature" + ] + }, + { + "uid": "66b89e853c3e2b07f694e387fd756780", + "css": "underweight-bmi", + "code": 59463, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M182.4 571.7C181.1 589.1 191.1 680.9 196.2 716.9 198.7 734 205.4 761.8 203 776.5A255.5 255.5 0 0 0 200.4 839.2C201.6 848.6 205.4 892 200 907.9 197.2 916.3 192 958.9 192 958.9 178.6 999.1 186.1 997.1 186.1 997.1 190.3 1003.2 197.5 997.6 197.5 997.6A6.3 6.3 0 0 0 206.7 996.6C211.4 1001.2 216.8 996.1 216.8 996.1 222.7 999.7 228.1 993 228.1 993 231.5 995 232.3 992.5 232.3 992.5 242.4 991.7 226.7 953.5 226.7 953.5A122.1 122.1 0 0 1 230.4 900C255 813.7 256.3 790.8 246.5 758.3 243.7 748.9 243 745.2 244.3 741.1 247.2 731.7 245.1 693.9 248.7 678.8 255.6 649.9 262.4 576.4 266 542.1 270.7 495.9 249 434 249 434 244.2 408.8 251.2 319 251.2 319A126.2 126.2 0 0 1 260.6 368.6C259 401.9 283.2 452.7 283.2 452.7A149.5 149.5 0 0 1 299.3 495.1C299.3 501.1 298.2 515.8 298.2 515.8L298.6 528.5C298.8 531.8 300.4 543 300.1 548.4 298.3 581.6 302.8 575.4 302.8 575.4 306.5 575.4 310.7 548.6 310.7 548.6A135.2 135.2 0 0 0 312.4 583.9C316.2 593.2 318.9 582.3 319 580.1 320 537.8 322.1 548.9 322.1 548.9 324.2 583.2 326.8 591 331.4 588.3 334.9 586.3 331.7 547.1 331.7 547.1 337.7 570.4 342.2 574.1 342.2 574.1 352.1 582.3 346 559.7 344.6 555.2A148.3 148.3 0 0 1 337.1 523C346.2 544.5 353.1 543.7 353.1 543.7 362 540.3 345.3 510 335.6 495.4A121.6 121.6 0 0 1 322.3 472.2 328.7 328.7 0 0 1 317 430.2 145.7 145.7 0 0 0 308.1 375.9C294.6 350.3 292.1 302.5 292.1 302.5L291.5 221.9C286.7 166.9 252.5 166.5 252.5 166.5 217.8 160.4 213 147.2 213 147.2 205.7 134.7 209.9 110.8 209.9 110.8A47.8 47.8 0 0 0 218.3 89.4C228.4 80.2 227.9 66.8 223.3 66.9 219.5 67.1 220.4 63.4 220.4 63.4 226.6 3.1 181.3 0 181.3 0H174.4S129 3.1 135.4 63.4C135.4 63.4 136.2 67.1 132.5 67 127.8 66.8 127.4 80.3 137.4 89.4A47.7 47.7 0 0 0 145.9 110.8S150.1 134.8 142.8 147.2C142.8 147.2 138 160.5 103.3 166.6 103.3 166.6 69 167 64.3 222L63.7 302.6S61.1 350.3 47.5 375.9A146.2 146.2 0 0 0 38.8 430.2 330.8 330.8 0 0 1 33.4 472.3 120.2 120.2 0 0 1 20.1 495.5C10.2 510-6.3 540.2 2.5 543.7 2.5 543.7 9.4 544.5 18.5 523.1A146.9 146.9 0 0 1 11.1 555.2C9.6 559.6 3.5 582.3 13.4 574.2 13.4 574.2 18 570.4 23.9 547.1 23.9 547.1 20.7 586.4 24.3 588.4 28.9 591 31.5 583.3 33.6 548.9 33.6 548.9 35.7 537.8 36.7 580.2 36.7 582.4 39.4 593.3 43.2 584A133.3 133.3 0 0 0 45 548.6S49.1 575.4 52.9 575.4C52.9 575.4 57.4 581.7 55.6 548.4A197.2 197.2 0 0 1 57.1 528.6L57.5 515.8S56.4 501.2 56.4 495.1A149.3 149.3 0 0 1 72.5 452.7S96.7 401.8 95.2 368.6A126.5 126.5 0 0 1 104.6 319S111.5 408.8 106.8 434C106.8 434 85 495.9 89.8 542.1 93.4 576.5 100.2 649.9 107.2 678.8 110.8 693.8 108.6 731.7 111.5 741.1 112.9 745.2 112.2 749 109.4 758.3 99.6 790.8 100.8 813.7 125.4 900A121 121 0 0 1 129.2 953.5S113.5 991.8 123.5 992.5C123.5 992.5 124.3 995.1 127.7 993.1 127.7 993.1 133.2 999.7 139.1 996.1 139.1 996.1 144.5 1001.3 149.2 996.7A6.2 6.2 0 0 0 158.3 997.6S165.5 1003.3 169.7 997.2C169.7 997.2 177.2 999.2 163.8 959 163.8 959 158.6 916.3 155.8 908 150.4 892.1 154.2 848.6 155.4 839.3A260 260 0 0 0 152.8 776.6C150.4 761.8 157.1 734 159.6 717 164.7 681 174.7 589.1 173.4 571.8L177.5 573.5A7.6 7.6 0 0 0 182.4 571.7Z", + "width": 356 + }, + "search": [ + "underweight-bmi" + ] + }, + { + "uid": "cbeed016e1b47a377550d4184cfaf42b", + "css": "radiology-1", + "code": 59464, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1218.7 937.5H906.2V812.6C1109.3 812.6 1107.4 817.2 1119.6 798.6L1174 718.9A93.7 93.7 0 0 0 1185.6 537.8 187.5 187.5 0 0 0 1000 375H870.2A437.5 437.5 0 0 0 437.4 0C10.4 0-162.9 552.5 187.4 795.9V937.5H93.7A31.4 31.4 0 1 0 93.7 1000H1218.7A31.4 31.4 0 1 0 1218.7 937.5ZM159 476.2A281.3 281.3 0 0 1 679.3 294.1 273.1 273.1 0 0 1 710.7 375C637.5 375 655.7 403.1 648.2 376.9 653.8 393.8 651.3 384.7 635.4 398.7A125 125 0 0 0 423.9 531.3 93.8 93.8 0 0 0 428.5 718.8 281.3 281.3 0 0 1 159.2 476.3ZM1156.2 593.7A31.4 31.4 0 0 1 1177.7 647.1C1164.9 660.6 1218.7 656.2 437.4 656.2A31.4 31.4 0 0 1 415.9 602.8C428.4 589.4 377.4 593.8 1156.2 593.8ZM579.3 750L558.4 718.6H724A99.1 99.1 0 0 0 718.7 750ZM468.7 468.7A62.5 62.5 0 1 1 531.2 531.2 62.5 62.5 0 0 1 468.7 468.7ZM687.4 812.6H718.8V937.5H687.4ZM1076.8 750.1H906.2A93.7 93.7 0 0 0 900.9 718.7H1097.8ZM1120.8 531.3C667.7 531.3 693.7 534.4 677.7 523.8A46.6 46.6 0 0 1 669.9 451.3C687.4 431.6 689 437.6 999.9 437.6A125 125 0 0 1 1120.9 531.3ZM406.2 843.7H468.7V937.5H406.2Z", + "width": 1250 + }, + "search": [ + "radiology" + ] + }, + { + "uid": "0ad7e861726e4de71ae412435ca73f8a", + "css": "refer-patient", + "code": 59471, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M264.4 666.7L351.6 775.7 267.1 860.3 228.5 667.7C235.7 667.1 242.9 666.7 250.1 666.7ZM442.2 666.7L388.9 733.3 335.6 666.6ZM513.4 666.7H527.7C534.9 666.7 542.1 667.1 549.3 667.7L510.8 860.3 426.2 775.7ZM638.9 444.4H637.2A248 248 0 0 0 638.9 416.7V333.3A55.6 55.6 0 0 1 638.9 444.4ZM138.9 166.7A166.8 166.8 0 0 1 305.5 0H472.2A166.8 166.8 0 0 1 638.9 166.7V277.8H527.8A55.6 55.6 0 0 1 472.2 222.2V111.1H416.7V138.9A139 139 0 0 1 277.8 277.8H138.9ZM138.9 444.4A55.6 55.6 0 1 1 138.9 333.3V416.7A248 248 0 0 0 140.5 444.4ZM194.5 416.7V333.3H277.8A194.1 194.1 0 0 0 425.3 265.1 111.4 111.4 0 0 0 527.8 333.3H583.3V416.7A194.5 194.5 0 0 1 194.5 416.7ZM777.8 1000H0V916.6A250.4 250.4 0 0 1 174 678.5L222.9 922.1A27.8 27.8 0 0 0 242 943.2 28.4 28.4 0 0 0 250.1 944.4 27.8 27.8 0 0 0 269.7 936.3L389 817 508.2 936.3A27.8 27.8 0 0 0 554.9 922.1L603.9 678.5A250.5 250.5 0 0 1 777.8 916.6ZM943.7 123A22 22 0 0 1 965.7 101H1000.6L899.6 0 798.6 101H833.5A22 22 0 0 1 855.6 123 264.2 264.2 0 0 1 738 342.7 220.4 220.4 0 0 0 943.7 123Z", + "width": 1001 + }, + "search": [ + "refer-patient" + ] + }, + { + "uid": "ca99a2d770f0d7e6ba7a90eb792ebd4d", + "css": "underweight-bmi-r", + "code": 59472, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M182.4 571.7C181.1 589.1 191.1 680.9 196.2 716.9 198.7 734 205.4 761.8 203 776.5A255.5 255.5 0 0 0 200.4 839.2C201.6 848.6 205.4 892 200 907.9 197.2 916.3 192 958.9 192 958.9 178.6 999.1 186.1 997.1 186.1 997.1 190.3 1003.2 197.5 997.6 197.5 997.6A6.3 6.3 0 0 0 206.7 996.6C211.4 1001.2 216.8 996.1 216.8 996.1 222.7 999.7 228.1 993 228.1 993 231.5 995 232.3 992.5 232.3 992.5 242.4 991.7 226.7 953.5 226.7 953.5A122.1 122.1 0 0 1 230.4 900C255 813.7 256.3 790.8 246.5 758.3 243.7 748.9 243 745.2 244.3 741.1 247.2 731.7 245.1 693.9 248.7 678.8 255.6 649.9 262.4 576.4 266 542.1 270.7 495.9 249 434 249 434 244.2 408.8 251.2 319 251.2 319A126.2 126.2 0 0 1 260.6 368.6C259 401.9 283.2 452.7 283.2 452.7A149.5 149.5 0 0 1 299.3 495.1C299.3 501.1 298.2 515.8 298.2 515.8L298.6 528.5C298.8 531.8 300.4 543 300.1 548.4 298.3 581.6 302.8 575.4 302.8 575.4 306.5 575.4 310.7 548.6 310.7 548.6A135.2 135.2 0 0 0 312.4 583.9C316.2 593.2 318.9 582.3 319 580.1 320 537.8 322.1 548.9 322.1 548.9 324.2 583.2 326.8 591 331.4 588.3 334.9 586.3 331.7 547.1 331.7 547.1 337.7 570.4 342.2 574.1 342.2 574.1 352.1 582.3 346 559.7 344.6 555.2A148.3 148.3 0 0 1 337.1 523C346.2 544.5 353.1 543.7 353.1 543.7 362 540.3 345.3 510 335.6 495.4A121.6 121.6 0 0 1 322.3 472.2 328.7 328.7 0 0 1 317 430.2 145.7 145.7 0 0 0 308.1 375.9C294.6 350.3 292.1 302.5 292.1 302.5L291.5 221.9C286.7 166.9 252.5 166.5 252.5 166.5 217.8 160.4 213 147.2 213 147.2 205.7 134.7 209.9 110.8 209.9 110.8A47.8 47.8 0 0 0 218.3 89.4C228.4 80.2 227.9 66.8 223.3 66.9 219.5 67.1 220.4 63.4 220.4 63.4 226.6 3.1 181.3 0 181.3 0H174.4S129 3.1 135.4 63.4C135.4 63.4 136.2 67.1 132.5 67 127.8 66.8 127.4 80.3 137.4 89.4A47.7 47.7 0 0 0 145.9 110.8S150.1 134.8 142.8 147.2C142.8 147.2 138 160.5 103.3 166.6 103.3 166.6 69 167 64.3 222L63.7 302.6S61.1 350.3 47.5 375.9A146.2 146.2 0 0 0 38.8 430.2 330.8 330.8 0 0 1 33.4 472.3 120.2 120.2 0 0 1 20.1 495.5C10.2 510-6.3 540.2 2.5 543.7 2.5 543.7 9.4 544.5 18.5 523.1A146.9 146.9 0 0 1 11.1 555.2C9.6 559.6 3.5 582.3 13.4 574.2 13.4 574.2 18 570.4 23.9 547.1 23.9 547.1 20.7 586.4 24.3 588.4 28.9 591 31.5 583.3 33.6 548.9 33.6 548.9 35.7 537.8 36.7 580.2 36.7 582.4 39.4 593.3 43.2 584A133.3 133.3 0 0 0 45 548.6S49.1 575.4 52.9 575.4C52.9 575.4 57.4 581.7 55.6 548.4A197.2 197.2 0 0 1 57.1 528.6L57.5 515.8S56.4 501.2 56.4 495.1A149.3 149.3 0 0 1 72.5 452.7S96.7 401.8 95.2 368.6A126.5 126.5 0 0 1 104.6 319S111.5 408.8 106.8 434C106.8 434 85 495.9 89.8 542.1 93.4 576.5 100.2 649.9 107.2 678.8 110.8 693.8 108.6 731.7 111.5 741.1 112.9 745.2 112.2 749 109.4 758.3 99.6 790.8 100.8 813.7 125.4 900A121 121 0 0 1 129.2 953.5S113.5 991.8 123.5 992.5C123.5 992.5 124.3 995.1 127.7 993.1 127.7 993.1 133.2 999.7 139.1 996.1 139.1 996.1 144.5 1001.3 149.2 996.7A6.2 6.2 0 0 0 158.3 997.6S165.5 1003.3 169.7 997.2C169.7 997.2 177.2 999.2 163.8 959 163.8 959 158.6 916.3 155.8 908 150.4 892.1 154.2 848.6 155.4 839.3A260 260 0 0 0 152.8 776.6C150.4 761.8 157.1 734 159.6 717 164.7 681 174.7 589.1 173.4 571.8L177.5 573.5A7.6 7.6 0 0 0 182.4 571.7Z", + "width": 356 + }, + "search": [ + "underweight-bmi-r" + ] + }, + { + "uid": "0fd731d3861d150403acb49569e7c904", + "css": "weight", + "code": 59473, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M909.1 0H90.9A91 91 0 0 0 0 90.9V909.1A91 91 0 0 0 90.9 1000H909.1A91 91 0 0 0 1000 909.1V90.9A91 91 0 0 0 909.1 0ZM789.3 288.3L660.8 416.9A22.7 22.7 0 0 1 628.6 416.9 184.8 184.8 0 0 0 455.8 371.1L407 263.5A22.7 22.7 0 1 0 365.7 282.3L413.4 387.2A169.3 169.3 0 0 0 371.6 416.9 22.7 22.7 0 0 1 339.5 416.9L210.7 288.3A22.7 22.7 0 0 1 210.7 256.2 409 409 0 0 1 789.3 256.2 22.7 22.7 0 0 1 789.3 288.3Z", + "width": 1000 + }, + "search": [ + "weight" + ] + }, + { + "uid": "ac386cc9c3278233c6dacad80c722da5", + "css": "blood-pressure", + "code": 59474, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M672.7 709.1A145.5 145.5 0 1 0 818.2 854.6 145.5 145.5 0 0 0 672.7 709.1ZM724.2 828.9L685.6 867.5A18.2 18.2 0 1 1 659.8 841.7L698.4 803.1A18.2 18.2 0 0 1 724.2 828.9ZM872.7 236.4C770.7 236.4 690.9 292.4 690.9 363.7S770.7 491 872.7 491 1054.5 435 1054.5 363.7 974.7 236.4 872.7 236.4ZM972.7 381.8A18.2 18.2 0 0 1 954.6 363.7C954.6 350 914.9 327.3 872.7 327.3A18.2 18.2 0 1 1 872.7 291C921.1 291 990.9 316.8 990.9 363.7A18.2 18.2 0 0 1 972.7 381.8ZM655.8 345.5H563.7V18.2A18.2 18.2 0 0 0 545.4 0H218.2A18.2 18.2 0 0 0 200 18.2V109.1H18.2A18.2 18.2 0 0 0 0 127.3V781.8A18.2 18.2 0 0 0 18.2 800H200V854.5A18.2 18.2 0 0 0 218.2 872.7H491.8C491.8 866.7 490.9 860.7 490.9 854.5A120.6 120.6 0 0 1 491.8 836.4H236.4V800H418.2A18.2 18.2 0 0 0 436.4 781.8V127.3A18.2 18.2 0 0 0 418.2 109.1H236.4V36.4H527.3V363.6A18.2 18.2 0 0 0 545.5 381.8H655.9A130.5 130.5 0 0 1 655.8 345.5ZM272.7 272.7H345.5A18.2 18.2 0 1 1 345.5 309.1H272.7A18.2 18.2 0 1 1 272.7 272.7ZM272.7 600H345.5A18.2 18.2 0 1 1 345.5 636.4H272.7A18.2 18.2 0 1 1 272.7 600Z", + "width": 1055 + }, + "search": [ + "blood-pressure" + ] + }, + { + "uid": "3c9cc9a4258d3d419d7ad9e579cd42c3", + "css": "vital-signs", + "code": 59475, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 532.1V608.1H205.7A689.9 689.9 0 0 1 145.8 532.1ZM1151 532.1A690.1 690.1 0 0 1 1091 608.1H1296.7V532.1ZM420.4 222L545.9 598.4 590 532.1H699L802.2 284.8 913.5 532.3H1151A366.1 366.1 0 0 0 1218.2 324.2 318.2 318.2 0 0 0 971.8 5C843.9-20.1 726.9 46.1 648.4 183.9 570 46.6 453.5-19.1 325.8 5.6A322.2 322.2 0 0 0 78.5 324.2 366.1 366.1 0 0 0 145.8 532H317.1ZM804.8 475.7L749.7 608.1H630.7L522.9 769.6 420.5 462.3 371.9 608.1H205.7A2720.4 2720.4 0 0 0 486.1 863C529.5 899.1 648.4 1000 648.4 1000S767.4 899.1 810.6 863A2720.7 2720.7 0 0 0 1091 608.1H864.5Z", + "width": 1297 + }, + "search": [ + "vital-signs" + ] + }, + { + "uid": "a0eacf70f79e61160a5bdf698b3358bc", + "css": "ucaf", + "code": 59476, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M529.3 60V0H470.7V60C201.6 73.3 0 271.4 0 529.3V576.7L42.3 555.7A289.7 289.7 0 0 1 148.4 529.5 171.9 171.9 0 0 1 245.1 579.5L265.8 600 286.4 579.5A171.9 171.9 0 0 1 383.1 529.5 159.1 159.1 0 0 1 471 571.7V912.1A87.9 87.9 0 0 0 646.8 912.1V853.5H587.9V912.1A29.3 29.3 0 0 1 529.3 912.1V571.5A159.1 159.1 0 0 1 617.2 529.3 171.9 171.9 0 0 1 713.9 579.3L734.6 599.8 755.2 579.3A178.1 178.1 0 0 1 853.7 529.3 274.1 274.1 0 0 1 957.8 555.5L1000 576.7V529.3C1000 271.4 798.4 73.3 529.3 60Z", + "width": 1000 + }, + "search": [ + "ucaf" + ] + }, + { + "uid": "daaef425e99170daae1e6c67b843e599", + "css": "filter", + "code": 59477, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M376.3 472.5A61.7 61.7 0 0 1 392.5 514.3V969.1A30.9 30.9 0 0 0 445.1 991.1L572 845.7C589 825.4 598.4 815.2 598.4 795.1V514.4A62.2 62.2 0 0 1 614.6 472.6L978.6 77.6A46.4 46.4 0 0 0 944.5 0H46.5A46.3 46.3 0 0 0 12.4 77.6Z", + "width": 991 + }, + "search": [ + "filter" + ] + }, + { + "uid": "3c0db424e9aa58cd0ee5c3424b718630", + "css": "male-1", + "code": 59478, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M975.4 0H569.5A24.6 24.6 0 0 0 544.9 24.6V133.4A24.6 24.6 0 0 0 569.5 158H725.6L545 338.6A357.4 357.4 0 1 0 661.6 455.3L842.1 274.7V430.5A24.6 24.6 0 0 0 866.7 455.1H975.3A24.6 24.6 0 0 0 999.8 430.5V24.6A24.6 24.6 0 0 0 975.3 0ZM357.6 878.2A235.5 235.5 0 1 1 593.1 642.7 235.5 235.5 0 0 1 357.6 878.2Z", + "width": 1000 + }, + "search": [ + "male" + ] + }, + { + "uid": "d23d330639c6d971f3c52dafedcfc6c8", + "css": "female", + "code": 59479, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M864.9 747.5C966.6 645.7 999.8 626 975.5 601.7L892.8 518.9A24.6 24.6 0 0 0 857.8 518.9L746.8 629.8 666.7 549.7A359.2 359.2 0 1 0 549.9 667.8L629.7 747.5C528 849.3 494.8 869 519.1 893.3L601.4 975.9A24.6 24.6 0 0 0 636.4 975.9L746.8 865.3C866.3 984.8 884.6 1016.8 909 992.5 988.6 912.9 999.3 908.8 999.3 892.2S994.5 877.2 864.9 747.5ZM360.5 598.5A237.9 237.9 0 1 1 598.5 360.5 237.9 237.9 0 0 1 360.5 598.5Z", + "width": 999 + }, + "search": [ + "female" + ] + }, + { + "uid": "9909d0074e2de36b9ceca4513d5a81a2", + "css": "external-link", + "code": 59480, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M945 55A180.6 180.6 0 0 0 812.5 0H187.5A180.6 180.6 0 0 0 55 55 180.6 180.6 0 0 0-0.2 187.5V812.5A180.7 180.7 0 0 0 54.9 945 180.6 180.6 0 0 0 187.4 1000.1H812.5A187.9 187.9 0 0 0 1000 812.5V187.5A180.7 180.7 0 0 0 945 55ZM833.4 520.8A39 39 0 0 1 808 559.2 45.3 45.3 0 0 1 791.7 562.5 38.7 38.7 0 0 1 762.6 550.3L668.6 456.4 321 804A40.9 40.9 0 0 1 262.4 804L196 737.6A40.9 40.9 0 0 1 196 679.1L543.6 331.4 449.9 237.6A37.6 37.6 0 0 1 440.8 192.1 39 39 0 0 1 479.3 166.7H791.8A42.2 42.2 0 0 1 833.5 208.3V520.8Z", + "width": 1000 + }, + "search": [ + "external-link" + ] + }, + { + "uid": "f0593bb8f5b8b0b186421ee68844bdf4", + "css": "verify-face-2", + "code": 59481, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M724.2 694.2L587.6 666.9A31.2 31.2 0 0 1 562.5 636.3V604.9A369.6 369.6 0 0 0 588.7 558.3 267.2 267.2 0 0 1 609.9 520.3 201.7 201.7 0 0 0 673.3 420.4 93.1 93.1 0 0 0 664.2 347 551.6 551.6 0 0 0 653.6 220.2 137.4 137.4 0 0 0 621.1 119.6 96.5 96.5 0 0 0 563.1 95.2 96.8 96.8 0 0 1 541.9 90.3 218.8 218.8 0 0 0 436.3 62.5 245.8 245.8 0 0 0 218.7 212 367.2 367.2 0 0 0 210.1 325.2L209.3 347.1A99.4 99.4 0 0 0 201.4 420.4 201.2 201.2 0 0 0 264.7 520.4 275.4 275.4 0 0 1 286.2 558.3 379.2 379.2 0 0 0 312.6 604.9V636.2A31.4 31.4 0 0 1 287.5 666.9L150.8 694.2A188.1 188.1 0 0 0 0 878.1V937.5A62.6 62.6 0 0 0 62.5 1000.2H812.5A62.5 62.5 0 0 0 875 937.7V878.1A188.2 188.2 0 0 0 724.2 694.2ZM156.3 0H31.3A31.3 31.3 0 0 0 0 31.3V218.8A31.3 31.3 0 0 0 62.5 218.8V62.5H156.3A31.3 31.3 0 0 0 156.3 0ZM156.3 562.5H62.5V406.2A31.3 31.3 0 0 0 0 406.2V593.7A31.3 31.3 0 0 0 31.3 625H156.3A31.3 31.3 0 1 0 156.3 562.5ZM843.8 0H718.8A31.3 31.3 0 0 0 718.8 62.5H812.5V218.8A31.3 31.3 0 0 0 875 218.8V31.3A31.3 31.3 0 0 0 843.8 0ZM843.8 375A31.3 31.3 0 0 0 812.5 406.2V562.5H718.7A31.3 31.3 0 0 0 718.7 625H843.7A31.3 31.3 0 0 0 875 593.7V406.2A31.3 31.3 0 0 0 843.8 375Z", + "width": 875 + }, + "search": [ + "verify-face" + ] + }, + { + "uid": "e69ad471bed67e4f9115dc1e2980e44f", + "css": "verify-sms-2", + "code": 59482, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H100A100.3 100.3 0 0 0 0 100V1000L200 800H900A100.3 100.3 0 0 0 1000 700V100A100.3 100.3 0 0 0 900 0ZM350 450H250V350H350ZM550 450H450V350H550ZM750 450H650V350H750Z", + "width": 1000 + }, + "search": [ + "verify-sms" + ] + }, + { + "uid": "0736a51e3060fb655273b1c12012240d", + "css": "home", + "code": 59483, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1066.3 519.6A79.1 79.1 0 0 1 991.7 571.5H964.4V964.3A35.7 35.7 0 0 1 928.7 1000H714.4V750A178.6 178.6 0 0 0 357.2 750V1000H142.9A35.7 35.7 0 0 1 107.2 964.3V571.5H79.9A80 80 0 0 1 27.4 431.5L444.5 36.3A132.8 132.8 0 0 1 627.1 36.3L1045.2 432.3A78.7 78.7 0 0 1 1066.3 519.6Z", + "width": 1072 + }, + "search": [ + "home" + ] + }, + { + "uid": "3f56029b468ab7c3e63c354d71d9928a", + "css": "verify-finger-2", + "code": 59484, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M891.9 0H108.1A108.2 108.2 0 0 0 0 108.1V891.9A108.2 108.2 0 0 0 108.1 1000H891.9A108.2 108.2 0 0 0 1000 891.9V108.1A108.2 108.2 0 0 0 891.9 0ZM185.9 192.6C393.8 41.7 612.9 43.3 817.7 195.2A29.3 29.3 0 0 1 800.1 248.1C766.9 248.1 540.5 7.4 220.2 240A29.3 29.3 0 0 1 185.7 192.6ZM459 946A29.3 29.3 0 0 1 418.2 938.6C377.1 878.9 283.2 812.1 283.2 687.5A225.3 225.3 0 0 1 500 454.9 225.3 225.3 0 0 1 716.8 687.5V718.9A29.3 29.3 0 0 1 658.2 718.9V687.6A166.8 166.8 0 0 0 500 513.8 166.8 166.8 0 0 0 341.8 687.5C341.8 828.8 521.5 902.7 459 946ZM823.1 794.4A153.5 153.5 0 0 1 533.2 718.9C533.2 592.6 446.8 635.1 465.9 711.8A29.3 29.3 0 0 1 409.1 725.9C369.2 566.3 591.8 501.6 591.8 718.9A94.5 94.5 0 0 0 665.2 816.5C800.8 848.5 841 624.8 705.8 480.7 518.8 281.3 216.8 435 216.8 671.9A237 237 0 0 0 258.2 826.8 29.3 29.3 0 0 1 210.6 860.8 298.5 298.5 0 0 1 158.2 671.9 347.5 347.5 0 0 1 500.1 330.1C752.9 330.1 913.6 613.5 823.1 794.3ZM842.7 431.8A29.3 29.3 0 0 1 802.7 420.9C744.4 318.7 603.2 263.8 500 263.8A419.4 419.4 0 0 0 196.2 422.6 29.3 29.3 0 0 1 147.5 390.1 474.9 474.9 0 0 1 499.9 205.2C716.9 205.2 910.7 392.8 842.5 431.8Z", + "width": 1000 + }, + "search": [ + "verify-finger" + ] + }, + { + "uid": "0227a760fc30f34a1e45269b42063066", + "css": "dr-reply-active", + "code": 59485, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1023.2 547.7H1029.4A86.7 86.7 0 0 1 1162.4 438.2L1200.4 476.2V101.1A101.2 101.2 0 0 0 1099.2 0H101.2A101.2 101.2 0 0 0 0 101.1V799A101.2 101.2 0 0 0 101.2 900.2H798.6A247.7 247.7 0 0 1 1023.1 547.8ZM251.2 136.3H949.2L600.1 392.2ZM1266.6 603.7L1131.7 468.8A43.4 43.4 0 1 0 1070.5 529.9L1131.5 590.9H1023.1A204.5 204.5 0 0 0 1023.1 999.9 43.4 43.4 0 1 0 1023.1 913.2 117.9 117.9 0 0 1 1023.1 677.1H1131.5L1070.5 738A43.4 43.4 0 0 0 1131.7 799.2L1266.6 664.3A43.4 43.4 0 0 0 1266.6 603.1Z", + "width": 1279 + }, + "search": [ + "dr-reply-active" + ] + }, + { + "uid": "127b8293712c90eb2fb4157aa01060d7", + "css": "dr-reply", + "code": 59486, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1023.2 547.7H1029.4A86.7 86.7 0 0 1 1162.4 438.2L1200.4 476.2V101.1A101.2 101.2 0 0 0 1099.2 0H101.2A101.2 101.2 0 0 0 0 101.1V799A101.2 101.2 0 0 0 101.2 900.2H798.6A247.7 247.7 0 0 1 1023.1 547.8ZM251.2 136.3H949.2L600.1 392.2ZM1266.6 603.7L1131.7 468.8A43.4 43.4 0 1 0 1070.5 529.9L1131.5 590.9H1023.1A204.5 204.5 0 0 0 1023.1 999.9 43.4 43.4 0 1 0 1023.1 913.2 117.9 117.9 0 0 1 1023.1 677.1H1131.5L1070.5 738A43.4 43.4 0 0 0 1131.7 799.2L1266.6 664.3A43.4 43.4 0 0 0 1266.6 603.1Z", + "width": 1279 + }, + "search": [ + "dr-reply" + ] + }, + { + "uid": "5a9d08cf650294b80c159706c83a5dd9", + "css": "schedule-active", + "code": 59487, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H99.9A100.3 100.3 0 0 0 0 99.9V900A100.3 100.3 0 0 0 99.9 999.8H900A100.3 100.3 0 0 0 999.8 900V99.9A100.3 100.3 0 0 0 900 0ZM269.9 880H116.7V743.8H269.9V880ZM269.9 698.1H116.7V561.9H269.9V698.1ZM258.3 151.6A42.5 42.5 0 1 1 300.8 109.1 42.4 42.4 0 0 1 258.3 151.6ZM474.3 880H321.1V743.8H474.3ZM474.3 698.1H321.1V561.9H474.3ZM474.3 516.3H321.1V380H474.3ZM457.6 109.1A42.4 42.4 0 1 1 500 151.5 42.4 42.4 0 0 1 457.6 109.1ZM678.9 698.1H525.6V561.9H679.1V698.1ZM678.9 516.3H525.6V380H679.1V516.3ZM699 109.1A42.4 42.4 0 1 1 741.5 151.5 42.4 42.4 0 0 1 699 109.1ZM883.2 698.1H730.1V561.9H883.3ZM883.2 516.3H730.1V380H883.3Z", + "width": 1000 + }, + "search": [ + "schedule-active" + ] + }, + { + "uid": "819759b0d0d7626d8231f54569a21da4", + "css": "schedule", + "code": 59488, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H99.9A100.3 100.3 0 0 0 0 99.9V900A100.3 100.3 0 0 0 99.9 999.8H900A100.3 100.3 0 0 0 999.8 900V99.9A100.3 100.3 0 0 0 900 0ZM269.9 880H116.7V743.8H269.9V880ZM269.9 698.1H116.7V561.9H269.9V698.1ZM258.3 151.6A42.5 42.5 0 1 1 300.8 109.1 42.4 42.4 0 0 1 258.3 151.6ZM474.3 880H321.1V743.8H474.3ZM474.3 698.1H321.1V561.9H474.3ZM474.3 516.3H321.1V380H474.3ZM457.6 109.1A42.4 42.4 0 1 1 500 151.5 42.4 42.4 0 0 1 457.6 109.1ZM678.9 698.1H525.6V561.9H679.1V698.1ZM678.9 516.3H525.6V380H679.1V516.3ZM699 109.1A42.4 42.4 0 1 1 741.5 151.5 42.4 42.4 0 0 1 699 109.1ZM883.2 698.1H730.1V561.9H883.3ZM883.2 516.3H730.1V380H883.3Z", + "width": 1000 + }, + "search": [ + "schedule" + ] + }, + { + "uid": "0de3ebd2d27563050dd71e75e23835d6", + "css": "qr-reader-active", + "code": 59489, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M50 400A50 50 0 0 0 100 350V150A50 50 0 0 1 150 100H350A50 50 0 1 0 350 0H150A150 150 0 0 0 0 150V350A50 50 0 0 0 50 400ZM850 0H650A50 50 0 0 0 650 100H850A50 50 0 0 1 900 150V350A50 50 0 1 0 1000 350V150A150 150 0 0 0 850 0ZM950 600A50 50 0 0 0 900 650V850A50 50 0 0 1 850 900H650A50 50 0 0 0 650 1000H850A150 150 0 0 0 1000 850V650A50 50 0 0 0 950 600ZM350 900H150A50 50 0 0 1 100 850V650A50 50 0 0 0 0 650V850A150 150 0 0 0 150 1000H350A50 50 0 1 0 350 900Z", + "width": 1000 + }, + "search": [ + "qr-reader-active" + ] + }, + { + "uid": "0ea0e7f32832e2d0fbafc766c3c26d93", + "css": "qr-reader", + "code": 59490, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M50 400A50 50 0 0 0 100 350V150A50 50 0 0 1 150 100H350A50 50 0 1 0 350 0H150A150 150 0 0 0 0 150V350A50 50 0 0 0 50 400ZM850 0H650A50 50 0 0 0 650 100H850A50 50 0 0 1 900 150V350A50 50 0 1 0 1000 350V150A150 150 0 0 0 850 0ZM950 600A50 50 0 0 0 900 650V850A50 50 0 0 1 850 900H650A50 50 0 0 0 650 1000H850A150 150 0 0 0 1000 850V650A50 50 0 0 0 950 600ZM350 900H150A50 50 0 0 1 100 850V650A50 50 0 0 0 0 650V850A150 150 0 0 0 150 1000H350A50 50 0 1 0 350 900Z", + "width": 1000 + }, + "search": [ + "qr-reader" + ] + }, + { + "uid": "8f9c01cc9212f68e9b591223b5e08f55", + "css": "home-active", + "code": 59491, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1066.3 519.6A79.1 79.1 0 0 1 991.7 571.5H964.4V964.3A35.7 35.7 0 0 1 928.7 1000H714.4V750A178.6 178.6 0 0 0 357.2 750V1000H142.9A35.7 35.7 0 0 1 107.2 964.3V571.5H79.9A80 80 0 0 1 27.4 431.5L444.5 36.3A132.8 132.8 0 0 1 627.1 36.3L1045.2 432.3A78.7 78.7 0 0 1 1066.3 519.6Z", + "width": 1072 + }, + "search": [ + "home-active" + ] + }, + { + "uid": "70489544a83221e1141db519826351b5", + "css": "arrow-forward", + "code": 59492, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1357 455.8L919.2 18.3A62.5 62.5 0 1 0 830.8 106.7L1161.6 437.6H62.5A62.5 62.5 0 1 0 62.5 562.6H1161.7L830.9 893.4A62.5 62.5 0 1 0 919.3 981.8L1357 544.2A62.5 62.5 0 0 0 1357 455.8Z", + "width": 1375 + }, + "search": [ + "arrow-forward" + ] + }, + { + "uid": "d8e875c19306114380e834be3d91f71e", + "css": "heart-rate", + "code": 59493, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 532.1V608.1H205.7A689.9 689.9 0 0 1 145.8 532.1ZM1151 532.1A690.1 690.1 0 0 1 1091 608.1H1296.7V532.1ZM420.4 222L545.9 598.4 590 532.1H699L802.2 284.8 913.5 532.3H1151A366.1 366.1 0 0 0 1218.2 324.2 318.2 318.2 0 0 0 971.8 5C843.9-20.1 726.9 46.1 648.4 183.9 570 46.6 453.5-19.1 325.8 5.6A322.2 322.2 0 0 0 78.5 324.2 366.1 366.1 0 0 0 145.8 532H317.1ZM804.8 475.7L749.7 608.1H630.7L522.9 769.6 420.5 462.3 371.9 608.1H205.7A2720.4 2720.4 0 0 0 486.1 863C529.5 899.1 648.4 1000 648.4 1000S767.4 899.1 810.6 863A2720.7 2720.7 0 0 0 1091 608.1H864.5Z", + "width": 1297 + }, + "search": [ + "heart-rate" + ] + }, + { + "uid": "e2f6f0a56d4570c777c8bd5c50e38ea7", + "css": "menu_icon_active-1", + "code": 59494, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M406.7 0H83.2A83.3 83.3 0 0 0 0 83.2V406.7A83.3 83.3 0 0 0 83.2 489.9H406.7A83.3 83.3 0 0 0 489.9 406.7V83.2A83.3 83.3 0 0 0 406.7 0ZM406.7 449.1H83.2A42.4 42.4 0 0 1 40.8 406.7V83.2A42.4 42.4 0 0 1 83.2 40.8H406.7A42.4 42.4 0 0 1 449 83.2V406.7H449A42.4 42.4 0 0 1 406.7 449.1ZM916.8 0H593.3A83.3 83.3 0 0 0 510.1 83.2V406.7A83.3 83.3 0 0 0 593.3 489.9H916.8A83.3 83.3 0 0 0 1000 406.7V83.2A83.3 83.3 0 0 0 916.8 0ZM959.1 406.7A42.4 42.4 0 0 1 916.8 449.1H593.3A42.4 42.4 0 0 1 550.9 406.7V83.2A42.4 42.4 0 0 1 593.3 40.8H916.8A42.4 42.4 0 0 1 959.1 83.2ZM406.7 510.1H83.2A83.3 83.3 0 0 0 0 593.3V916.8A83.3 83.3 0 0 0 83.2 1000H406.7A83.3 83.3 0 0 0 489.9 916.8V593.3A83.3 83.3 0 0 0 406.7 510.1ZM406.7 959.2H83.2A42.4 42.4 0 0 1 40.8 916.8V593.3A42.4 42.4 0 0 1 83.2 550.9H406.7A42.4 42.4 0 0 1 449 593.3V916.8H449A42.4 42.4 0 0 1 406.7 959.1ZM916.8 510.1H593.3A83.3 83.3 0 0 0 510.1 593.3V916.8A83.3 83.3 0 0 0 593.3 1000H916.8A83.3 83.3 0 0 0 1000 916.8V593.3A83.3 83.3 0 0 0 916.8 510.1ZM959.1 916.8A42.4 42.4 0 0 1 916.8 959.2H593.3A42.4 42.4 0 0 1 550.9 916.8V593.3A42.4 42.4 0 0 1 593.3 550.9H916.8A42.4 42.4 0 0 1 959.1 593.3Z", + "width": 1000 + }, + "search": [ + "menu_icon_active" + ] + }, + { + "uid": "f7eb1344b3a40f36bb4d32cdd0d76496", + "css": "message_icon-1", + "code": 59495, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1182.9 44.3A100 100 0 0 0 1099.9 0.1H100A100 100 0 0 0 0 100V900A100 100 0 0 0 100 1000H1110.4A100 100 0 0 0 1200 900V100A100 100 0 0 0 1182.9 44.3ZM99.9 40H1100A60 60 0 0 1 1138.8 54.2L1061.2 128.2 734 440 612.8 555.7A20 20 0 0 1 589 555.7L466 440 60 54.3A60 60 0 0 1 100 40ZM39.9 90.4L423.2 454 40 820V100A59.7 59.7 0 0 1 40 90.4ZM1160 900A60 60 0 0 1 1107.6 960H100A60 60 0 0 1 40 900V874.6L452.2 481.6 562.4 586.4A60 60 0 0 0 571 592.2 58.4 58.4 0 0 0 600 600 63 63 0 0 0 640 586L748.8 482.4 1160 874.2ZM1160 100V819L776.8 454.7 1160 90.1A61.4 61.4 0 0 1 1160 100Z", + "width": 1200 + }, + "search": [ + "message_icon" + ] + }, + { + "uid": "ed4536ee2a51bde352570554ae089661", + "css": "message_icon_active-1", + "code": 59496, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1182.9 44.3A100 100 0 0 0 1099.9 0.1H100A100 100 0 0 0 0 100V900A100 100 0 0 0 100 1000H1110.4A100 100 0 0 0 1200 900V100A100 100 0 0 0 1182.9 44.3ZM99.9 40H1100A60 60 0 0 1 1138.8 54.2L1061.2 128.2 734 440 612.8 555.7A20 20 0 0 1 589 555.7L466 440 60 54.3A60 60 0 0 1 100 40ZM39.9 90.4L423.2 454 40 820V100A59.7 59.7 0 0 1 40 90.4ZM1160 900A60 60 0 0 1 1107.6 960H100A60 60 0 0 1 40 900V874.6L452.2 481.6 562.4 586.4A60 60 0 0 0 571 592.2 58.4 58.4 0 0 0 600 600 63 63 0 0 0 640 586L748.8 482.4 1160 874.2ZM1160 100V819L776.8 454.7 1160 90.1A61.4 61.4 0 0 1 1160 100Z", + "width": 1200 + }, + "search": [ + "message_icon_active" + ] + }, + { + "uid": "f585c0032b4aa288a0dfb78f502d4d1c", + "css": "scdedule_icon_active-1", + "code": 59497, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M445.8 693.2A28.8 28.8 0 0 0 486.5 693.2L589.2 590.5A28.8 28.8 0 1 0 548.5 549.8L466.1 632.1 428.6 594.6A28.8 28.8 0 1 0 387.9 635.2ZM445.8 693.2M488.5 849.9A228.4 228.4 0 1 0 260.1 621.5 228.7 228.7 0 0 0 488.5 849.9ZM488.5 450.6A170.8 170.8 0 1 1 317.6 621.5 171 171 0 0 1 488.5 450.6ZM488.5 450.6M881.5 62.9H827.7V29.5A29.5 29.5 0 0 0 768.6 29.5V62.9H710.6V29.5A29.5 29.5 0 0 0 651.5 29.5V62.9H325.5V29.5A29.5 29.5 0 0 0 266.4 29.5V62.9H208.4V29.5A29.5 29.5 0 0 0 149.4 29.5V62.9H95.5A95.6 95.6 0 0 0 0 158.4V904.5A95.6 95.6 0 0 0 95.5 1000H881.5A95.6 95.6 0 0 0 976.9 904.5V158.4A95.6 95.6 0 0 0 881.5 62.9ZM918 904.5A36.5 36.5 0 0 1 881.5 940.9H95.5A36.5 36.5 0 0 1 59 904.5V308.4H917.9ZM59.1 158.4A36.5 36.5 0 0 1 95.5 121.9H149.4V155.3A29.5 29.5 0 0 0 208.4 155.3V121.9H266.4V155.3A29.5 29.5 0 0 0 325.5 155.3V121.9H651.5V155.3A29.5 29.5 0 0 0 710.6 155.3V121.9H768.6V155.3A29.5 29.5 0 0 0 827.7 155.3V121.9H881.5A36.5 36.5 0 0 1 918 158.4V249.3H59.1ZM59.1 158.4", + "width": 977 + }, + "search": [ + "scdedule_icon_active" + ] + }, + { + "uid": "cc3ade5c55f86a777648c695856d7bb6", + "css": "ovrweight-bmi-r-1", + "code": 59498, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M240.4 571.7C238.7 589.1 251.9 680.9 258.6 716.9 261.9 734 270.7 761.8 267.5 776.5A194.7 194.7 0 0 0 264.2 839.2C265.7 848.6 270.7 892 263.6 907.9A454.8 454.8 0 0 0 253.1 958.9C235.3 999.1 245.3 997.1 245.3 997.1 250.8 1003.2 260.3 997.6 260.3 997.6A9.9 9.9 0 0 0 272.4 996.6 12 12 0 0 0 285.7 996.1 14.6 14.6 0 0 0 300.6 993C305.1 995 306.1 992.5 306.1 992.5 319.5 991.7 298.7 953.5 298.7 953.5A94.6 94.6 0 0 1 303.6 900C336.1 813.7 337.7 790.8 324.7 758.3 321.1 748.9 320.2 745.2 321.8 741.1 325.7 731.7 322.9 693.9 327.6 678.8 336.8 649.9 345.8 576.4 350.5 542.1 356.8 495.9 328.1 434 328.1 434 321.9 408.8 331.1 319 331.1 319 343.9 336.9 343.4 368.6 343.4 368.6 341.4 401.9 373.3 452.7 373.3 452.7A128.3 128.3 0 0 1 394.5 495.1C394.5 501.1 393 515.8 393 515.8L393.6 528.5A163.7 163.7 0 0 1 395.6 548.4C393.2 581.6 399.1 575.4 399.1 575.4 404.1 575.4 409.5 548.6 409.5 548.6 409.5 555.5 407.6 576.1 411.8 583.9 416.8 593.2 420.4 582.3 420.5 580.1 421.8 537.8 424.6 548.9 424.6 548.9 427.4 583.2 430.8 591 436.8 588.3 441.4 586.3 437.2 547.1 437.2 547.1 445.1 570.4 451.1 574.1 451.1 574.1 464.1 582.3 456.1 559.7 454.3 555.2A118.2 118.2 0 0 1 444.3 523C456.4 544.5 465.4 543.7 465.4 543.7 477.2 540.3 455.1 510 442.3 495.4A118.3 118.3 0 0 1 424.7 472.2 253.7 253.7 0 0 1 417.7 430.2C416.5 392.3 406.1 375.9 406.1 375.9 388.2 350.3 384.9 302.5 384.9 302.5L384.1 221.9C377.8 166.9 332.7 166.5 332.7 166.5 287.1 160.5 280.7 147.3 280.7 147.3 271 134.8 276.6 110.8 276.6 110.8A41.5 41.5 0 0 0 287.7 89.4C301 80.3 300.4 66.9 294.2 67 289.3 67.1 290.4 63.4 290.4 63.4 298.7 3.1 239 0 239 0H229.9S170.1 3.1 178.4 63.4C178.4 63.4 179.6 67.1 174.6 67 168.4 66.8 167.9 80.3 181.1 89.4A41.4 41.4 0 0 0 192.3 110.8S197.8 134.8 188.1 147.2C188.1 147.2 181.8 160.5 136.1 166.6 136.1 166.6 90.9 167 84.7 222L83.8 302.6S80.5 350.3 62.6 375.9C62.6 375.9 52.3 392.4 51.1 430.2A255.3 255.3 0 0 1 44 472.3 117.1 117.1 0 0 1 26.5 495.5C13.5 510-8.4 540.2 3.3 543.7 3.3 543.7 12.5 544.5 24.4 523.1A117 117 0 0 1 14.6 555.2C12.7 559.6 4.6 582.3 17.7 574.2 17.7 574.2 23.7 570.4 31.5 547.1 31.5 547.1 27.3 586.4 32 588.4 38.1 591 41.5 583.3 44.2 548.9 44.2 548.9 47.1 537.8 48.4 580.2 48.4 582.4 52 593.3 57 584 61.2 576.2 59.3 555.5 59.3 548.6 59.3 548.6 64.7 575.4 69.7 575.4 69.7 575.4 75.7 581.7 73.2 548.4A150.7 150.7 0 0 1 75.2 528.6L75.8 515.8S74.3 501.2 74.3 495.1A128.1 128.1 0 0 1 95.5 452.7S127.5 401.9 125.4 368.7C125.4 368.7 125 337 137.8 319 137.8 319 146.9 408.8 140.7 434 140.7 434 112 496 118.3 542.2 123 576.5 132 649.9 141.2 678.9 145.9 693.9 143.1 731.7 146.9 741.2 148.7 745.3 147.8 749.1 144 758.4 131.2 790.8 132.9 813.7 165.3 900A93.8 93.8 0 0 1 170.2 953.5S149.5 991.7 162.7 992.5C162.7 992.5 163.8 995 168.3 993A14.6 14.6 0 0 0 183.2 996.1 12 12 0 0 0 196.5 996.6 9.9 9.9 0 0 0 208.6 997.6S218 1003.3 223.6 997.1C223.6 997.1 233.5 999.1 215.8 958.9A452.6 452.6 0 0 0 205.3 907.9C198.2 892 203.2 848.5 204.7 839.2A198.1 198.1 0 0 0 201.4 776.5C198.1 761.8 207 734 210.2 716.9 217 680.9 230.2 589.1 228.5 571.7L233.9 573.4A11.9 11.9 0 0 0 240.4 571.7Z", + "width": 469 + }, + "search": [ + "ovrweight-bmi-r" + ] + }, + { + "uid": "0032e9701d42cc0d1967b6a1256c2bbe", + "css": "temperature-1", + "code": 59500, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M394.7 0A131.7 131.7 0 0 1 526.3 131.8V686.9A187 187 0 0 1 579 815.8 184.2 184.2 0 1 1 263.2 686.9V131.6A131.4 131.4 0 0 1 394.7 0ZM394.7 315.8A26.5 26.5 0 0 0 368.4 342.1V741.3A79 79 0 1 0 473.7 815.8 79.9 79.9 0 0 0 421.1 741.3V342.1A26.7 26.7 0 0 0 394.7 315.8ZM184.2 631.6A26.3 26.3 0 1 1 184.2 684.3H52.6A26.3 26.3 0 1 1 52.6 631.6ZM710.6 289.6A105.3 105.3 0 0 1 815.7 394.7 25.8 25.8 0 0 1 789.5 422.3 26.5 26.5 0 0 1 763.1 394.9 52.6 52.6 0 0 0 657.9 394.9V553A52.6 52.6 0 1 0 763.2 553 26.3 26.3 0 0 1 815.8 553 105.3 105.3 0 0 1 605.3 553V394.7A105.3 105.3 0 0 1 710.6 289.6ZM184.2 552.6A26.3 26.3 0 1 1 184.2 605.3H157.9A26.3 26.3 0 0 1 157.9 552.6ZM184.2 447.4A26.3 26.3 0 0 1 210.6 473.7 26.7 26.7 0 0 1 184.2 500H105.3A26.3 26.3 0 0 1 78.9 473.7 26 26 0 0 1 105.3 447.4ZM921.1 289.5A52.6 52.6 0 1 1 868.5 342.1 52.6 52.6 0 0 1 921.1 289.6ZM184.2 342.1A26.3 26.3 0 1 1 184.2 394.8H78.9A26.3 26.3 0 0 1 78.9 342.1ZM184.2 236.9A26.3 26.3 0 0 1 184.2 289.5H131.6A26.3 26.3 0 0 1 131.6 236.9ZM184.2 131.6A26.3 26.3 0 1 1 184.2 184.3H26.3A26.3 26.3 0 1 1 26.3 131.6Z", + "width": 974 + }, + "search": [ + "temperature" + ] + }, + { + "uid": "208bf58358a06153619709f72e19051d", + "css": "underweight-bmi-1", + "code": 59499, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M182.4 571.7C181.1 589.1 191.1 680.9 196.2 716.9 198.7 734 205.4 761.8 203 776.5A255.5 255.5 0 0 0 200.4 839.2C201.6 848.6 205.4 892 200 907.9 197.2 916.3 192 958.9 192 958.9 178.6 999.1 186.1 997.1 186.1 997.1 190.3 1003.2 197.5 997.6 197.5 997.6A6.3 6.3 0 0 0 206.7 996.6C211.4 1001.2 216.8 996.1 216.8 996.1 222.7 999.7 228.1 993 228.1 993 231.5 995 232.3 992.5 232.3 992.5 242.4 991.7 226.7 953.5 226.7 953.5A122.1 122.1 0 0 1 230.4 900C255 813.7 256.3 790.8 246.5 758.3 243.7 748.9 243 745.2 244.3 741.1 247.2 731.7 245.1 693.9 248.7 678.8 255.6 649.9 262.4 576.4 266 542.1 270.7 495.9 249 434 249 434 244.2 408.8 251.2 319 251.2 319A126.2 126.2 0 0 1 260.6 368.6C259 401.9 283.2 452.7 283.2 452.7A149.5 149.5 0 0 1 299.3 495.1C299.3 501.1 298.2 515.8 298.2 515.8L298.6 528.5C298.8 531.8 300.4 543 300.1 548.4 298.3 581.6 302.8 575.4 302.8 575.4 306.5 575.4 310.7 548.6 310.7 548.6A135.2 135.2 0 0 0 312.4 583.9C316.2 593.2 318.9 582.3 319 580.1 320 537.8 322.1 548.9 322.1 548.9 324.2 583.2 326.8 591 331.4 588.3 334.9 586.3 331.7 547.1 331.7 547.1 337.7 570.4 342.2 574.1 342.2 574.1 352.1 582.3 346 559.7 344.6 555.2A148.3 148.3 0 0 1 337.1 523C346.2 544.5 353.1 543.7 353.1 543.7 362 540.3 345.3 510 335.6 495.4A121.6 121.6 0 0 1 322.3 472.2 328.7 328.7 0 0 1 317 430.2 145.7 145.7 0 0 0 308.1 375.9C294.6 350.3 292.1 302.5 292.1 302.5L291.5 221.9C286.7 166.9 252.5 166.5 252.5 166.5 217.8 160.4 213 147.2 213 147.2 205.7 134.7 209.9 110.8 209.9 110.8A47.8 47.8 0 0 0 218.3 89.4C228.4 80.2 227.9 66.8 223.3 66.9 219.5 67.1 220.4 63.4 220.4 63.4 226.6 3.1 181.3 0 181.3 0H174.4S129 3.1 135.4 63.4C135.4 63.4 136.2 67.1 132.5 67 127.8 66.8 127.4 80.3 137.4 89.4A47.7 47.7 0 0 0 145.9 110.8S150.1 134.8 142.8 147.2C142.8 147.2 138 160.5 103.3 166.6 103.3 166.6 69 167 64.3 222L63.7 302.6S61.1 350.3 47.5 375.9A146.2 146.2 0 0 0 38.8 430.2 330.8 330.8 0 0 1 33.4 472.3 120.2 120.2 0 0 1 20.1 495.5C10.2 510-6.3 540.2 2.5 543.7 2.5 543.7 9.4 544.5 18.5 523.1A146.9 146.9 0 0 1 11.1 555.2C9.6 559.6 3.5 582.3 13.4 574.2 13.4 574.2 18 570.4 23.9 547.1 23.9 547.1 20.7 586.4 24.3 588.4 28.9 591 31.5 583.3 33.6 548.9 33.6 548.9 35.7 537.8 36.7 580.2 36.7 582.4 39.4 593.3 43.2 584A133.3 133.3 0 0 0 45 548.6S49.1 575.4 52.9 575.4C52.9 575.4 57.4 581.7 55.6 548.4A197.2 197.2 0 0 1 57.1 528.6L57.5 515.8S56.4 501.2 56.4 495.1A149.3 149.3 0 0 1 72.5 452.7S96.7 401.8 95.2 368.6A126.5 126.5 0 0 1 104.6 319S111.5 408.8 106.8 434C106.8 434 85 495.9 89.8 542.1 93.4 576.5 100.2 649.9 107.2 678.8 110.8 693.8 108.6 731.7 111.5 741.1 112.9 745.2 112.2 749 109.4 758.3 99.6 790.8 100.8 813.7 125.4 900A121 121 0 0 1 129.2 953.5S113.5 991.8 123.5 992.5C123.5 992.5 124.3 995.1 127.7 993.1 127.7 993.1 133.2 999.7 139.1 996.1 139.1 996.1 144.5 1001.3 149.2 996.7A6.2 6.2 0 0 0 158.3 997.6S165.5 1003.3 169.7 997.2C169.7 997.2 177.2 999.2 163.8 959 163.8 959 158.6 916.3 155.8 908 150.4 892.1 154.2 848.6 155.4 839.3A260 260 0 0 0 152.8 776.6C150.4 761.8 157.1 734 159.6 717 164.7 681 174.7 589.1 173.4 571.8L177.5 573.5A7.6 7.6 0 0 0 182.4 571.7Z", + "width": 356 + }, + "search": [ + "underweight-bmi" + ] + }, + { + "uid": "0790b855889a2e90bc58c10bf62b18b7", + "css": "underweight-bmi-r-1", + "code": 59501, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M182.4 571.7C181.1 589.1 191.1 680.9 196.2 716.9 198.7 734 205.4 761.8 203 776.5A255.5 255.5 0 0 0 200.4 839.2C201.6 848.6 205.4 892 200 907.9 197.2 916.3 192 958.9 192 958.9 178.6 999.1 186.1 997.1 186.1 997.1 190.3 1003.2 197.5 997.6 197.5 997.6A6.3 6.3 0 0 0 206.7 996.6C211.4 1001.2 216.8 996.1 216.8 996.1 222.7 999.7 228.1 993 228.1 993 231.5 995 232.3 992.5 232.3 992.5 242.4 991.7 226.7 953.5 226.7 953.5A122.1 122.1 0 0 1 230.4 900C255 813.7 256.3 790.8 246.5 758.3 243.7 748.9 243 745.2 244.3 741.1 247.2 731.7 245.1 693.9 248.7 678.8 255.6 649.9 262.4 576.4 266 542.1 270.7 495.9 249 434 249 434 244.2 408.8 251.2 319 251.2 319A126.2 126.2 0 0 1 260.6 368.6C259 401.9 283.2 452.7 283.2 452.7A149.5 149.5 0 0 1 299.3 495.1C299.3 501.1 298.2 515.8 298.2 515.8L298.6 528.5C298.8 531.8 300.4 543 300.1 548.4 298.3 581.6 302.8 575.4 302.8 575.4 306.5 575.4 310.7 548.6 310.7 548.6A135.2 135.2 0 0 0 312.4 583.9C316.2 593.2 318.9 582.3 319 580.1 320 537.8 322.1 548.9 322.1 548.9 324.2 583.2 326.8 591 331.4 588.3 334.9 586.3 331.7 547.1 331.7 547.1 337.7 570.4 342.2 574.1 342.2 574.1 352.1 582.3 346 559.7 344.6 555.2A148.3 148.3 0 0 1 337.1 523C346.2 544.5 353.1 543.7 353.1 543.7 362 540.3 345.3 510 335.6 495.4A121.6 121.6 0 0 1 322.3 472.2 328.7 328.7 0 0 1 317 430.2 145.7 145.7 0 0 0 308.1 375.9C294.6 350.3 292.1 302.5 292.1 302.5L291.5 221.9C286.7 166.9 252.5 166.5 252.5 166.5 217.8 160.4 213 147.2 213 147.2 205.7 134.7 209.9 110.8 209.9 110.8A47.8 47.8 0 0 0 218.3 89.4C228.4 80.2 227.9 66.8 223.3 66.9 219.5 67.1 220.4 63.4 220.4 63.4 226.6 3.1 181.3 0 181.3 0H174.4S129 3.1 135.4 63.4C135.4 63.4 136.2 67.1 132.5 67 127.8 66.8 127.4 80.3 137.4 89.4A47.7 47.7 0 0 0 145.9 110.8S150.1 134.8 142.8 147.2C142.8 147.2 138 160.5 103.3 166.6 103.3 166.6 69 167 64.3 222L63.7 302.6S61.1 350.3 47.5 375.9A146.2 146.2 0 0 0 38.8 430.2 330.8 330.8 0 0 1 33.4 472.3 120.2 120.2 0 0 1 20.1 495.5C10.2 510-6.3 540.2 2.5 543.7 2.5 543.7 9.4 544.5 18.5 523.1A146.9 146.9 0 0 1 11.1 555.2C9.6 559.6 3.5 582.3 13.4 574.2 13.4 574.2 18 570.4 23.9 547.1 23.9 547.1 20.7 586.4 24.3 588.4 28.9 591 31.5 583.3 33.6 548.9 33.6 548.9 35.7 537.8 36.7 580.2 36.7 582.4 39.4 593.3 43.2 584A133.3 133.3 0 0 0 45 548.6S49.1 575.4 52.9 575.4C52.9 575.4 57.4 581.7 55.6 548.4A197.2 197.2 0 0 1 57.1 528.6L57.5 515.8S56.4 501.2 56.4 495.1A149.3 149.3 0 0 1 72.5 452.7S96.7 401.8 95.2 368.6A126.5 126.5 0 0 1 104.6 319S111.5 408.8 106.8 434C106.8 434 85 495.9 89.8 542.1 93.4 576.5 100.2 649.9 107.2 678.8 110.8 693.8 108.6 731.7 111.5 741.1 112.9 745.2 112.2 749 109.4 758.3 99.6 790.8 100.8 813.7 125.4 900A121 121 0 0 1 129.2 953.5S113.5 991.8 123.5 992.5C123.5 992.5 124.3 995.1 127.7 993.1 127.7 993.1 133.2 999.7 139.1 996.1 139.1 996.1 144.5 1001.3 149.2 996.7A6.2 6.2 0 0 0 158.3 997.6S165.5 1003.3 169.7 997.2C169.7 997.2 177.2 999.2 163.8 959 163.8 959 158.6 916.3 155.8 908 150.4 892.1 154.2 848.6 155.4 839.3A260 260 0 0 0 152.8 776.6C150.4 761.8 157.1 734 159.6 717 164.7 681 174.7 589.1 173.4 571.8L177.5 573.5A7.6 7.6 0 0 0 182.4 571.7Z", + "width": 356 + }, + "search": [ + "underweight-bmi-r" + ] + }, + { + "uid": "28c921a73f854e0b9d7882278180cb1c", + "css": "weight-1", + "code": 59502, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M909.1 0H90.9A91 91 0 0 0 0 90.9V909.1A91 91 0 0 0 90.9 1000H909.1A91 91 0 0 0 1000 909.1V90.9A91 91 0 0 0 909.1 0ZM789.3 288.3L660.8 416.9A22.7 22.7 0 0 1 628.6 416.9 184.8 184.8 0 0 0 455.8 371.1L407 263.5A22.7 22.7 0 1 0 365.7 282.3L413.4 387.2A169.3 169.3 0 0 0 371.6 416.9 22.7 22.7 0 0 1 339.5 416.9L210.7 288.3A22.7 22.7 0 0 1 210.7 256.2 409 409 0 0 1 789.3 256.2 22.7 22.7 0 0 1 789.3 288.3Z", + "width": 1000 + }, + "search": [ + "weight" + ] + }, + { + "uid": "b2fce7f0f65f22d51853206d59bbe9f5", + "css": "blood-pressure-1", + "code": 59503, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M672.7 709.1A145.5 145.5 0 1 0 818.2 854.6 145.5 145.5 0 0 0 672.7 709.1ZM724.2 828.9L685.6 867.5A18.2 18.2 0 1 1 659.8 841.7L698.4 803.1A18.2 18.2 0 0 1 724.2 828.9ZM872.7 236.4C770.7 236.4 690.9 292.4 690.9 363.7S770.7 491 872.7 491 1054.5 435 1054.5 363.7 974.7 236.4 872.7 236.4ZM972.7 381.8A18.2 18.2 0 0 1 954.6 363.7C954.6 350 914.9 327.3 872.7 327.3A18.2 18.2 0 1 1 872.7 291C921.1 291 990.9 316.8 990.9 363.7A18.2 18.2 0 0 1 972.7 381.8ZM655.8 345.5H563.7V18.2A18.2 18.2 0 0 0 545.4 0H218.2A18.2 18.2 0 0 0 200 18.2V109.1H18.2A18.2 18.2 0 0 0 0 127.3V781.8A18.2 18.2 0 0 0 18.2 800H200V854.5A18.2 18.2 0 0 0 218.2 872.7H491.8C491.8 866.7 490.9 860.7 490.9 854.5A120.6 120.6 0 0 1 491.8 836.4H236.4V800H418.2A18.2 18.2 0 0 0 436.4 781.8V127.3A18.2 18.2 0 0 0 418.2 109.1H236.4V36.4H527.3V363.6A18.2 18.2 0 0 0 545.5 381.8H655.9A130.5 130.5 0 0 1 655.8 345.5ZM272.7 272.7H345.5A18.2 18.2 0 1 1 345.5 309.1H272.7A18.2 18.2 0 1 1 272.7 272.7ZM272.7 600H345.5A18.2 18.2 0 1 1 345.5 636.4H272.7A18.2 18.2 0 1 1 272.7 600Z", + "width": 1055 + }, + "search": [ + "blood-pressure" + ] + }, + { + "uid": "2c5321439f574f1b3d74a71ae040512c", + "css": "filter-1", + "code": 59532, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M376.3 472.5A61.7 61.7 0 0 1 392.5 514.3V969.1A30.9 30.9 0 0 0 445.1 991.1L572 845.7C589 825.4 598.4 815.2 598.4 795.1V514.4A62.2 62.2 0 0 1 614.6 472.6L978.6 77.6A46.4 46.4 0 0 0 944.5 0H46.5A46.3 46.3 0 0 0 12.4 77.6Z", + "width": 991 + }, + "search": [ + "filter" + ] + }, + { + "uid": "d4c35e5489591eb085e2936014910df8", + "css": "male-3", + "code": 59533, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M975.4 0H569.5A24.6 24.6 0 0 0 544.9 24.6V133.4A24.6 24.6 0 0 0 569.5 158H725.6L545 338.6A357.4 357.4 0 1 0 661.6 455.3L842.1 274.7V430.5A24.6 24.6 0 0 0 866.7 455.1H975.3A24.6 24.6 0 0 0 999.8 430.5V24.6A24.6 24.6 0 0 0 975.3 0ZM357.6 878.2A235.5 235.5 0 1 1 593.1 642.7 235.5 235.5 0 0 1 357.6 878.2Z", + "width": 1000 + }, + "search": [ + "male" + ] + }, + { + "uid": "cb1acb9603d7bf118642dcc8374a07c8", + "css": "search-2", + "code": 59534, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M402.7 804.7A401.8 401.8 0 0 0 649.6 719.9L915.7 986A50 50 0 0 0 986.5 915.3L720.3 649.2A402.6 402.6 0 1 0 402.7 804.7ZM188.8 188.6A302.4 302.4 0 1 1 188.8 616.2H188.8A301.2 301.2 0 0 1 187.1 190.2L188.6 188.6Z", + "width": 1001 + }, + "search": [ + "search" + ] + }, + { + "uid": "cfca37b29e6fa5d9ef1531bfae25b687", + "css": "send-1", + "code": 59535, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1000.1 0L0 562.5 319.4 680.9 812.5 218.8 437.6 724.5 437.9 724.5 437.5 724.5V1000.1L616.7 790.9 843.7 875Z", + "width": 1000 + }, + "search": [ + "send" + ] + }, + { + "uid": "20326e34220e9e1dac3393ba9b386734", + "css": "female-2", + "code": 59531, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M864.9 747.5C966.6 645.7 999.8 626 975.5 601.7L892.8 518.9A24.6 24.6 0 0 0 857.8 518.9L746.8 629.8 666.7 549.7A359.2 359.2 0 1 0 549.9 667.8L629.7 747.5C528 849.3 494.8 869 519.1 893.3L601.4 975.9A24.6 24.6 0 0 0 636.4 975.9L746.8 865.3C866.3 984.8 884.6 1016.8 909 992.5 988.6 912.9 999.3 908.8 999.3 892.2S994.5 877.2 864.9 747.5ZM360.5 598.5A237.9 237.9 0 1 1 598.5 360.5 237.9 237.9 0 0 1 360.5 598.5Z", + "width": 999 + }, + "search": [ + "female" + ] + }, + { + "uid": "342382cdcec431ecf1c796b8fe0426c2", + "css": "create-episode-1", + "code": 59527, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M825.8 83.3A125 125 0 0 0 708.4 0H125A125.4 125.4 0 0 0 0 125V708.4A125 125 0 0 0 83.3 825.9V291.7A208.3 208.3 0 0 1 291.7 83.3ZM875 166.7H291.6A125.4 125.4 0 0 0 166.7 291.6V875A125.4 125.4 0 0 0 291.6 1000H875A125.4 125.4 0 0 0 1000 875V291.6A125.4 125.4 0 0 0 875 166.7ZM750 625H625V750A41.7 41.7 0 0 1 541.7 750V625H416.7A41.7 41.7 0 1 1 416.7 541.7H541.7V416.7A41.7 41.7 0 1 1 625 416.7V541.7H750A41.7 41.7 0 0 1 750 625Z", + "width": 1000 + }, + "search": [ + "create-episode" + ] + }, + { + "uid": "59afe1ac64e42bf7f65ca1f02f61239b", + "css": "health-bmi-r-1", + "code": 59504, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M215.7 571.7C214.2 589.1 226 680.9 232 716.9 234.9 734 242.9 761.8 240 776.5A216.6 216.6 0 0 0 237 839.2C238.4 848.6 242.9 892 236.5 907.9A500.9 500.9 0 0 0 227.1 958.9C211.1 999.1 220.1 997.1 220.1 997.1 225 1003.2 233.5 997.6 233.5 997.6A8.2 8.2 0 0 0 244.4 996.6 9.9 9.9 0 0 0 256.4 996.1 12.2 12.2 0 0 0 269.8 993C273.7 995 274.7 992.5 274.7 992.5 286.7 991.7 268 953.5 268 953.5A104.5 104.5 0 0 1 272.5 900C301.6 813.7 303 790.8 291.4 758.3 288.1 748.9 287.3 745.2 288.8 741.1 292.3 731.7 289.8 693.9 294 678.8 302.2 649.9 310.3 576.4 314.5 542.1 320.1 495.9 294.4 434 294.4 434 288.8 408.8 297 319 297 319 308.6 336.9 308.1 368.6 308.1 368.6 306.3 401.9 335 452.7 335 452.7A135.3 135.3 0 0 1 354 495.1C354 501.1 352.7 515.8 352.7 515.8L353.2 528.5A181.9 181.9 0 0 1 354.9 548.4C352.8 581.7 358 575.4 358 575.4 362.5 575.4 367.4 548.6 367.4 548.6A114.7 114.7 0 0 0 369.5 584C373.9 593.2 377.2 582.4 377.2 580.2 378.4 537.8 381 548.9 381 548.9 383.4 583.3 386.5 591 391.9 588.3 396.1 586.4 392.3 547.1 392.3 547.1 399.4 570.4 404.7 574.1 404.7 574.1 416.4 582.4 409.2 559.7 407.6 555.2A128.9 128.9 0 0 1 398.7 523.1C409.5 544.5 417.6 543.7 417.6 543.7 428.1 540.3 408.4 510 396.8 495.5A118.2 118.2 0 0 1 381.1 472.2 280.5 280.5 0 0 1 374.8 430.2 126.3 126.3 0 0 0 364.3 375.9C348.3 350.3 345.3 302.6 345.3 302.6L344.6 222C339 167 298.5 166.6 298.5 166.6 257.5 160.5 251.8 147.3 251.8 147.3 243.2 134.8 248.1 110.8 248.1 110.8A43.5 43.5 0 0 0 258.1 89.4C270 80.3 269.4 66.9 263.9 67 259.5 67.1 260.5 63.4 260.5 63.4 268 3.1 214.4 0 214.4 0H206.2S152.6 3.1 160.1 63.4C160.1 63.4 161.1 67.1 156.6 67 151.1 66.8 150.6 80.3 162.5 89.4A43.5 43.5 0 0 0 172.5 110.8S177.4 134.8 168.8 147.2C168.8 147.2 163.1 160.5 122.1 166.6 122.1 166.6 81.5 167 76 222L75.2 302.6S72.3 350.3 56.2 375.9A126.8 126.8 0 0 0 45.8 430.2 282.3 282.3 0 0 1 39.5 472.3 116.9 116.9 0 0 1 23.8 495.5C12.1 510-7.5 540.2 3 543.7 3 543.7 11.2 544.5 21.9 523.1A127.6 127.6 0 0 1 13.1 555.2C11.4 559.6 4.1 582.3 15.8 574.2 15.8 574.2 21.2 570.4 28.3 547.1 28.3 547.1 24.5 586.4 28.7 588.4 34.2 591 37.2 583.3 39.7 548.9 39.7 548.9 42.2 537.8 43.4 580.2 43.5 582.4 46.7 593.3 51.1 584A113.1 113.1 0 0 0 53.2 548.6S58 575.4 62.6 575.4C62.6 575.4 67.9 581.7 65.7 548.4A167.4 167.4 0 0 1 67.4 528.6L68 515.8S66.6 501.2 66.6 495.1A135.1 135.1 0 0 1 85.6 452.7S114.3 401.9 112.4 368.7C112.4 368.7 112 337 123.6 319 123.6 319 131.8 408.8 126.2 434 126.2 434 100.4 496 106.1 542.2 110.3 576.5 118.4 649.9 126.6 678.9 130.9 693.9 128.4 731.7 131.8 741.2 133.3 745.3 132.5 749.1 129.2 758.4 117.6 790.9 119.1 813.8 148.2 900.1A103.5 103.5 0 0 1 152.6 953.6S134 991.8 145.9 992.6C145.9 992.6 146.9 995.1 150.9 993.1A12.3 12.3 0 0 0 164.3 996.1 9.9 9.9 0 0 0 176.2 996.7 8.2 8.2 0 0 0 187.1 997.7S195.5 1003.4 200.5 997.2C200.5 997.2 209.4 999.2 193.6 959A498.5 498.5 0 0 0 184.1 908C177.8 892.1 182.3 848.6 183.6 839.3A220.4 220.4 0 0 0 180.7 776.5C177.8 761.8 185.7 734 188.7 716.9 194.7 680.9 206.5 589.1 205.1 571.7L209.9 573.4A9.9 9.9 0 0 0 215.7 571.7Z", + "width": 421 + }, + "search": [ + "health-bmi-r" + ] + }, + { + "uid": "e5c5250bddfcb33a1d4f8c2948b754e4", + "css": "health-bmi-1", + "code": 59505, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M215.7 571.7C214.2 589.1 226 680.9 232 716.9 234.9 734 242.9 761.8 240 776.5A216.6 216.6 0 0 0 237 839.2C238.4 848.6 242.9 892 236.5 907.9A500.9 500.9 0 0 0 227.1 958.9C211.1 999.1 220.1 997.1 220.1 997.1 225 1003.2 233.5 997.6 233.5 997.6A8.2 8.2 0 0 0 244.4 996.6 9.9 9.9 0 0 0 256.4 996.1 12.2 12.2 0 0 0 269.8 993C273.7 995 274.7 992.5 274.7 992.5 286.7 991.7 268 953.5 268 953.5A104.5 104.5 0 0 1 272.5 900C301.6 813.7 303 790.8 291.4 758.3 288.1 748.9 287.3 745.2 288.8 741.1 292.3 731.7 289.8 693.9 294 678.8 302.2 649.9 310.3 576.4 314.5 542.1 320.1 495.9 294.4 434 294.4 434 288.8 408.8 297 319 297 319 308.6 336.9 308.1 368.6 308.1 368.6 306.3 401.9 335 452.7 335 452.7A135.3 135.3 0 0 1 354 495.1C354 501.1 352.7 515.8 352.7 515.8L353.2 528.5A181.9 181.9 0 0 1 354.9 548.4C352.8 581.7 358 575.4 358 575.4 362.5 575.4 367.4 548.6 367.4 548.6A114.7 114.7 0 0 0 369.5 584C373.9 593.2 377.2 582.4 377.2 580.2 378.4 537.8 381 548.9 381 548.9 383.4 583.3 386.5 591 391.9 588.3 396.1 586.4 392.3 547.1 392.3 547.1 399.4 570.4 404.7 574.1 404.7 574.1 416.4 582.4 409.2 559.7 407.6 555.2A128.9 128.9 0 0 1 398.7 523.1C409.5 544.5 417.6 543.7 417.6 543.7 428.1 540.3 408.4 510 396.8 495.5A118.2 118.2 0 0 1 381.1 472.2 280.5 280.5 0 0 1 374.8 430.2 126.3 126.3 0 0 0 364.3 375.9C348.3 350.3 345.3 302.6 345.3 302.6L344.6 222C339 167 298.5 166.6 298.5 166.6 257.5 160.5 251.8 147.3 251.8 147.3 243.2 134.8 248.1 110.8 248.1 110.8A43.5 43.5 0 0 0 258.1 89.4C270 80.3 269.4 66.9 263.9 67 259.5 67.1 260.5 63.4 260.5 63.4 268 3.1 214.4 0 214.4 0H206.2S152.6 3.1 160.1 63.4C160.1 63.4 161.1 67.1 156.6 67 151.1 66.8 150.6 80.3 162.5 89.4A43.5 43.5 0 0 0 172.5 110.8S177.4 134.8 168.8 147.2C168.8 147.2 163.1 160.5 122.1 166.6 122.1 166.6 81.5 167 76 222L75.2 302.6S72.3 350.3 56.2 375.9A126.8 126.8 0 0 0 45.8 430.2 282.3 282.3 0 0 1 39.5 472.3 116.9 116.9 0 0 1 23.8 495.5C12.1 510-7.5 540.2 3 543.7 3 543.7 11.2 544.5 21.9 523.1A127.6 127.6 0 0 1 13.1 555.2C11.4 559.6 4.1 582.3 15.8 574.2 15.8 574.2 21.2 570.4 28.3 547.1 28.3 547.1 24.5 586.4 28.7 588.4 34.2 591 37.2 583.3 39.7 548.9 39.7 548.9 42.2 537.8 43.4 580.2 43.5 582.4 46.7 593.3 51.1 584A113.1 113.1 0 0 0 53.2 548.6S58 575.4 62.6 575.4C62.6 575.4 67.9 581.7 65.7 548.4A167.4 167.4 0 0 1 67.4 528.6L68 515.8S66.6 501.2 66.6 495.1A135.1 135.1 0 0 1 85.6 452.7S114.3 401.9 112.4 368.7C112.4 368.7 112 337 123.6 319 123.6 319 131.8 408.8 126.2 434 126.2 434 100.4 496 106.1 542.2 110.3 576.5 118.4 649.9 126.6 678.9 130.9 693.9 128.4 731.7 131.8 741.2 133.3 745.3 132.5 749.1 129.2 758.4 117.6 790.9 119.1 813.8 148.2 900.1A103.5 103.5 0 0 1 152.6 953.6S134 991.8 145.9 992.6C145.9 992.6 146.9 995.1 150.9 993.1A12.3 12.3 0 0 0 164.3 996.1 9.9 9.9 0 0 0 176.2 996.7 8.2 8.2 0 0 0 187.1 997.7S195.5 1003.4 200.5 997.2C200.5 997.2 209.4 999.2 193.6 959A498.5 498.5 0 0 0 184.1 908C177.8 892.1 182.3 848.6 183.6 839.3A220.4 220.4 0 0 0 180.7 776.5C177.8 761.8 185.7 734 188.7 716.9 194.7 680.9 206.5 589.1 205.1 571.7L209.9 573.4A9.9 9.9 0 0 0 215.7 571.7Z", + "width": 421 + }, + "search": [ + "health-bmi" + ] + }, + { + "uid": "e72be05611e51608304a7c6f3b837607", + "css": "heart-rate-1", + "code": 59506, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 532.1V608.1H205.7A689.9 689.9 0 0 1 145.8 532.1ZM1151 532.1A690.1 690.1 0 0 1 1091 608.1H1296.7V532.1ZM420.4 222L545.9 598.4 590 532.1H699L802.2 284.8 913.5 532.3H1151A366.1 366.1 0 0 0 1218.2 324.2 318.2 318.2 0 0 0 971.8 5C843.9-20.1 726.9 46.1 648.4 183.9 570 46.6 453.5-19.1 325.8 5.6A322.2 322.2 0 0 0 78.5 324.2 366.1 366.1 0 0 0 145.8 532H317.1ZM804.8 475.7L749.7 608.1H630.7L522.9 769.6 420.5 462.3 371.9 608.1H205.7A2720.4 2720.4 0 0 0 486.1 863C529.5 899.1 648.4 1000 648.4 1000S767.4 899.1 810.6 863A2720.7 2720.7 0 0 0 1091 608.1H864.5Z", + "width": 1297 + }, + "search": [ + "heart-rate" + ] + }, + { + "uid": "344d3323e746d922961f90699be37942", + "css": "height-1", + "code": 59507, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M400 50V150H600V250H400V350H500V450H400V550H600V650H400V750H500V850H400V950A50 50 0 0 0 450 1000H750A50 50 0 0 0 800 950V50A50 50 0 0 0 750 0H450A50 50 0 0 0 400 50ZM0 200L150 29.3 300 200H200V1000H100V200Z", + "width": 800 + }, + "search": [ + "height" + ] + }, + { + "uid": "ec7c3d4c3a1a3a5c781fafdfc80d80b2", + "css": "obese-bmi-1", + "code": 59508, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M307.3 571.7C305.2 589.1 322 680.9 330.6 716.9 334.8 734 346.1 761.8 342 776.5A153.3 153.3 0 0 0 337.7 839.2C339.7 848.6 346 892 337 907.9A369.5 369.5 0 0 0 323.5 958.9C300.8 999.1 313.6 997.1 313.6 997.1 320.6 1003.2 332.7 997.6 332.7 997.6A15.3 15.3 0 0 0 348.1 996.6 18.9 18.9 0 0 0 365.2 996.1 22.4 22.4 0 0 0 384.2 993C389.9 995 391.3 992.5 391.3 992.5 408.3 991.7 381.8 953.5 381.8 953.5A76.3 76.3 0 0 1 388.1 900C429.5 813.7 431.7 790.8 415.1 758.3 410.4 748.9 409.2 745.2 411.4 741.1 416.3 731.7 412.7 693.9 418.8 678.8 430.5 649.9 442 576.4 448 542.1 456.1 495.9 419.4 434 419.4 434 411.4 408.8 423.1 319 423.1 319 439.6 336.9 439 368.6 439 368.6 436.4 401.9 477.2 452.7 477.2 452.7A118.4 118.4 0 0 1 504.3 495.1C504.3 501.1 502.4 515.8 502.4 515.8L503.2 528.5A129.3 129.3 0 0 1 505.7 548.3C502.6 581.6 510.2 575.3 510.2 575.3 516.5 575.3 523.5 548.5 523.5 548.5 523.5 555.4 521.1 576.1 526.4 583.9 532.7 593.2 537.4 582.3 537.5 580.1 539.2 537.8 542.8 548.9 542.8 548.9 546.3 583.2 550.7 591 558.4 588.3 564.3 586.3 558.9 547.1 558.9 547.1 569 570.4 576.7 574.1 576.7 574.1 593.3 582.3 583 559.6 580.7 555.1A99.2 99.2 0 0 1 568 523C583.4 544.5 595 543.6 595 543.6 610 540.3 581.9 509.9 565.4 495.4A126 126 0 0 1 543 472.2 203.5 203.5 0 0 1 534 430.1C532.4 392.3 519.1 375.9 519.1 375.9 496.3 350.3 492 302.5 492 302.5L491 221.9C483 166.9 425.3 166.5 425.3 166.5 366.9 160.4 358.8 147.2 358.8 147.2 346.4 134.7 353.5 110.8 353.5 110.8A38.7 38.7 0 0 0 367.7 89.4C384.7 80.2 383.9 66.8 376 66.9 369.7 67 371.2 63.4 371.2 63.4 381.9 3.1 305.5 0 305.5 0H293.9S217.5 3.1 228.1 63.4C228.1 63.4 229.6 67.1 223.2 67 215.4 66.8 214.6 80.3 231.6 89.4A38.7 38.7 0 0 0 245.8 110.8S252.9 134.8 240.5 147.2C240.5 147.2 232.4 160.5 174 166.6 174 166.6 116.2 167 108.3 222L107.2 302.6S103 350.3 80.2 375.9C80.2 375.9 66.9 392.4 65.4 430.2A204.8 204.8 0 0 1 56.4 472.3 124.6 124.6 0 0 1 33.9 495.5C17.3 510-10.7 540.2 4.3 543.7 4.3 543.7 16 544.5 31.3 523.1A98.1 98.1 0 0 1 18.7 555.2C16.3 559.6 6 582.3 22.6 574.2 22.6 574.2 30.3 570.4 40.4 547.1 40.4 547.1 35 586.4 41 588.4 48.8 591 53.1 583.3 56.6 548.9 56.6 548.9 60.2 537.8 61.9 580.2 62 582.4 66.5 593.3 72.9 584 78.3 576.2 75.9 555.5 75.9 548.6 75.9 548.6 82.8 575.4 89.2 575.4 89.2 575.4 96.8 581.7 93.7 548.4A119.1 119.1 0 0 1 96.2 528.5L96.9 515.8S95 501.1 95 495.1A118.3 118.3 0 0 1 122.1 452.7S162.9 401.8 160.3 368.6C160.3 368.6 159.7 336.9 176.2 319 176.2 319 187.9 408.8 180 434 180 434 143.2 495.9 151.3 542.1 157.3 576.5 168.8 649.9 180.5 678.8 186.6 693.8 183 731.7 187.9 741.1 190.1 745.2 188.9 749 184.2 758.3 167.7 790.8 169.8 813.7 211.3 900A75.6 75.6 0 0 1 217.6 953.5S191.1 991.7 208.1 992.5C208.1 992.5 209.4 995 215.1 993A22.4 22.4 0 0 0 234.2 996.1 18.8 18.8 0 0 0 251.2 996.6 15.2 15.2 0 0 0 266.7 997.6S278.7 1003.3 285.8 997.1C285.8 997.1 298.5 999.1 275.9 958.9A367.7 367.7 0 0 0 262.5 907.9C253.4 892.1 259.9 848.6 261.8 839.2A155.9 155.9 0 0 0 257.5 776.5C253.3 761.8 264.7 734 268.9 716.9 277.5 680.9 294.3 589.1 292.2 571.7L299.2 573.4A18.3 18.3 0 0 0 307.3 571.7Z", + "width": 599 + }, + "search": [ + "obese-bmi" + ] + }, + { + "uid": "4f949a0351be7f1870efaf1172e1e0a8", + "css": "ovrweight-bmi-1", + "code": 59509, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M240.4 571.7C238.7 589.1 251.9 680.9 258.6 716.9 261.9 734 270.7 761.8 267.5 776.5A194.7 194.7 0 0 0 264.2 839.2C265.7 848.6 270.7 892 263.6 907.9A454.8 454.8 0 0 0 253.1 958.9C235.3 999.1 245.3 997.1 245.3 997.1 250.8 1003.2 260.3 997.6 260.3 997.6A9.9 9.9 0 0 0 272.4 996.6 12 12 0 0 0 285.7 996.1 14.6 14.6 0 0 0 300.6 993C305.1 995 306.1 992.5 306.1 992.5 319.5 991.7 298.7 953.5 298.7 953.5A94.6 94.6 0 0 1 303.6 900C336.1 813.7 337.7 790.8 324.7 758.3 321.1 748.9 320.2 745.2 321.8 741.1 325.7 731.7 322.9 693.9 327.6 678.8 336.8 649.9 345.8 576.4 350.5 542.1 356.8 495.9 328.1 434 328.1 434 321.9 408.8 331.1 319 331.1 319 343.9 336.9 343.4 368.6 343.4 368.6 341.4 401.9 373.3 452.7 373.3 452.7A128.3 128.3 0 0 1 394.5 495.1C394.5 501.1 393 515.8 393 515.8L393.6 528.5A163.7 163.7 0 0 1 395.6 548.4C393.2 581.6 399.1 575.4 399.1 575.4 404.1 575.4 409.5 548.6 409.5 548.6 409.5 555.5 407.6 576.1 411.8 583.9 416.8 593.2 420.4 582.3 420.5 580.1 421.8 537.8 424.6 548.9 424.6 548.9 427.4 583.2 430.8 591 436.8 588.3 441.4 586.3 437.2 547.1 437.2 547.1 445.1 570.4 451.1 574.1 451.1 574.1 464.1 582.3 456.1 559.7 454.3 555.2A118.2 118.2 0 0 1 444.3 523C456.4 544.5 465.4 543.7 465.4 543.7 477.2 540.3 455.1 510 442.3 495.4A118.3 118.3 0 0 1 424.7 472.2 253.7 253.7 0 0 1 417.7 430.2C416.5 392.3 406.1 375.9 406.1 375.9 388.2 350.3 384.9 302.5 384.9 302.5L384.1 221.9C377.8 166.9 332.7 166.5 332.7 166.5 287.1 160.5 280.7 147.3 280.7 147.3 271 134.8 276.6 110.8 276.6 110.8A41.5 41.5 0 0 0 287.7 89.4C301 80.3 300.4 66.9 294.2 67 289.3 67.1 290.4 63.4 290.4 63.4 298.7 3.1 239 0 239 0H229.9S170.1 3.1 178.4 63.4C178.4 63.4 179.6 67.1 174.6 67 168.4 66.8 167.9 80.3 181.1 89.4A41.4 41.4 0 0 0 192.3 110.8S197.8 134.8 188.1 147.2C188.1 147.2 181.8 160.5 136.1 166.6 136.1 166.6 90.9 167 84.7 222L83.8 302.6S80.5 350.3 62.6 375.9C62.6 375.9 52.3 392.4 51.1 430.2A255.3 255.3 0 0 1 44 472.3 117.1 117.1 0 0 1 26.5 495.5C13.5 510-8.4 540.2 3.3 543.7 3.3 543.7 12.5 544.5 24.4 523.1A117 117 0 0 1 14.6 555.2C12.7 559.6 4.6 582.3 17.7 574.2 17.7 574.2 23.7 570.4 31.5 547.1 31.5 547.1 27.3 586.4 32 588.4 38.1 591 41.5 583.3 44.2 548.9 44.2 548.9 47.1 537.8 48.4 580.2 48.4 582.4 52 593.3 57 584 61.2 576.2 59.3 555.5 59.3 548.6 59.3 548.6 64.7 575.4 69.7 575.4 69.7 575.4 75.7 581.7 73.2 548.4A150.7 150.7 0 0 1 75.2 528.6L75.8 515.8S74.3 501.2 74.3 495.1A128.1 128.1 0 0 1 95.5 452.7S127.5 401.9 125.4 368.7C125.4 368.7 125 337 137.8 319 137.8 319 146.9 408.8 140.7 434 140.7 434 112 496 118.3 542.2 123 576.5 132 649.9 141.2 678.9 145.9 693.9 143.1 731.7 146.9 741.2 148.7 745.3 147.8 749.1 144 758.4 131.2 790.8 132.9 813.7 165.3 900A93.8 93.8 0 0 1 170.2 953.5S149.5 991.7 162.7 992.5C162.7 992.5 163.8 995 168.3 993A14.6 14.6 0 0 0 183.2 996.1 12 12 0 0 0 196.5 996.6 9.9 9.9 0 0 0 208.6 997.6S218 1003.3 223.6 997.1C223.6 997.1 233.5 999.1 215.8 958.9A452.6 452.6 0 0 0 205.3 907.9C198.2 892 203.2 848.5 204.7 839.2A198.1 198.1 0 0 0 201.4 776.5C198.1 761.8 207 734 210.2 716.9 217 680.9 230.2 589.1 228.5 571.7L233.9 573.4A11.9 11.9 0 0 0 240.4 571.7Z", + "width": 469 + }, + "search": [ + "ovrweight-bmi" + ] + }, + { + "uid": "05061dddffce90689cd95cb5ae8590b3", + "css": "qr-code-3", + "code": 59511, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M650 0V350H1000V0ZM900 250H750V100H900ZM350 200V0H0V350H450V200H350ZM250 250H100V100H250ZM700 550H800V700H900V450H550V550H600V650.1H700.1ZM700 800H600V900H500V1000H700V900H800V1000H950V900H900V800H700ZM350 800V650H0V1000H350V900H500V800ZM250 900H100V750H250Z", + "width": 1000 + }, + "search": [ + "qr-code" + ] + }, + { + "uid": "638a9ad84d757d58f60e640ad7a8a992", + "css": "lab-results-1", + "code": 59530, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M633.4 0L547 23.2 523.8 109.6 587 172.8 673.4 149.6C681.4 120.9 688.9 92.1 696.6 63.3ZM206.2 20.1V53.8H239.8C240.2 143.1 239.8 232.1 239.8 321.2 237.7 325.8 72 689.9 4.2 893.4A102.8 102.8 0 0 0 6.2 957.1 75.5 75.5 0 0 0 22.3 985.5 44.5 44.5 0 0 0 54.1 1000H628.1A44.5 44.5 0 0 0 659.9 985.5 75.5 75.5 0 0 0 676.1 957.1 102.8 102.8 0 0 0 678 893.4C610.2 689.9 444.4 325.9 442.5 321.2 442.8 232.1 442.7 143 442.7 53.8H476.5V20.1ZM815 52.1L728.6 75.2 705.6 161.6 768.8 224.9 855.2 201.7C862.7 172.9 870.6 144.1 878.4 115.3ZM408.8 53.8V222.8L273.6 223.2 273.6 54.3ZM684.3 177L597.9 200.2 574.7 286.6 638 349.8 724.4 326.6Q735.9 283.4 747.4 240.2ZM712.8 391.5V425.3H746.6V847.5A357 357 0 0 0 753 948 70.1 70.1 0 0 0 779.3 985.8 89.1 89.1 0 0 0 831 999.4 89 89 0 0 0 882.7 985.8 69.7 69.7 0 0 0 908.9 948 356.8 356.8 0 0 0 915.4 847.5V425.3H949.1V391.6ZM780.2 425.3H881.7V560.4H780.3ZM464.5 611.6A46.1 46.1 0 0 1 433.7 669.3 45.5 45.5 0 0 1 416.8 671L398.3 713.8A65.5 65.5 0 0 1 419 780.9L461.3 804.7A45.3 45.3 0 0 1 476.3 796.7 46.3 46.3 0 1 1 445.4 854.4 45.3 45.3 0 0 1 444.2 833.8L402.6 810.4A66.5 66.5 0 0 1 373.6 828.7 67.5 67.5 0 0 1 289.6 783.9 66.7 66.7 0 0 1 289.3 746.5L260.3 730.2A45.3 45.3 0 0 1 242.9 740.3 46.2 46.2 0 1 1 273.6 682.6 45.3 45.3 0 0 1 275.3 700L306.3 717.5A64.3 64.3 0 0 1 368 698.9L386.4 656.5A45.3 45.3 0 0 1 375.9 638.7 48.8 48.8 0 0 1 418.7 579.7 43.1 43.1 0 0 1 464.5 611.8Z", + "width": 949 + }, + "search": [ + "lab-results" + ] + }, + { + "uid": "42b7a4fc84d097a747fb78e47ffc89b8", + "css": "health-summary-1", + "code": 59529, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M714.1 956.9H146.5A97 97 0 0 1 47.4 862.1V79.8A63 63 0 0 0 0 137.9V939.7A62.5 62.5 0 0 0 64.7 1000H652A63.3 63.3 0 0 0 714.1 956.9ZM714.1 956.9M799.6 862.1V435.3H312.3L312 462C312 462.3 312 461.2 312 463.4H519.4A17.2 17.2 0 1 1 519.4 497.9H310.1A32.1 32.1 0 0 1 287.8 487.8 38 38 0 0 1 277.5 461.2L277.7 435.4H241.3A16.9 16.9 0 0 1 224.1 418.5V416H172.3A17.2 17.2 0 0 1 155.1 398.9L154.5 324A17.8 17.8 0 0 1 171.8 306.2H171.8L224 307.2V304.9A18 18 0 0 1 241.2 286.6H799.6V209.1H653.6A56.2 56.2 0 0 1 597 152.5V0H146.4A63.1 63.1 0 0 0 81.4 58.1 16.8 16.8 0 0 1 81.9 60.3C81.9 61.2 81.9 62.1 81.9 63V862.1A62.6 62.6 0 0 0 146.4 922.4H733.8A63.6 63.6 0 0 0 799.6 862.1ZM172.5 543.1H456A17.2 17.2 0 1 1 456 577.6H172.5A17.2 17.2 0 0 1 172.5 543.1ZM665.8 829.7H172.5A17.2 17.2 0 0 1 172.5 795.2H665.8A17.2 17.2 0 0 1 665.8 829.7ZM665.8 745.6H172.5A17.2 17.2 0 0 1 172.5 711.2H665.8A17.2 17.2 0 1 1 665.8 745.6ZM665.8 661.6H172.5A17.2 17.2 0 0 1 172.5 627.1H665.8A17.2 17.2 0 1 1 665.8 661.6ZM665.8 661.6M773.5 174.6L631.5 27.6V152.5A21.8 21.8 0 0 0 653.6 174.5ZM773.5 174.6M898.7 336.6V386.6L937.2 361.6ZM898.7 336.6M258.6 321.1H864.2V400.9H258.6ZM258.6 321.1M224.1 381.5V341.5L189.2 341.1 189.4 381.5ZM224.1 381.5", + "width": 937 + }, + "search": [ + "health-summary" + ] + }, + { + "uid": "cbf3ee4dea491660e9f9dd8d3db58b7d", + "css": "ecg-1", + "code": 59528, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M34.6 0H965.4A34.6 34.6 0 0 1 1000 34.6V464.3L698.3 464.3A35.7 35.7 0 0 0 665 487.3L598.8 660.6 433.1 226.5A35.5 35.5 0 0 0 399.8 203.5H399.8A35.5 35.5 0 0 0 366.4 226.4L275.4 464.5 0 464.3V34.6A34.6 34.6 0 0 1 34.6 0ZM965.4 1000A34.6 34.6 0 0 0 1000 965.4V535.7L722.9 535.7 632.2 773.5A35.7 35.7 0 0 1 565.4 773.5L399.7 339.3 333.4 512.8A35.7 35.7 0 0 1 300 535.8H300L0.2 535.8V965.4A34.6 34.6 0 0 0 34.8 1000H965.4Z", + "width": 1000 + }, + "search": [ + "ecg" + ] + }, + { + "uid": "72c30fde2a53eed52ca204cb3f2f3da5", + "css": "admission-req-1", + "code": 59525, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 1000H1101.9V598.3H0ZM518.7 689.9H583.2V762.6H655.9V827.1H583.2V899.8H518.7V827.1H445.9V762.6H518.6ZM64.5 458.4H1037.3V533.7H64.5ZM422.6 178C422.6 176.1 422.6 174.2 422.4 172.3H219.5C219.5 174.2 219.3 176.1 219.3 178A101.7 101.7 0 0 0 309.7 278.9H332.1A101.7 101.7 0 0 0 422.6 178ZM288.7 279H258.4A129.4 129.4 0 0 0 129.9 393.8H288.7V279ZM383.6 279H353.3V393.8H512.1A129.4 129.4 0 0 0 383.6 279ZM425.1 107.8L444.1 22.7A344.4 344.4 0 0 0 198.1 22.7L217 107.8ZM639.1 241.7H972.7V393.9H639.1Z", + "width": 1102 + }, + "search": [ + "admission-req" + ] + }, + { + "uid": "e323582b66d81cd517a4e1eb7bf1f399", + "css": "booked-1", + "code": 59526, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M907.9 1000H162.7A163.1 163.1 0 0 1 0 837.9V321.9H1070.7V837.9A163.1 163.1 0 0 1 907.9 1000.3ZM71.4 393.3V837.9A91.7 91.7 0 0 0 162.7 928.8H907.9A91.7 91.7 0 0 0 999.2 837.9V393.3ZM1070.7 393H0V235.7A163.1 163.1 0 0 1 162.7 72.1H907.9A163.1 163.1 0 0 1 1070.6 235.7ZM71.4 321.9H999.2V235.7A91.7 91.7 0 0 0 907.9 143.6H162.7A91.7 91.7 0 0 0 71.4 235.7ZM46.8 357.6V937.5H1017.1V357.6ZM356.9 717.3A35.7 35.7 0 1 1 392.6 681.6 35.7 35.7 0 0 1 356.9 717.3ZM535.3 717.3A35.7 35.7 0 1 1 571 681.6 35.7 35.7 0 0 1 535.3 717.3ZM713.8 717.3A35.7 35.7 0 1 1 749.4 681.6 35.7 35.7 0 0 1 713.8 717.3Z", + "width": 1071 + }, + "search": [ + "booked" + ] + }, + { + "uid": "17d952ce25a93720aba9a7695bd1d3eb", + "css": "walkin-1", + "code": 59524, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M271.2 118.6H305.1A50.4 50.4 0 0 0 334.2 164.4 101.6 101.6 0 1 0 254.2 203.4 100 100 0 0 0 307.5 188.3 85.2 85.2 0 0 1 271.2 118.6ZM168 639.4L135.6 779.7 33.9 932.2 118.6 1000 254.2 813.6 274.5 746.2 171.1 642.8C170 641.7 169.1 640.5 168 639.4ZM108.3 529.8A238 238 0 0 1 101.7 475.1V385L0 508.4 67.8 576.4ZM383.6 583.9L227.8 498.8 155.6 335.8 186.6 322 254.4 474.6 372.9 539.4 440.7 576.4 491.6 491.4 373 420.2V271.2A67.8 67.8 0 0 0 305.1 203.4H203.4A67.8 67.8 0 0 0 135.6 271.2V475.2A203.2 203.2 0 0 0 195.1 618.9L339.1 762.9 389.9 983.2H491.6L440.8 712Z", + "width": 492 + }, + "search": [ + "walkin" + ] + }, + { + "uid": "7a3477a769ec5811e772756dc57b7622", + "css": "vital-signs-1", + "code": 59523, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M0 532.1V608.1H205.7A689.9 689.9 0 0 1 145.8 532.1ZM1151 532.1A690.1 690.1 0 0 1 1091 608.1H1296.7V532.1ZM420.4 222L545.9 598.4 590 532.1H699L802.2 284.8 913.5 532.3H1151A366.1 366.1 0 0 0 1218.2 324.2 318.2 318.2 0 0 0 971.8 5C843.9-20.1 726.9 46.1 648.4 183.9 570 46.6 453.5-19.1 325.8 5.6A322.2 322.2 0 0 0 78.5 324.2 366.1 366.1 0 0 0 145.8 532H317.1ZM804.8 475.7L749.7 608.1H630.7L522.9 769.6 420.5 462.3 371.9 608.1H205.7A2720.4 2720.4 0 0 0 486.1 863C529.5 899.1 648.4 1000 648.4 1000S767.4 899.1 810.6 863A2720.7 2720.7 0 0 0 1091 608.1H864.5Z", + "width": 1297 + }, + "search": [ + "vital-signs" + ] + }, + { + "uid": "d3660bff417230e14b3ddaa868eee919", + "css": "ucaf-1", + "code": 59522, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M529.3 60V0H470.7V60C201.6 73.3 0 271.4 0 529.3V576.7L42.3 555.7A289.7 289.7 0 0 1 148.4 529.5 171.9 171.9 0 0 1 245.1 579.5L265.8 600 286.4 579.5A171.9 171.9 0 0 1 383.1 529.5 159.1 159.1 0 0 1 471 571.7V912.1A87.9 87.9 0 0 0 646.8 912.1V853.5H587.9V912.1A29.3 29.3 0 0 1 529.3 912.1V571.5A159.1 159.1 0 0 1 617.2 529.3 171.9 171.9 0 0 1 713.9 579.3L734.6 599.8 755.2 579.3A178.1 178.1 0 0 1 853.7 529.3 274.1 274.1 0 0 1 957.8 555.5L1000 576.7V529.3C1000 271.4 798.4 73.3 529.3 60Z", + "width": 1000 + }, + "search": [ + "ucaf" + ] + }, + { + "uid": "6a176d9d936657bf21eb9de1201f5a1c", + "css": "radiology-2", + "code": 59520, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1218.7 937.5H906.2V812.6C1109.3 812.6 1107.4 817.2 1119.6 798.6L1174 718.9A93.7 93.7 0 0 0 1185.6 537.8 187.5 187.5 0 0 0 1000 375H870.2A437.5 437.5 0 0 0 437.4 0C10.4 0-162.9 552.5 187.4 795.9V937.5H93.7A31.4 31.4 0 1 0 93.7 1000H1218.7A31.4 31.4 0 1 0 1218.7 937.5ZM159 476.2A281.3 281.3 0 0 1 679.3 294.1 273.1 273.1 0 0 1 710.7 375C637.5 375 655.7 403.1 648.2 376.9 653.8 393.8 651.3 384.7 635.4 398.7A125 125 0 0 0 423.9 531.3 93.8 93.8 0 0 0 428.5 718.8 281.3 281.3 0 0 1 159.2 476.3ZM1156.2 593.7A31.4 31.4 0 0 1 1177.7 647.1C1164.9 660.6 1218.7 656.2 437.4 656.2A31.4 31.4 0 0 1 415.9 602.8C428.4 589.4 377.4 593.8 1156.2 593.8ZM579.3 750L558.4 718.6H724A99.1 99.1 0 0 0 718.7 750ZM468.7 468.7A62.5 62.5 0 1 1 531.2 531.2 62.5 62.5 0 0 1 468.7 468.7ZM687.4 812.6H718.8V937.5H687.4ZM1076.8 750.1H906.2A93.7 93.7 0 0 0 900.9 718.7H1097.8ZM1120.8 531.3C667.7 531.3 693.7 534.4 677.7 523.8A46.6 46.6 0 0 1 669.9 451.3C687.4 431.6 689 437.6 999.9 437.6A125 125 0 0 1 1120.9 531.3ZM406.2 843.7H468.7V937.5H406.2Z", + "width": 1250 + }, + "search": [ + "radiology" + ] + }, + { + "uid": "0347a4fbc965dd15778a1025d6ec56a0", + "css": "progress-notes-2", + "code": 59519, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M400 266.7V33.4A33.4 33.4 0 0 1 466.6 33.4V266.7ZM300 933.3A99.3 99.3 0 0 1 229.3 904.1 1011.6 1011.6 0 0 1 0 550.5V966.6A33.4 33.4 0 0 0 33.4 1000H833.3A33.4 33.4 0 0 0 866.7 966.6V933.3ZM1128 809.7A885.7 885.7 0 0 1 866.6 189.5V166.6A33.4 33.4 0 0 0 833.3 133.3H533.3V300A33.4 33.4 0 0 1 500 333.3H366.6A33.4 33.4 0 0 1 333.3 300V133.3H33.4A33.4 33.4 0 0 0 0 166.7V189.6A943.4 943.4 0 0 0 276.4 856.9 33.4 33.4 0 0 0 300 866.7H1104.5A33.4 33.4 0 0 0 1128.1 809.8ZM433.3 400H700A33.4 33.4 0 0 1 700 466.6H433.3A33.4 33.4 0 0 1 433.3 400ZM700 733.3H366.7A33.4 33.4 0 0 1 366.7 666.6H700A33.4 33.4 0 0 1 700 733.3ZM766.7 600H300A33.4 33.4 0 1 1 300 533.3H766.7A33.4 33.4 0 1 1 766.7 600Z", + "width": 1138 + }, + "search": [ + "progress-notes" + ] + }, + { + "uid": "9ef83ec11b2967f90944d218ac5b94af", + "css": "patient-sick-leave-1", + "code": 59518, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M664.4 0H92.6A92.7 92.7 0 0 0 0 92.6V907.4A92.7 92.7 0 0 0 92.6 1000H664.3A92.7 92.7 0 0 0 756.9 907.4V92.6A92.7 92.7 0 0 0 664.4 0ZM118.7 167.8L176.4 68.5A20.8 20.8 0 1 1 212.4 89.3L173 157.2H587.9L556.4 87.4A20.8 20.8 0 1 1 594.4 70.1L639.1 169.5A20.8 20.8 0 0 1 620.1 198.9H136.8A20.8 20.8 0 0 1 118.7 167.8ZM644.6 608.6H492.4A20.8 20.8 0 0 1 472.7 594.7L458.3 554.1 423.7 813.6A20.8 20.8 0 0 1 403.7 831.6H403.1A20.8 20.8 0 0 1 382.7 814.7L312.5 452.1 266.5 606.1A20.8 20.8 0 0 1 246.6 621H112.3A20.8 20.8 0 1 1 112.3 579.5H231.1L296.8 358.9A20.8 20.8 0 0 1 337.2 360.9L399.1 681.8 428.4 463.2A20.8 20.8 0 0 1 446.8 445.3 21.3 21.3 0 0 1 468.7 459.1L507 567.1H644.5A20.8 20.8 0 1 1 644.5 608.6Z", + "width": 757 + }, + "search": [ + "patient-sick-leave" + ] + }, + { + "uid": "f7865ba708db3b174c76175ee117fc7c", + "css": "refer-patient-1", + "code": 59521, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M264.4 666.7L351.6 775.7 267.1 860.3 228.5 667.7C235.7 667.1 242.9 666.7 250.1 666.7ZM442.2 666.7L388.9 733.3 335.6 666.6ZM513.4 666.7H527.7C534.9 666.7 542.1 667.1 549.3 667.7L510.8 860.3 426.2 775.7ZM638.9 444.4H637.2A248 248 0 0 0 638.9 416.7V333.3A55.6 55.6 0 0 1 638.9 444.4ZM138.9 166.7A166.8 166.8 0 0 1 305.5 0H472.2A166.8 166.8 0 0 1 638.9 166.7V277.8H527.8A55.6 55.6 0 0 1 472.2 222.2V111.1H416.7V138.9A139 139 0 0 1 277.8 277.8H138.9ZM138.9 444.4A55.6 55.6 0 1 1 138.9 333.3V416.7A248 248 0 0 0 140.5 444.4ZM194.5 416.7V333.3H277.8A194.1 194.1 0 0 0 425.3 265.1 111.4 111.4 0 0 0 527.8 333.3H583.3V416.7A194.5 194.5 0 0 1 194.5 416.7ZM777.8 1000H0V916.6A250.4 250.4 0 0 1 174 678.5L222.9 922.1A27.8 27.8 0 0 0 242 943.2 28.4 28.4 0 0 0 250.1 944.4 27.8 27.8 0 0 0 269.7 936.3L389 817 508.2 936.3A27.8 27.8 0 0 0 554.9 922.1L603.9 678.5A250.5 250.5 0 0 1 777.8 916.6ZM943.7 123A22 22 0 0 1 965.7 101H1000.6L899.6 0 798.6 101H833.5A22 22 0 0 1 855.6 123 264.2 264.2 0 0 1 738 342.7 220.4 220.4 0 0 0 943.7 123Z", + "width": 1001 + }, + "search": [ + "refer-patient" + ] + }, + { + "uid": "7c6d81832f8802ae84362cefea6d9585", + "css": "order-procedures-1", + "code": 59517, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1040.4 721.4L997.6 778.4 1054.8 821.3H926A142.7 142.7 0 0 0 788.2 714.3H430.9A142.7 142.7 0 0 0 293.1 821.3H214.3A142.8 142.8 0 0 1 214.3 535.6H293.1A142.7 142.7 0 0 0 430.9 642.6H788.1A142.7 142.7 0 0 0 925.9 535.6H1004.8A214.3 214.3 0 1 0 1004.8 107H926A142.7 142.7 0 0 0 788.1 0H430.9A142.7 142.7 0 0 0 293.1 107H261.9L128.6 7.2 85.7 64.3 142.8 107H0V178.6H142.8L85.7 221.4 128.6 278.6 261.9 178.6H293.2A142.7 142.7 0 0 0 431 285.5H788.1A142.7 142.7 0 0 0 926 178.6H1004.9A142.8 142.8 0 1 1 1004.9 464.3H926A142.7 142.7 0 0 0 788.2 357.3H430.9A142.7 142.7 0 0 0 293.1 464.3H214.3A214.3 214.3 0 1 0 214.3 892.8H293.1A142.7 142.7 0 0 0 430.9 999.8H788.1A142.7 142.7 0 0 0 926 892.8H1054.9L997.7 935.7 1040.4 992.8 1218.9 857.2ZM1040.4 721.4", + "width": 1219 + }, + "search": [ + "order-procedures" + ] + }, + { + "uid": "fc33e99d336b9a8766b950e84d6bd2d0", + "css": "order-prescription-1", + "code": 59516, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M596.3 192.4A28.8 28.8 0 0 0 588.5 172.7L434.6 9.1A28.9 28.9 0 0 0 413.6 0H404V202H596.3ZM596.3 192.4M567.2 567.5A164.8 164.8 0 0 1 596.3 570.1V259.7H375.1A28.9 28.9 0 0 1 346.3 230.8V0H28.9A28.9 28.9 0 0 0 0 28.9V769.5A28.9 28.9 0 0 0 28.9 798.3H271.5A163.6 163.6 0 0 1 288.4 778.6L451.6 615.5A162.4 162.4 0 0 1 567.2 567.5ZM240.4 336.6H269.3V307.8A28.9 28.9 0 1 1 327 307.8V336.6H355.9A28.9 28.9 0 1 1 355.9 394.3H327V423.2A28.9 28.9 0 0 1 269.3 423.2V394.3H240.4A28.9 28.9 0 0 1 240.4 336.6ZM144.3 509.8H452A28.9 28.9 0 1 1 452 567.5H144.3A28.9 28.9 0 0 1 144.3 509.8ZM336.6 682.9H144.3A28.9 28.9 0 1 1 144.3 625.2H336.6A28.9 28.9 0 1 1 336.6 682.9ZM336.6 682.9M329.1 819.4A105.8 105.8 0 1 0 478.8 969L540 907.8 390.4 758.1ZM329.1 819.4M642 656.2A105.8 105.8 0 0 0 492.4 656.2L431.2 717.4 580.8 867 642 805.8A105.9 105.9 0 0 0 642 656.2ZM642 656.2", + "width": 673 + }, + "search": [ + "order-prescription" + ] + }, + { + "uid": "3c62b35ba91d956be23daa4542e78fd1", + "css": "modify-episode-1", + "code": 59515, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M825.8 83.3A125 125 0 0 0 708.3 0H125A125.4 125.4 0 0 0 0 125V708.3A125 125 0 0 0 83.3 825.8V291.7A208.3 208.3 0 0 1 291.7 83.3ZM875 1000H291.7A125.8 125.8 0 0 1 166.7 875V291.6A125.7 125.7 0 0 1 291.7 166.6H875A125.7 125.7 0 0 1 1000 291.6V875A125.7 125.7 0 0 1 875 1000ZM650.9 428.6H650.9L370.5 709A21.9 21.9 0 0 0 365.1 717.8L333.1 813A22.3 22.3 0 0 0 338.6 836 22.6 22.6 0 0 0 354.6 842.5 21.4 21.4 0 0 0 361.7 841.4L456.9 809.7A22.5 22.5 0 0 0 465.6 804.3L746 523.8 650.8 428.6ZM746.2 349A37.4 37.4 0 0 0 719.7 359.9L682.7 397 777.9 492.1 814.9 455.1A37.1 37.1 0 0 0 825.9 428.6 36.8 36.8 0 0 0 814.9 402.2L772.6 359.8A37.4 37.4 0 0 0 746.1 349.1Z", + "width": 1000 + }, + "search": [ + "modify-episode" + ] + }, + { + "uid": "d905b0ec32bad6997ccde356f970af67", + "css": "livecare-1", + "code": 59514, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M359.7 999.9H201.4A198.3 198.3 0 0 1 123.3 984 203.2 203.2 0 0 1 16.1 877 197.1 197.1 0 0 1 0.2 799.1V200.7A197.7 197.7 0 0 1 16.1 122.7 203 203 0 0 1 123.2 15.8 197.7 197.7 0 0 1 201 0H943.2A197.7 197.7 0 0 1 1021.2 15.9 202.9 202.9 0 0 1 1128.1 123 197.7 197.7 0 0 1 1143.3 200.8V348.4A165.5 165.5 0 0 0 1143.3 658.1V798.8A198.3 198.3 0 0 1 1127.7 876.9 202.3 202.3 0 0 1 1020.9 984.1 197.7 197.7 0 0 1 943 1000H769.8A523.4 523.4 0 0 0 826.4 943.9 52.2 52.2 0 0 0 837.9 902.6 762.6 762.6 0 0 0 945.5 700.1 735.6 735.6 0 0 0 974.8 593.4 534.2 534.2 0 0 0 985 493.3 353.7 353.7 0 0 0 969.2 377.4 151.4 151.4 0 0 0 923.5 309.3 216.9 216.9 0 0 0 851 271.4C822.4 261.7 789.4 254.2 754.4 246.2H754.4L754.4 246.2A54 54 0 0 0 706.1 215.5 54.9 54.9 0 1 0 706.1 325.4 52.7 52.7 0 0 0 738.4 313.3L739.7 313.7H739.7L740.6 313.7C775.5 321.8 803.1 328.4 826 335.7A149.3 149.3 0 0 1 880.4 363.5 93 93 0 0 1 908.6 411.4 320 320 0 0 1 916.7 493.8 460.9 460.9 0 0 1 907.2 582.5 666.4 666.4 0 0 1 880.5 677.7 743.1 743.1 0 0 1 838.7 772.4 656 656 0 0 1 784.3 859 52.4 52.4 0 0 0 748.2 876.5 370.9 370.9 0 0 1 670.2 946.2 179.5 179.5 0 0 1 459.8 946.2 368 368 0 0 1 381.8 876.9 52.4 52.4 0 0 0 345.7 859.4 659.1 659.1 0 0 1 291.2 772.5 747 747 0 0 1 249.4 677.3 664.2 664.2 0 0 1 222.6 582.1 463.2 463.2 0 0 1 213.1 493.3 323.7 323.7 0 0 1 221.1 410.8 92.7 92.7 0 0 1 249.2 362.9 148.8 148.8 0 0 1 303.6 335.1C326.8 327.8 355.9 321 389.6 313.1L390.3 313.1H390.3L390.8 312.7A54.1 54.1 0 0 0 423.8 324.9 54.8 54.8 0 1 0 423.8 215 53.1 53.1 0 0 0 394.5 223.7 59.5 59.5 0 0 0 374.6 245.6H374.6L373.9 245.6C230.3 278.8 143.6 298.8 143.6 492.9A534.1 534.1 0 0 0 153.9 593.2 737.8 737.8 0 0 0 183.2 700 757.5 757.5 0 0 0 291.6 902.9 52 52 0 0 0 303.2 944.1 529.8 529.8 0 0 0 359.1 999.6H359.1ZM1787.8 895.3H1706.6A70 70 0 0 1 1669.9 884.8L1332 671.5A33.4 33.4 0 0 1 1316.4 643.4V622.6A165.3 165.3 0 0 0 1316.4 384.5V347A33.4 33.4 0 0 1 1332 318.9L1669.9 105.6A66.9 66.9 0 0 1 1706.6 95.1H1787.8A33.5 33.5 0 0 1 1821.5 128.2V862.6A32.9 32.9 0 0 1 1811.7 886 33.5 33.5 0 0 1 1787.9 895.7ZM467.9 673.5H485.2L539.5 673.5C546 673.5 551.4 666.6 551.7 656.7V611.6C551.7 601.9 556 594.4 562.7 593.9L579.3 593.9C586.1 594.4 590.7 602 590.7 611.6V656.8C590.7 666.8 595.5 673.2 602.1 673.2L675.3 673.2 675.3 617.1C675.3 607.5 670.7 600 663.9 599.6L634.6 599.6C628.1 599.6 623.1 592.7 622.8 582.7L622.8 567.6C622.8 557.6 628.2 550.8 634.7 550.8H664C670.7 550.3 675.1 542.4 675.1 532.8V463.3A29.8 29.8 0 0 1 652.4 477.4H602.8C596.3 477.4 590.9 484.7 590.6 494.4V539.7C590.6 549.6 585.3 556.6 578.8 556.6L564.1 556.6C557.6 556.6 552.4 549.8 552.1 539.9V494C552.1 484.1 546.7 477.4 540.2 477.4H468.1V533.3C468.1 543 472.6 550.6 479.4 551.2L508.7 551.2C515.3 551.6 520.1 559.6 520.1 569.2V582.1C520.1 591.8 515.6 599.5 508.8 599.9H479.5C472.8 600.4 468.3 608.1 468.3 617.6ZM716 459.1V693.1A29.7 29.7 0 0 1 686 721.3H455.4A29.3 29.3 0 0 1 425.6 693.1V459.1A29.7 29.7 0 0 1 455.4 430.5H685.9A30.2 30.2 0 0 1 716 459.1ZM468.1 673.5H485.5L539.7 673.5C546.2 673.5 551.6 666.6 551.9 656.7V611.6C551.9 601.9 556.2 594.4 562.9 593.9L579.6 593.9C586.2 594.4 590.8 602 590.8 611.6V657.2C590.8 667.2 595.7 673.6 602.2 673.6L675.4 673.6 675.4 617.5C675.4 607.8 670.8 600.4 664.1 599.9L634.8 599.9C628.3 599.9 623.2 593 622.9 583.1L622.9 567.9C622.9 558 628.3 551.2 634.9 551.2H664.2C670.9 550.7 675.2 542.8 675.2 533.2V463.3A29.8 29.8 0 0 1 652.6 477.4H602.9C596.5 477.4 591.1 484.7 590.8 494.4V539.4C590.8 549.3 585.4 556.3 578.9 556.3L563.9 556.3C557.4 556.3 552.2 549.5 551.9 539.6V494.2C551.9 484.2 546.5 477.6 539.9 477.6H468.1V533.4C468.1 543.1 472.6 550.8 479.4 551.3L508.7 551.3C515.3 551.7 520.1 559.7 520.1 569.3V582.3C520.1 591.9 515.6 599.6 508.8 600.1H479.5C472.8 600.5 468.3 608.2 468.3 617.8ZM1202.1 400.4A96.2 96.2 0 1 1 1106 496.6H1106A96.2 96.2 0 0 1 1202.1 400.4Z", + "width": 1821 + }, + "search": [ + "livecare" + ] + }, + { + "uid": "18574a405555b8e83d46a43a1e755ea7", + "css": "logout-1", + "code": 59513, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 0A500 500 0 1 0 1000 500 500.5 500.5 0 0 0 500 0ZM470.7 167.9A29.3 29.3 0 1 1 529.3 167.9V402.3A29.3 29.3 0 0 1 470.7 402.3ZM500 822.3A322.2 322.2 0 0 1 371.2 204.7 29.3 29.3 0 0 1 394.7 258.4 263.7 263.7 0 1 0 605.6 258.4 29.3 29.3 0 0 1 629.1 204.8 322.2 322.2 0 0 1 500 822.3Z", + "width": 1000 + }, + "search": [ + "logout" + ] + }, + { + "uid": "540c904ee995ff64cca5493caae9c2db", + "css": "reschedule--1", + "code": 59512, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M484.5 67.2L7.6 3.6A17.9 17.9 0 0 0 0 17.9V920.2A17.9 17.9 0 0 0 15.5 937.9L479.8 999.8A17.9 17.9 0 0 0 493.8 995.7 17.5 17.5 0 0 0 500 982.3V84.9A17.9 17.9 0 0 0 484.5 67.2ZM423.3 512.6L369.7 566.3A17.9 17.9 0 0 1 344.4 541L367.5 518H89.3A17.9 17.9 0 1 1 89.3 482.3H367.6L344.5 459.2A17.9 17.9 0 0 1 369.8 433.9L423.5 487.6A17.9 17.9 0 0 1 423.5 512.8ZM535.7 201.4A336 336 0 0 1 643 165V17.9A17.9 17.9 0 0 0 625.2 0H251.5L489.4 31.7A53.7 53.7 0 0 1 535.9 84.9V201.4ZM535.7 928.5H625A17.9 17.9 0 0 0 642.9 910.6V834.8A336 336 0 0 1 535.5 798.4ZM696.4 196.4A301.3 301.3 0 0 0 535.7 242.9V286.2A267.5 267.5 0 1 1 831.7 730.9C831.2 731.2 830.9 731.7 830.4 732A13.8 13.8 0 0 1 828.6 732.7 266.1 266.1 0 0 1 535.7 713.9V757.2A303.5 303.5 0 1 0 696.4 196.4ZM598.2 329.9A17.9 17.9 0 0 1 573.8 323.3L565.3 308.5A234.4 234.4 0 0 0 535.7 332.9V667.1A234.5 234.5 0 0 0 565.3 691.5L573.8 676.7A17.9 17.9 0 1 1 604.8 694.5L596.3 709.2A229.9 229.9 0 0 0 678.6 731.3V714.3A17.9 17.9 0 1 1 714.3 714.3V731.2A229.9 229.9 0 0 0 796.6 709.1L788.3 694.5A17.9 17.9 0 1 1 819.2 676.6L827.7 691.4A233.9 233.9 0 0 0 888 631.1L873.3 622.6A17.9 17.9 0 1 1 891.2 591.7L905.8 599.9A229.7 229.7 0 0 0 927.9 517.7H910.9A17.9 17.9 0 0 1 910.9 482H927.8A229.7 229.7 0 0 0 905.7 399.7L891.1 408A17.9 17.9 0 1 1 873.2 377.1L887.9 368.6A233.9 233.9 0 0 0 827.7 308.3L819.2 323A17.9 17.9 0 1 1 788.2 305.1L796.5 290.5A229.8 229.8 0 0 0 714.2 268.4V285.4A17.9 17.9 0 1 1 678.5 285.4V268.4A229.9 229.9 0 0 0 596.2 290.4L604.7 305.1A17.9 17.9 0 0 1 598.2 329.9ZM678.6 449.6V374.9A17.9 17.9 0 0 1 714.3 374.9V449.6A53.7 53.7 0 0 1 746.8 482H785.8A17.9 17.9 0 1 1 785.8 517.7H746.8A53.5 53.5 0 1 1 678.7 449.6Z", + "width": 1000 + }, + "search": [ + "reschedule-" + ] + }, + { + "uid": "973fdf63aeccbd095872d42af142b109", + "css": "dr-reply-active-1", + "code": 59552, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1023.2 547.7H1029.4A86.7 86.7 0 0 1 1162.4 438.2L1200.4 476.2V101.1A101.2 101.2 0 0 0 1099.2 0H101.2A101.2 101.2 0 0 0 0 101.1V799A101.2 101.2 0 0 0 101.2 900.2H798.6A247.7 247.7 0 0 1 1023.1 547.8ZM251.2 136.3H949.2L600.1 392.2ZM1266.6 603.7L1131.7 468.8A43.4 43.4 0 1 0 1070.5 529.9L1131.5 590.9H1023.1A204.5 204.5 0 0 0 1023.1 999.9 43.4 43.4 0 1 0 1023.1 913.2 117.9 117.9 0 0 1 1023.1 677.1H1131.5L1070.5 738A43.4 43.4 0 0 0 1131.7 799.2L1266.6 664.3A43.4 43.4 0 0 0 1266.6 603.1Z", + "width": 1279 + }, + "search": [ + "dr-reply-active" + ] + }, + { + "uid": "796f61b873eb713c3cb184c49e70853f", + "css": "home-1", + "code": 59553, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1066.3 519.6A79.1 79.1 0 0 1 991.7 571.5H964.4V964.3A35.7 35.7 0 0 1 928.7 1000H714.4V750A178.6 178.6 0 0 0 357.2 750V1000H142.9A35.7 35.7 0 0 1 107.2 964.3V571.5H79.9A80 80 0 0 1 27.4 431.5L444.5 36.3A132.8 132.8 0 0 1 627.1 36.3L1045.2 432.3A78.7 78.7 0 0 1 1066.3 519.6Z", + "width": 1072 + }, + "search": [ + "home" + ] + }, + { + "uid": "897422687ecd85c646013dbd38e16548", + "css": "home-active-1", + "code": 59554, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1066.3 519.6A79.1 79.1 0 0 1 991.7 571.5H964.4V964.3A35.7 35.7 0 0 1 928.7 1000H714.4V750A178.6 178.6 0 0 0 357.2 750V1000H142.9A35.7 35.7 0 0 1 107.2 964.3V571.5H79.9A80 80 0 0 1 27.4 431.5L444.5 36.3A132.8 132.8 0 0 1 627.1 36.3L1045.2 432.3A78.7 78.7 0 0 1 1066.3 519.6Z", + "width": 1072 + }, + "search": [ + "home-active" + ] + }, + { + "uid": "5ca2a97037189bebb49149bf4e66c560", + "css": "view-1", + "code": 59536, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M776.8 250A250 250 0 1 0 1026.8 500 250.2 250.2 0 0 0 776.8 250ZM757.8 425.9A57.4 57.4 0 0 0 700.9 482.8H618.1A141.3 141.3 0 0 1 757.8 343.1ZM1535.4 448.3C1450.9 343.1 1149.2-0.1 776.8-0.1S102.6 342.9 18.1 448.3A82.9 82.9 0 0 0 18.1 551.8C102.6 657 404.3 1000.1 776.8 1000.1S1450.9 657 1535.4 551.8A82.9 82.9 0 0 0 1535.4 448.3ZM776.8 862.1A362 362 0 1 1 1138.8 500 362 362 0 0 1 776.8 862.1Z", + "width": 1553 + }, + "search": [ + "view" + ] + }, + { + "uid": "e7141300a3db6362879b519165a6692a", + "css": "warning-1", + "code": 59537, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1165.9 890.7L649.9 34.8A72.1 72.1 0 0 0 526.5 34.8L10.4 890.7A72.1 72.1 0 0 0 72.1 1000H1104.2A72.1 72.1 0 0 0 1165.9 890.7ZM588.5 296.1A48.8 48.8 0 0 1 643.3 342.4C643.3 432.8 632.7 562.8 632.7 653.2 632.7 676.8 606.8 686.9 588.6 686.9 564.3 686.9 543.7 677 543.7 653.2 543.7 562.8 533.1 432.8 533.1 342.4 533.1 312.8 557.3 296.1 588.5 296.1ZM589.3 856.1A58.5 58.5 0 1 1 647.1 797.6 59.4 59.4 0 0 1 589.3 856.1Z", + "width": 1176 + }, + "search": [ + "warning" + ] + }, + { + "uid": "57ebf92cfa756dbc36d62f99da7427c8", + "css": "add-1", + "code": 59538, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M769.7 0H230.3A230.9 230.9 0 0 0 0 230.3V769.7A230.9 230.9 0 0 0 230.3 1000H769.7A230.9 230.9 0 0 0 1000 769.7V230.3A230.9 230.9 0 0 0 769.7 0ZM705.2 543.1H553.6A8.8 8.8 0 0 0 544.8 551.9V704A44.7 44.7 0 0 1 455.4 704V552A8.8 8.8 0 0 0 446.6 543.2H294.7A44.7 44.7 0 0 1 294.7 453.8H446.4A8.8 8.8 0 0 0 455.2 445V293.1A44.7 44.7 0 1 1 544.6 293.1V444.9A8.8 8.8 0 0 0 553.4 453.9H705.2A44.7 44.7 0 1 1 705.2 543.3Z", + "width": 1000 + }, + "search": [ + "add" + ] + }, + { + "uid": "701ccc7879b5b7e2395223f67ee3fed6", + "css": "arrow-forward-1", + "code": 59539, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1357 455.8L919.2 18.3A62.5 62.5 0 1 0 830.8 106.7L1161.6 437.6H62.5A62.5 62.5 0 1 0 62.5 562.6H1161.7L830.9 893.4A62.5 62.5 0 1 0 919.3 981.8L1357 544.2A62.5 62.5 0 0 0 1357 455.8Z", + "width": 1375 + }, + "search": [ + "arrow-forward" + ] + }, + { + "uid": "fd40af0f29902301b193447a13ab5659", + "css": "back-1", + "code": 59540, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M14.6 535.8L464.3 985.3A50.5 50.5 0 1 0 535.8 914L121.8 500.1 535.8 86.2A50.5 50.5 0 0 0 464.3 14.7L14.6 464.3A51 51 0 0 0 14.6 535.8Z", + "width": 551 + }, + "search": [ + "back" + ] + }, + { + "uid": "baed05d36f0b6e141e441451248ebbe4", + "css": "close-1", + "code": 59541, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M591.6 500L981.2 110.4A64.8 64.8 0 1 0 889.4 19L499.8 408.6 110.2 19A64.8 64.8 0 0 0 19 110.6L408.6 500.2 19 889.8A64.8 64.8 0 1 0 110.6 981.4L500.2 591.8 889.8 981.4A64.8 64.8 0 1 0 981.4 889.8ZM591.6 500", + "width": 1000 + }, + "search": [ + "close" + ] + }, + { + "uid": "b5a7f641f7cea4777506552ec8be6ad6", + "css": "edit-1", + "code": 59542, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M571.4 635.7A88.7 88.7 0 0 1 537 657L412.7 698.4A87.7 87.7 0 0 1 384.9 702.9H384.9A87.9 87.9 0 0 1 301.5 587.2L342.9 462.9A88.3 88.3 0 0 1 364.1 428.6L632.7 160.1H107.4A107.5 107.5 0 0 0 0 267.6V892.6A107.5 107.5 0 0 0 107.4 999.8H732.4A107.5 107.5 0 0 0 839.9 892.4V367.3ZM405.7 469.9A29.3 29.3 0 0 0 398.6 481.4L357.2 605.7A29.3 29.3 0 0 0 394.2 642.7L518.5 601.3A29.3 29.3 0 0 0 530 594.2L895.9 228.2 771.7 103.9ZM930.5 14.3A48.8 48.8 0 0 0 861.4 14.3L813.1 62.6 937.4 186.9 985.7 138.6A48.8 48.8 0 0 0 985.7 69.5Z", + "width": 1000 + }, + "search": [ + "edit" + ] + }, + { + "uid": "c70dff422511b1412c9cb64f63d8c659", + "css": "external-link-1", + "code": 59543, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M945 55A180.6 180.6 0 0 0 812.5 0H187.5A180.6 180.6 0 0 0 55 55 180.6 180.6 0 0 0-0.2 187.5V812.5A180.7 180.7 0 0 0 54.9 945 180.6 180.6 0 0 0 187.4 1000.1H812.5A187.9 187.9 0 0 0 1000 812.5V187.5A180.7 180.7 0 0 0 945 55ZM833.4 520.8A39 39 0 0 1 808 559.2 45.3 45.3 0 0 1 791.7 562.5 38.7 38.7 0 0 1 762.6 550.3L668.6 456.4 321 804A40.9 40.9 0 0 1 262.4 804L196 737.6A40.9 40.9 0 0 1 196 679.1L543.6 331.4 449.9 237.6A37.6 37.6 0 0 1 440.8 192.1 39 39 0 0 1 479.3 166.7H791.8A42.2 42.2 0 0 1 833.5 208.3V520.8Z", + "width": 1000 + }, + "search": [ + "external-link" + ] + }, + { + "uid": "4d39d4d5f8ce4a22a6541b02dd4c63df", + "css": "verify-finger-1", + "code": 59544, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M891.9 0H108.1A108.2 108.2 0 0 0 0 108.1V891.9A108.2 108.2 0 0 0 108.1 1000H891.9A108.2 108.2 0 0 0 1000 891.9V108.1A108.2 108.2 0 0 0 891.9 0ZM185.9 192.6C393.8 41.7 612.9 43.3 817.7 195.2A29.3 29.3 0 0 1 800.1 248.1C766.9 248.1 540.5 7.4 220.2 240A29.3 29.3 0 0 1 185.7 192.6ZM459 946A29.3 29.3 0 0 1 418.2 938.6C377.1 878.9 283.2 812.1 283.2 687.5A225.3 225.3 0 0 1 500 454.9 225.3 225.3 0 0 1 716.8 687.5V718.9A29.3 29.3 0 0 1 658.2 718.9V687.6A166.8 166.8 0 0 0 500 513.8 166.8 166.8 0 0 0 341.8 687.5C341.8 828.8 521.5 902.7 459 946ZM823.1 794.4A153.5 153.5 0 0 1 533.2 718.9C533.2 592.6 446.8 635.1 465.9 711.8A29.3 29.3 0 0 1 409.1 725.9C369.2 566.3 591.8 501.6 591.8 718.9A94.5 94.5 0 0 0 665.2 816.5C800.8 848.5 841 624.8 705.8 480.7 518.8 281.3 216.8 435 216.8 671.9A237 237 0 0 0 258.2 826.8 29.3 29.3 0 0 1 210.6 860.8 298.5 298.5 0 0 1 158.2 671.9 347.5 347.5 0 0 1 500.1 330.1C752.9 330.1 913.6 613.5 823.1 794.3ZM842.7 431.8A29.3 29.3 0 0 1 802.7 420.9C744.4 318.7 603.2 263.8 500 263.8A419.4 419.4 0 0 0 196.2 422.6 29.3 29.3 0 0 1 147.5 390.1 474.9 474.9 0 0 1 499.9 205.2C716.9 205.2 910.7 392.8 842.5 431.8Z", + "width": 1000 + }, + "search": [ + "verify-finger" + ] + }, + { + "uid": "74c58b33ed0f729dac0b04e0f633144b", + "css": "verify-sms-1", + "code": 59545, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H100A100.3 100.3 0 0 0 0 100V1000L200 800H900A100.3 100.3 0 0 0 1000 700V100A100.3 100.3 0 0 0 900 0ZM350 450H250V350H350ZM550 450H450V350H550ZM750 450H650V350H750Z", + "width": 1000 + }, + "search": [ + "verify-sms" + ] + }, + { + "uid": "0e20d240c0f8396c7076464e122f8e1b", + "css": "verify-face-1", + "code": 59546, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M724.2 694.2L587.6 666.9A31.2 31.2 0 0 1 562.5 636.3V604.9A369.6 369.6 0 0 0 588.7 558.3 267.2 267.2 0 0 1 609.9 520.3 201.7 201.7 0 0 0 673.3 420.4 93.1 93.1 0 0 0 664.2 347 551.6 551.6 0 0 0 653.6 220.2 137.4 137.4 0 0 0 621.1 119.6 96.5 96.5 0 0 0 563.1 95.2 96.8 96.8 0 0 1 541.9 90.3 218.8 218.8 0 0 0 436.3 62.5 245.8 245.8 0 0 0 218.7 212 367.2 367.2 0 0 0 210.1 325.2L209.3 347.1A99.4 99.4 0 0 0 201.4 420.4 201.2 201.2 0 0 0 264.7 520.4 275.4 275.4 0 0 1 286.2 558.3 379.2 379.2 0 0 0 312.6 604.9V636.2A31.4 31.4 0 0 1 287.5 666.9L150.8 694.2A188.1 188.1 0 0 0 0 878.1V937.5A62.6 62.6 0 0 0 62.5 1000.2H812.5A62.5 62.5 0 0 0 875 937.7V878.1A188.2 188.2 0 0 0 724.2 694.2ZM156.3 0H31.3A31.3 31.3 0 0 0 0 31.3V218.8A31.3 31.3 0 0 0 62.5 218.8V62.5H156.3A31.3 31.3 0 0 0 156.3 0ZM156.3 562.5H62.5V406.2A31.3 31.3 0 0 0 0 406.2V593.7A31.3 31.3 0 0 0 31.3 625H156.3A31.3 31.3 0 1 0 156.3 562.5ZM843.8 0H718.8A31.3 31.3 0 0 0 718.8 62.5H812.5V218.8A31.3 31.3 0 0 0 875 218.8V31.3A31.3 31.3 0 0 0 843.8 0ZM843.8 375A31.3 31.3 0 0 0 812.5 406.2V562.5H718.7A31.3 31.3 0 0 0 718.7 625H843.7A31.3 31.3 0 0 0 875 593.7V406.2A31.3 31.3 0 0 0 843.8 375Z", + "width": 875 + }, + "search": [ + "verify-face" + ] + }, + { + "uid": "6087d36029eda9021846e21ed70401ad", + "css": "qr-reader-active-1", + "code": 59548, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M50 400A50 50 0 0 0 100 350V150A50 50 0 0 1 150 100H350A50 50 0 1 0 350 0H150A150 150 0 0 0 0 150V350A50 50 0 0 0 50 400ZM850 0H650A50 50 0 0 0 650 100H850A50 50 0 0 1 900 150V350A50 50 0 1 0 1000 350V150A150 150 0 0 0 850 0ZM950 600A50 50 0 0 0 900 650V850A50 50 0 0 1 850 900H650A50 50 0 0 0 650 1000H850A150 150 0 0 0 1000 850V650A50 50 0 0 0 950 600ZM350 900H150A50 50 0 0 1 100 850V650A50 50 0 0 0 0 650V850A150 150 0 0 0 150 1000H350A50 50 0 1 0 350 900Z", + "width": 1000 + }, + "search": [ + "qr-reader-active" + ] + }, + { + "uid": "5131f993095debb39e88eddafbe54f5a", + "css": "qr-reader-1", + "code": 59547, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M50 400A50 50 0 0 0 100 350V150A50 50 0 0 1 150 100H350A50 50 0 1 0 350 0H150A150 150 0 0 0 0 150V350A50 50 0 0 0 50 400ZM850 0H650A50 50 0 0 0 650 100H850A50 50 0 0 1 900 150V350A50 50 0 1 0 1000 350V150A150 150 0 0 0 850 0ZM950 600A50 50 0 0 0 900 650V850A50 50 0 0 1 850 900H650A50 50 0 0 0 650 1000H850A150 150 0 0 0 1000 850V650A50 50 0 0 0 950 600ZM350 900H150A50 50 0 0 1 100 850V650A50 50 0 0 0 0 650V850A150 150 0 0 0 150 1000H350A50 50 0 1 0 350 900Z", + "width": 1000 + }, + "search": [ + "qr-reader" + ] + }, + { + "uid": "90a143d3da24d4bddb6eefb8cb5036dc", + "css": "schedule-1", + "code": 59549, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H99.9A100.3 100.3 0 0 0 0 99.9V900A100.3 100.3 0 0 0 99.9 999.8H900A100.3 100.3 0 0 0 999.8 900V99.9A100.3 100.3 0 0 0 900 0ZM269.9 880H116.7V743.8H269.9V880ZM269.9 698.1H116.7V561.9H269.9V698.1ZM258.3 151.6A42.5 42.5 0 1 1 300.8 109.1 42.4 42.4 0 0 1 258.3 151.6ZM474.3 880H321.1V743.8H474.3ZM474.3 698.1H321.1V561.9H474.3ZM474.3 516.3H321.1V380H474.3ZM457.6 109.1A42.4 42.4 0 1 1 500 151.5 42.4 42.4 0 0 1 457.6 109.1ZM678.9 698.1H525.6V561.9H679.1V698.1ZM678.9 516.3H525.6V380H679.1V516.3ZM699 109.1A42.4 42.4 0 1 1 741.5 151.5 42.4 42.4 0 0 1 699 109.1ZM883.2 698.1H730.1V561.9H883.3ZM883.2 516.3H730.1V380H883.3Z", + "width": 1000 + }, + "search": [ + "schedule" + ] + }, + { + "uid": "9cd17bfbecffdbb2c87645848f62a267", + "css": "dr-reply-1", + "code": 59551, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1023.2 547.7H1029.4A86.7 86.7 0 0 1 1162.4 438.2L1200.4 476.2V101.1A101.2 101.2 0 0 0 1099.2 0H101.2A101.2 101.2 0 0 0 0 101.1V799A101.2 101.2 0 0 0 101.2 900.2H798.6A247.7 247.7 0 0 1 1023.1 547.8ZM251.2 136.3H949.2L600.1 392.2ZM1266.6 603.7L1131.7 468.8A43.4 43.4 0 1 0 1070.5 529.9L1131.5 590.9H1023.1A204.5 204.5 0 0 0 1023.1 999.9 43.4 43.4 0 1 0 1023.1 913.2 117.9 117.9 0 0 1 1023.1 677.1H1131.5L1070.5 738A43.4 43.4 0 0 0 1131.7 799.2L1266.6 664.3A43.4 43.4 0 0 0 1266.6 603.1Z", + "width": 1279 + }, + "search": [ + "dr-reply" + ] + }, + { + "uid": "3841d430a51b3781fd60835bb120fd57", + "css": "schedule-active-1", + "code": 59550, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M900 0H99.9A100.3 100.3 0 0 0 0 99.9V900A100.3 100.3 0 0 0 99.9 999.8H900A100.3 100.3 0 0 0 999.8 900V99.9A100.3 100.3 0 0 0 900 0ZM269.9 880H116.7V743.8H269.9V880ZM269.9 698.1H116.7V561.9H269.9V698.1ZM258.3 151.6A42.5 42.5 0 1 1 300.8 109.1 42.4 42.4 0 0 1 258.3 151.6ZM474.3 880H321.1V743.8H474.3ZM474.3 698.1H321.1V561.9H474.3ZM474.3 516.3H321.1V380H474.3ZM457.6 109.1A42.4 42.4 0 1 1 500 151.5 42.4 42.4 0 0 1 457.6 109.1ZM678.9 698.1H525.6V561.9H679.1V698.1ZM678.9 516.3H525.6V380H679.1V516.3ZM699 109.1A42.4 42.4 0 1 1 741.5 151.5 42.4 42.4 0 0 1 699 109.1ZM883.2 698.1H730.1V561.9H883.3ZM883.2 516.3H730.1V380H883.3Z", + "width": 1000 + }, + "search": [ + "schedule-active" + ] + }, + { + "uid": "3375043683ed20c80d3307cef405e3ff", + "css": "verify-face", + "code": 59555, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710ZM507.5 144.9A350.9 350.9 0 1 0 858.4 495.8 350.9 350.9 0 0 0 507.5 144.9ZM637 378.9A50.3 50.3 0 1 1 586.7 429.2 50.3 50.3 0 0 1 637 378.9ZM378 378.9A50.3 50.3 0 1 1 327.7 429.2 50.3 50.3 0 0 1 378 378.9ZM696.8 617.8A229.7 229.7 0 0 1 318.1 617.8 30.7 30.7 0 1 1 368.8 582.9 168.3 168.3 0 0 0 646.3 582.9 30.7 30.7 0 1 1 696.8 617.8Z", + "width": 1015 + }, + "search": [ + "verify-face" + ] + }, + { + "uid": "49b31d628bdc0d2127dc489c84c7101b", + "css": "verify-finger", + "code": 59556, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M792.5 147.2H237.8A76.6 76.6 0 0 0 161.3 223.7V778.4A76.6 76.6 0 0 0 237.8 854.9H792.5A76.6 76.6 0 0 0 869.1 778.4V223.7A76.6 76.6 0 0 0 792.5 147.2ZM292.8 283.5C439.9 176.7 595 177.8 739.9 285.4A20.8 20.8 0 0 1 727.6 322.8C704.1 322.8 543.8 152.4 317.1 317.1A20.7 20.7 0 0 1 292.8 283.5ZM486.1 816.8A20.7 20.7 0 0 1 457.2 811.5C428 769.3 361.6 722.1 361.6 633.8A159.5 159.5 0 0 1 515.1 469.3 159.5 159.5 0 0 1 668.7 633.8V655.9A20.7 20.7 0 0 1 627.2 655.9V633.8A118 118 0 0 0 515.2 510.7 118 118 0 0 0 403.3 633.8C403.3 733.7 530.5 786.1 486.2 816.8ZM743.8 709.5A108.7 108.7 0 0 1 538.7 656C538.7 566.5 477.5 596.6 491.1 650.9A20.7 20.7 0 0 1 450.8 661C422.6 548 580.2 502.2 580.2 656A66.9 66.9 0 0 0 632.1 725C728.1 747.7 756.6 589.3 660.8 487.4 528.5 346.3 314.7 455.1 314.7 622.8A167.7 167.7 0 0 0 344.1 732.4 20.7 20.7 0 0 1 310.4 756.5 211.3 211.3 0 0 1 273.3 622.8 245.9 245.9 0 0 1 515.3 380.8C694.1 380.8 807.9 581.4 744.1 709.6ZM757.7 452.8A20.7 20.7 0 0 1 729.4 445.1C688.2 372.8 588.3 333.9 515.3 333.9A296.7 296.7 0 0 0 300.3 446.4 20.7 20.7 0 0 1 265.8 423.4 336.1 336.1 0 0 1 515.3 292.5C668.9 292.5 806 425.3 757.8 452.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-finger" + ] + }, + { + "uid": "f57a7cc9bc5e75095215adfc141a8b17", + "css": "verify-whtsapp", + "code": 59557, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M132.6 857.5L196.3 666.3A364.2 364.2 0 1 1 340.1 802.9ZM742 601.7C725.1 569.9 663.1 533.6 663.1 533.6 649 525.7 632.1 524.7 624.1 538.8A321.2 321.2 0 0 1 598.8 566.5 47.1 47.1 0 0 1 531.8 559.8L481 508.9 430.1 458A47.1 47.1 0 0 1 423.5 391.3 321.3 321.3 0 0 1 451.1 366C465.4 358.1 464.5 341.1 456.4 327.1 456.4 327.1 420 265 388.2 248.2A34.8 34.8 0 0 0 347.3 254.3L324.8 276.8C253.6 348 288.6 428.5 359.9 499.8L425.3 564.9 490.5 630C561.7 701.3 642.2 736.4 713.5 665.1L735.9 642.6A34.9 34.9 0 0 0 742 601.7ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.3A36.2 36.2 0 1 0 0 746.3V963.8A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.3V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-whtsapp" + ] + }, + { + "uid": "89f9e9928bf0aa0ec55c15055f8ce27a", + "css": "verify-sms", + "code": 59558, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M766.3 175.1H252.2A64.5 64.5 0 0 0 187.9 239.4V817.7L316.4 689.2H766.1A64.5 64.5 0 0 0 830.5 624.8V239.4A64.5 64.5 0 0 0 766.3 175.1ZM412.8 464.4H348.5V400H412.8ZM541.3 464.4H477.2V400H541.3ZM669.8 464.4H605.6V400H669.9ZM181.3 0H36.2A36.3 36.3 0 0 0 0 36.2V253.7A36.2 36.2 0 0 0 72.5 253.7V72.5H181.3A36.2 36.2 0 1 0 181.3 0ZM181.3 927.5H72.5V746.2A36.2 36.2 0 1 0 0 746.2V963.7A36.3 36.3 0 0 0 36.2 1000H181.3A36.2 36.2 0 1 0 181.3 927.5ZM978.8 0H833.7A36.2 36.2 0 0 0 833.7 72.5H942.5V253.8A36.2 36.2 0 0 0 1015 253.8V36.2A36.3 36.3 0 0 0 978.8 0ZM978.8 710A36.3 36.3 0 0 0 942.5 746.2V927.5H833.8A36.2 36.2 0 0 0 833.8 1000H978.8A36.3 36.3 0 0 0 1015 963.8V746.3A36.3 36.3 0 0 0 978.8 710Z", + "width": 1015 + }, + "search": [ + "verify-sms" + ] + }, + { + "uid": "efc8c6ed2dab146bc55ca80fdd9bc511", + "css": "124", + "code": 59559, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M315.2 3.2L315.2 3.2A45.2 45.2 0 0 1 322.4 3.2S326 3.2 328.4 3.2H328.4A42.4 42.4 0 0 1 336 3.2H336A26.4 26.4 0 0 1 342 3.2H342A37.6 37.6 0 0 1 346.8 6.8 40 40 0 0 1 353.6 11.6L353.6 11.6 600.8 278.8A40 40 0 0 1 604.4 335.2 40 40 0 0 1 547.6 335.2L370 142.8V920H1250A40 40 0 0 1 1250 1000H330A40 40 0 0 1 290 960V129.2L66.4 329.2A40 40 0 0 1 10 325.6 40 40 0 0 1 0 299.2 40 40 0 0 1 13.2 269.2L304.8 10.4A36.4 36.4 0 0 1 310 7.2 40 40 0 0 1 315.2 3.2Z", + "width": 1290 + }, + "search": [ + "124" + ] + }, + { + "uid": "2251120e332d8914aca7fb2d3fbe00f2", + "css": "123", + "code": 59560, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M773 755.3S773 755.3 773 755.3A38.8 38.8 0 0 0 773 749.5 21.7 21.7 0 0 0 773 745.1V745.1A55.8 55.8 0 0 0 773 739.2H773A25.7 25.7 0 0 0 773 734.6V734.6S770.9 732.1 769.9 730.5A31 31 0 0 0 766.2 725.3H766.2L558.1 529.6A31 31 0 0 0 514.1 531.5 31 31 0 0 0 516 575.2L665.1 713.2H62V31A31 31 0 0 0 0 31V744.2A31 31 0 0 0 31 775.2H675.3L520.3 948.5A31 31 0 1 0 566.8 989.5L766.2 764.7S766.2 762.2 768.4 760.9A33.5 33.5 0 0 0 773 755.3Z", + "width": 775 + }, + "search": [ + "123" + ] + }, + { + "uid": "61995ecf98bfc143fef5299e57bcc37f", + "css": "powered-by-cs-1", + "code": 59510, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M5611.5 942.8L5603.8 947.4A13.5 13.5 0 0 0 5599.7 942.5 9.5 9.5 0 0 0 5594.5 941.2 9.7 9.7 0 0 0 5587.9 943.5 6.9 6.9 0 0 0 5585.4 949C5585.4 952 5587.6 954.5 5592.2 956.3L5598.4 958.7A26.4 26.4 0 0 1 5609.6 966.3 16.8 16.8 0 0 1 5613.1 977.1 19.1 19.1 0 0 1 5607.4 991.4 19.7 19.7 0 0 1 5593 997.1 19.2 19.2 0 0 1 5579.5 992.2 22.3 22.3 0 0 1 5572.9 978.6L5582.5 976.5A16.5 16.5 0 0 0 5584.8 984.2 10.8 10.8 0 0 0 5600.7 985.3 10.2 10.2 0 0 0 5603.6 977.7 11 11 0 0 0 5603.1 974.4 9 9 0 0 0 5601.5 971.6 12.9 12.9 0 0 0 5598.7 969.2 27.3 27.3 0 0 0 5594.7 967L5588.6 964.6A17.4 17.4 0 0 1 5575.7 948.9 15.1 15.1 0 0 1 5581.1 937.1 19.5 19.5 0 0 1 5594.6 932.3 18.8 18.8 0 0 1 5611.6 942.8M5623.8 964.5A30.6 30.6 0 0 1 5633.5 941.8 31.8 31.8 0 0 1 5656.8 932.3 32.7 32.7 0 0 1 5689.3 964.9 30.8 30.8 0 0 1 5679.6 987.9 33.1 33.1 0 0 1 5634.4 988.9 30.8 30.8 0 0 1 5623.8 964.6M5633.3 964.7A23.2 23.2 0 0 0 5673 981.7 24.3 24.3 0 0 0 5673 948.1 22.2 22.2 0 0 0 5656.5 941.3 22.4 22.4 0 0 0 5640 948.1 22.6 22.6 0 0 0 5633.2 964.8M5713.1 933.5V987.3H5731.5V996.2H5703.5V933.5ZM5750.4 933.5V971.3A20.8 20.8 0 0 0 5753.1 983.1 14.1 14.1 0 0 0 5775.3 983.1 20.5 20.5 0 0 0 5777.9 971.3V933.5H5787.4V973.8A22.6 22.6 0 0 1 5781.2 990.2 23.8 23.8 0 0 1 5747.1 990.2 22.6 22.6 0 0 1 5740.9 973.8V933.5ZM5822.1 942.4V996.2H5812.6V942.4H5798.2V933.5H5836.5V942.4ZM5871.1 964.5A30.6 30.6 0 0 1 5880.8 941.8 31.8 31.8 0 0 1 5904 932.3 32.7 32.7 0 0 1 5936.6 964.9 30.8 30.8 0 0 1 5926.9 987.9 33.1 33.1 0 0 1 5881.7 988.9 30.8 30.8 0 0 1 5871 964.6M5880.6 964.7A23.2 23.2 0 0 0 5920.2 981.7 24.3 24.3 0 0 0 5920.2 948.1 22.2 22.2 0 0 0 5903.8 941.3 22.4 22.4 0 0 0 5887.2 948.1 22.6 22.6 0 0 0 5880.5 964.8M5950.9 996.2V929.2L5996.6 977.1V933.5H6006.1V1000L5960.4 952.3V996.1ZM6058.9 942.8L6051.3 947.4A13.8 13.8 0 0 0 6047.2 942.5 9.5 9.5 0 0 0 6041.9 941.2 9.7 9.7 0 0 0 6035.4 943.5 6.9 6.9 0 0 0 6032.8 949C6032.8 952 6035.1 954.5 6039.6 956.3L6045.9 958.7A26.4 26.4 0 0 1 6057 966.3 16.8 16.8 0 0 1 6060.5 977.1 19.1 19.1 0 0 1 6054.8 991.4 19.8 19.8 0 0 1 6040.4 997.1 19.2 19.2 0 0 1 6026.9 992.2 22.2 22.2 0 0 1 6020.4 978.6L6030 976.5A16.5 16.5 0 0 0 6032.2 984.2 9.9 9.9 0 0 0 6040.7 988.2 9.7 9.7 0 0 0 6048 985.3 10.1 10.1 0 0 0 6051 977.7 11 11 0 0 0 6050.5 974.4 9 9 0 0 0 6048.9 971.6 12.9 12.9 0 0 0 6046.1 969.2 27.3 27.3 0 0 0 6042 967L6036 964.6A17.4 17.4 0 0 1 6023.2 948.9 15.1 15.1 0 0 1 6028.6 937.1 19.5 19.5 0 0 1 6042 932.3 18.8 18.8 0 0 1 6059 942.8M5307.1 772.3A43.1 43.1 0 0 0 5292 754.6 42 42 0 0 0 5267.6 747.8 55.5 55.5 0 0 0 5245.7 752.3 61 61 0 0 0 5227.1 764.7 68.4 68.4 0 0 0 5213.5 783.5 71.1 71.1 0 0 0 5206.5 807.5 65.9 65.9 0 0 0 5207.7 831.8 49 49 0 0 0 5216.9 850.5 43 43 0 0 0 5232.4 862.7 49.2 49.2 0 0 0 5253.5 867 49.2 49.2 0 0 0 5279 860.1 64.7 64.7 0 0 0 5298.9 841.7L5327.2 860.1A101.6 101.6 0 0 1 5295.8 887 89.4 89.4 0 0 1 5251.4 897.6 90 90 0 0 1 5215.8 890.7 78.4 78.4 0 0 1 5188.5 871.8 75.1 75.1 0 0 1 5172.1 843.2 85.8 85.8 0 0 1 5168.8 807.5 103.1 103.1 0 0 1 5179.8 771.3 99.5 99.5 0 0 1 5201.9 742.7 102.6 102.6 0 0 1 5270.1 717.2 77.9 77.9 0 0 1 5312.2 727.9 73.7 73.7 0 0 1 5338.2 754.7ZM5455.3 892.5H5346.6L5384.6 722.3H5422.1L5391 862.4H5462.2ZM5669.4 843.6A98.2 98.2 0 0 1 5647.5 872 99.3 99.3 0 0 1 5617.3 890.8 97.5 97.5 0 0 1 5580.9 897.6 85.2 85.2 0 0 1 5546 890.6 76.5 76.5 0 0 1 5519.2 871.3 77.4 77.4 0 0 1 5503.3 842.7 83 83 0 0 1 5500.5 807.5 105.7 105.7 0 0 1 5511.2 771.6 98.4 98.4 0 0 1 5563.1 724 97 97 0 0 1 5599.5 717.2 84.4 84.4 0 0 1 5634.4 724.3 76.4 76.4 0 0 1 5677 772.4 82.7 82.7 0 0 1 5679.8 807.5 105.8 105.8 0 0 1 5669.1 843.6M5641.6 784.3A50.6 50.6 0 0 0 5633.7 765.3 40.1 40.1 0 0 0 5618.9 752.5 46.2 46.2 0 0 0 5597.4 747.8 51.9 51.9 0 0 0 5575.2 752.5 59.4 59.4 0 0 0 5557.3 765.3 66.2 66.2 0 0 0 5544.5 784.3 80.3 80.3 0 0 0 5538 807.5 69.2 69.2 0 0 0 5538.7 830.6 50.7 50.7 0 0 0 5546.7 849.5 40.2 40.2 0 0 0 5561.5 862.2 46.2 46.2 0 0 0 5582.9 866.9 52.2 52.2 0 0 0 5605.1 862.2 60.8 60.8 0 0 0 5623.1 849.5 67.1 67.1 0 0 0 5635.8 830.6 78.5 78.5 0 0 0 5642.4 807.5 70.2 70.2 0 0 0 5641.6 784.3M5864.8 834.8A84.6 84.6 0 0 1 5854.8 859.3 76.6 76.6 0 0 1 5813.5 892.7 93.5 93.5 0 0 1 5782.5 897.6 76.3 76.3 0 0 1 5751.1 891.5 62.6 62.6 0 0 1 5728.4 874.9 58.7 58.7 0 0 1 5716 850.5 64.1 64.1 0 0 1 5715.9 821.3Q5722.3 792.1 5726.2 773.1C5728.8 760.5 5730.9 750.8 5732.3 743.9S5734.8 732 5735.4 728.8 5736.4 723.4 5736.5 722.4H5774.8L5752.6 825.4A39.5 39.5 0 0 0 5752.2 840 32.9 32.9 0 0 0 5757.3 853.4 30 30 0 0 0 5768.2 863.2 33.9 33.9 0 0 0 5785 867 41.7 41.7 0 0 0 5800.7 864.1 45.6 45.6 0 0 0 5813.6 856.3 48.7 48.7 0 0 0 5823.2 845.1 42.6 42.6 0 0 0 5828.6 831.5L5853.4 722.3H5891.7ZM6063.9 842.6A90.3 90.3 0 0 1 6042.6 869.4 93.8 93.8 0 0 1 6012.6 886.4 108.4 108.4 0 0 1 5976.1 892.4H5896.7L5934.5 722.2H5993A94.2 94.2 0 0 1 6028.4 728.6 74.2 74.2 0 0 1 6055.1 746.3 71.1 71.1 0 0 1 6071.2 773.2 78.9 78.9 0 0 1 6074.4 807.3 98.4 98.4 0 0 1 6063.8 842.4M6035.4 785.5A44.4 44.4 0 0 0 6027.3 768 39.2 39.2 0 0 0 6012.6 756.4 49.2 49.2 0 0 0 5991.5 752.2H5965.3L5940.8 862.1H5976.8A55 55 0 0 0 5998.4 857.8 63.4 63.4 0 0 0 6016.7 846.1 62.3 62.3 0 0 0 6030 828.6 59.9 59.9 0 0 0 6036.5 807.3 65.7 65.7 0 0 0 6035.5 785.4M5877.9 372.8S5868.5 321.5 5791.5 321.5A102.2 102.2 0 0 0 5714.5 228.1S5701.4 135.9 5642.7 114.9L5844.1 166.3S5881.4 166.3 5877.9 231.6ZM5591.9 98.6L5226.6 0.6S5174.1-7.6 5172.9 40.2 5172.9 312.1 5172.9 312.1 5224.3 228.1 5359.7 243.9C5359.7 243.9 5384.2 98.6 5521.9 165.1A82.7 82.7 0 0 1 5591.9 98.6M5591.3 395S5599.4 347.1 5636.8 360 5739.5 403.1 5739.5 403.1A54 54 0 0 1 5766.2 460.4L5759.6 516.3A27.3 27.3 0 0 1 5719.6 537.4L5600.5 487.1A35 35 0 0 1 5586.5 448.2ZM5441.9 434.5S5448.3 407.5 5469.2 416.2 5526.2 444.5 5526.2 444.5A30.8 30.8 0 0 1 5539.4 478.1L5533.6 509.7A15.6 15.6 0 0 1 5510 520.3L5443.9 487.3A20 20 0 0 1 5437.4 464.5ZM5832.1 408.8S5838.5 381.8 5859.3 390.4 5916.3 418.8 5916.3 418.8A30.9 30.9 0 0 1 5929.5 452.4L5923.7 484A15.6 15.6 0 0 1 5900.1 494.6L5834 461.6A20 20 0 0 1 5827.5 438.8ZM5520.3 255.2S5525.7 232.5 5543.2 239.8 5591.3 263.7 5591.3 263.7A26 26 0 0 1 5602.5 292L5597.6 318.7A13.2 13.2 0 0 1 5577.7 327.6L5522 299.9A16.9 16.9 0 0 1 5516.4 280.6ZM5687.2 300.9S5691.8 281.5 5706.7 287.7 5747.5 308 5747.5 308A22.1 22.1 0 0 1 5757 332.1L5752.8 354.8A11.2 11.2 0 0 1 5735.9 362.3L5688.6 338.7A14.3 14.3 0 0 1 5683.9 322.4ZM5600.9 555S5605.4 535.7 5620.3 541.9 5661.1 562.2 5661.1 562.2A22 22 0 0 1 5670.6 586.2L5666.4 608.9A11.1 11.1 0 0 1 5649.6 616.5L5602.3 592.9A14.3 14.3 0 0 1 5597.6 576.6ZM5403.2 300.9S5407.7 281.5 5422.6 287.7 5463.4 308 5463.4 308A22.1 22.1 0 0 1 5472.9 332.1L5468.7 354.8A11.2 11.2 0 0 1 5451.9 362.3L5404.6 338.7A14.3 14.3 0 0 1 5399.9 322.4ZM5943.5 607.8S5948.1 588.5 5963 594.7 6003.8 615 6003.8 615A22.1 22.1 0 0 1 6013.3 639L6009.1 661.7A11.1 11.1 0 0 1 5992.2 669.2L5944.9 645.7A14.4 14.4 0 0 1 5940.2 629.4ZM5785 603.8S5787.7 592.4 5796.5 596.1 5820.5 608.1 5820.5 608.1A13 13 0 0 1 5826.1 622.2L5823.7 635.6A6.6 6.6 0 0 1 5813.7 640L5785.9 626.1A8.5 8.5 0 0 1 5783.1 616.5ZM5332.2 445.1S5334.9 433.7 5343.7 437.4 5367.7 449.4 5367.7 449.4A13 13 0 0 1 5373.3 463.5L5370.8 476.9A6.6 6.6 0 0 1 5360.9 481.3L5333 467.4A8.4 8.4 0 0 1 5330.3 457.7ZM5261 326.8S5263.7 315.5 5272.5 319.1 5296.5 331.1 5296.5 331.1A13 13 0 0 1 5302.1 345.2L5299.6 358.6A6.6 6.6 0 0 1 5289.7 363L5261.8 349.1A8.4 8.4 0 0 1 5259.1 339.5ZM5218.3 680.7H5212.9C5206.5 680.7 5202.4 678.7 5200.8 674.5A11.8 11.8 0 0 1 5188.6 680.7C5178.1 680.7 5172.9 673.9 5172.9 660.3 5172.9 647 5178.1 640.4 5188.6 640.4H5205.3V664.3C5205.3 670.4 5208 673.4 5213.4 673.4H5218.2ZM5197.4 647.2H5189.1A7.1 7.1 0 0 0 5182.3 650.7 20.4 20.4 0 0 0 5180.7 660.2 21.1 21.1 0 0 0 5182.3 669.7 7 7 0 0 0 5189.1 673.3 6.9 6.9 0 0 0 5195.8 669.7 21 21 0 0 0 5197.5 660.2ZM5190.1 627.8A4.5 4.5 0 0 1 5185.7 632.4 4.5 4.5 0 0 1 5181.6 627.8 4.5 4.5 0 0 1 5185.9 623.2 4.5 4.5 0 0 1 5190.3 627.8M5201.3 627.8A4.6 4.6 0 0 1 5197 632.4 4.5 4.5 0 0 1 5192.8 627.8 4.4 4.4 0 0 1 5197 623.2 4.5 4.5 0 0 1 5201.3 627.8M5238.1 664.9A15.8 15.8 0 0 1 5233.9 676.3 14.8 14.8 0 0 1 5222.6 680.7H5216.3V673.4H5222.2Q5230.3 673.4 5230.3 664.3V643L5238.1 640.5ZM5233.2 693.3A4.3 4.3 0 1 1 5224.7 693.3 4.3 4.3 0 1 1 5233.2 693.3M5268.4 680.7H5259.7A10.4 10.4 0 0 1 5248.8 669.2V625.8L5256.6 623.1V668.9C5256.6 671.8 5257.9 673.2 5260.6 673.2H5268.4ZM5321.5 680.7H5266.3V673.4H5303.3V670.2A45.7 45.7 0 0 0 5301.6 655.5 10.6 10.6 0 0 0 5290.7 647.9 16.4 16.4 0 0 0 5278.2 654.9L5272.6 649.2A24.6 24.6 0 0 1 5290.7 640.5 17.5 17.5 0 0 1 5308 650.2 46.9 46.9 0 0 1 5311.3 670.1V673.1H5321.5ZM5394.5 680.7H5319.6V673.2H5329.4V650.6L5337.2 648.2V673.2H5353.5V646.9L5361.3 644.4V673.3H5377.8V642.9L5385.6 640.5V673.3H5394.5ZM5413.5 664.9A16.2 16.2 0 0 1 5409.3 676.3 14.9 14.9 0 0 1 5398 680.7H5392.7V673.2H5397.6C5402.9 673.2 5405.7 670.2 5405.7 664.1V625.8L5413.5 623.4ZM5432 680.7H5424.2V625.8L5432 623.1ZM5527.1 678.3C5527.1 691.4 5519.8 697.8 5505 697.8A20.9 20.9 0 0 1 5487.1 690.4 40.6 40.6 0 0 1 5481.3 670L5489.2 667.2A31.6 31.6 0 0 0 5492.7 684.8 14.4 14.4 0 0 0 5505.1 689.9 18.8 18.8 0 0 0 5515.3 687.7 10.7 10.7 0 0 0 5519.2 678.4V625.9L5527 623.3ZM5578.7 680.7H5568.9A21.9 21.9 0 0 1 5563.5 692.7 15.2 15.2 0 0 1 5551.6 697.9 17 17 0 0 1 5541.9 695.4L5538.4 687.2A27 27 0 0 0 5551.4 690.4 10.4 10.4 0 0 0 5561.1 680.6H5554.7A16.3 16.3 0 0 1 5541.9 675.3 18.9 18.9 0 0 1 5537.7 662.4 25.8 25.8 0 0 1 5541.3 648.1 14.3 14.3 0 0 1 5554.1 641.5C5564.5 641.5 5569.8 648.5 5569.8 662.4 5569.8 665.2 5569.8 668.8 5569.6 673.3H5578.6ZM5562 662.5A26.2 26.2 0 0 0 5560.9 653.5 6.7 6.7 0 0 0 5554.1 649C5548.4 649 5545.6 653.5 5545.6 662.5 5545.6 669.8 5548.6 673.4 5554.7 673.4H5562ZM5611.8 680.7H5606.4A14.6 14.6 0 0 1 5594.9 675.9 14.2 14.2 0 0 1 5583.3 680.7H5576.7V673.2H5582.8C5588.3 673.2 5591 670.2 5591 664.1V625.8L5598.8 623.1V664.5C5598.8 670.3 5601.5 673.1 5606.9 673.1H5611.7ZM5653.5 680.7H5609.7V673.4H5645.6V670.2A45.5 45.5 0 0 0 5643.8 655.5 10.6 10.6 0 0 0 5633.1 647.9 16.6 16.6 0 0 0 5620.5 654.9L5614.9 649.2A24.7 24.7 0 0 1 5633.1 640.5 17.6 17.6 0 0 1 5650.3 650.2 48.7 48.7 0 0 1 5653.5 670.1ZM6139 744.3A28.9 28.9 0 0 1 6130.3 765.5 29.7 29.7 0 0 1 6088.2 765.5 29 29 0 0 1 6079.5 744.3 27.8 27.8 0 0 1 6082.3 731.7 28.9 28.9 0 0 1 6090.3 721.5 28.5 28.5 0 0 1 6109 714.6 29.2 29.2 0 0 1 6121.4 717.2 28.6 28.6 0 0 1 6134.2 728.1 29.6 29.6 0 0 1 6139 744.4M6109.1 718.9A23.5 23.5 0 0 0 6091.6 726.4 25.8 25.8 0 0 0 6091.6 762.5 24.5 24.5 0 0 0 6126.9 762.5 25.1 25.1 0 0 0 6134.2 744.3 27.6 27.6 0 0 0 6131.4 732.6 24 24 0 0 0 6123.8 723.5 24.9 24.9 0 0 0 6109.1 718.8M6112.2 747.2L6123.4 761.6H6115.4L6105.1 748V761.6H6098.6V727.2H6105.5A17.3 17.3 0 0 1 6116 729.7 9.5 9.5 0 0 1 6119.6 737.4 10.2 10.2 0 0 1 6117.7 743.4 9.4 9.4 0 0 1 6112.7 747ZM6105.1 742.4H6106.2C6110.9 742.4 6113.3 740.7 6113.3 737.5S6111 732.9 6106.5 732.9H6105Z", + "width": 6139 + }, + "search": [ + "powered-by-cs" + ] + }, + { + "uid": "bf17051ca639c4db6f66b531ae98b29e", + "css": "menu", + "code": 59565, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "", + "width": 3500 + }, + "search": [ + "menu" + ] + }, + { + "uid": "bffd96d1421ef42e3a097855b3820d42", + "css": "obese-bmi-r-1", + "code": 59561, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M307.3 571.7C305.2 589.1 322 680.9 330.6 716.9 334.8 734 346.1 761.8 342 776.5A153.3 153.3 0 0 0 337.7 839.2C339.7 848.6 346 892 337 907.9A369.5 369.5 0 0 0 323.5 958.9C300.8 999.1 313.6 997.1 313.6 997.1 320.6 1003.2 332.7 997.6 332.7 997.6A15.3 15.3 0 0 0 348.1 996.6 18.9 18.9 0 0 0 365.2 996.1 22.4 22.4 0 0 0 384.2 993C389.9 995 391.3 992.5 391.3 992.5 408.3 991.7 381.8 953.5 381.8 953.5A76.3 76.3 0 0 1 388.1 900C429.5 813.7 431.7 790.8 415.1 758.3 410.4 748.9 409.2 745.2 411.4 741.1 416.3 731.7 412.7 693.9 418.8 678.8 430.5 649.9 442 576.4 448 542.1 456.1 495.9 419.4 434 419.4 434 411.4 408.8 423.1 319 423.1 319 439.6 336.9 439 368.6 439 368.6 436.4 401.9 477.2 452.7 477.2 452.7A118.4 118.4 0 0 1 504.3 495.1C504.3 501.1 502.4 515.8 502.4 515.8L503.2 528.5A129.3 129.3 0 0 1 505.7 548.3C502.6 581.6 510.2 575.3 510.2 575.3 516.5 575.3 523.5 548.5 523.5 548.5 523.5 555.4 521.1 576.1 526.4 583.9 532.7 593.2 537.4 582.3 537.5 580.1 539.2 537.8 542.8 548.9 542.8 548.9 546.3 583.2 550.7 591 558.4 588.3 564.3 586.3 558.9 547.1 558.9 547.1 569 570.4 576.7 574.1 576.7 574.1 593.3 582.3 583 559.6 580.7 555.1A99.2 99.2 0 0 1 568 523C583.4 544.5 595 543.6 595 543.6 610 540.3 581.9 509.9 565.4 495.4A126 126 0 0 1 543 472.2 203.5 203.5 0 0 1 534 430.1C532.4 392.3 519.1 375.9 519.1 375.9 496.3 350.3 492 302.5 492 302.5L491 221.9C483 166.9 425.3 166.5 425.3 166.5 366.9 160.4 358.8 147.2 358.8 147.2 346.4 134.7 353.5 110.8 353.5 110.8A38.7 38.7 0 0 0 367.7 89.4C384.7 80.2 383.9 66.8 376 66.9 369.7 67 371.2 63.4 371.2 63.4 381.9 3.1 305.5 0 305.5 0H293.9S217.5 3.1 228.1 63.4C228.1 63.4 229.6 67.1 223.2 67 215.4 66.8 214.6 80.3 231.6 89.4A38.7 38.7 0 0 0 245.8 110.8S252.9 134.8 240.5 147.2C240.5 147.2 232.4 160.5 174 166.6 174 166.6 116.2 167 108.3 222L107.2 302.6S103 350.3 80.2 375.9C80.2 375.9 66.9 392.4 65.4 430.2A204.8 204.8 0 0 1 56.4 472.3 124.6 124.6 0 0 1 33.9 495.5C17.3 510-10.7 540.2 4.3 543.7 4.3 543.7 16 544.5 31.3 523.1A98.1 98.1 0 0 1 18.7 555.2C16.3 559.6 6 582.3 22.6 574.2 22.6 574.2 30.3 570.4 40.4 547.1 40.4 547.1 35 586.4 41 588.4 48.8 591 53.1 583.3 56.6 548.9 56.6 548.9 60.2 537.8 61.9 580.2 62 582.4 66.5 593.3 72.9 584 78.3 576.2 75.9 555.5 75.9 548.6 75.9 548.6 82.8 575.4 89.2 575.4 89.2 575.4 96.8 581.7 93.7 548.4A119.1 119.1 0 0 1 96.2 528.5L96.9 515.8S95 501.1 95 495.1A118.3 118.3 0 0 1 122.1 452.7S162.9 401.8 160.3 368.6C160.3 368.6 159.7 336.9 176.2 319 176.2 319 187.9 408.8 180 434 180 434 143.2 495.9 151.3 542.1 157.3 576.5 168.8 649.9 180.5 678.8 186.6 693.8 183 731.7 187.9 741.1 190.1 745.2 188.9 749 184.2 758.3 167.7 790.8 169.8 813.7 211.3 900A75.6 75.6 0 0 1 217.6 953.5S191.1 991.7 208.1 992.5C208.1 992.5 209.4 995 215.1 993A22.4 22.4 0 0 0 234.2 996.1 18.8 18.8 0 0 0 251.2 996.6 15.2 15.2 0 0 0 266.7 997.6S278.7 1003.3 285.8 997.1C285.8 997.1 298.5 999.1 275.9 958.9A367.7 367.7 0 0 0 262.5 907.9C253.4 892.1 259.9 848.6 261.8 839.2A155.9 155.9 0 0 0 257.5 776.5C253.3 761.8 264.7 734 268.9 716.9 277.5 680.9 294.3 589.1 292.2 571.7L299.2 573.4A18.3 18.3 0 0 0 307.3 571.7Z", + "width": 599 + }, + "search": [ + "obese-bmi-r" + ] + }, + { + "uid": "e3578bfad1396ea9b38bd70c249fa1e5", + "css": "inpatient", + "code": 59737, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M970.7 470.7A29.3 29.3 0 0 0 941.5 500V646.3H878A145.5 145.5 0 0 0 735.6 529.2H421.9V557.4L361.6 556.4A149.2 149.2 0 0 0 235.9 525.1 87.8 87.8 0 1 0 64.6 493.3L58.6 489.5V380.8A29.3 29.3 0 0 0 0 380.8V970.7A29.3 29.3 0 0 0 58.6 970.7V824.3H941.5V970.7A29.3 29.3 0 0 0 1000 970.7V500A29.3 29.3 0 0 0 970.7 470.7ZM58.5 646.3V558.5L197.7 646.3ZM294.9 89.9H353.4V148.4H324.1A29.3 29.3 0 0 0 294.9 177.7V236.2A87.8 87.8 0 0 0 470.5 236.2V177.7A29.3 29.3 0 0 0 441.2 148.4H412V89.9H529V470.7H587.6V29.3A29.3 29.3 0 1 0 529 31.2H294.9A29.3 29.3 0 0 0 294.9 89.8Z", + "width": 1000 + }, + "search": [ + "inpatient" + ] + }, + { + "uid": "1ca5ef3569be282fb05f15395a81d2a0", + "css": "discharge", + "code": 59738, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M985.1 464.6H985.1L535.1 14.6A49.8 49.8 0 0 0 464.8 14.6L14.6 464.6A50.1 50.1 0 0 0 14.6 535.4L464.6 985.1V985.4A50.1 50.1 0 0 0 535.4 985.4L985.3 535.4A49.9 49.9 0 0 0 985.1 464.6ZM599.7 624.9V500H399.7V650H299.7V450A49.8 49.8 0 0 1 349.7 400H599.7V274.9L774.7 449.9Z", + "width": 1000 + }, + "search": [ + "discharge" + ] + }, + { + "uid": "1738fd6466298efa6012247ca0941077", + "css": "order-sheets", + "code": 59739, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M736 84.4A87.2 87.2 0 0 0 673.9 58.6H635V97.6A78.2 78.2 0 0 1 556.9 175.8H205.8A78.2 78.2 0 0 1 127.7 97.6V58.6H88.6A87.9 87.9 0 0 0 0.9 146.4L0 912A87.9 87.9 0 0 0 87.8 1000.1H673A87.9 87.9 0 0 0 760.7 912.3L761.6 146.7A87.4 87.4 0 0 0 736 84.4ZM390.7 351.6H598.7A29.3 29.3 0 0 1 598.7 410.1H390.8A29.3 29.3 0 0 1 390.8 351.6ZM390.7 546.9H598.7A29.3 29.3 0 0 1 598.7 605.5H390.8A29.3 29.3 0 0 1 390.8 546.9ZM390.7 742.2H599.6A29.3 29.3 0 0 1 599.6 800.8H390.7A29.3 29.3 0 0 1 390.7 742.2ZM141.5 352.7A29.2 29.2 0 0 1 182.8 352.7L198.7 368.6 266.2 301.1A29.3 29.3 0 1 1 307.6 342.5L219.4 430.8A29.2 29.2 0 0 1 178.1 430.8L141.6 394.2A29.3 29.3 0 0 1 141.5 352.7ZM141.5 562.9A29.2 29.2 0 0 1 182.8 562.9L198.7 578.8 266.2 511.3A29.3 29.3 0 0 1 307.6 552.7L219.4 641A29.2 29.2 0 0 1 178.1 641L141.6 604.4A29.3 29.3 0 0 1 141.5 562.9ZM141.5 758.2A29.2 29.2 0 0 1 182.8 758.2L198.7 774.2 266.2 706.6A29.3 29.3 0 0 1 307.6 748.1L219.5 836.3A29.2 29.2 0 0 1 178.1 836.3L141.6 799.7A29.3 29.3 0 0 1 141.5 758.2ZM186.2 97.7A19.5 19.5 0 0 0 205.8 117.2H556.9A19.5 19.5 0 0 0 576.4 97.7V19.5A19.5 19.5 0 0 0 556.9 0H205.7A19.5 19.5 0 0 0 186.2 19.5Z", + "width": 762 + }, + "search": [ + "order-sheets" + ] + }, + { + "uid": "37fe23c97ab802ea172b84fc8a0ee196", + "css": "call", + "code": 59740, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M763.9 671.3L986.8 745.6A19.2 19.2 0 0 1 1000 763.8V846.1A153.8 153.8 0 0 1 846.2 1000 846.1 846.1 0 0 1 0 153.6 153.6 153.6 0 0 1 153.6 0H236A19.2 19.2 0 0 1 254.2 13.2L328.7 236A19.2 19.2 0 0 1 321.1 258.1L221.2 324.5A19.7 19.7 0 0 0 213.7 347.6 800 800 0 0 0 652.2 786 19.7 19.7 0 0 0 675.3 778.5L741.8 678.6A19.2 19.2 0 0 1 763.9 671Z", + "width": 1000 + }, + "search": [ + "call" + ] + }, + { + "uid": "ebce1ce36215365ca8c3dd958beaac65", + "css": "medical-report", + "code": 59741, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M764.6 1000H58.8A58.9 58.9 0 0 1 0 941.1V59A58.9 58.9 0 0 1 58.8 0.1H764.6A58.9 58.9 0 0 1 823.5 59V941.3A58.9 58.9 0 0 1 764.6 1000ZM617.4 690.9A112.6 112.6 0 0 0 504.9 803.4 112.6 112.6 0 0 0 617.4 915.9 112.6 112.6 0 0 0 729.9 803.4V795.9H624.8V690.9ZM640.9 659.9V779.9H760.9V772.4A112.6 112.6 0 0 0 648.4 659.9ZM176.6 417.3A29.5 29.5 0 0 0 147.1 446.7 29.5 29.5 0 0 0 176.6 476.2H647.2A29.4 29.4 0 0 0 676.6 446.7 29.4 29.4 0 0 0 647.2 417.3ZM176.6 276.2A29.4 29.4 0 0 0 147.1 305.6 29.5 29.5 0 0 0 176.6 335.1H647.2A29.4 29.4 0 0 0 676.6 305.6 29.4 29.4 0 0 0 647.2 276.2ZM176.6 147.1A29.4 29.4 0 0 0 147.1 176.5 29.5 29.5 0 0 0 176.6 205.9H382.3A29.5 29.5 0 0 0 411.7 176.5 29.4 29.4 0 0 0 382.3 147.1Z", + "width": 823 + }, + "search": [ + "medical-report" + ] + }, + { + "uid": "c8478a11a2d4271b16c1e1f0464ea1ff", + "css": "painscale", + "code": 59742, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M77 120.3L120.2 77 271.7 228.5 228.4 271.8ZM243.6 24.1L299.8 0 364.8 151.4 308.5 175.6ZM0 299.9L24.1 243.6 175.6 308.6 151.4 364.8ZM726 769.4L769.3 726.2 920.7 877.6 877.4 920.9ZM633.1 846.2L689.3 822.1 754.2 973.6 698 997.7ZM822.2 689.5L846.4 633.3 997.8 698.2 973.7 754.5ZM242.5 415.6A122.4 122.4 0 0 1 415.6 588.7 122.4 122.4 0 1 1 415.6 761.8L177.4 1000 4.3 827.1 242.5 588.9A122.4 122.4 0 0 1 242.5 415.8ZM588.7 415.6A122.4 122.4 0 1 1 588.7 242.5L827 4.3 1000.1 177.4 761.7 415.6A122.4 122.4 0 1 1 588.6 415.6Z", + "width": 1000 + }, + "search": [ + "painscale" + ] + }, + { + "uid": "5a0bdc9deb49171daf7251717ac6d715", + "css": "oxygenation", + "code": 59743, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M498.2 186.2A406.9 406.9 0 1 0 905.1 593.1 407.3 407.3 0 0 0 498.2 186.2ZM498.2 926.9A333.9 333.9 0 1 1 832.1 593 334.3 334.3 0 0 1 498.2 927.1ZM380.8 421A161 161 0 0 0 261.9 463.9 161.5 161.5 0 0 0 219.1 583.5 177.3 177.3 0 0 0 240.7 675 131.7 131.7 0 0 0 297 728.4 201.4 201.4 0 0 0 384.8 745.2 176.5 176.5 0 0 0 472 725.7 133 133 0 0 0 525.5 671 193.7 193.7 0 0 0 544 580.8 158.4 158.4 0 0 0 501.6 463 164 164 0 0 0 380.8 421ZM429.8 652.4A59.8 59.8 0 0 1 381.5 672.7 59.6 59.6 0 0 1 333.5 652 105 105 0 0 1 315.8 583.7 105.3 105.3 0 0 1 333.8 514.9 58.9 58.9 0 0 1 380.8 494.1 61.3 61.3 0 0 1 429.3 514.6 97 97 0 0 1 447.2 579.3 116.6 116.6 0 0 1 430 652.4ZM650.7 682.9C654.7 679.8 662.4 672.9 674.1 664.7A154.2 154.2 0 0 0 714.3 626.2 67.5 67.5 0 0 0 725.3 589.8 57.1 57.1 0 0 0 689 536.1 128.1 128.1 0 0 0 641.6 529 115.3 115.3 0 0 0 595.9 536.3 56.8 56.8 0 0 0 570.4 557.2 91.8 91.8 0 0 0 558 595.2L615.8 600A42.6 42.6 0 0 1 625.2 575.4 26.8 26.8 0 0 1 660.9 575.2 21.6 21.6 0 0 1 667.9 591.4 32.1 32.1 0 0 1 660.8 609.9 169.6 169.6 0 0 1 628.3 638.5 247.6 247.6 0 0 0 571.8 689.1 384.4 384.4 0 0 0 553.6 734.7H711.6V698.3H637.1C642.2 698.3 646.8 686.1 650.7 682.9Z", + "width": 1041 + }, + "search": [ + "oxygenation" + ] + }, + { + "uid": "169c700bad100df58cf4c5f69c96a27e", + "css": "speechtotext", + "code": 59744, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M499.8 132A97.3 97.3 0 0 1 597 229.1V248.1A102.7 102.7 0 0 1 708.8 292.8 98.7 98.7 0 0 1 714 388.3L775.6 461.6A281 281 0 0 0 859.7 261.2V261.2A261 261 0 0 0 598.7 0H317.4V60.6A142.4 142.4 0 0 0 336.6 132ZM816.3 680.9L506.4 787.5 439 1000H1001.6A365.8 365.8 0 0 0 816.3 680.9ZM514.7 722.7L769.6 635 749 552.7A92.8 92.8 0 0 1 747.1 518.5L639.5 390.9 655.3 372A41.8 41.8 0 0 0 614 304.4L538.4 321.9V229.1A38.6 38.6 0 0 0 499.9 190.6H359.1V272.6L275.7 411.6 317.4 453.3V488.2L400.4 522.6 325.7 579.1 332 613.1A41.6 41.6 0 0 0 380 646.6L505.6 625ZM231.1 479.7A81.3 81.3 0 0 0 231.1 594.4L272.5 553A22.6 22.6 0 0 1 272.5 521.1ZM157.7 406.3A185 185 0 0 0 157.7 667.7L199.1 626.2A126.4 126.4 0 0 1 199.1 447.7ZM125.8 374.5L84.4 333.1A288.8 288.8 0 0 0 84.4 741.1L125.8 699.7A230.2 230.2 0 0 1 125.8 374.5Z", + "width": 1002 + }, + "search": [ + "speechtotext" + ] + }, + { + "uid": "fbbe1c278b442a4840b03064fe4a2ea4", + "css": "respiration-rate-1", + "code": 59499, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M989.3 410.2C907.2 230.7 805.1 123.6 716.1 123.6A91.6 91.6 0 0 0 667.3 137C595.3 181.3 592 319.6 591.9 334.9 591.9 339.7 590.8 377.9 590 431.1L560.9 420.4V20.1A20.3 20.3 0 0 0 540.6-0.2H499.9A20.3 20.3 0 0 0 479.6 20.1V420.4L450.5 431.1C449.7 378 448.7 339.9 448.6 335.3 448.6 319.6 445.2 181.3 373.2 137A91.6 91.6 0 0 0 324.4 123.6C235.5 123.6 133.3 230.8 51.2 410.3-57.1 647.8 39 972 43.2 985.6A20.1 20.1 0 0 0 67.1 999.3 1776.9 1776.9 0 0 0 243.4 946.2C369.2 900.2 434.5 855.1 442.6 808.2A2836.5 2836.5 0 0 0 451.6 473.7L506.5 453.4H534.7L589.6 473.7A2835.8 2835.8 0 0 0 598.6 808.2C606.7 855.1 671.8 900.2 797.8 946.2A1778.4 1778.4 0 0 0 974.1 999.5 20.1 20.1 0 0 0 998 985.7C1001.8 972 1097.9 647.8 989.3 410.2ZM393.1 500.5L249.7 574.6V634.8L260.7 668.2 288.1 694.8A20.3 20.3 0 0 1 260.1 723.7L230.5 695.2 197 732.2A20.3 20.3 0 0 1 167.2 705.1L209.4 658.4V595.3L130.2 636.3A20.3 20.3 0 1 1 111.7 600.5L129.3 591.4 97.8 566.3A20.3 20.3 0 0 1 122.9 534.8L168.5 571.2 278.8 514.3 184.4 442.5A20.3 20.3 0 0 1 208.8 410.4L239.3 433.5 241.9 410.2A20.3 20.3 0 0 1 281.9 414.6L276.5 461.8 318.5 493.7 374.5 464.8A20.3 20.3 0 1 1 393 500.5ZM942.9 566.3L911.4 591.4 929 600.5A20.3 20.3 0 1 1 910.5 636.3L831.4 595.3V658.2L873.7 705A20.3 20.3 0 0 1 843.8 732.1L810.3 695.1 780.8 723.6A20.3 20.3 0 0 1 752.7 694.7L780.1 668.1 791.1 634.7V574.5L647.7 500.4A20.3 20.3 0 1 1 666.2 464.6L722.2 493.6 764.2 461.7 759 414.5A20.3 20.3 0 1 1 799 410L801.6 433.4 832.1 410.2A20.3 20.3 0 0 1 856.5 442.3L761.9 514 872.2 570.9 917.9 534.5A20.3 20.3 0 0 1 943 566Z", + "width": 1041 + }, + "search": [ + "respiration-rate" ] } ] diff --git a/lib/icons_app/doctor_app_icons.dart b/lib/icons_app/doctor_app_icons.dart index 1ed8d895..7ab4e306 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -59,6 +59,10 @@ class DoctorApp { IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referral_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes = + IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon_1 = + IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData operations = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData out_patient = @@ -77,22 +81,301 @@ class DoctorApp { IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData female_1 = IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon_active_1 = + IconData(0xe81c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon_1 = + IconData(0xe81d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData mail = IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData medicine_search = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_1 = + IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_1 = + IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referred = IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData send = + IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData sync_icon = IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData drawer_icon = IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData view = + IconData(0xe826, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData warning = + IconData(0xe827, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData add = + IconData(0xe828, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData close = + IconData(0xe829, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData back = + IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_summary = + IconData(0xe82b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData powered_by_cs = + IconData(0xe82c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_2 = + IconData(0xe82d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ecg = + IconData(0xe82e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData create_episode = + IconData(0xe82f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData booked = + IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData admission_req = + IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData walkin = + IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reschedule_ = + IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData edit = + IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); + // static const IconData lab_results = IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData leaves = IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData logout = + IconData(0xe837, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi = + IconData(0xe838, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData livecare = + IconData(0xe839, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi = + IconData(0xe83a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_r = + IconData(0xe83b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData modify_episode = + IconData(0xe83c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height = + IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_r = + IconData(0xe83e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi = + IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_prescription = + IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_procedures = + IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_r = + IconData(0xe842, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData respiration_rate = + IconData(0xe843, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData patient_sick_leave = + IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes_1 = + IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData temperature = + IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi = + IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData radiology_1 = + IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData search_patient_1 = IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referral_bg = + IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData search = IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_bg = + IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData arrival_patients = IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrival_patients_bg = + IconData(0xe84e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData refer_patient = + IconData(0xe84f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_r = + IconData(0xe850, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight = + IconData(0xe851, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_pressure = + IconData(0xe852, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_signs = + IconData(0xe853, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ucaf = + IconData(0xe854, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData filter = + IconData(0xe855, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male_1 = + IconData(0xe856, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female = + IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData external_link = + IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face_2 = + IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms_2 = + IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home = + IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger_2 = + IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_active = + IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply = + IconData(0xe85e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_active = + IconData(0xe85f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule = + IconData(0xe860, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_active = + IconData(0xe861, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader = + IconData(0xe862, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_active = + IconData(0xe863, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrow_forward = + IconData(0xe864, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData heart_rate = + IconData(0xe865, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon_active_1 = + IconData(0xe866, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon_1 = + IconData(0xe867, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon_active_1 = + IconData(0xe868, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData scdedule_icon_active_1 = + IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_r_1 = + IconData(0xe86a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_1 = + IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData temperature_1 = + IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_r_1 = + IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight_1 = + IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_pressure_1 = + IconData(0xe86f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_r_1 = + IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_1 = + IconData(0xe871, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData heart_rate_1 = + IconData(0xe872, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height_1 = + IconData(0xe873, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_1 = + IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_1 = + IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData powered_by_cs_1 = + IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_3 = + IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reschedule__1 = + IconData(0xe878, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData logout_1 = + IconData(0xe879, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData livecare_1 = + IconData(0xe87a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData modify_episode_1 = + IconData(0xe87b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_prescription_1 = + IconData(0xe87c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_procedures_1 = + IconData(0xe87d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData patient_sick_leave_1 = + IconData(0xe87e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes_2 = + IconData(0xe87f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData radiology_2 = + IconData(0xe880, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData refer_patient_1 = + IconData(0xe881, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ucaf_1 = + IconData(0xe882, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_signs_1 = + IconData(0xe883, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData walkin_1 = + IconData(0xe884, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData admission_req_1 = + IconData(0xe885, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData booked_1 = + IconData(0xe886, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData create_episode_1 = + IconData(0xe887, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ecg_1 = + IconData(0xe888, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_summary_1 = + IconData(0xe889, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData lab_results_1 = + IconData(0xe88a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female_2 = + IconData(0xe88b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData filter_1 = + IconData(0xe88c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male_3 = + IconData(0xe88d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_2 = + IconData(0xe88e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData send_1 = + IconData(0xe88f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData view_1 = + IconData(0xe890, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData warning_1 = + IconData(0xe891, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData add_1 = + IconData(0xe892, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrow_forward_1 = + IconData(0xe893, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData back_1 = + IconData(0xe894, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData close_1 = + IconData(0xe895, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData edit_1 = + IconData(0xe896, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData external_link_1 = + IconData(0xe897, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger_1 = + IconData(0xe898, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms_1 = + IconData(0xe899, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face_1 = + IconData(0xe89a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_1 = + IconData(0xe89b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_active_1 = + IconData(0xe89c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_1 = + IconData(0xe89d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_active_1 = + IconData(0xe89e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_1 = + IconData(0xe89f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_active_1 = + IconData(0xe8a0, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_1 = + IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_active_1 = + IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face = + IconData(0xe8a3, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger = + IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_whtsapp = + IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms = + IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_r_1 = + IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu = + IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData inpatient = + IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData discharge = + IconData(0xe95a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_sheets = + IconData(0xe95b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData call = + IconData(0xe95c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData medical_report = + IconData(0xe95d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData painscale = + IconData(0xe95e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData oxygenation = + IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData speechtotext = + IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/landing_page.dart b/lib/landing_page.dart index a997675a..99e1694f 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -1,19 +1,13 @@ import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; -import 'package:doctor_app_flutter/screens/dashboard_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/message_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/services_screen.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart'; +import 'package:doctor_app_flutter/screens/home/home_screen.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; - -import 'icons_app/doctor_app_icons.dart'; class LandingPage extends StatefulWidget { @override @@ -40,25 +34,28 @@ class _LandingPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - elevation: 0, - backgroundColor: Colors.grey[100], - //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), - title: currentTab != 0 - ? Text(getText(currentTab).toUpperCase()) - : Text(''), - leading: Builder( - builder: (BuildContext context) { - return IconButton( - icon: Icon(DoctorApp.drawer_icon), - iconSize: 15, - color: Colors.black, - onPressed: () => Scaffold.of(context).openDrawer(), - ); - }, - ), - centerTitle: true, - ), + appBar: currentTab != 0 + ? AppBar( + elevation: 0, + backgroundColor: Colors.grey[100], + //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), + title: currentTab != 0 + ? Text(getText(currentTab).toUpperCase()) + : SizedBox(), + leading: Builder( + builder: (BuildContext context) { + return IconButton( + icon: Image.asset('assets/images/menu.png', + height: 50, width: 50), + iconSize: 15, + color: Colors.black, + onPressed: () => Scaffold.of(context).openDrawer(), + ); + }, + ), + centerTitle: true, + ) + : MyAppbar(), drawer: SafeArea(child: AppDrawer()), extendBody: true, body: PageView( @@ -66,14 +63,21 @@ class _LandingPageState extends State { controller: pageController, children: [ ShowCaseWidget( - builder: Builder(builder: (context) => DashboardScreen()), + builder: Builder(builder: (context) => HomeScreen()), ), MyScheduleScreen(), QrReaderScreen(), - DoctorReplyScreen(), + DoctorReplyScreen( + changeCurrentTab: () { + _changeCurrentTab(0); + }, + ), ], ), - bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab), + bottomNavigationBar: BottomNavBar( + changeIndex: _changeCurrentTab, + index: currentTab, + ), ); } @@ -90,3 +94,16 @@ class _LandingPageState extends State { } } } + +class MyAppbar extends StatelessWidget with PreferredSizeWidget { + @override + final Size preferredSize; + + MyAppbar({Key key}) + : preferredSize = Size.fromHeight(0.0), + super(key: key); + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/locator.dart b/lib/locator.dart index 1e688d96..a8843992 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -5,7 +5,6 @@ import 'package:doctor_app_flutter/core/service/patient_service.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/procedure_service.dart'; import 'package:doctor_app_flutter/core/service/sickleave_service.dart'; -import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; @@ -15,21 +14,25 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:get_it/get_it.dart'; +import 'core/service/DischargedPatientService.dart'; import 'core/service/InsuranceCardService.dart'; +import 'core/service/MyReferralPatientService.dart'; import 'core/service/PatientMuseService.dart'; +import 'core/service/ReferralService.dart'; import 'core/service/SOAP_service.dart'; -import 'core/service/labs_service.dart'; -import 'core/service/patient-admission-request-service.dart'; import 'core/service/doctor_reply_service.dart'; +import 'core/service/labs_service.dart'; import 'core/service/medicine_service.dart'; +import 'core/service/patient-admission-request-service.dart'; +import 'core/service/patient-doctor-referral-service.dart'; import 'core/service/patient-ucaf-service.dart'; import 'core/service/patient-vital-signs-service.dart'; -import 'core/service/patient-doctor-referral-service.dart'; import 'core/service/prescriptions_service.dart'; import 'core/service/radiology_service.dart'; import 'core/service/referral_patient_service.dart'; import 'core/service/referred_patient_service.dart'; import 'core/service/schedule_service.dart'; +import 'core/viewModel/DischargedPatientViewModel.dart'; import 'core/viewModel/InsuranceViewModel.dart'; import 'core/viewModel/PatientMuseViewModel.dart'; import 'core/viewModel/SOAP_view_model.dart'; @@ -37,9 +40,9 @@ import 'core/viewModel/doctor_replay_view_model.dart'; import 'core/viewModel/labs_view_model.dart'; import 'core/viewModel/medicine_view_model.dart'; import 'core/viewModel/patient-admission-request-viewmodel.dart'; +import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; -import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; @@ -73,6 +76,9 @@ void setupLocator() { locator.registerLazySingleton(() => InsuranceCardService()); locator.registerLazySingleton(() => RadiologyService()); locator.registerLazySingleton(() => PrescriptionsService()); + locator.registerLazySingleton(() => ReferralService()); + locator.registerLazySingleton(() => MyReferralInPatientService()); + locator.registerLazySingleton(() => DischargedPatientService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -97,4 +103,5 @@ void setupLocator() { locator.registerFactory(() => InsuranceViewModel()); locator.registerFactory(() => RadiologyViewModel()); locator.registerFactory(() => PrescriptionsViewModel()); + locator.registerFactory(() => DischargedPatientViewModel()); } diff --git a/lib/lookups/patient_lookup.dart b/lib/lookups/patient_lookup.dart index 5418c357..d56e637c 100644 --- a/lib/lookups/patient_lookup.dart +++ b/lib/lookups/patient_lookup.dart @@ -36,5 +36,6 @@ enum vitalSignDetails { heart, PainScale, Weight, - Height + Height, + Oxygenation, } diff --git a/lib/main.dart b/lib/main.dart index e3db2e49..4e140920 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; 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'; @@ -8,10 +9,10 @@ import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import './config/size_config.dart'; -import 'core/viewModel/auth_view_model.dart'; -import 'core/viewModel/hospital_view_model.dart'; import './routes.dart'; import 'config/config.dart'; +import 'core/viewModel/auth_view_model.dart'; +import 'core/viewModel/hospital_view_model.dart'; import 'locator.dart'; void main() async { @@ -42,11 +43,15 @@ class MyApp extends StatelessWidget { ChangeNotifierProvider( create: (context) => LiveCareViewModel(), ), + StreamProvider.value( + value: RobotProvider().intStream(), + initialData: RobotProvider().setValue({}), + ) ], child: Consumer( builder: (context, projectProvider, child) => MaterialApp( showSemanticsDebugger: false, - title: 'Flutter Demo', + title: 'Doctors App', locale: projectProvider.appLocal, localizationsDelegates: [ TranslationBaseDelegate(), @@ -61,7 +66,7 @@ class MyApp extends StatelessWidget { primarySwatch: Colors.grey, primaryColor: Colors.grey, buttonColor: HexColor('#B8382C'), - fontFamily: 'WorkSans', + fontFamily: 'Poppins', dividerColor: Colors.grey[350], backgroundColor: Color.fromRGBO(255, 255, 255, 1), ), diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/models/SOAP/GetGetProgressNoteResModel.dart index ce6c0a12..4ae7ed8c 100644 --- a/lib/models/SOAP/GetGetProgressNoteResModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteResModel.dart @@ -1,4 +1,4 @@ -class GetPatientProgressNoteResModel { +class GetPatientProgressNoteResModel { int appointmentNo; int createdBy; String createdByName; diff --git a/lib/models/SOAP/PatchAssessmentReqModel.dart b/lib/models/SOAP/PatchAssessmentReqModel.dart new file mode 100644 index 00000000..8cbf5cb7 --- /dev/null +++ b/lib/models/SOAP/PatchAssessmentReqModel.dart @@ -0,0 +1,48 @@ +class PatchAssessmentReqModel { + int patientMRN; + int appointmentNo; + int episodeID; + String icdcode10Id; + String prevIcdCode10ID; + int conditionId; + int diagnosisTypeId; + bool complexDiagnosis; + String remarks; + + PatchAssessmentReqModel( + {this.patientMRN, + this.appointmentNo, + this.episodeID, + this.icdcode10Id, + this.prevIcdCode10ID, + this.conditionId, + this.diagnosisTypeId, + this.complexDiagnosis, + this.remarks}); + + PatchAssessmentReqModel.fromJson(Map json) { + patientMRN = json['PatientMRN']; + appointmentNo = json['AppointmentNo']; + episodeID = json['EpisodeID']; + icdcode10Id = json['Icdcode10Id']; + prevIcdCode10ID = json['PrevIcdCode10ID']; + conditionId = json['ConditionId']; + diagnosisTypeId = json['DiagnosisTypeId']; + complexDiagnosis = json['ComplexDiagnosis']; + remarks = json['Remarks']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMRN'] = this.patientMRN; + data['AppointmentNo'] = this.appointmentNo; + data['EpisodeID'] = this.episodeID; + data['Icdcode10Id'] = this.icdcode10Id; + data['PrevIcdCode10ID'] = this.prevIcdCode10ID; + data['ConditionId'] = this.conditionId; + data['DiagnosisTypeId'] = this.diagnosisTypeId; + data['ComplexDiagnosis'] = this.complexDiagnosis; + data['Remarks'] = this.remarks; + return data; + } +} diff --git a/lib/models/SOAP/my_selected_allergy.dart b/lib/models/SOAP/my_selected_allergy.dart index 5a6bd749..c4e52af7 100644 --- a/lib/models/SOAP/my_selected_allergy.dart +++ b/lib/models/SOAP/my_selected_allergy.dart @@ -5,6 +5,7 @@ class MySelectedAllergy { MasterKeyModel selectedAllergy; String remark; bool isChecked; + bool isExpanded; int createdBy; MySelectedAllergy( @@ -12,6 +13,7 @@ class MySelectedAllergy { this.selectedAllergy, this.remark, this.isChecked, + this.isExpanded = true, this.createdBy}); MySelectedAllergy.fromJson(Map json) { @@ -22,7 +24,8 @@ class MySelectedAllergy { ? new MasterKeyModel.fromJson(json['selectedAllergy']) : null; remark = json['remark']; - remark = json['isChecked']; + isChecked = json['isChecked']; + isExpanded = json['isExpanded']; createdBy = json['createdBy']; } @@ -35,7 +38,8 @@ class MySelectedAllergy { data['selectedAllergy'] = this.selectedAllergy.toJson(); } data['remark'] = this.remark; - data['isChecked'] = this.remark; + data['isChecked'] = this.isChecked; + data['isExpanded'] = this.isExpanded; data['createdBy'] = this.createdBy; return data; } diff --git a/lib/models/SOAP/post_physical_exam_request_model.dart b/lib/models/SOAP/post_physical_exam_request_model.dart index d1b64837..52836232 100644 --- a/lib/models/SOAP/post_physical_exam_request_model.dart +++ b/lib/models/SOAP/post_physical_exam_request_model.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class PostPhysicalExamRequestModel { List listHisProgNotePhysicalExaminationVM; diff --git a/lib/models/doctor/list_doctor_working_hours_table_model.dart b/lib/models/doctor/list_doctor_working_hours_table_model.dart index 5f1630bc..9b64e588 100644 --- a/lib/models/doctor/list_doctor_working_hours_table_model.dart +++ b/lib/models/doctor/list_doctor_working_hours_table_model.dart @@ -1,9 +1,12 @@ -import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; class ListDoctorWorkingHoursTable { DateTime date; String dayName; String workingHours; + String projectName; + String clinicName; + ListDoctorWorkingHoursTable({ this.date, @@ -12,9 +15,11 @@ class ListDoctorWorkingHoursTable { }); ListDoctorWorkingHoursTable.fromJson(Map json) { - date = Helpers.convertStringToDate(json['Date']); + date = DateUtils.convertStringToDate(json['Date']); dayName = json['DayName']; workingHours = json['WorkingHours']; + projectName = json['ProjectName']; + clinicName = json['ClinicName']; } Map toJson() { @@ -22,6 +27,8 @@ class ListDoctorWorkingHoursTable { data['Date'] = this.date; data['DayName'] = this.dayName; data['WorkingHours'] = this.workingHours; + data['ProjectName'] = this.projectName; + data['ClinicName'] = this.clinicName; return data; } diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/models/doctor/list_gt_my_patients_question_model.dart index 0d2cff9a..33a314e3 100644 --- a/lib/models/doctor/list_gt_my_patients_question_model.dart +++ b/lib/models/doctor/list_gt_my_patients_question_model.dart @@ -1,4 +1,6 @@ -import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; + + @@ -24,9 +26,9 @@ class ListGtMyPatientsQuestions { String dateofBirth; String mobileNumber; String emailAddress; - String doctorResponse; - String infoStatus; - Null clinicID; + int admissionNo; + int referringDoctor; + int lineItemNo; String age; String genderDescription; bool isVidaCall; @@ -53,9 +55,9 @@ class ListGtMyPatientsQuestions { this.dateofBirth, this.mobileNumber, this.emailAddress, - this.doctorResponse, - this.infoStatus, - this.clinicID, + this.admissionNo, + this.referringDoctor, + this.lineItemNo, this.age, this.genderDescription, this.isVidaCall}); @@ -68,8 +70,7 @@ class ListGtMyPatientsQuestions { patientID = json['PatientID']; doctorID = json['DoctorID']; requestType = json['RequestType']; - requestDate = Helpers.convertStringToDate(json['RequestDate']) ; - + requestDate = DateUtils.convertStringToDate(json['RequestDate']) ; requestTime = json['RequestTime']; remarks = json['Remarks']; status = json['Status']; @@ -83,9 +84,9 @@ class ListGtMyPatientsQuestions { dateofBirth = json['DateofBirth']; mobileNumber = json['MobileNumber']; emailAddress = json['EmailAddress']; - doctorResponse = json['DoctorResponse']; - infoStatus = json['InfoStatus']; - clinicID = json['ClinicID']; + admissionNo = json['AdmissionNo']; + referringDoctor = json['ReferringDoctor']; + lineItemNo = json['LineItemNo']; age = json['Age']; genderDescription = json['GenderDescription']; isVidaCall = json['IsVidaCall']; @@ -114,12 +115,13 @@ class ListGtMyPatientsQuestions { data['DateofBirth'] = this.dateofBirth; data['MobileNumber'] = this.mobileNumber; data['EmailAddress'] = this.emailAddress; - data['DoctorResponse'] = this.doctorResponse; - data['InfoStatus'] = this.infoStatus; - data['ClinicID'] = this.clinicID; + data['AdmissionNo'] = this.admissionNo; + data['ReferringDoctor'] = this.referringDoctor; + data['LineItemNo'] = this.lineItemNo; data['Age'] = this.age; data['GenderDescription'] = this.genderDescription; data['IsVidaCall'] = this.isVidaCall; return data; } } + diff --git a/lib/models/doctor/request_schedule.dart b/lib/models/doctor/request_schedule.dart index 949f07eb..03bafeca 100644 --- a/lib/models/doctor/request_schedule.dart +++ b/lib/models/doctor/request_schedule.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/config/config.dart'; + class RequestSchedule { int projectID; diff --git a/lib/models/patient/get_doctor_by_clinic_id_request.dart b/lib/models/patient/get_doctor_by_clinic_id_request.dart index a2b33e29..9504fc35 100644 --- a/lib/models/patient/get_doctor_by_clinic_id_request.dart +++ b/lib/models/patient/get_doctor_by_clinic_id_request.dart @@ -1,86 +1,66 @@ class DoctorsByClinicIdRequest { -/* - *@author: Ibrahim Albitar - *@Date:03/06/2020 - *@param: - *@return: - *@desc: DoctorsByClinicIdRequest - */ - + int clinicID; int projectID; - String clinicID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + bool continueDentalPlan; + bool isSearchAppointmnetByClinicID; + int patientID; + int gender; + bool isGetNearAppointment; + bool isVoiceCommand; + int latitude; + int longitude; + bool license; + bool isDentalAllowedBackend; - /* - { - "ProjectID": 21, - "ClinicID": "0", - "LanguageID": 2, - "stamp": "2020-06-03T11:22:04.702Z", - "IPAdress": "11.11.11.11", - "VersionID": 1.2, - "Channel": 9, - "TokenID": "gyIQFH4WWEm2Tq7xjYMjsg==", - "SessionID": "JBXRsDl37L", - "IsLoginForDoctorApp": true, - "PatientOutSA": false, - "PatientTypeID": 1 -} - */ DoctorsByClinicIdRequest( - {this.projectID, - this.clinicID, - this.languageID = 2, - this.stamp = "2020-06-03T11:22:04.702Z", - this.iPAdress = "11.11.11.11", - this.versionID = 1.2, - this.channel = 9, - this.tokenID, - this.sessionID = "JBXRsDl37L", - this.isLoginForDoctorApp = true, - this.patientOutSA = false, - this.patientTypeID = 1}); + { + this.clinicID, + this.projectID, + this.continueDentalPlan = false, + this.isSearchAppointmnetByClinicID = true, + this.patientID, + this.gender, + this.isGetNearAppointment = false, + this.isVoiceCommand = true, + this.latitude = 0, + this.longitude = 0, + this.license = true, + this.isDentalAllowedBackend = false, + }); + DoctorsByClinicIdRequest.fromJson(Map json) { - projectID = json['ProjectID']; clinicID = json['ClinicID']; - languageID = json['LanguageID']; - stamp = json['stamp']; - iPAdress = json['IPAdress']; - versionID = json['VersionID']; - channel = json['Channel']; - tokenID = json['TokenID']; - sessionID = json['SessionID']; - isLoginForDoctorApp = json['IsLoginForDoctorApp']; - patientOutSA = json['PatientOutSA']; - patientTypeID = json['PatientTypeID']; + projectID = json['ProjectID']; + continueDentalPlan = json['ContinueDentalPlan']; + isSearchAppointmnetByClinicID = json['IsSearchAppointmnetByClinicID']; + patientID = json['PatientID']; + gender = json['gender']; + isGetNearAppointment = json['IsGetNearAppointment']; + isVoiceCommand = json['IsVoiceCommand']; + latitude = json['Latitude']; + longitude = json['Longitude']; + license = json['License']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; } Map toJson() { final Map data = new Map(); - data['ProjectID'] = this.projectID; data['ClinicID'] = this.clinicID; - data['LanguageID'] = this.languageID; - data['stamp'] = this.stamp; - data['IPAdress'] = this.iPAdress; - data['VersionID'] = this.versionID; - data['Channel'] = this.channel; - data['TokenID'] = this.tokenID; - data['SessionID'] = this.sessionID; - data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; - data['PatientOutSA'] = this.patientOutSA; - data['PatientTypeID'] = this.patientTypeID; + data['ProjectID'] = this.projectID; + data['ContinueDentalPlan'] = this.continueDentalPlan; + data['IsSearchAppointmnetByClinicID'] = this.isSearchAppointmnetByClinicID; + data['PatientID'] = this.patientID; + data['gender'] = this.gender; + data['IsGetNearAppointment'] = this.isGetNearAppointment; + data['IsVoiceCommand'] = this.isVoiceCommand; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['License'] = this.license; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; return data; + } } diff --git a/lib/models/patient/lab_orders/lab_orders_res_model.dart b/lib/models/patient/lab_orders/lab_orders_res_model.dart index 48d3dc27..893b49ae 100644 --- a/lib/models/patient/lab_orders/lab_orders_res_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_res_model.dart @@ -1,11 +1,6 @@ -/* - *@author: Elham Rababah - *@Date:6/5/2020 - *@param: - *@return:LabOrdersResModel - *@desc: LabOrdersResModel class - */ -import 'package:doctor_app_flutter/util/helpers.dart'; + + +import 'package:doctor_app_flutter/util/date-utils.dart'; class LabOrdersResModel { String setupID; @@ -67,7 +62,7 @@ class LabOrdersResModel { status = json['Status']; createdBy = json['CreatedBy']; createdByN = json['CreatedByN']; - createdOn = Helpers.convertStringToDate(json['CreatedOn']); + createdOn = DateUtils.convertStringToDate(json['CreatedOn']); editedBy = json['EditedBy']; editedByN = json['EditedByN']; editedOn = json['EditedOn']; diff --git a/lib/models/patient/my_referral/PendingReferral.dart b/lib/models/patient/my_referral/PendingReferral.dart index 9da17985..6d3f0b83 100644 --- a/lib/models/patient/my_referral/PendingReferral.dart +++ b/lib/models/patient/my_referral/PendingReferral.dart @@ -1,8 +1,14 @@ +import '../patiant_info_model.dart'; + class PendingReferral { + PatiantInformtion patientDetails; + String doctorImageUrl; + String nationalityFlagUrl; String responded; String answerFromTarget; String createdOn; int data; + int isSameBranch; String editedOn; int interBranchReferral; int patientID; @@ -27,41 +33,51 @@ class PendingReferral { String targetSetupID; bool isReferralDoctorSameBranch; - PendingReferral( - {this.responded, - this.answerFromTarget, - this.createdOn, - this.data, - this.editedOn, - this.interBranchReferral, - this.patientID, - this.patientName, - this.patientType, - this.referralNo, - this.referralStatus, - this.referredByDoctorInfo, - this.referredFromBranchName, - this.referredOn, - this.referredType, - this.remarksFromSource, - this.respondedOn, - this.sourceAppointmentNo, - this.sourceProjectId, - this.sourceSetupID, - this.startDate, - this.targetAppointmentNo, - this.targetClinicID, - this.targetDoctorID, - this.targetProjectId, - this.targetSetupID, - this.isReferralDoctorSameBranch, - }); + PendingReferral({ + this.patientDetails, + this.doctorImageUrl, + this.nationalityFlagUrl, + this.responded, + this.answerFromTarget, + this.createdOn, + this.data, + this.isSameBranch, + this.editedOn, + this.interBranchReferral, + this.patientID, + this.patientName, + this.patientType, + this.referralNo, + this.referralStatus, + this.referredByDoctorInfo, + this.referredFromBranchName, + this.referredOn, + this.referredType, + this.remarksFromSource, + this.respondedOn, + this.sourceAppointmentNo, + this.sourceProjectId, + this.sourceSetupID, + this.startDate, + this.targetAppointmentNo, + this.targetClinicID, + this.targetDoctorID, + this.targetProjectId, + this.targetSetupID, + this.isReferralDoctorSameBranch, + }); PendingReferral.fromJson(Map json) { + patientDetails = json['patientDetails'] != null + ? PatiantInformtion.fromJson(json['patientDetails']) + : null; + doctorImageUrl = json['DoctorImageURL']; + nationalityFlagUrl = json['NationalityFlagURL']; responded = json['Responded']; answerFromTarget = json['answerFromTarget']; createdOn = json['createdOn']; data = json['data']; + isSameBranch = json['isSameBranch']; editedOn = json['editedOn']; interBranchReferral = json['interBranchReferral']; patientID = json['patientID']; @@ -88,10 +104,13 @@ class PendingReferral { Map toJson() { final Map data = new Map(); + data['DoctorImageURL'] = this.doctorImageUrl; + data['NationalityFlagURL'] = this.nationalityFlagUrl; data['Responded'] = this.responded; data['answerFromTarget'] = this.answerFromTarget; data['createdOn'] = this.createdOn; data['data'] = this.data; + data['isSameBranch'] = this.isSameBranch; data['editedOn'] = this.editedOn; data['interBranchReferral'] = this.interBranchReferral; data['patientID'] = this.patientID; @@ -116,4 +135,4 @@ class PendingReferral { data['targetSetupID'] = this.targetSetupID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/my_referral/clinic-doctor.dart b/lib/models/patient/my_referral/clinic-doctor.dart new file mode 100644 index 00000000..843f636c --- /dev/null +++ b/lib/models/patient/my_referral/clinic-doctor.dart @@ -0,0 +1,169 @@ +class ClinicDoctor { + int clinicID; + String clinicName; + String doctorTitle; + int iD; + String name; + int projectID; + String projectName; + int actualDoctorRate; + int clinicRoomNo; + String date; + String dayName; + int doctorID; + String doctorImageURL; + String doctorProfile; + String doctorProfileInfo; + int doctorRate; + int gender; + String genderDescription; + bool isAppointmentAllowed; + bool isDoctorAllowVedioCall; + bool isDoctorDummy; + bool isLiveCare; + String latitude; + String longitude; + String nationalityFlagURL; + String nationalityID; + String nationalityName; + String nearestFreeSlot; + int noOfPatientsRate; + String originalClinicID; + int personRate; + int projectDistanceInKiloMeters; + String qR; + String qRString; + int rateNumber; + String serviceID; + String setupID; + List speciality; + String workingHours; + + ClinicDoctor( + {this.clinicID, + this.clinicName, + this.doctorTitle, + this.iD, + this.name, + this.projectID, + this.projectName, + this.actualDoctorRate, + this.clinicRoomNo, + this.date, + this.dayName, + this.doctorID, + this.doctorImageURL, + this.doctorProfile, + this.doctorProfileInfo, + this.doctorRate, + this.gender, + this.genderDescription, + this.isAppointmentAllowed, + this.isDoctorAllowVedioCall, + this.isDoctorDummy, + this.isLiveCare, + this.latitude, + this.longitude, + this.nationalityFlagURL, + this.nationalityID, + this.nationalityName, + this.nearestFreeSlot, + this.noOfPatientsRate, + this.originalClinicID, + this.personRate, + this.projectDistanceInKiloMeters, + this.qR, + this.qRString, + this.rateNumber, + this.serviceID, + this.setupID, + this.speciality, + this.workingHours}); + + ClinicDoctor.fromJson(Map json) { + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + doctorTitle = json['DoctorTitle']; + iD = json['ID']; + name = json['Name']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + actualDoctorRate = json['ActualDoctorRate']; + clinicRoomNo = json['ClinicRoomNo']; + date = json['Date']; + dayName = json['DayName']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorProfile = json['DoctorProfile']; + doctorProfileInfo = json['DoctorProfileInfo']; + doctorRate = json['DoctorRate']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isAppointmentAllowed = json['IsAppointmentAllowed']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isDoctorDummy = json['IsDoctorDummy']; + isLiveCare = json['IsLiveCare']; + latitude = json['Latitude']; + longitude = json['Longitude']; + nationalityFlagURL = json['NationalityFlagURL']; + nationalityID = json['NationalityID']; + nationalityName = json['NationalityName']; + nearestFreeSlot = json['NearestFreeSlot']; + noOfPatientsRate = json['NoOfPatientsRate']; + originalClinicID = json['OriginalClinicID']; + personRate = json['PersonRate']; + projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters']; + qR = json['QR']; + qRString = json['QRString']; + rateNumber = json['RateNumber']; + serviceID = json['ServiceID']; + setupID = json['SetupID']; + speciality = json['Speciality'].cast(); + workingHours = json['WorkingHours']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['DoctorTitle'] = this.doctorTitle; + data['ID'] = this.iD; + data['Name'] = this.name; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicRoomNo'] = this.clinicRoomNo; + data['Date'] = this.date; + data['DayName'] = this.dayName; + data['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorProfile'] = this.doctorProfile; + data['DoctorProfileInfo'] = this.doctorProfileInfo; + data['DoctorRate'] = this.doctorRate; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsDoctorDummy'] = this.isDoctorDummy; + data['IsLiveCare'] = this.isLiveCare; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NationalityID'] = this.nationalityID; + data['NationalityName'] = this.nationalityName; + data['NearestFreeSlot'] = this.nearestFreeSlot; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OriginalClinicID'] = this.originalClinicID; + data['PersonRate'] = this.personRate; + data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters; + data['QR'] = this.qR; + data['QRString'] = this.qRString; + data['RateNumber'] = this.rateNumber; + data['ServiceID'] = this.serviceID; + data['SetupID'] = this.setupID; + data['Speciality'] = this.speciality; + data['WorkingHours'] = this.workingHours; + return data; + } + +} \ No newline at end of file diff --git a/lib/models/patient/my_referral/my_referral_patient_model.dart b/lib/models/patient/my_referral/my_referral_patient_model.dart index e18dd546..ab14a82f 100644 --- a/lib/models/patient/my_referral/my_referral_patient_model.dart +++ b/lib/models/patient/my_referral/my_referral_patient_model.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; class MyReferralPatientModel { int projectID; @@ -142,7 +142,7 @@ class MyReferralPatientModel { referralResponseOn = json['ReferralResponseOn']; priority = json['Priority']; frequency = json['Frequency']; - mAXResponseTime = Helpers.convertStringToDate(json['MAXResponseTime']); + mAXResponseTime = DateUtils.convertStringToDate(json['MAXResponseTime']); age = json['Age']; frequencyDescription = json['FrequencyDescription']; genderDescription = json['GenderDescription']; diff --git a/lib/models/patient/my_referral/my_referred_patient_model.dart b/lib/models/patient/my_referral/my_referred_patient_model.dart index 850c29cb..cc0381d8 100644 --- a/lib/models/patient/my_referral/my_referred_patient_model.dart +++ b/lib/models/patient/my_referral/my_referred_patient_model.dart @@ -1,223 +1,265 @@ -import 'dart:convert'; - -import 'package:doctor_app_flutter/util/helpers.dart'; - -MyReferredPatientModel myReferredPatientModelFromJson(String str) => MyReferredPatientModel.fromJson(json.decode(str)); - -String myReferredPatientModelToJson(MyReferredPatientModel data) => json.encode(data.toJson()); class MyReferredPatientModel { - MyReferredPatientModel({ - this.projectId, - this.lineItemNo, - this.doctorId, - this.patientId, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomId, - this.bedId, - this.nursingStationId, - this.description, - this.nationalityName, - this.nationalityNameN, - this.clinicDescription, - this.clinicDescriptionN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.maxResponseTime, - this.dischargeDate, - this.age, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nursingStationName, - this.priorityDescription, - this.referralClinicDescription, - this.referralDoctorName, - this.isReferralDoctorSameBranch, - }); + String rowID; + int projectID; + int lineItemNo; + int doctorID; + int patientID; + String doctorName; + String doctorNameN; + String firstName; + String middleName; + String lastName; + String firstNameN; + String middleNameN; + String lastNameN; + int gender; + String dateofBirth; + String mobileNumber; + String emailAddress; + String patientIdentificationNo; + int patientType; + String admissionNo; + String admissionDate; + String roomID; + String bedID; + String nursingStationID; + String description; + String nationalityName; + String nationalityNameN; + String clinicDescription; + String clinicDescriptionN; + int referralDoctor; + int referringDoctor; + int referralClinic; + int referringClinic; + int referralStatus; + String referralDate; + String referringDoctorRemarks; + String referredDoctorRemarks; + String referralResponseOn; + int priority; + int frequency; + String mAXResponseTime; + int episodeID; + int appointmentNo; + String appointmentDate; + int appointmentType; + int patientMRN; + String createdOn; + int clinicID; + String nationalityID; + String age; + String doctorImageURL; + String frequencyDescription; + String genderDescription; + bool isDoctorLate; + bool isDoctorResponse; + String nationalityFlagURL; + String nursingStationName; + String priorityDescription; + String referringClinicDescription; + String referralDoctorName; + String referralClinicDescription; + String referringDoctorName; + bool isReferralDoctorSameBranch; - int projectId; - int lineItemNo; - int doctorId; - int patientId; - String doctorName; - dynamic doctorNameN; - String firstName; - String middleName; - String lastName; - dynamic firstNameN; - dynamic middleNameN; - dynamic lastNameN; - int gender; - String dateofBirth; - String mobileNumber; - String emailAddress; - String patientIdentificationNo; - int patientType; - String admissionNo; - String admissionDate; - String roomId; - String bedId; - dynamic nursingStationId; - dynamic description; - String nationalityName; - dynamic nationalityNameN; - String clinicDescription; - dynamic clinicDescriptionN; - int referralDoctor; - int referringDoctor; - int referralClinic; - int referringClinic; - int referralStatus; - String referralDate; - String referringDoctorRemarks; - String referredDoctorRemarks; - String referralResponseOn; - int priority; - int frequency; - DateTime maxResponseTime; - dynamic dischargeDate; - String age; - String frequencyDescription; - String genderDescription; - bool isDoctorLate; - bool isDoctorResponse; - String nursingStationName; - String priorityDescription; - String referralClinicDescription; - String referralDoctorName; - bool isReferralDoctorSameBranch; + MyReferredPatientModel({ + this.rowID, + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.episodeID, + this.appointmentNo, + this.appointmentDate, + this.appointmentType, + this.patientMRN, + this.createdOn, + this.clinicID, + this.nationalityID, + this.age, + this.doctorImageURL, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nationalityFlagURL, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName, + this.isReferralDoctorSameBranch, + this.referralDoctorName, + this.referralClinicDescription, + }); - factory MyReferredPatientModel.fromJson(Map json) => MyReferredPatientModel( - projectId: json["ProjectID"], - lineItemNo: json["LineItemNo"], - doctorId: json["DoctorID"], - patientId: json["PatientID"], - doctorName: json["DoctorName"], - doctorNameN: json["DoctorNameN"], - firstName: json["FirstName"], - middleName: json["MiddleName"], - lastName: json["LastName"], - firstNameN: json["FirstNameN"], - middleNameN: json["MiddleNameN"], - lastNameN: json["LastNameN"], - gender: json["Gender"], - dateofBirth: json["DateofBirth"], - mobileNumber: json["MobileNumber"], - emailAddress: json["EmailAddress"], - patientIdentificationNo: json["PatientIdentificationNo"], - patientType: json["PatientType"], - admissionNo: json["AdmissionNo"], - admissionDate: json["AdmissionDate"], - roomId: json["RoomID"], - bedId: json["BedID"], - nursingStationId: json["NursingStationID"], - description: json["Description"], - nationalityName: json["NationalityName"], - nationalityNameN: json["NationalityNameN"], - clinicDescription: json["ClinicDescription"], - clinicDescriptionN: json["ClinicDescriptionN"], - referralDoctor: json["ReferralDoctor"], - referringDoctor: json["ReferringDoctor"], - referralClinic: json["ReferralClinic"], - referringClinic: json["ReferringClinic"], - referralStatus: json["ReferralStatus"], - referralDate: json["ReferralDate"], - referringDoctorRemarks: json["ReferringDoctorRemarks"], - referredDoctorRemarks: json["ReferredDoctorRemarks"], - referralResponseOn: json["ReferralResponseOn"], - priority: json["Priority"], - frequency: json["Frequency"], - maxResponseTime: Helpers.convertStringToDate(json['MAXResponseTime']),//json["MAXResponseTime"], - dischargeDate: json["DischargeDate"], - age: json["Age"], - frequencyDescription: json["FrequencyDescription"], - genderDescription: json["GenderDescription"], - isDoctorLate: json["IsDoctorLate"], - isDoctorResponse: json["IsDoctorResponse"], - nursingStationName: json["NursingStationName"], - priorityDescription: json["PriorityDescription"], - referralClinicDescription: json["ReferralClinicDescription"], - referralDoctorName: json["ReferralDoctorName"], - ); + MyReferredPatientModel.fromJson(Map json) { + rowID = json['RowID']; + projectID = json['ProjectID']; + lineItemNo = json['LineItemNo']; + doctorID = json['DoctorID']; + patientID = json['PatientID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + mobileNumber = json['MobileNumber']; + emailAddress = json['EmailAddress']; + patientIdentificationNo = json['PatientIdentificationNo']; + patientType = json['PatientType']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + roomID = json['RoomID']; + bedID = json['BedID']; + nursingStationID = json['NursingStationID']; + description = json['Description']; + nationalityName = json['NationalityName']; + nationalityNameN = json['NationalityNameN']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + referralDoctor = json['ReferralDoctor']; + referringDoctor = json['ReferringDoctor']; + referralClinic = json['ReferralClinic']; + referringClinic = json['ReferringClinic']; + referralStatus = json['ReferralStatus']; + referralDate = json['ReferralDate']; + referringDoctorRemarks = json['ReferringDoctorRemarks']; + referredDoctorRemarks = json['ReferredDoctorRemarks']; + referralResponseOn = json['ReferralResponseOn']; + priority = json['Priority']; + frequency = json['Frequency']; + mAXResponseTime = json['MAXResponseTime']; + episodeID = json['EpisodeID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentType = json['AppointmentType']; + patientMRN = json['PatientMRN']; + createdOn = json['CreatedOn']; + clinicID = json['ClinicID']; + nationalityID = json['NationalityID']; + age = json['Age']; + doctorImageURL = json['DoctorImageURL']; + frequencyDescription = json['FrequencyDescription']; + genderDescription = json['GenderDescription']; + isDoctorLate = json['IsDoctorLate']; + isDoctorResponse = json['IsDoctorResponse']; + nationalityFlagURL = json['NationalityFlagURL']; + nursingStationName = json['NursingStationName']; + priorityDescription = json['PriorityDescription']; + referringClinicDescription = json['ReferringClinicDescription']; + referringDoctorName = json['ReferringDoctorName']; + referralDoctorName = json['ReferralDoctorName']; + referralClinicDescription = json['ReferralClinicDescription']; + } - Map toJson() => { - "ProjectID": projectId, - "LineItemNo": lineItemNo, - "DoctorID": doctorId, - "PatientID": patientId, - "DoctorName": doctorName, - "DoctorNameN": doctorNameN, - "FirstName": firstName, - "MiddleName": middleName, - "LastName": lastName, - "FirstNameN": firstNameN, - "MiddleNameN": middleNameN, - "LastNameN": lastNameN, - "Gender": gender, - "DateofBirth": dateofBirth, - "MobileNumber": mobileNumber, - "EmailAddress": emailAddress, - "PatientIdentificationNo": patientIdentificationNo, - "PatientType": patientType, - "AdmissionNo": admissionNo, - "AdmissionDate": admissionDate, - "RoomID": roomId, - "BedID": bedId, - "NursingStationID": nursingStationId, - "Description": description, - "NationalityName": nationalityName, - "NationalityNameN": nationalityNameN, - "ClinicDescription": clinicDescription, - "ClinicDescriptionN": clinicDescriptionN, - "ReferralDoctor": referralDoctor, - "ReferringDoctor": referringDoctor, - "ReferralClinic": referralClinic, - "ReferringClinic": referringClinic, - "ReferralStatus": referralStatus, - "ReferralDate": referralDate, - "ReferringDoctorRemarks": referringDoctorRemarks, - "ReferredDoctorRemarks": referredDoctorRemarks, - "ReferralResponseOn": referralResponseOn, - "Priority": priority, - "Frequency": frequency, - "MAXResponseTime": maxResponseTime, - "DischargeDate": dischargeDate, - "Age": age, - "FrequencyDescription": frequencyDescription, - "GenderDescription": genderDescription, - "IsDoctorLate": isDoctorLate, - "IsDoctorResponse": isDoctorResponse, - "NursingStationName": nursingStationName, - "PriorityDescription": priorityDescription, - "ReferralClinicDescription": referralClinicDescription, - "ReferralDoctorName": referralDoctorName, - }; + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ProjectID'] = this.projectID; + data['LineItemNo'] = this.lineItemNo; + data['DoctorID'] = this.doctorID; + data['PatientID'] = this.patientID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['MobileNumber'] = this.mobileNumber; + data['EmailAddress'] = this.emailAddress; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['PatientType'] = this.patientType; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['NursingStationID'] = this.nursingStationID; + data['Description'] = this.description; + data['NationalityName'] = this.nationalityName; + data['NationalityNameN'] = this.nationalityNameN; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['ReferralDoctor'] = this.referralDoctor; + data['ReferringDoctor'] = this.referringDoctor; + data['ReferralClinic'] = this.referralClinic; + data['ReferringClinic'] = this.referringClinic; + data['ReferralStatus'] = this.referralStatus; + data['ReferralDate'] = this.referralDate; + data['ReferringDoctorRemarks'] = this.referringDoctorRemarks; + data['ReferredDoctorRemarks'] = this.referredDoctorRemarks; + data['ReferralResponseOn'] = this.referralResponseOn; + data['Priority'] = this.priority; + data['Frequency'] = this.frequency; + data['MAXResponseTime'] = this.mAXResponseTime; + data['EpisodeID'] = this.episodeID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentType'] = this.appointmentType; + data['PatientMRN'] = this.patientMRN; + data['CreatedOn'] = this.createdOn; + data['ClinicID'] = this.clinicID; + data['NationalityID'] = this.nationalityID; + data['Age'] = this.age; + data['DoctorImageURL'] = this.doctorImageURL; + data['FrequencyDescription'] = this.frequencyDescription; + data['GenderDescription'] = this.genderDescription; + data['IsDoctorLate'] = this.isDoctorLate; + data['IsDoctorResponse'] = this.isDoctorResponse; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NursingStationName'] = this.nursingStationName; + data['PriorityDescription'] = this.priorityDescription; + data['ReferringClinicDescription'] = this.referringClinicDescription; + data['ReferringDoctorName'] = this.referringDoctorName; + data['ReferralDoctorName'] = this.referralDoctorName; + data['ReferralClinicDescription'] = this.referralClinicDescription; + return data; + } } - diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 8903791c..a794cf29 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -11,8 +11,8 @@ class PatiantInformtion { String arrivedOn; int clinicGroupId; String companyName; - Null dischargeStatus; - Null doctorDetails; + dynamic dischargeStatus; + dynamic doctorDetails; int doctorId; String endTime; int episodeNo; @@ -60,6 +60,7 @@ class PatiantInformtion { int patientStatusType; int visitTypeId; String startTimes; + String dischargeDate; PatiantInformtion( {this.patientDetails, this.projectId, @@ -119,7 +120,7 @@ class PatiantInformtion { this.nationalityFlagURL, this.patientStatusType, this.visitTypeId, - this.startTimes}); + this.startTimes,this.dischargeDate}); factory PatiantInformtion.fromJson(Map json) => PatiantInformtion( @@ -175,25 +176,26 @@ class PatiantInformtion { startTime: json["startTime"], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentType: json['appointmentType'], - appointmentTypeId: json['appointmentTypeId'], - arrivedOn: json['arrivedOn'], + appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'], + arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'], clinicGroupId: json['clinicGroupId'], companyName: json['companyName'], dischargeStatus: json['dischargeStatus'], doctorDetails: json['doctorDetails'], endTime: json['endTime'], - episodeNo: json['episodeNo'] ?? json['EpisodeID'], + episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'], fallRiskScore: json['fallRiskScore'], isSigned: json['isSigned'], medicationOrders: json['medicationOrders'], nationality: json['nationality'] ?? json['NationalityNameN'], patientMRN: json['patientMRN'] ?? json['PatientMRN'], - visitType: json['visitType'] ?? json['visitType'], + visitType: json['visitType'] ?? json['visitType']?? json['visitType'], nationalityFlagURL: json['NationalityFlagURL'] ?? json['NationalityFlagURL'], patientStatusType: - json['patientStatusType'] ?? json['patientStatusType'], - visitTypeId: json['visitTypeId'] ?? json['visitTypeId'], + json['patientStatusType'] ?? json['PatientStatusType'], + visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'], startTimes: json['StartTime'] ?? json['StartTime'], + dischargeDate: json['DischargeDate'] , ); } diff --git a/lib/models/patient/patient_model.dart b/lib/models/patient/patient_model.dart index 08b5d1d0..7368c538 100644 --- a/lib/models/patient/patient_model.dart +++ b/lib/models/patient/patient_model.dart @@ -29,7 +29,8 @@ class PatientModel { bool IsLoginForDoctorApp; bool PatientOutSA; int Searchtype; - + String IdentificationNo; + String MobileNo; int get getProjectID => ProjectID; set setProjectID(int ProjectID) => this.ProjectID = ProjectID; @@ -132,7 +133,9 @@ class PatientModel { this.SessionID, this.IsLoginForDoctorApp, this.PatientOutSA, - this.Searchtype}); + this.Searchtype, + this.IdentificationNo, + this.MobileNo}); factory PatientModel.fromJson(Map json) => PatientModel( FirstName: json["FirstName"], @@ -162,6 +165,8 @@ class PatientModel { data['IsLoginForDoctorApp'] = this.IsLoginForDoctorApp; data['PatientOutSA'] = this.PatientOutSA; data['Searchtype'] = this.Searchtype; + data['IdentificationNo'] = this.IdentificationNo; + data['MobileNo'] = this.MobileNo; return data; } } diff --git a/lib/models/patient/prescription/prescription_report_for_in_patient.dart b/lib/models/patient/prescription/prescription_report_for_in_patient.dart index 9b88279e..8e643866 100644 --- a/lib/models/patient/prescription/prescription_report_for_in_patient.dart +++ b/lib/models/patient/prescription/prescription_report_for_in_patient.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; class PrescriptionReportForInPatient { int admissionNo; @@ -125,7 +125,7 @@ class PrescriptionReportForInPatient { orderNo = json['OrderNo']; patientID = json['PatientID']; pharmacyRemarks = json['PharmacyRemarks']; - prescriptionDatetime = Helpers.convertStringToDate(json['PrescriptionDatetime']); + prescriptionDatetime = DateUtils.convertStringToDate(json['PrescriptionDatetime']); prescriptionNo = json['PrescriptionNo']; processedBy = json['ProcessedBy']; projectID = json['ProjectID']; @@ -138,11 +138,11 @@ class PrescriptionReportForInPatient { routeId = json['RouteId']; routeN = json['RouteN']; setupID = json['SetupID']; - startDatetime = Helpers.convertStringToDate(json['StartDatetime']) ; + startDatetime = DateUtils.convertStringToDate(json['StartDatetime']) ; status = json['Status']; statusDescription = json['StatusDescription']; statusDescriptionN = json['StatusDescriptionN']; - stopDatetime = Helpers.convertStringToDate(json['StopDatetime']); + stopDatetime = DateUtils.convertStringToDate(json['StopDatetime']); unitofMeasurement = json['UnitofMeasurement']; unitofMeasurementDescription = json['UnitofMeasurementDescription']; unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN']; diff --git a/lib/models/patient/request_my_referral_patient_model.dart b/lib/models/patient/request_my_referral_patient_model.dart index adaf9e5c..219b7b2a 100644 --- a/lib/models/patient/request_my_referral_patient_model.dart +++ b/lib/models/patient/request_my_referral_patient_model.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/config/config.dart'; + class RequestMyReferralPatientModel { int projectID; diff --git a/lib/models/patient/vital_sign/patient-vital-sign-history.dart b/lib/models/patient/vital_sign/patient-vital-sign-history.dart index 40ff5d00..e5f5abd0 100644 --- a/lib/models/patient/vital_sign/patient-vital-sign-history.dart +++ b/lib/models/patient/vital_sign/patient-vital-sign-history.dart @@ -35,7 +35,7 @@ class VitalSignHistory { var triageCategory; var gCScore; var lineItemNo; - DateTime vitalSignDate; + var vitalSignDate; var actualTimeTaken; var sugarLevel; var fBS; diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/models/patient/vital_sign/vital_sign_res_model.dart index de96bb45..09bb1797 100644 --- a/lib/models/patient/vital_sign/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_res_model.dart @@ -5,7 +5,7 @@ *@return:VitalSignResModel *@desc: VitalSignResModel class */ -import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; class VitalSignResModel { var transNo; @@ -170,7 +170,7 @@ class VitalSignResModel { triageCategory = json['TriageCategory']; gCScore = json['GCScore']; lineItemNo = json['LineItemNo']; - vitalSignDate = json['VitalSignDate'] !=null? Helpers.convertStringToDate(json['VitalSignDate']): new DateTime.now(); + vitalSignDate = json['VitalSignDate'] !=null? DateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); actualTimeTaken = json['ActualTimeTaken']; sugarLevel = json['SugarLevel']; fBS = json['FBS']; diff --git a/lib/models/sickleave/get_all_sickleave_response.dart b/lib/models/sickleave/get_all_sickleave_response.dart index f3fc8032..de831213 100644 --- a/lib/models/sickleave/get_all_sickleave_response.dart +++ b/lib/models/sickleave/get_all_sickleave_response.dart @@ -7,7 +7,7 @@ class GetAllSickLeaveResponse { int requestNo; String startDate; int status; - + String statusDescription; GetAllSickLeaveResponse( {this.appointmentNo, this.isExtendedLeave, @@ -16,7 +16,8 @@ class GetAllSickLeaveResponse { this.remarks, this.requestNo, this.startDate, - this.status}); + this.status, + this.statusDescription}); GetAllSickLeaveResponse.fromJson(Map json) { appointmentNo = json['appointmentNo']; @@ -27,6 +28,7 @@ class GetAllSickLeaveResponse { requestNo = json['requestNo']; startDate = json['startDate']; status = json['status']; + statusDescription = json['statusDescription']; } Map toJson() { @@ -39,6 +41,7 @@ class GetAllSickLeaveResponse { data['requestNo'] = this.requestNo; data['startDate'] = this.startDate; data['status'] = this.status; + data['statusDescription'] = this.statusDescription; return data; } } diff --git a/lib/root_page.dart b/lib/root_page.dart index fe35a246..3bd24a81 100644 --- a/lib/root_page.dart +++ b/lib/root_page.dart @@ -5,7 +5,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'config/config.dart'; import 'landing_page.dart'; class RootPage extends StatelessWidget { diff --git a/lib/routes.dart b/lib/routes.dart index dc905ba8..c9a77e70 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,100 +1,51 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/root_page.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart'; import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart'; - +import 'package:doctor_app_flutter/screens/patients/profile/note/progress_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; -import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; +import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart'; -import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart'; -import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart'; -import './screens/QR_reader_screen.dart'; -import './screens/auth/change_password_screen.dart'; import './screens/auth/login_screen.dart'; import './screens/auth/verification_methods_screen.dart'; -import './screens/auth/verify_account_screen.dart'; -import './screens/blood_bank_screen.dart'; -import './screens/dashboard_screen.dart'; -import './screens/doctor/message_screen.dart'; -import './screens/doctor/my_schedule_screen.dart'; -import './screens/doctor/services_screen.dart'; -import './screens/medicine/medicine_search_screen.dart'; -import './screens/medicine/pharmacies_list_screen.dart'; -import './screens/patients/patient_search_screen.dart'; -import './screens/patients/patients_referred_screen.dart'; import './screens/patients/patients_screen.dart'; -import './screens/patients/profile/insurance_approvals_screen.dart'; -import './screens/patients/profile/lab_result/lab_orders_screen.dart'; -import './screens/patients/profile/patient_orders_screen.dart'; import './screens/patients/profile/patient_profile_screen.dart'; -import './screens/patients/profile/prescriptions/prescriptions_screen.dart'; -import './screens/patients/profile/progress_note_screen.dart'; -import './screens/patients/profile/radiology/radiology_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart'; -import './screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; -import './screens/profile_screen.dart'; -import './screens/settings/settings_screen.dart'; import 'landing_page.dart'; -import 'screens/doctor/doctor_reply_screen.dart'; -import 'screens/live_care/panding_list.dart'; -import 'screens/patients/profile/admission-request/admission-request-detail-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-first-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-third-screen.dart'; import 'screens/patients/profile/admission-request/admission-request_second-screen.dart'; +import 'screens/patients/profile/note/progress_note_screen.dart'; import 'screens/patients/profile/referral/my-referral-detail-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart'; -import 'screens/prescription/prescription_screen.dart'; -import 'screens/patients/profile/vital_sign/vital-signs-screen.dart'; const String INIT_ROUTE = ROOT; const String ROOT = 'root'; const String HOME = '/'; const String LOGIN = 'login'; -const String PROFILE = 'profile'; -const String CHANGE_PASSWORD = 'change-password'; -const String VERIFY_ACCOUNT = 'verify-account'; const String VERIFICATION_METHODS = 'verification-methods'; -const String MY_SCHEDULE = 'my-schedule'; -const String QR_READER = 'qr-reader'; -const String PATIENT_SEARCH = 'patients/patient-search'; const String PATIENTS = 'patients/patients'; const String PATIENTS_PROFILE = 'patients/patients-profile'; -const String PATIENTS_REFERRED = 'patients/patients-referred'; -const String BLOOD_BANK = 'blood-bank'; -const String DOCTOR_REPLY = 'doctor-reply'; -const String MEDICINE_SEARCH = 'medicine/medicine-search'; -const String PHARMACIES_LIST = 'medicine/pharmacies-list'; -const String MESSAGES = 'messages'; -const String SERVICES = 'services'; -const String SETTINGS = 'settings'; -const String VITAL_SIGN = 'patients/vital-sign'; -const String LAB_ORDERS = 'patients/lab_orders'; const String LAB_RESULT = 'patients/lab_result'; -const String PRESCRIPTIONS = 'patients/prescription'; const String MEDICAL_FILE = 'patients/radiology'; const String PROGRESS_NOTE = 'patients/progress-note'; -const String REFER_PATIENT = 'patients/refer-patient'; +const String ORDER_NOTE = 'patients/order-note'; + const String MY_REFERRAL_DETAIL = 'my_referral_detail'; const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor'; -const String PATIENT_ORDERS = 'patients/patient_orders'; -const String PATIENT_INSURANCE_APPROVALS = 'patients/patient_insurance_approvals'; -const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new'; +const String REFER_IN_PATIENT_TO_DOCTOR = 'patients/refer-in-patient-to-doctor'; +const String PATIENT_INSURANCE_APPROVALS_NEW = + 'patients/patient_insurance_approvals_new'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; -const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data'; const String CREATE_EPISODE = 'patients/create-episode'; const String UPDATE_EPISODE = 'patients/update-episode'; const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request'; @@ -103,83 +54,43 @@ const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third'; const String PATIENT_UCAF_REQUEST = 'patients/ucaf'; const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail'; const String PATIENT_ECG = 'patients/ecg'; - -const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; -// const String VIDEO_CALL = 'video-call'; -const String LIVECARE_PENDING_LIST = 'livecare-pendinglist'; -const String ORDER_PRESCRIPTION = 'prescription/prescriptionsss'; const String ORDER_PRESCRIPTION_NEW = 'prescription/prescription_new'; -const String ORDER_PRESCRIPTION_HISTORY = 'prescription/prescriptionsssH'; const String ORDER_PROCEDURE = 'procedure/procedure'; -// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox'; -const String PATIENT_SICKLEAVE = 'patients/patient_sickleave'; const String ADD_SICKLEAVE = 'add-sickleave'; const String SHOW_SICKLEAVE = 'show-sickleave'; -const String RADIOLOGY = 'radiology'; const String RADIOLOGY_PATIENT = 'radiology-patient'; //todo: change the routing way. var routes = { ROOT: (_) => RootPage(), HOME: (_) => LandingPage(), LOGIN: (_) => Loginsreen(), - PROFILE: (_) => ProfileScreen(), - MY_SCHEDULE: (_) => MyScheduleScreen(), - PATIENT_SEARCH: (_) => PatientSearchScreen(), - PATIENTS_REFERRED: (_) => PatientReferredScreen(), PATIENTS: (_) => PatientsScreen(), - QR_READER: (_) => QrReaderScreen(), - BLOOD_BANK: (_) => BloodBankScreen(), - DOCTOR_REPLY: (_) => DoctorReplyScreen(), - MEDICINE_SEARCH: (_) => MedicineSearchScreen(), - SETTINGS: (_) => SettingsScreen(), - CHANGE_PASSWORD: (_) => ChangePasswordScreen(), - VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFICATION_METHODS: (_) => VerificationMethodsScreen(), PATIENTS_PROFILE: (_) => PatientProfileScreen(), - PHARMACIES_LIST: (_) => PharmaciesListScreen( - itemID: null, - ), - MESSAGES: (_) => MessagesScreen(), - SERVICES: (_) => ServicesScreen(), - LAB_ORDERS: (_) => LabOrdersScreen(), LAB_RESULT: (_) => LabsHomePage(), - PRESCRIPTIONS: (_) => PrescriptionScreen(), MEDICAL_FILE: (_) => MedicalFilePage(), - PROGRESS_NOTE: (_) => ProgressNoteScreen(), - REFER_PATIENT: (_) => ReferPatientScreen(), + PROGRESS_NOTE: (_) => ProgressNoteScreen(visitType: 5,), + ORDER_NOTE: (_) => ProgressNoteScreen(visitType: 3,), REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(), - PATIENT_ORDERS: (_) => PatientsOrdersScreen(), - PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), + REFER_IN_PATIENT_TO_DOCTOR: (_) => PatientMakeInPatientReferralScreen(), PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), - PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(), - RADIOLOGY: (_) => RadiologyScreen(), RADIOLOGY_PATIENT: (_) => RadiologyHomePage(), PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestFirstScreen(), PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(), PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(), - // PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestDetailScreen(), CREATE_EPISODE: (_) => UpdateSoapIndex( isUpdate: true, ), UPDATE_EPISODE: (_) => UpdateSoapIndex( isUpdate: true, ), - BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), - // VIDEO_CALL: (_) => VideoCallPage(patientData: null), - LIVECARE_PENDING_LIST: (_) => LiveCarePandingListScreen(), - // LIVECARE_END_DIALOG: (_) => EndCallDialogBox(), - PATIENT_SICKLEAVE: (_) => SickLeaveScreen(), ADD_SICKLEAVE: (_) => AddSickLeavScreen(), SHOW_SICKLEAVE: (_) => ShowSickLeaveScreen(), - ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(), ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(), - ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(), ORDER_PROCEDURE: (_) => ProcedureScreen(), - - // LIVECARE_END_DIALOG: (_) => EndCallDialogBox() MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(), PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(), diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 2ddb4049..2b55d7aa 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -9,9 +9,9 @@ import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/shared/app_button.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/buttons/app_buttons_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -93,11 +93,11 @@ class _QrReaderScreenState extends State { SizedBox( height: 35, ), - Button( - onTap: () { + AppButton( + title : TranslationBase.of(context).scanQr, + onPressed: () { _scanQrAndGetPatient(context, model); }, - title: TranslationBase.of(context).scanQr, loading: isLoading, icon: Image.asset('assets/images/qr_code_white.png'), ), @@ -210,7 +210,7 @@ class _QrReaderScreenState extends State { setState(() { isLoading = false; }); - helpers.showErrorToast(error.message); + Helpers.showErrorToast(error.message); //DrAppToastMsg.showErrorToast(error); }); } diff --git a/lib/screens/auth/change_password_screen.dart b/lib/screens/auth/change_password_screen.dart index d6451049..1a502b68 100644 --- a/lib/screens/auth/change_password_screen.dart +++ b/lib/screens/auth/change_password_screen.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/lookups/auth_lookup.dart'; import 'package:doctor_app_flutter/widgets/auth/auth_header.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; + import '../../widgets/auth/change_password.dart'; class ChangePasswordScreen extends StatelessWidget { diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 84121abf..fbba6360 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -4,7 +4,6 @@ import 'dart:io'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/service/auth_service.dart'; -import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; @@ -12,16 +11,15 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../../lookups/auth_lookup.dart'; import '../../util/dr_app_shared_pref.dart'; import '../../widgets/auth/auth_header.dart'; -import '../../widgets/auth/known_user_login.dart'; import '../../widgets/auth/login_form.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; -import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -101,6 +99,7 @@ class _LoginsreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, + backgroundColor: HexColor('#F8F8F8'), body: SafeArea( child: (_isLoading == false) ? ListView(children: [ @@ -116,8 +115,11 @@ class _LoginsreenState extends State { CrossAxisAlignment.start, children: [ AuthHeader(loginType.knownUser), + SizedBox( + height: 40, + ), LoginForm( - changeLoadingStata: changeLoadingStata, + model: model, ), ], ) diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 0045f032..0ad71b76 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -1,8 +1,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; -import '../../lookups/auth_lookup.dart'; -import '../../widgets/auth/auth_header.dart'; import '../../widgets/auth/verification_methods.dart'; /* @@ -43,13 +42,18 @@ class _VerificationMethodsScreenState extends State { return AppScaffold( isLoading: _isLoading, isShowAppBar: false, + isHomeIcon: false, + backgroundColor: HexColor('#F8F8F8'), body: ListView(children: [ Container( margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - AuthHeader(loginType.verificationMethods), + // AuthHeader(loginType.verificationMethods), + SizedBox( + height: 50, + ), VerificationMethods( password: widget.password, changeLoadingStata: changeLoadingStata, diff --git a/lib/screens/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart deleted file mode 100644 index e69d973e..00000000 --- a/lib/screens/auth/verify_account_screen.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../lookups/auth_lookup.dart'; -import '../../widgets/auth/auth_header.dart'; -import '../../widgets/auth/verfiy_account.dart'; -import '../../widgets/shared/app_scaffold_widget.dart'; - -class VerifyAccountScreen extends StatefulWidget { - @override - _VerifyAccountScreenState createState() => _VerifyAccountScreenState(); -} - -class _VerifyAccountScreenState extends State { - bool _isLoading = false; - - /* - *@author: Elham Rababah - *@Date:19/4/2020 - *@param: isLoading - *@return: - *@desc: Change Isloading attribute in order to show or hide loader - */ - void changeLoadingStata(isLoading) { - setState(() { - _isLoading = isLoading; - }); - } - - @override - Widget build(BuildContext context) { - return AppScaffold( - isLoading: _isLoading, - isShowAppBar: false, - body: SafeArea( - child: ListView(children: [ - Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.verifyPassword), - VerifyAccount(changeLoadingStata: changeLoadingStata), - ], - ), - ), - ]), - )); - } -} diff --git a/lib/screens/blood_bank_screen.dart b/lib/screens/blood_bank_screen.dart deleted file mode 100644 index 767be58f..00000000 --- a/lib/screens/blood_bank_screen.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -class BloodBankScreen - - extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: Text("Blood Bank"),), - ); - } -} \ No newline at end of file diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart deleted file mode 100644 index 3351f831..00000000 --- a/lib/screens/dashboard_screen.dart +++ /dev/null @@ -1,1442 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; -import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/doctor/patient_arrival_screen.dart'; -import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/patients_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart'; -import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/dashboard/guage_chart.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:percent_indicator/circular_percent_indicator.dart'; -import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; -import '../routes.dart'; -import '../widgets/shared/app_texts_widget.dart'; -import 'doctor/doctor_reply_screen.dart'; -import 'doctor/my_referral_patient_screen.dart'; -import 'doctor/my_referred_patient_screen.dart'; -import 'medicine/medicine_search_screen.dart'; -import 'patients/profile/referral/referred-patient-screen.dart'; -import '../widgets/shared/rounded_container_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); -Helpers helpers = Helpers(); - -class DashboardScreen extends StatefulWidget { - DashboardScreen({Key key, this.title}) : super(key: key); - - final String title; - final String iconURL = 'assets/images/dashboard_icon/'; - - @override - _DashboardScreenState createState() => _DashboardScreenState(); -} - -class _DashboardScreenState extends State { - final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); - HospitalViewModel hospitalProvider; - AuthViewModel authProvider; - bool isLoading = false; - ProjectViewModel projectsProvider; - var _isInit = true; - DoctorProfileModel profile; - bool isExpanded = false; - String isInpatient = ""; - var clinicName = []; - int sliderActiveIndex = 0; - var clinicId; - var _patientSearchFormValues = PatientModel( - FirstName: "0", - MiddleName: "0", - LastName: "0", - PatientMobileNumber: "0", - PatientIdentificationID: "0", - PatientID: 0, - From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') - .toString(), - To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') - .toString(), - LanguageID: 2, - stamp: "2020-03-02T13:56:39.170Z", - IPAdress: "11.11.11.11", - VersionID: 1.2, - Channel: 9, - TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", - SessionID: "5G0yXn0Jnq", - IsLoginForDoctorApp: true, - PatientOutSA: false); - void didChangeDependencies() async { - super.didChangeDependencies(); - if (_isInit) { - projectsProvider = Provider.of(context); - projectsProvider.getDoctorClinicsList(); - - // _firebaseMessaging.setAutoInitEnabled(true); - _firebaseMessaging.requestNotificationPermissions( - const IosNotificationSettings( - sound: true, badge: true, alert: true, provisional: true)); - _firebaseMessaging.onIosSettingsRegistered - .listen((IosNotificationSettings settings) { - print("Settings registered: $settings"); - }); - clinicName = await sharedPref.getObj(CLINIC_NAME); - print(clinicName); - _firebaseMessaging.getToken().then((String token) async { - if (token != '') { - DEVICE_TOKEN = token; - var request = await sharedPref.getObj(DOCTOR_PROFILE); - authProvider.insertDeviceImei(request).then((value) { - // print(value); - changeIsLoading(false); - }); - } - }); - } - _isInit = false; - } - - BuildContext myContext; - - GlobalKey _one = GlobalKey(); - - @override - Widget build(BuildContext context) { - myContext = context; - hospitalProvider = Provider.of(context); - authProvider = Provider.of(context); - projectsProvider = Provider.of(context); - FocusScopeNode currentFocus = FocusScope.of(context); - - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } - - return BaseView( - onModelReady: (model) => model.getDashboard(), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: ListView(children: [ - Column( - children: [ - Stack(children: [ - Column( - children: [ - ProfileWelcomeWidget( - Row( - children: [ - Container( - padding: EdgeInsets.all(4), - margin: EdgeInsets.all(4), - decoration: new BoxDecoration( - color: Colors.red[800], - borderRadius: BorderRadius.circular(20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: new Text( - projectsProvider.doctorClinicsList.length - .toString(), - style: new TextStyle( - color: Colors.white, - fontSize: projectsProvider.isArabic ? 10 : 11, - ), - textAlign: TextAlign.center, - ), - ), - Container( - width: MediaQuery.of(context).size.width * .6, - // // height: 100, - child: projectsProvider.doctorClinicsList.length > 0 - ? Stack( - children: [ - DropdownButtonHideUnderline( - child: DropdownButton( - dropdownColor: Colors.white, - iconEnabledColor: Colors.black, - isExpanded: true, - value: clinicId == null - ? projectsProvider - .doctorClinicsList[0].clinicID - : clinicId, - iconSize: 25, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return projectsProvider - .doctorClinicsList - .map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - AppText( - item.clinicName, - fontSize: SizeConfig - .textMultiplier * - 2.1, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - ], - ); - }).toList(); - }, - onChanged: (newValue) { - clinicId = newValue; - changeClinic( - newValue, context, model); - }, - items: projectsProvider - .doctorClinicsList - .map((item) { - return DropdownMenuItem( - child: Text( - item.clinicName, - textAlign: TextAlign.end, - ), - value: item.clinicID, - ); - }).toList(), - )), - ], - ) - : AppText(TranslationBase.of(context).noClinic), - ), - ], - ), - isClilic: true, - ), - Container( - height: MediaQuery.of(context).size.height * 0.20, - ), - ], - ), - Positioned( - right: 9.0, - left: 9, - top: MediaQuery.of(context).size.height * .05, - child: Container( - height: MediaQuery.of(context).size.height * 0.30, - child: model.dashboardItemsList.length > 0 - ? new Swiper( - onIndexChanged: (index) { - if (mounted) { - setState(() { - sliderActiveIndex = index; - }); - } - }, - itemBuilder: (BuildContext context, int index) { - return getSwiperWidget(model)[index]; - }, - itemCount: 3, - - pagination: new SwiperCustomPagination(builder: - (BuildContext context, - SwiperPluginConfig config) { - return new Stack( - alignment: Alignment.bottomCenter, - children: [ - Positioned( - bottom: -5, - child: Center( - child: InkWell( - onTap: () {}, - child: Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Container( - height: 10, - width: 50, - margin: - EdgeInsets.all(2), - color: - config.activeIndex == - 0 - ? Colors.black - : Colors - .grey), - Container( - height: 10, - width: 50, - margin: - EdgeInsets.all(2), - color: - config.activeIndex == - 1 - ? Colors.black - : Colors - .grey), - Container( - height: 10, - width: 50, - margin: - EdgeInsets.all(2), - color: - config.activeIndex == - 2 - ? Colors.black - : Colors - .grey), - ], - ))))) - ]); - }), - viewportFraction: 0.9, - // scale: 0.9, - // control: new SwiperControl(), - ) - : SizedBox()), - - //ExpandableCardContainer( - // expandedChild: Container( - // margin: EdgeInsets.only(left: 10, right: 10), - // height: MediaQuery.of(context).orientation == - // Orientation.portrait - // ? MediaQuery.of(context).size.height * 0.22 - // : MediaQuery.of(context).size.height * 0.25, - // width: double.infinity, - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // DashboardItem( - // onTap: () { - // setState(() { - // this.isExpanded = false; - // }); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // children: [ - // Row( - // children: [ - // Expanded( - // child: Column( - // children: [ - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[0] - // .value - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[0] - // .value - // .toString() - // : "", - // fontWeight: FontWeight.bold, - // color: Colors.white, - // fontSize: 24, - // ), - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[0] - // .kPIParameter - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[0] - // .kPIParameter - // : "", - // //'My Admitted Patient', - // color: Colors.white, - // textAlign: TextAlign.center, - // fontSize: 12, - // ) - // ], - // )), - // Expanded( - // child: Column( - // children: [ - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[1] - // .value - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[1] - // .value - // .toString() - // : "", - // fontWeight: FontWeight.bold, - // color: Colors.white, - // fontSize: 28, - // ), - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[1] - // .kPIParameter - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[1] - // .kPIParameter - // : "", - // color: Colors.white, - // textAlign: TextAlign.center, - // fontSize: 12, - // ) - // ], - // )), - // Expanded( - // child: Column( - // children: [ - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[2] - // .value - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[2] - // .value - // .toString() - // : "", - // fontWeight: FontWeight.bold, - // color: Colors.white, - // fontSize: 28), - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[2] - // .kPIParameter - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[2] - // .kPIParameter - // .toString() - // : "", - // color: Colors.white, - // fontSize: 12, - // textAlign: TextAlign.center) - // ], - // )) - // ], - // ), - // Row( - // children: [ - // Expanded( - // child: Column( - // children: [ - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[3] - // .value - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[3] - // .value - // .toString() - // : "", - // fontWeight: FontWeight.bold, - // color: Colors.white, - // fontSize: 28), - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[3] - // .kPIParameter - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[3] - // .kPIParameter - // .toString() - // : "", - // color: Colors.white, - // fontSize: 12, - // textAlign: TextAlign.center) - // ], - // )), - // Expanded( - // child: Column( - // children: [ - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[ - // 4] - // .value - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[ - // 4] - // .value - // .toString() - // : "", - // fontWeight: FontWeight.bold, - // color: Colors.white, - // fontSize: 28), - // AppText( - // model.dashboardItemsList - // .length > - // 0 - // ? isInpatient == 'in' - // ? model - // .dashboardItemsList[ - // 0] - // .summaryoptions[ - // 4] - // .kPIParameter - // .toString() - // : model - // .dashboardItemsList[ - // 1] - // .summaryoptions[ - // 4] - // .kPIParameter - // .toString() - // : "", - // color: Colors.white, - // fontSize: 12, - // textAlign: TextAlign.center) - // ], - // ), - // ), - // Expanded( - // child: Container(), - // ) - // ], - // ) - // ], - // )), - // imageName: '5.png', - // color: HexColor('#B8382C'), - // hasBorder: false, - // width: MediaQuery.of(context).size.width * 0.9, - // height: MediaQuery.of(context).orientation == - // Orientation.portrait - // ? MediaQuery.of(context).size.height * 0.22 - // : MediaQuery.of(context).size.height * 0.25, - // ), - // ], - // ), - // ), - // collapsedChild: Container( - // margin: EdgeInsets.only(left: 10, right: 10), - // height: MediaQuery.of(context).orientation == - // Orientation.portrait - // ? MediaQuery.of(context).size.height * 0.15 - // : MediaQuery.of(context).size.height * 0.25, - // width: double.infinity, - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // DashboardItem( - // onTap: () { - // setState(() { - // this.isExpanded = true; - // this.isInpatient = 'in'; - // }); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Row( - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Column( - // mainAxisAlignment: - // MainAxisAlignment.start, - // children: [ - // AppText( - // model.dashboardItemsList.length > 0 - // ? getPatientCount( - // model.dashboardItemsList[0]) - // : "", - // fontSize: - // SizeConfig.textMultiplier * 6, - // color: Colors.white, - // ), - // Flexible( - // child: AppText( - // TranslationBase.of(context).inPatient, - // color: Colors.white, - // textOverflow: TextOverflow.ellipsis, - // )), - // ], - // ), - // Padding( - // padding: EdgeInsets.all(5), - // child: Column( - // mainAxisAlignment: - // MainAxisAlignment.end, - // children: [ - // Icon( - // DoctorApp.in_patient_white, - // size: 35, - // color: Colors.white, - // ) - // ], - // )) - // ], - // ), - // ), - // imageName: '4.png', - // color: HexColor('#B8382C'), - // hasBorder: false, - // width: MediaQuery.of(context).size.width * 0.44, - // height: MediaQuery.of(context).orientation == - // Orientation.portrait - // ? MediaQuery.of(context).size.height * 0.15 - // : MediaQuery.of(context).size.height * 0.25, - // ), - // DashboardItem( - // onTap: () { - // setState(() { - // isExpanded = true; - // this.isInpatient = 'out'; - // }); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Row( - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Column( - // mainAxisAlignment: - // MainAxisAlignment.start, - // children: [ - // AppText( - // model.dashboardItemsList.length > 0 - // ? getPatientCount( - // model.dashboardItemsList[1]) - // : "", - // fontSize: - // SizeConfig.textMultiplier * 6, - // color: Colors.white, - // ), - // Flexible( - // child: AppText( - // TranslationBase.of(context) - // .outPatients, - // color: Colors.white, - // textOverflow: TextOverflow.ellipsis, - // )), - // ], - // ), - // Padding( - // padding: EdgeInsets.all(5), - // child: Column( - // mainAxisAlignment: - // MainAxisAlignment.end, - // children: [ - // Icon( - // DoctorApp.out_patient, - // size: 35, - // color: Colors.white, - // ) - // ], - // )) - // ], - // ), - // ), - // imageName: '5.png', - // color: HexColor('#B8382C'), - // hasBorder: false, - // width: MediaQuery.of(context).size.width * 0.44, - // height: MediaQuery.of(context).orientation == - // Orientation.portrait - // ? MediaQuery.of(context).size.height * 0.15 - // : MediaQuery.of(context).size.height * 0.25, - // ), - // ], - // ), - // ), - // isExpanded: isExpanded, - // )) - ) - ]), - model.dashboardItemsList.length > 0 - ? FractionallySizedBox( - widthFactor: 0.90, - child: Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 15, - ), - sliderActiveIndex == 1 - ? Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - model.dashboardItemsList[3].kPIName, - fontSize: - SizeConfig.textMultiplier * 2.2, - fontWeight: FontWeight.bold, - ), - ], - ), - new Container( - height: MediaQuery.of(context) - .orientation == - Orientation.portrait - ? MediaQuery.of(context) - .size - .height * - 0.15 - : MediaQuery.of(context) - .size - .height * - 0.20, - child: new ListView( - scrollDirection: Axis.horizontal, - children: new List.generate( - model - .dashboardItemsList[3] - .summaryoptions - .length, (int index) { - return getActivityButton(model - .dashboardItemsList[3] - .summaryoptions[index]); - }))) - ], - ) - : sliderActiveIndex == 0 - ? Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - model.dashboardItemsList[4] - .kPIName, - fontSize: - SizeConfig.textMultiplier * - 2.2, - fontWeight: FontWeight.bold, - ), - ], - ), - new Container( - height: MediaQuery.of(context) - .orientation == - Orientation.portrait - ? MediaQuery.of(context) - .size - .height * - 0.15 - : MediaQuery.of(context) - .size - .height * - 0.20, - child: new ListView( - scrollDirection: - Axis.horizontal, - children: new List.generate( - model - .dashboardItemsList[4] - .summaryoptions - .length, (int index) { - return getActivityButton(model - .dashboardItemsList[4] - .summaryoptions[index]); - }))) - ], - ) - : Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - model.dashboardItemsList[6] - .kPIName, - fontSize: - SizeConfig.textMultiplier * - 2.2, - fontWeight: FontWeight.bold, - ), - ], - ), - new Container( - height: MediaQuery.of(context) - .orientation == - Orientation.portrait - ? MediaQuery.of(context) - .size - .height * - 0.15 - : MediaQuery.of(context) - .size - .height * - 0.20, - child: new ListView( - scrollDirection: - Axis.horizontal, - children: new List.generate( - model - .dashboardItemsList[6] - .summaryoptions - .length, (int index) { - return getActivityButton(model - .dashboardItemsList[6] - .summaryoptions[index]); - }))) - ], - ), - ]))) - : SizedBox(), - FractionallySizedBox( - // widthFactor: 0.90, - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topRight: Radius.circular(50), - )), - padding: EdgeInsets.all(15), - margin: EdgeInsets.only(top: 15), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 15, - ), - Row( - children: [ - Container( - width: 150, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).patient, - fontSize: SizeConfig.textMultiplier * 1.5, - fontWeight: FontWeight.bold, - ), - AppText( - TranslationBase.of(context).services, - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - ) - ], - )), - ], - ), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - DashboardItem( - color: Colors.red[800], - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.referral_1, - size: 35, - color: Colors.white, - )), - Container( - padding: EdgeInsets.all(10), - child: AppText( - TranslationBase.of(context) - .patientsreferral, - color: Colors.white, - textAlign: TextAlign.start, - )) - ], - ), - hasBorder: false, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PatientReferralScreen(), - // MyReferredPatient(), - ), - ); - }, - ), - DashboardItem( - color: Colors.grey[300], - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.arrival_patients, - size: 35, - color: Colors.black, - )), - Container( - padding: EdgeInsets.all(10), - child: AppText( - TranslationBase.of(context) - .arrivalpatient, - color: Colors.black, - textAlign: TextAlign.start, - )) - ], - ), - hasBorder: false, - onTap: () { - Navigator.of(context) - .pushNamed(PATIENTS, arguments: { - "patientSearchForm": _patientSearchFormValues, - "selectedType": "7", - "arrivalType": "1" - }); - }, - ), - DashboardItem( - color: Colors.black, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 10, left: 10, right: 0), - child: Icon( - DoctorApp.search, - size: 35, - color: Colors.white, - )), - Container( - padding: EdgeInsets.all(10), - child: AppText( - TranslationBase.of(context) - .searchmedicinepatient, - color: Colors.white, - textAlign: TextAlign.start, - )) - ], - ), - hasBorder: false, - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - SearchMedicinePatientScreen(), - )); - }, - ) - ], - ), - SizedBox( - height: 10, - ), - SizedBox( - height: 20, - ), - Row( - // mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: 8, - ), - ], - ), - SizedBox( - height: 20, - ), - ], - ), - ), - ), - ], - ), - ]), - ), - ); - } - - static List> _createReferralData(model) { - final data = [ - new GaugeSegment( - model.dashboardItemsList[2].summaryoptions[0].kPIParameter, - getValue(model.dashboardItemsList[1].summaryoptions[0].value), - charts.MaterialPalette.black), - new GaugeSegment( - model.dashboardItemsList[2].summaryoptions[1].kPIParameter, - getValue(model.dashboardItemsList[1].summaryoptions[1].value), - charts.MaterialPalette.gray.shadeDefault), - new GaugeSegment( - model.dashboardItemsList[2].summaryoptions[2].kPIParameter, - getValue(model.dashboardItemsList[1].summaryoptions[2].value), - charts.MaterialPalette.red.shadeDefault), - ]; - - return [ - new charts.Series( - id: 'Segments', - domainFn: (GaugeSegment segment, _) => segment.segment, - measureFn: (GaugeSegment segment, _) => segment.size, - data: data, - colorFn: (GaugeSegment segment, _) => segment.color, - ) - ]; - } - - static int getValue(value) { - return value == 0 ? 1 : value; - } - - changeClinic(clinicId, BuildContext context, model) async { - // Navigator.pop(context); - changeIsLoading(true); - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); - ProfileReqModel docInfo = new ProfileReqModel( - doctorID: doctorProfile.doctorID, - clinicID: clinicId, - license: true, - projectID: doctorProfile.projectID, - tokenID: '', - languageID: 2); - - // authProvider.getDocProfiles(docInfo) - authProvider.getDocProfiles(docInfo.toJson()).then((res) async { - changeIsLoading(false); - sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); - // model.getDashboard(); - }).catchError((err) { - changeIsLoading(false); - helpers.showErrorToast(err); - }); - } - - changeIsLoading(bool val) { - setState(() { - this.isLoading = val; - }); - } - - getPatientCount(DashboardModel inPatientCount) { - int value = 0; - inPatientCount.summaryoptions.forEach((result) => {value += result.value}); - - return value.toString(); - } - - Widget getActivityButton(value) { - return Container( - width: MediaQuery.of(context).size.width * 0.24, - padding: EdgeInsets.all(5), - margin: EdgeInsets.all(5), - height: MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.15 - : MediaQuery.of(context).size.height * 0.20, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.all(10), - child: AppText(value.value.toString(), - fontSize: 28, fontWeight: FontWeight.bold)), - Expanded( - child: AppText( - value.kPIParameter, - textOverflow: TextOverflow.clip, - fontSize: 12, - textAlign: TextAlign.center, - ), - ), - ], - ), - ); - } - - Widget dot(Color c) { - return Container( - padding: EdgeInsets.all(5.0), - margin: EdgeInsets.all(5.0), - decoration: BoxDecoration(color: c, shape: BoxShape.circle)); - } - - Widget rowCount(name, int count, Color c) { - return Row( - children: [ - dot(c), - Padding( - padding: EdgeInsets.only(top: 5, bottom: 5), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - name, - color: Colors.black, - textAlign: TextAlign.center, - fontSize: 12, - textOverflow: TextOverflow.ellipsis, - ), - AppText( - ' (' + count.toString() + ')', - color: Colors.black, - textAlign: TextAlign.center, - fontSize: 14, - fontWeight: FontWeight.bold, - ) - ], - )), - ], - ); - } - - Widget getOutPatientStack(value) { - value.summaryoptions - .sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); - - var list = new List(); - value.summaryoptions.forEach((result) => - {list.add(getStack(result, value.summaryoptions.first.value))}); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Texts( - value.kPIName, - medium: true, - ), - Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list) - ], - ); - } - - getStack(Summaryoptions value, max) { - return Stack(children: [ - Container( - height: 150, - margin: EdgeInsets.all(5), - width: ((SizeConfig.screenWidth * .55) / 5), - child: SizedBox(), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), color: Colors.red[50]), - ), - Positioned( - bottom: 0, - child: Container( - child: SizedBox(), - margin: EdgeInsets.all(5), - padding: EdgeInsets.all(10), - height: max != 0 ? (150 * value.value) / max : 0, - width: ((SizeConfig.screenWidth * .55) / 5), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.red[300]))), - Container( - height: 150, - margin: EdgeInsets.only(left: 10, top: 5), - padding: EdgeInsets.all(8), - child: RotatedBox( - quarterTurns: 1, - child: Center( - child: Align( - child: AppText( - value.kPIParameter + ' (' + value.value.toString() + ') ', - fontSize: 11, - textAlign: TextAlign.center, - fontWeight: FontWeight.bold, - )), - ), - )) - ]); - } - - List getSwiperWidget(model) { - return [ - RoundedContainer( - height: MediaQuery.of(context).size.height * 0.32, - margin: 5, - child: Padding( - padding: const EdgeInsets.all(5.0), - child: getOutPatientStack(model.dashboardItemsList[1]))), - RoundedContainer( - height: MediaQuery.of(context).size.height * 0.32, - margin: 5, - child: Padding( - padding: const EdgeInsets.all(5.0), - child: getOutPatientStack(model.dashboardItemsList[0]))), - RoundedContainer( - height: MediaQuery.of(context).size.height * 0.24, - margin: 5, - child: - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Row( - children: [ - Expanded( - flex: 4, - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - flex: 1, - child: Padding( - child: AppText( - TranslationBase.of(context).referral, - fontSize: 20, - fontWeight: FontWeight.bold, - ), - padding: EdgeInsets.all(10))), - Expanded( - flex: 2, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - rowCount( - model.dashboardItemsList[2] - .summaryoptions[0].kPIParameter, - model.dashboardItemsList[2] - .summaryoptions[0].value, - Colors.black), - rowCount( - model.dashboardItemsList[2] - .summaryoptions[1].kPIParameter, - model.dashboardItemsList[2] - .summaryoptions[1].value, - Colors.grey), - rowCount( - model.dashboardItemsList[2] - .summaryoptions[2].kPIParameter, - model.dashboardItemsList[2] - .summaryoptions[2].value, - Colors.red), - ], - ), - ) - ], - ))), - Expanded( - flex: 3, - child: Stack(children: [ - Container( - child: GaugeChart(_createReferralData(model))), - Positioned( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - AppText( - getPatientCount(model.dashboardItemsList[2]) - .toString(), - fontSize: 30, - fontWeight: FontWeight.bold, - ) - ], - ), - top: MediaQuery.of(context).size.height * 0.12, - left: 0, - right: 0) - ]), - ), - ], - )), - ])), - ]; - } -} - -// TODO Move to it file -class DashboardItem extends StatelessWidget { - const DashboardItem( - {this.hasBorder = false, - this.imageName, - @required this.child, - this.onTap, - Key key, - this.width, - this.height, - this.color, - this.opacity = 0.4}) - : super(key: key); - final bool hasBorder; - final String imageName; - final Widget child; - final Function onTap; - final double width; - final double height; - final Color color; - final double opacity; - - @override - Widget build(BuildContext context) { - return InkWell( - onTap: onTap, - child: Container( - width: width != null ? width : MediaQuery.of(context).size.width * 0.29, - height: height != null - ? height - : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.16 - : MediaQuery.of(context).size.height * 0.36, - decoration: BoxDecoration( - color: !hasBorder - ? color != null - ? color - : HexColor('#050705').withOpacity(opacity) - : Colors.white, - borderRadius: BorderRadius.circular(15.0), - border: hasBorder - ? Border.all(width: 1.0, color: const Color(0xffcccccc)) - : Border.all(width: 0.0, color: Colors.transparent), - image: imageName != null - ? DecorationImage( - image: AssetImage('assets/images/dashboard/${imageName}'), - fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.2), BlendMode.dstIn), - ) - : null, - ), - child: Center( - child: child, - ), - ), - ); - } - - getDashboardWidget() {} -} - -class ExpandableCardContainer extends StatefulWidget { - final bool isExpanded; - final Widget collapsedChild; - final Widget expandedChild; - - const ExpandableCardContainer( - {Key key, this.isExpanded, this.collapsedChild, this.expandedChild}) - : super(key: key); - - @override - _ExpandableCardContainerState createState() => - _ExpandableCardContainerState(); -} - -class _ExpandableCardContainerState extends State { - @override - Widget build(BuildContext context) { - return new AnimatedContainer( - duration: new Duration(milliseconds: 1000), - curve: Curves.easeInOut, - child: widget.isExpanded ? widget.expandedChild : widget.collapsedChild, - ); - } -} diff --git a/lib/screens/doctor/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_repaly_chat.dart new file mode 100644 index 00000000..1c019ca6 --- /dev/null +++ b/lib/screens/doctor/doctor_repaly_chat.dart @@ -0,0 +1,285 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; +import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_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/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class DoctorReplayChat extends StatelessWidget { + + final ListGtMyPatientsQuestions reply; + TextEditingController msgController = TextEditingController(); + final DoctorReplayViewModel previousModel; + DoctorReplayChat( + {Key key, this.reply, this.previousModel, + }); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Container( + height: MediaQuery.of(context).size.height * 1, + color: Color(0XFFF2F2F2), + child: Stack( + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only( + left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + height: 115, + child: Container( + padding: EdgeInsets.only( + left: 10, right: 10), + margin: EdgeInsets.only(top: 40), + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 1.6 * + SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: reply.patientName + .toString(), + style: TextStyle( + color: Color(0xFF2B353E), + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 20)), + ], + ), + ), + ), + InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Icon(FontAwesomeIcons.times, + size: 30, + color: Color(0xFF2B353E))) + ], + ), + ], + ), + ), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + SizedBox(height: 30,), + Container( + // color: Color(0xFF2B353E), + width: MediaQuery.of(context).size.width * 0.9, + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Color(0xFF2B353E), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: HexColor('#707070') , + width: 0.30), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only(top: 5), + width: 60, + height: 60, + child: Image.asset( + reply.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + Divider(), + SizedBox(width: 10,), + Container( + width: MediaQuery.of(context).size.width * 0.35, + child: AppText( + reply.patientName + .toString(), + fontSize: 14, + fontFamily: 'Poppins', + color: Colors.white, + fontWeight: FontWeight.bold, + // fontSize: 18 + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" +reply.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.white, + ), + ), + ), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + + children: [ + AppText( + reply.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + fontWeight: FontWeight + .w600, + color: Colors.white, + fontSize: 14, + ), + AppText( + reply.createdOn !=null?DateUtils.getHour(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getHour(DateTime.now()), + fontSize: 14, + fontFamily: 'Poppins', + color: Colors.white, + // fontSize: 18 + ), + ], + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.7, + child: AppText( + reply.remarks, + fontSize: 15, + fontFamily: 'Poppins', + color: Colors.white, + // fontSize: 18 + ), + ), + ), + ], + ), + ], + ), + ], + ), + ), + SizedBox(height: 30,), + ], + ), + ), + ), + ) + ], + ), + ), + + // Positioned( + // bottom: 0, + // child: Container( + // width:MediaQuery.of(context).size.width * 1, + // // height: MediaQuery.of(context).size.height * 0.12, + // child: Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // FractionallySizedBox( + // child: Container( + // + // child: TextFields( + // borderRadius: 0, + // hintText: TranslationBase + // .of(context) + // .typeHereToReply, + // fontSize: 13.5, + // + // suffixIcon: FontAwesomeIcons.arrowRight, + // suffixIconColor: Colors.green, + // onSuffixTap: ()async { + // GifLoaderDialogUtils.showMyDialog(context); + // await model.replay(msgController.text, reply); + // if(model.state == ViewState.ErrorLocal) { + // Helpers.showErrorToast("An error happened while you are replaying"); + // } else { + // DrAppToastMsg.showSuccesToast("Thank you for your replay "); + // await previousModel.getDoctorReply(); + // Navigator.pop(context); + // } + // GifLoaderDialogUtils.hideDialog(context); + // + // + // + // + // }, + // // hintColor: Colors.black, + // fontWeight: FontWeight.w600, + // maxLines: 50, + // minLines: 3, + // controller: msgController, + // validator: (value) { + // if (value == null || value == "") + // return TranslationBase.of(context) + // .emptyMessage; + // else + // return null; + // }), + // + // ), + // ), + // ], + // ), + // ), + // ) + ], + + + ), + ), + )); + } +} diff --git a/lib/screens/doctor/doctor_reply_screen.dart b/lib/screens/doctor/doctor_reply_screen.dart index b57bd1a2..f522561f 100644 --- a/lib/screens/doctor/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_reply_screen.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/doctor/doctor_repaly_chat.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/doctor/doctor_reply_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -15,32 +16,58 @@ import 'package:flutter/material.dart'; *@desc: Doctor Reply Screen display data from GtMyPatientsQuestions service */ class DoctorReplyScreen extends StatelessWidget { + + final Function changeCurrentTab; + + const DoctorReplyScreen({Key key, this.changeCurrentTab}) : super(key: key); + @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getDoctorReply(), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).replay2, - isShowAppBar: false, - body: model.listDoctorWorkingHoursTable.isEmpty - ? DrAppEmbeddedError( - error: TranslationBase.of(context).noItem) - : Container( - padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - child: ListView( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: - model.listDoctorWorkingHoursTable.map((reply) { - return DoctorReplyWidget(reply: reply); - }).toList(), - ) - ], - ), - ), - )); + onModelReady: (model) { + model.getDoctorReply(); + }, + builder: (_, model, w) => WillPopScope( + onWillPop: ()async{ + changeCurrentTab(); + return false; + }, + child: AppScaffold( + baseViewModel: model, + appBarTitle: TranslationBase.of(context).replay2, + isShowAppBar: false, + body: model.listDoctorWorkingHoursTable.isEmpty + ? DrAppEmbeddedError(error: TranslationBase.of(context).noItem) + : Container( + padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), + child: ListView( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: + model.listDoctorWorkingHoursTable.map((reply) { + return InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + DoctorReplayChat( + reply: reply, + previousModel: model, + ))); + }, + child: DoctorReplyWidget(reply: reply), + ); + }).toList(), + ) + ], + ), + ), + ), + ), + ); + } } diff --git a/lib/screens/doctor/message_screen.dart b/lib/screens/doctor/message_screen.dart deleted file mode 100644 index 17d57c47..00000000 --- a/lib/screens/doctor/message_screen.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; - -class MessagesScreen extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: false, - body: Center( - child: Text('Messages heeer'), - ), - ); - } -} diff --git a/lib/screens/doctor/my_referred_patient_screen.dart b/lib/screens/doctor/my_referred_patient_screen.dart deleted file mode 100644 index 86e5de53..00000000 --- a/lib/screens/doctor/my_referred_patient_screen.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/referred_view_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/doctor/my_referred_patient_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:flutter/material.dart'; - -import '../../widgets/shared/app_scaffold_widget.dart'; - -class MyReferredPatient extends StatelessWidget { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getMyReferredPatient(), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: false, - appBarTitle: TranslationBase.of(context).myReferredPatient, - body: model.listMyReferredPatientModel.length == 0 - ? Center( - child: AppText( - TranslationBase.of(context).errorNoSchedule, - color: Theme.of(context).errorColor, - ), - ) - : Container( - padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0), - child: ListView( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 100, - ), - Container( - child: Column( - //children: referredPatientProvider.listMyReferralPatientModel.map((item) { - children: model.listMyReferredPatientModel - .map((item) { - return MyReferredPatientWidget( - myReferredPatientModel: item, - model: model); - }).toList(), - ), - ), - ], - ), - ], - ), - ), - )); - } -} diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index fa2bd11b..3b1467d2 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -1,12 +1,7 @@ import 'dart:ui'; + import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/patients_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; -import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.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_scaffold_widget.dart'; diff --git a/lib/screens/doctor/services_screen.dart b/lib/screens/doctor/services_screen.dart deleted file mode 100644 index d470cc87..00000000 --- a/lib/screens/doctor/services_screen.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; - -class ServicesScreen extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: false, - body: Center( - child: Text('Services heeer'), - ), - ); - } -} \ No newline at end of file diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart new file mode 100644 index 00000000..4bf1e33a --- /dev/null +++ b/lib/screens/home/home_page_card.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class HomePageCard extends StatelessWidget { + const HomePageCard( + {this.hasBorder = false, + this.imageName, + @required this.child, + this.onTap, + Key key, + this.width, + this.height, + this.color, + this.opacity = 0.4, + this.margin}) + : super(key: key); + final bool hasBorder; + final String imageName; + final Widget child; + final Function onTap; + final double width; + final double height; + final Color color; + final double opacity; + final EdgeInsets margin; + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + width: width != null ? width : MediaQuery.of(context).size.width * 0.29, + height: height != null + ? height + : MediaQuery.of(context).orientation == Orientation.portrait + ? MediaQuery.of(context).size.height * 0.18 + : MediaQuery.of(context).size.height * 0.36, + margin: this.margin, + decoration: BoxDecoration( + color: !hasBorder + ? color != null + ? color + : HexColor('#050705').withOpacity(opacity) + : Colors.white, + borderRadius: BorderRadius.circular(15.0), + border: hasBorder + ? Border.all(width: 1.0, color: const Color(0xffcccccc)) + : Border.all(width: 0.0, color: Colors.transparent), + image: imageName != null + ? DecorationImage( + image: AssetImage('assets/images/dashboard/${imageName}'), + fit: BoxFit.cover, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn), + ) + : null, + ), + child: Center( + child: child, + ), + ), + ); + } + + getDashboardWidget() {} +} diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart new file mode 100644 index 00000000..99ca0619 --- /dev/null +++ b/lib/screens/home/home_screen.dart @@ -0,0 +1,941 @@ +import 'package:charts_flutter/flutter.dart' as charts; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; +import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart'; +import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/patient_referral_screen.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/dashboard/activity_button.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/out_patient_stack.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart'; +import 'package:doctor_app_flutter/widgets/dashboard/swiper_rounded_pagination.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-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:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:provider/provider.dart'; +import 'package:sticky_headers/sticky_headers/widget.dart'; + +import '../../routes.dart'; +import '../../widgets/shared/app_texts_widget.dart'; +import '../../widgets/shared/rounded_container_widget.dart'; +import 'home_page_card.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); +Helpers helpers = Helpers(); + +class HomeScreen extends StatefulWidget { + HomeScreen({Key key, this.title}) : super(key: key); + + final String title; + final String iconURL = 'assets/images/dashboard_icon/'; + + @override + _HomeScreenState createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); + HospitalViewModel hospitalProvider; + AuthViewModel authProvider; + bool isLoading = false; + ProjectViewModel projectsProvider; + var _isInit = true; + DoctorProfileModel profile; + bool isExpanded = false; + bool isInpatient = false; + var clinicName = []; + int sliderActiveIndex = 0; + var clinicId; + var _patientSearchFormValues; + + void didChangeDependencies() async { + super.didChangeDependencies(); + if (_isInit) { + projectsProvider = Provider.of(context); + projectsProvider.getDoctorClinicsList(); + + // _firebaseMessaging.setAutoInitEnabled(true); + _firebaseMessaging.requestNotificationPermissions( + const IosNotificationSettings( + sound: true, badge: true, alert: true, provisional: true)); + _firebaseMessaging.onIosSettingsRegistered + .listen((IosNotificationSettings settings) { + print("Settings registered: $settings"); + }); + clinicName = await sharedPref.getObj(CLINIC_NAME); + print(clinicName); + _firebaseMessaging.getToken().then((String token) async { + if (token != '') { + DEVICE_TOKEN = token; + var request = await sharedPref.getObj(DOCTOR_PROFILE); + authProvider.insertDeviceImei(request).then((value) { + // print(value); + changeIsLoading(false); + }); + } + }); + } + _isInit = false; + } + + BuildContext myContext; + @override + Widget build(BuildContext context) { + myContext = context; + hospitalProvider = Provider.of(context); + authProvider = Provider.of(context); + projectsProvider = Provider.of(context); + FocusScopeNode currentFocus = FocusScope.of(context); + + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + } + + return BaseView( + onModelReady: (model) => model.getDashboard(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: ListView(children: [ + Column(children: [ + StickyHeader( + header: Container( + color: Colors.grey[100], + padding: EdgeInsets.only(top: 10), + child: Stack(children: [ + IconButton( + icon: Image.asset('assets/images/menu.png', + height: 50, width: 50), + iconSize: 18, + color: Colors.black, + onPressed: () => Scaffold.of(context).openDrawer(), + ), + Column(children: [ + ProfileWelcomeWidget( + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width * .6, + // // height: 100, + child: projectsProvider.doctorClinicsList.length > + 0 + ? Stack( + children: [ + DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: clinicId == null + ? projectsProvider + .doctorClinicsList[0].clinicID + : clinicId, + iconSize: 25, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return projectsProvider + .doctorClinicsList + .map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(2), + margin: EdgeInsets.all(2), + decoration: + new BoxDecoration( + color: Colors.red[800], + borderRadius: + BorderRadius.circular( + 20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: new Text( + projectsProvider + .doctorClinicsList + .length + .toString(), + style: new TextStyle( + color: Colors.white, + fontSize: + projectsProvider + .isArabic + ? 10 + : 11, + ), + textAlign: + TextAlign.center, + ), + ), + AppText(item.clinicName, + fontSize: 12, + color: Colors.black, + fontWeight: + FontWeight.bold, + textAlign: TextAlign.end), + ], + ); + }).toList(); + }, + onChanged: (newValue) { + clinicId = newValue; + changeClinic( + newValue, context, model); + }, + items: projectsProvider + .doctorClinicsList + .map((item) { + return DropdownMenuItem( + child: AppText( + item.clinicName, + textAlign: TextAlign.right, + ), + value: item.clinicID, + ); + }).toList(), + )), + ], + ) + : AppText( + TranslationBase.of(context).noClinic), + ), + ], + ), + isClilic: true, + height: 50, + ), + ]) + ])), + content: Column( + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.35, + child: model.dashboardItemsList.length > 0 + ? new Swiper( + onIndexChanged: (index) { + if (mounted) { + setState(() { + sliderActiveIndex = index; + }); + } + }, + itemBuilder: (BuildContext context, int index) { + return getSwipeWidget(model)[index]; + }, + itemCount: 3, + itemHeight: 300, + pagination: new SwiperCustomPagination(builder: + (BuildContext context, + SwiperPluginConfig config) { + return new Stack( + alignment: Alignment.bottomCenter, + children: [ + Positioned( + bottom: 0, + child: Center( + child: InkWell( + onTap: () {}, + child: Container( + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + config.activeIndex == 0 + ? SwiperRoundedPagination( + true) + : SwiperRoundedPagination( + false), + config.activeIndex == 1 + ? SwiperRoundedPagination( + true) + : SwiperRoundedPagination( + false), + config.activeIndex == 2 + ? SwiperRoundedPagination( + true) + : SwiperRoundedPagination( + false), + ], + ))))) + ]); + }), + viewportFraction: 0.9, + // scale: 0.9, + // control: new SwiperControl(), + ) + : SizedBox()), + model.dashboardItemsList.length > 0 + ? FractionallySizedBox( + widthFactor: 0.90, + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + sliderActiveIndex == 1 + ? Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + model.dashboardItemsList[3] + .kPIName, + fontSize: + SizeConfig.textMultiplier * + 2.2, + fontWeight: FontWeight.bold, + ), + ], + ), + new Container( + height: 130, + child: new ListView( + scrollDirection: + Axis.horizontal, + children: new List.generate( + model + .dashboardItemsList[3] + .summaryoptions + .length, (int index) { + return GetActivityButton(model + .dashboardItemsList[3] + .summaryoptions[index]); + }))) + ], + ) + : sliderActiveIndex == 0 + ? Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + model.dashboardItemsList[6] + .kPIName, + fontSize: SizeConfig + .textMultiplier * + 2.2, + fontWeight: FontWeight.bold, + ), + ], + ), + new Container( + height: 130, + child: new ListView( + scrollDirection: Axis + .horizontal, + children: new List + .generate( + model + .dashboardItemsList[ + 6] + .summaryoptions + .length, + (int index) { + return GetActivityButton(model + .dashboardItemsList[ + 6] + .summaryoptions[index]); + }))) + ], + ) + : Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + model.dashboardItemsList[4] + .kPIName, + fontSize: SizeConfig + .textMultiplier * + 2.2, + fontWeight: FontWeight.bold, + ), + ], + ), + new Container( + height: 130, + child: new ListView( + scrollDirection: Axis + .horizontal, + children: new List + .generate( + model + .dashboardItemsList[ + 4] + .summaryoptions + .length, + (int index) { + return GetActivityButton(model + .dashboardItemsList[ + 4] + .summaryoptions[index]); + }))) + ], + ), + ]))) + : SizedBox(), + FractionallySizedBox( + // widthFactor: 0.90, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topRight: Radius.circular(50), + )), + padding: EdgeInsets.only(left: 20, top: 10, right: 20), + margin: EdgeInsets.only(top: 10), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + children: [ + Container( + width: 150, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).patients, + style: TextStyle( + fontSize: 12, + height: .5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins'), + ), + Text( + TranslationBase.of(context).services, + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins'), + ), + ], + )), + ], + ), + SizedBox( + height: 10, + ), + + new Container( + height: 130, + child: new ListView( + scrollDirection: Axis.horizontal, + children: [ + HomePageCard( + color: Colors.red[800], + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.inpatient, + size: 32, + color: Colors.white, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + TranslationBase.of(context) + .inPatient, + color: Colors.white, + textAlign: TextAlign.start, + fontSize: 15, + )) + ], + ), + hasBorder: false, + onTap: () { + getRequestHeader(true); + Navigator.of(context) + .pushNamed(PATIENTS, arguments: { + "patientSearchForm": + _patientSearchFormValues, + "selectedType": "1", + "arrivalType": "1", + "isInpatient": true + }); + }, + ), + HomePageCard( + color: Colors.grey[300], + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.arrival_patients, + size: 35, + color: Colors.black, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + TranslationBase.of(context) + .myOutPatient, + color: Colors.black, + textAlign: TextAlign.start, + fontSize: 15, + )) + ], + ), + hasBorder: false, + onTap: () { + getRequestHeader(false); + Navigator.of(context) + .pushNamed(PATIENTS, arguments: { + "patientSearchForm": + _patientSearchFormValues, + "selectedType": "0", + "arrivalType": "1", + "isInpatient": false + }); + }, + ), + HomePageCard( + color: Colors.red[800], + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.referral_1, + size: 35, + color: Colors.white, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + TranslationBase.of(context) + .patientsreferral, + color: Colors.white, + textAlign: TextAlign.start, + fontSize: 15, + )) + ], + ), + hasBorder: false, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + PatientReferralScreen(), + // MyReferredPatient(), + ), + ); + }, + ), + HomePageCard( + color: Colors.grey[300], + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.referral_1, + size: 35, + color: Colors.black, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + 'Discharged Patients', + color: Colors.black, + textAlign: TextAlign.start, + fontSize: 15, + )) + ], + ), + hasBorder: false, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + DischargedPatient(), + // MyReferredPatient(), + ), + ); + }, + ), + HomePageCard( + color: Colors.red[800], + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.referral_1, + size: 35, + color: Colors.white, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + 'Referral Discharged', + color: Colors.white, + textAlign: TextAlign.start, + fontSize: 15, + )) + ], + ), + hasBorder: false, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ReferralDischargedPatientPage(), + // MyReferredPatient(), + ), + ); + }, + ), + HomePageCard( + color: Colors.black, + margin: EdgeInsets.all(5), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 10, left: 10, right: 0), + child: Icon( + DoctorApp.search, + size: 32, + color: Colors.white, + )), + Container( + padding: EdgeInsets.all(10), + child: AppText( + TranslationBase.of(context) + .searchmedicinepatient, + color: Colors.white, + textAlign: TextAlign.start, + fontSize: 13, + )) + ], + ), + hasBorder: false, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + SearchMedicinePatientScreen(), + )); + }, + ), + + ])), + + Row( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: 8, + ), + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ), + ], + ), + ) + ]), + ]), + ), + ); + } + + static List> _createReferralData(model) { + final data = [ + new GaugeSegment( + model.dashboardItemsList[2].summaryoptions[0].kPIParameter, + getValue(model.dashboardItemsList[1].summaryoptions[0].value), + charts.MaterialPalette.black), + new GaugeSegment( + model.dashboardItemsList[2].summaryoptions[1].kPIParameter, + getValue(model.dashboardItemsList[1].summaryoptions[1].value), + charts.MaterialPalette.gray.shadeDefault), + new GaugeSegment( + model.dashboardItemsList[2].summaryoptions[2].kPIParameter, + getValue(model.dashboardItemsList[1].summaryoptions[2].value), + charts.MaterialPalette.red.shadeDefault), + ]; + + return [ + new charts.Series( + id: 'Segments', + domainFn: (GaugeSegment segment, _) => segment.segment, + measureFn: (GaugeSegment segment, _) => segment.size, + data: data, + colorFn: (GaugeSegment segment, _) => segment.color, + ) + ]; + } + + static int getValue(value) { + return value == 0 ? 1 : value; + } + + changeClinic(clinicId, BuildContext context, model) async { + // Navigator.pop(context); + changeIsLoading(true); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); + ProfileReqModel docInfo = new ProfileReqModel( + doctorID: doctorProfile.doctorID, + clinicID: clinicId, + license: true, + projectID: doctorProfile.projectID, + tokenID: '', + languageID: 2); + authProvider.getDocProfiles(docInfo.toJson()).then((res) async { + changeIsLoading(false); + sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); + }).catchError((err) { + changeIsLoading(false); + Helpers.showErrorToast(err); + }); + } + + changeIsLoading(bool val) { + setState(() { + this.isLoading = val; + }); + } + + getPatientCount(DashboardModel inPatientCount) { + int value = 0; + inPatientCount.summaryoptions.forEach((result) => {value += result.value}); + + return value.toString(); + } + + List getSwipeWidget(model) { + return [ + RoundedContainer( + height: MediaQuery.of(context).size.height * 0.35, + margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: GetOutPatientStack(model.dashboardItemsList[1]))), + RoundedContainer( + height: MediaQuery.of(context).size.height * 0.35, + margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: GetOutPatientStack(model.dashboardItemsList[0]))), + RoundedContainer( + height: MediaQuery.of(context).size.height * 0.35, + margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10), + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Expanded( + flex: 1, + child: Row( + children: [ + Expanded( + flex: 4, + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Padding( + padding: EdgeInsets.all(8), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context) + .patients, + style: TextStyle( + fontSize: 12, + height: .5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins'), + ), + Text( + TranslationBase.of(context) + .referral, + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins'), + ), + ], + ))), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + RowCounts( + model.dashboardItemsList[2] + .summaryoptions[0].kPIParameter, + model.dashboardItemsList[2] + .summaryoptions[0].value, + Colors.black), + RowCounts( + model.dashboardItemsList[2] + .summaryoptions[1].kPIParameter, + model.dashboardItemsList[2] + .summaryoptions[1].value, + Colors.grey), + RowCounts( + model.dashboardItemsList[2] + .summaryoptions[2].kPIParameter, + model.dashboardItemsList[2] + .summaryoptions[2].value, + Colors.red), + ], + ), + ) + ], + ))), + Expanded( + flex: 3, + child: Stack(children: [ + Container( + child: GaugeChart(_createReferralData(model))), + Positioned( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + AppText( + getPatientCount(model.dashboardItemsList[2]) + .toString(), + fontSize: 30, + fontWeight: FontWeight.bold, + ) + ], + ), + top: MediaQuery.of(context).size.height * 0.12, + left: 0, + right: 0) + ]), + ), + ], + )), + ])), + ]; + } + + getRequestHeader(isInpatient) { + _patientSearchFormValues = PatientModel( + FirstName: "0", + MiddleName: "0", + LastName: "0", + PatientMobileNumber: "0", + PatientIdentificationID: "0", + PatientID: 0, + From: isInpatient == true + ? '0' + : DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + To: isInpatient == true + ? '0' + : DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + LanguageID: 2, + stamp: "2020-03-02T13:56:39.170Z", + IPAdress: "11.11.11.11", + VersionID: 1.2, + Channel: 9, + TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", + SessionID: "5G0yXn0Jnq", + IsLoginForDoctorApp: true, + PatientOutSA: false); + } +} diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index 251f9594..8c9851db 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -1,23 +1,21 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/livecare/get_pending_res_list.dart'; import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/models/livecare/get_pending_res_list.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; -import '../../config/size_config.dart'; + import '../../config/size_config.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import '../../routes.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); @@ -149,8 +147,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), SizedBox( height: 8, @@ -167,8 +163,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), AppText( TranslationBase.of( @@ -183,8 +177,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), SizedBox( height: 8, diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index f6d011a7..961654cc 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -1,19 +1,16 @@ import 'dart:async'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/models/livecare/get_pending_res_list.dart'; import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; -import 'package:doctor_app_flutter/screens/live_care/panding_list.dart'; import 'package:doctor_app_flutter/util/VideoChannel.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; -import '../../routes.dart'; class VideoCallPage extends StatefulWidget { final LiveCarePendingListResponse patientData; @@ -96,7 +93,7 @@ class _VideoCallPageState extends State { connectOpenTok(result); }).catchError((error) => - {helpers.showErrorToast(error), Navigator.of(context).pop()}); + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } @override @@ -307,7 +304,7 @@ class _VideoCallPageState extends State { .then((result) { connectOpenTok(result); }).catchError((error) => - {helpers.showErrorToast(error), Navigator.of(context).pop()}); + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } endCall() { @@ -317,7 +314,7 @@ class _VideoCallPageState extends State { .then((result) { print(result); }).catchError((error) => - {helpers.showErrorToast(error), Navigator.of(context).pop()}); + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } endCallWithCharge() { @@ -328,7 +325,7 @@ class _VideoCallPageState extends State { print('end callwith charge'); print(result); }).catchError((error) => - {helpers.showErrorToast(error), Navigator.of(context).pop()}); + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } closeRoute() { diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 77fddfe5..828210e0 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -1,18 +1,17 @@ import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/patients/profile/patient_profile_screen.dart'; -import 'package:doctor_app_flutter/util/helpers.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/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class MedicalFileDetails extends StatefulWidget { String age; @@ -22,6 +21,11 @@ class MedicalFileDetails extends StatefulWidget { int encounterNumber; int pp; PatiantInformtion patient; + String clinicName; + String episode; + String doctorName; + String vistDate; + String doctorImage; MedicalFileDetails( {this.age, @@ -30,7 +34,12 @@ class MedicalFileDetails extends StatefulWidget { this.gender, this.encounterNumber, this.pp, - this.patient}); + this.patient, + this.doctorName, + this.vistDate, + this.clinicName, + this.episode, + this.doctorImage}); @override _MedicalFileDetailsState createState() => _MedicalFileDetailsState( @@ -41,6 +50,11 @@ class MedicalFileDetails extends StatefulWidget { encounterNumber: encounterNumber, pp: pp, patient: patient, + clinicName: clinicName, + doctorName: doctorName, + episode: episode, + vistDate: vistDate, + doctorImage: doctorImage, ); } @@ -52,6 +66,11 @@ class _MedicalFileDetailsState extends State { String gender; int pp; PatiantInformtion patient; + String clinicName; + String episode; + String doctorName; + String vistDate; + String doctorImage; _MedicalFileDetailsState( {this.age, @@ -60,19 +79,44 @@ class _MedicalFileDetailsState extends State { this.gender, this.encounterNumber, this.pp, - this.patient}); - bool isPhysicalExam = false; - bool isProcedureExpand = false; - bool isHistoryExpand = false; - bool isAssessmentExpand = false; + this.patient, + this.doctorName, + this.vistDate, + this.clinicName, + this.episode, + this.doctorImage}); + bool isPhysicalExam = true; + bool isProcedureExpand = true; + bool isHistoryExpand = true; + bool isAssessmentExpand = true; @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getMedicalFile(mrn: pp), + onModelReady: (model) async { + if (model.medicalFileList.length == 0) { + model.getMedicalFile(mrn: pp); + } + }, builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patient.patientType.toString() ?? "0", + arrivalType: patient.arrivedOn.toString() ?? 0, + doctorName: doctorName, + profileUrl: doctorImage, + clinic: clinicName, + isPrescriptions: true, + isMedicalFile: true, + episode: episode, + vistDate: + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( + vistDate, + ), isArabic: projectViewModel.isArabic)}', + ), isShowAppBar: true, appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), body: NetworkBaseView( @@ -82,8 +126,6 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - PatientProfileHeaderNewDesign(patient, - patient.patientType.toString(), patient.arrivedOn), model.medicalFileList.length != 0 && model .medicalFileList[0] @@ -98,159 +140,6 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only( - top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Colors.grey[200], width: 0.5), - ), - child: Column( - children: [ - Row( - children: [ - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .doctorName - .toUpperCase(), - fontWeight: FontWeight.w700, - ), - ), - ], - ), - if (model.medicalFileList.length != 0) - Row( - children: [ - AppText( - TranslationBase.of(context) - .clinic + - ": ", - ), - if (model.medicalFileList - .length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .clinicName, - fontWeight: FontWeight.w700, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .episode + - ": ", - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .episodeID - .toString(), - fontWeight: FontWeight.w700, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .visitDate + - ": ", - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != - 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString(), - fontWeight: FontWeight.w700, - ), - SizedBox(width: 35.0), - // AppText( - // 'Appt Date : ', - // fontWeight: FontWeight.w700, - // ), - // AppText( - // '23/12/2020', - // ), - ], - ), - ], - ), - ), - SizedBox(height: 25.0), if (model.medicalFileList.length != 0 && model @@ -284,7 +173,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .historyOfPresentIllness @@ -406,7 +295,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .assessment @@ -459,10 +348,8 @@ class _MedicalFileDetailsState extends State { Row( children: [ AppText( - 'ICD', - fontWeight: - FontWeight - .w700, + 'ICD: ', + fontSize: 13.0, ), AppText( model @@ -479,52 +366,69 @@ class _MedicalFileDetailsState extends State { index] .iCD10 .trim(), - ), - SizedBox( - width: 35.0), - AppText( - 'Condition: ', + fontSize: 13.5, fontWeight: FontWeight .w700, ), + SizedBox( + width: 15.0), + ], + ), + Row( + children: [ AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[ - 0] - .lstAssessments[ - index] - .condition - .trim(), + 'Condition: ', + fontSize: 12.5, + ), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .condition + .trim(), + fontSize: 13.0, + fontWeight: + FontWeight + .w700, + ), ), ], ), Row( children: [ - AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[ - 0] - .lstAssessments[ - index] - .description, - fontWeight: - FontWeight - .w700, + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .description, + fontWeight: + FontWeight + .w700, + fontSize: 15.0, + ), ) ], ), @@ -532,22 +436,30 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Type: ', - fontWeight: - FontWeight - .w700, + fontSize: 15.5, + ), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .type, + fontSize: 16.0, + fontWeight: + FontWeight + .w700, + ), ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstAssessments[ - index] - .type), ], ), SizedBox( @@ -584,14 +496,7 @@ class _MedicalFileDetailsState extends State { ), ), ), - // SizedBox( - // height: 30, - // ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), + SizedBox( height: 30, ), @@ -627,7 +532,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .test @@ -682,9 +587,6 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Procedure ID: ', - fontWeight: - FontWeight - .w700, ), AppText( model @@ -702,6 +604,11 @@ class _MedicalFileDetailsState extends State { index] .procedureId .trim(), + fontSize: + 13.5, + fontWeight: + FontWeight + .w700, ), ], ), @@ -711,12 +618,9 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Order Date: ', - fontWeight: - FontWeight - .w700, ), AppText( - Helpers.getDateFormatted( + DateUtils.getDateFormatted( DateTime .parse( model @@ -737,6 +641,9 @@ class _MedicalFileDetailsState extends State { )), fontSize: 13.5, + fontWeight: + FontWeight + .w700, ), ], ), @@ -774,23 +681,26 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'CPT Code : ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstProcedure[ + index] + .patientID + .toString(), fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstProcedure[ - index] - .patientID - .toString()), ], ), SizedBox( @@ -813,14 +723,7 @@ class _MedicalFileDetailsState extends State { ), ), ), - // SizedBox( - // height: 30, - // ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), + SizedBox( height: 30, ), @@ -856,7 +759,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .physicalSystemExamination @@ -906,22 +809,25 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Exam Type: ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstPhysicalExam[ + index] + .examDesc, fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstPhysicalExam[ - index] - .examDesc), ], ), Row( @@ -950,22 +856,25 @@ class _MedicalFileDetailsState extends State { children: [ AppText( 'Abnormal: ', + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstPhysicalExam[ + index] + .abnormal, fontWeight: FontWeight .w700, ), - AppText(model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstPhysicalExam[ - index] - .abnormal), ], ), SizedBox( @@ -1004,16 +913,28 @@ class _MedicalFileDetailsState extends State { SizedBox( height: 30, ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), ], ), ), ) - : Text("There's no medical file for this patient") + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Data For This Visit '), + ), + SizedBox( + height: 100, + ), + ], + ), + ) ], ), ), diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 5f53c2b9..f0ee6445 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -1,21 +1,15 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/medical-file/medical_file_details.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; import 'package:doctor_app_flutter/util/date-utils.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/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class MedicalFilePage extends StatefulWidget { @override @@ -36,6 +30,8 @@ class _MedicalFilePageState extends State { builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType.toString() ?? "0", arrivalType), isShowAppBar: true, appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), body: NetworkBaseView( @@ -43,13 +39,7 @@ class _MedicalFilePageState extends State { child: SingleChildScrollView( child: Container( child: Column( - // mainAxisAlignment: model.medicalFileList.length != 0 && - // model.medicalFileList != null - // ? MainAxisAlignment.start - // : MainAxisAlignment.center, children: [ - PatientProfileHeaderNewDesign( - patient, patient.patientType.toString(), arrivalType), Padding( padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), @@ -61,7 +51,7 @@ class _MedicalFilePageState extends State { Row( children: [ AppText( - 'Medical', + 'Health', fontSize: 15.0, fontWeight: FontWeight.w600, fontFamily: 'Poppins', @@ -71,7 +61,7 @@ class _MedicalFilePageState extends State { Row( children: [ AppText( - 'Report', + 'Summary', fontSize: 30.0, fontWeight: FontWeight.w700, ), @@ -92,193 +82,121 @@ class _MedicalFilePageState extends State { itemCount: model.medicalFileList[0].entityList[0] .timelines.length, itemBuilder: (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.symmetric( - horizontal: 12.0, vertical: 8.0), - child: InkWell( - child: Container( - width: double.infinity, - margin: EdgeInsets.only( - top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Colors.grey[200], width: 0.5), - ), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorName, - fontWeight: FontWeight.w700, - fontSize: 17.0, - fontFamily: 'Poppins', - ) - ], - ), - Row( - children: [ - AppText( - Helpers.convertStringToDate(model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .day - .toString() + - "/", - ), - AppText( - Helpers.convertStringToDate(model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .month - .toString() + - "/", - ), - AppText( - Helpers.convertStringToDate( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date) - .year - .toString(), - ), - ], - ) - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - ClipRRect( - borderRadius: - BorderRadius.all( - Radius.circular(30)), - child: Image.network( - 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - ], - ), - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context) - .clinic + - ": ", - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .clinicName, - fontWeight: FontWeight.w600, - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - AppText( - TranslationBase.of(context) - .branch + - ": ", - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .projectName, - fontWeight: FontWeight.w600, - ), - ], - ), - ], - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.end, - children: [ - Column( - children: [ - Icon( - Icons.remove_red_eye, - size: 30.0, - ) - ], - ) - ], - ), - ], - ), - ), - onTap: () { + return InkWell( + onTap: () { + if (model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .length != + 0) Navigator.push( context, MaterialPageRoute( - builder: (context) => - MedicalFileDetails( - age: patient.age, - firstName: patient.firstName, - lastName: patient.lastName, - gender: patient.genderDescription, - encounterNumber: index, - pp: patient.patientId, - patient: patient, - )), + builder: (context) => MedicalFileDetails( + age: patient.age is String + ? patient.age ?? "" + : "${patient.age}", + firstName: patient.firstName, + lastName: patient.lastName, + gender: patient.genderDescription, + encounterNumber: index, + pp: patient.patientId, + patient: patient, + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName + : "", + clinicName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .clinicName + : "", + doctorImage: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage + : "", + episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty + ? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString() + : "", + vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())), ); - }, - ), + }, + child: DoctorCard( + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName, + clinic: model.medicalFileList[0].entityList[0] + .timelines[index].clinicName, + branch: model.medicalFileList[0].entityList[0] + .timelines[index].projectName, + profileUrl: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage, + appointmentDate: + DateUtils.getDateTimeFromServerFormat( + model.medicalFileList[0].entityList[0] + .timelines[index].date, + ), + isPrescriptions: true, + isShowEye: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .length != + 0 + ? true + : false), ); }) - : Column( - children: [ - Container( - child: AppText( - 'THERES NO MEDICAL FILE FOR THIS Patient', + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, ), - ), - SizedBox( - height: 400, - ) - ], + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Medical File Found'), + ) + ], + ), ) ], ), diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index a37debbf..f2509eeb 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -12,11 +12,11 @@ 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/medicine/medicine_item_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_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -115,164 +115,139 @@ class _MedicineSearchState extends State { @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) async { - // if (model.allMedicationList.length == 0) - // await model.getMedicationList(); - }, - builder: (_, model, w) { - myController.text =model.searchText; - return AppScaffold( - // baseViewModel: model, - isShowAppBar: false, - appBarTitle: TranslationBase.of(context).searchMedicine, - body: SingleChildScrollView( - child: FractionallySizedBox( - widthFactor: 0.97, - child: SingleChildScrollView( - child: Container( - // height: SizeConfig.screenHeight, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: SizeConfig.screenHeight * .16, - ), - FractionallySizedBox( - widthFactor: 0.9, - child: Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - padding: EdgeInsets.all(10), - child: AppTextFormField( - borderColor: Colors.white, - hintText: TranslationBase.of(context) - .searchMedicineNameHere, - controller: myController, - onSaved: (value) {}, - onFieldSubmitted: (value) { - searchMedicine(context, model); - }, - inputFormatter: ONLY_LETTERS, - ), - ), - ), - FractionallySizedBox( - widthFactor: 0.9, - child: Container( - child: Wrap( - alignment: WrapAlignment.center, - children: [ - // TODO change it secondary button and add loading - AppButton( - title: TranslationBase.of(context).search, - onPressed: () async{ - await searchMedicine(context, model); - - }, - ), - ], - ), - ), - ), - - Container( - margin: EdgeInsets.only( - left: SizeConfig.heightMultiplier * 2), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase - .of(context) - .youCanFind + - (myController.text !=''?model.pharmacyItemsList.length - .toString():'0' )+ - " " + - TranslationBase - .of(context) - .itemsInSearch, - fontWeight: FontWeight.bold, - ), - ], + return BaseView(onModelReady: (model) async { + // if (model.allMedicationList.length == 0) + // await model.getMedicationList(); + }, builder: (_, model, w) { + myController.text = model.searchText; + return AppScaffold( + // baseViewModel: model, + isShowAppBar: false, + appBarTitle: TranslationBase.of(context).searchMedicine, + body: SingleChildScrollView( + child: FractionallySizedBox( + widthFactor: 0.97, + child: SingleChildScrollView( + child: Container( + // height: SizeConfig.screenHeight, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: SizeConfig.screenHeight * .16, + ), + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC"))), + padding: EdgeInsets.all(10), + child: AppTextFormField( + borderColor: Colors.white, + hintText: + TranslationBase.of(context).searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + onFieldSubmitted: (value) { + searchMedicine(context, model); + }, + inputFormatter: ONLY_LETTERS, + ), + ), + ), + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + child: Wrap( + alignment: WrapAlignment.center, + children: [ + // TODO change it secondary button and add loading + AppButton( + title: TranslationBase.of(context).search, + onPressed: () async { + await searchMedicine(context, model); + }, ), + ], + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).youCanFind + + (myController.text != '' + ? model.pharmacyItemsList.length.toString() + : '0') + + " " + + TranslationBase.of(context).itemsInSearch, + fontWeight: FontWeight.bold, ), - SizedBox( - height:10, - ), - if(myController.text !='') - Container( - height: MediaQuery - .of(context) - .size - .height * 0.5, - child: ListView.builder( - padding: const EdgeInsets.only(top:20), + ], + ), + ), + SizedBox( + height: 10, + ), + if (myController.text != '') + Container( + height: MediaQuery.of(context).size.height * 0.5, + child: ListView.builder( + padding: const EdgeInsets.only(top: 20), - scrollDirection: Axis.vertical, - // shrinkWrap: true, - itemCount: - model.pharmacyItemsList == - null - ? 0 - : model - .pharmacyItemsList.length, - itemBuilder: - (BuildContext context, int index) { - return InkWell( - child: MedicineItemWidget( - label: model - .pharmacyItemsList[index] - ["ItemDescription"], - url: model - .pharmacyItemsList[index] - ["ImageSRCUrl"], - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - PharmaciesListScreen( - itemID: model - .pharmacyItemsList[ - index]["ItemID"], - url: model - .pharmacyItemsList[ - index]["ImageSRCUrl"]), - ), - ); - }, - ); - }, + scrollDirection: Axis.vertical, + // shrinkWrap: true, + itemCount: model.pharmacyItemsList == null + ? 0 + : model.pharmacyItemsList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: model.pharmacyItemsList[index] + ["ItemDescription"], + url: model.pharmacyItemsList[index] + ["ImageSRCUrl"], ), - ), - ], + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PharmaciesListScreen( + itemID: model.pharmacyItemsList[index] + ["ItemID"], + url: model.pharmacyItemsList[index] + ["ImageSRCUrl"]), + ), + ); + }, + ); + }, + ), ), - )), - ), + ], + ), + )), ), - );} - - ); + ), + ); + }); } searchMedicine(context, MedicineViewModel model) async { FocusScope.of(context).unfocus(); if (myController.text.isNullOrEmpty()) { - helpers.showErrorToast(TranslationBase - .of(context) - .typeMedicineName); + Helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); //"Type Medicine Name") return; } if (myController.text.length < 3) { - helpers.showErrorToast(TranslationBase - .of(context) - .moreThan3Letter); + Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); return; } diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index 6af1d5b7..49c39c53 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -23,7 +23,6 @@ class PharmaciesListScreen extends StatefulWidget { final String url; - // In the constructor, require a item id. PharmaciesListScreen({Key key, @required this.itemID, this.url}) : super(key: key); @@ -32,18 +31,9 @@ class PharmaciesListScreen extends StatefulWidget { } class _PharmaciesListState extends State { - var _data; Helpers helpers = new Helpers(); ProjectViewModel projectsProvider; - bool _isInit = true; - //bool _isOutOfStuck = false; - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - _isInit = false; - } @override Widget build(BuildContext context) { @@ -145,90 +135,90 @@ class _PharmaciesListState extends State { ? Alignment.topRight : Alignment.topLeft, ), - Expanded( - child: Container( - width: SizeConfig.screenWidth * 0.99, - child: ListView.builder( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemCount: model.pharmaciesList == null ? 0 : model - .pharmaciesList.length, - itemBuilder: (BuildContext context, int index) { - return RoundedContainer( - child: Row( - children: [ - Expanded( - flex: 1, - child: ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(7)), - child: Image.network( - model - .pharmaciesList[index]["ProjectImageURL"], - height: - SizeConfig.imageSizeMultiplier * 15, - width: - SizeConfig.imageSizeMultiplier * 15, - fit: BoxFit.cover, - ), - ), - ), - Expanded( - flex: 4, - child: AppText( + Container( + width: SizeConfig.screenWidth * 0.99, + margin: EdgeInsets.only(left: 10,right: 10), + child: ListView.builder( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: model.pharmaciesList == null ? 0 : model + .pharmaciesList.length, + itemBuilder: (BuildContext context, int index) { + return RoundedContainer( + margin: EdgeInsets.only(top: 5), + child: Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.network( model - .pharmaciesList[index]["LocationDescription"], - margin: 10, + .pharmaciesList[index]["ProjectImageURL"], + height: + SizeConfig.imageSizeMultiplier * 15, + width: + SizeConfig.imageSizeMultiplier * 15, + fit: BoxFit.cover, ), ), - Expanded( - flex: 2, - child: Wrap( - direction: Axis.horizontal, - alignment: WrapAlignment.end, - crossAxisAlignment: WrapCrossAlignment.end, - children: [ - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.call, - color: Colors.red, - ), - onTap: () => - launch("tel://" + - model - .pharmaciesList[index]["PhoneNumber"]), + ), + Expanded( + flex: 4, + child: AppText( + model + .pharmaciesList[index]["LocationDescription"], + margin: 10, + ), + ), + Expanded( + flex: 2, + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.end, + crossAxisAlignment: WrapCrossAlignment.end, + children: [ + Padding( + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.call, + color: Colors.red, ), + onTap: () => + launch("tel://" + + model + .pharmaciesList[index]["PhoneNumber"]), ), - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.pin_drop, - color: Colors.red, - ), - onTap: () { - MapsLauncher.launchCoordinates( - double.parse( - model - .pharmaciesList[index]["Latitude"]), - double.parse( - model - .pharmaciesList[index]["Longitude"]), - model.pharmaciesList[index] - ["LocationDescription"]); - }, + ), + Padding( + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.pin_drop, + color: Colors.red, ), + onTap: () { + MapsLauncher.launchCoordinates( + double.parse( + model + .pharmaciesList[index]["Latitude"]), + double.parse( + model + .pharmaciesList[index]["Longitude"]), + model.pharmaciesList[index] + ["LocationDescription"]); + }, ), - ], - ), + ), + ], ), - ], - ), - ); - }), - ), + ), + ], + ), + ); + }), ) ]), ),),); diff --git a/lib/screens/medicine/search_medicine_patient_screen.dart b/lib/screens/medicine/search_medicine_patient_screen.dart index 245c0602..d80c065b 100644 --- a/lib/screens/medicine/search_medicine_patient_screen.dart +++ b/lib/screens/medicine/search_medicine_patient_screen.dart @@ -1,15 +1,7 @@ import 'dart:ui'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; + import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/patients_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; -import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; -import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.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_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -72,25 +64,27 @@ class _SearchMedicinePatientScreen extends State indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + EdgeInsets.only(top: 4.0, left: 30.0, right: 30.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context).size.width * 0.35, child: Center( child: AppText( TranslationBase.of(context).searchPatient, color: Colors.black, fontWeight: FontWeight.bold, + fontSize: 14, ), ), ), Container( - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context).size.width * 0.35, child: Center( child: AppText( TranslationBase.of(context).searchMedicine, fontWeight: FontWeight.bold, + fontSize: 14, color: Colors.black), ), ), diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart new file mode 100644 index 00000000..0ba791c6 --- /dev/null +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -0,0 +1,336 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/DischargedPatientViewModel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/text_fields/app_text_form_field.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../../routes.dart'; + +class DischargedPatient extends StatefulWidget { + @override + _DischargedPatientState createState() => _DischargedPatientState(); +} + +class _DischargedPatientState extends State { + final _controller = TextEditingController(); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getDischargedPatient(), + builder: (_, model, w) => AppScaffold( + appBarTitle: 'Discharged Patient', + backgroundColor: Colors.grey[200], + isShowAppBar: true, + baseViewModel: model, + body: model.filterData.isEmpty?Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + 'No Discharged Patient', + color: Theme.of(context).errorColor, + ), + ) + ], + ), + ):Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 12,), + Container( + width: double.maxFinite, + height: 75, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: Color(0xffCCCCCC), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, top: 10), + child: AppText( + TranslationBase.of( + context) + .searchPatientName, + fontSize: 13, + )), + AppTextFormField( + // focusNode: focusProject, + controller: _controller, + borderColor: Colors.white, + prefix: IconButton( + icon: Icon( + DoctorApp.filter_1, + color: Colors.black, + ), + iconSize: 20, + padding: + EdgeInsets.only( + bottom: 30), + ), + onChanged: (String str) { + model.searchData(str); + }), + ])), + SizedBox(height: 5,), + Expanded( + child: ListView.builder( + itemCount: model.filterData.length, + itemBuilder: (context,index)=>InkWell( + onTap: () { + Navigator.of(context) + .pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": model.filterData[index], + "patientType": "1", + "isSearch": false, + "isInpatient":true, + "isDischargedPatient":true + }); + + }, + child: Container( + width: double.maxFinite, + margin: EdgeInsets.all(8), + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row(children: [ + Container( + width: 170, + child: AppText( + (Helpers.capitalize(model + .filterData[index] + .firstName) + + " " + + Helpers.capitalize(model + .filterData[index] + .lastName)), + fontSize: 16, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + textOverflow: TextOverflow.ellipsis, + ), + ), + model.filterData[index].gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + ]), + Row( + children: [ + AppText( + model.filterData[index].nationalityName != null + ? model.filterData[index].nationalityName.trim() + : model.filterData[index].nationality != null + ? model.filterData[index].nationality.trim() + : model.filterData[index].nationalityId != null + ? model.filterData[index].nationalityId + : "", + fontWeight: FontWeight.bold, + fontSize: 14, + textOverflow: TextOverflow.ellipsis, + ), + model.filterData[index] + .nationality != + null || + model.filterData[index] + .nationalityId != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + model.filterData[index].nationalityFlagURL != null ? + model.filterData[index].nationalityFlagURL + : '', + height: 25, + width: 30, + errorBuilder: + (BuildContext context, + Object exception, + StackTrace stackTrace) { + return AppText( + '', + fontSize: 10, + ); + }, + )) + : SizedBox() + ], + ) + ], + )), + Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + model.filterData[index].gender == + 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + ], + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: + 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of(context) + .fileNumber, + style: TextStyle( + fontSize: 14, + fontFamily: 'Poppins')), + new TextSpan( + text: model + .filterData[index] + .patientId + .toString(), + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 15)), + ], + ), + ), + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: + 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: model.filterData[index].admissionDate == null ? "" : + TranslationBase.of(context).admissionDate + " : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: model.filterData[index].admissionDate == null ? "" + : "${DateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}", + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15)), + ], + ), + ), + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: + 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: model.filterData[index].dischargeDate == null ? "" + : "Discharge Date : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: model.filterData[index].dischargeDate == null ? "" + : "${DateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}", + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15)), + ], + ), + ), + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).numOfDays}: ", + fontSize: 14,fontWeight: FontWeight.w300, + ), + AppText( + "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", + fontSize: 15, + fontWeight: FontWeight.w700), + ], + ), + ], + ), + ) + ], + ) + ], + ), + ), + )), + ), + + ], + ), + ), + ), + ); + } + + +} diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index ffb12ee1..6d1b5370 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -1,13 +1,14 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMuseViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -28,18 +29,19 @@ class ECGPage extends StatelessWidget { patientID: patient.patientId), builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, backgroundColor: Color(0xffF8F8F8), + appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType), body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), + // PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), SizedBox(height: 12,), - Texts('Service',style: "caption2",color: Colors.black,), - Texts('ECG',bold: true,fontSize: 22,), + AppText('Service',style: "caption2",color: Colors.black,), + AppText('ECG',bold: true,fontSize: 22,), SizedBox(height: 12,), ...List.generate(model.patientMuseResultsModelList.length, (index) => InkWell( onTap: () async { @@ -48,7 +50,7 @@ class ECGPage extends StatelessWidget { }, child: Container( width: double.infinity, - height: 110, + height: 120, margin: EdgeInsets.only(top: 5,bottom: 5), padding: EdgeInsets.all(10), decoration: BoxDecoration( @@ -65,7 +67,7 @@ class ECGPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts('ECG Report',fontWeight: FontWeight.w700,fontSize: 17,), + AppText('ECG Report',fontWeight: FontWeight.w700,fontSize: 17,), SizedBox(height:3), RichText( text: TextSpan( @@ -98,8 +100,8 @@ class ECGPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Texts('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), - Texts('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), + AppText('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), + AppText('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), ], ), ), @@ -108,7 +110,7 @@ class ECGPage extends StatelessWidget { SizedBox(height: 15,), Align( alignment: Alignment.topRight, - child: Icon(Icons.arrow_circle_up_rounded), + child: Icon(DoctorApp.external_link), ) ], ), diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart new file mode 100644 index 00000000..b0ec6105 --- /dev/null +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -0,0 +1,592 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/model/DischargeReferralPatient.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/material.dart'; + +import '../../routes.dart'; + + + +class ReferralDischargedPatientDetails extends StatelessWidget { + final DischargeReferralPatient referredPatient; + + ReferralDischargedPatientDetails(this.referredPatient,); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Container( + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + (Helpers.capitalize( + "${referredPatient.firstName} ${referredPatient.lastName}")), + fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + referredPatient.gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + InkWell( + onTap: () { + PatiantInformtion patient = + model.getPatientFromDischargeReferralPatient(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patient, + "patientType": "1", + "isInpatient": true, + "arrivalType": "1", + "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + }); + }, + child: Icon( + Icons.account_circle, + size: 25, + ), + ) + ]), + ), + + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + //TODO from backend + // Padding( + // padding: EdgeInsets.only(left: 12.0), + // child: Container( + // width: 60, + // height: 60, + // child: Image.network( + // referredPatient.doctorImageURL + // ), + // ), + // ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + AppText( + "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}", + fontFamily: 'Poppins', + fontSize: 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: referredPatient.referralStatus == 1 + ? Color(0xffc4aa54) + : referredPatient.referralStatus == 46 + ? Colors.green[700] + : Colors.red[700], + ), + AppText( + DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), + ) + ], + ), + + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Admission Date: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.admissionDate, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Discharge Date: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.dischargeDate, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Number of Days: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.dischargeDate, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Referring Doctor ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.referringDoctorName, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + "${referredPatient.patientID}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).refClinic}: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + referredPatient + .referringClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .frequency + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient + .frequencyDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + ], + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.priorityDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Referring Clinic ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.referringClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Frequency ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.frequency.toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Priority ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.frequency.toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + + + + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .maxResponseTime + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.mAXResponseTime, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 0), + child: Image.asset( + 'assets/images/patient/ic_ref_arrow_left.png', + height: 50, + width: 30, + ), + ), + //TODO from backend + // Container( + // margin: EdgeInsets.only( + // left: 0, + // top: 25, + // right: 0, + // bottom: 0), + // padding: EdgeInsets.only( + // left: 4.0, right: 4.0), + // child: referredPatient.doctorImageURL != + // null + // ? ClipRRect( + // borderRadius: + // BorderRadius.circular(20.0), + // child: Image.network( + // referredPatient.doctorImageURL, + // height: 25, + // width: 30, + // errorBuilder: + // (BuildContext context, + // Object exception, + // StackTrace stackTrace) { + // return Text('No Image'); + // }, + // )) + // : Container( + // child: Image.asset( + // referredPatient.gender == 1 + // ? 'assets/images/male_avatar.png' + // : 'assets/images/female_avatar.png', + // fit: BoxFit.cover, + // ), + // ), + // ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, + top: 30, + right: 10, + bottom: 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "Dr ${referredPatient.referringDoctorName}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w800, + fontSize: 1.5 * + SizeConfig.textMultiplier, + color: Colors.black, + ), + AppText( + referredPatient + .referringClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.3 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + Expanded( + child: SingleChildScrollView( + child: Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(8)), + border: Border.fromBorderSide(BorderSide( + color: Colors.white, + width: 1.0, + )), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 2.4 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + AppText( + referredPatient.referringDoctorRemarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + SizedBox( + height: 8, + ), + + ], + ), + ), + ), + ), + + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/ReferralDischargedPatientPage.dart b/lib/screens/patients/ReferralDischargedPatientPage.dart new file mode 100644 index 00000000..6da969d1 --- /dev/null +++ b/lib/screens/patients/ReferralDischargedPatientPage.dart @@ -0,0 +1,97 @@ +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/widgets/patients/patient-referral-item-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/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +import 'ReferralDischargedPatientDetails.dart'; + +class ReferralDischargedPatientPage extends StatefulWidget { + @override + _ReferralDischargedPatientPageState createState() => _ReferralDischargedPatientPageState(); +} + +class _ReferralDischargedPatientPageState extends State { + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.gtMyDischargeReferralPatient(), + builder: (_, model, w) => AppScaffold( + appBarTitle: 'Referral Discharged ', + backgroundColor: Colors.grey[200], + isShowAppBar: true, + baseViewModel: model, + body: model.myDischargeReferralPatient.isEmpty?Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + 'No Discharged Patient', + color: Theme.of(context).errorColor, + ), + ) + ], + ), + ):Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 5,), + Expanded( + child: ListView.builder( + itemCount: model.myDischargeReferralPatient.length, + itemBuilder: (context,index)=>InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReferralDischargedPatientDetails(model.myDischargeReferralPatient[index]), + ), + ); + }, + child: PatientReferralItemWidget( + referralStatus: model.getReferralStatusNameByCode(model.myDischargeReferralPatient[index].referralStatus,context), + referralStatusCode: model.myDischargeReferralPatient[index].referralStatus, + patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName, + patientGender: model.myDischargeReferralPatient[index].gender, + referredDate: DateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate), + referredTime: DateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate), + patientID: "${model.myDischargeReferralPatient[index].patientID}", + isSameBranch: false, + isReferral: true, + isReferralClinic: true, + referralClinic:"${model.myDischargeReferralPatient[index].referringClinicDescription}", + remark: model.myDischargeReferralPatient[index].referringDoctorRemarks, + nationality: model.myDischargeReferralPatient[index].nationalityName, + nationalityFlag: '',//model.myDischargeReferralPatient[index].nationalityFlagURL, //TODO From backend + doctorAvatar: '',//model.myDischargeReferralPatient[index].doctorImageURL, //TODO From backend + referralDoctorName: model.myDischargeReferralPatient[index].referringDoctorName, + clinicDescription: model.myDischargeReferralPatient[index].referringClinicDescription, + infoIcon: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), + ), + )), + ), + + ], + ), + ), + ), + ); + } + + +} diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 95f55e27..2225e289 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -1,13 +1,16 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.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/util/date-utils.dart'; +import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/doctor_card_insurance.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import '../base/base_view.dart'; @@ -17,413 +20,231 @@ class InsuranceApprovalScreenNew extends StatefulWidget { InsuranceApprovalScreenNew({this.appointmentNo}); @override - _InsuranceApprovalScreenNewState createState() => _InsuranceApprovalScreenNewState(); + _InsuranceApprovalScreenNewState createState() => + _InsuranceApprovalScreenNewState(); } -class _InsuranceApprovalScreenNewState extends State { - +class _InsuranceApprovalScreenNewState + extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; return BaseView( - onModelReady: widget.appointmentNo != null - ? (model) => - model.getInsuranceApproval(patient,appointmentNo: widget.appointmentNo) - : (model) => model.getInsuranceApproval(patient), + onModelReady: patient.admissionNo != null + ? (model) => model.getInsuranceInPatient(mrn: patient.patientId) + : patient.appointmentNo != null + ? (model) => model.getInsuranceApproval(patient, + appointmentNo: patient.appointmentNo, + projectId: patient.projectId) + : (model) => model.getInsuranceApproval(patient), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType.toString() ?? "0", patientType), isShowAppBar: true, baseViewModel: model, appBarTitle: TranslationBase.of(context).approvals, - - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only( - left: SizeConfig.screenWidth * 0.004, - right: SizeConfig.screenWidth * 0.004, - top: SizeConfig.screenWidth * 0.04, - ), - child: Column( - children: [ - Container( - width: double.infinity, - height: SizeConfig.screenHeight * 0.09, - color: Color(0xffEEEEEE), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Texts( - TranslationBase.of(context).totalApproval, - color: Color(0xff60688B), - fontSize: 19.0, - fontWeight: FontWeight.w600, - ), - if (model.insuranceApproval.length > 0) - Container( - width: 60, - height: 40, - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.circular(19.0)), - child: Center( - child: Texts( - model.insuranceApproval[0].unUsedCount - .toString(), - color: Colors.white, fontSize: 17.0, - ), - )) - ], - )), - ...List.generate( - model.insuranceApproval.length, - (index) => RoundedContainer( - backgroundColor: Colors.white, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Container( - //height: 120.0, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - model.insuranceApproval[index].patientDescription == "In Patient" - ? Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: - BorderRadius.circular( - 16.0)), - width: 115.0, - padding: - EdgeInsets.only(left: 11.5), - child: Center( - child: Texts( - TranslationBase.of(context).inPatient, - color: Colors.white, - ), - ), - ) - : Container( - decoration: BoxDecoration( - color: Color(0xff505A5D), - borderRadius: - BorderRadius.circular( - 16.0)), - width: 115.0, - padding: - EdgeInsets.only(left: 11.5), - child: Center( - child: Texts( - TranslationBase.of(context).outpatient, - color: Colors.white, - ), - ), - ), - Padding( - padding: EdgeInsets.symmetric( - vertical: 10.0), - child: Texts( - model.insuranceApproval[index] - .clinicName, - fontSize: 20.0, - color: Color(0xff60686B), - fontWeight: FontWeight.w600, - ), + body: patient.admissionNo != null + ? SingleChildScrollView( + child: Container( + margin: EdgeInsets.only( + left: SizeConfig.screenWidth * 0.004, + right: SizeConfig.screenWidth * 0.004, + top: SizeConfig.screenWidth * 0.04, + ), + child: model.insuranceApprovalInPatient.length != 0 + ? Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Insurance', + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', ), - Texts( - model.insuranceApproval[index] - .doctorName, - fontSize: 17.0, + ], + ), + Row( + children: [ + AppText( + 'Approvals', + fontSize: 30.0, + fontWeight: FontWeight.w700, ), ], ), + ], + ), + ), + ...List.generate( + model.insuranceApprovalInPatient.length, + (index) => Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InsuranceApprovalsDetails( + patient: patient, + indexInsurance: index, + patientType: patientType, + )), + ); + }, + child: DoctorCardInsurance( + patientOut: "In Patient", + profileUrl: model + .insuranceApprovalInPatient[index] + .doctorImage, + clinic: model + .insuranceApprovalInPatient[index] + .clinicName, + doctorName: model + .insuranceApprovalInPatient[index] + .doctorName, + branch: model + .insuranceApprovalInPatient[index] + .approvalNo + .toString(), + isPrescriptions: true, + approvalStatus: model + .insuranceApprovalInPatient[index] + .approvalStatusDescption ?? + '', + branch2: model + .insuranceApprovalInPatient[index] + .projectName, + ), ), - children: [ - Padding( - padding: EdgeInsets.symmetric( - vertical: 12.0, horizontal: 12.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context).approvalNo, - fontSize: 18.0, - ), - Texts(model.insuranceApproval[index].approvalNo.toString(), - fontSize: 18.0, - fontWeight: FontWeight.w600,), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).procedureStatus , - fontSize: 17.5, - ), - SizedBox(width: 12,), - Expanded( - child: Texts( - model.insuranceApproval[index].approvalStatusDescption, - fontWeight: FontWeight.w600, - fontSize: 17.5, - ), - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).unusedCount, - fontSize: 17.5, - ), - Texts( - model.insuranceApproval[index].unUsedCount.toString(), - fontSize: 17.5, - fontWeight: FontWeight.w600, - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), -// Text( -// 'Company Name: ' + -// model.insuranceApproval[index] -// .companyName == -// null -// ? '000' -// : model -// .insuranceApproval[index].companyName, -// style: TextStyle( -// fontSize: 17.5, -// fontWeight: FontWeight.w600), -// ), - Texts( - TranslationBase.of(context).companyName, - fontWeight: FontWeight.w600, - fontSize: 17.5, - ), - - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).receiptOn , - fontSize: 17.5, - fontWeight: FontWeight.w600, - - ), - Texts( - DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[index].rceiptOn).toString(), - fontSize: 17.5, - fontWeight: FontWeight.w600, - - ), - ], - ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, - ), - Row( - children: [ - Texts( - TranslationBase.of(context).expiryDate, - fontSize: 17.5, - fontWeight: FontWeight.w600, - - ), - Texts( - DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[index].expiryDate).toString(), - fontSize: 17.5, - fontWeight: FontWeight.w600, - - ), - ], - ), - Divider( - color: Colors.black, - height: 55.0, - thickness: 1.2, - ), - IntrinsicHeight( - child: Row( - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of( - context) - .procedureName), - Padding( - padding: EdgeInsets.only( - top: SizeConfig - .heightMultiplier * - 3.0), - child: Text( - model - .insuranceApproval[ - index] - .approvalDetails == - null - ? '' - : model - .insuranceApproval[ - index] - .approvalDetails - .procedureName, - style: TextStyle( - fontWeight: - FontWeight.w600, - fontSize: 15.5), - ), - ), - ], - ), - ), - VerticalDivider( - width: 10.0, - thickness: 1.2, - color: Colors.black, - ), - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of( - context) - .procedureStatus), - Padding( - padding: EdgeInsets.only( - top: SizeConfig - .heightMultiplier * - 3.0), - child: Text( - model - .insuranceApproval[ - index] - .approvalDetails == - null - ? '' - : model - .insuranceApproval[ - index] - .approvalDetails - .status, - style: TextStyle( - fontSize: 17.5, - fontWeight: - FontWeight - .w600), - ), - ), - ], - ), - ), - VerticalDivider( - width: 2.3, - thickness: 1.2, - color: Colors.black, - ), - Expanded( - flex: 1, - child: Column( - children: [ - Text(TranslationBase.of( - context) - .usageStatus), - Padding( - padding: EdgeInsets.only( - top: SizeConfig - .heightMultiplier * - 3.0), - child: Text( - model - .insuranceApproval[ - index] - .approvalDetails == - null - ? '' - : model - .insuranceApproval[ - index] - .approvalDetails - .isInvoicedDesc, - style: TextStyle( - fontWeight: - FontWeight.w600, - fontSize: 17.5), - ), - ), - ], - ), - ), - ], - ), + ), + ), + ], + ) + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Insurance Approval Found'), + ), + SizedBox( + height: 150.0, + ) + ], + ), + ), + ), + ) + : SingleChildScrollView( + child: Container( + margin: EdgeInsets.only( + left: SizeConfig.screenWidth * 0.004, + right: SizeConfig.screenWidth * 0.004, + top: SizeConfig.screenWidth * 0.04, + ), + child: model.insuranceApproval.length != 0 + ? Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Insurance', + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', ), - Divider( - color: Colors.black, - height: 25.0, - thickness: 1.0, + ], + ), + Row( + children: [ + AppText( + 'Approvals', + fontSize: 30.0, + fontWeight: FontWeight.w700, ), ], ), + ], + ), + ), + ...List.generate( + model.insuranceApproval.length, + (index) => Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InsuranceApprovalsDetails( + patient: patient, + indexInsurance: index, + patientType: patientType, + )), + ); + }, + child: DoctorCardInsurance( + patientOut: model.insuranceApproval[index] + .patientDescription, + profileUrl: model + .insuranceApproval[index].doctorImage, + clinic: model + .insuranceApproval[index].clinicName, + doctorName: model + .insuranceApproval[index].doctorName, + branch: model + .insuranceApproval[index].approvalNo + .toString(), + isPrescriptions: true, + approvalStatus: model + .insuranceApproval[index] + .approvalStatusDescption ?? + '', + branch2: model + .insuranceApproval[index].projectName, + ), ), - ], + ), ), ], - ), - )), - ], - ), - ), - ), + ) + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Insurance Approval Found'), + ) + ], + ), + )), + ), ), ); } - - convertDateFormat(String Date) { - const start = "/Date("; - const end = "+0300)"; - - final startIndex = Date.indexOf(start); - final endIndex = Date.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(Date.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } } diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart new file mode 100644 index 00000000..931f4051 --- /dev/null +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -0,0 +1,775 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.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/widgets/patients/profile/patient-profile-header-new-design-app-bar.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InsuranceApprovalsDetails extends StatefulWidget { + PatiantInformtion patient; + int indexInsurance; + String patientType; + + InsuranceApprovalsDetails( + {this.patient, this.indexInsurance, this.patientType}); + @override + _InsuranceApprovalsDetailsState createState() => + _InsuranceApprovalsDetailsState( + patient: patient, + indexInsurance: indexInsurance, + patientType: patientType); +} + +class _InsuranceApprovalsDetailsState extends State { + PatiantInformtion patient; + int indexInsurance; + String patientType; + + _InsuranceApprovalsDetailsState( + {this.patient, this.indexInsurance, this.patientType}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + + return BaseView( + onModelReady: (model) => model.insuranceApprovalInPatient.length == 0 + ? patient.admissionNo != null + ? (model) => model.getInsuranceInPatient(mrn: patient.patientId) + : patient.appointmentNo != null + ? (model) => model.getInsuranceApproval(patient, + appointmentNo: patient.appointmentNo, + projectId: patient.projectId) + : (model) => model.getInsuranceApproval(patient) + : null, + builder: (BuildContext context, InsuranceViewModel model, Widget child) => + AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString(), patient.arrivedOn), + body: patient.admissionNo != null + ? SingleChildScrollView( + child: Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Insurance', + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + 'Approvals', + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all( + width: 0.5, + color: Colors.white, + ), + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + .approvalStatusDescption != + null + ? model + .insuranceApprovalInPatient[ + indexInsurance] + .approvalStatusDescption ?? + "" + : "", + color: model + .insuranceApprovalInPatient[ + indexInsurance] + .approvalStatusDescption != + null + ? "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == + "Approved" + ? Color(0xff359846) + : Color(0xffD02127) + : Color(0xffD02127), + ), + ], + ), + Row( + children: [ + AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + .doctorName + .toUpperCase(), + color: Colors.black, + fontSize: 18, + fontWeight: FontWeight.bold, + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + children: [ + Column( + children: [ + Container( + height: 85.0, + width: 85.0, + child: CircleAvatar( + radius: SizeConfig + .imageSizeMultiplier * + 12, + // radius: (52) + child: ClipRRect( + borderRadius: + BorderRadius.circular( + 50), + child: Image.network( + model + .insuranceApprovalInPatient[ + indexInsurance] + .doctorImage, + fit: BoxFit.fill, + width: 700, + ), + ), + backgroundColor: + Colors.transparent, + ), + ), + ], + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric( + horizontal: 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 25.0, + ), + Row( + children: [ + AppText( + 'Clinic: ', + color: Colors.grey[500], + fontSize: 14, + ), + Expanded( + child: AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + .clinicName, + fontSize: 14, + ), + ) + ], + ), + Row( + children: [ + AppText( + 'Approval No: ', + color: Colors.grey[500], + fontSize: 14, + ), + AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + .approvalNo + .toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + 'Unused Count:', + color: Colors.grey[500], + fontSize: 14, + ), + AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + .unUsedCount + .toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + 'Company Name :', + color: Colors.grey[500], + ), + AppText('Sample') + ], + ), + Row( + children: [ + AppText( + 'Receipt on: ', + color: Colors.grey[500], + ), + Expanded( + child: AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: + FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + AppText( + 'Exp on: ', + color: Colors.grey[500], + ), + AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: + FontWeight.w600, + ), + ], + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 20.0, + ), + Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + children: [ + Expanded( + child: AppText( + 'Procedure', + fontWeight: FontWeight.w700, + ), + ), + Expanded( + child: AppText( + 'Status', + fontWeight: FontWeight.w700, + ), + ), + Expanded( + child: AppText( + 'Usage Status', + fontWeight: FontWeight.w700, + ), + ) + ], + ), + ), + Divider( + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: ListView.builder( + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model + .insuranceApprovalInPatient[ + indexInsurance] + .apporvalDetails + .length, + itemBuilder: + (BuildContext context, + int index) { + return Container( + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.procedureName ?? + "", + textAlign: + TextAlign + .start, + ), + ), + ), + Expanded( + child: Container( + child: AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.status ?? + "", + textAlign: + TextAlign + .center, + ), + ), + ), + Expanded( + child: Container( + child: AppText( + model + .insuranceApprovalInPatient[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.isInvoicedDesc ?? + "", + textAlign: + TextAlign + .center, + ), + ), + ), + ], + ), + SizedBox( + width: 5, + ), + Divider( + color: Colors.black38, + ), + ], + ), + ); + }), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ) + : SingleChildScrollView( + child: Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Insurance', + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + 'Approvals', + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all( + width: 0.5, + color: Colors.white, + ), + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + model + .insuranceApproval[ + indexInsurance] + .approvalStatusDescption != + null + ? model + .insuranceApproval[ + indexInsurance] + .approvalStatusDescption ?? + "" + : "", + color: model + .insuranceApproval[ + indexInsurance] + .approvalStatusDescption != + null + ? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" == + "Approved" + ? Color(0xff359846) + : Color(0xffD02127) + : Color(0xffD02127), + ), + ], + ), + Row( + children: [ + AppText( + model + .insuranceApproval[indexInsurance] + .doctorName + .toUpperCase(), + color: Colors.black, + fontSize: 18, + fontWeight: FontWeight.bold, + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + children: [ + Column( + children: [ + Container( + height: 85.0, + width: 85.0, + child: CircleAvatar( + radius: SizeConfig + .imageSizeMultiplier * + 12, + // radius: (52) + child: ClipRRect( + borderRadius: + BorderRadius.circular( + 50), + child: Image.network( + model + .insuranceApproval[ + indexInsurance] + .doctorImage, + fit: BoxFit.fill, + width: 700, + ), + ), + backgroundColor: + Colors.transparent, + ), + ), + ], + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric( + horizontal: 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 25.0, + ), + Row( + children: [ + AppText( + 'Clinic: ', + color: Colors.grey[500], + fontSize: 14, + ), + Expanded( + child: AppText( + model + .insuranceApproval[ + indexInsurance] + .clinicName, + fontSize: 14, + ), + ) + ], + ), + Row( + children: [ + AppText( + 'Approval No: ', + color: Colors.grey[500], + fontSize: 14, + ), + AppText( + model + .insuranceApproval[ + indexInsurance] + .approvalNo + .toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + 'Unused Count:', + color: Colors.grey[500], + fontSize: 14, + ), + AppText( + model + .insuranceApproval[ + indexInsurance] + .unUsedCount + .toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + AppText( + 'Company Name :', + color: Colors.grey[500], + ), + AppText('Sample') + ], + ), + Row( + children: [ + AppText( + 'Receipt on: ', + color: Colors.grey[500], + ), + Expanded( + child: AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: + FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + AppText( + 'Exp on: ', + color: Colors.grey[500], + ), + if(model.insuranceApproval[indexInsurance].expiryDate!=null) + AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: + FontWeight.w600, + ), + ], + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 20.0, + ), + Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + children: [ + Expanded( + child: AppText( + 'Procedure', + fontWeight: FontWeight.w700, + ), + ), + Expanded( + child: AppText( + 'Status', + fontWeight: FontWeight.w700, + ), + ), + Expanded( + child: AppText( + 'Usage Status', + fontWeight: FontWeight.w700, + ), + ) + ], + ), + ), + Divider( + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: ListView.builder( + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model + .insuranceApproval[ + indexInsurance] + .apporvalDetails + .length, + itemBuilder: + (BuildContext context, + int index) { + return Container( + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: AppText( + model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.procedureName ?? + "", + textAlign: + TextAlign + .start, + ), + ), + ), + Expanded( + child: Container( + child: AppText( + model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.status ?? + "", + textAlign: + TextAlign + .center, + ), + ), + ), + Expanded( + child: Container( + child: AppText( + model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.isInvoicedDesc ?? + "", + textAlign: + TextAlign + .center, + ), + ), + ), + ], + ), + SizedBox( + width: 5, + ), + Divider( + color: Colors.black38, + ), + ], + ), + ); + }), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + )), + ); + } +} diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 0ae5452b..273ea23f 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; @@ -15,11 +14,11 @@ import '../../config/config.dart'; import '../../config/size_config.dart'; import '../../lookups/patient_lookup.dart'; import '../../widgets/patients/dynamic_elements.dart'; -import '../../widgets/shared/app_buttons_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; -import '../../widgets/shared/app_text_form_field.dart'; import '../../widgets/shared/app_texts_widget.dart'; +import '../../widgets/shared/buttons/app_buttons_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart'; +import '../../widgets/shared/text_fields/app_text_form_field.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); @@ -56,6 +55,7 @@ class _PatientSearchScreenState extends State { LastName: "0", PatientMobileNumber: "0", PatientIdentificationID: "0", + MobileNo: '0', PatientID: 0, From: "0", To: "0", @@ -67,6 +67,7 @@ class _PatientSearchScreenState extends State { TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", IsLoginForDoctorApp: true, + IdentificationNo: '0', PatientOutSA: false); void _validateInputs() async { @@ -84,7 +85,7 @@ class _PatientSearchScreenState extends State { ((_patientSearchFormValues.From == "0" || _patientSearchFormValues.To == "0") && _selectedType == "6")) { - // helpers.showErrorToast("Please Choose The Dates"); + // Helpers.showErrorToast("Please Choose The Dates"); } else { setState(() { isFormSubmitted = false; @@ -109,7 +110,7 @@ class _PatientSearchScreenState extends State { handelCatchErrorCase(err) { //isLoading = false; //isError = true; - error = helpers.generateContactAdminMsg(err); + error = Helpers.generateContactAdminMsg(err); //notifyListeners(); throw err; } @@ -180,54 +181,78 @@ class _PatientSearchScreenState extends State { width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(10), child: AppTextFormField( - labelText: - TranslationBase.of(context).patientID, + labelText: TranslationBase.of(context) + .patpatientIDMobilenationalientID, borderColor: Colors.white, textInputType: TextInputType.number, textInputAction: TextInputAction.done, inputFormatter: ONLY_NUMBERS, focusNode: _nodeText1, onSaved: (value) { - value == null || value == '' - ? _patientSearchFormValues.setPatientID = - 0 - : _patientSearchFormValues.setPatientID = + if (value != null && value != '') { + if (value.length == 10 && + (value[0] == '2' || value[0] == '1')) { + _patientSearchFormValues + .IdentificationNo = value; + _patientSearchFormValues.Searchtype = 2; + _patientSearchFormValues.setPatientID = 0; + } else if ((value.length == 10 || + value.length == 9) && + ((value[0] == '0' && value[1] == '5') || + value[0] == '5')) { + _patientSearchFormValues.MobileNo = value; + _patientSearchFormValues.Searchtype = 0; + } else { + _patientSearchFormValues.setPatientID = int.parse(value); - - if (value != null && - value.toString().trim().isEmpty) { - _patientSearchFormValues.setPatientID = 0; + _patientSearchFormValues.Searchtype = 1; + } } + + // else{ + + // } + + // value == null || value == '' + // ? _patientSearchFormValues.setPatientID = + // 0 + // : _patientSearchFormValues.setPatientID = + // int.parse(value); + + // if (value != null && + // value.toString().trim().isEmpty) { + // _patientSearchFormValues.setPatientID = 0; + // } }, ), ), SizedBox( height: 10, ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - InkWell( - child: this.isView == false - ? AppText( - TranslationBase.of(context) - .searchWithOther, - color: Colors.red, - fontWeight: FontWeight.bold, - ) - : AppText( - TranslationBase.of(context) - .hideOtherCriteria, - color: Colors.red, - fontWeight: FontWeight.bold), - onTap: () { - setState(() { - this.isView = !this.isView; - }); - }, - ) - ], - ), + // Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // InkWell( + // child: this.isView == false + // ? AppText( + // TranslationBase.of(context) + // .searchWithOther, + // color: Colors.red, + // fontWeight: FontWeight.bold, + // ) + // : AppText( + // TranslationBase.of(context) + // .hideOtherCriteria, + // color: Colors.red, + // fontWeight: FontWeight.bold), + // onTap: () { + // setState(() { + // this.isView = !this.isView; + // }); + // }, + // ) + // ], + // ), isView == true ? Column(children: [ SizedBox( @@ -567,6 +592,7 @@ class _PatientSearchScreenState extends State { children: [ AppButton( title: TranslationBase.of(context).search, + color: Colors.red[800], onPressed: () { _validateInputs(); }, diff --git a/lib/screens/patients/patients_referred_screen.dart b/lib/screens/patients/patients_referred_screen.dart deleted file mode 100644 index df1427c2..00000000 --- a/lib/screens/patients/patients_referred_screen.dart +++ /dev/null @@ -1,103 +0,0 @@ -/* - *@author: Amjad Amireh Modified Referred Patients - *@Date:27/5/2020 - - - *@desc: - */ - -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable_item_widget.dart'; -import 'package:flutter/material.dart'; - -class PatientReferredScreen extends StatefulWidget { - PatientReferredScreen({Key key}) : super(key: key); - - @override - _PatientReferredScreenState createState() => _PatientReferredScreenState(); -} - -class _PatientReferredScreenState extends State { - - String patientType; - String patientTypetitle; - - List>list_product; - @override - void initState() { - super.initState(); - list_product=new List(); - for(var k=1;k<=5;k++) - { - Map map=Map(); - map.putIfAbsent(getName(k), ()=>getContent()); - list_product.add(map); - - } - list_product.map((s){ - - }).map((list)=>list).toList();} - - - - @override - Widget build(BuildContext context) { - - Listlist=List(); - - return AppScaffold( - //TODO : add Translation - appBarTitle: "My Referred Patients",//patientTypetitle, - body: Center( - - child: ListView( - children: [ - for(final map in list_product) - for(final keys in map.keys) - ExpandableItem(keys,map[keys].toList()) - , - ], - ) - ), - - ); - } - - - String getName(int month) - { - switch(month) - { - case 1: - return "Mahmoud Shrouf"; - case 2: - return "Mahmoud Shrouf"; - case 3: - return "Mahmoud Shrouf"; - case 4: - return "Mahmoud Shrouf"; - case 5: - return "Mahmoud Shrouf"; - case 6: - return "Mahmoud Shrouf"; - case 7: - return "Mahmoud Shrouf"; - case 8: - return "Mahmoud Shrouf"; - case 9: - return "Mahmoud Shrouf"; - case 10: - return "Mahmoud Shrouf"; - case 11: - return "Mahmoud Shrouf"; - case 12: - return "Mahmoud Shrouf"; - } - } - - List getContent() - { - - return ["1","2","3","4","5","6"].toList(); - } -} \ No newline at end of file diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 286f206d..5cffe283 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -13,15 +13,15 @@ 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/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; @@ -68,7 +68,7 @@ class _PatientsScreenState extends State { List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; int _activeLocation = 0; - + bool isInpatient = false; bool _isInit = true; String patientType; bool isSearch = false; @@ -83,7 +83,26 @@ class _PatientsScreenState extends State { final _controller = TextEditingController(); PatientModel patient; - + var _patientSearchFormValues = PatientModel( + FirstName: "0", + MiddleName: "0", + LastName: "0", + PatientMobileNumber: "0", + PatientIdentificationID: "0", + PatientID: 0, + From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + LanguageID: 2, + stamp: "2020-03-02T13:56:39.170Z", + IPAdress: "11.11.11.11", + VersionID: 1.2, + Channel: 9, + TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", + SessionID: "5G0yXn0Jnq", + IsLoginForDoctorApp: true, + PatientOutSA: false); searchData(String str) { this.responseModelList = this.responseModelList2; var strExist = str.length > 0 ? true : false; @@ -167,15 +186,24 @@ class _PatientsScreenState extends State { var strExist = str.length > 0 ? true : false; if (true) { List filterDate = []; - + String patiantAppointment = ""; for (var i = 0; i < responseModelList2.length; i++) { - String patiantAppointment = - convertDateFormat(responseModelList[i].appointmentDate); - - String dateAppointment = checkDate(patiantAppointment); + try { + if (responseModelList[i].appointmentDate == "") { + patiantAppointment = responseModelList[i].arrivedOn; + } else { + patiantAppointment = + convertDateFormat(responseModelList[i].appointmentDate); + } + if (patiantAppointment != null) { + String dateAppointment = checkDate(patiantAppointment); - if (dateAppointment.contains(str)) { - filterDate.add(responseModelList[i]); + if (dateAppointment.contains(str) || str == 'All') { + filterDate.add(responseModelList[i]); + } + } + } catch (e) { + print(e); } } @@ -218,11 +246,11 @@ class _PatientsScreenState extends State { Widget build(BuildContext context) { authProvider = Provider.of(context); _locations = [ - TranslationBase.of(context).all, TranslationBase.of(context).today, TranslationBase.of(context).tomorrow, TranslationBase.of(context).nextWeek, ]; + //TranslationBase.of(context).all, projectsProvider = Provider.of(context); final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -241,7 +269,13 @@ class _PatientsScreenState extends State { } if (routeArgs != null && routeArgs.containsKey("isSearch")) { isView = routeArgs['isView']; - patient.Searchtype = 1; + //patient.Searchtype = 1; + } + if (routeArgs != null && routeArgs.containsKey('activeFilter')) { + _activeLocation = routeArgs['activeFilter']; + } + if (routeArgs != null && routeArgs.containsKey('isInpatient')) { + isInpatient = routeArgs['isInpatient']; } if (!projectsProvider.isArabic) @@ -294,41 +328,44 @@ class _PatientsScreenState extends State { } } else { if (isView == false && val2 == 1) { - lItems = res['GetPatientFileInformation_PRMList']; + lItems = res['GetPatientFileInformation_PRMList'] + .where((i) => + i['PatientTypeDescription'] == 'Permanent File') + .toList(); } else { lItems = res[SERVICES_PATIANT2[val2]]; } } parsed = lItems; responseModelList = new ModelResponse.fromJson(parsed).list; - //if (val2 == 7) { - responseModelList.sort((a, b) { - if (b.startTime != null && b.startTime != null) { - try { - DateTime now = DateTime.now(); - DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); - String formattedDate = - DateFormat('yyyy-MM-dd ' + a.startTime).format(now); - DateTime dateTimeA = dateFormat.parse(formattedDate); - String formattedDateB = - DateFormat('yyyy-MM-dd ' + b.startTime).format(now); - DateTime dateTimeB = dateFormat.parse(formattedDateB); - var adate = dateTimeA; //a.startTime; - var bdate = dateTimeB; - return adate.compareTo(bdate); - } on Exception catch (_) { - print('never reached'); - var adate = a.startTime; //a.startTime; - var bdate = b.startTime; - return adate.compareTo(bdate); + if (val2 == 7) { + responseModelList.sort((a, b) { + if (b.startTime != null && b.startTime != null) { + try { + DateTime now = DateTime.now(); + DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); + String formattedDate = + DateFormat('yyyy-MM-dd ' + a.startTime).format(now); + DateTime dateTimeA = dateFormat.parse(formattedDate); + String formattedDateB = + DateFormat('yyyy-MM-dd ' + b.startTime).format(now); + DateTime dateTimeB = dateFormat.parse(formattedDateB); + var adate = dateTimeA; //a.startTime; + var bdate = dateTimeB; + return adate.compareTo(bdate); + } on Exception catch (_) { + print('never reached'); + var adate = a.startTime; //a.startTime; + var bdate = b.startTime; + return adate.compareTo(bdate); + } + } else { + var adate = convertDateFormat(a.appointmentDate); + var bdate = convertDateFormat(b.appointmentDate); + return bdate.compareTo(adate); } - } else { - var adate = convertDateFormat(a.appointmentDate); - var bdate = convertDateFormat(b.appointmentDate); - return bdate.compareTo(adate); - } - }); - //} + }); + } responseModelList2 = responseModelList; _isError = false; } else { @@ -359,23 +396,110 @@ class _PatientsScreenState extends State { : lItems == null || lItems.length == 0 ? Column( children: [ - if (int.parse(patientType) == 7) - Container( - margin: EdgeInsets.only(top: 10), - child: ClinicList( - clinicId: clinicId, - onClinicChange: (newValue) { - clinicId = newValue; - changeClinic(newValue, context, model); - }, - ), + Column(children: [ + // Container( + // width: SizeConfig.screenWidth * 0.9, + // height: 75, + // decoration: BoxDecoration( + // borderRadius: + // BorderRadius.all(Radius.circular(6.0)), + // border: Border.all( + // width: 1.0, + // color: HexColor("#CCCCCC"), + // ), + // color: Colors.white), + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Padding( + // padding: EdgeInsets.only( + // left: 10, top: 10), + // child: AppText( + // TranslationBase.of(context) + // .searchPatientName, + // fontSize: 13, + // )), + // AppTextFormField( + // // focusNode: focusProject, + // controller: _controller, + // borderColor: Colors.white, + // prefix: IconButton( + // icon: Icon( + // DoctorApp.filter_1, + // color: Colors.black, + // ), + // iconSize: 20, + // padding: + // EdgeInsets.only(bottom: 30), + // ), + // onChanged: (String str) { + // this.searchData(str); + // }), + // ])), + + // Container( + // width: SizeConfig.screenWidth * 0.9, + // height: SizeConfig.screenHeight * 0.08, + // child: TextField( + // controller: _controller, + // onChanged: (String str) { + // this.searchData(str); + // }, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .searchPatientName), + // ), + // ), + SizedBox( + height: 10.0, ), + if (int.parse(patientType) == 7) + Container( + padding: EdgeInsets.all(5), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.circular(10)), + child: ClinicList( + clinicId: clinicId, + onClinicChange: (newValue) { + clinicId = newValue; + changeClinic(newValue, context, model); + }, + )), + Padding( + padding: EdgeInsets.only( + top: MediaQuery.of(context).size.height * + 0.03), + // child: _locationBar(context) + child: + SERVICES_PATIANT2[int.parse(patientType)] == + "List_MyOutPatient" + ? _locationBar(context, model) + : Container(), + ) + ]), Container( margin: EdgeInsets.only( - top: MediaQuery.of(context).size.height * 0.35), - child: DrAppEmbeddedError( - error: TranslationBase.of(context) - .youDontHaveAnyPatient), + top: MediaQuery.of(context).size.height * 0.10), + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText(TranslationBase.of(context) + .youDontHaveAnyPatient), + ) + ], + ), + ), ), ], ) @@ -404,174 +528,164 @@ class _PatientsScreenState extends State { : Column( children: [ SizedBox(height: 18.5), + Container( - width: SizeConfig.screenWidth * 0.9, - height: - SizeConfig.screenHeight * 0.08, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str); - }, - decoration: buildInputDecoration( - context, - TranslationBase.of(context) - .searchPatientName), - ), - ), + width: SizeConfig.screenWidth * 0.9, + height: 75, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, top: 10), + child: AppText( + TranslationBase.of( + context) + .searchPatientName, + fontSize: 13, + )), + AppTextFormField( + // focusNode: focusProject, + controller: _controller, + borderColor: Colors.white, + prefix: IconButton( + icon: Icon( + DoctorApp.filter_1, + color: Colors.black, + ), + iconSize: 20, + padding: + EdgeInsets.only( + bottom: 30), + ), + onChanged: (String str) { + this.searchData(str); + }), + ])), + // Container( + // width: SizeConfig.screenWidth * 0.9, + // height: + // SizeConfig.screenHeight * 0.08, + // child: TextField( + // controller: _controller, + // onChanged: (String str) { + // this.searchData(str); + // }, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context) + // .searchPatientName), + // ), + // ), SizedBox( height: 10.0, ), - if (int.parse(patientType) == 7) - Container( - padding: EdgeInsets.all(5), - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Colors.grey), - borderRadius: - BorderRadius.circular( - 10)), - child: ClinicList( - clinicId: clinicId, - onClinicChange: (newValue) { - clinicId = newValue; - changeClinic( - newValue, context, model); - }, - )), + // if (int.parse(patientType) == 7) + // Container( + // padding: EdgeInsets.all(5), + // decoration: BoxDecoration( + // color: Colors.white, + // border: Border.all( + // color: Colors.grey), + // borderRadius: + // BorderRadius.circular(10)), + // child: ClinicList( + // clinicId: clinicId, + // onClinicChange: (newValue) { + // clinicId = newValue; + // changeClinic( + // newValue, context, model); + // }, + // )), Padding( padding: EdgeInsets.only( top: MediaQuery.of(context) .size .height * 0.03), + // child: _locationBar(context) child: SERVICES_PATIANT2[ int.parse(patientType)] == "List_MyOutPatient" - ? _locationBar(context) + ? _locationBar(context, model) : Container(), ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment.spaceEvenly, - // children: [ - // AppButton( - // title: TranslationBase.of(context) - // .all, - // onPressed: () { - // setState(() { - // selectedFilter = 1; - // filterPatients(); - // }); - // }, - // color: selectedFilter == 1 - // ? Colors.red[800] - // : Colors.grey[300], - // fontColor: selectedFilter == 1 - // ? Colors.white - // : Colors.black, - // ), - // AppButton( - // title: TranslationBase.of(context) - // .today, - // onPressed: () { - // setState(() { - // selectedFilter = 2; - // filterPatients(); - // }); - // }, - // color: selectedFilter == 2 - // ? Colors.red[800] - // : Colors.grey[300], - // fontColor: selectedFilter == 2 - // ? Colors.white - // : Colors.black, - // ), - // AppButton( - // title: TranslationBase.of(context) - // .tomorrow, - // onPressed: () { - // setState(() { - // selectedFilter = 3; - // filterPatients(); - // }); - // }, - // color: selectedFilter == 3 - // ? Colors.red[800] - // : Colors.grey[300], - // fontColor: selectedFilter == 3 - // ? Colors.white - // : Colors.black, - // ), - // AppButton( - // title: TranslationBase.of(context) - // .nextWeek, - // onPressed: () { - // setState(() { - // selectedFilter = 4; - // // filterPatients(); - // }); - // }, - // color: selectedFilter == 4 - // ? Colors.red[800] - // : Colors.grey[300], - // fontColor: selectedFilter == 4 - // ? Colors.white - // : Colors.black, - // ), - // ], - // ), SizedBox( height: 10.0, ), - // Divider( - // thickness: 0.8, - // color: Color(0xffCCCCCC), - // ), Container( - // decoration: BoxDecoration( - // color: Color(0Xffffffff), - // borderRadius: - // BorderRadius.circular(20)), - child: (responseModelList.length > 0) - ? Column( - // mainAxisAlignment: MainAxisAlignment.center, - children: responseModelList - .map((PatiantInformtion - item) { - return PatientCard( - patientInfo: item, - patientType: patientType, - arrivalType: arrivalType, - onTap: () { - Navigator.of(context) - .pushNamed( - PATIENTS_PROFILE, - arguments: { - "patient": item, - "patientType": - patientType, - "from": patient - .getFrom, - "to": - patient.getTo, - "isSearch": - isSearch, - "arrivalType": - arrivalType, - }); - }, - ); - }).toList(), - ) - : Center( - child: DrAppEmbeddedError( - error: TranslationBase.of( - context) - .youDontHaveAnyPatient), - ), - ), + child: (responseModelList.length > + 0) + ? Column( + // mainAxisAlignment: MainAxisAlignment.center, + children: responseModelList + .map((PatiantInformtion + item) { + return PatientCard( + patientInfo: item, + patientType: + patientType, + arrivalType: + arrivalType, + isInpatient: + isInpatient, + onTap: () { + Navigator.of(context) + .pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": item, + "patientType": + patientType, + "from": patient + .getFrom, + "to": patient + .getTo, + "isSearch": + isSearch, + "isInpatient": + isInpatient, + "arrivalType": + arrivalType, + "isInpatient": + isInpatient + }); + }, + ); + }).toList(), + ) + : Center( + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .center, + children: [ + SizedBox( + height: 100, + ), + Image.asset( + 'assets/images/no-data.png'), + Padding( + padding: + const EdgeInsets + .all(8.0), + child: AppText( + TranslationBase.of( + context) + .youDontHaveAnyPatient), + ) + ], + ), + )), ], ), ) @@ -665,38 +779,16 @@ class _PatientsScreenState extends State { }); GifLoaderDialogUtils.hideDialog(context); }).catchError((error) { - helpers.showErrorToast(error.toString()); + Helpers.showErrorToast(error.toString()); GifLoaderDialogUtils.hideDialog(context); }); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - helpers.showErrorToast(err); + Helpers.showErrorToast(err); }); } - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - suffixIcon: IconButton( - icon: Icon(DoctorApp.search_patient), - color: Colors.grey, - onPressed: () {}, - iconSize: 30, - ), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 1.66 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - Widget _locationBar(BuildContext _context) { + Widget _locationBar(BuildContext _context, model) { return Container( height: MediaQuery.of(context).size.height * 0.0619, width: SizeConfig.screenWidth * 0.94, @@ -742,11 +834,12 @@ class _PatientsScreenState extends State { )), ), onTap: () { - filterBooking(item.toString()); + //filterBooking(item.toString()); setState(() { _activeLocation = _locations.indexOf(item); }); + filterPatient(item.toString(), model); }), _isActive ? Container( @@ -765,4 +858,148 @@ class _PatientsScreenState extends State { ), ); } + + filterPatient(item, model) { + if (item == 'Tomorrow') { + _patientSearchFormValues.To = DateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 1), + 'yyyy-MM-dd'); + _patientSearchFormValues.From = DateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 1), + 'yyyy-MM-dd'); + } else if (item == 'Next Week') { + _patientSearchFormValues.From = DateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 1), + 'yyyy-MM-dd'); + + _patientSearchFormValues.To = DateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 6), + 'yyyy-MM-dd'); + } else { + _patientSearchFormValues.From = DateUtils.convertDateToFormat( + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); + _patientSearchFormValues.To = DateUtils.convertDateToFormat( + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); + } + searchPatient(model); + // Navigator.of(context).pop(); + // Navigator.of(context).pushNamed(PATIENTS, arguments: { + // "patientSearchForm": _patientSearchFormValues, + // "selectedType": "7", + // "arrivalType": "1", + // "activeFilter": _activeLocation + // }); + } + + searchPatient(model) { + GifLoaderDialogUtils.showMyDialog(context); + int val2 = int.parse(patientType); + GetPatientArrivalListRequestModel getPatientArrivalListRequestModel; + if (val2 == 0) { + patient = PatientModel( + From: _patientSearchFormValues.From, + To: _patientSearchFormValues.To, + FirstName: "0", + MiddleName: "0", + LastName: "0", + PatientMobileNumber: "0", + PatientIdentificationID: "0", + PatientID: 0, + ); + } + + model + .getPatientList( + val2 == 7 ? getPatientArrivalListRequestModel.toJson() : patient, + patientType, + isView: isView) + .then((res) { + setState(() { + GifLoaderDialogUtils.hideDialog(context); + if (res != null && res['MessageStatus'] == 1) { + if (val2 == 7) { + if (res[SERVICES_PATIANT2[val2]] == null) { + _isError = true; + _isLoading = false; + this.error = error.toString(); + } else { + var localList = []; + if (res["patientArrivalList"]["entityList"] == null) { + res["patientArrivalList"]["entityList"] = []; + } + res["patientArrivalList"]["entityList"].forEach((v) { + Map mergedPatient = { + ...v, + ...v["patientDetails"] + }; + localList.add(mergedPatient); + }); + lItems = localList; + } + } else { + if (isView == false && val2 == 1) { + lItems = res['GetPatientFileInformation_PRMList'] + .where((i) => i['PatientTypeDescription'] == 'Permanent File') + .toList(); + } else { + lItems = res[SERVICES_PATIANT2[val2]]; + } + } + parsed = lItems; + responseModelList = new ModelResponse.fromJson(parsed).list; + if (val2 == 7) { + responseModelList.sort((a, b) { + if (b.startTime != null && b.startTime != null) { + try { + DateTime now = DateTime.now(); + DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm"); + String formattedDate = + DateFormat('yyyy-MM-dd ' + a.startTime).format(now); + DateTime dateTimeA = dateFormat.parse(formattedDate); + String formattedDateB = + DateFormat('yyyy-MM-dd ' + b.startTime).format(now); + DateTime dateTimeB = dateFormat.parse(formattedDateB); + var adate = dateTimeA; //a.startTime; + var bdate = dateTimeB; + return adate.compareTo(bdate); + } on Exception catch (_) { + print('never reached'); + var adate = a.startTime; //a.startTime; + var bdate = b.startTime; + return adate.compareTo(bdate); + } + } else { + var adate = convertDateFormat(a.appointmentDate); + var bdate = convertDateFormat(b.appointmentDate); + return bdate.compareTo(adate); + } + }); + } + responseModelList2 = responseModelList; + _isError = false; + } else { + _isError = true; + error = + model.error ?? res['ErrorEndUserMessage'] ?? res['ErrorMessage']; + } + + _isLoading = false; + }); + }).catchError((error) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + _isError = true; + _isLoading = false; + this.error = error.toString(); + }); + }); + } } diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index f4b26f6a..16486b49 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -8,13 +8,14 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.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/screens/patients/profile/UCAF/page-stepper-widget.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/PatientHeaderWidgetNoAvatar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -32,6 +33,9 @@ class _UcafDetailScreenState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + final screenSize = MediaQuery.of(context).size; return BaseView( @@ -42,6 +46,9 @@ class _UcafDetailScreenState extends State { }, builder: (_, model, w) => AppScaffold( baseViewModel: model, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).ucaf, body: Column( children: [ @@ -51,7 +58,32 @@ class _UcafDetailScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientHeaderWidgetNoAvatar(patient), + // PatientHeaderWidgetNoAvatar(patient), + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).patient}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).ucaf}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), + ), + PageStepperWidget( + stepsCount: 2, + currentStepIndex: 2, + screenSize: screenSize, + ), SizedBox( height: 10, ), @@ -77,46 +109,60 @@ class _UcafDetailScreenState extends State { ), Container( margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), - child: BorderedButton( - TranslationBase.of(context).save, - hasBorder: true, - vPadding: 8, - hPadding: 8, - borderColor: HexColor("#B8382B"), - backgroundColor: HexColor("#B8382B"), - textColor: Colors.white, - fontSize: SizeConfig.textMultiplier * 2.0, - handler: () async { - await model.postUCAF(patient); - if (model.state == ViewState.Idle) { - DrAppToastMsg.showSuccesToast( - TranslationBase.of(context).postUcafSuccessMsg); - Navigator.of(context).popUntil((route) { - return route.settings.name == PATIENTS_PROFILE; - }); - } else { - DrAppToastMsg.showErrorToast(model.error); - } - }, - ), - ), - Container( - margin: EdgeInsets.only( - left: 16, right: 16, top: 0.0, bottom: 8), - child: BorderedButton( - TranslationBase.of(context).cancel, - hasBorder: true, - vPadding: 8, - hPadding: 8, - borderColor: Colors.white, - backgroundColor: Colors.white, - textColor: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.2, - handler: () { - Navigator.of(context).popUntil((route) { - return route.settings.name == PATIENTS_PROFILE; - }); - }, + child: Row( + children: [ + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).cancel, + hasBorder: true, + vPadding: 8, + hPadding: 8, + borderColor: Colors.white, + color: Colors.white, + fontColor: HexColor("#B8382B"), + fontSize: 2.2, + onPressed: () { + Navigator.of(context).popUntil((route) { + return route.settings.name == + PATIENTS_PROFILE; + }); + }, + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: Container( + child: AppButton( + title: TranslationBase.of(context).save, + hasBorder: true, + vPadding: 8, + hPadding: 8, + borderColor: HexColor("#B8382B"), + color: HexColor("#B8382B"), + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () async { + await model.postUCAF(patient); + if (model.state == ViewState.Idle) { + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .postUcafSuccessMsg); + Navigator.of(context).popUntil((route) { + return route.settings.name == + PATIENTS_PROFILE; + }); + } else { + DrAppToastMsg.showErrorToast(model.error); + } + }, + ), + ), + ), + ], ), ), ], diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index d4c1b803..137b4ed5 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -1,20 +1,22 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/patients/profile/UCAF/page-stepper-widget.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/PatientHeaderWidgetNoAvatar.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import '../../../../routes.dart'; -import '../../../QR_reader_screen.dart'; class UCAFInputScreen extends StatefulWidget { @override @@ -53,348 +55,388 @@ class _UCAFInputScreenState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + final screenSize = MediaQuery.of(context).size; return BaseView( onModelReady: (model) => model.getUCAFData(patient), builder: (_, model, w) => AppScaffold( baseViewModel: model, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).ucaf, - body: model.patientVitalSigns != null && + body: model.patientVitalSignsHistory.length > 0 && model.patientChiefComplaintList != null && model.patientChiefComplaintList.length > 0 - ? SingleChildScrollView( - child: Column( - children: [ - PatientHeaderWidgetNoAvatar(patient), - Container( - margin: - EdgeInsets.symmetric(vertical: 16, horizontal: 16), + ? Column( + children: [ + Expanded( + child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - CheckboxListTile( - title: AppText( - TranslationBase.of(context).inPatient, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, + // PatientHeaderWidgetNoAvatar(patient), + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).patient}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).ucaf}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], ), - value: _inPatient, - onChanged: (newValue) { - setState(() { - _inPatient = newValue; - }); - }, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), ), - CheckboxListTile( - title: AppText( - TranslationBase.of(context).emergencyCase, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, - ), - value: _emergencyCase, - onChanged: (newValue) { - setState(() { - _emergencyCase = newValue; - }); - }, - controlAffinity: ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), + PageStepperWidget( + stepsCount: 2, + currentStepIndex: 1, + screenSize: screenSize, ), Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .durationOfIllness, - null, - false), - enabled: true, - controller: _durationOfIllnessController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - keyboardType: TextInputType.number, - )), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - "BP (H/L)", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, + margin: EdgeInsets.symmetric( + vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CheckboxListTile( + title: AppText( + TranslationBase.of(context).inPatient, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, ), - AppText( - "${model.patientVitalSigns.bloodPressureHigher}/${model.patientVitalSigns.bloodPressureLower}", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, + value: _inPatient, + onChanged: (newValue) { + setState(() { + _inPatient = newValue; + }); + }, + activeColor: HexColor("#D02127"), + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + CheckboxListTile( + title: AppText( + TranslationBase.of(context).emergencyCase, fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, ), - ], - ), - SizedBox( - width: 4, - ), - Expanded( - child: Row( + value: _emergencyCase, + onChanged: (newValue) { + setState(() { + _emergencyCase = newValue; + }); + }, + activeColor: HexColor("#D02127"), + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context) + .durationOfIllness, + dropDownText: "3", + inputType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + ), + SizedBox( + height: 16, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - AppText( - "${TranslationBase.of(context).temperature}", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, + Row( + children: [ + Icon( + DoctorApp.warning, + size: 20, + color: Color(0xFFCC9B14), + ), + SizedBox( + width: 8, + ), + AppText( + "BP (H/L)", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 8, + ), + AppText( + "${model.bloodPressure}", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ], ), SizedBox( - width: 8, + width: 6, ), 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, + child: Row( + children: [ + AppText( + "${TranslationBase.of(context).temperature}", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 4, + ), + Expanded( + child: AppText( + "${model.temperatureCelcius}(C), ${(double.parse(model.temperatureCelcius) * (9 / 5) + 32).toStringAsFixed(2)}(F)", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ), + ], ), ), ], ), - ), - ], - ), - SizedBox( - height: 4, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - AppText( - "${TranslationBase.of(context).pulseBeats} :", - fontSize: SizeConfig.textMultiplier * 1.8, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${model.patientVitalSigns.pulseBeatPerMinute}", - fontSize: SizeConfig.textMultiplier * 2, - color: Colors.grey.shade800, - fontWeight: FontWeight.normal, - ), - ], - ), - ], - ), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context) - .chiefComplaintsAndSymptoms, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - SizedBox( - height: 8, - ), - AppText( - TranslationBase.of(context) - .patientFeelsPainInHisBackAndCough, - fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .additionalTextComplaints, - helpers.parseHtmlString(model - .patientChiefComplaintList[0] - .chiefComplaint), - false), - enabled: false, - controller: _additionalComplaintsController, - keyboardType: TextInputType.multiline, - minLines: 1, - maxLines: 20, - )), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).otherConditions, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - ...List.generate( - conditionsData.length, - (index) => CheckboxListTile( - title: AppText( - conditionsData[index]['name'], - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, + SizedBox( + height: 2, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).pulseBeats}:", + fontSize: + SizeConfig.textMultiplier * 1.8, + color: Colors.black, + fontWeight: FontWeight.normal, + ), + SizedBox( + width: 4, + ), + AppText( + "${model.hartRat}", + fontSize: + SizeConfig.textMultiplier * 2, + color: Colors.grey.shade800, + fontWeight: FontWeight.w700, + ), + ], ), - value: conditionsData[index]['isChecked'], - onChanged: (newValue) { - setState(() { - conditionsData[index]['isChecked'] = - newValue; - }); - }, - controlAffinity: - ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), - )), - SizedBox( - height: 8, - ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).other, - null, - false), - enabled: true, - controller: _otherController, - keyboardType: TextInputType.text, - )), - SizedBox( - height: 8, - ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).how, - null, - false), - enabled: true, - controller: _howController, - keyboardType: TextInputType.text, - )), - SizedBox( - height: 8, - ), - Row( - children: [ - Expanded( - child: Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).when, - null, - false), - enabled: true, - controller: _whenController, - keyboardType: TextInputType.text, - )), - ), - SizedBox( - width: 4, - ), - Expanded( - child: Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).where, - null, - false), - enabled: true, - controller: _whereController, - keyboardType: TextInputType.text, - )), - ), - ], - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .specifyPossibleLineManagement, - null, - false), - enabled: true, - controller: _managementsLineController, - keyboardType: TextInputType.text, - minLines: 4, - maxLines: 6, - )), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).significantSigns, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.0, - ), - SizedBox( - height: 8, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).backAbdomen, - null, - false), - enabled: true, - controller: _signsController, - keyboardType: TextInputType.multiline, - minLines: null, - maxLines: null, - )), - SizedBox( - height: 16, - ), - AppButton( - title: TranslationBase.of(context).next, - color: HexColor("#B8382B"), - onPressed: () { - Navigator.of(context).pushNamed( - PATIENT_UCAF_DETAIL, - arguments: {'patient': patient}); - }, + ], + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context) + .chiefComplaintsAndSymptoms, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), + ), + SizedBox( + height: 4, + ), + AppText( + TranslationBase.of(context) + .patientFeelsPainInHisBackAndCough, + fontFamily: 'Poppins', + fontWeight: FontWeight.normal, + color: Color(0xFF575757), + fontSize: SizeConfig.textMultiplier * 1.8, + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).instruction, + dropDownText: Helpers.parseHtmlString(model + .patientChiefComplaintList[0] + .chiefComplaint), + controller: _additionalComplaintsController, + inputType: TextInputType.multiline, + enabled: false, + minLines: 1, + maxLines: 20, + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).otherConditions, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.1, + color: Color(0xFF2E303A), + ), + ...List.generate( + conditionsData.length, + (index) => CheckboxListTile( + title: AppText( + conditionsData[index]['name'], + fontWeight: FontWeight.normal, + fontSize: + SizeConfig.textMultiplier * 2.1, + fontFamily: 'Poppins', + ), + value: conditionsData[index] + ['isChecked'], + onChanged: (newValue) { + setState(() { + conditionsData[index] + ['isChecked'] = newValue; + }); + }, + controlAffinity: + ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + )), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).other, + dropDownText: "None", + enabled: false, + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).how, + dropDownText: "None", + enabled: false, + ), + SizedBox( + height: 8, + ), + Row( + children: [ + Expanded( + child: AppTextFieldCustom( + hintText: + TranslationBase.of(context).when, + dropDownText: "None", + enabled: false, + ), + ), + SizedBox( + width: 4, + ), + Expanded( + child: AppTextFieldCustom( + hintText: + TranslationBase.of(context).where, + dropDownText: "None", + enabled: false, + ), + ), + ], + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + height: screenSize.height * 0.1, + hintText: TranslationBase.of(context) + .specifyPossibleLineManagement, + dropDownText: "None", + enabled: false, + minLines: 4, + maxLines: 6, + ), + SizedBox( + height: 26, + ), + AppText( + TranslationBase.of(context).significantSigns, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, + ), + SizedBox( + height: 8, + ), + AppTextFieldCustom( + height: screenSize.height * 0.1, + hintText: + TranslationBase.of(context).backAbdomen, + dropDownText: "BackLNeck", + enabled: false, + ), + ], + ), ), ], ), ), - ], - ), - ) - : Container( - child: Center( - child: AppText( - model.patientVitalSigns == null - ? TranslationBase.of(context).vitalSignEmptyMsg - : TranslationBase.of(context).chiefComplaintEmptyMsg, - fontWeight: FontWeight.normal, - color: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.5, ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: AppButton( + title: TranslationBase.of(context).next, + color: HexColor("#D02127"), + onPressed: () { + Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, + arguments: { + 'patient': patient, + 'patientType': patientType, + 'arrivalType': arrivalType + }); + }, + ), + ), + ], + ) + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + model.patientVitalSignsHistory.length > 0 + ? TranslationBase.of(context).vitalSignEmptyMsg + : TranslationBase.of(context).chiefComplaintEmptyMsg, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, + ), + ) + ], ), ), ), diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart new file mode 100644 index 00000000..da0381ed --- /dev/null +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -0,0 +1,159 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +/// * +/// By Mousa Zaid Mousa Abuzaid +/// At 13/4/2021 + +/* + All hex value from 100% to 0% alpha: used in line 122 + https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 + */ + +class PageStepperWidget extends StatelessWidget { + final int stepsCount; + final int currentStepIndex; + final Size screenSize; + + PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize}); + + @override + Widget build(BuildContext context) { + double dividerWidth = (screenSize.width / stepsCount) - (10 * stepsCount); + + return Container( + margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + for (int i = 1; i <= stepsCount; i++) + if (i == currentStepIndex) + StepWidget(i, true, i == stepsCount, i < currentStepIndex, + dividerWidth) + else + StepWidget(i, false, i == stepsCount, i < currentStepIndex, + dividerWidth) + ], + ) + ], + ), + ); + } +} + +class StepWidget extends StatelessWidget { + + final int index; + final bool isInProgress; + final bool isFinalStep; + final bool isStepFinish; + final double dividerWidth; + + StepWidget(this.index, this.isInProgress, this.isFinalStep, this.isStepFinish, + this.dividerWidth); + + @override + Widget build(BuildContext context) { + StepStatus status; + if (isInProgress) { + status = StepStatus.InProgress; + } else { + if(isStepFinish){ + status = StepStatus.Completed; + }else { + status = StepStatus.Locked; + } + } + + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + padding: EdgeInsets.all(0.0), + margin: EdgeInsets.symmetric(horizontal: 1), + width: 30, + height: 30, + decoration: BoxDecoration( + color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), + shape: BoxShape.circle, + border: Border.all( + color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), + width: 1), + ), + child: Center( + child: Icon( + Icons.check, + size: 20, + color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.white, + )), + ), + if (!isFinalStep) + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + width: dividerWidth, + height: 2, + color: status == StepStatus.Completed ? Color(0xFF359846) : Color(0xFFCCCCCC), + ), + ], + ), + SizedBox( + height: 8, + ), + AppText( + "${TranslationBase.of(context).step} $index", + fontWeight: FontWeight.bold, + color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.black, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + Container( + margin: EdgeInsets.symmetric(vertical: 4), + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4), + decoration: BoxDecoration( + color: status == StepStatus.InProgress + ? Color(0xFFF1E9D3) + : status == StepStatus.Locked + ? Color(0x29797979) + : Color(0xFFD8E8D8), + borderRadius: BorderRadius.all( + Radius.circular(4.0), + ), + border: Border.all(color: status == StepStatus.InProgress + ? Color(0xFFF1E9D3) + : status == StepStatus.Locked + ? Color(0x29797979) + : Color(0xFFD8E8D8), width: 0.30), + ), + child: AppText( + status == StepStatus.InProgress + ? "inProgress" + : status == StepStatus.Locked + ? "Locked" + : "Completed", + fontWeight: FontWeight.bold, + textAlign: TextAlign.center, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.4, + color: status == StepStatus.InProgress + ? Color(0xFFCC9B14) + : status == StepStatus.Locked + ? Color(0xFF969696) + : Color(0xFF359846), + ), + ) + ], + ); + } +} + +enum StepStatus { + InProgress, + Locked, + Completed, +} \ No newline at end of file diff --git a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart index 23e33db3..20a93ff6 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart @@ -7,9 +7,9 @@ import 'package:doctor_app_flutter/util/date-utils.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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index 1cf69da8..dd93be70 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -6,16 +6,14 @@ 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/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/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -43,6 +41,12 @@ class _AdmissionRequestThirdScreenState bool _isSickLeaveRequired = false; bool _patientPregnant = false; + String clinicError; + String doctorError; + String sickLeaveCommentError; + String medicalHistoryError; + String surgicalHistoryError; + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -55,10 +59,12 @@ class _AdmissionRequestThirdScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( - onTap: (){ + onTap: () { FocusScopeNode currentFocus = FocusScope.of(context); if (!currentFocus.hasPrimaryFocus) { currentFocus.unfocus(); @@ -66,418 +72,377 @@ class _AdmissionRequestThirdScreenState }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: SingleChildScrollView( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // PatientProfileHeaderNewDesign( + // patient, patientType, arrivalType), + Container( + margin: EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // PatientPageHeaderWidget(patient), - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), - Container( - margin: EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${TranslationBase.of(context).admission}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, - ), - AppText( - "${TranslationBase.of(context).request}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - ) - ], - ), + AppText( + "${TranslationBase.of(context).admission}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, ), - Container( - margin: EdgeInsets.symmetric( - vertical: 0, horizontal: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .specialityAndDoctorDetail, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.8, - fontWeight: FontWeight.w700, - ), - SizedBox( - height: 10, - ), - AppTextFieldCustom( - height: screenSize.height * 0.070, - hintText: "test field", - isDropDown: true, - controller: _sickLeaveCommentsController, - ), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.clinicList != null && - model.clinicList.length > 0 - ? () { - openListDialogField( - 'clinicGroupName', - 'clinicID', - model.clinicList, - (selectedValue) { - setState(() { - _selectedClinic = selectedValue; - }); - }); - } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getClinics().then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.Idle && - model.clinicList.length > 0) { - openListDialogField( - 'clinicGroupName', - 'clinicID', - model.clinicList, - (selectedValue) { - setState(() { - _selectedClinic = - selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .clinic, - _selectedClinic != null - ? _selectedClinic[ - 'clinicGroupName'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 20, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: _selectedClinic != null - ? model.doctorsList != null && - model.doctorsList.length > 0 - ? () { - openListDialogField( - 'DoctorName', - 'DoctorID', - model.doctorsList, - (selectedValue) { - setState(() { - _selectedDoctor = - selectedValue; - }); - }); - } - : () async { - GifLoaderDialogUtils - .showMyDialog(context); - await model - .getClinicDoctors( - _selectedClinic[ - 'clinicID']) - .then((_) => - GifLoaderDialogUtils - .hideDialog( - context)); - if (model.state == - ViewState.Idle && - model.doctorsList.length > - 0) { - openListDialogField( - 'DoctorName', - 'DoctorID', - model.doctorsList, - (selectedValue) { - setState(() { - _selectedDoctor = - selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - } - : null, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .doctor, - _selectedDoctor != null - ? _selectedDoctor[ - 'DoctorName'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).patientDetails, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - SizedBox( - height: 10, - ), - CheckboxListTile( - title: AppText( - TranslationBase.of(context).patientPregnant, - fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.1, - ), - value: _patientPregnant, - onChanged: (newValue) { - setState(() { - _patientPregnant = newValue; - }); - }, - controlAffinity: - ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), - ), - CheckboxListTile( - title: AppText( - TranslationBase.of(context) - .isSickLeaveRequired, - fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.1, - ), - value: _isSickLeaveRequired, - onChanged: (newValue) { - setState(() { - _isSickLeaveRequired = newValue; + AppText( + "${TranslationBase.of(context).request}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), + ), + Container( + margin: + EdgeInsets.symmetric(vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .specialityAndDoctorDetail, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w700, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).clinic, + isTextFieldHasSuffix: true, + validationError: clinicError, + dropDownText: _selectedClinic != null + ? projectViewModel.isArabic? _selectedClinic['clinicNameArabic'] : _selectedClinic['clinicNameEnglish'] + : null, + enabled: false, + onClick: model.clinicList != null && + model.clinicList.length > 0 + ? () { + openListDialogField( + projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish', + 'clinicID', + model.clinicList, (selectedValue) { + setState(() { + _selectedClinic = selectedValue; + }); }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getClinics().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.clinicList.length > 0) { + openListDialogField( + projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish', + 'clinicID', + model.clinicList, (selectedValue) { + setState(() { + _selectedClinic = selectedValue; + }); + }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); + } }, - controlAffinity: - ListTileControlAffinity.leading, - contentPadding: EdgeInsets.all(0), - ), - Container( - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .sickLeaveComments, - null, - false), - enabled: true, - controller: _sickLeaveCommentsController, - keyboardType: TextInputType.text, - minLines: 2, - maxLines: 4, - )), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.dietTypesList != null && - model.dietTypesList.length > 0 - ? () { - openListDialogField('nameEn', 'id', - model.dietTypesList, - (selectedValue) { - setState(() { - _selectedDietType = - selectedValue; - }); + ), + SizedBox( + height: 20, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).doctor, + isTextFieldHasSuffix: true, + dropDownText: _selectedDoctor != null + ? _selectedDoctor['DoctorName'] + : null, + enabled: false, + validationError: doctorError, + onClick: _selectedClinic != null + ? model.doctorsList != null && + model.doctorsList.length > 0 + ? () { + openListDialogField('DoctorName', + 'DoctorID', model.doctorsList, + (selectedValue) { + setState(() { + _selectedDoctor = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinicDoctors( + _selectedClinic['clinicID']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == ViewState.Idle && + model.doctorsList.length > 0) { + openListDialogField('DoctorName', + 'DoctorID', model.doctorsList, + (selectedValue) { + setState(() { + _selectedDoctor = selectedValue; }); - } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getDietTypes().then( - (_) => GifLoaderDialogUtils - .hideDialog(context)); - if (model.state == ViewState.Idle && - model.dietTypesList.length > - 0) { - openListDialogField('nameEn', - 'id', model.dietTypesList, - (selectedValue) { - setState(() { - _selectedDietType = - selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .dietType, - _selectedDietType != null - ? _selectedDietType['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .dietTypeRemarks, - null, - false), - enabled: true, - controller: _dietTypeRemarksController, - keyboardType: TextInputType.text, - minLines: 4, - maxLines: 6, - )), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .pastMedicalHistory, - null, - false), - enabled: true, - controller: _postMedicalHistoryController, - keyboardType: TextInputType.text, - minLines: 2, - maxLines: 4, - )), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .pastSurgicalHistory, - null, - false), - enabled: true, - controller: _postSurgicalHistoryController, - keyboardType: TextInputType.text, - minLines: 2, - maxLines: 4, - )), - ], + }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); + } + } + : null, + ), + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).patientDetails, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w700, + ), + SizedBox( + height: 10, + ), + if(patient.gender != 1) + CheckboxListTile( + title: AppText( + TranslationBase.of(context).patientPregnant, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, + ), + value: _patientPregnant, + activeColor: HexColor("#D02127"), + onChanged: (newValue) { + setState(() { + _patientPregnant = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + CheckboxListTile( + title: AppText( + TranslationBase.of(context).isSickLeaveRequired, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, ), + value: _isSickLeaveRequired, + activeColor: HexColor("#D02127"), + onChanged: (newValue) { + setState(() { + _isSickLeaveRequired = newValue; + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).sickLeaveComments, + controller: _sickLeaveCommentsController, + minLines: 2, + maxLines: 4, + validationError: sickLeaveCommentError, + inputType: TextInputType.multiline, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).dietType, + isTextFieldHasSuffix: true, + dropDownText: _selectedDietType != null + ? _selectedDietType['nameEn'] + : null, + enabled: false, + onClick: model.dietTypesList != null && + model.dietTypesList.length > 0 + ? () { + openListDialogField( + 'nameEn', 'id', model.dietTypesList, + (selectedValue) { + setState(() { + _selectedDietType = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getDietTypes(patient.patientId).then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.dietTypesList.length > 0) { + openListDialogField( + 'nameEn', 'id', model.dietTypesList, + (selectedValue) { + setState(() { + _selectedDietType = selectedValue; + }); + }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); + } + }, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).dietTypeRemarks, + controller: _dietTypeRemarksController, + minLines: 4, + maxLines: 6, + inputType: TextInputType.multiline, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).pastMedicalHistory, + controller: _postMedicalHistoryController, + minLines: 4, + maxLines: 6, + validationError: medicalHistoryError, + inputType: TextInputType.multiline, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).pastSurgicalHistory, + controller: _postSurgicalHistoryController, + minLines: 2, + maxLines: 4, + validationError: surgicalHistoryError, + inputType: TextInputType.multiline, ), ], ), ), - ), - Container( - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: AppButton( - title: TranslationBase.of(context).next, - color: HexColor("#B8382B"), - onPressed: () { - model.admissionRequestData = AdmissionRequest(); - if (_selectedClinic != null && - _selectedDoctor != null && - _sickLeaveCommentsController.text != "" && - _postMedicalHistoryController.text != "" && - _postSurgicalHistoryController.text != "") { - model.admissionRequestData.patientMRN = - patient.patientMRN; - model.admissionRequestData.appointmentNo = - patient.appointmentNo; - model.admissionRequestData.episodeID = - patient.episodeNo; - model.admissionRequestData.admissionRequestNo = 0; + ], + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: AppButton( + title: TranslationBase.of(context).next, + color: HexColor("#D02127"), + onPressed: () { + model.admissionRequestData = AdmissionRequest(); + if (_selectedClinic != null && + _selectedDoctor != null && + _sickLeaveCommentsController.text != "" && + _postMedicalHistoryController.text != "" && + _postSurgicalHistoryController.text != "") { + model.admissionRequestData.patientMRN = + patient.patientMRN; + model.admissionRequestData.appointmentNo = + patient.appointmentNo; + model.admissionRequestData.episodeID = patient.episodeNo; + model.admissionRequestData.admissionRequestNo = 0; - model.admissionRequestData.admitToClinic = - _selectedClinic['clinicID']; - model.admissionRequestData.mrpDoctorID = - _selectedDoctor['DoctorID']; + model.admissionRequestData.admitToClinic = + _selectedClinic['clinicID']; + model.admissionRequestData.mrpDoctorID = + _selectedDoctor['DoctorID']; - model.admissionRequestData.isPregnant = - _patientPregnant; - model.admissionRequestData.isSickLeaveRequired = - _isSickLeaveRequired; - model.admissionRequestData.sickLeaveComments = - _sickLeaveCommentsController.text; - model.admissionRequestData.isDietType = - _selectedDietType != null ? true : false; - model.admissionRequestData.dietType = - _selectedDietType != null - ? _selectedDietType['id'] - : 0; - model.admissionRequestData.dietRemarks = - _dietTypeRemarksController.text; - model.admissionRequestData.pastMedicalHistory = - _postMedicalHistoryController.text; - model.admissionRequestData.pastSurgicalHistory = - _postSurgicalHistoryController.text; - Navigator.of(context).pushNamed( - PATIENT_ADMISSION_REQUEST_2, - arguments: { - 'patient': patient, - 'admission-data': model.admissionRequestData - }); - } else { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseFill); - } - }, - ), - ), - ], + model.admissionRequestData.isPregnant = _patientPregnant; + model.admissionRequestData.isSickLeaveRequired = + _isSickLeaveRequired; + model.admissionRequestData.sickLeaveComments = + _sickLeaveCommentsController.text; + model.admissionRequestData.isDietType = + _selectedDietType != null ? true : false; + model.admissionRequestData.dietType = + _selectedDietType != null + ? _selectedDietType['id'] + : 0; + model.admissionRequestData.dietRemarks = + _dietTypeRemarksController.text; + model.admissionRequestData.pastMedicalHistory = + _postMedicalHistoryController.text; + model.admissionRequestData.pastSurgicalHistory = + _postSurgicalHistoryController.text; + Navigator.of(context) + .pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: { + 'patient': patient, + 'patientType': patientType, + 'arrivalType': arrivalType, + 'admission-data': model.admissionRequestData + }); + } else { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseFill); + + setState(() { + if(_selectedClinic == null){ + clinicError = TranslationBase.of(context).fieldRequired; + }else { + clinicError = null; + } + if(_selectedDoctor == null){ + doctorError = TranslationBase.of(context).fieldRequired; + }else { + doctorError = null; + } + if(_sickLeaveCommentsController.text == ""){ + sickLeaveCommentError = TranslationBase.of(context).fieldRequired; + }else { + sickLeaveCommentError = null; + } + if(_postMedicalHistoryController.text == ""){ + medicalHistoryError = TranslationBase.of(context).fieldRequired; + }else { + medicalHistoryError = null; + } + if(_postSurgicalHistoryController.text == ""){ + surgicalHistoryError = TranslationBase.of(context).fieldRequired; + }else { + surgicalHistoryError = null; + } + }); + } + }, ), + ), + ], + ), ), ), ); diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index 342d2e72..71a29a1e 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -1,4 +1,3 @@ -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'; @@ -7,18 +6,16 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view 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/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -32,19 +29,20 @@ class AdmissionRequestThirdScreen extends StatefulWidget { class _AdmissionRequestThirdScreenState extends State { - final _treatmentLineController = TextEditingController(); - final _complicationsController = TextEditingController(); - final _otherProceduresController = TextEditingController(); - - dynamic _selectedAdmissionType; dynamic _selectedDiagnosis; dynamic _selectedIcd; dynamic _selectedDiagnosisType; + String diagnosisError; + String icdError; + String diagnosisTypeError; + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; AdmissionRequest admissionRequest = routeArgs['admission-data']; final screenSize = MediaQuery.of(context).size; @@ -53,6 +51,9 @@ class _AdmissionRequestThirdScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { @@ -68,132 +69,67 @@ class _AdmissionRequestThirdScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientPageHeaderWidget(patient), Container( - margin: - EdgeInsets.symmetric(vertical: 16, horizontal: 16), + margin: EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).treatmentLine, - null, - false), - enabled: true, - controller: _treatmentLineController, - keyboardType: TextInputType.text, - minLines: 3, - maxLines: 5, - )), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).complications, - null, - false), - enabled: true, - controller: _complicationsController, - keyboardType: TextInputType.text, - minLines: 3, - maxLines: 5, - )), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).otherProcedure, - null, - false), - enabled: true, - controller: _otherProceduresController, - keyboardType: TextInputType.text, - minLines: 3, - maxLines: 5, - )), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.admissionTypeList != null && - model.admissionTypeList.length > 0 - ? () { - openListDialogField('nameEn', 'id', - model.admissionTypeList, - (selectedValue) { - setState(() { - _selectedAdmissionType = - selectedValue; - }); - }); - } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model - .getMasterLookup(MasterKeysService - .AdmissionRequestType) - .then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - 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, - _selectedAdmissionType != null - ? _selectedAdmissionType['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 16, + AppText( + "${TranslationBase.of(context).admission}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, ), AppText( - TranslationBase.of(context).diagnosisDetail, + "${TranslationBase.of(context).request}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, + ) + ], + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).diagnosisDetail, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w700, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.diagnosisTypesList != null && - model.diagnosisTypesList.length > 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).diagnosis, + dropDownText: _selectedDiagnosis != null + ? _selectedDiagnosis['nameEn'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: diagnosisError, + onClick: model.diagnosisTypesList != null && + model.diagnosisTypesList.length > 0 + ? () { + openListDialogField('nameEn', 'id', + model.diagnosisTypesList, + (selectedValue) { + setState(() { + _selectedDiagnosis = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.getDiagnosis().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.diagnosisTypesList.length > 0) { openListDialogField('nameEn', 'id', model.diagnosisTypesList, (selectedValue) { @@ -201,51 +137,47 @@ class _AdmissionRequestThirdScreenState _selectedDiagnosis = selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getDiagnosis().then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - 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, - _selectedDiagnosis != null - ? _selectedDiagnosis['nameEn'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.icdCodes != null && - model.icdCodes.length > 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).icd, + dropDownText: _selectedIcd != null + ? _selectedIcd['description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: icdError, + onClick: model.icdCodes != null && + model.icdCodes.length > 0 + ? () { + openListDialogField( + 'description', 'code', model.icdCodes, + (selectedValue) { + setState(() { + _selectedIcd = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog(context); + await model + .getICDCodes(patient.patientMRN) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.icdCodes.length > 0) { openListDialogField( 'description', 'code', model.icdCodes, (selectedValue) { @@ -253,57 +185,52 @@ class _AdmissionRequestThirdScreenState _selectedIcd = selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model - .getICDCodes(patient.patientMRN) - .then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.Idle && - model.icdCodes.length > 0) { - openListDialogField( - 'description', - 'code', - model.icdCodes, (selectedValue) { - setState(() { - _selectedIcd = selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).icd, - _selectedIcd != null - ? _selectedIcd['description'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.listOfDiagnosisSelectionTypes != - null && - model.listOfDiagnosisSelectionTypes - .length > - 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).diagnoseType, + dropDownText: _selectedDiagnosisType != null + ? _selectedDiagnosisType['description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: diagnosisTypeError, + onClick: model.listOfDiagnosisSelectionTypes != + null && + model.listOfDiagnosisSelectionTypes.length > + 0 + ? () { + openListDialogField('description', 'code', + model.listOfDiagnosisSelectionTypes, + (selectedValue) { + setState(() { + _selectedDiagnosisType = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog(context); + await model + .getMasterLookup(MasterKeysService + .DiagnosisSelectionType) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.listOfDiagnosisSelectionTypes + .length > + 0) { openListDialogField('description', 'code', model.listOfDiagnosisSelectionTypes, (selectedValue) { @@ -312,49 +239,14 @@ class _AdmissionRequestThirdScreenState selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model - .getMasterLookup(MasterKeysService - .DiagnosisSelectionType) - .then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.Idle && - model.listOfDiagnosisSelectionTypes - .length > - 0) { - openListDialogField( - 'description', - 'code', - model.listOfDiagnosisSelectionTypes, - (selectedValue) { - setState(() { - _selectedDiagnosisType = - selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).diagnoseType, - _selectedDiagnosisType != null - ? _selectedDiagnosisType['description'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, @@ -367,55 +259,86 @@ class _AdmissionRequestThirdScreenState )), Container( margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: AppButton( - title: TranslationBase.of(context).next, - color: HexColor("#B8382B"), - onPressed: () async { - if (_treatmentLineController.text != "" && - _complicationsController.text != "" && - _otherProceduresController.text != "" && - _selectedAdmissionType != null && - _selectedDiagnosis != null && - _selectedIcd != null && - _selectedDiagnosisType != null) { - model.admissionRequestData = admissionRequest; + child: Row( + children: [ + Expanded( + child: AppButton( + title: TranslationBase.of(context).previous, + color: HexColor("#EAEAEA"), + fontColor: Colors.black, + onPressed: () { + Navigator.pop(context); + }, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: AppButton( + title: TranslationBase.of(context).submit, + color: HexColor("#359846"), + onPressed: () async { + if (_selectedDiagnosis != null && + _selectedIcd != null && + _selectedDiagnosisType != null) { + model.admissionRequestData = admissionRequest; + + dynamic admissionRequestDiagnoses = [ + { + 'diagnosisDescription': + _selectedDiagnosis['nameEn'], + 'diagnosisType': _selectedDiagnosis['id'], + 'icdCode': _selectedIcd['code'], + 'icdCodeDescription': + _selectedIcd['description'], + 'type': _selectedDiagnosisType['code'], + 'remarks': "", + 'isActive': true, + } + ]; + model.admissionRequestData + .admissionRequestDiagnoses = + admissionRequestDiagnoses; + + await model.makeAdmissionRequest(); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .admissionRequestSuccessMsg); + Navigator.popUntil(context, + ModalRoute.withName(PATIENTS_PROFILE)); + } + } else { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseFill); - model.admissionRequestData.mainLineOfTreatment = - _treatmentLineController.text; - model.admissionRequestData.complications = - _complicationsController.text; - model.admissionRequestData.otherProcedures = - _otherProceduresController.text; - model.admissionRequestData.admissionType = - _selectedAdmissionType['id']; + setState(() { + if(_selectedDiagnosis == null){ + diagnosisError = TranslationBase.of(context).fieldRequired; + }else { + diagnosisError = null; + } - dynamic admissionRequestDiagnoses = [ - { - 'diagnosisDescription': _selectedDiagnosis['nameEn'], - 'diagnosisType': _selectedDiagnosis['id'], - 'icdCode': _selectedIcd['code'], - 'icdCodeDescription': _selectedIcd['description'], - 'type': _selectedDiagnosisType['code'], - 'remarks': "", - 'isActive': true, - } - ]; - model.admissionRequestData.admissionRequestDiagnoses = - admissionRequestDiagnoses; + if(_selectedIcd == null){ + icdError = TranslationBase.of(context).fieldRequired; + }else { + icdError = null; + } - await model.makeAdmissionRequest(); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } else { - DrAppToastMsg.showSuccesToast( - TranslationBase.of(context).admissionRequestSuccessMsg); - Navigator.popUntil(context, ModalRoute.withName(PATIENTS_PROFILE)); - } - } else { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseFill); - } - }, + if(_selectedDiagnosisType == null){ + diagnosisTypeError = TranslationBase.of(context).fieldRequired; + }else { + diagnosisTypeError = null; + } + }); + } + }, + ), + ), + ], ), ), ], diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 91885724..05a43460 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -9,14 +9,14 @@ 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/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -36,17 +36,35 @@ class _AdmissionRequestSecondScreenState final _estimatedCostController = TextEditingController(); final _expectedDaysController = TextEditingController(); final _otherDepartmentsInterventionsController = TextEditingController(); + final _treatmentLineController = TextEditingController(); + final _complicationsController = TextEditingController(); + final _otherProceduresController = TextEditingController(); DateTime _expectedAdmissionDate; dynamic _selectedFloor; dynamic _selectedWard; dynamic _selectedRoomCategory; + dynamic _selectedAdmissionType; + + String costError; + String plansError; + String otherInterventionsError; + String expectedDaysError; + String expectedDatesError; + String floorError; + String roomError; + String treatmentsError; + String complicationsError; + String proceduresError; + String admissionTypeError; @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; AdmissionRequest admissionRequest = routeArgs['admission-data']; final screenSize = MediaQuery.of(context).size; @@ -55,6 +73,9 @@ class _AdmissionRequestSecondScreenState return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { @@ -70,145 +91,166 @@ class _AdmissionRequestSecondScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientPageHeaderWidget(patient), + // PatientProfileHeaderNewDesign( + // patient, patientType, arrivalType), Container( - margin: EdgeInsets.symmetric( - vertical: 16, horizontal: 16), + margin: EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 16, + AppText( + "${TranslationBase.of(context).admission}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, ), + AppText( + "${TranslationBase.of(context).request}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), + ), + Container( + margin: + EdgeInsets.symmetric(vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ AppText( TranslationBase.of(context) .postPlansEstimatedCost, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w700, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .estimatedCost, - null, - false), - enabled: true, - controller: _estimatedCostController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - keyboardType: TextInputType.number, - )), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).estimatedCost, + controller: _estimatedCostController, + validationError: costError, + inputType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + ), SizedBox( height: 10, ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).postPlans, - null, - false), - enabled: true, + AppTextFieldCustom( + hintText: TranslationBase.of(context).postPlans, controller: _postPlansEstimatedCostController, - keyboardType: TextInputType.text, + inputType: TextInputType.multiline, + validationError: plansError, minLines: 4, maxLines: 6, - )), + ), SizedBox( height: 10, ), - Container( - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .otherDepartmentsInterventions, - null, - false), - enabled: true, - controller: + AppTextFieldCustom( + hintText: TranslationBase.of(context) + .otherDepartmentsInterventions, + controller: _otherDepartmentsInterventionsController, - keyboardType: TextInputType.multiline, - minLines: 2, - maxLines: 4, - )), + inputType: TextInputType.multiline, + validationError: otherInterventionsError, + minLines: 2, + maxLines: 4, + ), SizedBox( height: 10, ), AppText( TranslationBase.of(context).otherInformation, - fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.5, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w700, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .expectedDays, - null, - false), - enabled: true, - controller: _expectedDaysController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - keyboardType: TextInputType.number, - )), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).expectedDays, + controller: _expectedDaysController, + validationError: expectedDaysError, + inputType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: () { - if (_expectedAdmissionDate == null) { - _expectedAdmissionDate = DateTime.now(); - } - _selectDate(context, _expectedAdmissionDate, - (picked) { - setState(() { - _expectedAdmissionDate = picked; - }); + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context) + .expectedAdmissionDate, + dropDownText: _expectedAdmissionDate != null + ? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}" + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: expectedDatesError, + suffixIcon: IconButton( + icon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + onClick: () { + if (_expectedAdmissionDate == null) { + _expectedAdmissionDate = DateTime.now(); + } + _selectDate(context, _expectedAdmissionDate, + (picked) { + setState(() { + _expectedAdmissionDate = picked; }); - }, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .expectedAdmissionDate, - _expectedAdmissionDate != null - ? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), + }); + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.floorList != null && - model.floorList.length > 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).floor, + dropDownText: _selectedFloor != null + ? _selectedFloor['description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: floorError, + onClick: model.floorList != null && + model.floorList.length > 0 + ? () { + openListDialogField( + 'description', + 'floorID', + model.floorList, (selectedValue) { + setState(() { + _selectedFloor = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getFloors().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.floorList.length > 0) { openListDialogField( 'description', 'floorID', @@ -217,52 +259,47 @@ class _AdmissionRequestSecondScreenState _selectedFloor = selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getFloors().then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.Idle && - model.floorList.length > 0) { - openListDialogField('description', - 'floorID', model.floorList, - (selectedValue) { - setState(() { - _selectedFloor = selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).floor, - _selectedFloor != null - ? _selectedFloor['description'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.wardList != null && - model.wardList.length > 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).ward, + dropDownText: _selectedWard != null + ? _selectedWard['description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + onClick: model.wardList != null && + model.wardList.length > 0 + ? () { + openListDialogField( + 'description', + 'nursingStationID', + model.wardList, (selectedValue) { + setState(() { + _selectedWard = selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getWards().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.wardList.length > 0) { openListDialogField( 'description', 'nursingStationID', @@ -271,54 +308,52 @@ class _AdmissionRequestSecondScreenState _selectedWard = selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getWards().then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.Idle && - model.wardList.length > 0) { - openListDialogField( - 'description', - 'nursingStationID', - 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['description'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.roomCategoryList != null && - model.roomCategoryList.length > 0 - ? () { + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).roomCategory, + dropDownText: _selectedRoomCategory != null + ? _selectedRoomCategory['description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: roomError, + onClick: model.roomCategoryList != null && + model.roomCategoryList.length > 0 + ? () { + openListDialogField( + 'description', + 'categoryID', + model.roomCategoryList, + (selectedValue) { + setState(() { + _selectedRoomCategory = + selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getRoomCategories().then( + (_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.roomCategoryList.length > 0) { openListDialogField( 'description', 'categoryID', @@ -329,52 +364,107 @@ class _AdmissionRequestSecondScreenState selectedValue; }); }); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } else { + DrAppToastMsg.showErrorToast( + "Empty List"); } - : () async { - GifLoaderDialogUtils.showMyDialog( - context); - await model.getRoomCategories().then( - (_) => GifLoaderDialogUtils - .hideDialog(context)); - if (model.state == ViewState.Idle && - model.roomCategoryList.length > - 0) { - openListDialogField( - 'description', - 'categoryID', - model.roomCategoryList, - (selectedValue) { - setState(() { - _selectedRoomCategory = - selectedValue; - }); - }); - } else if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } else { - DrAppToastMsg.showErrorToast( - "Empty List"); - } - }, - child: TextField( - decoration: - Helpers.textFieldSelectorDecoration( - TranslationBase.of(context) - .roomCategory, - _selectedRoomCategory != null - ? _selectedRoomCategory[ - 'description'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).treatmentLine, + controller: _treatmentLineController, + inputType: TextInputType.multiline, + validationError: treatmentsError, + minLines: 3, + maxLines: 5, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).complications, + controller: _complicationsController, + inputType: TextInputType.multiline, + validationError: complicationsError, + minLines: 3, + maxLines: 5, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).otherProcedure, + controller: _otherProceduresController, + inputType: TextInputType.multiline, + validationError: proceduresError, + minLines: 3, + maxLines: 5, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).admissionType, + dropDownText: _selectedAdmissionType != null + ? _selectedAdmissionType['nameEn'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: admissionTypeError, + onClick: model.admissionTypeList != null && + model.admissionTypeList.length > 0 + ? () { + openListDialogField('nameEn', 'id', + model.admissionTypeList, + (selectedValue) { + setState(() { + _selectedAdmissionType = + selectedValue; + }); + }); + } + : () async { + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getMasterLookup(MasterKeysService + .AdmissionRequestType) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + 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"); + } + }, + ), ], ), ), @@ -384,53 +474,173 @@ class _AdmissionRequestSecondScreenState ), Container( margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), - child: AppButton( - title: TranslationBase.of(context).next, - color: HexColor("#B8382B"), - onPressed: () async { - if (_estimatedCostController.text != "" && - _postPlansEstimatedCostController.text != "" && - _expectedDaysController.text != "" && - _expectedAdmissionDate != null && - _otherDepartmentsInterventionsController.text != "" && - _selectedFloor != null && - _selectedRoomCategory != - null /*_selectedWard is not required*/) { - model.admissionRequestData = admissionRequest; + child: Row( + children: [ + Expanded( + child: AppButton( + title: TranslationBase.of(context).previous, + color: HexColor("#EAEAEA"), + fontColor: Colors.black, + onPressed: () { + Navigator.pop(context); + }, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: AppButton( + title: TranslationBase.of(context).next, + color: HexColor("#D02127"), + onPressed: () async { + if (_estimatedCostController.text != "" && + _postPlansEstimatedCostController.text != "" && + _expectedDaysController.text != "" && + _expectedAdmissionDate != null && + _otherDepartmentsInterventionsController.text != + "" && + _selectedFloor != null && + _selectedRoomCategory != + null /*_selectedWard is not required*/ && + _treatmentLineController.text != "" && + _complicationsController.text != "" && + _otherProceduresController.text != "" && + _selectedAdmissionType != null) { + model.admissionRequestData = admissionRequest; - model.admissionRequestData.estimatedCost = - int.parse(_estimatedCostController.text); - model.admissionRequestData.elementsForImprovement = - _postPlansEstimatedCostController.text; + model.admissionRequestData.estimatedCost = + int.parse(_estimatedCostController.text); + model.admissionRequestData + .elementsForImprovement = + _postPlansEstimatedCostController.text; - model.admissionRequestData.expectedDays = - int.parse(_expectedDaysController.text); - model.admissionRequestData.admissionDate = - _expectedAdmissionDate.toIso8601String(); - model.admissionRequestData - .otherDepartmentInterventions = - _otherDepartmentsInterventionsController.text; - model.admissionRequestData.admissionLocationID = - _selectedFloor['floorID']; - model.admissionRequestData.wardID = - _selectedWard != null - ? _selectedWard['nursingStationID'] - : 0; - model.admissionRequestData.roomCategoryID = - _selectedRoomCategory['categoryID']; + model.admissionRequestData.expectedDays = + int.parse(_expectedDaysController.text); + model.admissionRequestData.admissionDate = + _expectedAdmissionDate.toIso8601String(); + model.admissionRequestData + .otherDepartmentInterventions = + _otherDepartmentsInterventionsController.text; + model.admissionRequestData.admissionLocationID = + _selectedFloor['floorID']; + model.admissionRequestData.wardID = + _selectedWard != null + ? _selectedWard['nursingStationID'] + : 0; + model.admissionRequestData.roomCategoryID = + _selectedRoomCategory['categoryID']; - model.admissionRequestData.admissionRequestProcedures = - []; - Navigator.of(context) - .pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: { - 'patient': patient, - 'admission-data': model.admissionRequestData - }); - } else { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseFill); - } - }, + model.admissionRequestData + .admissionRequestProcedures = []; + + model.admissionRequestData.mainLineOfTreatment = + _treatmentLineController.text; + model.admissionRequestData.complications = + _complicationsController.text; + model.admissionRequestData.otherProcedures = + _otherProceduresController.text; + model.admissionRequestData.admissionType = + _selectedAdmissionType['id']; + + Navigator.of(context).pushNamed( + PATIENT_ADMISSION_REQUEST_3, + arguments: { + 'patient': patient, + 'patientType': patientType, + 'arrivalType': arrivalType, + 'admission-data': model.admissionRequestData + }); + } else { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseFill); + + setState(() { + if (_estimatedCostController.text == "") { + costError = + TranslationBase.of(context).fieldRequired; + } else { + costError = null; + } + + if (_postPlansEstimatedCostController.text == + "") { + plansError = + TranslationBase.of(context).fieldRequired; + } else { + plansError = null; + } + + if (_expectedDaysController.text == "") { + expectedDaysError = + TranslationBase.of(context).fieldRequired; + } else { + expectedDaysError = null; + } + + if (_expectedAdmissionDate == null) { + expectedDatesError = + TranslationBase.of(context).fieldRequired; + } else { + expectedDatesError = null; + } + + if (_otherDepartmentsInterventionsController + .text == + "") { + otherInterventionsError = + TranslationBase.of(context).fieldRequired; + } else { + otherInterventionsError = null; + } + + if (_selectedFloor == null) { + floorError = + TranslationBase.of(context).fieldRequired; + } else { + floorError = null; + } + + if (_selectedRoomCategory == null) { + roomError = + TranslationBase.of(context).fieldRequired; + } else { + roomError = null; + } + + if (_treatmentLineController.text == "") { + treatmentsError = + TranslationBase.of(context).fieldRequired; + } else { + treatmentsError = null; + } + + if (_complicationsController.text == "") { + complicationsError = + TranslationBase.of(context).fieldRequired; + } else { + complicationsError = null; + } + + if (_otherProceduresController.text == "") { + proceduresError = + TranslationBase.of(context).fieldRequired; + } else { + proceduresError = null; + } + + if (_selectedAdmissionType == null) { + admissionTypeError = + TranslationBase.of(context).fieldRequired; + } else { + admissionTypeError = null; + } + }); + } + }, + ), + ), + ], ), ), ], diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart deleted file mode 100644 index 9105338b..00000000 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ /dev/null @@ -1,493 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/shared_pref_kay.dart'; -import '../../../config/size_config.dart'; -import '../../../models/patient/patiant_info_model.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - -class InsuranceApprovalsScreen extends StatefulWidget { - @override - _InsuranceApprovalsState createState() => _InsuranceApprovalsState(); -} - -class _InsuranceApprovalsState extends State { - var approvalsList; - var filteredApprovalsList; - final _controller = TextEditingController(); - - /* - *@author: ibrahim al bitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - getInsuranceApprovalsList( - BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - print(type); - InsuranceAprovalsRequest insuranceApprovalsRequest = - InsuranceAprovalsRequest( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2); - model - .getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson()).then((c){ - approvalsList = model.insuranceApporvalsList; - }); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getInsuranceApprovalsList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .insuranceApprovals, - body: model.insuranceApporvalsList == null || - model.insuranceApporvalsList.length == 0 - ? DrAppEmbeddedError( - error: - TranslationBase - .of(context) - .errorNoInsuranceApprovals) - : Column( - children: [ - Container( - margin: EdgeInsets.all(10), - width: SizeConfig.screenWidth * 0.80, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str, model); - }, - textInputAction: TextInputAction.done, - decoration: buildInputDecoration( - context, - TranslationBase - .of(context) - .searchInsuranceApprovals), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: ListView.builder( - itemCount: approvalsList.length, - itemBuilder: (BuildContext ctxt, int index) { - return RoundedContainer( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Row( - children: [ - Column( - children: [ - Icon( - approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? DoctorApp.approved_icon - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? DoctorApp - .reject_icon - : DoctorApp - .pending_icon, - color: approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Colors.green - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? Colors.red - : Colors.yellow, - ), - AppText( - approvalsList[index][ - "ApprovalStatusDescption"], - fontSize: SizeConfig - .textMultiplier * - 1.5, - color: approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Colors.green - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? Colors.red - : Colors.yellow, - ) - ], - ), - Expanded( - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - approvalsList[index] - ["ClinicName"], - marginTop: 10, - marginLeft: 10, - marginBottom: 5, - fontWeight: FontWeight.bold, - ), - AppText( - approvalsList[index] - ["DoctorName"], - marginLeft: 10, - marginTop: 1, - ), - AppText( - convertDateFormat( - approvalsList[index] - ["ApprovalDate"]), - marginLeft: 10, - marginBottom: 5, - color: Colors.grey[600], - ), - ], - ), - ) - ], - ), - children: [ - Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - RoundedContainer( - backgroundColor: - Color(PRIMARY_COLOR), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - approvalsList[index] - ["ApprovalNo"] - .toString(), - color: Colors.white, - fontSize: 19, - fontWeight: FontWeight.bold, - marginTop: 10, - marginLeft: 10, - marginRight: 10, - marginBottom: 2, - ), - AppText( - TranslationBase.of(context) - .approvalNo, - color: Colors.white, - fontSize: 16, - marginTop: 2, - marginLeft: 10, - marginBottom: 15, - marginRight: 10, - ), - Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .producerName, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 3, - ), - AppText( - checkList(approvalsList[ - index] - [ - "ApporvalDetails"]) - ? approvalsList[ - index] - [ - "ApporvalDetails"][0] - [ - "ProcedureName"] - : "", - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: 3, - color: - Colors.white, - ), - ], - ), - ), - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .status, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 9, - ), - AppText( - approvalsList[ - index][ - "ApprovalStatusDescption"], - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 9, - marginTop: 3, - color: - Colors.white, - ), - ], - ), - ), - ], - ), - Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .receiptOn, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: SizeConfig - .heightMultiplier * - 1.5, - ), - AppText( - convertDateFormat( - approvalsList[ - index] - [ - "ReceiptOn"]), - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: 3, - marginBottom: - SizeConfig - .heightMultiplier * - 2, - color: - Colors.white, - ), - ], - ), - ), - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .expiryDate, - fontSize: 10, - color: - Colors.white, - marginTop: SizeConfig - .heightMultiplier * - 1.5, - marginLeft: SizeConfig - .widthMultiplier * - 9, - ), - AppText( - convertDateFormat( - approvalsList[ - index] - [ - "ExpiryDate"]), - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 9, - marginTop: 3, - marginBottom: - SizeConfig - .heightMultiplier * - 2, - color: - Colors.white, - ), - ], - ), - ), - ], - ), - ], - )), - ], - ), - ], - )); - }), - ), - ), - ], - ), - ),); - } - - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - prefixIcon: Icon(Icons.search, color: Colors.black), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - searchData(String str, PatientViewModel model) { - var strExist = str.length > 0 ? true : false; - - if (strExist) { - filteredApprovalsList = null; - filteredApprovalsList = approvalsList - .where((note) => - note["ClinicName"].toString().contains(str.toUpperCase())) - .toList(); - setState(() { - approvalsList = filteredApprovalsList; - }); - } else { - setState(() { - approvalsList = model.insuranceApporvalsList; - }); - } - } - - convertDateFormat(String str) { - if (str == null) return ''; - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } - - bool checkList(List list) { - return list.length > 0 ? true : false; - } -} diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index 772391b0..2f760d1f 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/FlowChartPage.dart @@ -1,11 +1,14 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_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/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'lab_result_chart_and_detials.dart'; @@ -13,31 +16,49 @@ class FlowChartPage extends StatelessWidget { final PatientLabOrders patientLabOrder; final String filterName; final PatiantInformtion patient; + FlowChartPage({this.patientLabOrder, this.filterName, this.patient}); @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getPatientLabOrdersResults( - patientLabOrder: patientLabOrder, procedure: filterName,patient: patient), + patientLabOrder: patientLabOrder, + procedure: filterName, + patient: patient), builder: (context, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: filterName, baseViewModel: model, - body: SingleChildScrollView( - child: model.labOrdersResultsList.isNotEmpty - ? Container( + body: model.labOrdersResultsList.isNotEmpty + ? SingleChildScrollView( + child: Container( child: LabResultChartAndDetails( name: filterName, labResult: model.labOrdersResultsList, ), - ) - : Container( - child: Center( - child: Texts('no Data'), - ), ), - ), + ) + : Container( + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).noDataAvailable, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, + ), + ) + ], + ), + ), + ), ), ); } diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index c20a48ae..6c3e7fe4 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -4,20 +4,29 @@ 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/patients/profile/lab_result/FlowChartPage.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - class LabResultWidget extends StatelessWidget { - + final String filterName; final List patientLabResultList; final PatientLabOrders patientLabOrder; final PatiantInformtion patient; - LabResultWidget({Key key, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key); + final bool isInpatient; + + LabResultWidget( + {Key key, + this.filterName, + this.patientLabResultList, + this.patientLabOrder, + this.patient, + this.isInpatient}) + : super(key: key); ProjectViewModel projectViewModel; + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -27,14 +36,41 @@ class LabResultWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + if (!isInpatient) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText(filterName), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FlowChartPage( + filterName: filterName, + patientLabOrder: patientLabOrder, + patient: patient, + ), + ), + ); + }, + child: AppText( + TranslationBase.of(context).showMoreBtn, + textDecoration: TextDecoration.underline, + color: Colors.blue, + ), + ), + ], + ), Row( children: [ Expanded( child: Container( child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, - color: Colors.black,bold: true, + color: Colors.black, + bold: true, ), ), ), @@ -42,68 +78,87 @@ class LabResultWidget extends StatelessWidget { Expanded( child: Container( child: Center( - child: Texts(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), ), ), ), Expanded( child: Container( child: Center( - child: Texts(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).range, + color: Colors.black, + bold: true, + ), ), ), ) ], ), - SizedBox(height: 7,), - Divider(color: Colors.black,thickness: 1,), - SizedBox(height: 12,), - ...List.generate(patientLabResultList.length, (index) => Column( - children: [ - Row( - children: [ - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: Texts( - '${patientLabResultList[index].testCode}\n'+ - patientLabResultList[index].description, - textAlign: TextAlign.center, - ), - ), - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: Texts( - patientLabResultList[index].resultValue+" "+patientLabResultList[index].uOM, - textAlign: TextAlign.center, - ), - ), - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: Texts( - patientLabResultList[index].referanceRange, - textAlign: TextAlign.center, - ), + SizedBox( + height: 7, + ), + Divider( + color: Colors.black, + thickness: 1, + ), + SizedBox( + height: 12, + ), + ...List.generate( + patientLabResultList.length, + (index) => Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + '${patientLabResultList[index].testCode}\n' + + patientLabResultList[index].description, + textAlign: TextAlign.center, + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + patientLabResultList[index].resultValue ??""+ + " " + + "${patientLabResultList[index].uOM ?? ""}", + textAlign: TextAlign.center, + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + patientLabResultList[index].referanceRange, + textAlign: TextAlign.center, + ), + ), + ), + ), + ], ), - ), - ) - ], - ), - Divider(), - ], - )) + Divider(), + ], + )) // Table( // border: TableBorder.symmetric( // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), @@ -114,27 +169,37 @@ class LabResultWidget extends StatelessWidget { ), ); } - List fullData(List labResultList,context) { + + List fullData(List labResultList, context) { List tableRow = []; tableRow.add( TableRow( children: [ Container( child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, - color: Colors.black,bold: true, + color: Colors.black, + bold: true, ), ), ), Container( child: Center( - child: Texts(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), ), ), Container( child: Center( - child: Texts(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).range, + color: Colors.black, + bold: true, + ), ), ), ], @@ -149,7 +214,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( lab.description, textAlign: TextAlign.center, ), @@ -161,8 +226,8 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( - lab.resultValue+" "+lab.uOM, + child: AppText( + lab.resultValue + " " + lab.uOM, textAlign: TextAlign.center, ), ), @@ -173,7 +238,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( lab.referanceRange, textAlign: TextAlign.center, ), @@ -186,7 +251,4 @@ class LabResultWidget extends StatelessWidget { }); return tableRow; } - } - - diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart index 9da22707..112680e8 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart @@ -1,12 +1,11 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.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/Text.dart'; - +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class LabResultDetailsWidget extends StatefulWidget { @@ -25,21 +24,57 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - decoration: BoxDecoration( + /* decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.only( topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), border: Border.all(color: Colors.grey, width: 1), - ), - margin: EdgeInsets.all(20), + ),*/ + margin: EdgeInsets.all(0), child: Container( color: Colors.transparent, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Expanded( + child: Container( + child: Container( + padding: EdgeInsets.all(8), + child: AppText( + TranslationBase.of(context).date, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Container( + child: AppText( + TranslationBase.of(context).labResult, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + // height: 60 + ), + ), + ) + ], + ), + const Divider( + height: 1, + thickness: 1, + color: Colors.black, + ), Table( border: TableBorder.symmetric( - inside: BorderSide(width: 2.0, color: Colors.grey[300]), + inside: BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), @@ -51,64 +86,32 @@ class _VitalSignDetailsWidgetState extends State { List fullData(ProjectViewModel projectViewModel) { List tableRow = []; - tableRow.add(TableRow(children: [ - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0), - ), - ), - child: Center( - child: Texts( - TranslationBase.of(context).date, - color: Colors.white, - ), - ), - height: 60, - ), - ), - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0), - ), - ), - child: Center( - child: Texts(TranslationBase.of(context).labResult, color: Colors.white), - ), - height: 60), - ) - ])); widget.labResult.forEach((vital) { var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime); tableRow.add(TableRow(children: [ Container( child: Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.all(8), color: Colors.white, - child: Center( - child: Texts( - '${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', - textAlign: TextAlign.center, - ), + child: AppText( + '${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), Container( child: Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.all(8), color: Colors.white, - child: Center( - child: Texts( - '${vital.resultValue}', - textAlign: TextAlign.center, - ), + child: AppText( + '${vital.resultValue}', + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart index f5558a61..d0e61c10 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurved.dart @@ -1,4 +1,6 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; @@ -53,18 +55,17 @@ class LineChartCurvedState extends State { const SizedBox( height: 4, ), - Text( + AppText( widget.title, - style: TextStyle( - color: Colors.black, - fontSize: 32, - fontWeight: FontWeight.bold, - letterSpacing: 2), + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', textAlign: TextAlign.center, ), Expanded( child: Padding( - padding: const EdgeInsets.only(right: 16.0, left: 6.0), + padding: const EdgeInsets.only(right: 16.0, left: 8.0), child: LineChart( sampleData1(), swapAnimationDuration: const Duration(milliseconds: 250), @@ -98,9 +99,9 @@ class LineChartCurvedState extends State { showTitles: true, getTextStyles: (value) => const TextStyle( color: Colors.black, - fontSize: 12, + fontSize: 11, ), - margin: 22, + margin: 28, rotateAngle:-65, getTitles: (value) { print(value); @@ -211,9 +212,10 @@ class LineChartCurvedState extends State { final LineChartBarData lineChartBarData1 = LineChartBarData( spots: spots, isCurved: true, - colors: [Theme.of(context).primaryColor], - barWidth: 5, + colors: [Colors.red], + barWidth: 3, isStrokeCapRound: true, + curveSmoothness: 0.12, dotData: FlDotData( show: false, ), diff --git a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart deleted file mode 100644 index 75e4c33b..00000000 --- a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart +++ /dev/null @@ -1,262 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.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/large_avatar.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../config/size_config.dart'; -import '../../../../models/patient/lab_orders/lab_orders_req_model.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../../widgets/shared/app_texts_widget.dart'; -import 'lab_result_secreen.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:LabOrdersScreen - *@desc: LabOrdersScreen class - */ - -class LabOrdersScreen extends StatefulWidget { - @override - _LabOrdersScreenState createState() => _LabOrdersScreenState(); -} - -class _LabOrdersScreenState extends State { - - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getLabResultOrders Function - */ - getLabResultOrders(BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - LabOrdersReqModel labOrdersReqModel = LabOrdersReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType??1, - languageID: 2); - - model.getLabResultOrders(labOrdersReqModel.toJson()); - } - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getLabResultOrders(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .labOrders, - body: model.patientLabResultOrdersList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase - .of(context) - .errorNoLabOrders) - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: - model.patientLabResultOrdersList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - LabResult( - labOrders: model - .patientLabResultOrdersList[index], - ), - ), - ); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: model - .patientLabResultOrdersList[ - index] - .doctorImageURL, - name: model - .patientLabResultOrdersList[ - index] - .doctorName, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - if(model - .patientLabResultOrdersList[index] - .doctorName != null ) - AppText( - '${model - .patientLabResultOrdersList[index] - .doctorName}', - fontSize: 1.7 * - SizeConfig - .textMultiplier, - fontWeight: FontWeight.w600, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .projectName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800]), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).invoiceNo, - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - ], - ),SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).orderNo, - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .orderNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - ], - ) - ], - ), - ), - ) - ], - ), - SizedBox( - height: 3, - ), - Divider( - color: Colors.grey, - ), - SizedBox( - height: 3, - ), - Row( - children: [ - Icon( - EvaIcons.calendar, - color: Colors.grey[700], - ), - SizedBox( - width: 10, - ), - Expanded( - child: AppText( - '${Helpers.getDate(model - .patientLabResultOrdersList[index] - .createdOn)}', - fontSize: 2.0 * - SizeConfig.textMultiplier, - ), - ) - ], - ) - ], - ), - ), - ); - }), - ), - ), - ),); - } -} diff --git a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart index 6c4ebf36..b6699b22 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart @@ -1,10 +1,9 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; - import 'Lab_Result_details_wideget.dart'; import 'LineChartCurved.dart'; @@ -22,19 +21,44 @@ class LabResultChartAndDetails extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( - children: [ - AppExpandableNotifier( - headerWidget: Padding( - padding: const EdgeInsets.all(8.0), + return Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12) + ), child: LineChartCurved(title: name,labResult:labResult,), ), - bodyWidget: LabResultDetailsWidget( - labResult: labResult.reversed.toList(), + Container( + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), + padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12) + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Graph Details", + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + SizedBox(height: 8,), + LabResultDetailsWidget( + labResult: labResult.reversed.toList(), + ), + ], + ), ), - isExpand: true, - ), - ], + ], + ), ); } diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart index ddbbcd45..1c5104f8 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -2,22 +2,25 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_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/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'laboratory_result_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; class LaboratoryResultPage extends StatefulWidget { final PatientLabOrders patientLabOrders; final PatiantInformtion patient; final String patientType; final String arrivalType; - LaboratoryResultPage({Key key, this.patientLabOrders, this.patient, this.patientType, this.arrivalType}); + + LaboratoryResultPage( + {Key key, + this.patientLabOrders, + this.patient, + this.patientType, + this.arrivalType}); @override _LaboratoryResultPageState createState() => _LaboratoryResultPageState(); @@ -32,35 +35,39 @@ class _LaboratoryResultPageState extends State { clinicID: widget.patientLabOrders.clinicID, projectID: widget.patientLabOrders.projectID, orderNo: widget.patientLabOrders.orderNo, - patient: widget.patient), + patient: widget.patient, + isInpatient: widget.patientType == "1"), builder: (_, model, w) => AppScaffold( - isShowAppBar: false, - // appBarTitle: TranslationBase.of(context).labResults, + isShowAppBar: true, + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: widget.patient, + patientType: widget.patientType ?? "0", + arrivalType: widget.arrivalType ?? "0", + orderNo: widget.patientLabOrders.orderNo, + appointmentDate: widget.patientLabOrders.orderDate, + doctorName: widget.patientLabOrders.doctorName, + branch: widget.patientLabOrders.projectName, + clinic: widget.patientLabOrders.clinicDescription, + profileUrl: widget.patientLabOrders.doctorImageURL, + invoiceNO: widget.patientLabOrders.invoiceNo, + ), baseViewModel: model, body: Scaffold( body: SingleChildScrollView( child: Column( children: [ - PatientProfileHeaderWhitAppointment(patient: widget.patient, - patientType: widget.patientType??"0", - arrivalType: widget.arrivalType??"0", - orderNo: widget.patientLabOrders.orderNo, - appointmentDate:widget.patientLabOrders.orderDate, - doctorName: widget.patientLabOrders.doctorName, - profileUrl: widget.patientLabOrders.doctorImageURL, - invoiceNO: widget.patientLabOrders.invoiceNo, - ), - ...List.generate(model.patientLabSpecialResult.length, (index) => LaboratoryResultWidget( - onTap: () async { - - }, - billNo: widget.patientLabOrders.invoiceNo, - details: model.patientLabSpecialResult[index].resultDataHTML, - orderNo: widget.patientLabOrders.orderNo, - patientLabOrder: widget.patientLabOrders, - patient: widget.patient, - )), - + ...List.generate( + model.patientLabSpecialResult.length, + (index) => LaboratoryResultWidget( + onTap: () async {}, + billNo: widget.patientLabOrders.invoiceNo, + details: model + .patientLabSpecialResult[index].resultDataHTML, + orderNo: widget.patientLabOrders.orderNo, + patientLabOrder: widget.patientLabOrders, + patient: widget.patient, + isInpatient: widget.patientType == "1", + )), ], ), ), diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index a2c8411d..d9132b7a 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -5,12 +5,10 @@ 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/screens/patients/profile/lab_result/LabResultWidget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_html/flutter_html.dart'; - import 'package:provider/provider.dart'; class LaboratoryResultWidget extends StatefulWidget { @@ -20,13 +18,17 @@ class LaboratoryResultWidget extends StatefulWidget { final String orderNo; final PatientLabOrders patientLabOrder; final PatiantInformtion patient; + final bool isInpatient; + const LaboratoryResultWidget( {Key key, this.onTap, this.billNo, this.details, this.orderNo, - this.patientLabOrder, this.patient}) + this.patientLabOrder, + this.patient, + this.isInpatient}) : super(key: key); @override @@ -41,7 +43,10 @@ class _LaboratoryResultWidgetState extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getPatientLabResult(patientLabOrder: widget.patientLabOrder,patient: widget.patient), + onModelReady: (model) => model.getPatientLabResult( + patientLabOrder: widget.patientLabOrder, + patient: widget.patient, + isInpatient: widget.isInpatient), builder: (_, model, w) => NetworkBaseView( baseViewModel: model, child: Container( @@ -77,9 +82,15 @@ class _LaboratoryResultWidgetState extends State { )), child: Row( children: [ - Expanded(child: Container( - margin: EdgeInsets.only(left: 10, right: 10), - child: Texts(TranslationBase.of(context).generalResult,bold: true,))), + Expanded( + child: Container( + margin: EdgeInsets.only( + left: 10, right: 10), + child: AppText( + TranslationBase.of(context) + .generalResult, + bold: true, + ))), Container( width: 25, height: 25, @@ -110,10 +121,23 @@ class _LaboratoryResultWidgetState extends State { duration: Duration(milliseconds: 7000), child: Container( width: double.infinity, - child: LabResultWidget( - patientLabOrder: widget.patientLabOrder, - patientLabResultList: model.labResultList, - patient:widget.patient, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + model.labResultLists.length, + (index) => LabResultWidget( + patientLabOrder: widget.patientLabOrder, + filterName: model + .labResultLists[index].filterName, + patientLabResultList: model + .labResultLists[index] + .patientLabResultList, + patient: widget.patient, + isInpatient: widget.isInpatient, + ), + ) + ], ), ), ), @@ -123,7 +147,6 @@ class _LaboratoryResultWidgetState extends State { SizedBox( height: 10, ), - ], ), ], diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index aeca5508..02765c20 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -1,21 +1,16 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; -import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/procedure_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/screens/patients/profile/lab_result/laboratory_result_page.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; +import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; - import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; class LabsHomePage extends StatelessWidget { String patientType; @@ -23,15 +18,20 @@ class LabsHomePage extends StatelessWidget { @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; - patientType = routeArgs['patientType']; - arrivalType = routeArgs['arrivalType']; - print(arrivalType); - return BaseView( - onModelReady: (model) => model.getLabs(patient), - builder: (context, LabsViewModel model, widget) => AppScaffold( + patientType = routeArgs['patientType']; + arrivalType = routeArgs['arrivalType']; + bool isInpatient = routeArgs['isInpatient']; + print(arrivalType); + return BaseView( + onModelReady: (model) => model.getLabs(patient, isInpatient: isInpatient), + builder: (context, ProcedureViewModel model, widget) => AppScaffold( baseViewModel: model, - isShowAppBar: false, + backgroundColor: Colors.grey[100], + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString() ?? '0', patientType), body: SingleChildScrollView( physics: BouncingScrollPhysics(), child: FractionallySizedBox( @@ -39,55 +39,60 @@ class LabsHomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), - SizedBox(height: 12,), + SizedBox( + height: 12, + ), + if(model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts('Lab',style: "caption2",color: Colors.black,fontSize: 13,), - Texts('Result',bold: true,fontSize: 22,), + AppText( + 'Lab', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Result', + bold: true, + fontSize: 22, + ), ], ), ), - if(patientType!=null && patientType=='7') - InkWell( - onTap: (){ - //TODO Hussam call the add page here - }, - child: Container( - width: double.maxFinite, - height: 140, - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Container( - height: 90, - child: Column( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Icon(Icons.add,color: Colors.white,), - ), - ), - SizedBox(height: 10,), - Texts('Apply for New Lab Order',color: Colors.grey[600],fontWeight: FontWeight.w600,) - ], + if ( patient.patientStatusType!=null && patient.patientStatusType == 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Lab', + style: "caption2", + color: Colors.black, + fontSize: 13, ), - ), + AppText( + 'Result', + bold: true, + fontSize: 22, + ), + ], ), ), - ), + if ( patient.patientStatusType!=null && patient.patientStatusType == 43) + AddNewOrder( onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedLabOrder( + patient: patient, + model: model, + )), + ); + },label: 'Apply for New Lab Order',), ...List.generate( model.patientLabOrdersList.length, (index) => Column( @@ -112,12 +117,28 @@ class LabsHomePage extends StatelessWidget { invoiceNO: ' ${labOrder.invoiceNo}', profileUrl: labOrder.doctorImageURL, branch: labOrder.projectName, + clinic: labOrder.clinicDescription, appointmentDate: labOrder.orderDate, orderNo: labOrder.orderNo, ); }).toList(), ), - ) + ), + if(model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 100,), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Lab Result Found'), + ) + + ], + ), + ) ], ), ), diff --git a/lib/screens/patients/profile/note/progress_note_screen.dart b/lib/screens/patients/profile/note/progress_note_screen.dart new file mode 100644 index 00000000..ca434fcf --- /dev/null +++ b/lib/screens/patients/profile/note/progress_note_screen.dart @@ -0,0 +1,516 @@ +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/note/update_note.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/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/shared_pref_kay.dart'; +import '../../../../models/patient/patiant_info_model.dart'; +import '../../../../util/dr_app_shared_pref.dart'; +import '../../../../widgets/shared/app_scaffold_widget.dart'; +import '../../../../widgets/shared/app_texts_widget.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class ProgressNoteScreen extends StatefulWidget { + final int visitType; + + const ProgressNoteScreen({Key key, this.visitType}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + List notesList; + var filteredNotesList; + final _controller = TextEditingController(); + var _isInit = true; + bool isDischargedPatient = false; + AuthViewModel authProvider; + + + getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String token = await sharedPref.getString(TOKEN); + String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); + + print(type); + ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( + visitType: widget.visitType, + // if equal 5 then this will return progress note + admissionNo: int.parse(patient.admissionNo), + projectID: patient.projectId, + tokenID: token, + patientTypeID: patient.patientType, + languageID: 2); + model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) { + notesList = model.patientProgressNoteList; + }); + } + + @override + Widget build(BuildContext context) { + authProvider = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String arrivalType = routeArgs['arrivalType']; + if(routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => getProgressNoteList(context, model), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + // appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString() ?? '0', arrivalType), + body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 + ? DrAppEmbeddedError( + error: TranslationBase.of(context).errorNoProgressNote) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + if(!isDischargedPatient) + AddNewOrder( onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => UpdateNoteOrder( + patientModel: model, + patient: patient, + visitType: widget.visitType, + isUpdate: false, + )), + ); + },label: widget.visitType ==3?'Add a New Order Sheet':'Create a New Progress Note',), + Expanded( + child: Container( + + child: ListView.builder( + itemCount: model.patientProgressNoteList.length, + itemBuilder: (BuildContext ctxt, int index) { + return Column( + children: [ + Container( + margin: EdgeInsets.only( + left: 10, + right: 10, + ), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + ), + padding: EdgeInsets.all(15), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + + if(model.patientProgressNoteList[index].status == 1 && authProvider.doctorProfile.doctorID != model.patientProgressNoteList[index].createdBy) + AppText( + 'In Progress',fontWeight: FontWeight.bold, color: Color(0xFFCC9B14),fontSize: 16,), + if(model.patientProgressNoteList[index].status == 4) + AppText( + 'Canceled',fontWeight: FontWeight.bold, color: Colors.red.shade700,fontSize: 16,), + if(model.patientProgressNoteList[index].status == 2) + AppText( + 'Verified',fontWeight: FontWeight.bold, color: Colors.grey.shade700,fontSize: 16,), + if (model.patientProgressNoteList[index].status != 2 && + model.patientProgressNoteList[index].status != 4 && authProvider.doctorProfile.doctorID == model.patientProgressNoteList[index].createdBy) + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + UpdateNoteOrder( + note: model.patientProgressNoteList[ + index], + patientModel: + model, + patient: patient, + visitType: widget + .visitType, + isUpdate: true, + )), + ); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.green[600], + borderRadius: + BorderRadius.circular( + 10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + DoctorApp.edit_1, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + 'Update', + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ), + InkWell( + onTap: () async { + showMyDialog( + context: context, + actionName: "cancel", + confirmFun: () async { + GifLoaderDialogUtils + .showMyDialog( + context, + ); + UpdateNoteReqModel + reqModel = + UpdateNoteReqModel( + admissionNo: + int.parse(patient + .admissionNo), + cancelledNote: true, + lineItemNo: + model.patientProgressNoteList[index] + .lineItemNo, + createdBy: + model.patientProgressNoteList[index] + .createdBy, + notes: + model.patientProgressNoteList[index] + .notes, + verifiedNote: false, + patientTypeID: patient + .patientType, + patientOutSA: false, + ); + await model + .updatePatientProgressNote( + reqModel); + await getProgressNoteList( + context, model, isLocalBusy: true); + GifLoaderDialogUtils + .hideDialog( + context); + }); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.red[600], + borderRadius: + BorderRadius.circular( + 10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + FontAwesomeIcons.trash, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + 'Cancel', + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ), + InkWell( + onTap: () async { + showMyDialog(context: context, actionName: "verify",confirmFun: () async{ + GifLoaderDialogUtils + .showMyDialog(context); + UpdateNoteReqModel reqModel = + UpdateNoteReqModel( + admissionNo: int.parse( + patient.admissionNo), + cancelledNote: false, + lineItemNo: model.patientProgressNoteList[index] + .lineItemNo, + createdBy: model.patientProgressNoteList[index] + .createdBy, + notes: + model.patientProgressNoteList[index].notes, + verifiedNote: true, + patientTypeID: + patient.patientType, + patientOutSA: false, + ); + await model + .updatePatientProgressNote( + reqModel); + await getProgressNoteList( + context, model, isLocalBusy: true); + GifLoaderDialogUtils + .hideDialog(context); + }); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: + BorderRadius.circular( + 10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + FontAwesomeIcons.check, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + 'Verify', + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.65, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + 'Created By: ', + fontSize: 10, + ), + Expanded( + child: AppText( + model.patientProgressNoteList[index].doctorName??'',fontWeight: FontWeight.w600,fontSize: 12,), + ), + ], + ), + + ], + ), + ), + Column( + children: [ + AppText( + model.patientProgressNoteList[index] + .createdOn != + null + ? DateUtils + .getDayMonthYearDateFormatted( + DateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn)) + : DateUtils + .getDayMonthYearDateFormatted( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + model.patientProgressNoteList[index] + .createdOn != + null + ? DateUtils + .getHour( + DateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn )) + : DateUtils + .getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Expanded( + child: AppText( + model.patientProgressNoteList[index].notes, + fontSize: 10, + ), + ), + ]) + ], + ), + ), + SizedBox( + height: 20, + + ), + ], + ); + }), + ), + ), + ], + ), + ), + ), + ); + } + + showMyDialog({BuildContext context, Function confirmFun, String actionName}) { + showDialog( + context: context, + child: Center( + child: Container( + width: MediaQuery + .of(context) + .size + .width * 0.8, + height: 200, + child: AppScaffold( + isShowAppBar: false, + body: Container( + color: Colors.white, + + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // SizedBox(height: 20,), + SizedBox(height: 10,), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + "Confirm", fontWeight: FontWeight.w600, + color: Colors.black, + fontSize: 16,), + ], + ), + SizedBox(height: 10,), + DividerWithSpacesAround(), + SizedBox(height: 12,), + + Container( + padding: EdgeInsets.all(20), + color: Colors.white, + child: AppText( + 'Are you sure you want $actionName this order?', + fontSize: 15, + textAlign: TextAlign.center, + ), + ), + + SizedBox(height: 8,), + DividerWithSpacesAround(), + FractionallySizedBox( + widthFactor: 0.75, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + FlatButton( + child: AppText( + "Cancel", fontWeight: FontWeight.w600, + color: Colors.black, + fontSize: 16,),//Text("Cancel"), + onPressed: () { + Navigator.of(context).pop(); + }), + FlatButton( + child: AppText( + "Confirm", fontWeight: FontWeight.w600, + color: Colors.red.shade700, + fontSize: 16,), //Text("Confirm", ), + onPressed: () async { + await confirmFun(); + Navigator.of(context).pop(); + }) + + ], + ), + ) + ], + ), + ), + ), + ), + ), + )); + } + + + + +} diff --git a/lib/screens/patients/profile/note/update_note.dart b/lib/screens/patients/profile/note/update_note.dart new file mode 100644 index 00000000..e555e613 --- /dev/null +++ b/lib/screens/patients/profile/note/update_note.dart @@ -0,0 +1,275 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; +import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.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/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +class UpdateNoteOrder extends StatefulWidget { + final NoteModel note; + final PatientViewModel patientModel; + final PatiantInformtion patient; + final int visitType; + final bool isUpdate; + + const UpdateNoteOrder( + {Key key, + this.note, + this.patientModel, + this.patient, + this.visitType, + this.isUpdate}) + : super(key: key); + + @override + _UpdateNoteOrderState createState() => _UpdateNoteOrderState(); +} + +class _UpdateNoteOrderState extends State { + int selectedType; + bool isSubmitted = false; + stt.SpeechToText speech = stt.SpeechToText(); + var reconizedWord; + var event = RobotProvider(); + TextEditingController progressNoteController = TextEditingController(); + + setSelectedType(int val) { + setState(() { + selectedType = val; + }); + } + + @override + void initState() { + requestPermissions(); + event.controller.stream.listen((p) { + if (p['startPopUp'] == 'true') { + if (this.mounted) { + onVoiceText(); + } + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (widget.note != null) { + progressNoteController.text = widget.note.notes; + } + + return AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: widget.visitType == 3 + ? (widget.isUpdate ? 'Update' : 'Add') + ' Order Sheet' + : (widget.isUpdate ? 'Update' : 'Add') + ' Progress Note', + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Stack( + children: [ + AppTextFieldCustom( + hintText: widget.visitType == 3 + ? (widget.isUpdate ? 'Update' : 'Add') + + ' Order Sheet' + : (widget.isUpdate ? 'Update' : 'Add') + + ' Progress Note', + //TranslationBase.of(context).addProgressNote, + controller: progressNoteController, + maxLines: 35, + minLines: 25, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: + progressNoteController.text.isEmpty && isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + + Positioned( + top: 0,//MediaQuery.of(context).size.height * 0, + right: 15, + child: IconButton( + icon: Icon( + DoctorApp.speechtotext, + color: Colors.black, + ), + onPressed: () { + onVoiceText(); + }, + ), + ) + ], + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: widget.visitType == 3 + ? (widget.isUpdate ? 'Update' : 'Add') + ' Order Sheet' + : (widget.isUpdate ? 'Update' : 'Add') + ' Progress Note', + color: Color(0xff359846), + // disabled: progressNoteController.text.isEmpty, + fontWeight: FontWeight.w700, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (progressNoteController.text.trim().isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = + DoctorProfileModel.fromJson(profile); + + if (widget.isUpdate) { + UpdateNoteReqModel reqModel = UpdateNoteReqModel( + admissionNo: int.parse(widget.patient.admissionNo), + cancelledNote: false, + lineItemNo: widget.note.lineItemNo, + createdBy: widget.note.createdBy, + notes: progressNoteController.text, + verifiedNote: false, + patientTypeID: widget.patient.patientType, + patientOutSA: false, + ); + await widget.patientModel + .updatePatientProgressNote(reqModel); + } else { + CreateNoteModel reqModel = CreateNoteModel( + admissionNo: int.parse(widget.patient.admissionNo), + createdBy: doctorProfile.doctorID, + visitType: widget.visitType, + patientID: widget.patient.patientId, + nursingRemarks: ' ', + patientTypeID: widget.patient.patientType, + patientOutSA: false, + notes: progressNoteController.text); + + await widget.patientModel + .createPatientProgressNote(reqModel); + } + + if (widget.patientModel.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.patientModel.error); + } else { + ProgressNoteRequest progressNoteRequest = + ProgressNoteRequest( + visitType: widget.visitType, + // if equal 5 then this will return progress note + admissionNo: + int.parse(widget.patient.admissionNo), + projectID: widget.patient.projectId, + patientTypeID: widget.patient.patientType, + languageID: 2); + await widget.patientModel + .getPatientProgressNote(progressNoteRequest.toJson()); + } + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast( + "Your Order added Successfully"); + Navigator.of(context).pop(); + } else { + Helpers.showErrorToast("You cant add only spaces"); + } + }), + ], + ), + ), + ); + } + + onVoiceText() async { + new SpeechToText(context: context).showAlertDialog(context); + var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); + if (available) { + speech.listen( + onResult: resultListener, + // listenMode: ListenMode.confirmation, + localeId: lang == 'en' ? 'en-US' : 'ar-SA', + ); + } else { + print("The user has denied the use of speech recognition."); + } + } + + void errorListener(SpeechRecognitionError error) { + event.setValue({"searchText": 'null'}); + //SpeechToText.closeAlertDialog(context); + print(error); + } + + void statusListener(String status) { + reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + } + + void requestPermissions() async { + Map statuses = await [ + Permission.microphone, + ].request(); + } + + void resultListener(result) { + reconizedWord = result.recognizedWords; + event.setValue({"searchText": reconizedWord}); + + if (result.finalResult == true) { + setState(() { + SpeechToText.closeAlertDialog(context); + progressNoteController.text = reconizedWord; + }); + } else { + print(result.finalResult); + } + } +} diff --git a/lib/screens/patients/profile/patient_orders_screen.dart b/lib/screens/patients/profile/patient_orders_screen.dart deleted file mode 100644 index a7182546..00000000 --- a/lib/screens/patients/profile/patient_orders_screen.dart +++ /dev/null @@ -1,219 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/shared_pref_kay.dart'; -import '../../../config/size_config.dart'; -import '../../../models/patient/patiant_info_model.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - -class PatientsOrdersScreen extends StatefulWidget { - @override - _PatientsOrdersState createState() => _PatientsOrdersState(); -} - -class _PatientsOrdersState extends State { - var notesList; - var filteredNotesList; - final _controller = TextEditingController(); - var _isInit = true; - - /* - *@author: ibrahim al bitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - getProgressNoteList(BuildContext context, PatientViewModel model ) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - print(type); - ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( - visitType: 3, // if equal 3 then this will return orders - admissionNo: int.parse(patient.admissionNo), - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2); - model.getPatientProgressNote(progressNoteRequest.toJson()).then((c){ - notesList = model.patientProgressNoteList; - }); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getProgressNoteList(context, model), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).orders, - body: notesList == null || notesList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoOrders) - : Column( - children: [ - Container( - margin: EdgeInsets.all(10), - width: SizeConfig.screenWidth * 0.80, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str, model); - }, - textInputAction: TextInputAction.done, - decoration: buildInputDecoration(context, - TranslationBase.of(context).searchOrders), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: ListView.builder( - itemCount: notesList.length, - itemBuilder: (BuildContext ctxt, int index) { - return RoundedContainer( - backgroundColor: Colors.white, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Container( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - notesList[index] - ["DoctorName"], - marginTop: 10, - marginLeft: 10, - marginBottom: 5, - fontWeight: FontWeight.bold, - ), - AppText( - notesList[index] - ["AdmissionNo"], - marginLeft: 10, - color: Colors.grey[600], - ), - AppText( - convertDateFormat( - notesList[index] - ["AssessmentDate"]), - marginLeft: 10, - color: Colors.grey[600], - ), - ], - ), - ), - children: [ - Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - notesList[index]["Notes"], - margin: 5, - ), - ], - ) - ], - ), - ], - )); - }), - ), - ), - ], - ), - ),); - } - - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - prefixIcon: Icon(Icons.search, color: Colors.black), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(50.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - searchData(String str, PatientViewModel model) { - var strExist = str.length > 0 ? true : false; - - if (strExist) { - filteredNotesList = null; - filteredNotesList = notesList - .where((note) => - note["DoctorName"].toString().contains(str.toUpperCase())) - .toList(); - setState(() { - notesList = filteredNotesList; - }); - } else { - setState(() { - notesList = model.patientProgressNoteList; - }); - } - } - - convertDateFormat(String str) { - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } -} diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 70c9f5b9..749c0885 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -1,16 +1,17 @@ -import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.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/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_in_patient.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -21,6 +22,8 @@ import '../../../routes.dart'; class PatientProfileScreen extends StatelessWidget { PatiantInformtion patient; bool isFromSearch = false; + bool isInpatient = false; + bool isDischargedPatient = false; @override Widget build(BuildContext context) { @@ -35,23 +38,16 @@ class PatientProfileScreen extends StatelessWidget { if (routeArgs.containsKey("isSearch")) { isFromSearch = routeArgs['isSearch']; } + if (routeArgs.containsKey("isInpatient")) { + isInpatient = routeArgs['isInpatient']; + } + if (routeArgs.containsKey("isDischargedPatient")) { + isDischargedPatient = routeArgs['isDischargedPatient']; + } - return BaseView( - onModelReady: (model) async { - GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( - patientMRN: patient.patientMRN ?? patient.patientId, - doctorID: '', - editedBy: ''); - await model.getPatientAllergy(generalGetReqForSOAP); - if (model.allergiesList.length == 0) { - await model.getMasterLookup(MasterKeysService.Allergies); - } - if (model.allergySeverityList.length == 0) { - await model.getMasterLookup(MasterKeysService.AllergySeverity); - } - }, - builder: (_, model, w) => AppScaffold( - baseViewModel: model, + return BaseView( + builder: (_, patientViewModel, w) => AppScaffold( + baseViewModel: patientViewModel, appBarTitle: TranslationBase.of(context).patientProfile, isShowAppBar: false, body: Container( @@ -62,29 +58,44 @@ class PatientProfileScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), + !isFromSearch && isInpatient/*patientType == "1"*/ + ? PatientProfileHeaderNewDesignInPatient( + patient, patientType, arrivalType) + : PatientProfileHeaderNewDesign( + patient, patientType, arrivalType), Expanded( child: Padding( padding: const EdgeInsets.all(16.0), child: SingleChildScrollView( child: Column( children: [ - isFromSearch - ? ProfileMedicalInfoWidgetSearch( + isInpatient + ? ProfileMedicalInfoWidgetInPatient( patient: patient, patientType: patientType, arrivalType: arrivalType, from: from, to: to, + isInpatient:isInpatient, + isDischargedPatient: isDischargedPatient, ) - : ProfileMedicalInfoWidget( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - ), + : isFromSearch + ? ProfileMedicalInfoWidgetSearch( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + isInpatient:false + ) + : ProfileMedicalInfoWidget( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + isInpatient:isInpatient + ), ], ), ), @@ -93,76 +104,90 @@ class PatientProfileScreen extends StatelessWidget { ], ), ), - if (int.parse(patientType) == 7 || - int.parse(patientType) == 6) - Positioned( - top: 175, - left: 20, - right: 20, - child: Row( - children: [ - Expanded(child: Container()), - if (patient.episodeNo == 0) - BorderedButton( - "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", - backgroundColor: patient.patientStatusType == 43 - ? Colors.red.shade700 - : Colors.grey.shade700, - textColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', - icon: Image.asset( - "assets/images/create-episod.png", - color: Colors.white, - height: 30, - ), - handler: () async { - if (patient.patientStatusType == 43) { - PostEpisodeReqModel postEpisodeReqModel = - PostEpisodeReqModel( - appointmentNo: - patient.appointmentNo, - patientMRN: patient.patientMRN); - GifLoaderDialogUtils.showMyDialog(context); - await model - .postEpisode(postEpisodeReqModel); - GifLoaderDialogUtils.hideDialog(context); - patient.episodeNo = model.episodeID; - Navigator.of(context).pushNamed( - CREATE_EPISODE, - arguments: {'patient': patient}); - } - }, - ), - if (patient.episodeNo != 0) - BorderedButton( - "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - backgroundColor: Colors.red.shade700, - textColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', - icon: Image.asset( - "assets/images/modilfy-episode.png", - color: Colors.white, - height: 30, + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => Positioned( + top: 175, + left: 20, + right: 20, + child: Row( + children: [ + Expanded(child: Container()), + if (patient.episodeNo == 0) + AppButton( + title: + "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", + color: patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + fontColor: Colors.white, + vPadding: 8, + radius: 30, + hPadding: 20, + fontWeight: FontWeight.normal, + fontSize: 1.6, + icon: Image.asset( + "assets/images/create-episod.png", + color: Colors.white, + height: 30, + ), + onPressed: () async { + if (patient.patientStatusType == 43) { + PostEpisodeReqModel + postEpisodeReqModel = + PostEpisodeReqModel( + appointmentNo: + patient.appointmentNo, + patientMRN: + patient.patientMRN); + GifLoaderDialogUtils.showMyDialog( + context); + await model.postEpisode( + postEpisodeReqModel); + GifLoaderDialogUtils.hideDialog( + context); + patient.episodeNo = model.episodeID; + Navigator.of(context).pushNamed( + CREATE_EPISODE, + arguments: { + 'patient': patient + }); + } + }, + ), + if (patient.episodeNo != 0) + AppButton( + title: + "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", + color: patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + fontColor: Colors.white, + vPadding: 8, + radius: 30, + hPadding: 20, + fontWeight: FontWeight.normal, + fontSize: 1.6, + icon: Image.asset( + "assets/images/modilfy-episode.png", + color: Colors.white, + height: 30, + ), + onPressed: () { + if (patient.patientStatusType == + 43) { + Navigator.of(context).pushNamed( + UPDATE_EPISODE, + arguments: { + 'patient': patient + }); + } + }), + ], ), - handler: () { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: {'patient': patient}); - }, - ), - ], - ), - ), + )), ], ), ), @@ -192,500 +217,3 @@ class AvatarWidget extends StatelessWidget { ); } } - -/* Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration(boxShadow: [ - BoxShadow( - color: Colors.grey.shade300, - blurRadius: 10.0, - spreadRadius: 0, - offset: Offset(0, 10)), - ], color: Colors.white), - child: Column(children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - AvatarWidget( - Icon( - patient.genderDescription == "Male" - ? DoctorApp.male - : DoctorApp.female_icon, - size: 70, - color: Colors.white, - ), - ), - SizedBox( - width: 20, - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - patient.firstName + - ' ' + - patient.lastName, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .fileNo, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - SizedBox( - width: 4, - ), - AppText( - patient.patientId.toString(), - color: Colors.black, - fontWeight: FontWeight.normal, - ), - ], - ), - model.patientAllergiesList - .isNotEmpty && - model.getAllergicNames( - projectViewModel - .isArabic) != - '' - ? Container( - width: MediaQuery.of(context) - .size - .width * - 0.65, - child: Padding( - padding: const EdgeInsets - .symmetric(vertical: 8), - child: AppText( - TranslationBase.of( - context) - .allergicTO + - " : " + - model.getAllergicNames( - projectViewModel - .isArabic), - color: Color(0xFFB9382C), - fontWeight: - FontWeight.bold, - ), - ), - ) - : AppText(''), - ], - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - Container( - height: 11 * SizeConfig.textMultiplier, - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).age, - fontWeight: FontWeight.bold, - fontSize: 2 * - SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", - fontWeight: FontWeight.normal, - fontSize: 1.6 * - SizeConfig.textMultiplier, - ), - ], - ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .nationality, - fontWeight: FontWeight.bold, - fontSize: 2 * - SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - patient.nationalityName ?? - patient.nationality, - fontWeight: FontWeight.normal, - fontSize: 1.7 * - SizeConfig.textMultiplier, - ), - ], - ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .gender, - fontWeight: FontWeight.bold, - fontSize: 2 * - SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - patient.gender.toString() == '1' - ? 'Male' - : 'Female', - fontWeight: FontWeight.normal, - fontSize: 1.8 * - SizeConfig.textMultiplier, - ), - ], - ), - ), - ), - ], - ), - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - ]), - ), - if (patient.admissionNo != null) - Container( - margin: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .admissionDetail, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 1.8 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - Container( - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: - Border.fromBorderSide(BorderSide( - color: Color(0xffBBBBBB), - width: 1, - )), - ), - child: Column( - children: [ - Padding( - padding: EdgeInsets.all(16), - child: Column( - children: [ - Row( - children: [ - Container( - width: 14 * - SizeConfig - .textMultiplier, - child: AppText( - TranslationBase.of( - context) - .dateTime, - color: Colors.black, - fontWeight: - FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ), - Expanded( - child: AppText( - patient.createdOn != - null - ? "${DateUtils.convertDateFromServerFormat(patient.createdOn, 'EEEE dd, MMMM yyyy hh:mm a')}" - : "", - color: Colors.black, - fontWeight: - FontWeight.normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ), - ], - ), - SizedBox( - height: 4, - ), - Row( - children: [ - Container( - width: 14 * - SizeConfig - .textMultiplier, - child: AppText( - TranslationBase.of( - context) - .admissionNo, - color: Colors.black, - fontWeight: - FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ), - AppText( - patient.admissionNo != - null - ? patient.admissionNo - : '', - color: Colors.black, - fontWeight: - FontWeight.normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ], - ), - SizedBox( - height: 4, - ), - Row( - children: [ - Container( - width: 14 * - SizeConfig - .textMultiplier, - child: AppText( - TranslationBase.of( - context) - .losNo, - color: Colors.black, - fontWeight: - FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ), - AppText( - patient.createdOn != null - ? DateUtils - .differenceBetweenServerDateAndCurrent( - patient - .createdOn, - context) - : "", - color: Colors.black, - fontWeight: - FontWeight.normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ], - ), - ], - ), - ), - const Divider( - color: Color(0xffCCCCCC), - height: 5, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Container( - height: - 10 * SizeConfig.textMultiplier, - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets - .fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .area, - fontWeight: - FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - patient - .clinicDescription, - fontWeight: - FontWeight.normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ], - ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets - .fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - mainAxisAlignment: - MainAxisAlignment - .spaceEvenly, - children: [ - Expanded( - child: Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .room, - fontWeight: - FontWeight - .bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - SizedBox( - width: 4, - ), - Expanded( - child: AppText( - "${patient.nursingStationName}\n${patient.roomId}", - fontWeight: - FontWeight - .normal, - fontSize: 1.4 * - SizeConfig - .textMultiplier, - ), - ), - ], - ), - ), - SizedBox( - height: 4, - ), - Expanded( - child: Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .bed, - fontWeight: - FontWeight - .bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - SizedBox( - width: 4, - ), - AppText( - "${patient.bedId}", - fontWeight: - FontWeight - .normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - ], - ), - ), - ], - ), - ), - ), - ], - ), - ) - ], - ), - ) - ], - ), - ), - ], - ),*/ diff --git a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart index 5ca818bf..a7aab586 100644 --- a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart +++ b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart @@ -1,13 +1,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; -import 'package:doctor_app_flutter/util/helpers.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_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class InpatientPrescriptionDetailsScreen extends StatefulWidget { @override @@ -97,11 +96,11 @@ class _InpatientPrescriptionDetailsScreenState key: 'UOM'), buildTableRow( des: - '${Helpers.getDate(prescription.startDatetime)}', + '${DateUtils.getDate(prescription.startDatetime)}', key: 'Start Date'), buildTableRow( des: - '${Helpers.getDate(prescription.stopDatetime)}', + '${DateUtils.getDate(prescription.stopDatetime)}', key: 'Stop Date'), buildTableRow( des: '${prescription.noOfDoses}', @@ -116,7 +115,7 @@ class _InpatientPrescriptionDetailsScreenState key: 'Pharmacy Remarks'), buildTableRow( des: - '${Helpers.getDate(prescription.prescriptionDatetime)}', + '${DateUtils.getDate(prescription.prescriptionDatetime)}', key: 'Prescription Date'), buildTableRow( des: '${prescription.refillID}', diff --git a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart deleted file mode 100644 index 496e5478..00000000 --- a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/reauest_prescription_report_for_in_patient.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/prescription_in_patinets_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/prescription_out_patinets_widget.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../models/patient/prescription/prescription_req_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:PrescriptionScreen - *@desc: PrescriptionScreen class - */ - -class PrescriptionScreen extends StatefulWidget { - @override - _PrescriptionScreenState createState() => _PrescriptionScreenState(); -} - -class _PrescriptionScreenState extends State { - String type = '2'; - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getPrescriptionsList Function - */ - getPrescriptionsList(BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - if (type == '1') { - RequestPrescriptionReportForInPatient prescriptionReqModel = - RequestPrescriptionReportForInPatient( - patientID: patient.patientId, - patientTypeID: patient.patientType, - admissionNo: int.parse(patient.admissionNo)); - model.getInPatientPrescriptions(prescriptionReqModel.toJson()); - } else { - PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2, - setupID: 0); - model.getOutPatientPrescriptions(prescriptionReqModel.toJson()); - } - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getPrescriptionsList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .prescription, - body: type == '1' - ? PrescriptionInPatientWidget( - prescriptionReportForInPatientList: - model.prescriptionReportForInPatientList, - ) - : PrescriptionOutPatientWidget( - patientPrescriptionsList: - model.patientPrescriptionsList, - ), - ),); - } -} diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart deleted file mode 100644 index 56a5cd5e..00000000 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ /dev/null @@ -1,217 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/shared_pref_kay.dart'; -import '../../../config/size_config.dart'; -import '../../../models/patient/patiant_info_model.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:15/5/2020 - *@param: ' - *@return: - *@desc: - */ - -class ProgressNoteScreen extends StatefulWidget { - @override - _ProgressNoteState createState() => _ProgressNoteState(); -} - -class _ProgressNoteState extends State { - var notesList; - var filteredNotesList; - final _controller = TextEditingController(); - var _isInit = true; - - /* - *@author: ibrahim al bitar - *@Date:16/5/2020 - *@param: - *@return: - *@desc: - */ - getProgressNoteList(BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - print(type); - ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( - visitType: 5, - // if equal 5 then this will return progress note - admissionNo: int.parse(patient.admissionNo), - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2); - model.getPatientProgressNote(progressNoteRequest.toJson()).then((c) { - notesList = model.patientProgressNoteList; - }); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getProgressNoteList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .progressNote, - body: notesList == null || notesList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase - .of(context) - .errorNoProgressNote) - : Column( - children: [ - Container( - margin: EdgeInsets.all(10), - width: SizeConfig.screenWidth * 0.80, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str, model); - }, - textInputAction: TextInputAction.done, - decoration: buildInputDecoration(context, - TranslationBase.of(context).searchNote), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: ListView.builder( - itemCount: notesList.length, - itemBuilder: (BuildContext ctxt, int index) { - return RoundedContainer( - backgroundColor: Colors.white, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Container( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - notesList[index] - ["DoctorName"], - marginTop: 10, - marginLeft: 10, - marginBottom: 5, - fontWeight: FontWeight.bold, - ), - AppText( - convertDateFormat( - notesList[index] - ["AssessmentDate"]), - marginLeft: 10, - color: Colors.grey[600], - ), - ], - ), - ), - children: [ - Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row(mainAxisAlignment: MainAxisAlignment.start, - children: [ - AppText( - notesList[index]["Notes"], - margin: 5, - ), - ], - ) - ], - ), - ], - )); - }), - ), - ), - ], - ), - ),); - } - - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - prefixIcon: Icon(Icons.search, color: Colors.black), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - searchData(String str, PatientViewModel model) { - var strExist = str.length > 0 ? true : false; - - if (strExist) { - filteredNotesList = null; - filteredNotesList = model.patientProgressNoteList - .where((note) => - note["DoctorName"].toString().contains(str.toUpperCase())) - .toList(); - setState(() { - notesList = filteredNotesList; - }); - } else { - setState(() { - notesList = model.patientProgressNoteList; - }); - } - } - - convertDateFormat(String str) { - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } -} diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 8d27e704..4f3b5be2 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -1,14 +1,12 @@ -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/radiology_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/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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/buttons/secondary_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -18,7 +16,13 @@ class RadiologyDetailsPage extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; - RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType}); + + RadiologyDetailsPage( + {Key key, + this.finalRadiology, + this.patient, + this.patientType, + this.arrivalType}); @override Widget build(BuildContext context) { @@ -29,61 +33,78 @@ class RadiologyDetailsPage extends StatelessWidget { lineItem: finalRadiology.invoiceLineItemNo, invoiceNo: finalRadiology.invoiceNo), builder: (_, model, widget) => AppScaffold( - - isShowAppBar: false, - baseViewModel: model, - body: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - PatientProfileHeaderWhitAppointment(patient: patient, - patientType: patientType??"0", - arrivalType: arrivalType??"0", - orderNo: finalRadiology.orderNo.toString(), - appointmentDate:finalRadiology.orderDate, - doctorName: finalRadiology.doctorName, - profileUrl: finalRadiology.doctorImageURL, - invoiceNO: finalRadiology.invoiceNo.toString(), - ), - SizedBox( - height: MediaQuery.of(context).size.height * 0.2, + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patientType ?? "0", + arrivalType: arrivalType ?? "0", + appointmentDate: finalRadiology.orderDate, + doctorName: finalRadiology.doctorName, + clinic: finalRadiology.clinicDescription, + branch: finalRadiology.projectName, + profileUrl: finalRadiology.doctorImageURL, + invoiceNO: finalRadiology.invoiceNo.toString(), + ), + isShowAppBar: true, + baseViewModel: model, + body: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: double.maxFinite, + margin: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), ), - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5,), - Texts(TranslationBase.of(context).generalResult), - SizedBox(height: 5,), - Texts( - '${finalRadiology.reportData}', + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 5, + ), + AppText(TranslationBase.of(context).generalResult), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + '${finalRadiology.reportData.trim()}', textAlign: TextAlign.start, fontSize: 17, color: Colors.grey, ), - SizedBox(height: 25,), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( - color: Colors.red, - onTap: () { - launch(model.radImageURL); - }, - title: TranslationBase.of(context).openRad, - ), - ), - ], - ), + ), + SizedBox( + height: 100, + ), + ], ), - ], - ), - ), + ), + ], ), + ), + bottomSheet: model.radImageURL.isNotEmpty + ? Container( + height: 80, + width: double.maxFinite, + child: Container( + margin: + EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12), + child: SecondaryButton( + color: Colors.red[600], + disabled: finalRadiology.dIAPACSURL == "", + onTap: () { + launch(model.radImageURL); + }, + label: TranslationBase.of(context).openRad, + ), + ), + ) + : null, + ), ); } } diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 6db06be5..90d22369 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -1,15 +1,13 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/radiology_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/screens/patients/profile/radiology/radiology_details_page.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/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; +import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -24,98 +22,123 @@ class RadiologyHomePage extends StatelessWidget { PatiantInformtion patient = routeArgs['patient']; String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; - return BaseView( - onModelReady: (model) => model.getPatientRadOrders(patient), + bool isInpatient = routeArgs['isInpatient']; + + return BaseView( + onModelReady: (model) => + model.getPatientRadOrders(patient, patientType: patientType, isInPatient: isInpatient), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - appBarTitle: TranslationBase.of(context).radiology, + backgroundColor: Colors.grey[100], + // appBarTitle: TranslationBase.of(context).radiology, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString() ?? '0', arrivalType), baseViewModel: model, body: FractionallySizedBox( widthFactor: 1.0, child: ListView( physics: BouncingScrollPhysics(), children: [ - PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), - SizedBox(height: 12,), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts('Radiology',style: "caption2",color: Colors.black,fontSize: 13,), - Texts('Result',bold: true,fontSize: 22,), - ], - ), + SizedBox( + height: 12, ), - if(patientType!=null && patientType=='7') - InkWell( - onTap: (){ - //TODO Hussam call the add page here - }, - child: Container( - width: double.maxFinite, - height: 140, - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Container( - height: 90, - child: Column( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Icon(Icons.add,color: Colors.white,), - ), - ), - SizedBox(height: 10,), - Texts('Apply for Radiology Order',color: Colors.grey[600],fontWeight: FontWeight.w600,) - ], - ), + if (model.radiologyList.isNotEmpty && + patient.patientStatusType != 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Radiology', + style: "caption2", + color: Colors.black, + fontSize: 13, ), - ), + AppText( + 'Result', + bold: true, + fontSize: 22, + ), + ], ), ), - ...List.generate( - model.finalRadiologyList.length, - (index) => AppExpandableNotifier( - title: model.finalRadiologyList[index].filterName, - bodyWidget: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: model - .finalRadiologyList[index].finalRadiologyList - .map((radiology) { - return InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: RadiologyDetailsPage( - finalRadiology: radiology, + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Radiology', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Result', + bold: true, + fontSize: 22, + ), + ], + ), + ), + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + AddNewOrder( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedRadiologyOrder( patient: patient, - ), + model: model, + )), + ); + }, + label: 'Apply for Radiology Order', + ), + ...List.generate( + model.radiologyList.length, + (index) => InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: RadiologyDetailsPage( + finalRadiology: model.radiologyList[index], + patient: patient, ), ), - child: DoctorCard( - doctorName: radiology.doctorName, - profileUrl: radiology.doctorImageURL, - invoiceNO: '${radiology.invoiceNo}', - branch: '${radiology.projectName}', - appointmentDate: radiology.orderDate, - orderNo: radiology.orderNo.toString(), - ), - ); - }).toList(), - )), - ) + ), + child: DoctorCard( + doctorName: model.radiologyList[index].doctorName, + profileUrl: model.radiologyList[index].doctorImageURL, + invoiceNO: '${model.radiologyList[index].invoiceNo}', + branch: '${model.radiologyList[index].projectName}', + clinic: model.radiologyList[index].clinicDescription, + appointmentDate: + !isInpatient?model.radiologyList[index].orderDate : + model.radiologyList[index].reportDate, + ), + )), + if (model.radiologyList.isEmpty && + patient.patientStatusType != 43) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Radiology Found'), + ) + ], + ), + ) ], ), ), diff --git a/lib/screens/patients/profile/radiology/radiology_report_screen.dart b/lib/screens/patients/profile/radiology/radiology_report_screen.dart index 75be23e8..e7714074 100644 --- a/lib/screens/patients/profile/radiology/radiology_report_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_report_screen.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart deleted file mode 100644 index 0bce886a..00000000 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ /dev/null @@ -1,192 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/radiology/radiology_req_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_report_screen.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../config/size_config.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:RadiologyScreen - *@desc: RadiologyScreen class - */ - -class RadiologyScreen extends StatefulWidget { - @override - _RadiologyScreenState createState() => _RadiologyScreenState(); -} - -class _RadiologyScreenState extends State { - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getRadiologyList Function - */ - getRadiologyList(context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - int inOutpatientType = 1; - if (type == '0') { - inOutpatientType = 2; - } - print(type); - RadiologyReqModel radiologyReqModel = RadiologyReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2, - ); - model.getPatientRadiology(radiologyReqModel.toJson()); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getRadiologyList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .radiology, - body: - model.patientRadiologyList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase - .of(context) - .youDoNotHaveAnyItem) - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: model.patientRadiologyList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - RadiologyReportScreen( - reportData: model - .patientRadiologyList[index] - .reportData, - url: model - .patientRadiologyList[index].imageURL, - )), - ); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: model - .patientRadiologyList[index] - .doctorImageURL, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - '${model.patientRadiologyList[index].doctorName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold), - SizedBox( - height: 8, - ), - AppText( - 'Invoice No:${model.patientRadiologyList[index].invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${model.patientRadiologyList[index].clinicName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Theme.of(context) - .primaryColor, - ), - SizedBox( - height: 8, - ), - ], - ), - ), - ) - ], - ), - ], - ), - ), - ); - }), - ), - ), - ),); - } -} diff --git a/lib/screens/patients/profile/refer_patient_screen.dart b/lib/screens/patients/profile/refer_patient_screen.dart deleted file mode 100644 index 9b56003b..00000000 --- a/lib/screens/patients/profile/refer_patient_screen.dart +++ /dev/null @@ -1,408 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_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/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; -import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:intl/intl.dart'; - -import '../../../config/size_config.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../util/extenstions.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:4/6/2020 - *@param: - *@return: - *@desc: - */ - -class ReferPatientScreen extends StatefulWidget { - @override - _ReferPatientState createState() => _ReferPatientState(); -} - -class _ReferPatientState extends State { - dynamic _selectedClinic; - dynamic _selectedDoctor; - final _extController = TextEditingController(); - int _activePriority = 1; - dynamic _selectedFrequency; - final _remarksController = TextEditingController(); - bool isValid; - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - - return BaseView( - onModelReady: (model) => model.getClinicsList(), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).referralPatient, - body: model.clinicsList == null - ? DrAppEmbeddedError(error: 'Something Wrong!') - : SingleChildScrollView( - child: Container( - margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.clinicsList != null && - model.clinicsList.length > 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.clinicsList, - attributeName: 'ClinicDescription', - attributeValueId: 'ClinicID', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - _selectedDoctor = null; - _selectedClinic = selectedValue; - model.getDoctorsList( - _selectedClinic['ClinicID'] - .toString()); - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).clinicSelect, - _selectedClinic != null - ? _selectedClinic['ClinicDescription'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.doctorsList != null && - model.doctorsList.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, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).doctorSelect, - _selectedDoctor != null - ? _selectedDoctor['DoctorName'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.070, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).ext, null, false), - enabled: true, - controller: _extController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_NUMBERS)) - ], - keyboardType: TextInputType.number, - )), - SizedBox( - height: 10, - ), - priorityBar(context, screenSize), - SizedBox( - height: 20, - ), - AppText( - "${TranslationBase.of(context).referralFrequency} ${getPriority()}", - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 20, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.referralFrequencyList != null && - model.referralFrequencyList.length > 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.referralFrequencyList, - attributeName: 'Description', - attributeValueId: 'ParameterCode', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - _selectedFrequency = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .selectReferralFrequency, - _selectedFrequency != null - ? _selectedFrequency['Description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 10, - ), - Container( - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).clinicDetailsandRemarks, - null, - false), - enabled: true, - controller: _remarksController, - inputFormatters: [ - FilteringTextInputFormatter.allow( - RegExp(ONLY_LETTERS)) - ], - keyboardType: TextInputType.text, - minLines: 4, - maxLines: 6, - )), - SizedBox( - height: 10, - ), - Container( - child: Column( - children: [ - AppText( - TranslationBase.of(context).pleaseFill, - color: HexColor("#B8382B"), - fontWeight: FontWeight.bold, - margin: 10, - visibility: isValid == null ? false : !isValid, - ), - // TODO replace AppButton with secondary button and add loading - AppButton( - title: TranslationBase.of(context).send, - color: HexColor("#B8382B"), - onPressed: () => {referToDoctor(context, model)}, - ) - ], - ), - ), - ], - ), - ), - ), - ), - ); - } - - Widget priorityBar(BuildContext _context, Size screenSize) { - List _priorities = [ - TranslationBase.of(context).veryUrgent.toUpperCase(), - TranslationBase.of(context).urgent.toUpperCase(), - TranslationBase.of(context).routine.toUpperCase(), - ]; - return Container( - height: screenSize.height * 0.070, - decoration: - containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), - child: Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _priorities.map((item) { - bool _isActive = _priorities[_activePriority] == item ? true : false; - return Expanded( - child: InkWell( - child: Center( - child: Container( - height: screenSize.height * 0.070, - decoration: containerBorderDecoration( - _isActive ? HexColor("#B8382B") : Colors.white, - _isActive ? HexColor("#B8382B") : Colors.white), - child: Center( - child: Text( - item, - style: TextStyle( - fontSize: 12, - color: _isActive - ? Colors.white - : Colors.black, //Colors.black, - fontWeight: FontWeight.bold, - ), - ), - )), - ), - onTap: () { - print(_priorities.indexOf(item)); - setState(() { - _activePriority = _priorities.indexOf(item); - }); - }, - ), - ); - }).toList(), - ), - ); - } - - String getPriority() { - DateTime date = DateTime.now(); - switch (_activePriority) { - case 0: - date = date.add(new Duration(hours: 3)); - break; - case 1: - date = date.add(new Duration(hours: 6)); - break; - case 2: - date = date.add(new Duration(days: 1)); - break; - } - var format = DateFormat('yyyy/mm/dd HH:mm a'); - var time = format.format(date); - print(time); - return time; - } - - referToDoctor(BuildContext context, PatientViewModel model) async { - if (!validation()) { - return; - } - - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - - try { - await model.referToDoctor( - extension: _extController.value.text, - admissionNo: int.parse(patient.admissionNo), - referringDoctorRemarks: _remarksController.value.text, - frequency: _selectedFrequency['ParameterCode'].toString(), - patientID: patient.patientId, - patientTypeID: patient.patientType, - priority: (_activePriority + 1).toString(), - roomID: patient.roomId, - selectedClinicID: _selectedClinic['ClinicID'].toString(), - selectedDoctorID: _selectedDoctor['DoctorID'].toString(), - projectID: patient.projectId); - // TODO: Add Translation - DrAppToastMsg.showSuccesToast('Reply Successfully'); - Navigator.pop(context); - } catch (e) { - DrAppToastMsg.showErrorToast(e); - } - } - - bool validation() { - setState(() { - isValid = !_extController.value.text.isNullOrEmpty() && - !_remarksController.value.text.isNullOrEmpty() && - _selectedClinic != null && - _selectedDoctor != null && - _selectedFrequency != null; - }); - return isValid; - } - - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown) { - 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 ? Icon(Icons.arrow_drop_down) : 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, - )), - ); - } -} diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart new file mode 100644 index 00000000..fd5ec6bb --- /dev/null +++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart @@ -0,0 +1,186 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.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/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + + +class AddReplayOnReferralPatient extends StatefulWidget { + final PatientReferralViewModel patientReferralViewModel; + final MyReferralPatientModel myReferralInPatientModel; + //TODO Jammal + const AddReplayOnReferralPatient( + {Key key, this.patientReferralViewModel, this.myReferralInPatientModel}) + : super(key: key); + + @override + _AddReplayOnReferralPatientState createState() => + _AddReplayOnReferralPatientState(); +} + +class _AddReplayOnReferralPatientState extends State { + + bool isSubmitted = false; + stt.SpeechToText speech = stt.SpeechToText(); + var reconizedWord; + var event = RobotProvider(); + TextEditingController progressNoteController = TextEditingController(); + @override + void initState() { + requestPermissions(); + super.initState(); + } + + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle(title: 'Replay'), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Stack( + children: [ + AppTextFieldCustom( + hintText: 'Replay your responses here', + controller: progressNoteController, + maxLines: 35, + minLines: 25, + hasBorder: true, + validationError: + progressNoteController.text.isEmpty && + isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + Positioned( + top: 0,//MediaQuery.of(context).size.height * 0, + right: 15, + child: IconButton( + icon: Icon( + DoctorApp.speechtotext, + color: Colors.black, + ), + onPressed: () { + onVoiceText(); + }, + ), + ) + ], + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'Submit Replay', + color: Color(0xff359846), + fontWeight: FontWeight.w700, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (progressNoteController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + await widget.patientReferralViewModel.replay(progressNoteController.text.trim(), widget.myReferralInPatientModel); + if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.patientReferralViewModel.error); + } else { + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast("Your Replay Added Successfully"); + Navigator.of(context).pop(); + Navigator.of(context).pop(); + } + }else { + Helpers.showErrorToast("You can't add empty replay"); + setState(() { + isSubmitted = false; + }); + } + }), + ], + ), + ), + ); + } + + onVoiceText() async { + new SpeechToText(context: context).showAlertDialog(context); + var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); + if (available) { + speech.listen( + onResult: resultListener, + // listenMode: ListenMode.confirmation, + localeId: lang == 'en' ? 'en-US' : 'ar-SA', + ); + } else { + print("The user has denied the use of speech recognition."); + } + } + + void errorListener(SpeechRecognitionError error) {} + + void statusListener(String status) { + reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + } + + void requestPermissions() async { + Map statuses = await [ + Permission.microphone, + ].request(); + } + + void resultListener(result) { + reconizedWord = result.recognizedWords; + event.setValue({"searchText": reconizedWord}); + + if (result.finalResult == true) { + setState(() { + SpeechToText.closeAlertDialog(context); + progressNoteController.text = reconizedWord; + }); + } + } +} diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index d6d9e8b6..71edabb6 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -9,19 +9,14 @@ 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/PatientProfileButton.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.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/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../../../../routes.dart'; - class MyReferralDetailScreen extends StatelessWidget { PendingReferral pendingReferral; @@ -36,7 +31,7 @@ class MyReferralDetailScreen extends StatelessWidget { return BaseView( onModelReady: (model) => model.getPatientDetails( DateUtils.convertStringToDateFormat( - DateTime.now()/*.subtract(Duration(days: 350))*/.toString(), + DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(), "yyyy-MM-dd"), DateUtils.convertStringToDateFormat( DateTime.now().toString(), "yyyy-MM-dd"), @@ -51,14 +46,13 @@ class MyReferralDetailScreen extends StatelessWidget { ? Column( children: [ Container( - padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5, top: 5), + padding: + EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), decoration: BoxDecoration( color: Colors.white, ), child: Container( - padding: EdgeInsets.only( - left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.only(top: 50), child: Column( children: [ @@ -70,24 +64,307 @@ class MyReferralDetailScreen extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - (Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + (Helpers.capitalize(model + .patientArrivalList[0] + .patientDetails + .fullName)), + fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), ), - model.patientArrivalList[0].patientDetails.gender == 1 + model.patientArrivalList[0].patientDetails + .gender == + 1 ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) + DoctorApp.male_2, + color: Colors.blue, + ) : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), + DoctorApp.female_1, + color: Colors.pink, + ), ]), ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + pendingReferral.patientDetails.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + AppText( + pendingReferral.referralStatus != null + ? pendingReferral.referralStatus + : "", + fontFamily: 'Poppins', + fontSize: + 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: pendingReferral + .referralStatus != + null + ? pendingReferral + .referralStatus == + 'Pending' + ? Color(0xffc4aa54) + : pendingReferral + .referralStatus == + 'Accepted' + ? Colors.green[700] + : Colors.red[700] + : Colors.grey[500], + ), + AppText( + pendingReferral.referredOn + .split(" ")[0], + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + "${pendingReferral.patientID}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + AppText( + pendingReferral.referredOn + .split(" ")[1], + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .referredFrom, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig + .textMultiplier, + color: Color(0XFF575757), + ), + AppText( + pendingReferral + .isReferralDoctorSameBranch + ? TranslationBase.of( + context) + .sameBranch + : TranslationBase.of( + context) + .otherBranch, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig + .textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .remarks + + " : ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig + .textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + pendingReferral + .remarksFromSource, + fontFamily: 'Poppins', + fontWeight: + FontWeight.w700, + fontSize: 1.8 * + SizeConfig + .textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + ], + ), + ), + Row( + children: [ + AppText( + pendingReferral.patientDetails + .nationalityName != + null + ? pendingReferral + .patientDetails + .nationalityName + : "", + fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), + fontSize: 1.4 * + SizeConfig.textMultiplier, + ), + pendingReferral + .nationalityFlagUrl != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular( + 20.0), + child: Image.network( + pendingReferral + .nationalityFlagUrl, + height: 25, + width: 30, + errorBuilder: + (BuildContext context, + Object exception, + StackTrace + stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only( + left: 10, right: 0), + child: Image.asset( + 'assets/images/patient/ic_ref_arrow_up.png', + height: 50, + width: 30, + ), + ), + Container( + margin: EdgeInsets.only( + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), + child: Container( + width: 40, + height: 40, + child: CircleAvatar( + radius: 25.0, + backgroundImage: NetworkImage( + pendingReferral + .doctorImageUrl), + backgroundColor: + Colors.transparent, + ), + ), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, + top: 25, + right: 10, + bottom: 0), + child: Column( + children: [ + AppText( + pendingReferral + .referredByDoctorInfo, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), ], ), ), @@ -98,51 +375,19 @@ class MyReferralDetailScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - /*ProfileWelcomeWidget( - AppText( - authProvider.selectedClinicName != null - ? authProvider.selectedClinicName - : authProvider - .doctorProfile.clinicDescription, - fontSize: SizeConfig.textMultiplier * 1.7, - color: Colors.white, - textAlign: TextAlign.center, - ), - height: 100, - ),*/ SizedBox( height: 16, ), Padding( padding: - const EdgeInsets.symmetric(horizontal: 16.0), - child: AppText( - TranslationBase.of(context).myReferralPatient, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ), - PatientReferralItemWidget( - "${pendingReferral.patientID}", - patientName: pendingReferral.patientName, - referralStatus: pendingReferral.referralStatus, - isReferredTo: false, - isSameBranch: - pendingReferral.isReferralDoctorSameBranch, - referralDoctorName: - pendingReferral.referredByDoctorInfo, - clinicDescription: null, - remark: pendingReferral.remarksFromSource, - referredOn: pendingReferral.referredOn, - patientInfo: pendingReferral, - ), - SizedBox( - child: ProfileMedicalInfoWidgetSearch( - patient: model.patientArrivalList[0], - patientType: "7", - from: null, - to: null, + const EdgeInsets.symmetric(horizontal: 16), + child: SizedBox( + child: ProfileMedicalInfoWidgetSearch( + patient: model.patientArrivalList[0], + patientType: "7", + from: null, + to: null, + ), ), ), ], @@ -155,20 +400,22 @@ class MyReferralDetailScreen extends StatelessWidget { child: Row( children: [ Expanded( - child: BorderedButton( - TranslationBase.of(context).accept, - backgroundColor: Color(0xFF4BA821), - textColor: Colors.white, - fontSize: 16, + child: AppButton( + title: TranslationBase.of(context).accept, + color: Color(0xFF4BA821), + fontColor: Colors.white, + fontSize: 1.6, hPadding: 8, vPadding: 12, - handler: () async { + onPressed: () async { await model.responseReferral( pendingReferral, true); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgAccept); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .referralSuccessMsgAccept); Navigator.pop(context); Navigator.pop(context); } @@ -176,23 +423,25 @@ class MyReferralDetailScreen extends StatelessWidget { ), ), SizedBox( - height: 8, + width: 8, ), Expanded( - child: BorderedButton( - TranslationBase.of(context).reject, - backgroundColor: Color(0xFFB9382C), - textColor: Colors.white, - fontSize: 16, + child: AppButton( + title: TranslationBase.of(context).reject, + color: Color(0xFFB9382C), + fontColor: Colors.white, + fontSize: 1.6, hPadding: 8, vPadding: 12, - handler: () async { + onPressed: () async { await model.responseReferral( pendingReferral, true); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsgReject); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context) + .referralSuccessMsgReject); Navigator.pop(context); Navigator.pop(context); } @@ -204,15 +453,38 @@ class MyReferralDetailScreen extends StatelessWidget { ), ], ) - : Container( - child: Center( - child: AppText( - TranslationBase.of(context).patientNoDetailErrMsg, - color: HexColor("#B8382B"), - fontWeight: FontWeight.bold, - fontSize: 16, + : Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + "", + fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + ), + ]), ), - ), + Container( + child: Center( + child: AppText( + TranslationBase.of(context).patientNoDetailErrMsg, + color: HexColor("#B8382B"), + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + ), + ], ), ), ); diff --git a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart new file mode 100644 index 00000000..f3bbf698 --- /dev/null +++ b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart @@ -0,0 +1,92 @@ +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/screens/patients/profile/referral/referral_patient_detail_in-paint.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'; +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:font_awesome_flutter/font_awesome_flutter.dart'; + +class MyReferralInPatientScreen extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getMyReferralPatientService(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + appBarTitle: TranslationBase.of(context).referPatient, + body: model.myReferralPatients.isEmpty + ? Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).referralEmptyMsg, + color: Theme.of(context).errorColor, + ), + ) + ], + ), + ) + : SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(top: 70), + // color: Colors.white, + // height: MediaQuery.of(context).size.height, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // SizedBox(height: 50), + ...List.generate( + model.myReferralPatients.length, + (index) => InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReferralPatientDetailScreen(model.myReferralPatients[index],model), + ), + ); + }, + child: PatientReferralItemWidget( + referralStatus: model.getReferralStatusNameByCode(model.myReferralPatients[index].referralStatus,context), + referralStatusCode: model.myReferralPatients[index].referralStatus, + patientName: model.myReferralPatients[index].patientName, + patientGender: model.myReferralPatients[index].gender, + referredDate: DateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate), + referredTime: DateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), + patientID: "${model.myReferralPatients[index].patientID}", + isSameBranch: false, + isReferral: true, + isReferralClinic: true, + referralClinic:"${model.myReferralPatients[index].referringClinicDescription}", + remark: model.myReferralPatients[index].referringDoctorRemarks, + nationality: model.myReferralPatients[index].nationalityName, + nationalityFlag: model.myReferralPatients[index].nationalityFlagURL, + doctorAvatar: model.myReferralPatients[index].doctorImageURL, + referralDoctorName: model.myReferralPatients[index].referringDoctorName, + clinicDescription: model.myReferralPatients[index].referringClinicDescription, + infoIcon: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index e6cccf48..b2953cca 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -1,13 +1,12 @@ -import 'package:doctor_app_flutter/config/size_config.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/screens/base/base_view.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/profile-welcome-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:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import '../../../../routes.dart'; @@ -26,9 +25,21 @@ class MyReferralPatientScreen extends StatelessWidget { appBarTitle: TranslationBase.of(context).referPatient, body: model.pendingReferral == null || model.pendingReferral.length == 0 ? Center( - child: AppText( - TranslationBase.of(context).referralEmptyMsg, - color: Theme.of(context).errorColor, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).referralEmptyMsg, + color: Theme.of(context).errorColor, + ), + ) + ], ), ) : SingleChildScrollView( @@ -50,23 +61,34 @@ class MyReferralPatientScreen extends StatelessWidget { }); }, child: PatientReferralItemWidget( - "${model.pendingReferral[index].patientID}", - patientInfo: model.pendingReferral[index], - patientName: - model.pendingReferral[index].patientName, referralStatus: model.pendingReferral[index].referralStatus, - isReferredTo: false, + patientName: + model.pendingReferral[index].patientName, + patientGender: model + .pendingReferral[index].patientDetails.gender, + referredDate: model + .pendingReferral[index].referredOn + .split(" ")[0], + referredTime: model + .pendingReferral[index].referredOn + .split(" ")[1], + patientID: + "${model.pendingReferral[index].patientID}", isSameBranch: model.pendingReferral[index] .isReferralDoctorSameBranch, + isReferral: true, + remark: + model.pendingReferral[index].remarksFromSource, + nationality: model.pendingReferral[index] + .patientDetails.nationalityName, + nationalityFlag: + model.pendingReferral[index].nationalityFlagUrl, + doctorAvatar: + model.pendingReferral[index].doctorImageUrl, referralDoctorName: model .pendingReferral[index].referredByDoctorInfo, clinicDescription: null, - remark: - model.pendingReferral[index].remarksFromSource, - referredOn: model.pendingReferral[index].referredOn, - answerFromTarget: - model.pendingReferral[index].answerFromTarget, infoIcon: InkWell( onTap: () { Navigator.of(context) @@ -74,11 +96,8 @@ class MyReferralPatientScreen extends StatelessWidget { 'referral': model.pendingReferral[index] }); }, - child: Icon( - Icons.info_outline, - color: Colors.black, - size: 30, - ), + child: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), ), ), ), diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index adea0247..1206c9c3 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -1,7 +1,5 @@ import 'dart:ui'; -import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; + import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -9,6 +7,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'my-referral-inpatient-screen.dart'; + class PatientReferralScreen extends StatefulWidget { @override _PatientReferralScreen createState() => _PatientReferralScreen(); @@ -39,17 +39,17 @@ class _PatientReferralScreen extends State extendBodyBehindAppBar: true, // backgroundColor: Colors.white, appBar: PreferredSize( - preferredSize: Size.fromHeight(65.0), + preferredSize: Size.fromHeight(60.0), child: Center( child: Container( height: 60.0, - margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.92, // 0.9, + // margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width * 1, // 0.92, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.9), //width: 0.7 + width: 1), //width: 0.7 ), color: Colors.white), child: Center( @@ -68,7 +68,7 @@ class _PatientReferralScreen extends State width: MediaQuery.of(context).size.width * 0.30, child: Center( child: - AppText(TranslationBase.of(context).myReferral), + AppText(TranslationBase.of(context).referral), ), ), Container( @@ -91,7 +91,7 @@ class _PatientReferralScreen extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - MyReferralPatientScreen(), + MyReferralInPatientScreen(), ReferredPatientScreen(), // MyReferredPatient(), ], diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart new file mode 100644 index 00000000..ae3fcee7 --- /dev/null +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -0,0 +1,561 @@ +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/patient-referral-viewmodel.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/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:intl/intl.dart'; + +class PatientMakeInPatientReferralScreen extends StatefulWidget { + @override + _PatientMakeInPatientReferralScreenState createState() => + _PatientMakeInPatientReferralScreenState(); +} + +class _PatientMakeInPatientReferralScreenState + extends State { + PatiantInformtion patient; + List referToList; + dynamic _referTo; + dynamic _selectedBranch; + dynamic _selectedClinic; + dynamic _selectedDoctor; + dynamic _selectedFrequency; + final _remarksController = TextEditingController(); + final _extController = TextEditingController(); + int _activePriority = 1; + String appointmentDate; + + String branchError; + String hospitalError; + String clinicError; + String doctorError; + String frequencyError; + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + + referToList = List(); + dynamic sameBranch = { + "id": 1, + "name": TranslationBase.of(context).sameBranch + }; + dynamic otherBranch = { + "id": 2, + "name": TranslationBase.of(context).otherBranch + }; + referToList.add(sameBranch); + referToList.add(otherBranch); + + final screenSize = MediaQuery.of(context).size; + + return BaseView( + onModelReady: (model) => model.getReferralFrequencyList(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + appBarTitle: TranslationBase.of(context).referPatient, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), + body: SingleChildScrollView( + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).refer}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).patient}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).branch, + dropDownText: + _referTo != null ? _referTo['name'] : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: branchError, + onClick: referToList != null + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: referToList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _referTo = selectedValue; + _selectedBranch = null; + _selectedClinic = null; + _selectedDoctor = null; + model + .getDoctorBranch() + .then((value) async { + _selectedBranch = value; + if (_referTo['id'] == 1) { + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinics(_selectedBranch[ + 'facilityId']) + .then((_) => + GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } + } else { + _selectedBranch = null; + } + }); + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).hospital, + dropDownText: _selectedBranch != null + ? _selectedBranch['facilityName'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: hospitalError, + onClick: model.branchesList != null && + model.branchesList.length > 0 && + _referTo != null && + _referTo['id'] == 2 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.branchesList, + attributeName: 'facilityName', + attributeValueId: 'facilityId', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() async { + _selectedBranch = selectedValue; + _selectedClinic = null; + _selectedDoctor = null; + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinics( + _selectedBranch['facilityId']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).clinic, + dropDownText: _selectedClinic != null + ? _selectedClinic['ClinicDescription'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: clinicError, + onClick: _selectedBranch != null && + model.clinicsList != null && + model.clinicsList.length > 0 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.clinicsList, + attributeName: 'ClinicDescription', + attributeValueId: 'ClinicID', + usingSearch: true, + hintSearchText: + TranslationBase.of(context) + .clinicSearch, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() async { + _selectedDoctor = null; + _selectedClinic = selectedValue; + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinicDoctors( + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).doctor, + dropDownText: _selectedDoctor != null + ? _selectedDoctor['Name'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: doctorError, + onClick: _selectedClinic != null && + model.doctorsList != null && + model.doctorsList.length > 0 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.doctorsList, + attributeName: 'Name', + attributeValueId: 'DoctorID', + usingSearch: true, + hintSearchText: + TranslationBase.of(context) + .doctorSearch, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedDoctor = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : () { + if (_selectedClinic == null) { + DrAppToastMsg.showErrorToast( + "You need to select a clinic first"); + } else if (model.doctorsList == null || + model.doctorsList.length == 0) { + DrAppToastMsg.showErrorToast( + "There is no doctors for this clinic"); + } + }, + ), + SizedBox( + height: 10, + ), + AppText( + "${TranslationBase.of(context).priority}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, + fontWeight: FontWeight.w600, + ), + SizedBox( + height: 4, + ), + priorityBar(context, screenSize), + SizedBox( + height: 10, + ), + AppText( + "${TranslationBase.of(context).replayBefore}: ${getPriority()}", + fontWeight: FontWeight.normal, + fontSize: SizeConfig.textMultiplier * 1.9, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: + TranslationBase.of(context).referralFrequency, + dropDownText: _selectedFrequency != null + ? _selectedFrequency['Description'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: frequencyError, + onClick: () { + ListSelectDialog dialog = ListSelectDialog( + list: model.referralFrequencyList, + attributeName: 'Description', + attributeValueId: 'ParameterCode', + usingSearch: true, + hintSearchText: TranslationBase.of(context) + .selectReferralFrequency, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedFrequency = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + }, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: TranslationBase.of(context).ext, + controller: _extController, + inputType: TextInputType.text, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: + TranslationBase.of(context).dietTypeRemarks, + controller: _remarksController, + inputType: TextInputType.multiline, + minLines: 4, + maxLines: 6, + ), + ], + ), + ) + ], + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: AppButton( + title: TranslationBase.of(context).refer, + fontWeight: FontWeight.w700, + color: Color(0XFF359846), + onPressed: () async{ + setState(() { + if (_referTo == null) { + branchError = + TranslationBase.of(context).fieldRequired; + } else { + branchError = null; + } + if (_selectedBranch == null) { + hospitalError = + TranslationBase.of(context).fieldRequired; + } else { + hospitalError = null; + } + if (_selectedClinic == null) { + clinicError = + TranslationBase.of(context).fieldRequired; + } else { + clinicError = null; + } + if (_selectedDoctor == null) { + doctorError = + TranslationBase.of(context).fieldRequired; + } else { + doctorError = null; + } + if (_selectedFrequency == null) { + frequencyError = + TranslationBase.of(context).fieldRequired; + } else { + frequencyError = null; + } + }); + if (_selectedFrequency == null || + _selectedBranch == null || + _selectedClinic == null || + _selectedDoctor == null || + _remarksController.text == null || + _extController.text == null) return;{ + + await model.makeInPatientReferral( + patient: patient, + projectID: _selectedBranch['facilityId'], + clinicID: _selectedClinic['ClinicID'], + doctorID: _selectedDoctor['DoctorID'], + frequencyCode: _selectedFrequency['ParameterCode'], + ext: _extController.text, + remarks: _remarksController.text, + priority: _activePriority, + referralDate: appointmentDate + ); + if(model.state == ViewState.ErrorLocal) + DrAppToastMsg.showErrorToast(model.error); + else{ + DrAppToastMsg.showSuccesToast(TranslationBase.of(context).referralSuccessMsg); + Navigator.pop(context); + } + + } + }, + ), + ) + ], + ), + ), + ), + ), + ); + } + + Widget priorityBar(BuildContext _context, Size screenSize) { + List _priorities = [ + TranslationBase.of(context).veryUrgent.toUpperCase(), + TranslationBase.of(context).urgent.toUpperCase(), + TranslationBase.of(context).routine.toUpperCase(), + ]; + return Container( + height: screenSize.height * 0.070, + decoration: + containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _priorities.map((item) { + bool _isActive = _priorities[_activePriority] == item ? true : false; + return Expanded( + child: InkWell( + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: containerBorderDecoration( + _isActive ? Color(0XFFB8382B) : Colors.white, + _isActive ? Color(0XFFB8382B) : Colors.white), + child: Center( + child: Text( + item, + style: TextStyle( + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + fontWeight: FontWeight.bold, + ), + ), + )), + ), + onTap: () { + print(_priorities.indexOf(item)); + setState(() { + _activePriority = _priorities.indexOf(item); + }); + }, + ), + ); + }).toList(), + ), + ); + } + + String getPriority() { + DateTime date = DateTime.now(); + switch (_activePriority) { + case 0: + date = date.add(new Duration(hours: 3)); + break; + case 1: + date = date.add(new Duration(hours: 6)); + break; + case 2: + date = date.add(new Duration(days: 1)); + break; + } + var format = DateFormat('yyyy/mm/dd HH:mm a'); + var time = format.format(date); + print(time); + + appointmentDate = time; + return time; + } + + 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, + )), + ); + } +} diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 6f053089..2d9ca8dc 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -1,19 +1,19 @@ -import 'package:doctor_app_flutter/config/config.dart'; +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/patient-referral-viewmodel.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/patients/profile/patient-profile-header-new-design-app-bar.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/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -35,6 +35,11 @@ class _PatientMakeReferralScreenState extends State { DateTime appointmentDate; final _remarksController = TextEditingController(); + String branchError = null; + String hospitalError = null; + String clinicError = null; + String doctorError = null; + @override void initState() { super.initState(); @@ -46,6 +51,8 @@ class _PatientMakeReferralScreenState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; referToList = List(); dynamic sameBranch = { @@ -66,46 +73,94 @@ class _PatientMakeReferralScreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).referPatient, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), body: SingleChildScrollView( child: Container( child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - /*if (model.state == ViewState.BusyLocal) - Container( - color: Colors.white, - width: 50, - height: 50, - child: AppLoaderWidget( - containerColor: Colors.white, - )),*/ Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientPageHeaderWidget(patient), - const Divider( - color: Color(0xffCCCCCC), - height: 1, - thickness: 2, - indent: 0, - endIndent: 0, + /*PatientProfileHeaderNewDesign( + patient, patientType, arrivalType),*/ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).refer}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).patient}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), ), model.patientReferral.length == 0 - ? ReferralForm(model, screenSize) + ? referralForm(model, screenSize) : PatientReferralItemWidget( - "${model.patientReferral[model.patientReferral.length -1].patientID}", - patientName: model.patientReferral[model.patientReferral.length -1].patientName, - referralStatus: - "${model.patientReferral[model.patientReferral.length -1].referralStatus}", - isReferredTo: true, + referralStatus: model + .patientReferral[ + model.patientReferral.length - 1] + .referralStatus, + patientName: model + .patientReferral[ + model.patientReferral.length - 1] + .patientName, + patientGender: model + .patientReferral[ + model.patientReferral.length - 1] + .patientDetails + .gender, + referredDate: model + .patientReferral[ + model.patientReferral.length - 1] + .referredOn + .split(" ")[0], + referredTime: model + .patientReferral[ + model.patientReferral.length - 1] + .referredOn + .split(" ")[1], + patientID: + "${model.patientReferral[model.patientReferral.length - 1].patientID}", isSameBranch: model - .patientReferral[model.patientReferral.length -1].isReferralDoctorSameBranch, - referralDoctorName: - model.patientReferral[model.patientReferral.length -1].referredByDoctorInfo, + .patientReferral[ + model.patientReferral.length - 1] + .isReferralDoctorSameBranch, + isReferral: true, + remark: model + .patientReferral[ + model.patientReferral.length - 1] + .remarksFromSource, + nationality: model + .patientReferral[ + model.patientReferral.length - 1] + .patientDetails + .nationalityName, + nationalityFlag: model + .patientReferral[ + model.patientReferral.length - 1] + .nationalityFlagUrl, + doctorAvatar: model + .patientReferral[ + model.patientReferral.length - 1] + .doctorImageUrl, + referralDoctorName: model + .patientReferral[ + model.patientReferral.length - 1] + .referredByDoctorInfo, clinicDescription: null, - remark: model.patientReferral[model.patientReferral.length -1].remarksFromSource, - referredOn: model.patientReferral[model.patientReferral.length -1].referredOn, - answerFromTarget: - model.patientReferral[model.patientReferral.length -1].answerFromTarget, ), ], ), @@ -114,8 +169,35 @@ class _PatientMakeReferralScreenState extends State { margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: AppButton( title: TranslationBase.of(context).refer, - color: HexColor("#B8382B"), + fontWeight: FontWeight.w700, + color: HexColor("#359846"), onPressed: () { + setState(() { + if (_referTo == null) { + branchError = + TranslationBase.of(context).fieldRequired; + } else { + branchError = null; + } + if (_selectedBranch == null) { + hospitalError = + TranslationBase.of(context).fieldRequired; + } else { + hospitalError = null; + } + if (_selectedClinic == null) { + clinicError = + TranslationBase.of(context).fieldRequired; + } else { + clinicError = null; + } + if (_selectedDoctor == null) { + doctorError = + TranslationBase.of(context).fieldRequired; + } else { + doctorError = null; + } + }); if (appointmentDate == null || _selectedBranch == null || _selectedClinic == null || @@ -145,262 +227,236 @@ class _PatientMakeReferralScreenState extends State { ); } - Widget ReferralForm(PatientReferralViewModel model, Size screenSize) { + Widget referralForm(PatientReferralViewModel model, Size screenSize) { return Container( - margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), + margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).referPatient, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: referToList != null - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: referToList, - attributeName: 'name', - attributeValueId: 'id', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - _referTo = selectedValue; - _selectedBranch = null; - _selectedClinic = null; - _selectedDoctor = null; - model.getDoctorBranch().then((value) async { - _selectedBranch = value; - if (_referTo['id'] == 1) { - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinics(_selectedBranch['facilityId']) - .then((_) => - GifLoaderDialogUtils.hideDialog( - context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).branch, + dropDownText: _referTo != null ? _referTo['name'] : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: branchError, + onClick: referToList != null + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: referToList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _referTo = selectedValue; + _selectedBranch = null; + _selectedClinic = null; + _selectedDoctor = null; + model.getDoctorBranch().then((value) async { + _selectedBranch = value; + if (_referTo['id'] == 1) { + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); } - }); + } else { + _selectedBranch = null; + } }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).referTo, - _referTo != null ? _referTo['name'] : null, - true), - enabled: false, - ), - ), + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.branchesList != null && - model.branchesList.length > 0 && - _referTo != null && - _referTo['id'] == 2 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.branchesList, - attributeName: 'facilityName', - attributeValueId: 'facilityId', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { - _selectedBranch = selectedValue; - _selectedClinic = null; - _selectedDoctor = null; - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinics(_selectedBranch['facilityId']) - .then((_) => - GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).branch, - _selectedBranch != null - ? _selectedBranch['facilityName'] - : null, - true), - enabled: false, - ), - ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).hospital, + dropDownText: _selectedBranch != null + ? _selectedBranch['facilityName'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: hospitalError, + onClick: model.branchesList != null && + model.branchesList.length > 0 && + _referTo != null && + _referTo['id'] == 2 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.branchesList, + attributeName: 'facilityName', + attributeValueId: 'facilityId', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() async { + _selectedBranch = selectedValue; + _selectedClinic = null; + _selectedDoctor = null; + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: _selectedBranch != null && - model.clinicsList != null && - model.clinicsList.length > 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.clinicsList, - attributeName: 'ClinicDescription', - attributeValueId: 'ClinicID', - usingSearch: true, - hintSearchText: - TranslationBase.of(context).clinicSearch, - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() async { - _selectedDoctor = null; - _selectedClinic = selectedValue; - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinicDoctors( - _selectedClinic['ClinicID'].toString()) - .then((_) => - GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).clinic, - _selectedClinic != null - ? _selectedClinic['ClinicDescription'] - : null, - true), - enabled: false, - ), - ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).clinic, + dropDownText: _selectedClinic != null + ? _selectedClinic['ClinicDescription'] + : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: clinicError, + onClick: _selectedBranch != null && + model.clinicsList != null && + model.clinicsList.length > 0 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.clinicsList, + attributeName: 'ClinicDescription', + attributeValueId: 'ClinicID', + usingSearch: true, + hintSearchText: TranslationBase.of(context).clinicSearch, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() async { + _selectedDoctor = null; + _selectedClinic = selectedValue; + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinicDoctors( + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: _selectedClinic != null && - model.doctorsList != null && - model.doctorsList.length > 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.doctorsList, - attributeName: 'DoctorName', - attributeValueId: 'DoctorID', - usingSearch: true, - hintSearchText: - TranslationBase.of(context).doctorSearch, - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - _selectedDoctor = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).doctor, + dropDownText: + _selectedDoctor != null ? _selectedDoctor['Name'] : null, + enabled: false, + isTextFieldHasSuffix: true, + validationError: doctorError, + onClick: _selectedClinic != null && + model.doctorsList != null && + model.doctorsList.length > 0 + ? () { + ListSelectDialog dialog = ListSelectDialog( + list: model.doctorsList, + attributeName: 'Name', + attributeValueId: 'DoctorID', + usingSearch: true, + hintSearchText: TranslationBase.of(context).doctorSearch, + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedDoctor = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : () { + if (_selectedClinic == null) { + DrAppToastMsg.showErrorToast( + "You need to select a clinic first"); + } else if (model.doctorsList == null || + model.doctorsList.length == 0) { + DrAppToastMsg.showErrorToast( + "There is no doctors for this clinic"); } - : null, - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).doctor, - _selectedDoctor != null - ? _selectedDoctor['DoctorName'] - : null, - true), - enabled: false, - ), - ), + }, ), SizedBox( height: 10, ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: () => _selectDate(context, model), - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).chooseAppointment, - appointmentDate != null - ? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), + AppTextFieldCustom( + height: screenSize.height * 0.075, + hintText: TranslationBase.of(context).date, + dropDownText: appointmentDate != null + ? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" + : null, + enabled: false, + isTextFieldHasSuffix: true, + suffixIcon: IconButton( + icon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + onClick: () { + _selectDate(context, model); + }, ), SizedBox( height: 10, ), - Container( - child: TextField( - decoration: Helpers.textFieldSelectorDecoration( - TranslationBase.of(context).remarks, null, false), - enabled: true, + AppTextFieldCustom( + hintText: TranslationBase.of(context).dietTypeRemarks, controller: _remarksController, - // inputFormatters: [ - // FilteringTextInputFormatter.allow(RegExp(ONLY_LETTERS)) - // ], - keyboardType: TextInputType.text, + inputType: TextInputType.multiline, minLines: 4, maxLines: 6, - )), + ), ], ), ); diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart new file mode 100644 index 00000000..32d60f79 --- /dev/null +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -0,0 +1,471 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/model/MyReferralPatientModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; +import 'package:flutter/material.dart'; + +import '../../../../routes.dart'; +import 'AddReplayOnReferralPatient.dart'; + +class ReferralPatientDetailScreen extends StatelessWidget { + final MyReferralPatientModel referredPatient; + final PatientReferralViewModel patientReferralViewModel; + ReferralPatientDetailScreen(this.referredPatient, this.patientReferralViewModel); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Container( + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + (Helpers.capitalize( + "${referredPatient.firstName} ${referredPatient.lastName}")), + fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + referredPatient.gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + InkWell( + onTap: () { + PatiantInformtion patient = + model.getPatientFromReferralO(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patient, + "patientType": "1", + "isInpatient": true, + "arrivalType": "1", + "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + }); + }, + child: Icon( + Icons.account_circle, + size: 25, + ), + ) + ]), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.network( + referredPatient.doctorImageURL + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + AppText( + "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}", + fontFamily: 'Poppins', + fontSize: 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: referredPatient.referralStatus == 1 + ? Color(0xffc4aa54) + : referredPatient.referralStatus == 46 + ? Colors.green[700] + : Colors.red[700], + ), + AppText( + DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + "${referredPatient.patientID}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + AppText( + DateUtils.getTimeHHMMA(referredPatient.referralDate,), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).refClinic}: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + referredPatient + .referringClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .frequency + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient + .frequencyDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + ], + ), + ), + Row( + children: [ + AppText( + referredPatient.nationalityName != + null + ? referredPatient.nationalityName + : "", + fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), + fontSize: + 1.4 * SizeConfig.textMultiplier, + ), + referredPatient.nationalityFlagURL != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + referredPatient + .nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext + context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient.priorityDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .maxResponseTime + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.mAXResponseTime, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 0), + child: Image.asset( + 'assets/images/patient/ic_ref_arrow_left.png', + height: 50, + width: 30, + ), + ), + Container( + margin: EdgeInsets.only( + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), + child: referredPatient.doctorImageURL != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + referredPatient.doctorImageURL, + height: 25, + width: 30, + errorBuilder: + (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : Container( + child: Image.asset( + referredPatient.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, + top: 30, + right: 10, + bottom: 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "Dr ${referredPatient.referringDoctorName}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w800, + fontSize: 1.5 * + SizeConfig.textMultiplier, + color: Colors.black, + ), + AppText( + referredPatient + .referringClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.3 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + Expanded( + child: SingleChildScrollView( + child: Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(8)), + border: Border.fromBorderSide(BorderSide( + color: Colors.white, + width: 1.0, + )), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 2.4 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + AppText( + referredPatient.referringDoctorRemarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + SizedBox( + height: 8, + ), + + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: AppButton( + title: TranslationBase.of(context).replay, + color: Colors.red[700], + fontColor: Colors.white, + fontWeight: FontWeight.w700, + fontSize: 1.8, + hPadding: 8, + vPadding: 12, + onPressed: () async { + Navigator.push( + context, + SlideUpPageRoute( + widget: AddReplayOnReferralPatient(patientReferralViewModel: patientReferralViewModel,myReferralInPatientModel: referredPatient,),),); + }, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index d6a81603..ceb35929 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -1,11 +1,14 @@ 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/screens/patients/profile/referral/referred_patient_detail_in-paint.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'; 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:font_awesome_flutter/font_awesome_flutter.dart'; class ReferredPatientScreen extends StatelessWidget { // previous design page is: MyReferredPatient @@ -20,57 +23,94 @@ class ReferredPatientScreen extends StatelessWidget { body: model.listMyReferredPatientModel == null || model.listMyReferredPatientModel.length == 0 ? Center( - child: AppText( - TranslationBase.of(context).referralEmptyMsg, - color: Theme.of(context).errorColor, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).referralEmptyMsg, + color: Theme.of(context).errorColor, + ), + ) + ], ), ) : SingleChildScrollView( + // DoctorApplication.svc/REST/GtMyReferredPatient child: Container( + margin: EdgeInsets.only(top: 70), child: Column( children: [ - /*Container( - height: 75, - child: AppText( - "This is where upper view for avatar.. etc placed", - fontWeight: FontWeight.normal, - fontSize: 16, - ), - ),*/ - const Divider( - color: Color(0xffCCCCCC), - height: 1, - thickness: 2, - indent: 0, - endIndent: 0, - ), + // const Divider( + // color: Color(0xffCCCCCC), + // height: 1, + // thickness: 2, + // indent: 0, + // endIndent: 0, + // ), ...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.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}", - isReferredTo: true, - isSameBranch: model - .getReferredPatientItem(index) - .isReferralDoctorSameBranch, - referralDoctorName: model - .getReferredPatientItem(index) - .referralDoctorName, - clinicDescription: model - .getReferredPatientItem(index) - .referralClinicDescription, - remark: model - .getReferredPatientItem(index) - .referringDoctorRemarks, - referredOn: model - .getReferredPatientItem(index) - .referralDate != - null - ? DateUtils.convertDateFromServerFormat(model.getReferredPatientItem(index).referralDate, "dd/MM/yyyy") - : null, + (index) => InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReferredPatientDetailScreen( + model.getReferredPatientItem(index)), + ), + ); + }, + child: PatientReferralItemWidget( + referralStatus: + "${model.getReferralStatusNameByCode(model.getReferredPatientItem(index).referralStatus, context)}", + referralStatusCode: model + .getReferredPatientItem(index) + .referralStatus, + patientName: + "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", + patientGender: + model.getReferredPatientItem(index).gender, + referredDate: DateUtils.convertDateFromServerFormat( + model + .getReferredPatientItem(index) + .referralDate, + "dd/MM/yyyy"), + referredTime: DateUtils.convertDateFromServerFormat( + model + .getReferredPatientItem(index) + .referralDate, + "hh:mm a"), + patientID: + "${model.getReferredPatientItem(index).patientID}", + isSameBranch: model + .getReferredPatientItem(index) + .isReferralDoctorSameBranch, + isReferral: false, + remark: model + .getReferredPatientItem(index) + .referringDoctorRemarks, + nationality: model + .getReferredPatientItem(index) + .nationalityName, + nationalityFlag: model + .getReferredPatientItem(index) + .nationalityFlagURL, + doctorAvatar: model + .getReferredPatientItem(index) + .doctorImageURL, + referralDoctorName: + "Dr. ${model.getReferredPatientItem(index).referralDoctorName}", + clinicDescription: model + .getReferredPatientItem(index) + .referralClinicDescription, + infoIcon: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), + ), ), ), ], diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart new file mode 100644 index 00000000..b68eeac1 --- /dev/null +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -0,0 +1,567 @@ +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/patient-referral-viewmodel.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/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/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:flutter/material.dart'; + +import '../../../../routes.dart'; + +class ReferredPatientDetailScreen extends StatelessWidget { + final MyReferredPatientModel referredPatient; + + ReferredPatientDetailScreen(this.referredPatient); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Container( + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + (Helpers.capitalize( + "${referredPatient.firstName} ${referredPatient.lastName}")), + fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + referredPatient.gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + InkWell( + onTap: () { + PatiantInformtion patient = + model.getPatientFromReferral(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patient, + "patientType": "1", + "isInpatient": true, + "arrivalType": "1", + "from": DateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + "to": DateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + }); + }, + child: Icon( + Icons.account_circle, + size: 25, + ), + ) + ]), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: (){ + PatiantInformtion patient = + model.getPatientFromReferral(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patient, + "patientType": "1", + "isInpatient": true, + "arrivalType": "1", + "from": DateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + "to": DateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + }); + }, + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + referredPatient.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 20, + ), + AppText( + TranslationBase.of(context).showDetail, + fontWeight: FontWeight.w700, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Colors.blue, + ) + ], + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + AppText( + "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}", + fontFamily: 'Poppins', + fontSize: 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: referredPatient.referralStatus == 1 + ? Color(0xffc4aa54) + : referredPatient.referralStatus == 46 + ? Colors.green[700] + : Colors.red[700], + ), + AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.referralDate, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: + 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + "${referredPatient.patientID}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 14, + color: Color(0XFF2E303A), + ), + ], + ), + AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.referralDate, + "hh:mm a"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).refClinic}: ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient + .referralClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 13, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .frequency + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * + SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + referredPatient + .frequencyDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 14, + color: Color(0XFF2E303A), + ), + ), + ], + ), + ], + ), + ), + Row( + children: [ + AppText( + referredPatient.nationalityName != + null + ? referredPatient.nationalityName + : "", + fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), + fontSize: + 1.4 * SizeConfig.textMultiplier, + ), + referredPatient.nationalityFlagURL != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + referredPatient + .nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext + context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).priority + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + referredPatient.priorityDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 14, + color: Color(0XFF2E303A), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .maxResponseTime + + ": ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + Expanded( + child: AppText( + DateUtils.convertDateFromServerFormat( + referredPatient.mAXResponseTime, + "dd MMM,yyyy"), + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: + 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: + EdgeInsets.only(left: 10, right: 0), + child: Image.asset( + 'assets/images/patient/ic_ref_arrow_left.png', + height: 50, + width: 30, + ), + ), + Container( + margin: EdgeInsets.only( + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), + child: referredPatient.doctorImageURL != + null + ? ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + referredPatient.doctorImageURL, + height: 25, + width: 30, + errorBuilder: + (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : Container( + child: Image.asset( + referredPatient.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, + top: 30, + right: 10, + bottom: 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "Dr ${referredPatient.referralDoctorName}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w800, + fontSize: 1.5 * + SizeConfig.textMultiplier, + color: Colors.black, + ), + AppText( + referredPatient + .referralClinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.3 * + SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + Expanded( + child: SingleChildScrollView( + child: Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(8)), + border: Border.fromBorderSide(BorderSide( + color: Colors.white, + width: 1.0, + )), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 2.4 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + AppText( + referredPatient.referringDoctorRemarks, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + SizedBox( + height: 8, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only( + left: 0, top: 0, right: 4, bottom: 0), + padding: EdgeInsets.only(left: 4.0, right: 4.0), + child: referredPatient.doctorImageURL != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + referredPatient.doctorImageURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : Container( + child: Image.asset( + referredPatient.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).reply, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + AppText( + referredPatient + .referredDoctorRemarks.isNotEmpty + ? referredPatient.referredDoctorRemarks + : " Not Replied yet", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.6 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: AppButton( + title: TranslationBase.of(context).acknowledged, + color: Colors.red[700], + fontColor: Colors.white, + fontWeight: FontWeight.w700, + fontSize: 1.8, + hPadding: 8, + vPadding: 12, + disabled: referredPatient.referredDoctorRemarks.isNotEmpty + ? false + : true, + onPressed: () async { + await model.verifyReferralDoctorRemarks(referredPatient); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showSuccesToast( + "Referral is acknowledged"); + Navigator.pop(context); + } + }, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart new file mode 100644 index 00000000..87015bbb --- /dev/null +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -0,0 +1,483 @@ +import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +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/viewModel/SOAP_view_model.dart'; +// import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; +import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.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/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +class AddAssessmentDetails extends StatefulWidget { + final MySelectedAssessment mySelectedAssessment; + final List mySelectedAssessmentList; + final Function(MySelectedAssessment mySelectedAssessment, bool isUpdate) + addSelectedAssessment; + final PatiantInformtion patientInfo; + final bool isUpdate; + AddAssessmentDetails( + {Key key, + this.mySelectedAssessment, + this.addSelectedAssessment, + this.patientInfo, + this.isUpdate = false, + this.mySelectedAssessmentList}); + + @override + _AddAssessmentDetailsState createState() => _AddAssessmentDetailsState(); +} + +class _AddAssessmentDetailsState extends State { + TextEditingController remarkController = TextEditingController(); + TextEditingController appointmentIdController = TextEditingController(); + TextEditingController conditionController = TextEditingController(); + TextEditingController typeController = TextEditingController(); + TextEditingController icdNameController = TextEditingController(); + + GlobalKey key = new GlobalKey>(); + bool isFormSubmitted = false; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + remarkController.text = widget.mySelectedAssessment.remark ?? ""; + appointmentIdController.text = + widget.mySelectedAssessment.appointmentId.toString(); + if (widget.isUpdate) { + if (widget.mySelectedAssessment.selectedDiagnosisCondition != null) + conditionController.text = projectViewModel.isArabic + ? widget.mySelectedAssessment.selectedDiagnosisCondition.nameAr + : widget.mySelectedAssessment.selectedDiagnosisCondition.nameEn; + if (widget.mySelectedAssessment.selectedDiagnosisType != null) + typeController.text = projectViewModel.isArabic + ? widget.mySelectedAssessment.selectedDiagnosisType.nameAr + : widget.mySelectedAssessment.selectedDiagnosisType.nameEn; + if (widget.mySelectedAssessment.selectedICD != null) + icdNameController.text = widget.mySelectedAssessment.selectedICD.code; + } + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {IconData icon, String validationError}) { + return new InputDecoration( + fillColor: Colors.white, + contentPadding: EdgeInsets.symmetric(vertical: 15, horizontal: 10), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: (validationError != null + ? Colors.red.shade700 + : Color(0xFFEFEFEF)), + width: 2.5), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: (validationError != null + ? Colors.red.shade700 + : Color(0xFFEFEFEF)), + width: 2.5), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: (validationError != null + ? Colors.red.shade700 + : Color(0xFFEFEFEF)), + width: 2.5), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, + filled: true, + hintStyle: TextStyle( + fontSize: 10, + color: Colors.grey.shade600, + ), + ); + } + + return FractionallySizedBox( + heightFactor: 1, + child: BaseView( + onModelReady: (model) async { + if (model.listOfDiagnosisCondition.length == 0) { + await model.getMasterLookup(MasterKeysService.DiagnosisCondition); + } + if (model.listOfDiagnosisType.length == 0) { + await model.getMasterLookup(MasterKeysService.DiagnosisType); + } + if (model.listOfICD10.length == 0) { + await model.getMasterLookup(MasterKeysService.ICD10); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Center( + child: Column( + children: [ + BottomSheetTitle( + title: TranslationBase.of(context).addAssessmentDetails), + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 16, + ), + Container( + margin: EdgeInsets.only(left: 0, right: 0, top: 15), + child: AppTextFieldCustom( + // height: 55.0, + hintText: + TranslationBase.of(context).appointmentNumber, + isTextFieldHasSuffix: false, + enabled: false, + controller: appointmentIdController, + ), + ), + SizedBox( + height: 10, + ), + Container( + child: InkWell( + onTap: model.listOfICD10 != null + ? () { + setState(() { + widget.mySelectedAssessment + .selectedICD = null; + icdNameController.text = null; + }); + } + : null, + child: widget + .mySelectedAssessment.selectedICD == + null + ? CustomAutoCompleteTextField( + isShowError: isFormSubmitted && + widget.mySelectedAssessment + .selectedICD == + null, + child: AutoCompleteTextField< + MasterKeyModel>( + decoration: TextFieldsUtils + .textFieldSelectorDecoration( + TranslationBase.of(context) + .nameOrICD, + null, + true, + suffixIcon: Icons.search), + itemSubmitted: (item) => setState(() { + widget.mySelectedAssessment + .selectedICD = item; + icdNameController.text = + '${item.code.trim()}/${item.description}'; + }), + key: key, + suggestions: model.listOfICD10, + itemBuilder: (context, suggestion) => + new Padding( + child: AppText( + suggestion.description + + " / " + + suggestion.code + .toString()), + padding: EdgeInsets.all(8.0)), + itemSorter: (a, b) => 1, + itemFilter: (suggestion, input) => + suggestion.description + .toLowerCase() + .startsWith( + input.toLowerCase()) || + suggestion.description + .toLowerCase() + .startsWith( + input.toLowerCase()) || + suggestion.code + .toLowerCase() + .startsWith( + input.toLowerCase()), + ), + ) + : AppTextFieldCustom( + onClick: model.listOfICD10 != null + ? () { + setState(() { + widget.mySelectedAssessment + .selectedICD = null; + icdNameController.text = null; + }); + } + : null, + hintText: TranslationBase.of(context) + .nameOrICD, + maxLines: 2, + minLines: 1, + controller: icdNameController, + enabled: true, + isTextFieldHasSuffix: true, + suffixIcon: IconButton( + icon: Icon( + Icons.search, + color: Colors.grey.shade600, + )), + )), + ), + SizedBox( + height: 7, + ), + AppTextFieldCustom( + onClick: model.listOfDiagnosisCondition != null + ? () { + MasterKeyDailog dialog = MasterKeyDailog( + list: model.listOfDiagnosisCondition, + okText: TranslationBase.of(context).ok, + okFunction: + (MasterKeyModel selectedValue) { + setState(() { + widget.mySelectedAssessment + .selectedDiagnosisCondition = + selectedValue; + conditionController + .text = projectViewModel + .isArabic + ? widget + .mySelectedAssessment + .selectedDiagnosisCondition + .nameAr + : widget + .mySelectedAssessment + .selectedDiagnosisCondition + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: TranslationBase.of(context).condition, + maxLines: 2, + minLines: 1, + controller: conditionController, + isTextFieldHasSuffix: true, + enabled: false, + hasBorder: true, + validationError: isFormSubmitted && + widget.mySelectedAssessment + .selectedDiagnosisCondition == + null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + onClick: model.listOfDiagnosisType != null + ? () { + MasterKeyDailog dialog = MasterKeyDailog( + list: model.listOfDiagnosisType, + okText: TranslationBase.of(context).ok, + okFunction: + (MasterKeyModel selectedValue) { + setState(() { + widget.mySelectedAssessment + .selectedDiagnosisType = + selectedValue; + typeController.text = + projectViewModel.isArabic + ? selectedValue.nameAr + : selectedValue.nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: TranslationBase.of(context).dType, + maxLines: 2, + minLines: 1, + enabled: false, + isTextFieldHasSuffix: true, + controller: typeController, + hasBorder: true, + validationError: isFormSubmitted && + widget.mySelectedAssessment + .selectedDiagnosisType == + null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only(left: 0, right: 0, top: 15), + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).remarks, + maxLines: 18, + minLines: 5, + controller: remarkController, + onChanged: (value) { + widget.mySelectedAssessment.remark = + remarkController.text; + }, + ), + ), + SizedBox( + height: 10, + ), + ])), + ), + ], + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + fontWeight: FontWeight.w700, + color: Colors.green, + title: (widget.isUpdate + ? 'Update Assessment Details' + : 'Add Assessment Details'), + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + setState(() { + isFormSubmitted = true; + }); + widget.mySelectedAssessment.remark = + remarkController.text; + widget.mySelectedAssessment.appointmentId = + int.parse(appointmentIdController.text); + if (widget.mySelectedAssessment + .selectedDiagnosisCondition != + null && + widget.mySelectedAssessment + .selectedDiagnosisType != + null && + widget.mySelectedAssessment.selectedICD != null) { + await submitAssessment( + isUpdate: widget.isUpdate, + model: model, + mySelectedAssessment: + widget.mySelectedAssessment); + } + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + ), + ), + ), + ); + } + + submitAssessment( + {SOAPViewModel model, + MySelectedAssessment mySelectedAssessment, + bool isUpdate = false}) async { + if (isUpdate) { + PatchAssessmentReqModel patchAssessmentReqModel = PatchAssessmentReqModel( + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo, + appointmentNo: widget.patientInfo.appointmentNo, + remarks: mySelectedAssessment.remark, + complexDiagnosis: true, + conditionId: mySelectedAssessment.selectedDiagnosisCondition.id, + diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id, + icdcode10Id: mySelectedAssessment.selectedICD.code, + prevIcdCode10ID: mySelectedAssessment.icdCode10ID); + + await model.patchAssessment(patchAssessmentReqModel); + } else { + PostAssessmentRequestModel postAssessmentRequestModel = + new PostAssessmentRequestModel( + patientMRN: widget.patientInfo.patientMRN, + episodeId: widget.patientInfo.episodeNo, + appointmentNo: widget.patientInfo.appointmentNo, + icdCodeDetails: [ + new IcdCodeDetails( + remarks: mySelectedAssessment.remark, + complexDiagnosis: true, + conditionId: mySelectedAssessment.selectedDiagnosisCondition.id, + diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType.id, + icdcode10Id: mySelectedAssessment.selectedICD.code) + ]); + + await model.postAssessment(postAssessmentRequestModel); + } + + if (model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(model.error); + } else { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code; + mySelectedAssessment.doctorName = doctorProfile.doctorName; + + if (!isUpdate) { + widget.addSelectedAssessment(mySelectedAssessment, isUpdate); + } + Navigator.of(context).pop(); + } + } +} diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart new file mode 100644 index 00000000..bea229bb --- /dev/null +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -0,0 +1,543 @@ +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/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +import '../shared_soap_widgets/SOAP_open_items.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; +import 'add_assessment_details.dart'; + +// ignore: must_be_immutable +class UpdateAssessmentPage extends StatefulWidget { + final Function changePageViewIndex; + List mySelectedAssessmentList; + final PatiantInformtion patientInfo; + final Function changeLoadingState; + final int currentIndex; + UpdateAssessmentPage( + {Key key, + this.changePageViewIndex, + this.mySelectedAssessmentList, + this.patientInfo, + this.changeLoadingState, this.currentIndex}); + + @override + _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); +} + +class _UpdateAssessmentPageState extends State { + bool isAssessmentExpand = false; + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) async { + widget.mySelectedAssessmentList.clear(); + GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo.toString(), + editedBy: '', + doctorID: '', + appointmentNo: widget.patientInfo.appointmentNo); + await model.getPatientAssessment(getAssessmentReqModel); + if (model.patientAssessmentList.isNotEmpty) { + if (model.listOfDiagnosisCondition.length == 0) { + await model.getMasterLookup(MasterKeysService.DiagnosisCondition); + } + if (model.listOfDiagnosisType.length == 0) { + await model.getMasterLookup(MasterKeysService.DiagnosisType); + } + if (model.listOfICD10.length == 0) { + await model.getMasterLookup(MasterKeysService.ICD10); + } + model.patientAssessmentList.forEach((element) { + MasterKeyModel diagnosisType = model.getOneMasterKey( + masterKeys: MasterKeysService.DiagnosisType, + id: element.diagnosisTypeID, + ); + MasterKeyModel selectedICD = model.getOneMasterKey( + masterKeys: MasterKeysService.ICD10, + id: element.icdCode10ID, + ); + MasterKeyModel diagnosisCondition = model.getOneMasterKey( + masterKeys: MasterKeysService.DiagnosisCondition, + id: element.conditionID, + ); + if (diagnosisCondition != null && + diagnosisType != null && + diagnosisCondition != null) { + MySelectedAssessment temMySelectedAssessment = + MySelectedAssessment( + appointmentId: element.appointmentNo, + remark: element.remarks, + selectedDiagnosisType: diagnosisType, + selectedDiagnosisCondition: diagnosisCondition, + selectedICD: selectedICD, + doctorID: element.doctorID, + doctorName: element.doctorName, + createdBy: element.createdBy, + createdOn: element.createdOn, + icdCode10ID: element.icdCode10ID); + + widget.mySelectedAssessmentList.add(temMySelectedAssessment); + } + }); + } + + widget.changeLoadingState(false); + }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: false, + backgroundColor: Theme + .of(context) + .scaffoldBackgroundColor, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + + color: Theme + .of(context) + .scaffoldBackgroundColor, + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + + ExpandableSOAPWidget( + headerTitle: TranslationBase.of(context).assessment + , + onTap: () { + setState(() { + isAssessmentExpand = !isAssessmentExpand; + }); + }, + child: Column(children: [ + SizedBox( + height: 20, + ), + Column( + children: [ + + SOAPOpenItems(label: "${TranslationBase.of(context).addAssessment}",onTap: () { + openAssessmentDialog(context, + isUpdate: false, model: model); + },), + + SizedBox( + height: 20, + ), + Column( + children: widget.mySelectedAssessmentList + .map((assessment) { + return Container( + margin: EdgeInsets.only( + left: 5, right: 5, top: 15), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: "ICD : ".toUpperCase(), + ), + new TextSpan( + text: assessment + .selectedICD.code + .trim() + .toUpperCase() ?? + "", + ), + ], + ), + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.50, + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 16, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600), + children: [ + new TextSpan( + text: assessment + .selectedICD.description + .toString(), + ), + ], + ), + ), + ), + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .appointmentNo, + style: new TextStyle( + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: assessment + .appointmentId.toString() + + ?? + "", + style: new TextStyle( + fontSize: 14, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .condition + + " : ", + style: new TextStyle( + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisCondition + .nameAr + : assessment + .selectedDiagnosisCondition + .nameEn, + style: new TextStyle( + fontSize: 14, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .dType + + ' : ', + style: new TextStyle( + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisType + .nameAr + : assessment + .selectedDiagnosisType + .nameEn, + style: new TextStyle( + fontSize: 14, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + if (assessment.doctorName != null) + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .doc + + ' : ', + style: new TextStyle( + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: + assessment.doctorName ?? + '', + style: new TextStyle( + fontSize: 14, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + SizedBox( + height: 6, + ), + + Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 6, + ), + AppText( + (assessment.remark != null || + assessment.remark != + '') + ? TranslationBase.of( + context) + .remarks + + " : " + : '', + + fontSize: 12, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600 + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.38, + child: AppText( + assessment.remark ?? "", + fontSize: 11, + color: Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + Row( + children: [ + Column( + children: [ + AppText( + assessment.createdOn != null + ? DateUtils + .getDayMonthYearDateFormatted( + DateTime.parse( + assessment + .createdOn)) + : DateUtils + .getDayMonthYearDateFormatted( + DateTime.now()), + fontWeight: FontWeight + .w600, + fontSize: 14, + ), AppText( + assessment.createdOn != null + ? DateUtils.getHour( + DateTime.parse( + assessment + .createdOn)) + : DateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight + .w600, + fontSize: 14, + ), + ], + ), + ], + ), + SizedBox( + height: MediaQuery.of(context) + .size + .height * + 0.05, + ), + InkWell( + onTap: () { + openAssessmentDialog(context, + isUpdate: true, + assessment: assessment, + model: model); + }, + child: Icon( + DoctorApp.edit, size: 18,), + ) + ], + ), + ], + ), + ); + }).toList(), + ) + ], + ) + ]), + isExpanded: isAssessmentExpand, + ), + SizedBox( + height: 130, + ), + ], + ), + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0), + ), child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.4, + child: AppButton( + title: TranslationBase + .of(context) + .previous, + color: Colors.grey[300], + fontColor: Colors.black, + fontWeight: FontWeight.w600, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + widget.changePageViewIndex(1); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.05, + ), + Container( + width: MediaQuery.of(context).size.width * 0.4, + child: AppButton( + title: TranslationBase + .of(context) + .next, + fontWeight: FontWeight.w600, + color: Colors.red[700], + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + if (widget.mySelectedAssessmentList.isEmpty) { + Helpers.showErrorToast( + TranslationBase + .of(context) + .assessmentErrorMsg); + } else { + widget.changePageViewIndex(3); + widget.changeLoadingState(true); + } + }, + ), + ), + ], + ), + ), + ), + ), + ); + } + + openAssessmentDialog(BuildContext context, + {MySelectedAssessment assessment, bool isUpdate, SOAPViewModel model}) { + if (assessment == null) { + assessment = MySelectedAssessment( + remark: '', appointmentId: widget.patientInfo.appointmentNo); + } + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return AddAssessmentDetails( + mySelectedAssessment: assessment, + patientInfo: widget.patientInfo, + isUpdate: isUpdate, + mySelectedAssessmentList: widget.mySelectedAssessmentList, + addSelectedAssessment: (MySelectedAssessment mySelectedAssessment, + bool isUpdate) async { + setState(() { + widget.mySelectedAssessmentList.add(mySelectedAssessment); + }); + }); + }); + } +} + diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart new file mode 100644 index 00000000..c77e9a49 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart @@ -0,0 +1,147 @@ +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/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import 'examinations_list_search_widget.dart'; + +class AddExaminationPage extends StatefulWidget { + final List mySelectedExamination; + final Function addSelectedExamination; + final Function(MasterKeyModel) removeExamination; + + AddExaminationPage( + {this.mySelectedExamination, + this.addSelectedExamination, + this.removeExamination}); + + @override + _AddExaminationPageState createState() => _AddExaminationPageState(); +} + +class _AddExaminationPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async { + if (model.physicalExaminationList.length == 0) { + await model.getMasterLookup(MasterKeysService.PhysicalExamination); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + backgroundColor: Color.fromRGBO(248, 248, 248, 1), + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + padding: + EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16), + color: Colors.white, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: AppText( + "${TranslationBase.of(context).addExamination}", + fontSize: SizeConfig.textMultiplier * 3.3, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Icon( + Icons.clear, + size: 40, + ), + ) + ], + ), + ), + Expanded( + child: SingleChildScrollView( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(16.0), + padding: EdgeInsets.all(0.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(12), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), + ), + child: Column( + children: [ + ExaminationsListSearchWidget( + masterList: model.physicalExaminationList, + isServiceSelected: (master) => + isServiceSelected(master), + removeHistory: (history) { + setState(() { + widget.removeExamination(history); + }); + }, + addHistory: (selectedExamination) { + setState(() { + widget.mySelectedExamination + .add(selectedExamination); + }); + }, + ), + ], + ), + ), + ], + ), + ), + ), + Container( + padding: EdgeInsets.all(16), + color: Colors.white, + child: AppButton( + title:"${TranslationBase.of(context).addExamination}", + color: HexColor("#359846"), + fontColor: Colors.white, + vPadding: 12, + radius: 12, + fontWeight: FontWeight.w600, + fontSize: SizeConfig.textMultiplier * 2.5, + onPressed: () { + widget.addSelectedExamination(); + }, + ), + ) + ], + ), + ), + ); + } + + isServiceSelected(MasterKeyModel masterKey) { + Iterable exam = widget.mySelectedExamination.where( + (element) => + masterKey.id == element.selectedExamination.id && + masterKey.typeId == element.selectedExamination.typeId); + if (exam.length > 0) { + return true; + } + return false; + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart new file mode 100644 index 00000000..e990be79 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart @@ -0,0 +1,259 @@ +// ignore: must_be_immutable +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.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/expandable-widget-header-body.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +// ignore: must_be_immutable +class AddExaminationWidget extends StatefulWidget { + MasterKeyModel item; + final Function(MasterKeyModel) removeHistory; + final Function(MySelectedExamination) addHistory; + final bool Function(MasterKeyModel) isServiceSelected; + bool isExpand; + final Function expandClick; + + AddExaminationWidget({ + this.item, + this.removeHistory, + this.addHistory, + this.isServiceSelected, + this.isExpand, + this.expandClick, + }); + + @override + _AddExaminationWidgetState createState() => _AddExaminationWidgetState(); +} + +class _AddExaminationWidgetState extends State { + int status = 3; + TextEditingController remarksController = TextEditingController(); + MySelectedExamination examination = MySelectedExamination(); + + @override + void initState() { + examination.selectedExamination = widget.item; + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return Container( + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: CheckboxListTile( + title: AppText( + projectViewModel.isArabic + ? widget.item.nameAr != null && widget.item.nameAr != "" + ? widget.item.nameAr + : widget.item.nameEn + : widget.item.nameEn, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, + ), + value: widget.isServiceSelected(widget.item), + activeColor: HexColor("#D02127"), + onChanged: (newValue) { + setState(() { + if (widget.isServiceSelected(widget.item)) { + widget.removeHistory(widget.item); + widget.expandClick(); + } else { + examination.isNormal = status == 1; + examination.isAbnormal = status == 2; + examination.notExamined = status == 3; + examination.remark = remarksController.text; + widget.addHistory(examination); + widget.expandClick(); + } + }); + }, + controlAffinity: ListTileControlAffinity.leading, + contentPadding: EdgeInsets.all(0), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + child: InkWell( + onTap: widget.expandClick, + child: Icon(widget.isExpand + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down)), + ), + ], + ), + bodyWidget: Container( + padding: EdgeInsets.symmetric(horizontal: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 8), + child: AppText( + TranslationBase.of(context).status, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ), + Row( + children: [ + Expanded( + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + status = 1; + }); + examination.isNormal = true; + examination.isAbnormal = false; + examination.notExamined = false; + }, + child: Container( + padding: EdgeInsets.all(2.0), + margin: EdgeInsets.symmetric(horizontal: 6), + width: 20, + height: 20, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + border: Border.all(color: Colors.grey, width: 1), + ), + child: Container( + decoration: BoxDecoration( + color: status == 1 + ? HexColor("#D02127") + : Colors.white, + shape: BoxShape.circle, + ), + ), + ), + ), + AppText( + TranslationBase.of(context).normal, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ], + )), + Expanded( + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + status = 2; + }); + examination.isNormal = false; + examination.isAbnormal = true; + examination.notExamined = false; + }, + child: Container( + padding: EdgeInsets.all(2.0), + margin: EdgeInsets.symmetric(horizontal: 6), + width: 20, + height: 20, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + border: Border.all(color: Colors.grey, width: 1), + ), + child: Container( + decoration: BoxDecoration( + color: status == 2 + ? HexColor("#D02127") + : Colors.white, + shape: BoxShape.circle, + ), + ), + ), + ), + AppText( + TranslationBase.of(context).abnormal, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ], + )), + Expanded( + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + status = 3; + }); + examination.isNormal = false; + examination.isAbnormal = false; + examination.notExamined = true; + }, + child: Container( + padding: EdgeInsets.all(2.0), + margin: EdgeInsets.symmetric(horizontal: 6), + width: 20, + height: 20, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + border: Border.all(color: Colors.grey, width: 1), + ), + child: Container( + decoration: BoxDecoration( + color: status == 3 + ? HexColor("#D02127") + : Colors.white, + shape: BoxShape.circle, + ), + ), + ), + ), + Expanded( + child: AppText( + TranslationBase.of(context).notExamined, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ), + ], + )), + ], + ), + Container( + margin: EdgeInsets.only(top: 8), + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).remarks, + controller: remarksController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value) { + examination.remark = value; + }, + ), + ), + ], + ), + ), + isExpand: widget.isExpand, + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart new file mode 100644 index 00000000..d40faea5 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart @@ -0,0 +1,93 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ExaminationItemCard extends StatelessWidget { + final MySelectedExamination examination; + final Function removeExamination; + + ExaminationItemCard(this.examination, this.removeExamination); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return Container( + color: Colors.white, + padding: EdgeInsets.all(8), + margin: EdgeInsets.only(bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Container( + child: AppText( + projectViewModel.isArabic + ? examination.selectedExamination.nameAr != null && + examination.selectedExamination.nameAr != "" + ? examination.selectedExamination.nameAr + : examination.selectedExamination.nameEn + : examination.selectedExamination.nameEn, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + color: Color(0xFF2B353E), + fontSize: SizeConfig.textMultiplier * 1.8, + ), + )), + Row( + children: [ + AppText( + TranslationBase.of(context).remove, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + color: Colors.red.shade800, + fontSize: SizeConfig.textMultiplier * 1.8, + ), + InkWell( + onTap: removeExamination, + child: Icon( + Icons.clear, + size: 20, + color: Colors.red.shade800, + ), + ) + ], + ), + ], + ), + AppText( + !examination.isNormal + ? examination.isAbnormal + ? TranslationBase.of(context).abnormal + : TranslationBase.of(context).notExamined + : TranslationBase.of(context).normal, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + color: !examination.isNormal + ? examination.isAbnormal + ? Colors.red.shade800 + : Colors.grey.shade800 + : Colors.green.shade800, + fontSize: SizeConfig.textMultiplier * 1.8, + ), + SizedBox( + height: 4, + ), + AppText( + examination.remark, + fontWeight: FontWeight.normal, + fontFamily: 'Poppins', + color: Color(0xFF575757), + fontSize: SizeConfig.textMultiplier * 1.8, + ), + ], + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart new file mode 100644 index 00000000..36b65d4c --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart @@ -0,0 +1,116 @@ +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; + +import 'add_examination_widget.dart'; + +class ExaminationsListSearchWidget extends StatefulWidget { + final Function(MasterKeyModel) removeHistory; + final Function(MySelectedExamination) addHistory; + final bool Function(MasterKeyModel) isServiceSelected; + final List masterList; + + ExaminationsListSearchWidget( + {this.removeHistory, + this.addHistory, + this.isServiceSelected, + this.masterList}); + + @override + _ExaminationsListSearchWidgetState createState() => + _ExaminationsListSearchWidgetState(); +} + +class _ExaminationsListSearchWidgetState + extends State { + int expandedIndex = -1; + List items = List(); + TextEditingController filteredSearchController = TextEditingController(); + + @override + void initState() { + items.addAll(widget.masterList); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AppTextFieldCustom( + height: MediaQuery.of(context).size.height * 0.080, + hintText: TranslationBase.of(context).searchExamination, + isTextFieldHasSuffix: true, + hasBorder: false, + controller: filteredSearchController, + onChanged: (value) { + filterSearchResults(value); + }, + suffixIcon: IconButton( + icon: Icon( + Icons.search, + color: Colors.black, + )), + ), + DividerWithSpacesAround( + height: 2, + ), + ...items.mapIndexed((index, item) { + return AddExaminationWidget( + item: item, + addHistory: widget.addHistory, + removeHistory: widget.removeHistory, + isServiceSelected: widget.isServiceSelected, + isExpand: index == expandedIndex, + expandClick: () { + setState(() { + if (expandedIndex == index) { + expandedIndex = -1; + } else { + expandedIndex = index; + } + }); + }, + ); + }).toList(), + ], + ); + } + + void filterSearchResults(String query) { + List dummySearchList = List(); + dummySearchList.addAll(widget.masterList); + if (query.isNotEmpty) { + List dummyListData = List(); + dummySearchList.forEach((item) { + if (item.nameAr.toLowerCase().contains(query.toLowerCase()) || + item.nameEn.toLowerCase().contains(query.toLowerCase())) { + dummyListData.add(item); + } + }); + setState(() { + items.clear(); + items.addAll(dummyListData); + }); + return; + } else { + setState(() { + items.clear(); + items.addAll(widget.masterList); + }); + } + } +} + +extension FicListExtension on List { + /// Maps each element of the list. + /// The [map] function gets both the original [item] and its [index]. + Iterable mapIndexed(E Function(int index, T item) map) sync* { + for (var index = 0; index < length; index++) { + yield map(index, this[index]); + } + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart new file mode 100644 index 00000000..8fe66db1 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -0,0 +1,366 @@ +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/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../shared_soap_widgets/SOAP_open_items.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; +import 'add_examination_page.dart'; +import 'examination_item_card.dart'; + +class UpdateObjectivePage extends StatefulWidget { + final Function changePageViewIndex; + final Function changeLoadingState; + final int currentIndex; + final List mySelectedExamination; + final PatiantInformtion patientInfo; + + UpdateObjectivePage( + {Key key, + this.changePageViewIndex, + this.mySelectedExamination, + this.patientInfo, + this.changeLoadingState, this.currentIndex}); + + @override + _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); +} + +class _UpdateObjectivePageState extends State { + bool isSysExaminationExpand = false; + + 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: 0.5, + )), + ); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async { + widget.mySelectedExamination.clear(); + GetPhysicalExamReqModel getPhysicalExamReqModel = + GetPhysicalExamReqModel( + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo.toString(), + appointmentNo: widget.patientInfo.appointmentNo); + + await model.getPatientPhysicalExam(getPhysicalExamReqModel); + if (model.patientPhysicalExamList.isNotEmpty) { + if (model.physicalExaminationList.length == 0) { + await model + .getMasterLookup(MasterKeysService.PhysicalExamination); + } + model.patientPhysicalExamList.forEach((element) { + MasterKeyModel examMaster = model.getOneMasterKey( + masterKeys: MasterKeysService.PhysicalExamination, + id: element.examId, + ); + MySelectedExamination tempEam = MySelectedExamination( + selectedExamination: examMaster, + remark: element.remarks, + isNormal: element.isNormal, + createdBy: element.createdBy, + notExamined: element.notExamined, + isNew: element.isNew, + isAbnormal: element.isAbnormal); + widget.mySelectedExamination.add(tempEam); + }); + } + + widget.changeLoadingState(false); + }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SOAPStepHeader( + currentIndex: widget.currentIndex, + changePageViewIndex: widget.changePageViewIndex), + ExpandableSOAPWidget( + headerTitle: + TranslationBase.of(context).physicalSystemExamination, + onTap: () { + setState(() { + isSysExaminationExpand = !isSysExaminationExpand; + }); + }, + child: Column( + children: [ + SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () { + openExaminationList(context); + },), + Column( + children: + widget.mySelectedExamination.map((examination) { + return ExaminationItemCard(examination, () { + removeExamination( + examination.selectedExamination); + }); + }).toList(), + ) + ], + + ), + isExpanded: isSysExaminationExpand, + ), + SizedBox(height: MediaQuery + .of(context) + .size + .height * 0.12,) + ], + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0), + ), + height: MediaQuery + .of(context) + .size + .height * 0.1, + width: double.infinity, + child: FractionallySizedBox( + widthFactor: 0.9, + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width *0.4, + child: AppButton( + title: TranslationBase.of(context).previous, + color: Colors.grey[300], + fontColor: Colors.black, + fontWeight: FontWeight.w600, + onPressed: () { + widget.changePageViewIndex(0); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width *0.1, + ), + Container( + width: MediaQuery.of(context).size.width *0.4, + child: AppButton( + title: TranslationBase.of(context).next, + fontWeight: FontWeight.w600, + loading: model.state == ViewState.BusyLocal, + color: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 + ? Colors.red[700] + : HexColor("#A5A5A5"), + fontColor: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"), + disabled: widget.mySelectedExamination != null && + widget.mySelectedExamination.length > 0 + ? false + : true, + onPressed: () async { + await submitUpdateObjectivePage(model); + }, + ), + ), + ], + ), + ), + ), + ), + ); + } + + submitUpdateObjectivePage(SOAPViewModel model) async { + if (widget.mySelectedExamination.isNotEmpty) { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + PostPhysicalExamRequestModel postPhysicalExamRequestModel = + new PostPhysicalExamRequestModel(); + widget.mySelectedExamination.forEach((exam) { + if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == + null) + postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = + []; + + postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM + .add(ListHisProgNotePhysicalExaminationVM( + patientMRN: widget.patientInfo.patientMRN, + episodeId: widget.patientInfo.episodeNo, + appointmentNo: widget.patientInfo.appointmentNo, + remarks: exam.remark ?? '', + createdBy: exam.createdBy ?? doctorProfile.doctorID, + createdOn: DateTime.now().toIso8601String(), + editedBy: doctorProfile.doctorID, + editedOn: DateTime.now().toIso8601String(), + examId: exam.selectedExamination.id, + examType: exam.selectedExamination.typeId, + isAbnormal: exam.isAbnormal, + isNormal: exam.isNormal, + notExamined: exam.notExamined, + examinationType: exam.isNormal + ? 1 + : exam.isAbnormal + ? 2 + : 3, + examinationTypeName: exam.isNormal + ? "Normal" + : exam.isAbnormal + ? 'AbNormal' + : "Not Examined", + isNew: exam.isNew)); + }); + + if (model.patientPhysicalExamList.isEmpty) { + await model.postPhysicalExam(postPhysicalExamRequestModel); + } else { + await model.patchPhysicalExam(postPhysicalExamRequestModel); + } + + if (model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(model.error); + } else { + widget.changeLoadingState(true); + + widget.changePageViewIndex(2); + } + } else { + Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); + } + } + + removeExamination(MasterKeyModel masterKey) { + Iterable history = widget.mySelectedExamination + .where((element) => + masterKey.id == element.selectedExamination.id && + masterKey.typeId == element.selectedExamination.typeId); + + if (history.length > 0) + setState(() { + widget.mySelectedExamination.remove(history.first); + }); + } + + openExaminationList(BuildContext context) { + Navigator.push( + context, + FadePage( + page: AddExaminationPage( + mySelectedExamination: widget.mySelectedExamination, + addSelectedExamination: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + removeExamination: (masterKey) => removeExamination(masterKey)), + ), + ); + /*showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + context: context, + builder: (context) { + return AddExaminationDailog( + mySelectedExamination: widget.mySelectedExamination, + addSelectedExamination: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + removeExamination: (masterKey) => removeExamination(masterKey), + ); + });*/ + } +} + +class AddExaminationDailog extends StatefulWidget { + final List mySelectedExamination; + final Function addSelectedExamination; + final Function(MasterKeyModel) removeExamination; + + const AddExaminationDailog( + {Key key, + this.mySelectedExamination, + this.addSelectedExamination, + this.removeExamination}) + : super(key: key); + + @override + _AddExaminationDailogState createState() => _AddExaminationDailogState(); +} + +class _AddExaminationDailogState extends State { + @override + Widget build(BuildContext context) { + return FractionallySizedBox( + heightFactor: 0.7, + child: BaseView( + onModelReady: (model) async { + if (model.physicalExaminationList.length == 0) { + await model + .getMasterLookup(MasterKeysService.PhysicalExamination); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Center( + child: Container( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).physicalSystemExamination, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + SizedBox( + height: 16, + ), + ]), + ))), + )), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart new file mode 100644 index 00000000..55b86022 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -0,0 +1,354 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; + +class UpdatePlanPage extends StatefulWidget { + final Function changePageViewIndex; + final PatiantInformtion patientInfo; + final Function changeLoadingState; + + final int currentIndex; + GetPatientProgressNoteResModel patientProgressNote; + + UpdatePlanPage( + {Key key, + this.changePageViewIndex, + this.patientInfo, + this.changeLoadingState, + this.patientProgressNote, + this.currentIndex}); + + @override + _UpdatePlanPageState createState() => _UpdatePlanPageState(); +} + +class _UpdatePlanPageState extends State { + bool isAddProgress = true; + bool isProgressExpanded = true; + + TextEditingController progressNoteController = + TextEditingController(text: null); + + 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: 0.5, + )), + ); + } + + @override + void initState() { + super.initState(); + if(widget.patientProgressNote.planNote !=null ){ + setState(() { + isAddProgress = false; + }); + } + } + + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async { + GetGetProgressNoteReqModel getGetProgressNoteReqModel = + GetGetProgressNoteReqModel( + appointmentNo: widget.patientInfo.appointmentNo, + patientMRN: widget.patientInfo.patientMRN, + episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: ''); + await model.getPatientProgressNote(getGetProgressNoteReqModel); + + if (model.patientProgressNoteList.isNotEmpty) { + progressNoteController.text = Helpers + .parseHtmlString(model.patientProgressNoteList[0].planNote); + widget.patientProgressNote.planNote = progressNoteController.text; + widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName; + widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; + widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; + widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; + setState(() { + isAddProgress = false; + }); + } + widget.changeLoadingState(false); + }, + builder: (_, model, w) => AppScaffold( + backgroundColor: Theme + .of(context) + .scaffoldBackgroundColor, + isShowAppBar: false, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Center( + child: FractionallySizedBox( + widthFactor: 0.90, + child: Column( + children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + + SizedBox(height: 10,), + + ExpandableSOAPWidget( + headerTitle: TranslationBase.of(context).progressNote + , + onTap: () { + setState(() { + isProgressExpanded = !isProgressExpanded; + }); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if(isAddProgress) + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).progressNote, + controller: progressNoteController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value){ + widget.patientProgressNote.planNote = value; + }, + ), + ), + SizedBox( + height: 9, + ), + if ( widget.patientProgressNote.planNote != null&& !isAddProgress) + Container( + margin: + EdgeInsets.only(left: 5, right: 5, ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText('Appointment No: ',fontSize: 12,), + AppText(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,), + + ], + ), + AppText( + widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + fontWeight: FontWeight + .w600, + fontSize: 14, + ) + + ], + ), + Row( + + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText('Condition: ', + fontSize: 12,), + AppText( + widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600), + ], + ), + AppText( + widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ) + ], + ), + SizedBox(height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Expanded( + child: AppText( + progressNoteController.text, + fontSize: 10, + ), + ), + InkWell( + onTap: (){ + setState(() { + isAddProgress = true; + widget.changePageViewIndex(3,isChangeState:false); + }); + }, + child: Icon(DoctorApp.edit,size: 18,)) + ], + ), + ], + ), + ) + ], + ), + + ], + ), + isExpanded: isProgressExpanded, + ), + + ], + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0), + ), + width: double.maxFinite, + height: 90, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + margin: EdgeInsets.all(6), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: AppButton( + title: TranslationBase.of(context).previous, + color: Colors.grey[300], + fontColor: Colors.black, + fontWeight: FontWeight.w600, + onPressed: () async { + setState(() { + widget.changePageViewIndex(2); + }); + }, + ), + ), + SizedBox(width: 5,), + Expanded( + child: AppButton( + title: isAddProgress? TranslationBase.of(context).next: "Finish", + fontWeight: FontWeight.w600, + color: Colors.red[700], + loading: model.state == ViewState.BusyLocal, + disabled: progressNoteController.text.isEmpty, + onPressed: () async { + if (progressNoteController.text.isNotEmpty) { + if (isAddProgress) { + Map profile = + await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = + DoctorProfileModel.fromJson(profile); + setState(() { + widget.patientProgressNote.createdByName = + widget.patientProgressNote + .createdByName ?? + doctorProfile.doctorName; + widget.patientProgressNote.editedByName = + doctorProfile.doctorName; + widget.patientProgressNote.createdOn = + DateTime.now().toString(); + widget.patientProgressNote.planNote = + progressNoteController.text; + isAddProgress = !isAddProgress; + }); + submitPlan(model); + } else { + Navigator.of(context).pop(); + } + } else { + Helpers.showErrorToast(TranslationBase.of(context) + .progressNoteErrorMsg); + } + }, + ), + ), + ], + ), + + ], + ), + ), + ), + ), + ), + ); + } + + submitPlan(SOAPViewModel model) async { + if (progressNoteController.text.isNotEmpty) { + PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel( + patientMRN: widget.patientInfo.patientMRN, + episodeId: widget.patientInfo.episodeNo, + appointmentNo: widget.patientInfo.appointmentNo, + planNote: widget.patientProgressNote.planNote, doctorID: '', editedBy: ''); + + if(model.patientProgressNoteList.isEmpty){ + await model.postProgressNote(postProgressNoteRequestModel); + + }else { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + postProgressNoteRequestModel.editedBy =doctorProfile.doctorID; + await model.patchProgressNote(postProgressNoteRequestModel); + + } + + if (model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(model.error); + } else { + widget.changePageViewIndex(4,isChangeState:false); + } + } else { + Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); + } + } + + +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart new file mode 100644 index 00000000..31a501ce --- /dev/null +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart @@ -0,0 +1,61 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class SOAPOpenItems extends StatelessWidget { + final Function onTap; + final String label; + + const SOAPOpenItems({Key key, this.onTap, this.label}) : super(key: key); + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 8.0), + margin: EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "$label", + fontSize:15, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + AppText( + "${TranslationBase.of(context).searchHere}", + fontSize:13, + color: Colors.grey.shade700, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), + ); + } +} + + + diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart new file mode 100644 index 00000000..da1abd28 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart @@ -0,0 +1,45 @@ +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class SOAPStepHeader extends StatelessWidget { + const SOAPStepHeader({ + Key key, + this.currentIndex, this.changePageViewIndex, + }) : super(key: key); + + final int currentIndex; + final Function changePageViewIndex; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 15,), + AppText( + TranslationBase.of(context).createNew, + fontSize: 14, + fontWeight: FontWeight.w500, + ), + AppText(TranslationBase.of(context).episode, + fontSize: 26, + fontWeight: FontWeight.bold, + ), + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: StepsWidget( + index: currentIndex, + changeCurrentTab: changePageViewIndex, + height: 100, + ), + ), + SizedBox( + height: 30, + ), + ], + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart new file mode 100644 index 00000000..8f5ecf93 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart @@ -0,0 +1,60 @@ +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:flutter/material.dart'; + +class BottomSheetTitle extends StatelessWidget { + const BottomSheetTitle({ + Key key, this.title, + }) : super(key: key); + + final String title; + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only( + left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + height: 115, + child: Container( + padding: EdgeInsets.only( + left: 10, right: 10), + margin: EdgeInsets.only(top: 60), + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + fontSize:20, + color: Colors.black), + children: [ + new TextSpan( + + text: title, + style: TextStyle( + color: Color(0xFF2B353E), + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 22)), + ], + ), + ), + InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Icon(DoctorApp.close_1, + size:20, + color: Color(0xFF2B353E))) + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart new file mode 100644 index 00000000..d4666428 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart @@ -0,0 +1,67 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class ExpandableSOAPWidget extends StatelessWidget { + final bool isExpanded; + final Widget child; + final Function onTap; + final headerTitle; + final bool isRequired; + + const ExpandableSOAPWidget( + {Key key, this.isExpanded, this.child, this.onTap, this.headerTitle, this.isRequired= true}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0.30), + ), + child: HeaderBodyExpandableNotifier( + headerWidget: InkWell( + onTap: onTap, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: onTap, + child: Row( + children: [ + AppText(headerTitle, + variant: isExpanded ? "bodyText" : '', + fontSize: 15, + color: Colors.black), + if(isRequired) + Icon( + FontAwesomeIcons.asterisk, + size: 12, + ) + ], + ), + ), + InkWell( + onTap: onTap, + child: Icon( + isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline), + ) + ], + ), + ), + bodyWidget: child, + isExpand: isExpanded, + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart new file mode 100644 index 00000000..059674a8 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart @@ -0,0 +1,538 @@ +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +class StepsWidget extends StatelessWidget { + final int index; + final Function changeCurrentTab; + final double height; + + StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return !projectViewModel.isArabic + ? Stack( + children: [ + Container( + height: height == 0 ? 150 : height, + width: MediaQuery.of(context).size.width * 0.9, + color: Colors.transparent, + ), + Positioned( + top: 30 + , + child: Center( + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + )), + Positioned( + top: 10, + left: 0, + child: InkWell( + onTap: () => changeCurrentTab(0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 0 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 0 + ? null + : Border.all( + color: Colors.black, width: 0.75), + shape: BoxShape.circle, + color: index == 0 + ? Color(0xFFCC9B14) + : index > 0 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox(height: 5), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + "Subjective", + fontWeight: FontWeight.bold, + fontSize: 12, + ), + StatusLabel( + selectedStepId: index, + stepId: 0, + ), + ], + ), + ], + ), + ), + ), + Positioned( + top: 10, + left: MediaQuery + .of(context) + .size + .width * 0.25, + child: InkWell( + onTap: () => index >= 1 ? changeCurrentTab(1) : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 1 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 2 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 1 + ? Color(0xFFCC9B14) + : index > 1 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox( + height: 5, + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + "Objective", + fontWeight: FontWeight.bold, + fontSize: 12, + ), + StatusLabel( + selectedStepId: index, + stepId: 1, + ), + ], + ), + ], + ), + ), + ), + Positioned( + top: 10, + left: MediaQuery + .of(context) + .size + .width * 0.50, + child: InkWell( + onTap: () { + if (index >= 3) changeCurrentTab(2); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 2 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 2 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 2 + ? Color(0xFFCC9B14) + : index > 2 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox( + height: 5, + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + "Assessment", + fontWeight: FontWeight.bold, + fontSize: 12, + ), + StatusLabel( + selectedStepId: index, + stepId: 2, + ), + ], + ), + ], + ), + ), + ), + Positioned( + top: 10, + right: 0, + child: InkWell( + onTap: () => index >= 3 ? changeCurrentTab(4) : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 3 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 3 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 3 + ? Color(0xFFCC9B14) + : index > 3 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox( + height: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + AppText( + "Plan", + fontWeight: FontWeight.bold, + fontSize: 12, + ), + StatusLabel( + selectedStepId: index, + stepId: 3, + ), + ], + ), + ], + ), + ), + ), + ], + ) + : Stack( + children: [ + Container( + height: height == 0 ? 150 : height, + width: MediaQuery.of(context).size.width, + color: Colors.transparent, + child: Center( + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + ), + Positioned( + top: 10, + right: 0, + child: InkWell( + onTap: () => changeCurrentTab(0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 0 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 0 + ? null + : Border.all( + color: Colors.black, width: 0.75), + shape: BoxShape.circle, + color: index == 0 + ? Color(0xFFCC9B14) + : index > 0 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox(height: 5), + Column( + children: [ + AppText( + "شخصي", + fontWeight: FontWeight.bold, + fontSize: 16, + ), + StatusLabel( + selectedStepId: index, + stepId: 0, + ), + ], + ), + ], + ), + ), + ), + Positioned( + top: 10, + right: MediaQuery + .of(context) + .size + .width * 0.28, + child: InkWell( + onTap: () => index >= 2 ? changeCurrentTab(1) : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 1 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 2 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 1 + ? Color(0xFFCC9B14) + : index > 1 + ? Color(0xFF359846) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox(height: 5), + Column( + children: [ + AppText( + "هدف", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 1, + ), + ], + ), + ], + ), + ), + ), + Positioned( + top: 10, + right: MediaQuery + .of(context) + .size + .width * 0.52, + child: InkWell( + onTap: () => index >= 3 ? changeCurrentTab(2) : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 2 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 2 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 2 + ? Color(0xFFCC9B14) + : index > 2 + ? Color(0xFFCC9B14) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.only(right: 2), + child: Column( + children: [ + AppText( + "تقدير", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 2, + ), + ], + ), + ), + ], + ), + ), + ), + Positioned( + top: 10, + left: 0, + child: InkWell( + onTap: () => index >= 3 ? changeCurrentTab(4) : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + width: 38, + height: 38, + decoration: BoxDecoration( + border: index == 3 + ? Border.all(color: Color(0xFFCC9B14), width: 2) + : index > 3 + ? null + : Border.all( + color: Color(0xFFCCCCCC), width: 0.75), + shape: BoxShape.circle, + color: index == 3 + ? Color(0xFFCC9B14) + : index > 3 + ? Color(0xFFCC9B14) + : Color(0xFFCCCCCC), + ), + child: Center( + child: Icon( + FontAwesomeIcons.check, + size: 20, + color: Colors.white, + )), + ), + SizedBox( + height: 5, + ), + Container( + margin: EdgeInsets.only(right: index == 3 ? 15 : 0), + child: Column( + children: [ + AppText( + "خطة", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + StatusLabel( + selectedStepId: index, + stepId: 3, + ), + ], + ), + ), + ], + ), + ), + ), + ], + ); + } +} + +class StatusLabel extends StatelessWidget { + const StatusLabel({ + Key key, + this.stepId, + this.selectedStepId, + }) : super(key: key); + + final int stepId; + final int selectedStepId; + + @override + Widget build(BuildContext context) { + return Container( + width: 65, + padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3), + decoration: BoxDecoration( + color: stepId == selectedStepId + ? Color(0xFFF1E9D3) + : stepId < selectedStepId + ? Color(0xFFD8E8DB) + : Color(0xFFCCCCCC), + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0.30), + ), + child: AppText( + stepId == selectedStepId + ? "inProgress" + : stepId < selectedStepId + ? "Completed" + : " Locked ", + fontWeight: FontWeight.bold, + textAlign: TextAlign.center, + fontSize: 10, + color: stepId == selectedStepId + ? Color(0xFFCC9B14) + : stepId < selectedStepId + ? Color(0xFF359846) + : Color(0xFF969696), + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart new file mode 100644 index 00000000..fc7329e5 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -0,0 +1,235 @@ +import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.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/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../shared_soap_widgets/bottom_sheet_title.dart'; + +class AddAllergies extends StatefulWidget { + final Function addAllergiesFun; + final List myAllergiesList; + + const AddAllergies({Key key, this.addAllergiesFun, this.myAllergiesList}) + : super(key: key); + + @override + _AddAllergiesState createState() => _AddAllergiesState(); +} + +class _AddAllergiesState extends State { + List allergiesList; + List allergySeverityList; + TextEditingController remarkController = TextEditingController(); + TextEditingController severityController = TextEditingController(); + TextEditingController allergyController = TextEditingController(); + List myAllergiesListLocal; + + @override + initState() { + super.initState(); + myAllergiesListLocal = [...widget.myAllergiesList]; + } + + GlobalKey key = new GlobalKey>(); + bool isFormSubmitted = false; + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {IconData icon}) { + return InputDecoration( + contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey, width: 1.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey, width: 1.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey, width: 1.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, + hintStyle: TextStyle( + fontSize: 10, + color: Theme.of(context).hintColor, + fontWeight: FontWeight.w700), + ); + } + + @override + Widget build(BuildContext context) { + return FractionallySizedBox( + heightFactor: 1, + child: BaseView( + onModelReady: (model) async { + if (model.allergiesList.length == 0) { + await model.getMasterLookup(MasterKeysService.Allergies); + } + if (model.allergySeverityList.length == 0) { + await model.getMasterLookup(MasterKeysService.AllergySeverity); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Center( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: TranslationBase.of(context).addAllergies, + ), + SizedBox( + height: 10, + ), + SizedBox( + height: 16, + ), + Expanded( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Center( + child: NetworkBaseView( + baseViewModel: model, + child: MasterKeyCheckboxSearchAllergiesWidget( + model: model, + masterList: model.allergiesList, + removeAllergy: (master) { + setState(() { + removeAllergyFromLocalList(master); + }); + }, + addAllergy: + (MySelectedAllergy mySelectedAllergy) { + addAllergyLocally(mySelectedAllergy); + }, + addSelectedAllergy: () => widget + .addAllergiesFun(myAllergiesListLocal), + isServiceSelected: (master) => + isServiceSelected(master), + getServiceSelectedAllergy: (master) => + getSelectedAllergy(master), + ), + ), + ), + ), + ), + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.11, + ), + ]), + ), + ),bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: + TranslationBase.of(context).addAllergies, + padding: 10, + color: Color(0xFF359846), + onPressed: () { + widget.addAllergiesFun(myAllergiesListLocal); + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + ),), + ), + ); + } + + isServiceSelected(MasterKeyModel masterKey) { + Iterable allergy = myAllergiesListLocal.where( + (element) => + masterKey.id == element.selectedAllergy.id && + masterKey.typeId == element.selectedAllergy.typeId && + element.isChecked); + if (allergy.length > 0) { + return true; + } + return false; + } + + removeAllergyFromLocalList(MasterKeyModel masterKey) { + myAllergiesListLocal + .removeWhere((element) => element.selectedAllergy.id == masterKey.id); + } + + MySelectedAllergy getSelectedAllergy(MasterKeyModel masterKey) { + Iterable allergy = myAllergiesListLocal.where( + (element) => + masterKey.id == element.selectedAllergy.id && + masterKey.typeId == element.selectedAllergy.typeId && + element.isChecked); + if (allergy.length > 0) { + return allergy.first; + } + return null; + } + + addAllergyLocally(MySelectedAllergy mySelectedAllergy) { + if (mySelectedAllergy.selectedAllergy == null) { + Helpers.showErrorToast(TranslationBase + .of(context) + .requiredMsg); + } else { + setState(() { + List allergy = + // ignore: missing_return + myAllergiesListLocal + .where((element) => + mySelectedAllergy.selectedAllergy.id == + element.selectedAllergy.id) + .toList(); + + if (allergy.isEmpty) { + myAllergiesListLocal.add(mySelectedAllergy); + } else { + allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy; + allergy.first.selectedAllergySeverity = + mySelectedAllergy.selectedAllergySeverity; + allergy.first.remark = mySelectedAllergy.remark; + allergy.first.isChecked = mySelectedAllergy.isChecked; + } + }); + } + } +} diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart new file mode 100644 index 00000000..6f7439e6 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -0,0 +1,204 @@ +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.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/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +import '../../shared_soap_widgets/SOAP_open_items.dart'; +import 'add_allergies.dart'; + +// ignore: must_be_immutable +class UpdateAllergiesWidget extends StatefulWidget { + List myAllergiesList; + + UpdateAllergiesWidget({Key key, this.myAllergiesList}); + + @override + _UpdateAllergiesWidgetState createState() => _UpdateAllergiesWidgetState(); +} + +class _UpdateAllergiesWidgetState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + changeAllState() { + setState(() { + + }); + } + + return Column( + children: [ + + + SOAPOpenItems(label: "${TranslationBase.of(context).addAllergies}",onTap: () { + openAllergiesList(context, changeAllState); + },), + SizedBox( + height: 20, + ), + Container( + margin: + EdgeInsets.only(left: 15, right: 15, top: 15), + child: Column( + children: widget.myAllergiesList.map((selectedAllergy) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + projectViewModel.isArabic + ? selectedAllergy.selectedAllergy.nameAr + : selectedAllergy.selectedAllergy.nameEn + .toUpperCase(), + textDecoration: selectedAllergy.isChecked + ? null + : TextDecoration.lineThrough, + bold: true, + color: Color(0xFF2B353E)), + AppText( + projectViewModel.isArabic + ? selectedAllergy.selectedAllergySeverity + .nameAr + : selectedAllergy.selectedAllergySeverity + .nameEn + .toUpperCase(), + textDecoration: selectedAllergy.isChecked + ? null + : TextDecoration.lineThrough, + color: Color(0xFFCC9B14)), + ], + ), + width: MediaQuery + .of(context) + .size + .width * 0.5, + ), + + if (selectedAllergy.isChecked) + InkWell( + child: Row( + children: [Container( + child: AppText( + TranslationBase + .of(context) + .remove, + fontSize: 15, + variant: "bodyText", + color: HexColor("#B8382C"),), + ), + Icon( + FontAwesomeIcons.times, + color: HexColor("#B8382C"), + size: 20, + ), + ], + ), + onTap: () => removeAllergy(selectedAllergy), + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.55, + child: AppText( + selectedAllergy.remark ?? '', + fontSize: 10, + color: Colors.grey, + ), + ), + ], + ), + ), + DividerWithSpacesAround() + ], + ), + SizedBox( + height: 10, + ), + ], + ); + }).toList()), + ) + ], + ); + } + + removeAllergy(MySelectedAllergy mySelectedAllergy) { + List allergy = + // ignore: missing_return + widget.myAllergiesList.where((element) => + mySelectedAllergy.selectedAllergySeverity.id == + element.selectedAllergySeverity.id && + mySelectedAllergy.selectedAllergy.id == element.selectedAllergy.id + ).toList(); + + if (allergy.length > 0) { + setState(() { + allergy[0].isChecked = false; + }); + } + + + print(allergy); + } + + openAllergiesList(BuildContext context, Function changeParentState) { + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + isDismissible: false, + context: context, + builder: (context) { + return AddAllergies( + myAllergiesList: widget.myAllergiesList, + addAllergiesFun: (List mySelectedAllergy) { + bool isAllDataFilled = true; + mySelectedAllergy.forEach((element) { + if (element.selectedAllergySeverity == null) { + isAllDataFilled = false; + } + }); + if (isAllDataFilled) { + mySelectedAllergy.forEach((element) { + if (!widget.myAllergiesList.contains(element.selectedAllergySeverity.id)) { + widget.myAllergiesList.add(element); + } + }); + changeParentState(); + Navigator.of(context).pop(); + } else { + Helpers.showErrorToast(TranslationBase + .of(context) + .requiredMsg); + } + }); + }); + } + +} + + + + + + diff --git a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart new file mode 100644 index 00000000..10f9c2a6 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -0,0 +1,86 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../medication/update_medication_widget.dart'; + +class UpdateChiefComplaints extends StatelessWidget { + const UpdateChiefComplaints({ + Key key, + @required this.formKey, + @required this.complaintsController, + @required this.illnessController, + @required this.medicationController, + this.complaintsControllerError, + this.illnessControllerError, + this.medicationControllerError, + }) : super(key: key); + + final GlobalKey formKey; + final TextEditingController complaintsController; + final TextEditingController illnessController; + final TextEditingController medicationController; + final String complaintsControllerError; + final String illnessControllerError; + final String medicationControllerError; + + @override + Widget build(BuildContext context) { + return Form( + key: formKey, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + SizedBox( + height: 20, + ), + //TODO handel error cases + AppTextFieldCustom( + hintText: TranslationBase.of(context).addChiefComplaints, + controller: complaintsController, + maxLines: 25, + minLines: 7, + hasBorder: true, + validationError:complaintsController.text.isEmpty && complaintsControllerError !=''?complaintsControllerError:null , + + ), + SizedBox( + height: 20, + ), + + AppTextFieldCustom( + hintText: TranslationBase + .of(context) + .historyOfPresentIllness, + controller: illnessController, + maxLines: 25, + minLines: 7, + hasBorder: true, + validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null , + ), + SizedBox( + height: 10, + ), + UpdateMedicationWidget( + medicationController: medicationController, + ), + SizedBox( + height: 10, + ), + AppTextFieldCustom( + hintText: TranslationBase + .of(context) + .currentMedications, + controller: medicationController, + maxLines: 25, + minLines: 7, + hasBorder: true, + validationError:medicationController.text.isEmpty && medicationControllerError !=''?medicationControllerError:null , + + ), + SizedBox( + height: 10, + ), + ]), + ); + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart new file mode 100644 index 00000000..1da8db17 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart @@ -0,0 +1,234 @@ +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../shared_soap_widgets/bottom_sheet_title.dart'; +import 'priority_bar.dart'; + +class AddHistoryDialog extends StatefulWidget { + final Function changePageViewIndex; + final PageController controller; + final List myHistoryList; + final Function addSelectedHistories; + final Function (MasterKeyModel) removeHistory; + + const AddHistoryDialog( + {Key key, this.changePageViewIndex, this.controller, this.myHistoryList, this.addSelectedHistories, this.removeHistory}) + : super(key: key); + + @override + _AddHistoryDialogState createState() => _AddHistoryDialogState(); +} + +class _AddHistoryDialogState extends State { + @override + Widget build(BuildContext context) { + return FractionallySizedBox( + heightFactor: 1, + child: BaseView( + onModelReady: (model) async { + if (model.historyFamilyList.length == 0) { + await model.getMasterLookup(MasterKeysService.HistoryFamily); + } + + if (model.historySurgicalList.length == 0) { + await model.getMasterLookup(MasterKeysService.HistorySurgical); + await model.getMasterLookup(MasterKeysService.HistorySports); + } + + if (model.historyMedicalList.length == 0) { + await model.getMasterLookup(MasterKeysService.HistoryMedical); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Center( + child: Container( + child: Column( + children: [ + BottomSheetTitle(title:TranslationBase.of(context).addHistory), + SizedBox( + height: 10, + ), + PriorityBar(onTap: (activePriority) async { + widget.changePageViewIndex(activePriority); + }), + SizedBox( + height: 20, + ), + Expanded( + child: FractionallySizedBox( + widthFactor: 0.9, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: widget.controller, + onPageChanged: (index) { + setState(() { + }); + }, + scrollDirection: Axis.horizontal, + children: [ + NetworkBaseView( + baseViewModel: model, + child: MasterKeyCheckboxSearchWidget( + model: model, + masterList: model.historyFamilyList, + removeHistory: (history){ + setState(() { + widget.removeHistory(history); + }); + }, + addHistory: (history){ + setState(() { + createAndAddHistory( + history); + }); + }, + addSelectedHistories: (){ + widget.addSelectedHistories(); + }, + isServiceSelected: (master) =>isServiceSelected(master), + ), + ), + NetworkBaseView( + baseViewModel: model, + child: MasterKeyCheckboxSearchWidget( + model: model, + masterList: model.mergeHistorySurgicalWithHistorySportList, + removeHistory: (history){ + setState(() { + widget.removeHistory(history); + }); + }, + addHistory: (history){ + setState(() { + createAndAddHistory( + history); + }); + }, + addSelectedHistories: (){ + widget.addSelectedHistories(); + }, + isServiceSelected: (master) =>isServiceSelected(master), + ), + ), + NetworkBaseView( + baseViewModel: model, + child: MasterKeyCheckboxSearchWidget( + model: model, + masterList: model.historyMedicalList, + removeHistory: (history){ + setState(() { + widget.removeHistory(history); + }); + }, + addHistory: (history){ + setState(() { + createAndAddHistory( + history); + }); + }, + addSelectedHistories: (){ + widget.addSelectedHistories(); + }, + isServiceSelected: (master) => + isServiceSelected(master), + ), + ), + ], + ), + ), + ), + SizedBox(height:MediaQuery.of(context).size.height * 0.11 ,) + ], + ) + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: + TranslationBase.of(context).addSelectedHistories, + padding: 10, + color: Color(0xFF359846), + onPressed: () { + widget.addSelectedHistories(); + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + ), + ), + )); + } + + createAndAddHistory(MasterKeyModel history) { + List myhistory = widget.myHistoryList.where((element) => + history.id == + element.selectedHistory.id && + history.typeId == + element.selectedHistory.typeId + ).toList(); + + if (myhistory.isEmpty) { + setState(() { + MySelectedHistory mySelectedHistory = MySelectedHistory( + remark: history.remarks ?? "", + selectedHistory: history, + isChecked: true); + widget.myHistoryList.add(mySelectedHistory); + }); + } else { + myhistory.first.isChecked = true; + } + } + + isServiceSelected(MasterKeyModel masterKey) { + Iterable history = + widget + .myHistoryList + .where((element) => + masterKey.id == element.selectedHistory.id && + masterKey.typeId == element.selectedHistory.typeId && + element.isChecked); + if (history.length > 0) { + return true; + } + return false; + } + +} + diff --git a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart new file mode 100644 index 00000000..ac6ec2c5 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart @@ -0,0 +1,95 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +class PriorityBar extends StatefulWidget { + final Function onTap; + + const PriorityBar({Key key, this.onTap}) : super(key: key); + + @override + _PriorityBarState createState() => _PriorityBarState(); +} + +class _PriorityBarState extends State { + int _activePriority = 0; + int index = -1; + List _priorities = [ + "Family", + "Surgical/Sports", + "Medical", + ]; + List _prioritiesAr = [ + "أسرة", + "جراحي / رياضي", + "طبي", + ]; + + BoxDecoration containerBorderDecoration( + Color containerColor, Color borderColor) { + return BoxDecoration(); + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + ProjectViewModel projectViewModel = Provider.of(context); + + return Container( + height: screenSize.height * 0.080, + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _priorities.map(( + item, + ) { + bool _isActive = _priorities[_activePriority] == item ? true : false; + if (index < 2) { + index++; + } + return Expanded( + child: InkWell( + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: screenSize.height * 0.070, + decoration: containerBorderDecoration( + _isActive ? HexColor("#B8382B") : Colors.white, + _isActive ? HexColor("#B8382B") : Colors.white), + child: Center( + child: Text( + (projectViewModel.isArabic) + ? _prioritiesAr[index] + : item, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14, + + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + if(_isActive) + Container(width: 120,height: 4,color: AppGlobal.appPrimaryColor,) + ], + ), + ), + onTap: () { + widget.onTap(_priorities.indexOf(item)); + + setState(() { + _activePriority = _priorities.indexOf(item); + }); + }), + ); + }).toList(), + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart new file mode 100644 index 00000000..f114702d --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart @@ -0,0 +1,158 @@ +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +import '../../shared_soap_widgets/SOAP_open_items.dart'; +import 'add_history_dialog.dart'; + +class UpdateHistoryWidget extends StatefulWidget { + final List myHistoryList; + + const UpdateHistoryWidget({Key key, this.myHistoryList}) : super(key: key); + + @override + _UpdateHistoryWidgetState createState() => _UpdateHistoryWidgetState(); +} + +class _UpdateHistoryWidgetState extends State + with TickerProviderStateMixin { + PageController _controller; + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + } + + @override + void initState() { + _controller = new PageController(); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Column( + children: [ + + SOAPOpenItems(label: "${TranslationBase.of(context).addHistory}",onTap: () { + openHistoryList(context); + + },), + SizedBox( + height: 20, + ), + Container( + margin: + EdgeInsets.only(left: 15, right: 15, top: 15), + child: Column( + children: widget.myHistoryList.map((myHistory) { + return Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + child: AppText( + projectViewModel.isArabic + ? myHistory.selectedHistory.nameAr + : myHistory.selectedHistory.nameEn, + fontSize: 15, + textDecoration: myHistory.isChecked + ? null + : TextDecoration.lineThrough, + color: Colors.black), + width: MediaQuery + .of(context) + .size + .width * 0.5, + ), + if (myHistory.isChecked) + InkWell( + child: Row( + children: [ + Container( + child: AppText( + TranslationBase + .of(context) + .remove, + fontSize: 15, + variant: "bodyText", + textDecoration: myHistory.isChecked + ? null + : TextDecoration.lineThrough, + color: HexColor("#B8382C"),), + ), + Icon( + FontAwesomeIcons.times, + color: HexColor("#B8382C"), + size: 17, + ), + ], + ), + onTap: () => removeHistory(myHistory.selectedHistory), + ) + ], + ), + SizedBox( + height: 20, + ), + ], + ); + }).toList(), + ), + ) + ], + ); + } + + removeHistory(MasterKeyModel historyKey) { + List history = + // ignore: missing_return + widget.myHistoryList.where((element) => + historyKey.id == + element.selectedHistory.id && + historyKey.typeId == + element.selectedHistory.typeId + ).toList(); + + + if (history.length > 0) + setState(() { + history[0].isChecked = false; + }); + } + + openHistoryList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isDismissible: false, + isScrollControlled: true, + context: context, + builder: (context) { + return FractionallySizedBox( + heightFactor: 1, + child: AddHistoryDialog( + changePageViewIndex: changePageViewIndex, + controller: _controller, + myHistoryList: widget.myHistoryList, + addSelectedHistories: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + removeHistory: (masterKey) => removeHistory(masterKey), + ), + ); + }); + } +} + + + diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart new file mode 100644 index 00000000..667bbb4b --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -0,0 +1,437 @@ +// ignore: must_be_immutable +import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; +import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +import '../../shared_soap_widgets/bottom_sheet_title.dart'; + +// ignore: must_be_immutable +class AddMedication extends StatefulWidget { + final Function addMedicationFun; + TextEditingController medicationController; + + AddMedication({Key key, this.addMedicationFun, this.medicationController}) + : super(key: key); + + @override + _AddMedicationState createState() => _AddMedicationState(); +} + +class _AddMedicationState extends State { + MasterKeyModel _selectedMedicationDose; + MasterKeyModel _selectedMedicationStrength; + MasterKeyModel _selectedMedicationRoute; + MasterKeyModel _selectedMedicationFrequency; + + TextEditingController doseController = TextEditingController(); + TextEditingController strengthController = TextEditingController(); + TextEditingController routeController = TextEditingController(); + TextEditingController frequencyController = TextEditingController(); + GetMedicationResponseModel _selectedMedication; + + GlobalKey key = + new GlobalKey>(); + bool isFormSubmitted = false; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + final screenSize = MediaQuery.of(context).size; + return FractionallySizedBox( + child: BaseView( + onModelReady: (model) async { + if (model.medicationStrengthList.length == 0) { + await model.getMasterLookup( + MasterKeysService.MedicationStrength, + ); + } + if (model.medicationFrequencyList.length == 0) { + await model.getMasterLookup(MasterKeysService.MedicationFrequency); + } + if (model.medicationDoseTimeList.length == 0) { + await model.getMasterLookup(MasterKeysService.MedicationDoseTime); + } + if (model.medicationRouteList.length == 0) { + await model.getMasterLookup(MasterKeysService.MedicationRoute); + } + if (model.allMedicationList.length == 0) + await model.getMedicationList(); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + body: Center( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: TranslationBase.of(context).addMedication, + ), + SizedBox( + height: 10, + ), + SizedBox( + height: 16, + ), + Expanded( + child: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + SizedBox( + height: 16, + ), + SizedBox( + height: 16, + ), + Container( + // height: screenSize.height * 0.070, + child: InkWell( + onTap: model.allMedicationList != null + ? () { + setState(() { + _selectedMedication = null; + }); + } + : null, + child: _selectedMedication == null + ? CustomAutoCompleteTextField( + isShowError: isFormSubmitted && + _selectedMedication == null, + child: AutoCompleteTextField< + GetMedicationResponseModel>( + decoration: TextFieldsUtils + .textFieldSelectorDecoration( + TranslationBase.of( + context) + .searchMedicineNameHere, + null, + true, + suffixIcon: Icons.search), + itemSubmitted: (item) => setState( + () => _selectedMedication = + item), + key: key, + suggestions: + model.allMedicationList, + itemBuilder: (context, + suggestion) => + new Padding( + child: AppText(suggestion + .description + + '/' + + suggestion + .genericName), + padding: + EdgeInsets.all(8.0)), + itemSorter: (a, b) => 1, + itemFilter: (suggestion, input) => + suggestion.genericName.toLowerCase().startsWith( + input.toLowerCase()) || + suggestion.description + .toLowerCase() + .startsWith(input + .toLowerCase()) || + suggestion.keywords + .toLowerCase() + .startsWith( + input.toLowerCase()), + ), + ) + : AppTextFieldCustom( + hintText: _selectedMedication != + null + ? _selectedMedication + .description + + (' (${_selectedMedication.genericName} )') + : TranslationBase.of(context) + .searchMedicineNameHere, + minLines: 2, + maxLines: 2, + isTextFieldHasSuffix: true, + suffixIcon: IconButton( + icon: Icon( + Icons.search, + color: Colors.grey.shade600, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: 5, + ), + AppTextFieldCustom( + enabled: false, + onClick: model.medicationDoseTimeList != null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: model.medicationDoseTimeList, + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedMedicationDose = + selectedValue; + + doseController + .text = projectViewModel + .isArabic + ? _selectedMedicationDose + .nameAr + : _selectedMedicationDose + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: + TranslationBase.of(context).doseTime, + maxLines: 2, + minLines: 2, + isTextFieldHasSuffix: true, + controller: doseController, + validationError: isFormSubmitted && + _selectedMedicationDose == null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 5, + ), + AppTextFieldCustom( + enabled: false, + isTextFieldHasSuffix: true, + onClick: model.medicationStrengthList != null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: model.medicationStrengthList, + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedMedicationStrength = + selectedValue; + + strengthController + .text = projectViewModel + .isArabic + ? _selectedMedicationStrength + .nameAr + : _selectedMedicationStrength + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: + TranslationBase.of(context).strength, + maxLines: 2, + minLines: 2, + controller: strengthController, + validationError: isFormSubmitted && + _selectedMedicationStrength == null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 5, + ), + SizedBox( + height: 5, + ), + AppTextFieldCustom( + enabled: false, + isTextFieldHasSuffix: true, + onClick: model.medicationRouteList != null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: model.medicationRouteList, + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedMedicationRoute = + selectedValue; + + routeController + .text = projectViewModel + .isArabic + ? _selectedMedicationRoute + .nameAr + : _selectedMedicationRoute + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: TranslationBase.of(context).route, + maxLines: 2, + minLines: 2, + controller: routeController, + validationError: isFormSubmitted && + _selectedMedicationRoute == null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 5, + ), + SizedBox( + height: 5, + ), + AppTextFieldCustom( + onClick: model.medicationFrequencyList != null + ? () { + MasterKeyDailog dialog = + MasterKeyDailog( + list: model.medicationFrequencyList, + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + _selectedMedicationFrequency = + selectedValue; + + frequencyController + .text = projectViewModel + .isArabic + ? _selectedMedicationFrequency + .nameAr + : _selectedMedicationFrequency + .nameEn; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + hintText: + TranslationBase.of(context).frequency, + enabled: false, + maxLines: 2, + minLines: 2, + isTextFieldHasSuffix: true, + controller: frequencyController, + validationError: isFormSubmitted && + _selectedMedicationFrequency == null + ? TranslationBase.of(context).emptyMessage + : null, + ), + SizedBox( + height: 5, + ), + SizedBox( + height: 30, + ), + ], + )), + ), + ), + ]), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0.30), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase.of(context) + .addMedication + .toUpperCase(), + color: Color(0xFF359846), + onPressed: () { + setState(() { + isFormSubmitted = true; + }); + if (_selectedMedication != null && + _selectedMedicationDose != null && + _selectedMedicationStrength != null && + _selectedMedicationRoute != null && + _selectedMedicationFrequency != null) { + widget.medicationController.text = widget + .medicationController.text + + '${_selectedMedication.description} (${TranslationBase.of(context).doseTime} ) ${doseController.text} (${TranslationBase.of(context).strength}) ${strengthController.text} (${TranslationBase.of(context).route}) ${routeController.text} (${TranslationBase.of(context).frequency}) ${frequencyController.text} \n \n'; + Navigator.of(context).pop(); + } + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart new file mode 100644 index 00000000..7372e7ee --- /dev/null +++ b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart @@ -0,0 +1,54 @@ +import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +import '../../shared_soap_widgets/SOAP_open_items.dart'; +import 'add_medication.dart'; + +class UpdateMedicationWidget extends StatefulWidget { + final TextEditingController medicationController; + + UpdateMedicationWidget({ + Key key, + this.medicationController, + }); + + @override + _UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState(); +} + +class _UpdateMedicationWidgetState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + + SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () { + openMedicationList(context); + + },), + SizedBox( + height: 20, + ) + ], + ); + } + + + openMedicationList(BuildContext context) { + showModalBottomSheet( + backgroundColor: Colors.white, + isScrollControlled: true, + isDismissible: false, + context: context, + builder: (context) { + return AddMedication( + addMedicationFun: (MySelectedAllergy mySelectedAllergy) {}, + medicationController: widget.medicationController, + ); + }); + } +} + + + diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart similarity index 57% rename from lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart rename to lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 3bc89a7f..19999880 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -1,5 +1,3 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; -import 'package:doctor_app_flutter/config/config.dart'; 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'; @@ -16,18 +14,18 @@ import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/expandable-widget-header-body.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; +import 'allergies/update_allergies_widget.dart'; +import 'cheif_complaints/update_Chief_complaints.dart'; +import 'history/update_history_widget.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; @@ -35,13 +33,14 @@ class UpdateSubjectivePage extends StatefulWidget { final List myAllergiesList; final List myHistoryList; final PatiantInformtion patientInfo; + final int currentIndex; UpdateSubjectivePage( {Key key, this.changePageViewIndex, this.myAllergiesList, this.myHistoryList, - this.patientInfo, this.changeLoadingState}); + this.patientInfo, this.changeLoadingState, this.currentIndex}); @override _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); @@ -54,7 +53,9 @@ class _UpdateSubjectivePageState extends State { TextEditingController illnessController = TextEditingController(); TextEditingController complaintsController = TextEditingController(); TextEditingController medicationController = TextEditingController(); - + String complaintsControllerError = ''; + String medicationControllerError = ''; + String illnessControllerError = ''; final formKey = GlobalKey(); getHistory(SOAPViewModel model) async { @@ -206,10 +207,11 @@ class _UpdateSubjectivePageState extends State { doctorID: ''); await model.getPatientChiefComplaint(getChiefComplaintReqModel); if (model.patientChiefComplaintList.isNotEmpty) { - complaintsController.text = helpers.parseHtmlString( + isChiefExpand = true; + complaintsController.text = Helpers.parseHtmlString( model.patientChiefComplaintList[0].chiefComplaint); illnessController.text = model.patientChiefComplaintList[0].hopi; - medicationController.text = model.patientChiefComplaintList[0].currentMedication + '\n \n'; + medicationController.text =!(model.patientChiefComplaintList[0].currentMedication).isNotEmpty ? model.patientChiefComplaintList[0].currentMedication + '\n \n':model.patientChiefComplaintList[0].currentMedication; } await getHistory(model); @@ -220,7 +222,9 @@ class _UpdateSubjectivePageState extends State { }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - // baseViewModel: model, + backgroundColor: Theme + .of(context) + .scaffoldBackgroundColor, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -228,247 +232,117 @@ class _UpdateSubjectivePageState extends State { widthFactor: 0.9, child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase.of(context).chiefComplaints.toUpperCase(), - variant: isChiefExpand ? "bodyText" : '', - bold: isChiefExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isChiefExpand = !isChiefExpand; - }); - }, - child: Icon( - isChiefExpand ? EvaIcons.minus : EvaIcons.plus)) - ], - ), - bodyWidget: Form( - key: formKey, - child: Column(children: [ - SizedBox( - height: 20, - ), - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - 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) - .emptyMessage; - else if (value.length < 25) - return TranslationBase - .of(context) - .chiefComplaintLength; - //""; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hasLabelText: illnessController.text != '' - ? true - : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .historyOfPresentIllness, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 13, - controller: illnessController, - validator: (value) { - if (value == null || value == "") - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - SizedBox( - height: 10, - ), - UpdateMedicationWidget(medicationController: medicationController,), - SizedBox( - height: 10, - ), - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hasLabelText: medicationController.text != '' - ? true - : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .currentMedications, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 23, - minLines: 10, - controller: medicationController, - validator: (value) { - if (value == null || value == "") - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 10, - ), - ]), + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + ExpandableSOAPWidget( + headerTitle: TranslationBase.of(context) + .chiefComplaints + , + onTap: () { + setState(() { + isChiefExpand = !isChiefExpand; + }); + }, + child: UpdateChiefComplaints( + formKey: formKey, + complaintsController: complaintsController, + illnessController: illnessController, + medicationController: medicationController, + complaintsControllerError: complaintsControllerError, + illnessControllerError: illnessControllerError, + medicationControllerError: medicationControllerError, ), - isExpand: isChiefExpand, - ), - - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), + isExpanded: isChiefExpand, ), SizedBox( height: 30, ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .histories - .toUpperCase(), - variant: isHistoryExpand ? "bodyText" : '', - bold: isHistoryExpand ? true : false, - color: Colors.black), - ], - ), - InkWell( - onTap: () { - setState(() { - isHistoryExpand = !isHistoryExpand; - }); - }, - child: Icon(isHistoryExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget: Column( + + + ExpandableSOAPWidget( + headerTitle: TranslationBase + .of(context) + .histories, + isRequired: false, + onTap: () { + setState(() { + isHistoryExpand = !isHistoryExpand; + }); + }, + child: Column( children: [ UpdateHistoryWidget(myHistoryList: widget.myHistoryList) ], ), - isExpand: isHistoryExpand, - ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), + isExpanded: isHistoryExpand, ), SizedBox( height: 30, ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .allergiesSoap - .toUpperCase(), - variant: isAllergiesExpand ? "bodyText" : '', - bold: isAllergiesExpand ? true : false, - color: Colors.black), - ], - ), - InkWell( - onTap: () { - setState(() { - isAllergiesExpand = !isAllergiesExpand; - }); - }, - child: Icon(isAllergiesExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget:Column( + + + ExpandableSOAPWidget( + headerTitle: TranslationBase + .of(context) + .allergiesSoap + , + isRequired: false, + onTap: () { + setState(() { + isAllergiesExpand = !isAllergiesExpand; + }); + }, + child: Column( children: [ - UpdateAllergiesWidget(myAllergiesList: widget.myAllergiesList,), + UpdateAllergiesWidget(myAllergiesList: widget + .myAllergiesList,), SizedBox( height: 30, ), ], - ) - , - isExpand: isAllergiesExpand, - ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), + ), + isExpanded: isAllergiesExpand, ), SizedBox( - height: 30, + height:MediaQuery.of(context).size.height * 0.16, ), - AppButton( - title: TranslationBase.of(context).next, + ], + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0), + ), + height: MediaQuery + .of(context) + .size + .height * 0.1, + width: double.infinity, + + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container(child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase + .of(context) + .next, + fontWeight: FontWeight.w600, + color:Colors.red[700], loading: model.state == ViewState.BusyLocal, onPressed: () async { addSubjectiveInfo( @@ -477,11 +351,13 @@ class _UpdateSubjectivePageState extends State { myHistoryList: widget.myHistoryList); }, ), - ], + ), + ),), + SizedBox( + height: 5, ), - ), - ), - ), + ], + ),), ), ); } @@ -492,25 +368,27 @@ class _UpdateSubjectivePageState extends State { formKey.currentState.save(); formKey.currentState.validate(); - + complaintsControllerError = ''; + medicationControllerError = ''; + illnessControllerError = ''; if (complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length > 25) { await postChiefComplaint(model: model); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } if (myHistoryList.length != 0) { await postHistories(model: model, myHistoryList: myHistoryList); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } if (myAllergiesList.length != 0) { await postAllergy(myAllergiesList: myAllergiesList, model: model); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } widget.changeLoadingState(true); @@ -518,7 +396,30 @@ class _UpdateSubjectivePageState extends State { widget.changePageViewIndex(1); } else { - helpers.showErrorToast(TranslationBase + setState(() { + if (complaintsController.text.isEmpty) { + complaintsControllerError = TranslationBase + .of(context) + .emptyMessage; + } else if (complaintsController.text.length < 25) { + complaintsControllerError = TranslationBase + .of(context) + .chiefComplaintLength; + } + + if (illnessController.text.isEmpty) { + illnessControllerError = TranslationBase + .of(context) + .emptyMessage; + } + + if (medicationController.text.isEmpty) { + medicationControllerError = TranslationBase + .of(context) + .emptyMessage; + } + }); + Helpers.showErrorToast(TranslationBase .of(context) .chiefComplaintErrorMsg); } @@ -569,7 +470,7 @@ class _UpdateSubjectivePageState extends State { await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy : true); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } @@ -580,7 +481,6 @@ class _UpdateSubjectivePageState extends State { widget.myHistoryList.forEach((history) { if (postHistoriesRequestModel.listMedicalHistoryVM == null) postHistoriesRequestModel.listMedicalHistoryVM = []; - //TODO: make static value dynamic postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM( patientMRN: widget.patientInfo.patientMRN, episodeId: widget.patientInfo.episodeNo, @@ -601,7 +501,7 @@ class _UpdateSubjectivePageState extends State { if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } @@ -609,7 +509,6 @@ class _UpdateSubjectivePageState extends State { formKey.currentState.save(); if(formKey.currentState.validate()){ PostChiefComplaintRequestModel postChiefComplaintRequestModel = - //TODO: make static value dynamic new PostChiefComplaintRequestModel( patientMRN: widget.patientInfo.patientMRN, episodeID: widget.patientInfo.episodeNo, @@ -623,13 +522,16 @@ class _UpdateSubjectivePageState extends State { numberOfWeeks: 0); if (model.patientChiefComplaintList.isEmpty) { - // TODO: make it postChiefComplaint after it start to work - postChiefComplaintRequestModel.editedBy=''; + postChiefComplaintRequestModel.editedBy = ''; await model.postChiefComplaint(postChiefComplaintRequestModel); } else { await model.patchChiefComplaint(postChiefComplaintRequestModel); } } - } } + + + + + diff --git a/lib/screens/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart new file mode 100644 index 00000000..d9af7457 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -0,0 +1,142 @@ +import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/screens/patients/profile/soap_update/subjective/update_subjective_page.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'assessment/update_assessment_page.dart'; +import 'objective/update_objective_page.dart'; +import 'plan/update_plan_page.dart'; + +class UpdateSoapIndex extends StatefulWidget { + final bool isUpdate; + + const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key); + + @override + _UpdateSoapIndexState createState() => _UpdateSoapIndexState(); +} + +class _UpdateSoapIndexState extends State + with TickerProviderStateMixin { + PageController _controller; + int _currentIndex = 0; + List myAllergiesList = List(); + List myHistoryList = List(); + List mySelectedExamination = List(); + List mySelectedAssessment = List(); + + GetPatientProgressNoteResModel patientProgressNote = + GetPatientProgressNoteResModel(); + + changePageViewIndex(pageIndex,{isChangeState = true}) { + if (pageIndex != _currentIndex && isChangeState) + changeLoadingState(true); + _controller.jumpToPage(pageIndex); + setState(() { + _currentIndex = pageIndex; + }); + } + + bool _isLoading = true; + + @override + void initState() { + _controller = new PageController(); + + super.initState(); + } + + void changeLoadingState(isLoading) { + setState(() { + _isLoading = isLoading; + }); + } + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + return BaseView( + builder: (_, model, w) => AppScaffold( + isLoading: _isLoading, + isShowAppBar: false, + body: SingleChildScrollView( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [], + color: Theme.of(context).scaffoldBackgroundColor), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + PatientProfileHeaderNewDesign(patient, '7', '7',), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + + Container( + color: Theme.of(context).scaffoldBackgroundColor, + height: MediaQuery.of(context).size.height * 0.73, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + UpdateSubjectivePage( + changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, + myAllergiesList: myAllergiesList, + myHistoryList: myHistoryList, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateObjectivePage( + changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, + mySelectedExamination: mySelectedExamination, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateAssessmentPage( + changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, + mySelectedAssessmentList: mySelectedAssessment, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdatePlanPage( + changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, + patientInfo: patient, + patientProgressNote: patientProgressNote, + changeLoadingState: changeLoadingState) + ], + ), + ) + ], + ), + ), + ], + ), + ), + ), + )); + } +} diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 2f0eafcb..564c8c2c 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -1,4 +1,7 @@ +import 'package:date_time_picker/date_time_picker.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; @@ -12,6 +15,11 @@ class LineChartCurved extends StatelessWidget { List xAxixs = List(); List yAxixs = List(); + // DateFormat format = DateFormat("yyyy-MM-dd"); + DateFormat yearFormat = DateFormat("yyyy/MMM"); + DateFormat monthFormat = DateFormat("MMM"); + bool isDatesSameYear = true; + @override Widget build(BuildContext context) { getXaxix(); @@ -24,22 +32,31 @@ class LineChartCurved extends StatelessWidget { // color: Colors.white, ), child: Stack( - children: [ + children: [ Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ const SizedBox( height: 4, ), - Text( - title, - style: TextStyle( - color: Colors.black, - fontSize: 15, - letterSpacing: 2), - textAlign: TextAlign.center, + Container( + padding: const EdgeInsets.only(right: 18.0, left: 16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + title, + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + textAlign: TextAlign.center, + ), + ], + ), + ), + SizedBox( + height: 16, ), - SizedBox(height: 10,), Expanded( child: Padding( padding: const EdgeInsets.only(right: 18.0, left: 16.0), @@ -68,8 +85,9 @@ class LineChartCurved extends StatelessWidget { } } } + getYaxix() { - int indexess= (timeSeries.length*0.30).toInt(); + int indexess = (timeSeries.length * 0.30).toInt(); for (int index = 0; index < timeSeries.length; index++) { int mIndex = indexess * index; if (mIndex < timeSeries.length) { @@ -83,7 +101,6 @@ class LineChartCurved extends StatelessWidget { lineTouchData: LineTouchData( touchTooltipData: LineTouchTooltipData( tooltipBgColor: Colors.white, - ), touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, @@ -97,12 +114,37 @@ class LineChartCurved extends StatelessWidget { color: Colors.black, fontSize: 10, ), - rotateAngle:-65, + rotateAngle: -65, //rotateAngle:-65, margin: 22, getTitles: (value) { if (timeSeries.length < 15) { if (timeSeries.length > value.toInt()) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } + } else { + return ''; + } + } else { + if (value.toInt() == 0 || + value.toInt() == timeSeries.length - 1 || + xAxixs.contains(value.toInt())) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } + } + } + + /*if (timeSeries.length < 15) { + if (timeSeries.length > value.toInt()) { + DateTime dateTime = timeSeries[value.toInt()].time; return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; } else return ''; @@ -114,7 +156,7 @@ class LineChartCurved extends StatelessWidget { if (xAxixs.contains(value.toInt())) { return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; } - } + }*/ return ''; }, ), @@ -163,7 +205,7 @@ class LineChartCurved extends StatelessWidget { ), minX: 0, maxX: (timeSeries.length - 1).toDouble(), - maxY: getMaxY()+0.3, + maxY: getMaxY() + 0.3, minY: getMinY(), lineBarsData: getData(context), ); @@ -176,7 +218,7 @@ class LineChartCurved extends StatelessWidget { if (resultValueDouble > max) max = resultValueDouble; }); - return max.roundToDouble() ; + return max.roundToDouble(); } double getMinY() { @@ -192,14 +234,22 @@ class LineChartCurved extends StatelessWidget { List getData(context) { List spots = List(); + isDatesSameYear = true; + int previousDateYear = 0; for (int index = 0; index < timeSeries.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); + if (isDatesSameYear == false || + (previousDateYear != 0 && + previousDateYear != timeSeries[index].time.year)) { + isDatesSameYear = false; + } + previousDateYear = timeSeries[index].time.year; } final LineChartBarData lineChartBarData1 = LineChartBarData( spots: spots, isCurved: true, - colors: [Theme.of(context).primaryColor], + colors: [Colors.red] /*[Theme.of(context).primaryColor]*/, barWidth: 5, isStrokeCapRound: true, dotData: FlDotData( diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index e816c145..3f9b1dd6 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -26,71 +27,77 @@ class LineChartCurvedBloodPressure extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(18)), // color: Colors.white, ), - child: Stack( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const SizedBox( - height: 15, - ), - Text( - title, - style: TextStyle( - color: Colors.black, fontSize: 15, letterSpacing: 2), - textAlign: TextAlign.center, - ), - SizedBox( - height: 10, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), - child: LineChart( - sampleData1(context), - swapAnimationDuration: const Duration(milliseconds: 250), - ), + const SizedBox( + height: 4, + ), + Container( + padding: const EdgeInsets.only(right: 18.0, left: 16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + title, + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + textAlign: TextAlign.center, ), + ], + ), + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + child: LineChart( + sampleData1(context), + swapAnimationDuration: const Duration(milliseconds: 250), ), - SizedBox( - height: 10, - ), + ), + ), + SizedBox( + height: 10, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, children: [ - Row( - children: [ - Container( - width: 20, - height: 20, - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Theme.of(context).primaryColor), - ), - SizedBox(width: 5,), - AppText(TranslationBase.of(context).systolicLng) - ], + Container( + width: 20, + height: 20, + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Theme.of(context).primaryColor), ), - SizedBox(width: 15,), - Row( - children: [ - Container( - width: 20, - height: 20, - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.grey), - ), - SizedBox(width: 5,), - AppText(TranslationBase.of(context).diastolicLng) - ], + SizedBox(width: 5,), + AppText(TranslationBase.of(context).systolicLng) + ], + ), + SizedBox(width: 15,), + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.red), ), + SizedBox(width: 5,), + AppText(TranslationBase.of(context).diastolicLng,) ], - ) + ), ], - ), + ) ], ), ), @@ -241,7 +248,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { final LineChartBarData lineChartBarData2 = LineChartBarData( spots: spots2, isCurved: true, - colors: [Colors.grey], + colors: [Colors.red], barWidth: 5, isStrokeCapRound: true, dotData: FlDotData( @@ -252,6 +259,14 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), ); - return [lineChartBarData1, lineChartBarData2]; + List lineChartData = List(); + if(spots.isNotEmpty){ + lineChartData.add(lineChartBarData1); + } + if(spots2.isNotEmpty){ + lineChartData.add(lineChartBarData2); + } + return lineChartData; + // return [lineChartBarData1, lineChartBarData2]; } } diff --git a/lib/screens/patients/profile/vital_sign/vital-signs-screen.dart b/lib/screens/patients/profile/vital_sign/vital-signs-screen.dart index 6b2543be..0bf2197b 100644 --- a/lib/screens/patients/profile/vital_sign/vital-signs-screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital-signs-screen.dart @@ -1,10 +1,8 @@ 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'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.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/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart new file mode 100644 index 00000000..ef6bc48f --- /dev/null +++ b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart @@ -0,0 +1,278 @@ +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/models/patient/vital_sign/patient-vital-sign-history.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/network_base_view.dart'; +import 'package:flutter/material.dart'; + +class VitalSignDetailPainScale extends StatelessWidget { + final List vitalList; + + VitalSignDetailPainScale(this.vitalList); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => NetworkBaseView( + baseViewModel: model, + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + vitalList.length, + (index) => Container( + margin: EdgeInsets.all(5), + color: Colors.white, + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).description, + color: Colors.black, + bold: true, + ), + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + TranslationBase.of(context).date, + color: Colors.black, + bold: true, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 7, + ), + Divider( + color: Colors.black, + thickness: 1, + ), + SizedBox( + height: 12, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + padding: EdgeInsets.only(left: 8), + child: Row( + children: [ + Expanded( + flex: 2, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: AppText( + TranslationBase.of(context).painScale, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painScore ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: AppText( + "Location", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painLocation ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Character", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painCharacter ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Duration", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painDuration ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + TranslationBase.of(context).painManagement, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].isPainManagementDone ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Container( + child: AppText( + "Frequency", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Color(0XFF28353E), + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Container( + child: Center( + child: AppText( + "${vitalList[index].painFrequency ?? "-"}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.3, + ), + ), + ), + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Center( + child: AppText( + "${DateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ), + ), + ) + ], + ), + ), + SizedBox( + height: 8, + ), + ], + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart index 693507bb..a6170f6f 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -1,5 +1,5 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_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/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -17,7 +17,13 @@ class VitalSignBloodPressureWidget extends StatefulWidget { final String viewKey2; VitalSignBloodPressureWidget( - {Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2}); + {Key key, + this.vitalList, + this.title1, + this.title2, + this.viewKey1, + this.title3, + this.viewKey2}); @override _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); @@ -28,21 +34,96 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - decoration: BoxDecoration( + /*decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.only( topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), border: Border.all(color: Colors.grey, width: 1), - ), - margin: EdgeInsets.all(20), + ),*/ + margin: EdgeInsets.all(0), child: Container( color: Colors.transparent, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Expanded( + child: Container( + child: Container( + padding: EdgeInsets.all(8), + /*decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ),*/ + child: AppText( + TranslationBase.of(context).date, + fontSize: SizeConfig.textMultiplier * 1.5, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60, + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Container( + /*decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ),*/ + child: AppText( + widget.title2, + fontSize: SizeConfig.textMultiplier * 1.5, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60 + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Container( + /*decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ),*/ + child: AppText( + widget.title3, + fontSize: SizeConfig.textMultiplier * 1.5, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60 + ), + ), + ), + ], + ), + const Divider( + height: 1, + thickness: 1, + color: Colors.black, + ), Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 2.0, color: Colors.grey[300]), + border: TableBorder( + horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), @@ -54,36 +135,7 @@ class _VitalSignDetailsWidgetState extends State { List fullData(ProjectViewModel projectViewModel) { List tableRow = []; - tableRow.add(TableRow(children: [ - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ), - child: Center( - child: AppText( - TranslationBase.of(context).date, - color: Colors.white, - ), - ), - height: 60, - ), - ), - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - - ), - child: Center( - child: AppText(widget.title2, color: Colors.white), - ), - height: 60), - ), + /* tableRow.add(TableRow(children: [ Container( child: Container( decoration: BoxDecoration( @@ -98,22 +150,24 @@ class _VitalSignDetailsWidgetState extends State { ), height: 60), ), - ])); + ]));*/ widget.vitalList.forEach((vital) { var data = vital.toJson()[widget.viewKey1]; DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(vital.createdOn); + DateUtils.getDateTimeFromServerFormat(vital.createdOn); if (data != 0) tableRow.add(TableRow(children: [ Container( child: Container( padding: EdgeInsets.all(10), color: Colors.white, - child: Center( - child: AppText( - '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', - textAlign: TextAlign.center, - ), + child: AppText( + '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), @@ -121,11 +175,13 @@ class _VitalSignDetailsWidgetState extends State { child: Container( padding: EdgeInsets.all(10), color: Colors.white, - child: Center( - child: AppText( - '${vital.toJson()[widget.viewKey1]}', - textAlign: TextAlign.center, - ), + child: AppText( + '${vital.toJson()[widget.viewKey1]}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), @@ -133,11 +189,13 @@ class _VitalSignDetailsWidgetState extends State { child: Container( padding: EdgeInsets.all(10), color: Colors.white, - child: Center( - child: AppText( - '${vital.toJson()[widget.viewKey2]}', - textAlign: TextAlign.center, - ), + child: AppText( + '${vital.toJson()[widget.viewKey2]}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 3dd45782..5ceaedd5 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/transitions/fade_page.dart'; @@ -29,372 +29,748 @@ class VitalSignDetailsScreen extends StatelessWidget { String arrivalType = routeArgs['arrivalType']; String from = routeArgs['from']; String to = routeArgs['to']; + bool isInpatient = routeArgs['isInpatient']; String imageBasePath = 'assets/images/'; String assetBasePath = "${imageBasePath}patient/vital_signs/"; return BaseView( onModelReady: (model) => - model.getPatientVitalSignHistory(patient, from, to), + model.getPatientVitalSignHistory(patient, from, to, isInpatient), builder: (_, mode, widget) => AppScaffold( - isShowAppBar: false, baseViewModel: mode, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).vitalSign, body: mode.patientVitalSignsHistory.length > 0 ? Column( - crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), - Container( - margin: EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${patient.firstName ?? patient.patientDetails.firstName}'s", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, - ), - AppText( - TranslationBase.of(context).vitalSign, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - ) - ], - ), - ), - Container( - height: MediaQuery.of(context).size.height * 0.21, - width: double.infinity, - padding: EdgeInsets.all(12.0), - margin: EdgeInsets.symmetric(horizontal: 16.0), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.circular(16), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey.shade400, - width: 0.4, - )), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 2.0, - fontWeight: FontWeight.w700, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 1 - ? '${assetBasePath}underweight_BMI.png' - : '${assetBasePath}underweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - AppText( - "${TranslationBase.of(context).bmiUnderWeight}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - color: mode.getBMIStatus() == 1 - ? Color(0XFFD02127) - : null, - fontWeight: FontWeight.w700, - ), - AppText( - "(1-10)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - color: mode.getBMIStatus() == 1 - ? Color(0XFFD02127) - : null, - fontWeight: FontWeight.w700, - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - mode.getBMIStatus() != 2 - ? '${assetBasePath}health_BMI.png' - : '${assetBasePath}health_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - AppText( - "${TranslationBase.of(context).bmiHealthy}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 - ? Color(0XFFD02127) - : null, - ), - AppText( - "(11-20)", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 - ? Color(0XFFD02127) - : null, - ), - ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + Expanded( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - mode.getBMIStatus() != 3 - ? '${assetBasePath}ovrweight_BMI.png' - : '${assetBasePath}ovrweight_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), AppText( - "${TranslationBase.of(context).bmiOverWeight}", + "${patient.firstName ?? patient.patientDetails.firstName}'s", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 - ? Color(0XFFD02127) - : null, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, ), AppText( - "(21-30)", + TranslationBase.of(context).vitalSign, fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 - ? Color(0XFFD02127) - : null, - ), + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) ], - )), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.23, + width: double.infinity, + padding: EdgeInsets.all(12.0), + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 8.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(16), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - mode.getBMIStatus() != 4 - ? '${assetBasePath}Obese_BMI.png' - : '${assetBasePath}Obese_BMI-r.png', - height: - MediaQuery.of(context).size.height * 0.10, - ), - const SizedBox( - height: 4, - ), - AppText( - "${TranslationBase.of(context).bmiObese}", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, - ), AppText( - "(31-40>)", + "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: SizeConfig.textMultiplier * 2.0, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 - ? Color(0XFFD02127) - : null, ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 1 + ? '${assetBasePath}underweight_BMI.png' + : '${assetBasePath}underweight_BMI-r.png', + height: MediaQuery.of(context) + .size + .height * + 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiUnderWeight}", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, + fontWeight: FontWeight.w700, + ), + AppText( + "(<18.5)", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, + fontWeight: FontWeight.w700, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 2 + ? '${assetBasePath}health_BMI.png' + : '${assetBasePath}health_BMI-r.png', + height: MediaQuery.of(context) + .size + .height * + 0.10, + ), + const SizedBox( + height: 4, + ), + Container( + child: AppText( + "${TranslationBase.of(context).normal}", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * + 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, + ), + ), + AppText( + "(18.5-24.9)", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 3 + ? '${assetBasePath}ovrweight_BMI.png' + : '${assetBasePath}ovrweight_BMI-r.png', + height: MediaQuery.of(context) + .size + .height * + 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiOverWeight}", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.155, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, + ), + AppText( + "(25-29.9)", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.155, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 4 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: MediaQuery.of(context) + .size + .height * + 0.10, + ), + const SizedBox( + height: 4, + ), + AppText( + "${TranslationBase.of(context).bmiObese}", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + AppText( + "(30-34.9)", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + mode.getBMIStatus() != 5 + ? '${assetBasePath}Obese_BMI.png' + : '${assetBasePath}Obese_BMI-r.png', + height: MediaQuery.of(context) + .size + .height * + 0.10, + ), + const SizedBox( + height: 4, + ), + FittedBox( + fit: BoxFit.fitWidth, + child: AppText( + "${TranslationBase.of(context).bmiObeseExtreme}", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * + 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, + ), + ), + AppText( + "(35<)", + fontFamily: 'Poppins', + fontSize: + SizeConfig.textMultiplier * 1.15, + fontWeight: FontWeight.w700, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, + ), + ], + )), + ], + ) ], - )), - ], - ) - ], - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.symmetric(horizontal: 8.0), - child : GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 4, - mainAxisSpacing: 4, - childAspectRatio: 1 / 1.0, - crossAxisCount: 3, - children: [ - InkWell( - 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, - imagePath: - "${assetBasePath}height.png", - lastVal: mode.heightCm, - unit: TranslationBase.of(context).cm, - ), - ), - ), - InkWell( - 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: "${assetBasePath}weight.png", - unit: TranslationBase.of(context).kg, - lastVal: mode.weightKg, - ), - ), - InkWell( - 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: - "${assetBasePath}temperature.png", - lastVal: mode.temperatureCelcius, - unit: TranslationBase.of(context).tempC, - ), ), ), - InkWell( - 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: - "${assetBasePath}heart_rate.png", - lastVal: mode.hartRat, - unit: TranslationBase.of(context).bpm, - ), - ), - InkWell( - 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: - "${assetBasePath}respiration_rate.png", - lastVal: mode.respirationBeatPerMinute, - unit: TranslationBase.of(context) - .respirationSigns, - ), - ), - InkWell( - onTap: () => isNotOneAppointment - ? Navigator.push( - context, - FadePage( - page: VitalSignItemDetailsScreen( - pageKey: - vitalSignDetails.BloodPressure, - pageTitle: - TranslationBase.of(context) - .bloodPressure, - vitalList: - mode.patientVitalSignsHistory, + Expanded( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 16), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 6, + mainAxisSpacing: 6, + crossAxisCount: 3, + children: [ + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Height, + pageTitle: + TranslationBase.of( + context) + .height, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context) + .height, + imagePath: + "${assetBasePath}height.png", + lastVal: mode.heightCm, + unit: TranslationBase.of(context) + .cm, + ), + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Weight, + pageTitle: + TranslationBase.of( + context) + .weight, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .weight, + imagePath: + "${assetBasePath}weight.png", + unit: + TranslationBase.of(context).kg, + lastVal: mode.weightKg, + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Temperature, + pageTitle: + TranslationBase.of( + context) + .temperature, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: Container( + child: VitalSignItem( + des: TranslationBase.of(context) + .temperature, + imagePath: + "${assetBasePath}temperature.png", + lastVal: mode.temperatureCelcius, + unit: TranslationBase.of(context) + .tempC, + ), + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .heart, + pageTitle: + TranslationBase.of( + context) + .heart, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .heart, + imagePath: + "${assetBasePath}heart_rate.png", + lastVal: mode.hartRat, + unit: + TranslationBase.of(context).bpm, + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Respiration, + pageTitle: + TranslationBase.of( + context) + .respirationRate, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .respirationRate, + imagePath: + "${assetBasePath}respiration_rate.png", + lastVal: + mode.respirationBeatPerMinute, + unit: TranslationBase.of(context) + .respirationSigns, + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .BloodPressure, + pageTitle: + TranslationBase.of( + context) + .bloodPressure, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .bloodPressure, + imagePath: + "${assetBasePath}blood_pressure.png", + lastVal: mode.bloodPressure, + unit: TranslationBase.of(context) + .sysDias, + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Oxygenation, + pageTitle: + TranslationBase.of( + context) + .oxygenation, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .oxygenation, + imagePath: + "${assetBasePath}oxg.png", + lastVal: mode.oxygenation, + unit: "%", + ), + ), + InkWell( + onTap: () => isNotOneAppointment + ? Navigator.push( + context, + FadePage( + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .PainScale, + pageTitle: + TranslationBase.of( + context) + .painScale, + vitalList: mode + .patientVitalSignsHistory, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ) + : null, + child: VitalSignItem( + des: TranslationBase.of(context) + .painScale, + imagePath: + "${assetBasePath}painScale.png", + lastVal: mode.painScore, + unit: "", + ), + ), + ], + ), + /*RoundedContainer( + width: MediaQuery.of(context).size.width / 2, + margin: EdgeInsets.symmetric( + horizontal: 0.0, vertical: 16), + child: Container( + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(top: 8), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Expanded( + child: Container( + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).painScale}", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painScore}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Location", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painLocation}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Character", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painCharacter}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + "Duration", + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painDuration}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).painManagement, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.isPainDone}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).frequency, + fontSize: SizeConfig.textMultiplier * 1.5, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + SizedBox( + width: 8, + ), + AppText( + "${mode.painFrequency}", + fontSize: SizeConfig.textMultiplier * 1.3, + color: Colors.grey.shade700, + fontWeight: FontWeight.normal, + ), + ], + ), + ], + ), + ), + ), + Container( + child: Image.asset( + "${assetBasePath}painScale.png", + width: 40, + height: 40, + )) + ], + ), + ), + Container( + child: Column( + children: [ + Align( + alignment: + Alignment.topRight, + child: Icon( + EvaIcons.eye, + ), + ), + Align( + alignment: + Alignment.topLeft, + child: Container( + margin: EdgeInsets.only( + left: 5, right: 5), + child: AppText( + "${TranslationBase.of(context).painScale}", + fontFamily: 'Poppins', + fontSize: SizeConfig + .textMultiplier * + 1.3, + fontWeight: + FontWeight.bold, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ),*/ + ], ), ), - ) - : null, - child: VitalSignItem( - des: - TranslationBase.of(context).bloodPressure, - imagePath: - "${assetBasePath}blood_pressure.png", - lastVal: mode.bloodPressure, - unit: TranslationBase.of(context).sysDias, ), ), ], @@ -404,14 +780,26 @@ class VitalSignDetailsScreen extends StatelessWidget { ], ) : Center( - child: AppText( - TranslationBase.of(context).vitalSignEmptyMsg, - fontWeight: FontWeight.normal, - color: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.5, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).vitalSignEmptyMsg, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, + ), + ) + ], ), ), ), ); } -} +} \ No newline at end of file diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart index 11a24e42..f058ac3e 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart @@ -1,12 +1,11 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_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/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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class VitalSignDetailsWidget extends StatefulWidget { @@ -27,21 +26,74 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - decoration: BoxDecoration( + /*decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.only( topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), border: Border.all(color: Colors.grey, width: 1), - ), - margin: EdgeInsets.all(20), + ),*/ + margin: EdgeInsets.all(0), child: Container( color: Colors.transparent, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Expanded( + child: Container( + child: Container( + padding: EdgeInsets.all(8), + /*decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ),*/ + child: AppText( + TranslationBase.of(context).date, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60, + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(8), + child: Container( + /*decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ),*/ + child: AppText( + widget.title2, + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + // height: 60 + ), + ), + ) + ], + ), + const Divider( + height: 1, + thickness: 1, + color: Colors.black, + ), Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 2.0, color: Colors.grey[300]), + border: TableBorder( + horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), @@ -53,67 +105,40 @@ class _VitalSignDetailsWidgetState extends State { List fullData(ProjectViewModel projectViewModel) { List tableRow = []; - tableRow.add(TableRow(children: [ - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ), - child: Center( - child: AppText( - TranslationBase.of(context).date, - color: Colors.white, - ), - ), - height: 60, - ), - ), - Container( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.only( - topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), - topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) - ), - ), - child: Center( - child: AppText(widget.title2, color: Colors.white), - ), - height: 60), - ) - ])); + /* tableRow.add(TableRow(children: [ + + ]));*/ widget.vitalList.forEach((vital) { var data = vital.toJson()[widget.viewKey]; DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(vital.createdOn); + DateUtils.getDateTimeFromServerFormat(vital.createdOn); if (data != 0) tableRow.add(TableRow(children: [ Container( child: Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.all(8), color: Colors.white, - child: Center( - child: AppText( - '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', - textAlign: TextAlign.center, - ), + child: AppText( + '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), Container( child: Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.all(8), color: Colors.white, - child: Center( - child: AppText( - '${vital.toJson()[widget.viewKey]}', - textAlign: TextAlign.center, - ), + child: AppText( + '${vital.toJson()[widget.viewKey]}', + // textAlign: TextAlign.center, + fontSize: SizeConfig.textMultiplier * 1.8, + fontWeight: FontWeight.w600, + + fontFamily: 'Poppins', ), ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart index e99e7bad..fbea0452 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class VitalSignItem extends StatelessWidget { final String des; @@ -50,17 +50,23 @@ class VitalSignItem extends StatelessWidget { AppText( "$lastVal", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w800, + fontSize: SizeConfig.textMultiplier * 1.4, + fontWeight: FontWeight.bold, margin: 0, ), - AppText( - "$unit", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.3, - fontWeight: FontWeight.w700, - color: HexColor('#B8382C'), - margin: 0, + Expanded( + child: Column( + children: [ + AppText( + "$unit", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.2, + fontWeight: FontWeight.w700, + color: Color(0xFFB8382C), + margin: 0, + ), + ], + ), ), ], ), @@ -78,17 +84,27 @@ class VitalSignItem extends StatelessWidget { ), Container( width: double.infinity, - child: Align( - alignment: Alignment.topLeft, - child: Container( - margin: EdgeInsets.only(left: 5, right: 5), - child: AppText( - "$des", - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.5, - fontWeight: FontWeight.w600, + child: Column( + children: [ + Align( + alignment: Alignment.topRight, + child: Icon( + EvaIcons.eye, + ), ), - ), + Align( + alignment: Alignment.topLeft, + child: Container( + margin: EdgeInsets.only(left: 5, right: 5), + child: AppText( + "$des", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.3, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), ), ], diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index bd828138..343d0590 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -1,10 +1,15 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -12,8 +17,17 @@ class VitalSignItemDetailsScreen extends StatelessWidget { final vitalSignDetails pageKey; final String pageTitle; List VSchart; + PatiantInformtion patient; + String patientType; + String arrivalType; - VitalSignItemDetailsScreen({this.vitalList, this.pageKey, this.pageTitle}); + VitalSignItemDetailsScreen( + {this.vitalList, + this.pageKey, + this.pageTitle, + this.patient, + this.patientType, + this.arrivalType}); final List vitalList; @@ -31,7 +45,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget { 'title2Ar': 'الكتلة', 'viewKey': 'BodyMassIndex', }, - ]; break; @@ -87,7 +100,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget { 'title3Ar': 'الإنبساط', 'viewKey': 'BloodPressure', }, - ]; break; @@ -129,6 +141,21 @@ class VitalSignItemDetailsScreen extends StatelessWidget { }, ]; + break; + case vitalSignDetails.Oxygenation: + VSchart = [ + { + 'name': 'Oxygenation', + 'nameAr': 'الأوكسجين', + 'title1': 'Date', + 'title2': 'SAO2', + 'title3': 'FIO2', + 'title2Ar': 'SAO2', + 'title3Ar': 'FIO2', + 'viewKey': 'O2', + }, + ]; + break; case vitalSignDetails.Weight: VSchart = [ @@ -161,35 +188,83 @@ class VitalSignItemDetailsScreen extends StatelessWidget { } return AppScaffold( appBarTitle: pageTitle, + backgroundColor: Color.fromRGBO(248, 248, 248, 1), isShowAppBar: true, - body: ListView( - children: VSchart.map((chartInfo) { - var vitalListTemp = vitalList.where( - (element) => element.toJson()[chartInfo['viewKey']] != null, - ); - - if(vitalListTemp.length != 0 && chartInfo['viewKey']=='BloodPressure'){ - return VitalSingChartBloodPressure( - vitalList: vitalList, - name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], - title1: chartInfo['title1'], - title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], - title3:projectViewModel.isArabic?chartInfo['title3Ar']: chartInfo['title3'], - viewKey1: 'BloodPressureHigher', - viewKey2: 'BloodPressureLower', - - ); - } - - return vitalListTemp.length != 0 - ? VitalSingChartAndDetials( - vitalList: vitalList, - name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], - title1: chartInfo['title1'], - title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], - viewKey: chartInfo['viewKey']) - : Container(); - }).toList(), + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "${patient.firstName ?? patient.patientDetails.firstName}'s", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.w600, + ), + AppText( + TranslationBase.of(context).vitalSign, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + ) + ], + ), + ), + Container( + child: ListView( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + children: VSchart.map((chartInfo) { + var vitalListTemp = vitalList.where( + (element) => element.toJson()[chartInfo['viewKey']] != null, + ); + + if (chartInfo['viewKey'] == 'PainScore') { + return VitalSignDetailPainScale(vitalList); + } + + if (vitalListTemp.length != 0 && + chartInfo['viewKey'] == 'BloodPressure' || chartInfo['viewKey'] == 'O2') { + return VitalSingChartBloodPressure( + vitalList: vitalList, + name: projectViewModel.isArabic + ? chartInfo['nameAr'] + : chartInfo['name'], + title1: chartInfo['title1'], + title2: projectViewModel.isArabic + ? chartInfo['title2Ar'] + : chartInfo['title2'], + title3: projectViewModel.isArabic + ? chartInfo['title3Ar'] + : chartInfo['title3'], + viewKey1: chartInfo['viewKey'] == 'BloodPressure' ? 'BloodPressureHigher' : 'SAO2', + viewKey2: chartInfo['viewKey'] == 'BloodPressure' ? 'BloodPressureLower' : 'FIO2', + ); + } + + return vitalListTemp.length != 0 + ? VitalSingChartAndDetials( + vitalList: vitalList, + name: projectViewModel.isArabic + ? chartInfo['nameAr'] + : chartInfo['name'], + title1: chartInfo['title1'], + title2: projectViewModel.isArabic + ? chartInfo['title2Ar'] + : chartInfo['title2'], + viewKey: chartInfo['viewKey']) + : Container(); + }).toList(), + ), + ), + ], + ), ), ); } diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index fbc0f3e1..f59f6c23 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -1,15 +1,12 @@ -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.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/charts/app_time_series_chart.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; - import 'LineChartCurved.dart'; class VitalSingChartAndDetials extends StatelessWidget { @@ -32,9 +29,52 @@ class VitalSingChartAndDetials extends StatelessWidget { @override Widget build(BuildContext context) { generateData(); - return timeSeriesData.length != 0 ? Column( - children: [ - AppExpandableNotifier( + return timeSeriesData.length != 0 + ? Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12) + ), + child: LineChartCurved( + title: name, + timeSeries: timeSeriesData, + indexes: timeSeriesData.length ~/ 5.5, + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), + padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12) + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Graph Details", + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + + fontFamily: 'Poppins', + ), + SizedBox(height: 8,), + VitalSignDetailsWidget( + vitalList: vitalList, + title1: title1, + title2: title2, + viewKey: viewKey, + ), + ], + ), + ), + /*AppExpandableNotifier( // isExpand: true, headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,), bodyWid: VitalSignDetailsWidget( @@ -43,26 +83,31 @@ class VitalSingChartAndDetials extends StatelessWidget { title2: title2, viewKey: viewKey, ), - ), - ], - ) : Container( - width: double.infinity, - height: MediaQuery.of(context).size.height, - child: Center( - child: AppText(TranslationBase.of(context).vitalSignDetailEmpty), - ), - ); + ),*/ + ], + ), + ) + : Container( + width: double.infinity, + height: MediaQuery.of(context).size.height, + child: Center( + child: AppText(TranslationBase.of(context).vitalSignDetailEmpty), + ), + ); } generateData() { if (vitalList.length > 0) { vitalList.reversed.toList().forEach( - (element) { - DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn); - if(element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0) + (element) { + DateTime elementDate = + DateUtils.getDateTimeFromServerFormat(element.createdOn); + if (element.toJson()[viewKey] != null && + element.toJson()[viewKey]?.toInt() != 0) timeSeriesData.add( TimeSeriesSales2( - new DateTime(elementDate.year, elementDate.month, elementDate.day), + new DateTime( + elementDate.year, elementDate.month, elementDate.day), element.toJson()[viewKey].toDouble(), ), ); diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index dd9f940f..ba27a793 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -1,14 +1,12 @@ -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.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/charts/app_time_series_chart.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; - -import 'LineChartCurved.dart'; import 'LineChartCurvedBloodPressure.dart'; class VitalSingChartBloodPressure extends StatelessWidget { @@ -36,27 +34,80 @@ class VitalSingChartBloodPressure extends StatelessWidget { @override Widget build(BuildContext context) { generateData(); - return Column( - children: [ - AppExpandableNotifier( - // isExpand: true, - headerWid: LineChartCurvedBloodPressure( - title: name, - timeSeries1: timeSeriesData1, - timeSeries2: timeSeriesData2, - indexes: timeSeriesData1.length ~/ 5.5, - ), - bodyWid: VitalSignBloodPressureWidget( - vitalList: vitalList, - title1: title1, - title2: title2, - title3: title3, - viewKey1: viewKey1, - viewKey2: viewKey2, - ), - ), - ], - ); + return timeSeriesData1.length != 0 || timeSeriesData2.length != 0 + ? Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: LineChartCurvedBloodPressure( + title: name, + timeSeries1: timeSeriesData1, + timeSeries2: timeSeriesData2, + indexes: timeSeriesData1.length ~/ 5.5, + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), + padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Graph Details", + fontSize: SizeConfig.textMultiplier * 2.3, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + SizedBox( + height: 8, + ), + VitalSignBloodPressureWidget( + vitalList: vitalList, + title1: title1, + title2: title2, + title3: title3, + viewKey1: viewKey1, + viewKey2: viewKey2, + ), + ], + ), + ), + /*AppExpandableNotifier( + // isExpand: true, + headerWid: LineChartCurvedBloodPressure( + title: name, + timeSeries1: timeSeriesData1, + timeSeries2: timeSeriesData2, + indexes: timeSeriesData1.length ~/ 5.5, + ), + bodyWid: VitalSignBloodPressureWidget( + vitalList: vitalList, + title1: title1, + title2: title2, + title3: title3, + viewKey1: viewKey1, + viewKey2: viewKey2, + ), + ),*/ + ], + ), + ) + : Container( + width: double.infinity, + height: MediaQuery.of(context).size.height, + child: Center( + child: AppText(TranslationBase.of(context).vitalSignDetailEmpty), + ), + ); } generateData() { diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index a7e10f25..2352ae32 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -1,10 +1,10 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; @@ -15,15 +15,16 @@ 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/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; addPrescriptionForm(context, PrescriptionViewModel model, PatiantInformtion patient, prescription) { @@ -49,7 +50,8 @@ postProcedure( DateTime doseTime, String doseUnit, String icdCode, - PatiantInformtion patient}) async { + PatiantInformtion patient, + String patientType}) async { PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel(); List sss = List(); @@ -78,8 +80,9 @@ postProcedure( await model.postPrescription(postProcedureReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } else if (model.state == ViewState.Idle) { + model.getPrescriptions(patient); DrAppToastMsg.showSuccesToast('Medication has been added'); } } @@ -102,6 +105,11 @@ class _PrescriptionFormWidgetState extends State { TextEditingController frequencyController = TextEditingController(); TextEditingController indicationController = TextEditingController(); TextEditingController instructionController = TextEditingController(); + + bool visbiltyPrescriptionForm = false; + bool visbiltySearch = true; + + final myController = TextEditingController(); DateTime selectedDate; dynamic selectedDrug; int strengthChar; @@ -195,12 +203,19 @@ class _PrescriptionFormWidgetState extends State { editedBy: '', doctorID: '', appointmentNo: widget.patient.appointmentNo); - await model.getMedicationList(); - await model.getMedicationStrength(); - await model.getMedicationDuration(); - await model.getMedicationRoute(); - await model.getMedicationFrequency(); - await model.getMedicationDoseTime(); + //await model.getMedicationList(); + if (model.medicationStrengthList.length == 0) { + await model.getMedicationStrength(); + } + //await model.getPrescription(mrn: widget.patient.patientMRN); + if (model.medicationDurationList.length == 0) { + await model.getMedicationDuration(); + } + //await model.getMedicationRoute(); + //await model.getMedicationFrequency(); + if (model.medicationDoseTimeList.length == 0) { + await model.getMedicationDoseTime(); + } //await model.getMedicationIndications(); await model.getPatientAssessment(getAssessmentReqModel); //await model.getItem(); @@ -217,8 +232,8 @@ class _PrescriptionFormWidgetState extends State { FocusScope.of(context).requestFocus(new FocusNode()); }, child: DraggableScrollableSheet( - initialChildSize: 0.90, - maxChildSize: 0.90, + initialChildSize: 0.98, + maxChildSize: 0.98, minChildSize: 0.9, builder: (BuildContext context, ScrollController scrollController) { @@ -230,28 +245,34 @@ class _PrescriptionFormWidgetState extends State { padding: EdgeInsets.symmetric( horizontal: 12.0, vertical: 10.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + //crossAxisAlignment: CrossAxisAlignment.start, //mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Row( + Column( children: [ - AppText( - 'New Prescription Order', - fontWeight: FontWeight.w700, - fontSize: 20, - ), SizedBox( - width: MediaQuery.of(context).size.width * 0.32, + height: 15, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + AppText( + 'New Prescription Order', + fontWeight: FontWeight.w700, + fontSize: 20, + ), + InkWell( + child: Icon( + Icons.close, + size: 24.0, + ), + onTap: () { + Navigator.pop(context); + }, + ) + ], ), - InkWell( - child: Icon( - Icons.close, - size: 23.0, - ), - onTap: () { - Navigator.pop(context); - }, - ) ], ), SizedBox( @@ -263,824 +284,1069 @@ class _PrescriptionFormWidgetState extends State { child: Column( //mainAxisAlignment: MainAxisAlignment.end, children: [ - Container( - height: MediaQuery.of(context).size.height * - 0.070, - color: Colors.white, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - setState(() { - _selectedMedication = null; - model.getItem( - itemID: _selectedMedication - .itemId); - }); - } - : null, - child: _selectedMedication == null - ? AutoCompleteTextField< - GetMedicationResponseModel>( - onFocusChanged: (__) { - if (_selectedMedication != - null) { - model.getItem( - itemID: - _selectedMedication - .itemId); - uom = _selectedMedication.uom; - } else { - null; - } - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController.text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); - box = model.boxQuintity; + // Container( + // height: MediaQuery.of(context).size.height * + // 0.070, + // color: Colors.white, + // child: InkWell( + // onTap: model.allMedicationList != null + // ? () { + // Helpers.hideKeyboard(context); + // setState(() { + // _selectedMedication = null; + // model.getItem( + // itemID: _selectedMedication + // .itemId); + // }); + // } + // : null, + // child: _selectedMedication == null + // ? AutoCompleteTextField< + // GetMedicationResponseModel>( + // onFocusChanged: (__) { + // if (_selectedMedication != + // null) { + // model.getItem( + // itemID: + // _selectedMedication + // .itemId); + // uom = _selectedMedication.uom; + // } else { + // null; + // } + // if (_selectedMedication != + // null && + // duration != null && + // frequency != null && + // strengthController.text != + // null) { + // model.getBoxQuantity( + // freq: frequency[ + // 'parameterCode'], + // duration: duration['id'], + // itemCode: + // _selectedMedication + // .itemId, + // strength: double.parse( + // strengthController + // .text)); + // box = model.boxQuintity; + // + // return; + // } + // }, + // decoration: + // textFieldSelectorDecoration( + // TranslationBase.of(context) + // .searchMedicineNameHere, + // _selectedMedication != null + // ? _selectedMedication + // .genericName + // : null, + // true, + // ), + // itemSubmitted: (item) => setState( + // () => _selectedMedication = + // item), + // key: key, + // suggestions: + // model.allMedicationList, + // itemBuilder: (context, + // suggestion) => + // new Padding( + // child: AppText(suggestion + // .description + + // '/' + + // suggestion + // .genericName), + // padding: + // EdgeInsets.all(15.0)), + // itemSorter: (a, b) => 1, + // suggestionsAmount: 7, + // itemFilter: (suggestion, input) => + // suggestion.genericName.toLowerCase().startsWith( + // input.toLowerCase()) || + // suggestion.description + // .toLowerCase() + // .startsWith(input + // .toLowerCase()) || + // suggestion.keywords + // .toLowerCase() + // .startsWith( + // input.toLowerCase()), + // ) + // : TextField( + // onEditingComplete: () { + // model.getItem( + // itemID: _selectedMedication + // .itemId); + // }, + // decoration: textFieldSelectorDecoration( + // TranslationBase.of(context) + // .searchMedicineNameHere, + // _selectedMedication != null + // ? _selectedMedication + // .description + + // ('${_selectedMedication.genericName}') + // : null, + // false, + // suffixIcon: + // Icon(Icons.search)), + // enabled: false, + // ), + // ), + // ), + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), + padding: EdgeInsets.all(10), + child: AppTextFormField( + onTap: () { + visbiltyPrescriptionForm = false; + visbiltySearch = true; + }, + borderColor: Colors.white, + hintText: TranslationBase.of(context) + .searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + onFieldSubmitted: (value) { + searchMedicine(context, model); + }, + inputFormatter: ONLY_LETTERS, + ), + ), + ), + SizedBox( + height: 15.0, + ), + Visibility( + visible: visbiltySearch, + child: Container( + child: Column( + children: [ + FractionallySizedBox( + widthFactor: 0.8, + child: Container( + child: Wrap( + alignment: WrapAlignment.center, + children: [ + // TODO change it secondary button and add loading + AppButton( + title: TranslationBase.of( + context) + .search, + onPressed: () async { + await searchMedicine( + context, model); + }, + ), + ], + ), + ), + ), + if (myController.text != '') + Container( + height: MediaQuery.of(context) + .size + .height * + 0.5, + child: ListView.builder( + padding: const EdgeInsets.only( + top: 20), - return; - } - }, - decoration: - textFieldSelectorDecoration( - TranslationBase.of(context) - .searchMedicineNameHere, - _selectedMedication != null - ? _selectedMedication - .genericName - : null, - true, + scrollDirection: Axis.vertical, + // shrinkWrap: true, + itemCount: + model.allMedicationList == + null + ? 0 + : model + .allMedicationList + .length, + itemBuilder: + (BuildContext context, + int index) { + return InkWell( + child: MedicineItemWidget( + label: model + .allMedicationList[ + index] + .description + // url: model + // .pharmacyItemsList[ + // index]["ImageSRCUrl"], + ), + onTap: () { + model.getItem( + itemID: model + .allMedicationList[ + index] + .itemId); + visbiltyPrescriptionForm = + true; + visbiltySearch = false; + _selectedMedication = + model.allMedicationList[ + index]; + uom = _selectedMedication + .uom; + }, + ); + }, ), - itemSubmitted: (item) => setState( - () => _selectedMedication = - item), - key: key, - suggestions: - model.allMedicationList, - itemBuilder: (context, - suggestion) => - new Padding( - child: Texts(suggestion - .description + - '/' + - suggestion - .genericName), - padding: - EdgeInsets.all(8.0)), - itemSorter: (a, b) => 1, - itemFilter: (suggestion, input) => - suggestion.genericName.toLowerCase().startsWith( - input.toLowerCase()) || - suggestion.description - .toLowerCase() - .startsWith(input - .toLowerCase()) || - suggestion.keywords - .toLowerCase() - .startsWith( - input.toLowerCase()), - ) - : TextField( - onEditingComplete: () { - model.getItem( - itemID: _selectedMedication - .itemId); - }, - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .searchMedicineNameHere, - _selectedMedication != null - ? _selectedMedication - .description + - ('${_selectedMedication.genericName}') - : null, - false, - suffixIcon: - Icon(Icons.search)), - enabled: false, ), + ], + ), ), ), SizedBox( height: spaceBetweenTextFileds, ), - Container( - child: Row( - children: [ - AppText( - 'Order Type', - fontWeight: FontWeight.w600, - ), - Radio( - activeColor: Color(0xFFB9382C), - value: 1, - groupValue: selectedType, - onChanged: (value) { - setSelectedType(value); - }, - ), - Text('Regular'), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.550, - child: TextFields( - inputFormatters: [ - LengthLimitingTextInputFormatter( - 5), - // WhitelistingTextInputFormatter - // .digitsOnly - ], - hintText: - TranslationBase.of(context) - .strength, - controller: strengthController, - keyboardType: - TextInputType.numberWithOptions( - decimal: true, + Visibility( + visible: visbiltyPrescriptionForm, + child: Container( + child: Column( + children: [ + Container( + child: Row( + children: [ + AppText( + 'Order Type', + fontWeight: FontWeight.w600, + ), + Radio( + activeColor: + Color(0xFFB9382C), + value: 1, + groupValue: selectedType, + onChanged: (value) { + setSelectedType(value); + }, + ), + Text('Regular'), + ], ), - onChanged: (String value) { - setState(() { - strengthChar = value.length; - }); - if (strengthChar >= 5) { - DrAppToastMsg.showErrorToast( - "Only 5 Digits allowed for strength"); - } - }, - onSubmit: (_) { - if (_selectedMedication != null && - duration != null && - frequency != null && - strengthController.text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); - box = model.boxQuintity; + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + width: double.infinity, + child: Row( + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.550, + child: TextFields( + inputFormatters: [ + LengthLimitingTextInputFormatter( + 5), + // WhitelistingTextInputFormatter + // .digitsOnly + ], + hintText: + TranslationBase.of( + context) + .strength, + controller: + strengthController, + keyboardType: TextInputType + .numberWithOptions( + decimal: true, + ), + onChanged: (String value) { + setState(() { + strengthChar = + value.length; + }); + if (strengthChar >= 5) { + DrAppToastMsg + .showErrorToast( + "Only 5 Digits allowed for strength"); + } + }, + onSubmit: (_) { + if (_selectedMedication != + null && + duration != null && + frequency != null && + strengthController + .text != + null) { + model.getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration['id'], + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text)); + box = model.boxQuintity; - return; - } - }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, + return; + } + }, + // validator: (value) { + // if (value.isEmpty && + // strengthController.text.length > + // 4) + // return TranslationBase.of(context) + // .emptyMessage; + // else + // return null; + // }, + ), + ), + SizedBox( + width: 10.0, + ), + Container( + color: Colors.white, + width: MediaQuery.of(context) + .size + .width * + 0.350, + child: InkWell( + onTap: + model.itemMedicineListUnit != + null + ? () { + Helpers + .hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineListUnit, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState( + () { + units = + selectedValue; + units['isDefault'] = + true; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: + context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'UNIT', + units != null + ? units[ + 'description'] + : null, + true), + enabled: false), + ), + ), + ], + ), ), - ), - SizedBox( - width: 10.0, - ), - Container( - color: Colors.white, - width: MediaQuery.of(context) - .size - .width * - 0.350, - child: InkWell( - onTap: model.itemMedicineListUnit != - null - ? () { - Helpers.hideKeyboard( - context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .itemMedicineListUnit, - attributeName: - 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - units = selectedValue; - units['isDefault'] = - true; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext - context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - 'UNIT', - units != null - ? units['description'] - : null, - true), - enabled: false, + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.itemMedicineListRoute != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineListRoute, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + route = + selectedValue; + route['isDefault'] = + true; + }); + if (route == + null) { + Helpers.showErrorToast( + 'plase fill'); + } + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .route, + route != null + ? route[ + 'description'] + : null, + true), + enabled: false, + ), ), ), - ), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.itemMedicineListRoute != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: - model.itemMedicineListRoute, - attributeName: 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - route = selectedValue; - route['isDefault'] = true; - }); - if (route == null) { - helpers.showErrorToast( - 'plase fill'); - } - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).route, - route != null - ? route['description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.itemMedicineList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.itemMedicineList, - attributeName: 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - frequency = selectedValue; - frequency['isDefault'] = - true; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController - .text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.itemMedicineList != null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineList, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + frequency = + selectedValue; + frequency[ + 'isDefault'] = + true; + if (_selectedMedication != null && + duration != + null && + frequency != + null && + strengthController + .text != + null) { + model.getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration[ + 'id'], + itemCode: + _selectedMedication + .itemId, + strength: + double.parse( + strengthController.text)); - return; - } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .frequency, - frequency != null - ? frequency['description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.medicationDoseTimeList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDoseTimeList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - doseTime = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .doseTime, - doseTime != null - ? doseTime['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - if (model.patientAssessmentList.isNotEmpty) - Container( - height: screenSize.height * 0.070, - width: double.infinity, - color: Colors.white, - child: Row( - children: [ + return; + } + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .frequency, + frequency != null + ? frequency[ + 'description'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.medicationDoseTimeList != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .medicationDoseTimeList, + attributeName: + 'nameEn', + attributeValueId: + 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + doseTime = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .doseTime, + doseTime != null + ? doseTime['nameEn'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + if (model + .patientAssessmentList.isNotEmpty) + Container( + height: screenSize.height * 0.070, + width: double.infinity, + color: Colors.white, + child: Row( + children: [ + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.29, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString(), + indication != + null + ? indication[ + 'name'] + : null, + false), + enabled: true, + readOnly: true, + ), + ), + ), + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.65, + color: Colors.white, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + maxLines: 5, + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .asciiDesc + .toString(), + indication != + null + ? indication[ + 'name'] + : null, + false), + enabled: true, + readOnly: true, + ), + ), + ), + ], + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, widget.model), + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .date, + selectedDate != null + ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.medicationDurationList != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .medicationDurationList, + attributeName: + 'nameEn', + attributeValueId: + 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + if (_selectedMedication != null && + duration != + null && + frequency != + null && + strengthController + .text != + null) { + model + .getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration[ + 'id'], + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text), + ); + box = model + .boxQuintity; + + return; + } + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .duration, + duration != null + ? duration['nameEn'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), Container( - width: MediaQuery.of(context) - .size - .width * - 0.29, + height: screenSize.height * 0.070, + color: Colors.white, child: InkWell( - onTap: indicationList != null + onTap: model.allMedicationList != + null ? () { Helpers.hideKeyboard( context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .allMedicationList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); } : null, child: TextField( decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString(), - indication != null - ? indication['name'] + "UOM", + uom != null + ? uom : null, false), - enabled: true, + //enabled: false, readOnly: true, ), ), ), + SizedBox( + height: spaceBetweenTextFileds), Container( - width: MediaQuery.of(context) - .size - .width * - 0.65, + height: screenSize.height * 0.070, color: Colors.white, child: InkWell( - onTap: indicationList != null + onTap: model.allMedicationList != + null ? () { Helpers.hideKeyboard( context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .allMedicationList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); } : null, child: TextField( - maxLines: 5, decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .asciiDesc - .toString(), - indication != null - ? indication['name'] + "Box Quantity", + box != null + ? "Box Quantity: " + + model + .boxQuintity + .toString() : null, false), - enabled: true, + //enabled: false, readOnly: true, ), ), ), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: () => - selectDate(context, widget.model), - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).date, - selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.medicationDurationList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDurationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController - .text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text), - ); - box = model.boxQuintity; - + SizedBox( + height: spaceBetweenTextFileds), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), + child: TextFields( + maxLines: 6, + minLines: 4, + hintText: + TranslationBase.of(context) + .instruction, + controller: instructionController, + //keyboardType: TextInputType.number, + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + color: Color(0xff359846), + title: TranslationBase.of( + context) + .addMedication, + fontWeight: FontWeight.w600, + onPressed: () { + formKey.currentState.save(); + // Navigator.pop(context); + // openDrugToDrug(); + if (route == null || + frequency == null || + doseTime == null || + duration == null || + selectedDate == null || + units == null) { + DrAppToastMsg.showErrorToast( + "Please Fill All Fields"); + return; + } + if (_selectedMedication + .isNarcotic == + true) { + DrAppToastMsg.showErrorToast( + "Narcotic medicine can only be prescribed from VIDA"); + Navigator.pop(context); return; } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .duration, - duration != null - ? duration['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - "UOM", - uom != null ? uom : null, - false), - //enabled: false, - readOnly: true, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - "Box Quantity", - box != null - ? "Box Quantity: " + - model.boxQuintity.toString() - : null, - false), - //enabled: false, - readOnly: true, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - child: TextFields( - maxLines: 6, - minLines: 4, - hintText: TranslationBase.of(context) - .instruction, - controller: instructionController, - //keyboardType: TextInputType.number, - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - color: Color(0xff359846), - title: TranslationBase.of(context) - .addMedication, - fontWeight: FontWeight.w600, - onPressed: () { - // formKey.currentState.save(); - // Navigator.pop(context); - // openDrugToDrug(); - if (route == null || - frequency == null || - doseTime == null || - duration == null || - selectedDate == null || - units == null) { - DrAppToastMsg.showErrorToast( - "Please Fill All Fields"); - return; - } - if (_selectedMedication - .isNarcotic == - true) { - DrAppToastMsg.showErrorToast( - "Narcotic medicine can only be prescribed from VIDA"); - Navigator.pop(context); - return; - } - if (double.parse( - strengthController.text) > - 1000.0) { - DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); - return; - } - if (double.parse( - strengthController.text) < - 0.0) { - DrAppToastMsg.showErrorToast( - "strength can't be zero"); - return; - } + if (double.parse( + strengthController + .text) > + 1000.0) { + DrAppToastMsg.showErrorToast( + "1000 is the MAX for the strength"); + return; + } + if (double.parse( + strengthController + .text) < + 0.0) { + DrAppToastMsg.showErrorToast( + "strength can't be zero"); + return; + } - if (formKey.currentState - .validate()) { - Navigator.pop(context); - openDrugToDrug(model); - { - /*// var x = model - // .patientAssessmentList - // .map((value) => - // value.icdCode10ID) - // .toList() - // .join(','); - - postProcedure( - icdCode: model - .patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .icdCode10ID - .isEmpty - ? "test" - : model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString() - : "TEST", - // icdCode: model - // .patientAssessmentList - // .map((value) => value - // .icdCode10ID - // .trim()) - // .toList() - // .join(' '), - dose: strengthController.text, - doseUnit: - units['parameterCode'] - .toString(), - patient: widget.patient, - doseTimeIn: - doseTime['id'].toString(), - model: widget.model, - duration: - duration['id'].toString(), - frequency: - frequency['parameterCode'] - .toString(), - route: route['parameterCode'] - .toString(), - drugId: _selectedMedication - .itemId - .toString(), - strength: - strengthController.text, - indication: - indicationController.text, - instruction: - instructionController - .text, - doseTime: selectedDate, - ); - */ - } - } + if (formKey.currentState + .validate()) { + Navigator.pop(context); + openDrugToDrug(model); + { + // postProcedure( + // icdCode: model + // .patientAssessmentList + // .isNotEmpty + // ? model + // .patientAssessmentList[ + // 0] + // .icdCode10ID + // .isEmpty + // ? "test" + // : model + // .patientAssessmentList[ + // 0] + // .icdCode10ID + // .toString() + // : "test", + // // icdCode: model + // // .patientAssessmentList + // // .map((value) => value + // // .icdCode10ID + // // .trim()) + // // .toList() + // // .join(' '), + // dose: + // strengthController + // .text, + // doseUnit: units[ + // 'parameterCode'] + // .toString(), + // patient: + // widget.patient, + // doseTimeIn: + // doseTime['id'] + // .toString(), + // model: widget.model, + // duration: + // duration['id'] + // .toString(), + // frequency: frequency[ + // 'parameterCode'] + // .toString(), + // route: route[ + // 'parameterCode'] + // .toString(), + // drugId: + // _selectedMedication + // .itemId + // .toString(), + // strength: + // strengthController + // .text, + // indication: + // indicationController + // .text, + // instruction: + // instructionController + // .text, + // doseTime: + // selectedDate, + // ); + } + } - { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // NewPrescriptionScreen()), - // ); - } - }, - ), - ], + { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // NewPrescriptionScreen()), + // ); + } + }, + ), + ], + ), + ), + ], + ), ), ), ], @@ -1162,7 +1428,7 @@ class _PrescriptionFormWidgetState extends State { context: context, builder: (context) { return Container( - height: SizeConfig.realScreenHeight * .5, + height: SizeConfig.realScreenHeight * .8, width: SizeConfig.realScreenWidth, child: SingleChildScrollView( child: Column( @@ -1178,6 +1444,7 @@ class _PrescriptionFormWidgetState extends State { title: TranslationBase.of(context).addMedication, onPressed: () { Navigator.pop(context); + postProcedure( icdCode: model.patientAssessmentList.isNotEmpty ? model.patientAssessmentList[0].icdCode10ID @@ -1207,6 +1474,36 @@ class _PrescriptionFormWidgetState extends State { instruction: instructionController.text, doseTime: selectedDate, ); + + // postProcedure( + // icdCode: model.patientAssessmentList.isNotEmpty + // ? model.patientAssessmentList[0].icdCode10ID + // .isEmpty + // ? "test" + // : model.patientAssessmentList[0].icdCode10ID + // .toString() + // : "test", + // // icdCode: model + // // .patientAssessmentList + // // .map((value) => value + // // .icdCode10ID + // // .trim()) + // // .toList() + // // .join(' '), + // dose: strengthController.text, + // doseUnit: units['parameterCode'].toString(), + // patient: widget.patient, + // doseTimeIn: doseTime['id'].toString(), + // model: widget.model, + // duration: duration['id'].toString(), + // frequency: frequency['parameterCode'].toString(), + // route: route['parameterCode'].toString(), + // drugId: _selectedMedication.itemId.toString(), + // strength: strengthController.text, + // indication: indicationController.text, + // instruction: instructionController.text, + // doseTime: selectedDate, + // ); }, )) ], @@ -1220,21 +1517,23 @@ class _PrescriptionFormWidgetState extends State { getPriscriptionforDrug(List prescriptionList) { var prescriptionDetails = []; - prescriptionList[0].entityList.forEach((element) { - if (element.mediSpanGPICode != null) { - prescriptionDetails.add({ - 'DrugId': element.mediSpanGPICode, - 'DrugName': element.medicationName, - 'Dose': element.doseDailyQuantity, - 'DoseType': element.doseDailyUnitID, - 'Unit': element.uom, - 'FrequencyType': element.frequencyID, - 'Duration': element.doseDurationDays, - 'RouteID': element.routeID, - 'IsScreen': element.isSIG - }); - } - }); + if (prescriptionList.length > 0) { + prescriptionList[0].entityList.forEach((element) { + if (element.mediSpanGPICode != null) { + prescriptionDetails.add({ + 'DrugId': element.mediSpanGPICode, + 'DrugName': element.medicationName, + 'Dose': element.doseDailyQuantity, + 'DoseType': element.doseDailyUnitID, + 'Unit': element.uom, + 'FrequencyType': element.frequencyID, + 'Duration': element.doseDurationDays, + 'RouteID': element.routeID, + 'IsScreen': element.isSIG + }); + } + }); + } if (_selectedMedication.mediSpanGPICode != null) { prescriptionDetails.add({ 'DrugId': _selectedMedication.mediSpanGPICode, @@ -1250,4 +1549,22 @@ class _PrescriptionFormWidgetState extends State { } return prescriptionDetails; } + + searchMedicine(context, MedicineViewModel model) async { + FocusScope.of(context).unfocus(); + // if (myController.text.isEmpty()) { + // Helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); + // //"Type Medicine Name") + // return; + // } + if (myController.text.length < 3) { + Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); + return; + } + + //GifLoaderDialogUtils.showMyDialog(context); + + await model.getMedicationList(drug: myController.text); + //GifLoaderDialogUtils.hideDialog(context); + } } diff --git a/lib/screens/prescription/drugtodrug.dart b/lib/screens/prescription/drugtodrug.dart index ec2bda43..15abfeb6 100644 --- a/lib/screens/prescription/drugtodrug.dart +++ b/lib/screens/prescription/drugtodrug.dart @@ -2,20 +2,14 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.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/model/medical_file_model.dart'; -import 'package:doctor_app_flutter/core/model/prescription_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_req_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.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/network_base_view.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/prescription/prescription_details_page.dart b/lib/screens/prescription/prescription_details_page.dart index e5d9ef7d..623cee90 100644 --- a/lib/screens/prescription/prescription_details_page.dart +++ b/lib/screens/prescription/prescription_details_page.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -45,7 +45,7 @@ class PrescriptionDetailsPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Texts( + child: AppText( prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN), @@ -70,7 +70,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).route, fontSize: 14, ))), @@ -79,7 +79,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).frequency, fontSize: 14, ))), @@ -88,7 +88,7 @@ class PrescriptionDetailsPage extends StatelessWidget { width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 4), child: Center( - child: Texts( + child: AppText( "${TranslationBase.of(context).dailyDoses}", fontSize: 14, ))), @@ -97,7 +97,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).duration, fontSize: 14, ))), @@ -144,7 +144,7 @@ class PrescriptionDetailsPage extends StatelessWidget { child: Center( child: Column( children: [ - Texts(TranslationBase.of(context).notes), + AppText(TranslationBase.of(context).notes), SizedBox( height: 5, ), @@ -155,7 +155,7 @@ class PrescriptionDetailsPage extends StatelessWidget { SizedBox( height: 5, ), - Texts(prescriptionReport.remarks ?? ''), + AppText(prescriptionReport.remarks ?? ''), ], ), ), diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart new file mode 100644 index 00000000..af0f66e5 --- /dev/null +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -0,0 +1,445 @@ +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.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/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionItemsInPatientPage extends StatelessWidget { + final PrescriotionInPatient prescriptions; + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final DateTime startOn; + final DateTime stopOn; + final int prescriptionIndex; + + PrescriptionItemsInPatientPage( + {Key key, + this.prescriptions, + this.patient, + this.patientType, + this.arrivalType, + this.stopOn, + this.startOn, + this.prescriptionIndex}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) async { + if (model.inPatientPrescription.length == 0) { + await model.getPrescriptionsInPatient(patient); + } + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + backgroundColor: Colors.grey[100], + baseViewModel: model, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString(), patient.arrivedOn), + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + // if (!prescriptions.isInOutPatient) + // ...List.generate( + // model.prescriptionReportList.length, + // (index) => Container( + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(12), + // color: Colors.white, + // ), + // margin: EdgeInsets.all(12), + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Container( + // margin: + // EdgeInsets.only(left: 18, right: 18), + // child: AppText( + // model.prescriptionReportList[index] + // .itemDescription.isNotEmpty + // ? model + // .prescriptionReportList[index] + // .itemDescription + // : model + // .prescriptionReportList[index] + // .itemDescriptionN, + // bold: true, + // )), + // SizedBox( + // height: 12, + // ), + // Row( + // children: [ + // SizedBox( + // width: 18, + // ), + // Container( + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // border: Border.all( + // width: 0.5, + // color: Colors.grey)), + // height: 55, + // width: 55, + // child: InkWell( + // onTap: () { + // showDialog( + // context: context, + // child: ShowImageDialog( + // imageUrl: model + // .prescriptionReportEnhList[ + // index] + // .imageSRCUrl, + // )); + // }, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: Image.network( + // model + // .prescriptionReportList[index] + // .imageSRCUrl, + // fit: BoxFit.cover, + // ), + // ), + // ), + // ), + // SizedBox( + // width: 10, + // ), + // Expanded( + // child: Column( + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .route, + // color: Colors.grey, + // ), + // Expanded( + // child: AppText(" " + + // model + // .prescriptionReportList[ + // index] + // .routeN)), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .frequency, + // color: Colors.grey, + // ), + // AppText(" " + + // model + // .prescriptionReportList[ + // index] + // .frequencyN ?? + // ''), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .dailyDoses, + // color: Colors.grey, + // ), + // AppText(" " + + // model + // .prescriptionReportList[ + // index] + // .doseDailyQuantity ?? + // ''), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .duration, + // color: Colors.grey, + // ), + // AppText(" " + + // model + // .prescriptionReportList[ + // index] + // .days + // .toString() ?? + // ''), + // ], + // ), + // SizedBox( + // height: 12, + // ), + // AppText(model + // .prescriptionReportList[ + // index] + // .remarks ?? + // ''), + // ], + // ), + // ) + // ], + // ) + // ], + // ), + // ), + // )) + // else + + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18, right: 18), + child: AppText( + model.inPatientPrescription[prescriptionIndex] + .itemDescription, + bold: true, + ), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 18, + ), + // Container( + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // border: Border.all( + // width: 0.5, color: Colors.grey)), + // height: 55, + // width: 55, + // child: InkWell( + // onTap: () { + // showDialog( + // context: context, + // // child: ShowImageDialog( + // // imageUrl: model + // // .inPatientPrescription[index] + // // .imageSRCUrl, + // // ), + // ); + // }, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // // child: Image.network( + // // model.prescriptionReportEnhList[index] + // // .imageSRCUrl, + // // fit: BoxFit.cover, + // // ), + // ), + // ), + // ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + 'Direction', + color: Colors.grey, + ), + Expanded( + child: AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .direction ?? + '')), + ], + ), + Row( + children: [ + AppText( + 'Route', + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .route + .toString() ?? + ''), + ], + ), + Row( + children: [ + AppText( + 'Refill', + color: Colors.grey, + ), + Expanded( + child: AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .refillType ?? + '')), + ], + ), + Row( + children: [ + AppText( + 'Start Date ', + color: Colors.grey, + ), + Expanded( + child: AppText( + '${DateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ), + ], + ), + Row( + children: [ + AppText( + 'Stop Date', + color: Colors.grey, + ), + Expanded( + child: AppText( + '${DateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ), + ], + ), + Row( + children: [ + AppText( + 'UOM', + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .unitofMeasurementDescription ?? + ''), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).dailyDoses, + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .dose + .toString() ?? + ''), + ], + ), + Row( + children: [ + AppText( + 'Status', + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .statusDescription + .toString() ?? + ''), + ], + ), + Row( + children: [ + AppText( + 'Processed', + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .processedBy ?? + ''), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).dailyDoses, + color: Colors.grey, + ), + AppText(" " + + model + .inPatientPrescription[ + prescriptionIndex] + .dose + .toString() ?? + ''), + ], + ), + SizedBox( + height: 12, + ), + AppText(model + .inPatientPrescription[ + prescriptionIndex] + .comments ?? + ''), + ], + ), + ) + ], + ) + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 031ee85f..06d9634c 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -1,21 +1,22 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.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/screens/prescription/prescription_details_page.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/Text.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class PrescriptionItemsPage extends StatelessWidget { final Prescriptions prescriptions; final PatiantInformtion patient; - PrescriptionItemsPage({Key key, this.prescriptions, this.patient}); + final String patientType; + final String arrivalType; + PrescriptionItemsPage({Key key, this.prescriptions, this.patient, this.patientType, this.arrivalType}); @override Widget build(BuildContext context) { @@ -24,198 +25,203 @@ class PrescriptionItemsPage extends StatelessWidget { model.getPrescriptionReport(prescriptions: prescriptions,patient: patient), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - appBarTitle: TranslationBase.of(context).prescriptions, + backgroundColor: Colors.grey[100], baseViewModel: model, + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patientType??"0", + arrivalType: arrivalType??"0", + clinic: prescriptions.clinicDescription, + branch: prescriptions.name, + isPrescriptions: true, + appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), + doctorName: prescriptions.doctorName, + profileUrl: prescriptions.doctorImageURL, + ), body: SingleChildScrollView( child: Container( child: Column( children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 18,right: 18), - child: Texts('Name ',bold: true,)), - Row( - children: [ - SizedBox(width: 18,), - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all(width: 0.5,color: Colors.grey) - ), - height: 45, - width: 45, - ), - SizedBox(width: 10,), - Expanded(child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts('Route: Monthly'), - Texts('Does: 2 Time a day with 1 hour gap'), - SizedBox(height: 12,), - Texts('Note: 2 Time a day with 1 hour gap'), - ], - ),) - - - ], - ) - ], - ), - ), - ), if (!prescriptions.isInOutPatient) ...List.generate( model.prescriptionReportList.length, - (index) => InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: PrescriptionDetailsPage( - prescriptionReport: - model.prescriptionReportList[index], - ), - ), + (index) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, ), - child: Container( - width: double.infinity, - margin: - EdgeInsets.only(top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Colors.grey[200], width: 0.5), - ), - child: Row( - children: [ - ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(5)), - child: Image.network( - model.prescriptionReportList[index] - .imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center( - child: Texts(model - .prescriptionReportList[index] - .itemDescription - .isNotEmpty - ? model.prescriptionReportList[index] - .itemDescription - : model.prescriptionReportList[index] - .itemDescriptionN)), - )), - Icon( - Icons.arrow_forward_ios, - size: 18, - color: Colors.grey[500], + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18,right: 18), + child: AppText(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)), + SizedBox(height: 12,), + Row( + children: [ + SizedBox(width: 18,), + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(width: 0.5,color: Colors.grey) + ), + height: 55, + width: 55, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportList[index].imageSRCUrl, + fit: BoxFit.cover, + ), + ), + ), + ), + SizedBox(width: 10,), + Expanded(child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText(TranslationBase.of(context).route,color: Colors.grey,), + Expanded(child: AppText(" "+model.prescriptionReportList[index].routeN)), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).frequency,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].frequencyN ?? ''), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).duration,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].days.toString() ?? ''), + ], + ), + SizedBox(height: 12,), + AppText(model.prescriptionReportList[index].remarks ?? ''), + ], + ),) + + + ], ) ], ), ), )) + else - ...List.generate( - model.prescriptionReportEnhList.length, - (index) => InkWell( - onTap: () { - PrescriptionReport prescriptionReport = - PrescriptionReport( - imageSRCUrl: model - .prescriptionReportEnhList[index].imageSRCUrl, - itemDescription: model - .prescriptionReportEnhList[index] - .itemDescription, - itemDescriptionN: model - .prescriptionReportEnhList[index] - .itemDescription, - routeN: - model.prescriptionReportEnhList[index].route, - frequency: model - .prescriptionReportEnhList[index].frequency, - frequencyN: model - .prescriptionReportEnhList[index].frequency, - doseDailyQuantity: model - .prescriptionReportEnhList[index] - .doseDailyQuantity, - days: model.prescriptionReportEnhList[index].days, - itemID: - model.prescriptionReportEnhList[index].itemID, - remarks: model - .prescriptionReportEnhList[index].remarks); - Navigator.push( - context, - FadePage( - page: PrescriptionDetailsPage( - prescriptionReport: prescriptionReport, - ), + ...List.generate( + model.prescriptionReportEnhList.length, + (index) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18,right: 18), + child: AppText(model.prescriptionReportEnhList[index].itemDescription,bold: true,),), + SizedBox(height: 12,), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(width: 18,), + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(width: 0.5,color: Colors.grey) + ), + height: 55, + width: 55, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + + ), + ), + ), + ), + SizedBox(width: 10,), + Expanded(child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText(TranslationBase.of(context).route,color: Colors.grey,), + Expanded(child: AppText(" "+model.prescriptionReportEnhList[index].route??'')), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).frequency,color: Colors.grey,), + AppText(" "+model.prescriptionReportEnhList[index].frequency ?? ''), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + AppText(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''), + ], + ), + Row( + children: [ + AppText(TranslationBase.of(context).duration,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].days.toString() ?? ''), + ], + ), + SizedBox(height: 12,), + AppText(model.prescriptionReportEnhList[index].remarks?? ''), + ], + ),) + + + ], + ) + ], ), - ); - }, - child: Container( - margin: EdgeInsets.all(8.0), - color: Colors.white, - child: Row( - children: [ - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), - child: Image.network( - model - .prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(model.prescriptionReportEnhList[index] - .itemDescription), - ], - ), - ), - ), - Icon( - Icons.arrow_forward_ios, - size: 18, - color: Colors.grey[500], - ) - ], ), ), - ), - ), + ), + + ], ), @@ -225,3 +231,6 @@ class PrescriptionItemsPage extends StatelessWidget { ); } } + + + diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 18655e65..3b207d5a 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -3,14 +3,13 @@ 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/screens/prescription/add_prescription_form.dart'; import 'package:doctor_app_flutter/screens/prescription/update_prescription_form.dart'; -import 'package:doctor_app_flutter/util/helpers.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/profile/patient-page-header-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/network_base_view.dart'; import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; class NewPrescriptionScreen extends StatefulWidget { @override @@ -227,7 +226,7 @@ class _NewPrescriptionScreenState extends State { 13.5, ), AppText( - Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn != + DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != null ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) .month) @@ -250,7 +249,7 @@ class _NewPrescriptionScreenState extends State { .green, ), AppText( - Helpers.getTimeFormated(DateTime.parse(model + DateUtils.getTimeFormated(DateTime.parse(model .prescriptionList[ 0] .entityList[ @@ -290,7 +289,7 @@ class _NewPrescriptionScreenState extends State { Expanded( child: AppText( - Helpers.getDateFormatted(DateTime.parse(model + DateUtils.getDateFormatted(DateTime.parse(model .prescriptionList[0] .entityList[index] .startDate)), diff --git a/lib/screens/prescription/prescription_screen_history.dart b/lib/screens/prescription/prescription_screen_history.dart index 940cfc2a..cf038ff6 100644 --- a/lib/screens/prescription/prescription_screen_history.dart +++ b/lib/screens/prescription/prescription_screen_history.dart @@ -1,16 +1,13 @@ import 'package:doctor_app_flutter/core/viewModel/prescription_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/screens/prescription/add_prescription_form.dart'; -import 'package:doctor_app_flutter/screens/prescription/update_prescription_form.dart'; -import 'package:doctor_app_flutter/util/helpers.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/profile/patient-page-header-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/network_base_view.dart'; import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; class NewPrescriptionHistoryScreen extends StatefulWidget { @override @@ -128,7 +125,7 @@ class _NewPrescriptionHistoryScreenState 13.5, ), AppText( - Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn != + DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != null ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) .month) @@ -151,7 +148,7 @@ class _NewPrescriptionHistoryScreenState .green, ), AppText( - Helpers.getTimeFormated(DateTime.parse(model + DateUtils.getTimeFormated(DateTime.parse(model .prescriptionList[ 0] .entityList[ @@ -190,7 +187,7 @@ class _NewPrescriptionHistoryScreenState Expanded( child: AppText( - Helpers.getDateFormatted(DateTime.parse(model + DateUtils.getDateFormatted(DateTime.parse(model .prescriptionList[0] .entityList[index] .startDate)), diff --git a/lib/screens/prescription/prescription_warnings.dart b/lib/screens/prescription/prescription_warnings.dart index 44bcab0c..c91ce9c9 100644 --- a/lib/screens/prescription/prescription_warnings.dart +++ b/lib/screens/prescription/prescription_warnings.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 9f7e7f2f..19ce09e4 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -1,23 +1,23 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.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/screens/prescription/add_prescription_form.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescription_item_in_patient_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.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/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/doctor_card.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class PrescriptionsPage extends StatelessWidget { - @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -25,90 +25,196 @@ class PrescriptionsPage extends StatelessWidget { String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; ProjectViewModel projectViewModel = Provider.of(context); - return BaseView( - onModelReady: (model) => model.getPrescriptions(patient), + return BaseView( + onModelReady: (model) => + patient.admissionNo != null && patient.admissionNo != "0" + ? model.getPrescriptionsInPatient(patient) + : model.getPrescriptions(patient, patientType: patientType), builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: FractionallySizedBox( - widthFactor: 1.0, - child: ListView( - physics: BouncingScrollPhysics(), - children: [ - PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), - SizedBox(height: 12,), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts('Order',style: "caption2",color: Colors.black,fontSize: 13,), - Texts('Prescriptions',bold: true,fontSize: 22,), - ], - ), - ), - if(patientType!=null && patientType=='7') - InkWell( - onTap: (){ - //TODO Hussam call the add page here - }, - child: Container( - width: double.maxFinite, - height: 140, - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Container( - height: 90, - child: Column( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Icon(Icons.add,color: Colors.white,), - ), - ), - SizedBox(height: 10,), - Texts('Apply for New Prescriptions Order',color: Colors.grey[600],fontWeight: FontWeight.w600,) - ], - ), + baseViewModel: model, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType ?? '0', arrivalType), + body: patient.admissionNo == null + ? FractionallySizedBox( + widthFactor: 1.0, + child: ListView( + physics: BouncingScrollPhysics(), + children: [ + SizedBox( + height: 12, + ), + if (model.prescriptionsList.isNotEmpty && + patient.patientStatusType != 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Order', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Prescriptions', + bold: true, + fontSize: 22, + ), + ], ), ), - ), - ), - ...List.generate(model.prescriptionsList.length, (index) => InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: PrescriptionItemsPage( - prescriptions: model.prescriptionsList[index], - patient: patient, + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Order', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Prescriptions', + bold: true, + fontSize: 22, + ), + ], ), ), - ), - child: DoctorCard( - doctorName: model.prescriptionsList[index].doctorName, - profileUrl: model.prescriptionsList[index].doctorImageURL, - branch: model.prescriptionsList[index].name, - appointmentDate: DateUtils.getDateTimeFromServerFormat(model.prescriptionsList[index].appointmentDate,), - orderNo: model.prescriptionsList[index].appointmentNo.toString(), - invoiceNO:model.prescriptionsList[index].appointmentNo.toString(), - - ) - - )) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + AddNewOrder( + onTap: () { + addPrescriptionForm(context, model, patient, + model.prescriptionList); + }, + label: 'Apply for New Prescriptions Order', + ), + ...List.generate( + model.prescriptionsList.length, + (index) => InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: PrescriptionItemsPage( + prescriptions: + model.prescriptionsList[index], + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + ), + ), + ), + child: DoctorCard( + doctorName: + model.prescriptionsList[index].doctorName, + profileUrl: model + .prescriptionsList[index].doctorImageURL, + branch: model.prescriptionsList[index].name, + clinic: model.prescriptionsList[index] + .clinicDescription, + isPrescriptions: true, + appointmentDate: + DateUtils.getDateTimeFromServerFormat( + model.prescriptionsList[index] + .appointmentDate, + ), + ))), + if (model.prescriptionsList.isEmpty && + patient.patientStatusType != 43) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Prescriptions Found'), + ) + ], + ), + ) + ], + ), + ) + : FractionallySizedBox( + widthFactor: 1.0, + child: ListView( + physics: BouncingScrollPhysics(), + children: [ + // SizedBox( + // height: 12, + // ), - ], - ), - ), - )); + ...List.generate( + model.inPatientPrescription.length, + (index) => InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: PrescriptionItemsInPatientPage( + prescriptionIndex: index, + prescriptions: model + .inPatientPrescription[index], + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + startOn: DateUtils + .getDateTimeFromServerFormat( + model.inPatientPrescription[index] + .startDatetime, + ), + stopOn: DateUtils + .getDateTimeFromServerFormat( + model.inPatientPrescription[index] + .stopDatetime, + ), + ), + ), + ), + child: InPatientDoctorCard( + doctorName: model.inPatientPrescription[index] + .itemDescription, + profileUrl: 'sss', + branch: 'hamza', + clinic: 'basheer', + isPrescriptions: true, + appointmentDate: + DateUtils.getDateTimeFromServerFormat( + model.inPatientPrescription[index] + .prescriptionDatetime, + ), + createdBy: model.inPatientPrescription[index] + .createdByName, + ))), + if (model.inPatientPrescription.length == 0) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + 'No Prescriptions Found In Patentiss'), + ) + ], + ), + ) + ], + ), + ))); } } diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 7c1bc88e..378909ad 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -1,5 +1,4 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; @@ -12,10 +11,9 @@ 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/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/cupertino.dart'; @@ -204,7 +202,7 @@ class _UpdatePrescriptionFormState extends State { // itemBuilder: (context, // suggestion) => // new Padding( - // child: Texts(suggestion + // child: AppText(suggestion // .description + // '/' + // suggestion.genericName), @@ -666,7 +664,7 @@ class _UpdatePrescriptionFormState extends State { child: TextField( decoration: Helpers .textFieldSelectorDecoration( - Helpers.getDateFormatted( + DateUtils.getDateFormatted( DateTime.parse( widget.startDate)), selectedDate != null @@ -1005,7 +1003,7 @@ class _UpdatePrescriptionFormState extends State { updatePrescriptionReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('Medication has been updated'); } diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart new file mode 100644 index 00000000..5b882c94 --- /dev/null +++ b/lib/screens/procedures/ProcedureCard.dart @@ -0,0 +1,210 @@ +//import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.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/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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ProcedureCard extends StatelessWidget { + final Function onTap; + final EntityList entityList; + final String categoryName; + final int categoryID; + final PatiantInformtion patient; + final String doctorName; + + const ProcedureCard({ + Key key, + this.onTap, + this.entityList, + this.categoryID, + this.categoryName, + this.patient, + this.doctorName, + }) : super(key: key); + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return Container( + width: double.maxFinite, + height: MediaQuery.of(context).size.height * .22, + margin: EdgeInsets.all(10), + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + ), + child: Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: MediaQuery.of(context).size.height * .20, + width: 5, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10), + ), + color: + entityList.orderType == 0 ? Colors.black : Colors.red[500], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.only( + left: projectViewModel.isArabic ? 0 : 15, + right: projectViewModel.isArabic ? 15 : 0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + entityList.orderType == 0 + ? 'Routine' + : 'Urgent', + color: entityList.orderType == 0 + ? Colors.black + : Colors.red[800], + fontWeight: FontWeight.w600, + ), + SizedBox( + height: 5, + ), + AppText( + entityList.procedureName, + bold: true, + fontSize: 14, + ), + ], + ), + ), + SizedBox( + width: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + '${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', + fontWeight: FontWeight.w600, + color: Colors.grey[700], + fontSize: 14, + ), + ], + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).orderNo, + //color: Colors.grey, + fontSize: 12, + color: Colors.grey, + ), + AppText( + entityList.orderNo.toString(), + fontSize: 12, + bold: true, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).doctorName + ": ", + //color: Colors.grey, + fontSize: 12, + color: Colors.grey, + ), + AppText( + entityList.doctorName.toString(), + fontSize: 12, + bold: true, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).clinic + ": ", + //color: Colors.grey, + fontSize: 12, + color: Colors.grey, + ), + AppText( + entityList.clinicDescription ?? "", + bold: true, + fontSize: 12, + ), + ], + ), + /*Container( + alignment: Alignment.centerRight, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FlowChartPage( + filterName: entityList.procedureName, + patient: patient, + ), + ), + ); + }, + child: AppText( + TranslationBase.of(context).showMoreBtn, + textDecoration: TextDecoration.underline, + color: Colors.blue, + ), + ), + ),*/ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // AppText( + // entityList.remarks.toString() ?? '', + // fontSize: 12, + // ), + // if (entityList.categoryID == 2 || + // entityList.categoryID == 4 && + // doctorName == entityList.doctorName) + // InkWell( + // child: Icon(DoctorApp.edit), + // onTap: onTap, + // ) + // ], + // ) + ], + ), + //onTap: onTap, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/screens/procedures/add-procedure-form.dart b/lib/screens/procedures/add-procedure-form.dart index 605bb61c..17d09159 100644 --- a/lib/screens/procedures/add-procedure-form.dart +++ b/lib/screens/procedures/add-procedure-form.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; @@ -9,10 +8,11 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_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/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/shared/TextFields.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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; @@ -74,22 +74,22 @@ postProcedure( await model.postProcedure(postProcedureReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); model.getProcedure(mrn: patient.patientMRN); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been added'); } } else { if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); model.getProcedure(mrn: patient.patientMRN); } else if (model.state == ViewState.Idle) { - helpers.showErrorToast( + Helpers.showErrorToast( model.valadteProcedureList[0].entityList[0].warringMessages); } } } else { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } @@ -141,216 +141,237 @@ class _AddSelectedProcedureState extends State { return BaseView( onModelReady: (model) => model.getCategory(), builder: (BuildContext context, ProcedureViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Please Select Category', - fontWeight: FontWeight.w900, - fontSize: 15.0, - ), - SizedBox( - height: 10.0, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.categoryList != null && - model.categoryList.length > 0 - ? () { - ListSelectDialog dialog = ListSelectDialog( - list: model.categoryList, - attributeName: 'categoryName', - attributeValueId: 'categoryId', - okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - selectedCategory = selectedValue; - model.getProcedureCategory( - categoryName: selectedCategory[ - 'categoryName'], - categoryID: selectedCategory[ - 'categoryId'] <= - 9 - ? "0" + - selectedCategory[ - 'categoryId'] - .toString() - : selectedCategory[ - 'categoryId'] - .toString()); - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - //model.getProcedureCategory(); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .procedureCategorise, - selectedCategory != null - ? selectedCategory['categoryName'] - : null, - true, - suffixIcon: Icon( - Icons.search, - color: Colors.black, - )), - enabled: false, - ), + AppScaffold( + isShowAppBar: false, + body: NetworkBaseView( + baseViewModel: model, + child: DraggableScrollableSheet( + minChildSize: 0.90, + initialChildSize: 0.95, + maxChildSize: 1.0, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.20, + child: Padding( + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + 'Please Select Category', + fontWeight: FontWeight.w700, + fontSize: 20, + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.29, + ), + InkWell( + child: Icon( + Icons.close, + size: 24.0, + ), + onTap: () { + Navigator.pop(context); + }, + ), + ], ), - ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: selectedCategory != null - ? selectedCategory['categoryId'] == 02 || - selectedCategory['categoryId'] == 03 - ? EntityListCheckboxSearchWidget( - model: widget.model, - masterList: widget.model - .categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); - }, - isEntityListSelected: (master) => - isEntityListSelected(master), - ) - : ProcedureListWidget( - model: widget.model, - masterList: widget.model - .categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); - }, - isEntityListSelected: (master) => - isEntityListSelected(master), - ) - : null), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // Container( - // child: Row( - // children: [ - // AppText( - // TranslationBase.of(context).orderType), - // Radio( - // activeColor: Color(0xFFB9382C), - // value: 1, - // groupValue: selectedType, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text('routine'), - // Radio( - // activeColor: Color(0xFFB9382C), - // groupValue: selectedType, - // value: 0, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text(TranslationBase.of(context).urgent), - // ], - // ), - // ), - // SizedBox( - // height: 15.0, - // ), - // TextFields( - // hintText: TranslationBase.of(context).remarks, - // controller: remarksController, - // minLines: 3, - // maxLines: 5, - // ), - SizedBox( - height: 100.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: TranslationBase.of(context) - .addSelectedProcedures, - onPressed: () { - //print(entityList.toString()); - onPressed: - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - "Fill the mandatory procedure details"); - return; - } - - Navigator.pop(context); - postProcedure( - orderType: selectedType.toString(), - entityList: entityList, - patient: patient, - model: widget.model, - remarks: remarksController.text); - }, - ), - ], + SizedBox( + height: 10.0, + ), + Container( + height: screenSize.height * 0.070, + child: InkWell( + onTap: model.categoryList != null && + model.categoryList.length > 0 + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: model.categoryList, + attributeName: 'categoryName', + attributeValueId: 'categoryId', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + selectedCategory = selectedValue; + model.getProcedureCategory( + categoryName: selectedCategory[ + 'categoryName'], + categoryID: selectedCategory[ + 'categoryId'] <= + 9 + ? "0" + + selectedCategory[ + 'categoryId'] + .toString() + : selectedCategory[ + 'categoryId'] + .toString()); + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + //model.getProcedureCategory(); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context) + .procedureCategorise, + selectedCategory != null + ? selectedCategory['categoryName'] + : null, + true, + suffixIcon: Icon( + Icons.search, + color: Colors.black, + )), + enabled: false, ), ), - ], - ) - ], + ), + if (widget.model.categoriesList.length != 0) + NetworkBaseView( + baseViewModel: model, + child: selectedCategory != null + ? selectedCategory['categoryId'] == 02 || + selectedCategory['categoryId'] == 03 + ? EntityListCheckboxSearchWidget( + model: widget.model, + masterList: widget.model + .categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + ) + : ProcedureListWidget( + model: widget.model, + masterList: widget.model + .categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + ) + : null), + SizedBox( + height: 15.0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // Container( + // child: Row( + // children: [ + // AppText( + // TranslationBase.of(context).orderType), + // Radio( + // activeColor: Color(0xFFB9382C), + // value: 1, + // groupValue: selectedType, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text('routine'), + // Radio( + // activeColor: Color(0xFFB9382C), + // groupValue: selectedType, + // value: 0, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text(TranslationBase.of(context).urgent), + // ], + // ), + // ), + // SizedBox( + // height: 15.0, + // ), + // TextFields( + // hintText: TranslationBase.of(context).remarks, + // controller: remarksController, + // minLines: 3, + // maxLines: 5, + // ), + SizedBox( + height: 100.0, + ), + ], + ) + ], + ), ), ), - ), - ); - }), + ); + }), + ), + bottomSheet: Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: TranslationBase.of(context).addSelectedProcedures, + color: Color(0xff359846), + fontWeight: FontWeight.w700, + onPressed: () { + //print(entityList.toString()); + onPressed: + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + "Fill the mandatory procedure details"); + return; + } + + Navigator.pop(context); + postProcedure( + orderType: selectedType.toString(), + entityList: entityList, + patient: patient, + model: widget.model, + remarks: remarksController.text); + }, + ), + ], + ), + ), ), ); } diff --git a/lib/screens/procedures/add_lab_orders.dart b/lib/screens/procedures/add_lab_orders.dart index ada0641b..b7bc2835 100644 --- a/lib/screens/procedures/add_lab_orders.dart +++ b/lib/screens/procedures/add_lab_orders.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; @@ -9,16 +8,14 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_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/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/util/helpers.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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'entity_list_checkbox_search_widget.dart'; -import 'entity_list_procedure_widget.dart'; valdateProcedure(ProcedureViewModel model, PatiantInformtion patient, List entityList) async { @@ -74,22 +71,22 @@ postProcedure( await model.postProcedure(postProcedureReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - model.getProcedure(mrn: patient.patientMRN); + Helpers.showErrorToast(model.error); + model.getLabs(patient); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been added'); } } else { if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - model.getProcedure(mrn: patient.patientMRN); + Helpers.showErrorToast(model.error); + model.getLabs(patient); } else if (model.state == ViewState.Idle) { - helpers.showErrorToast( + Helpers.showErrorToast( model.valadteProcedureList[0].entityList[0].warringMessages); } } } else { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } @@ -142,136 +139,110 @@ class _AddSelectedLabOrderState extends State { onModelReady: (model) => model.getProcedureCategory( categoryName: "Laboratory", categoryID: "02"), builder: (BuildContext context, ProcedureViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'New Lab Order', - fontWeight: FontWeight.w900, - fontSize: 18.0, - ), - SizedBox( - height: 10.0, - ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: EntityListCheckboxSearchWidget( - model: widget.model, - masterList: - widget.model.categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); + AppScaffold( + isShowAppBar: false, + body: NetworkBaseView( + baseViewModel: model, + child: DraggableScrollableSheet( + minChildSize: 0.90, + initialChildSize: 0.95, + maxChildSize: 1.0, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * .90, + child: Padding( + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + 'New Lab Order', + fontWeight: FontWeight.w700, + fontSize: 20, + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.48, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); }, - isEntityListSelected: (master) => - isEntityListSelected(master), - )), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // Container( - // child: Row( - // children: [ - // AppText( - // TranslationBase.of(context).orderType), - // Radio( - // activeColor: Color(0xFFB9382C), - // value: 1, - // groupValue: selectedType, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text('routine'), - // Radio( - // activeColor: Color(0xFFB9382C), - // groupValue: selectedType, - // value: 0, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text(TranslationBase.of(context).urgent), - // ], - // ), - // ), - // SizedBox( - // height: 15.0, - // ), - // TextFields( - // hintText: TranslationBase.of(context).remarks, - // controller: remarksController, - // minLines: 3, - // maxLines: 5, - // ), - SizedBox( - height: 100.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: TranslationBase.of(context) - .addSelectedProcedures, - color: Color(0xff359846), - onPressed: () { - //print(entityList.toString()); - onPressed: - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - "Fill the mandatory procedure details"); - return; - } - - Navigator.pop(context); - postProcedure( - orderType: selectedType.toString(), - entityList: entityList, - patient: patient, - model: widget.model, - remarks: remarksController.text); - }, - ), - ], ), - ), - ], - ) - ], + ], + ), + SizedBox( + height: 10.0, + ), + if (widget.model.categoriesList.length != 0) + NetworkBaseView( + baseViewModel: model, + child: EntityListCheckboxSearchWidget( + model: widget.model, + masterList: + widget.model.categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + )), + ], + ), ), ), - ), - ); - }), + ); + }), + ), + bottomSheet: Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: "Add Lab Order", //TranslationBase.of(context) + fontWeight: FontWeight.w700, + //.addSelectedProcedures, + color: Color(0xff359846), + onPressed: () { + //print(entityList.toString()); + onPressed: + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + "Fill the mandatory procedure details"); + return; + } + + Navigator.pop(context); + postProcedure( + orderType: selectedType.toString(), + entityList: entityList, + patient: patient, + model: widget.model, + remarks: remarksController.text); + }, + ), + ], + ), + ), ), ); } diff --git a/lib/screens/procedures/add_radiology_order.dart b/lib/screens/procedures/add_radiology_order.dart index c523c2b0..4c1c8468 100644 --- a/lib/screens/procedures/add_radiology_order.dart +++ b/lib/screens/procedures/add_radiology_order.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; @@ -9,16 +8,14 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_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/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/util/helpers.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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'entity_list_checkbox_search_widget.dart'; -import 'entity_list_procedure_widget.dart'; valdateProcedure(ProcedureViewModel model, PatiantInformtion patient, List entityList) async { @@ -74,22 +71,22 @@ postProcedure( await model.postProcedure(postProcedureReqModel, patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - model.getProcedure(mrn: patient.patientMRN); + Helpers.showErrorToast(model.error); + model.getPatientRadOrders(patient); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been added'); } } else { if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - model.getProcedure(mrn: patient.patientMRN); + Helpers.showErrorToast(model.error); + model.getPatientRadOrders(patient); } else if (model.state == ViewState.Idle) { - helpers.showErrorToast( + Helpers.showErrorToast( model.valadteProcedureList[0].entityList[0].warringMessages); } } } else { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); } } @@ -142,136 +139,107 @@ class _AddSelectedRadiologyOrderState extends State { onModelReady: (model) => model.getProcedureCategory( categoryName: "Radiology", categoryID: "03"), builder: (BuildContext context, ProcedureViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'New Radiology Order', - fontWeight: FontWeight.w900, - fontSize: 18.0, - ), - SizedBox( - height: 10.0, - ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: EntityListCheckboxSearchWidget( - model: widget.model, - masterList: - widget.model.categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); + AppScaffold( + isShowAppBar: false, + body: NetworkBaseView( + baseViewModel: model, + child: DraggableScrollableSheet( + minChildSize: 0.90, + initialChildSize: 0.95, + maxChildSize: 1.0, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText( + 'New Radiology Order', + fontWeight: FontWeight.w700, + fontSize: 20, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); }, - isEntityListSelected: (master) => - isEntityListSelected(master), - )), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // Container( - // child: Row( - // children: [ - // AppText( - // TranslationBase.of(context).orderType), - // Radio( - // activeColor: Color(0xFFB9382C), - // value: 1, - // groupValue: selectedType, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text('routine'), - // Radio( - // activeColor: Color(0xFFB9382C), - // groupValue: selectedType, - // value: 0, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text(TranslationBase.of(context).urgent), - // ], - // ), - // ), - // SizedBox( - // height: 15.0, - // ), - // TextFields( - // hintText: TranslationBase.of(context).remarks, - // controller: remarksController, - // minLines: 3, - // maxLines: 5, - // ), - SizedBox( - height: 100.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: TranslationBase.of(context) - .addSelectedProcedures, - color: Color(0xff359846), - onPressed: () { - //print(entityList.toString()); - onPressed: - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - "Fill the mandatory procedure details"); - return; - } - - Navigator.pop(context); - postProcedure( - orderType: selectedType.toString(), - entityList: entityList, - patient: patient, - model: widget.model, - remarks: remarksController.text); - }, - ), - ], ), - ), - ], - ) - ], + ], + ), + SizedBox( + height: 10.0, + ), + if (widget.model.categoriesList.length != 0) + NetworkBaseView( + baseViewModel: model, + child: EntityListCheckboxSearchWidget( + model: widget.model, + masterList: + widget.model.categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + )), + ], + ), ), ), - ), - ); - }), + ); + }), + ), + bottomSheet: Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'Add Radiology Order', + color: Color(0xff359846), + fontWeight: FontWeight.w700, + onPressed: () { + //print(entityList.toString()); + onPressed: + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + "Fill the mandatory procedure details"); + return; + } + + Navigator.pop(context); + postProcedure( + orderType: selectedType.toString(), + entityList: entityList, + patient: patient, + model: widget.model, + remarks: remarksController.text); + }, + ), + ], + ), + ), ), ); } diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 3426e4cd..70a5402c 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -1,10 +1,8 @@ -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; + import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -69,21 +67,23 @@ class _EntityListCheckboxSearchWidgetState NetworkBaseView( baseViewModel: widget.model, child: Container( - height: MediaQuery.of(context).size.height * 0.55, + height: MediaQuery.of(context).size.height * 0.75, child: Center( child: Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(8), color: Colors.white), child: ListView( children: [ TextFields( hintText: TranslationBase.of(context).searchProcedures, suffixIcon: EvaIcons.search, + suffixIconColor: Color(0xff2B353E), onChanged: (value) { filterSearchResults(value); }, + hasBorder: false, ), SizedBox( height: 15, @@ -99,7 +99,7 @@ class _EntityListCheckboxSearchWidgetState Checkbox( value: widget.isEntityListSelected( historyInfo), - activeColor: Colors.red[800], + activeColor: Color(0xffD02127), onChanged: (bool newValue) { setState(() { if (widget.isEntityListSelected( @@ -116,8 +116,9 @@ class _EntityListCheckboxSearchWidgetState child: Padding( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 0), - child: Texts( + child: AppText( historyInfo.procedureName, + fontSize: 14.0, variant: "bodyText", bold: true, color: Color(0xff575757)), @@ -130,50 +131,80 @@ class _EntityListCheckboxSearchWidgetState child: Padding( padding: EdgeInsets.symmetric( horizontal: 12), - child: Row( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context) - .orderType), - Radio( - activeColor: Color(0xFFB9382C), - value: 0, - groupValue: selectedType, - onChanged: (value) { - historyInfo.type = - setSelectedType(value) - .toString(); - - historyInfo.type = - value.toString(); - }, + Row( + children: [ + Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 11), + child: AppText( + TranslationBase.of( + context) + .orderType, + fontWeight: + FontWeight.w700, + color: Color(0xff2B353E), + ), + ), + ], ), - Text('routine'), - Radio( - activeColor: Color(0xFFB9382C), - groupValue: selectedType, - value: 1, - onChanged: (value) { - historyInfo.type = - setSelectedType(value) - .toString(); + Row( + children: [ + Radio( + activeColor: + Color(0xFFD02127), + value: 0, + groupValue: selectedType, + onChanged: (value) { + historyInfo.type = + setSelectedType(value) + .toString(); + + historyInfo.type = + value.toString(); + }, + ), + AppText( + 'routine', + color: Color(0xff575757), + fontWeight: FontWeight.w600, + ), + Radio( + activeColor: + Color(0xFFD02127), + groupValue: selectedType, + value: 1, + onChanged: (value) { + historyInfo.type = + setSelectedType(value) + .toString(); - historyInfo.type = - value.toString(); - }, + historyInfo.type = + value.toString(); + }, + ), + AppText( + TranslationBase.of(context) + .urgent, + color: Color(0xff575757), + fontWeight: FontWeight.w600, + ), + ], ), - Text(TranslationBase.of(context) - .urgent), ], ), ), ), SizedBox( - height: 15.0, + height: 2.0, ), Padding( padding: EdgeInsets.symmetric( - horizontal: 12), + horizontal: 12, vertical: 12.0), child: TextFields( hintText: TranslationBase.of(context) .remarks, @@ -183,11 +214,13 @@ class _EntityListCheckboxSearchWidgetState }, minLines: 3, maxLines: 5, + borderWidth: 0.5, + borderColor: Colors.grey[500], ), ), + DividerWithSpacesAround(), ], ), - DividerWithSpacesAround(), ], ); }).toList(), diff --git a/lib/screens/procedures/entity_list_procedure_widget.dart b/lib/screens/procedures/entity_list_procedure_widget.dart index 2f5c6ea2..125262e4 100644 --- a/lib/screens/procedures/entity_list_procedure_widget.dart +++ b/lib/screens/procedures/entity_list_procedure_widget.dart @@ -1,10 +1,7 @@ -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -67,7 +64,7 @@ class _ProcedureListWidgetState extends State { NetworkBaseView( baseViewModel: widget.model, child: Container( - height: MediaQuery.of(context).size.height * 0.55, + height: MediaQuery.of(context).size.height * 0.75, child: Center( child: Container( margin: EdgeInsets.only(top: 15), @@ -112,7 +109,7 @@ class _ProcedureListWidgetState extends State { child: Padding( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 0), - child: Texts( + child: AppText( historyInfo.procedureName, variant: "bodyText", bold: true, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index a03e1348..2e729153 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -1,607 +1,225 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; +//import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/screens/procedures/add-procedure-form.dart'; import 'package:doctor_app_flutter/screens/procedures/update-procedure.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/patients/profile/patient-profile-header-new-design-app-bar.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/network_base_view.dart'; import 'package:flutter/material.dart'; -class ProcedureScreen extends StatefulWidget { - @override - _ProcedureScreenState createState() => _ProcedureScreenState(); -} +import 'ProcedureCard.dart'; -class _ProcedureScreenState extends State { - int selectedType = 0; - int testNum = 1; - PatiantInformtion patient; - setSelectedType(int val) { - setState(() { - selectedType = val; - }); - } +class ProcedureScreen extends StatelessWidget { + String doctorNameP; - TextEditingController procedureController = TextEditingController(); + void initState() async { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + doctorNameP = doctorProfile.doctorName; + } @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; - patient = routeArgs['patient']; + PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + return BaseView( - onModelReady: (model) => model.getProcedure(mrn: 0), + onModelReady: (model) => + model.getProcedure(mrn: patient.patientId, patientType: patientType), builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).orderProcedure, - body: NetworkBaseView( - baseViewModel: model, - child: SingleChildScrollView( - child: Container( - color: Colors.white, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + baseViewModel: model, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, arrivalType ?? '0', patientType), + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + if (model.procedureList.length == 0 && + patient.patientStatusType != 43) + Padding( + padding: const EdgeInsets.all(8.0), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientPageHeaderWidget(patient), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, + AppText( + 'Order Test or', + style: "caption2", + color: Colors.black, + fontSize: 13, ), - (model.procedureList.length != 0) - ? SizedBox( - height: model.procedureList[0].rowcount == 0 - ? 200.0 - : 10.0) - : SizedBox(height: 200.0), - //model.prescriptionList == null - (model.procedureList.length != 0) - ? model.procedureList[0].rowcount == 0 - ? Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.stretch, - children: [ - InkWell( - onTap: () { - model - .getProcedureCategory() - .then((value) { - addSelectedProcedure( - context, model, patient); - }); - - //model.postPrescription(); - }, - child: CircleAvatar( - radius: 65, - backgroundColor: Color(0XFFB8382C), - child: CircleAvatar( - radius: 60, - backgroundColor: Colors.white, - child: Icon( - Icons.add, - color: Colors.black, - size: 45.0, - ), - ), - ), - ), - SizedBox( - height: 15.0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - AppText( - 'NO ORDER FOR PROCEDURE LISTED', - color: Colors.black, - fontWeight: FontWeight.w900, - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - AppText( - TranslationBase.of(context).addNow, - color: Color(0XFFB8382C), - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ) - : Padding( - padding: EdgeInsets.all(16.0), - child: NetworkBaseView( - baseViewModel: model, - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - InkWell( - child: Container( - height: 50.0, - width: 450.0, - decoration: BoxDecoration( - color: Colors.white, - border: Border.all( - color: Colors.grey), - borderRadius: - BorderRadius.circular(10.0), - ), - child: Padding( - padding: EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - AppText( - TranslationBase.of( - context) - .addMoreProcedure, - fontWeight: - FontWeight.w100, - fontSize: 12.5, - ), - Icon( - Icons.add, - color: Color(0XFFB8382C), - ) - ], - ), - ), - ), - onTap: () { - model - .getProcedureCategory() - .then((value) { - addSelectedProcedure( - context, model, patient); - }); - - //model.postPrescription(); - }, - ), - // Container( - // decoration: BoxDecoration( - // borderRadius: BorderRadius.all( - // Radius.circular(6.0)), - // border: Border.all( - // width: 1.0, - // color: HexColor("#CCCCCC"))), - // child: AppTextFormField( - // labelText: 'Add more procedure', - // borderColor: Colors.white, - // //suffixIcon: Icons.search, - // - // //textInputType: TextInputType.number, - // inputFormatter: ONLY_NUMBERS, - // onTap: () { - // addSelectedProcedure(context); - // }, - // ), - // ), - SizedBox( - height: 10.0, - ), - ...List.generate( - model.procedureList[0].rowcount, - (index) => Container( - color: Colors.white, - child: Column( - children: [ - SizedBox( - height: - MediaQuery.of(context) - .size - .height * - 0.022, - ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Container( - height: MediaQuery.of( - context) - .size - .height * - 0.18, - width: MediaQuery.of( - context) - .size - .width * - 0.135, - child: Column( - children: [ - AppText( - DateTime.parse(model - .procedureList[ - 0] - .entityList[ - index] - .orderDate) - .year - .toString(), - color: model - .procedureList[ - 0] - .entityList[ - index] - .orderType == - 1 - ? Color( - 0xFFB9382C) - : Colors - .green), - AppText( - Helpers.getMonth(model.procedureList[0].entityList[index].orderDate != - null - ? (DateTime.parse(model.procedureList[0].entityList[index].orderDate) - .month) - : DateTime.now() - .month) - .toUpperCase(), - color: model - .procedureList[ - 0] - .entityList[ - index] - .orderType == - 1 - ? Color( - 0xFFB9382C) - : Colors - .green), - AppText( - DateTime.parse(model - .procedureList[ - 0] - .entityList[ - index] - .orderDate) - .day - .toString(), - color: model - .procedureList[ - 0] - .entityList[ - index] - .orderType == - 1 - ? Color( - 0xFFB9382C) - : Colors - .green), - ], - ), - ), - Expanded( - child: Container( - width: MediaQuery.of( - context) - .size - .width * - 0.05, - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context) - .codeNo + - " : ", - fontWeight: - FontWeight - .w700, - fontSize: - 13.0, - ), - AppText( - model - .procedureList[ - 0] - .entityList[ - index] - .procedureId - .toString(), - fontSize: - 12.0, - ), - SizedBox( - width: 12.0, - ), - AppText( - TranslationBase.of(context) - .orderType + - " : ", - fontWeight: - FontWeight - .w700, - fontSize: - 13.0, - ), - Expanded( - child: AppText( - model.procedureList[0].entityList[index].orderType == - 0 - ? 'Routine' - : 'Urgent', - fontSize: - 13.5, - color: model.procedureList[0].entityList[index].orderType == - 1 - ? Color(0xFFB9382C) - : Colors.green), - ), - ], - ), - Row( - children: [ - AppText( - 'Order.NO' + - " : ", - fontWeight: - FontWeight - .w700, - fontSize: - 15.0, - ), - AppText( - model - .procedureList[ - 0] - .entityList[ - index] - .orderNo - .toString(), - fontSize: - 13.0, - ), - ], - ), - Row( - children: [ - Container( - child: - Expanded( - child: - AppText( - model - .procedureList[0] - .entityList[index] - .procedureName, - fontWeight: - FontWeight.w800, - ), - ), - ) - ], - ), - - Row( - children: [ - // AppText( - // TranslationBase.of(context) - // .price + - // " : ", - // fontWeight: - // FontWeight - // .w700, - // ), - // Expanded( - // child: AppText( - // model - // .procedureList[ - // 0] - // .entityList[ - // index] - // .price - // .toString(), - // fontSize: - // 13.0), - // ) - ], - ), - SizedBox( - height: 10.0, - ), - - Row( - children: [ - Expanded( - child: - Container( - height: MediaQuery.of(context) - .size - .height * - 0.047, - width: MediaQuery.of(context) - .size - .width * - 0.10, - child: - AppText( - model.procedureList[0].entityList[index].remarks != - null - ? model.procedureList[0].entityList[index].remarks.toString() - : "", - fontSize: - 11.5, - ), - ), - ), - ], - ), - SizedBox( - height: 20.0, - ), - - // SizedBox( - // height: 40, - // ), - ], - ), - ), - ), - Container( - child: Column( - children: [ - InkWell( - child: Icon( - Icons.edit), - onTap: () { - // model - // .updateProcedure(); - if (model.procedureList[0].entityList[index].categoryID == 02 || - model - .procedureList[ - 0] - .entityList[ - index] - .categoryID == - 03 || - model - .procedureList[0] - .entityList[index] - .categoryID == - 55) { - updateProcedureForm( - context, - limetNo: model - .procedureList[ - 0] - .entityList[ - index] - .lineItemNo, - model: - model, - orderNo: model - .procedureList[ - 0] - .entityList[ - index] - .orderNo, - remarks: model - .procedureList[ - 0] - .entityList[ - index] - .remarks, - procedureName: model - .procedureList[ - 0] - .entityList[ - index] - .procedureName, - patient: - patient, - procedureId: model - .procedureList[ - 0] - .entityList[ - index] - .procedureId, - categoreId: model - .procedureList[ - 0] - .entityList[ - index] - .categoryID - .toString()); - } else { - helpers.showErrorToast( - 'You cant Update this Procedure'); - } - }, - ) - ], - ), - ), - ], - ), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), - ], - ), - ), - ), - ], - ), - ), - ) - : Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - InkWell( - onTap: () { - model - .getProcedureCategory() - .then((value) { - addSelectedProcedure( - context, model, patient); - }); - - //model.postPrescription(); - }, - child: CircleAvatar( - radius: 65, - backgroundColor: Color(0XFFB8382C), - child: CircleAvatar( - radius: 60, - backgroundColor: Colors.white, - child: Icon( - Icons.add, - color: Colors.black, - size: 45.0, - ), - ), - ), - ), - SizedBox( - height: 15.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AppText( - 'NO ORDER FOR PROCEDURE LISTED', - color: Colors.black, - fontWeight: FontWeight.w900, - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AppText( - TranslationBase.of(context).addNow, - color: Color(0XFFB8382C), - fontWeight: FontWeight.w700, - ), - ], + AppText( + 'Procedure', + bold: true, + fontSize: 22, + ), + ], + ), + ), + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Order Test or', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Procedure', + bold: true, + fontSize: 22, + ), + ], + ), + ), + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedProcedure( + patient: patient, + model: model, + )), + ); + }, + child: Container( + width: double.maxFinite, + height: 140, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.grey[300], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Container( + height: 90, + child: Column( + children: [ + Container( + height: 40, + width: 40, + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Icon( + Icons.add, + color: Colors.white, ), - ], + ), + ), + SizedBox( + height: 10, + ), + AppText( + 'Add More Procedure', + color: Colors.grey[600], + fontWeight: FontWeight.w600, ) + ], + ), + ), + ), + ), + ), + if (model.procedureList.isNotEmpty) + ...List.generate( + model.procedureList[0].rowcount, + (index) => ProcedureCard( + categoryID: + model.procedureList[0].entityList[index].categoryID, + entityList: model.procedureList[0].entityList[index], + onTap: () { + if (model.procedureList[0].entityList[index].categoryID == + 2 || + model.procedureList[0].entityList[index].categoryID == 4) + updateProcedureForm(context, + model: model, + patient: patient, + remarks: model + .procedureList[0].entityList[index].remarks, + orderType: model + .procedureList[0].entityList[index].orderType + .toString(), + orderNo: model + .procedureList[0].entityList[index].orderNo, + procedureName: model.procedureList[0] + .entityList[index].procedureName, + categoreId: model + .procedureList[0].entityList[index].categoryID + .toString(), + procedureId: model.procedureList[0] + .entityList[index].procedureId, + limetNo: model.procedureList[0].entityList[index] + .lineItemNo); + // } else + // Helpers.showErrorToast( + // 'You Cant Update This Procedure'); + }, + patient: patient, + doctorName: doctorNameP, + ), + ), + if (model.procedureList.isEmpty) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText('No Procedure Found 0000'), + ) ], ), ), - ), - )), + if (model.state == ViewState.ErrorLocal) + Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(22.0), + child: AppText(model.error), + ) + ], + ), + ), + ], + ), + ), + ), + ), ); } } diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index 873e8bcf..6190e92e 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; @@ -7,15 +6,12 @@ import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request import 'package:doctor_app_flutter/core/viewModel/procedure_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/screens/procedures/entity_list_checkbox_search_widget.dart'; -import 'package:doctor_app_flutter/screens/procedures/entity_list_procedure_widget.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/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_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:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -102,241 +98,245 @@ class _UpdateProcedureWidgetState extends State { (BuildContext context, ProcedureViewModel model, Widget child) => NetworkBaseView( baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: - (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Form( - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 20.0, vertical: 10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 0.65, + child: Form( + child: Padding( + padding: + EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + widget.procedureName.toUpperCase(), + fontWeight: FontWeight.w700, + ), + SizedBox( + height: 30.0, + ), + // Container( + // height: screenSize.height * 0.070, + // child: InkWell( + // onTap: model.categoryList != null && + // model.categoryList.length > 0 + // ? () { + // ListSelectDialog dialog = + // ListSelectDialog( + // list: model.categoryList, + // attributeName: 'categoryName', + // attributeValueId: 'categoryId', + // okText: + // TranslationBase.of(context).ok, + // okFunction: (selectedValue) { + // setState(() { + // selectedCategory = + // selectedValue; + // model.getProcedureCategory( + // categoryName: + // selectedCategory[ + // 'categoryName'], + // categoryID: selectedCategory[ + // 'categoryId'] <= + // 9 + // ? "0" + + // selectedCategory[ + // 'categoryId'] + // .toString() + // : selectedCategory[ + // 'categoryId'] + // .toString()); + // }); + // }, + // ); + // showDialog( + // barrierDismissible: false, + // context: context, + // builder: (BuildContext context) { + // return dialog; + // }, + // ); + // //model.getProcedureCategory(); + // } + // : null, + // child: TextField( + // decoration: textFieldSelectorDecoration( + // TranslationBase.of(context) + // .procedureCategorise, + // selectedCategory != null + // ? selectedCategory['categoryName'] + // : null, + // true, + // suffixIcon: Icon( + // Icons.search, + // color: Colors.black, + // )), + // enabled: false, + // ), + // ), + // ), + // if (widget.model.categoriesList.length != 0) + // NetworkBaseView( + // baseViewModel: model, + // child: selectedCategory != null + // ? selectedCategory['categoryId'] == + // 02 || + // selectedCategory[ + // 'categoryId'] == + // 03 || + // selectedCategory[ + // 'categoryId'] == + // 55 + // ? EntityListCheckboxSearchWidget( + // model: widget.model, + // masterList: widget + // .model + // .categoriesList[0] + // .entityList, + // removeHistory: (item) { + // setState(() { + // entityList.remove(item); + // }); + // }, + // addHistory: (history) { + // setState(() { + // entityList.add(history); + // }); + // }, + // addSelectedHistories: () { + // //TODO build your fun herr + // // widget.addSelectedHistories(); + // }, + // isEntityListSelected: + // (master) => + // isEntityListSelected( + // master), + // ) + // : ProcedureListWidget( + // model: widget.model, + // masterList: widget + // .model + // .categoriesList[0] + // .entityList, + // removeHistory: (item) { + // setState(() { + // entityList.remove(item); + // }); + // }, + // addHistory: (history) { + // setState(() { + // entityList.add(history); + // }); + // }, + // addSelectedHistories: () { + // //TODO build your fun herr + // // widget.addSelectedHistories(); + // }, + // isEntityListSelected: + // (master) => + // isEntityListSelected( + // master), + // ) + // : null), + Container( + child: Row( children: [ - AppText( - widget.procedureName.toUpperCase(), - fontWeight: FontWeight.w700, - ), - SizedBox( - height: 30.0, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.categoryList != null && - model.categoryList.length > 0 - ? () { - ListSelectDialog dialog = - ListSelectDialog( - list: model.categoryList, - attributeName: 'categoryName', - attributeValueId: 'categoryId', - okText: - TranslationBase.of(context).ok, - okFunction: (selectedValue) { - setState(() { - selectedCategory = - selectedValue; - model.getProcedureCategory( - categoryName: - selectedCategory[ - 'categoryName'], - categoryID: selectedCategory[ - 'categoryId'] <= - 9 - ? "0" + - selectedCategory[ - 'categoryId'] - .toString() - : selectedCategory[ - 'categoryId'] - .toString()); - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - //model.getProcedureCategory(); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .procedureCategorise, - selectedCategory != null - ? selectedCategory['categoryName'] - : null, - true, - suffixIcon: Icon( - Icons.search, - color: Colors.black, - )), - enabled: false, - ), - ), + AppText(TranslationBase.of(context).orderType), + Radio( + activeColor: Color(0xFFB9382C), + value: 0, + groupValue: selectedType, + onChanged: (value) { + setSelectedType(value); + }, ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: selectedCategory != null - ? selectedCategory['categoryId'] == - 02 || - selectedCategory[ - 'categoryId'] == - 03 || - selectedCategory[ - 'categoryId'] == - 55 - ? EntityListCheckboxSearchWidget( - model: widget.model, - masterList: widget - .model - .categoriesList[0] - .entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); - }, - isEntityListSelected: - (master) => - isEntityListSelected( - master), - ) - : ProcedureListWidget( - model: widget.model, - masterList: widget - .model - .categoriesList[0] - .entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); - }, - isEntityListSelected: - (master) => - isEntityListSelected( - master), - ) - : null), - Container( - child: Row( - children: [ - AppText( - TranslationBase.of(context).orderType), - Radio( - activeColor: Color(0xFFB9382C), - value: 0, - groupValue: selectedType, - onChanged: (value) { - setSelectedType(value); - }, - ), - Text('routine'), - Radio( - activeColor: Color(0xFFB9382C), - groupValue: selectedType, - value: 1, - onChanged: (value) { - setSelectedType(value); - }, - ), - Text(TranslationBase.of(context).urgent), - ], - ), + Text('routine'), + Radio( + activeColor: Color(0xFFB9382C), + groupValue: selectedType, + value: 1, + onChanged: (value) { + setSelectedType(value); + }, ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - child: TextFields( - fontSize: 15.0, - controller: widget.remarksController, - maxLines: 3, - minLines: 2, - onChanged: (value) {}, - ), + Text(TranslationBase.of(context).urgent), + ], + ), + ), + SizedBox( + height: 12.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC"))), + child: TextFields( + fontSize: 15.0, + controller: widget.remarksController, + hintText: widget.remarksController.text.isEmpty + ? 'No Remarks Added' + : '', + maxLines: 3, + minLines: 2, + onChanged: (value) {}, + ), + ), + SizedBox( + height: 70.0, + ), + Container( + margin: + EdgeInsets.all(SizeConfig.widthMultiplier * 2), + child: Column( + //alignment: WrapAlignment.center, + children: [ + AppButton( + color: Color(0xff359846), + title: TranslationBase.of(context) + .updateProcedure + .toUpperCase(), + onPressed: () { + // if (entityList.isEmpty == true && + // widget.remarksController.text == + // widget.remarks) { + // DrAppToastMsg.showErrorToast( + // "Fill the mandatory procedure details"); + // return; + // } + Navigator.pop(context); + updateProcedure( + limetNO: widget.limetNo, + orderNo: widget.orderNo, + orderType: selectedType.toString(), + categorieId: widget.categoryId, + procedureId: widget.procedureId, + entityList: entityList, + patient: widget.patient, + model: widget.model, + remarks: widget.remarksController.text); + // authorizationForm(context); + }, ), SizedBox( - height: 50.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: TranslationBase.of(context) - .updateProcedure - .toUpperCase(), - onPressed: () { - // if (entityList.isEmpty == true && - // widget.remarksController.text == - // widget.remarks) { - // DrAppToastMsg.showErrorToast( - // "Fill the mandatory procedure details"); - // return; - // } - Navigator.pop(context); - updateProcedure( - limetNO: widget.limetNo, - orderNo: widget.orderNo, - orderType: selectedType.toString(), - categorieId: widget.categoryId, - procedureId: widget.procedureId, - entityList: entityList, - patient: widget.patient, - model: widget.model, - remarks: - widget.remarksController.text); - // authorizationForm(context); - }, - ), - ], - ), + height: 20.0, ), + AppButton( + title: TranslationBase.of(context).cancel, + color: Color(0xFFB9382C), + onPressed: () { + Navigator.pop(context); + }, + ) ], ), ), - )), - ); - }), + ], + ), + ), + )), + ), ), ); }); @@ -366,22 +366,24 @@ class _UpdateProcedureWidgetState extends State { updateProcedureReqModel.lineItemNo = limetNO; updateProcedureReqModel.orderNo = orderNo; - if (entityList.isNotEmpty) { - entityList.forEach((element) { - controls.add( - Controls(code: "remarks", controlValue: element.remarks ?? ''), - ); - controls.add( - Controls(code: "ordertype", controlValue: '1'), - ); - - controlsProcedure.procedure = element.procedureId; - controlsProcedure.category = int.parse(element.categoryID) > 9 - ? element.categoryID - : "0" + element.categoryID; - controlsProcedure.controls = controls; - }); - } else { + // if (entityList.isNotEmpty) { + // entityList.forEach((element) { + // controls.add( + // Controls(code: "remarks", controlValue: element.remarks ?? ''), + // ); + // controls.add( + // Controls(code: "ordertype", controlValue: '1'), + // ); + // + // controlsProcedure.procedure = element.procedureId; + // controlsProcedure.category = int.parse(element.categoryID) > 9 + // ? element.categoryID + // : "0" + element.categoryID; + // controlsProcedure.controls = controls; + // }); + // } + // else { + { controls.add( Controls( code: "remarks", controlValue: remarks.isNotEmpty ? remarks : ""), @@ -404,7 +406,7 @@ class _UpdateProcedureWidgetState extends State { mrn: patient.patientMRN); if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + Helpers.showErrorToast(model.error); model.getProcedure(mrn: patient.patientMRN); } else if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast('procedure has been updated'); diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart deleted file mode 100644 index 283649aa..00000000 --- a/lib/screens/profile_screen.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:flutter/material.dart'; - -import '../config/size_config.dart'; -import '../widgets/shared/app_scaffold_widget.dart'; -import '../widgets/shared/drawer_item_widget.dart'; -import '../widgets/shared/profile_image_widget.dart'; -import '../widgets/shared/rounded_container_widget.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; - -class ProfileScreen extends StatefulWidget { - ProfileScreen({Key key, this.title, this.doctorProfileall}) : super(key: key); - - final String title; - DoctorProfileModel doctorProfileall; - - @override - _ProfileScreenState createState() => _ProfileScreenState(); -} - -class _ProfileScreenState extends State { -//************************** - DoctorProfileModel doctorProfile; - //AppDrawer dr; -//****************** - @override - Widget build(BuildContext context) { - Map arg = ModalRoute.of(context).settings.arguments - as Map; //ModalRoute.of(context).settings.arguments; - doctorProfile = arg['doctorProfileall']; - print("******************"); - //print(doctorProfile.doctorName); - print("******************"); - return AppScaffold( - appBarTitle: TranslationBase.of(context).profile, - body: ListView(padding: EdgeInsets.zero, children: [ - Container( - height: MediaQuery.of(context).size.height * - 0.35, //SizeConfig.heightMultiplier * 35, - - child: Container( - child: DrawerHeader( - child: Container( - child: ProfileImageWidget( - url: doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName, //"Dr. Chris evans", - des: doctorProfile - .clinicDescription //"Director of medical records", - ), - ), - ), - ), - ), - RoundedContainer( - child: ListView( - children: [ - DrawerItem( - TranslationBase.of(context).gender, - Icons.person_pin, - color: Colors.black, - subTitle: doctorProfile.genderDescription //"Male" - , - ), - DrawerItem(TranslationBase.of(context).clinic, Icons.build, - color: Colors.black, - subTitle: - doctorProfile.clinicDescription //"Neurology Clinic", - ), - DrawerItem( - TranslationBase.of(context).hospital, - Icons.local_hospital, - color: Colors.black, - subTitle: doctorProfile.projectName, //"Al-Takkassussi", - ), - DrawerItem( - TranslationBase.of(context).speciality, - Icons.crop_square, - color: Colors.black, - subTitle: doctorProfile.doctorRate == 0 - ? TranslationBase.of(context).beingBad - : TranslationBase.of(context).beingGreat, - ), - ], - ), - width: SizeConfig.screenWidth * 0.70, - height: SizeConfig.screenHeight * 0.40, - ), - ])); - } -} diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index aaafa380..c7c52745 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -3,16 +3,16 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.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/profile/add-order/addNewOrder.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/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; class AddRescheduleLeavScreen extends StatelessWidget { ProjectViewModel projectsProvider; @@ -28,47 +28,12 @@ class AddRescheduleLeavScreen extends StatelessWidget { appBarTitle: TranslationBase.of(context).rescheduleLeaves, body: SingleChildScrollView( child: Column(children: [ - Container( - width: MediaQuery.of(context).size.width, - margin: EdgeInsets.all(10), - padding: - EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20), - decoration: BoxDecoration( - color: HexColor('#EAEAEA'), - borderRadius: BorderRadius.all(Radius.circular(20))), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey, - borderRadius: BorderRadius.circular(10)), - child: IconButton( - icon: Icon( - Icons.add, - size: 35, - color: Colors.white, - ), - onPressed: () { - openLeave( - context, - false, - ); - }), - ), - Padding( - child: AppText( - TranslationBase.of(context).applyForReschedule, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 18, - color: HexColor('#7E7E7E')), - padding: EdgeInsets.all(10), - ), - ], - ), - ), + AddNewOrder( onTap: () { + openLeave( + context, + false, + ); + },label: TranslationBase.of(context).applyForReschedule,), Column( children: model.getReschduleLeave .map((GetRescheduleLeavesResponse item) { @@ -79,11 +44,13 @@ class AddRescheduleLeavScreen extends StatelessWidget { decoration: BoxDecoration( border: Border( left: BorderSide( - color: item.status == 1 - ? Colors.green + color: item.status == 10 + ? Colors.red[800] : item.status == 2 ? HexColor('#CC9B14') - : Colors.red[800], + : item.status == 9 + ? Colors.green + : Colors.red, width: 5.0, ))), padding: EdgeInsets.only(left: 10, right: 10), @@ -107,23 +74,15 @@ class AddRescheduleLeavScreen extends StatelessWidget { margin: EdgeInsets.only(top: 10), child: AppText( - item.status == 1 - ? TranslationBase.of( - context) - .approved - : item.status == 2 - ? TranslationBase.of( - context) - .pending - : TranslationBase.of( - context) - .rejected, + item.statusDescription, fontWeight: FontWeight.bold, - color: item.status == 1 - ? Colors.green + color: item.status == 10 + ? Colors.red[800] : item.status == 2 ? HexColor('#CC9B14') - : Colors.red[800], + : item.status == 9 + ? Colors.green + : Colors.red, fontSize: 14, ), ), @@ -133,7 +92,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { child: AppText( DateUtils .convertStringToDateFormat( - item.dateTimeTo, + item.createdOn, 'yyyy-MM-dd HH:mm'), fontWeight: FontWeight.bold, )) @@ -146,9 +105,16 @@ class AddRescheduleLeavScreen extends StatelessWidget { item.requisitionType == 1 ? TranslationBase.of(context) .offTime - : TranslationBase.of(context) - .holiday + - ' ', + : item.requisitionType == 2 + ? TranslationBase.of(context) + .holiday + : item.requisitionType == 3 + ? TranslationBase.of( + context) + .changeOfSchedule + : TranslationBase.of( + context) + .newSchedule, fontWeight: FontWeight.bold, )), SizedBox( diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 7af6b72c..dc3d0adf 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -5,28 +5,23 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; -import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/text_validator.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; +import 'package:dropdown_search/dropdown_search.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; -import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:provider/provider.dart'; -import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; -import 'package:dropdown_search/dropdown_search.dart'; Helpers helpers = Helpers(); @@ -104,13 +99,19 @@ class _RescheduleLeaveScreen extends State { @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); - + offTime = widget.updateData != null + ? widget.updateData.requisitionType.toString() + : offTime; return BaseView( onModelReady: (model) => model.getClinicsList(), builder: (_, model, w) => BaseView( onModelReady: (model2) => { model2.getOffTime(), - model2.getReasons(18), + model2.getReasons(offTime == '1' + ? 18 + : offTime == '2' + ? 19 + : 102), model2.getCoveringDoctors() }, builder: (_, model2, w) => GestureDetector( @@ -875,7 +876,7 @@ class _RescheduleLeaveScreen extends State { ), // Column( // children: [ - // Texts(TranslationBase.of(context) + // AppText(TranslationBase.of(context) // .previousSickLeaveIssue + // ' ') // ], diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart deleted file mode 100644 index 16d53831..00000000 --- a/lib/screens/settings/settings_screen.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; -class SettingsScreen extends StatelessWidget { - - ProjectViewModel projectsProvider; - @override - Widget build(BuildContext context) { - projectsProvider = Provider.of(context); - return AppScaffold( - appBarTitle: TranslationBase.of(context).settings.toUpperCase(), - body: ListView( - children: [ - AppText(TranslationBase.of(context).language.toUpperCase(),fontSize: 18,margin: 5,fontWeight: FontWeight.bold,), - Container( - margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10), - height: 50, - decoration: BoxDecoration( - border: Border.all(color: Colors.grey[600],width: 2.0), - borderRadius: BorderRadius.circular(8.0) - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(7.0), - child: Row( - children: [ - Expanded( - child: InkWell( - onTap: () { projectsProvider.changeLanguage('en'); }, - child: AnimatedContainer( - duration: Duration(milliseconds: 350), - decoration: BoxDecoration( - color: !projectsProvider.isArabic ? AppGlobal.appPrimaryColor : Colors.transparent, - border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0)) - ), - child: Center(child: AppText(TranslationBase.of(context).lanEnglish, color: !projectsProvider.isArabic ? Colors.white : Colors.grey[500])) - ), - ), - ), - Expanded( - child: InkWell( - onTap: (){projectsProvider.changeLanguage('ar');}, - child: AnimatedContainer( - duration: Duration(milliseconds: 350), - decoration: BoxDecoration( - color: projectsProvider.isArabic ? AppGlobal.appPrimaryColor : Colors.transparent, - border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0)) - ), - child: Center(child: AppText(TranslationBase.of(context).lanArabic, color: projectsProvider.isArabic ? Colors.white : Colors.grey[500],)) - ), - ), - ) - ], - ), - ), - ) - ], - ), - ); - } -} \ No newline at end of file diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 1297a673..d182ea9e 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -1,19 +1,14 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.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/profile/patient-page-header-widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; @@ -26,280 +21,245 @@ class AddSickLeavScreen extends StatelessWidget { final routeArgs = ModalRoute.of(context).settings.arguments as Map; patient = routeArgs['patient']; return BaseView( - onModelReady: (model) => model.getSickLeave(patient.patientMRN), + onModelReady: (model) => model.getSickLeave(patient.patientMRN??patient.patientId), builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: false, - appBarTitle: TranslationBase.of(context).sickleave, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + appBar: PatientProfileHeaderNewDesignAppBar( + patient, + routeArgs['patientType'] ?? "0", + routeArgs['arrivalType'] ?? "0", + ), body: SingleChildScrollView( child: Column(children: [ - PatientProfileHeaderNewDesign( - patient, routeArgs['patientType'], routeArgs['arrivalType']), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).patient, - fontWeight: FontWeight.bold, - ), - AppText( - TranslationBase.of(context).sickLeave, - fontSize: 24, - fontWeight: FontWeight.bold, - ), - ], - )), - Container( - width: SizeConfig.screenWidth, - margin: EdgeInsets.only( - left: 20, right: 20, top: 10, bottom: 10), - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: HexColor('#EAEAEA')), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - child: Container( + // PatientProfileHeaderNewDesign( + // patient, routeArgs['patientType'], routeArgs['arrivalType']), + patient.patientStatusType == 43 + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).patient, + fontWeight: FontWeight.bold, + ), + AppText( + TranslationBase.of(context).sickLeave, + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ], + )), + Container( + width: SizeConfig.screenWidth, + margin: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 10), + padding: EdgeInsets.all(20), decoration: BoxDecoration( - color: Colors.grey, - borderRadius: BorderRadius.circular(10)), - padding: EdgeInsets.all(3), - child: IconButton( - icon: Icon( - Icons.add, - size: 35, - color: Colors.white, + borderRadius: BorderRadius.circular(10), + color: HexColor('#EAEAEA')), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: Container( + decoration: BoxDecoration( + color: Colors.grey, + borderRadius: BorderRadius.circular(10)), + padding: EdgeInsets.all(3), + child: IconButton( + icon: Icon( + Icons.add, + size: 35, + color: Colors.white, + ), + onPressed: () { + openSickLeave( + context, + false, + ); + }), + )), + Padding( + child: AppText( + TranslationBase.of(context) + .noSickLeaveApplied, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 16, + textAlign: TextAlign.center, + color: HexColor('#7E7E7E')), + padding: EdgeInsets.all(10), ), - onPressed: () { - openSickLeave( - context, - false, - ); - }), - )), - Padding( - child: AppText( - TranslationBase.of(context).noSickLeaveApplied, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 16, - textAlign: TextAlign.center, - color: HexColor('#7E7E7E')), - padding: EdgeInsets.all(10), - ), - ], - )), - ], - ), + ], + )), + ], + ) + : SizedBox(), model.getAllSIckLeave.length > 0 ? Column( children: model.getAllSIckLeave .map((GetAllSickLeaveResponse item) { return RoundedContainer( + margin: EdgeInsets.all(10), child: Column( - children: [ - Container( - decoration: BoxDecoration( - border: Border( - left: BorderSide( - color: item.status == 1 - ? Colors.yellow[800] - : item.status == 2 - ? Colors.green - : Colors.black, - width: 5.0, - ))), - padding: EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - flex: 4, - child: Wrap( - // mainAxisAlignment: - // MainAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + border: Border( + left: BorderSide( + color: item.status == 1 + ? Colors.yellow[800] + : item.status == 2 + ? Colors.green + : Colors.black, + width: 5.0, + ))), + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Expanded( + flex: 4, + child: Wrap( + // mainAxisAlignment: + // MainAxisAlignment.start, children: [ - Container( - padding: EdgeInsets.all(3), - child: AppText( - item.status == 1 - ? TranslationBase.of( - context) - .hold - : item.status == 2 + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.all(3), + child: AppText( + item.status == 1 ? TranslationBase.of( context) - .active - : TranslationBase.of( + .hold + : item.status == 2 + ? TranslationBase + .of( + context) + .active + : TranslationBase + .of(context) + .all, + fontWeight: + FontWeight.bold, + color: item.status == 1 + ? Colors.yellow[800] + : item.status == 2 + ? Colors.green + : Colors.black, + ), + ), + Row( + children: [ + AppText( + TranslationBase.of( context) - .all, - fontWeight: FontWeight.bold, - color: item.status == 1 - ? Colors.yellow[800] - : item.status == 2 - ? Colors.green - : Colors.black, - ), - ), - Row( - children: [ - AppText(TranslationBase.of( - context) - .daysSickleave), - AppText( - item.noOfDays.toString(), - fontWeight: FontWeight.bold, + .daysSickleave), + AppText( + item.noOfDays + .toString(), + fontWeight: + FontWeight.bold, + ), + ], ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .startDate + - ' ', + Row( + children: [ + AppText( + TranslationBase.of( + context) + .startDate + + ' ', + ), + Flexible( + child: AppText( + DateUtils + .convertStringToDateFormat( + item.startDate, + 'dd-MMM-yyyy'), + fontWeight: + FontWeight.bold, + )) + ], ), - Flexible( - child: AppText( - DateUtils - .convertStringToDateFormat( - item.startDate, - 'dd-MMM-yyyy'), - fontWeight: FontWeight.bold, - )) + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + AppText( + item.remarks ?? "", + ), + // (item.status == 1 || + // item.status == 2) + // ? IconButton( + // icon: Image.asset( + // 'assets/images/edit.png'), + // + // // color: Colors.green, //Colors.black, + // onPressed: () => { + // if (item.status == + // 1) + // { + // DrAppToastMsg.showErrorToast( + // TranslationBase.of( + // context) + // .sickleaveonhold) + // } + // else + // { + // openSickLeave( + // context, + // true, + // extendedData: + // item) + // } + // }, + // ) + // : SizedBox() + ]), ], ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - AppText( - item.remarks ?? "", - ), - (item.status == 1 || - item.status == 2) - ? IconButton( - icon: Image.asset( - 'assets/images/edit.png'), - - // color: Colors.green, //Colors.black, - onPressed: () => { - if (item.status == - 1) - { - DrAppToastMsg.showErrorToast( - TranslationBase.of( - context) - .sickleaveonhold) - } - else - { - openSickLeave( - context, - true, - extendedData: - item) - } - }, - ) - : SizedBox() - ]), + SizedBox( + width: 20, + ), ], ), - SizedBox( - width: 20, - ), - ], - ), - ), - ], - )), - ], - )); + ), + ], + )), + ], + )); }).toList(), ) - : new Builder(builder: (context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).patient, - fontWeight: FontWeight.bold, - ), - AppText( - TranslationBase.of(context).sickLeave, - fontSize: 24, - fontWeight: FontWeight.bold, - ), - ], - )), - Container( - width: SizeConfig.screenWidth, - margin: EdgeInsets.only( - left: 20, right: 20, top: 20, bottom: 20), - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: HexColor('#EAEAEA')), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - child: Container( - decoration: BoxDecoration( - color: Colors.grey, - borderRadius: - BorderRadius.circular(10)), - padding: EdgeInsets.all(3), - child: IconButton( - icon: Icon( - Icons.add, - size: 35, - color: Colors.white, - ), - onPressed: () { - openSickLeave( - context, - false, - ); - }), - )), - Padding( - child: AppText( - TranslationBase.of(context) - .noSickLeaveApplied, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 16, - textAlign: TextAlign.center, - color: HexColor('#7E7E7E')), - padding: EdgeInsets.all(10), - ), - ], - )), - SizedBox( - height: SizeConfig.screenHeight * .6, - ) - ], - ); - }), + : patient.patientStatusType != 43 + ? Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).noSickLeave), + ) + ], + ), + ) + : SizedBox() ])))); } diff --git a/lib/screens/sick-leave/show-sickleave.dart b/lib/screens/sick-leave/show-sickleave.dart index 52ec7094..31f186f1 100644 --- a/lib/screens/sick-leave/show-sickleave.dart +++ b/lib/screens/sick-leave/show-sickleave.dart @@ -1,22 +1,15 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.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/profile/patient-page-header-widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class ShowSickLeaveScreen extends StatelessWidget { PatiantInformtion patient; @@ -30,139 +23,174 @@ class ShowSickLeaveScreen extends StatelessWidget { model.getSickLeave(patient.patientMRN ?? patient.patientId), builder: (_, model, w) => AppScaffold( baseViewModel: model, - appBarTitle: TranslationBase.of(context).sickleave, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + appBar: PatientProfileHeaderNewDesignAppBar( + patient, + routeArgs['patientType'] ?? "0", + routeArgs['arrivalType'] ?? "0", + ), body: SingleChildScrollView( child: Column( children: [ - PatientProfileHeaderNewDesign( - patient, routeArgs['patientType'], routeArgs['arrivalType']), - Column( - children: model.getAllSIckLeave - .map((GetAllSickLeaveResponse item) { - return RoundedContainer( - child: Column( - children: [ - Container( - decoration: BoxDecoration( - border: Border( - left: BorderSide( - color: item.status == 1 - ? Colors.yellow[800] - : item.status == 2 - ? Colors.green - : Colors.black, - width: 5.0, - ))), - padding: EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - flex: 4, - child: Wrap( - // mainAxisAlignment: - // MainAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, + // PatientProfileHeaderNewDesign( + // patient, routeArgs['patientType'], routeArgs['arrivalType']), + model.getAllSIckLeave.length > 0 + ? Column( + children: model.getAllSIckLeave + .map((GetAllSickLeaveResponse item) { + return RoundedContainer( + margin: EdgeInsets.all(10), + child: Column( + children: [ + Container( + decoration: BoxDecoration( + border: Border( + left: BorderSide( + color: item.status == 1 + ? Colors.yellow[800] + : item.status == 2 + ? Colors.green + : Colors.black, + width: 5.0, + ))), + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, children: [ - Container( - padding: EdgeInsets.all(3), - child: AppText( - item.status == 1 - ? TranslationBase.of(context) - .hold - : item.status == 2 - ? TranslationBase.of( - context) - .active - : TranslationBase.of( - context) - .all, - fontWeight: FontWeight.bold, - color: item.status == 1 - ? Colors.yellow[800] - : item.status == 2 - ? Colors.green - : Colors.black, + Expanded( + flex: 4, + child: Wrap( + // mainAxisAlignment: + // MainAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.all(3), + child: AppText( + item.status == 1 + ? TranslationBase.of( + context) + .hold + : item.status == 2 + ? TranslationBase + .of( + context) + .active + : TranslationBase + .of(context) + .all, + fontWeight: + FontWeight.bold, + color: item.status == 1 + ? Colors.yellow[800] + : item.status == 2 + ? Colors.green + : Colors.black, + ), + ), + Row( + children: [ + AppText( + TranslationBase.of( + context) + .daysSickleave), + AppText( + item.noOfDays + .toString(), + fontWeight: + FontWeight.bold, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of( + context) + .startDate + + ' ', + ), + Flexible( + child: AppText( + DateUtils + .convertStringToDateFormat( + item.startDate, + 'dd-MMM-yyyy'), + fontWeight: + FontWeight.bold, + )) + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + AppText( + item.remarks ?? "", + ), + (item.status == 1) + ? IconButton( + icon: Image.asset( + 'assets/images/edit.png'), + + // color: Colors.green, //Colors.black, + onPressed: () => + { + if (item.status == + 1) + { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context) + .sickleaveonhold) + } + // else + // { + // openSickLeave( + // context, + // true, + // extendedData: + // item) + // } + }, + ) + : SizedBox() + ]), + ], + ), + SizedBox( + width: 20, + ), + ], ), ), - Row( - children: [ - AppText(TranslationBase.of(context) - .daysSickleave), - AppText( - item.noOfDays.toString(), - fontWeight: FontWeight.bold, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .startDate + - ' ', - ), - Flexible( - child: AppText( - DateUtils - .convertStringToDateFormat( - item.startDate, - 'dd-MMM-yyyy'), - fontWeight: FontWeight.bold, - )) - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - AppText( - item.remarks ?? "", - ), - (item.status == 1 || - item.status == 2) - ? IconButton( - icon: Image.asset( - 'assets/images/edit.png'), - - // color: Colors.green, //Colors.black, - onPressed: () => { - if (item.status == 1) - { - DrAppToastMsg.showErrorToast( - TranslationBase.of( - context) - .sickleaveonhold) - } - // else - // { - // openSickLeave( - // context, - // true, - // extendedData: - // item) - // } - }, - ) - : SizedBox() - ]), ], - ), - SizedBox( - width: 20, - ), - ], - ), - ), - ], - )), - ], - )); - }).toList(), - ) + )), + ], + )); + }).toList(), + ) + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).noSickLeave), + ) + ], + ), + ) ], ), ), diff --git a/lib/screens/sick-leave/sick_leave.dart b/lib/screens/sick-leave/sick_leave.dart index 12f157c2..199a7c82 100644 --- a/lib/screens/sick-leave/sick_leave.dart +++ b/lib/screens/sick-leave/sick_leave.dart @@ -4,26 +4,21 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; +import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.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/text_validator.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/Text.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_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; -import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; Helpers helpers = Helpers(); @@ -150,6 +145,7 @@ class _SickLeaveScreenState extends State { // validator: (value) { // return TextValidator().validateName(value); // }, + textInputType:TextInputType.number, inputFormatter: ONLY_NUMBERS) ]), ), @@ -424,7 +420,7 @@ class _SickLeaveScreenState extends State { ), // Column( // children: [ - // Texts(TranslationBase.of(context) + // AppText(TranslationBase.of(context) // .previousSickLeaveIssue + // ' ') // ], diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index ef292220..fef77333 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -7,6 +7,14 @@ class DateUtils { return DateFormat(dateFormat).format(dateTime); } + static DateTime convertISOStringToDateTime(String date){ + DateTime newDate; + + newDate = DateTime.parse(date); + + return newDate; + } + static String convertStringToDateFormat(String date, String dateFormat) { DateTime dateTime = DateTime.parse(date); return convertDateToFormat(dateTime, dateFormat); @@ -24,7 +32,7 @@ class DateUtils { const start = "/Date("; const end = "+0300)"; - + if(str.contains("/Date")){ final startIndex = str.indexOf(start); final endIndex = str.indexOf(end, startIndex + start.length); @@ -32,7 +40,11 @@ class DateUtils { date = new DateTime.fromMillisecondsSinceEpoch( int.parse(str.substring(startIndex + start.length, endIndex))); } else { - date = DateTime.now(); + date = DateTime.now(); + } + + } else { + date = DateTime.parse(str); } return date; @@ -312,4 +324,40 @@ class DateUtils { return false; } + + static String getDate(DateTime dateTime) { + print(dateTime); + if (dateTime != null) + return getMonth(dateTime.month) + + " " + + dateTime.day.toString() + + "," + + dateTime.year.toString(); + else + return ""; + } + + static String getDateFormatted(DateTime dateTime) { + print(dateTime); + if (dateTime != null) + return dateTime.day.toString() + + "/" + + dateTime.month.toString() + + "/" + + dateTime.year.toString(); + else + return ""; + } + + static String getTimeHHMMA(DateTime dateTime){ + return DateFormat('hh:mm a').format(dateTime); + } + + static String getTimeFormated(DateTime dateTime) { + print(dateTime); + if (dateTime != null) + return dateTime.hour.toString() + ":" + dateTime.minute.toString(); + else + return ""; + } } diff --git a/lib/util/dr_app_toast_msg.dart b/lib/util/dr_app_toast_msg.dart index bf91a11f..1f2ebe8f 100644 --- a/lib/util/dr_app_toast_msg.dart +++ b/lib/util/dr_app_toast_msg.dart @@ -33,7 +33,7 @@ class DrAppToastMsg { textColor: Colors.white); } - void showShortToast(msg) { + static void showShortToast(msg) { FlutterFlexibleToast.showToast( message: msg, toastLength: Toast.LENGTH_SHORT, @@ -50,7 +50,7 @@ class DrAppToastMsg { timeInSeconds: 1); } - void showCenterShortToast(msg) { + static void showCenterShortToast(msg) { FlutterFlexibleToast.showToast( message: msg, toastLength: Toast.LENGTH_SHORT, @@ -59,7 +59,7 @@ class DrAppToastMsg { timeInSeconds: 1); } - void showCenterShortLoadingToast(msg) { + static void showCenterShortLoadingToast(msg) { FlutterFlexibleToast.showToast( message: msg, toastLength: Toast.LENGTH_LONG, @@ -68,11 +68,11 @@ class DrAppToastMsg { radius: 20, elevation: 10, textColor: Colors.white, - backgroundColor: Colors.black, + timeInSeconds: 2); } - void cancelToast(msg) { + static void cancelToast(msg) { FlutterFlexibleToast.cancel(); } } diff --git a/lib/util/extenstions.dart b/lib/util/extenstions.dart index 1c79f01c..26e49670 100644 --- a/lib/util/extenstions.dart +++ b/lib/util/extenstions.dart @@ -1,7 +1,3 @@ -// OWNER : Ibrahim albitar -// DATE : 19-04-2020 -// DESCRIPTION : Extension for all classes objects. - extension Extension on Object { bool isNullOrEmpty() => this == null || this == ''; diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 8a4cfbd0..13b7b2ae 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -1,41 +1,26 @@ +import 'package:connectivity/connectivity.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; -import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/screens/auth/login_screen.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:doctor_app_flutter/config/config.dart'; import 'package:html/parser.dart'; +import '../UpdatePage.dart'; import '../config/size_config.dart'; import '../util/dr_app_toast_msg.dart'; - -import 'package:connectivity/connectivity.dart'; import 'dr_app_shared_pref.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:12/4/2020 - *@param: - *@return: - *@desc: This class will contian some Function will help developer - */ class Helpers { - int cupertinoPickerIndex = 0; + static int cupertinoPickerIndex = 0; get currentLanguage => null; - -/* - *@author: Elham Rababah - *@Date:12/4/2020 - *@param: context, items, decKey, onSelectFun - *@return: Container Widget - *@desc: showCupertinoPicker its a general function to show cupertino picker - */ - showCupertinoPicker(context, items, decKey, onSelectFun) { + static showCupertinoPicker(context, items, decKey, onSelectFun) { showModalBottomSheet( isDismissible: false, context: context, @@ -83,23 +68,14 @@ class Helpers { }); } - TextStyle textStyle(context) => + static TextStyle textStyle(context) => TextStyle(color: Theme.of(context).primaryColor); -/* - *@author: Elham Rababah - *@Date:12/4/2020 - *@param: context, List items, decKey, onSelectFun - *@return: Container widget - *@desc: buildPickerIterm this function will build the items of the cupertino - */ - buildPickerItems(context, List items, decKey, onSelectFun) { + static buildPickerItems(context, List items, decKey, onSelectFun) { return CupertinoPicker( magnification: 1.5, scrollController: FixedExtentScrollController(initialItem: cupertinoPickerIndex), - - // backgroundColor: Colors.black87, children: items.map((item) { return Text( '${item["$decKey"]}', @@ -108,23 +84,14 @@ class Helpers { }).toList(), itemExtent: 25, - //height of each item looping: false, onSelectedItemChanged: (int index) { - // selectitem =index; cupertinoPickerIndex = index; }, ); } -/* - *@author: Elham Rababah - *@Date:12/4/2020 - *@param: msg - *@return: - *@desc: showErrorToast -*/ - showErrorToast([msg = null]) { + static showErrorToast([msg = null]) { String localMsg = generateContactAdminMsg(); if (msg != null) { @@ -133,14 +100,6 @@ class Helpers { DrAppToastMsg.showErrorToast(localMsg); } - -/* - *@author: Mohammad Aljammal - *@Date:27/4/2020 - *@param: - *@return: Boolean - *@desc: Check The Internet Connection - */ static Future checkConnection() async { ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity()); @@ -152,172 +111,6 @@ class Helpers { } } - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: date in String formatted - *@return: DateTime - *@desc: convert String to DateTime - */ - static DateTime convertStringToDate(String date) { - const start = "/Date("; - const end = "+0300)"; - final startIndex = date.indexOf(start); - final endIndex = date.indexOf(end, startIndex + start.length); - return DateTime.fromMillisecondsSinceEpoch( - int.parse( - date.substring(startIndex + start.length, endIndex), - ), - ); - } - - /* - *@author: Amjad Amireh - *@Date:5/5/2020 - *@param: checkDate - *@return: DateTime - *@desc: convert String to DateTime - */ - static String checkDate(String dateString) { - DateTime checkedTime = DateTime.parse(dateString); - DateTime currentTime = DateTime.now(); - - if ((currentTime.year == checkedTime.year) && - (currentTime.month == checkedTime.month) && - (currentTime.day == checkedTime.day)) { - return "Today"; - } else if ((currentTime.year == checkedTime.year) && - (currentTime.month == checkedTime.month)) { - if ((currentTime.day - checkedTime.day) == 1) { - return "YESTERDAY"; - } else if ((currentTime.day - checkedTime.day) == -1) { - return "Tomorrow"; - } - - if ((currentTime.day - checkedTime.day) <= -2) { - return "Next Week"; - } else { - return "Old Date"; - } - } - return "Old Date"; - } - - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: month in int formatted - *@return: DateTime - *@desc: convert month in int to month name - */ - static getMonth(int month) { - switch (month) { - case 1: - return "Jan"; - case 2: - return "Feb"; - case 3: - return "Mar"; - case 4: - return "Apr"; - case 5: - return "May"; - case 6: - return "Jun"; - case 7: - return "Jul"; - case 8: - return "Aug"; - case 9: - return "Sep"; - case 10: - return "Oct"; - case 11: - return "Nov"; - case 12: - return "Dec"; - } - } - - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: week day in int formatted - *@return: DateTime - *@desc: convert week day in int to week day name - */ - static getWeekDay(int weekDay) { - switch (weekDay) { - case 1: - return "Monday"; - case 2: - return "Tuesday"; - case 3: - return "Wednesday"; - case 4: - return "Thursday"; - case 5: - return "Friday"; - case 6: - return "Saturday "; - case 7: - return "Sunday"; - } - } - - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: DateTime - *@return: data formatted like Apr 26,2020 - *@desc: convert DateTime to data formatted - */ - static String getDate(DateTime dateTime) { - print(dateTime); - if (dateTime != null) - return getMonth(dateTime.month) + - " " + - dateTime.day.toString() + - "," + - dateTime.year.toString(); - else - return ""; - } - - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: DateTime - *@return: data formatted like 26/4/2020 - *@desc: convert DateTime to data formatted - */ - static String getDateFormatted(DateTime dateTime) { - print(dateTime); - if (dateTime != null) - return dateTime.day.toString() + - "/" + - dateTime.month.toString() + - "/" + - dateTime.year.toString(); - else - return ""; - } - - static String getTimeFormated(DateTime dateTime) { - print(dateTime); - if (dateTime != null) - return dateTime.hour.toString() + ":" + dateTime.minute.toString(); - else - return ""; - } - - /* - *@author: Mohammad Aljammal - *@Date:26/5/2020 - *@param: String workingHours - *@return: List - *@desc: convert workingHours string to List - */ static List getWorkingHours(String workingHours) { List myWorkingHours = []; List listOfHours = workingHours.split('a'); @@ -334,14 +127,7 @@ class Helpers { return myWorkingHours; } -/* - *@author: Elham Rababah - *@Date:12/5/2020 - *@param: - *@return: String - *@desc: generate Contact Admin Msg - */ - generateContactAdminMsg([err = null]) { + static generateContactAdminMsg([err = null]) { String localMsg = 'Something wrong happened, please contact the admin'; if (err != null) { localMsg = localMsg + '\n \n' + err.toString(); @@ -353,18 +139,29 @@ class Helpers { await sharedPref.clear(); } - logout() async { + static logout() async { DEVICE_TOKEN = ""; String lang = await sharedPref.getString(APP_Language); await clearSharedPref(); sharedPref.setString(APP_Language, lang); - Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN); + Navigator.pushAndRemoveUntil(AppGlobal.CONTEX, FadePage(page: Loginsreen(),), (r) => false); - // TODO Fix it - // Navigator.of(AppGlobal.CONTEX).popUntil((ModalRoute.withName(LOGIN))); } - String parseHtmlString(String htmlString) { + navigateToUpdatePage(String message, String androidLink, iosLink) { + Navigator.pushAndRemoveUntil( + AppGlobal.CONTEX, + FadePage( + page: UpdatePage( + message: message, + androidLink: androidLink, + iosLink: iosLink, + ), + ), + (r) => false); + } + + static String parseHtmlString(String htmlString) { final document = parse(htmlString); final String parsedString = parse(document.body.text).documentElement.text; @@ -423,6 +220,10 @@ class Helpers { } static String capitalize(str) { - return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}"; + if (str != "") { + return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}"; + } else { + return str; + } } } diff --git a/lib/util/text_validator.dart b/lib/util/text_validator.dart deleted file mode 100644 index 1fe21c9e..00000000 --- a/lib/util/text_validator.dart +++ /dev/null @@ -1,37 +0,0 @@ - import '../util/extenstions.dart'; - - class TextValidator{ - -// OWNER : Ibrahim albitar -// DATE : 19-04-2020 -// DESCRIPTION : Text Validator. - - String validateName(String value) { - if (value.isNullOrEmpty()||value.length < 3) - return 'Name must be more than 2 charater'; - else - return null; - } - - String validateMobile(String value) { - if (value.isNullOrEmpty()||value.length != 10) - return 'Mobile Number must be of 10 digit'; - else - return null; - } - - String validateIdNumber(String value) { - if (value.isNullOrEmpty()) - return 'Please input valid number'; - else - return null; - } - - String validateDate(String value) { - if (value.isNullOrEmpty()) - return 'Please input valid date'; - else - return null; - } - - } \ No newline at end of file diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 7ff65bb1..044f95a5 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -76,7 +76,7 @@ class TranslationBase { String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; String get patient => localizedValues['patient'][locale.languageCode]; - + String get patients => localizedValues['patients'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; String get todayStatistics => @@ -393,6 +393,9 @@ class TranslationBase { String get outPatient => localizedValues['outPatients'][locale.languageCode]; + String get myOutPatient => + localizedValues['myOutPatient'][locale.languageCode]; + String get logout => localizedValues['logout'][locale.languageCode]; String get pharmaciesList => @@ -552,6 +555,8 @@ class TranslationBase { String get next => localizedValues['next'][locale.languageCode]; + String get previous => localizedValues['previous'][locale.languageCode]; + String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; @@ -563,8 +568,8 @@ class TranslationBase { String get referTo => localizedValues['referTo'][locale.languageCode]; - String get referredFrom => - localizedValues['referredFrom'][locale.languageCode]; + String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; + String get refClinic => localizedValues['refClinic'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; @@ -620,6 +625,10 @@ class TranslationBase { String get rescheduleLeaves => localizedValues['reschedule-leave'][locale.languageCode]; + String get applyOrRescheduleLeave => + localizedValues['applyOrRescheduleLeave'][locale.languageCode]; + String get myQRCode => localizedValues['myQRCode'][locale.languageCode]; + String get addMedication => localizedValues['addMedication'][locale.languageCode]; @@ -648,13 +657,19 @@ class TranslationBase { String get leanBodyWeight => localizedValues['leanBodyWeight'][locale.languageCode]; - String get bodyMassIndex => localizedValues['bodyMassIndex'][locale.languageCode]; + String get bodyMassIndex => + localizedValues['bodyMassIndex'][locale.languageCode]; - String get yourBodyMassIndex => localizedValues['yourBodyMassIndex'][locale.languageCode]; - String get bmiUnderWeight => localizedValues['bmiUnderWeight'][locale.languageCode]; + String get yourBodyMassIndex => + localizedValues['yourBodyMassIndex'][locale.languageCode]; + String get bmiUnderWeight => + localizedValues['bmiUnderWeight'][locale.languageCode]; String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode]; - String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; + String get bmiOverWeight => + localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; + String get bmiObeseExtreme => + localizedValues['bmiObeseExtreme'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode]; @@ -1157,8 +1172,8 @@ class TranslationBase { localizedValues['SpecialResult'][locale.languageCode]; String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; - String get showMoreBtn => - localizedValues['show-more-btn'][locale.languageCode]; + String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get showDetail => localizedValues['showDetail'][locale.languageCode]; String get fileNumber => localizedValues['fileNumber'][locale.languageCode]; String get reschedule => localizedValues['reschedule'][locale.languageCode]; @@ -1193,6 +1208,38 @@ class TranslationBase { String get updateReschedule => localizedValues['update-reschedule'][locale.languageCode]; String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; + String get accepted => localizedValues['accepted'][locale.languageCode]; + String get cancelled => localizedValues['cancelled'][locale.languageCode]; + String get unReplied => localizedValues['unReplied'][locale.languageCode]; + String get replied => localizedValues['replied'][locale.languageCode]; + String get typeHereToReply => + localizedValues['typeHereToReply'][locale.languageCode]; + String get searchHere => localizedValues['searchHere'][locale.languageCode]; + String get remove => localizedValues['remove'][locale.languageCode]; + + String get step => localizedValues['step'][locale.languageCode]; + String get fieldRequired => + localizedValues['fieldRequired'][locale.languageCode]; + String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; + String get changeOfSchedule => + localizedValues['changeOfSchedule'][locale.languageCode]; + String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; + String get enterCredentials => + localizedValues['enter_credentials'][locale.languageCode]; + String get patpatientIDMobilenationalientID => + localizedValues['patientIDMobilenational'][locale.languageCode]; + + String get updateNow => localizedValues['updateNow'][locale.languageCode]; + String get updateTheApp => + localizedValues['updateTheApp'][locale.languageCode]; + String get admissionDate => + localizedValues['admission-date'][locale.languageCode]; + String get noOfDays => localizedValues['noOfDays'][locale.languageCode]; + String get numOfDays => localizedValues['numOfDays'][locale.languageCode]; + String get replayBefore => + localizedValues['replayBefore'][locale.languageCode]; + String get trySaying => localizedValues["try-saying"][locale.languageCode]; + String get acknowledged => localizedValues['acknowledged'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index 8ab79b5c..f84e9425 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -1,10 +1,11 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:hexcolor/hexcolor.dart'; import '../../config/size_config.dart'; import '../../lookups/auth_lookup.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class AuthHeader extends StatelessWidget { var userType; @@ -23,18 +24,18 @@ class AuthHeader extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - margin: SizeConfig.isMobile - ? EdgeInsetsDirectional.fromSTEB( - 0, SizeConfig.realScreenHeight * 0.03, 0, 0) - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), - child: buildImageLogo(), - ), + // Container( + // margin: SizeConfig.isMobile + // ? EdgeInsetsDirectional.fromSTEB( + // 0, SizeConfig.realScreenHeight * 0.03, 0, 0) + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // child: buildImageLogo(), + // ), SizedBox( - height: 10, + height: 30, ), - buildTextUnderLogo(context), + //buildTextUnderLogo(context), ], ), Column( @@ -146,15 +147,15 @@ class AuthHeader extends StatelessWidget { return Container(); } return Container( - margin: SizeConfig.isMobile - ? null - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.realScreenWidth * 0.13, 0, 0, 0), + // margin: SizeConfig.isMobile + // ? null + // : EdgeInsetsDirectional.fromSTEB( + // SizeConfig.realScreenWidth * 0.13, 0, 0, 0), child: Text( "Doctor App", style: TextStyle( fontSize: - SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, + SizeConfig.isMobile ? 16 : SizeConfig.realScreenWidth * 0.030, fontWeight: FontWeight.w800, color: HexColor('#B8382C')), ), @@ -170,10 +171,10 @@ class AuthHeader extends StatelessWidget { return Text( TranslationBase.of(context).drSulaimanAlHabib, style: TextStyle( - fontWeight: FontWeight.w800, - fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, - color: HexColor('#B8382C'), - ), + fontWeight: FontWeight.w800, + fontSize: + SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, + fontFamily: 'Poppins'), ); } @@ -187,11 +188,11 @@ class AuthHeader extends StatelessWidget { userType == loginType.verificationMethods) { return Text(''); } - return Text( + return AppText( text, - style: TextStyle( - fontSize: - SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029), + // style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, ); } } diff --git a/lib/widgets/auth/known_user_login.dart b/lib/widgets/auth/known_user_login.dart index b181aed8..cbf3c71a 100644 --- a/lib/widgets/auth/known_user_login.dart +++ b/lib/widgets/auth/known_user_login.dart @@ -319,7 +319,7 @@ class _KnownUserLoginState extends State { } navigateToHome() { - Navigator.of(context).pushNamed(HOME); + Navigator.of(context).pushReplacementNamed(HOME); } showErorrMsg(localMsg) { diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index c52e9a77..a2c200cb 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -1,33 +1,33 @@ -import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.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/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:imei_plugin/imei_plugin.dart'; import 'package:provider/provider.dart'; import '../../config/shared_pref_kay.dart'; import '../../config/size_config.dart'; -import '../../models/doctor/user_model.dart'; -import '../../core/viewModel/auth_view_model.dart'; import '../../core/viewModel/hospital_view_model.dart'; -import '../../routes.dart'; +import '../../models/doctor/user_model.dart'; import '../../util/dr_app_shared_pref.dart'; import '../../util/dr_app_toast_msg.dart'; import '../../util/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppToastMsg toastMsg = DrAppToastMsg(); Helpers helpers = Helpers(); class LoginForm extends StatefulWidget with DrAppToastMsg { - LoginForm({this.changeLoadingStata}); + LoginForm({this.model}); - final Function changeLoadingStata; + final IMEIViewModel model; @override _LoginFormState createState() => _LoginFormState(); @@ -36,24 +36,11 @@ class LoginForm extends StatefulWidget with DrAppToastMsg { class _LoginFormState extends State { final loginFormKey = GlobalKey(); var projectIdController = TextEditingController(); - String _platformImei = 'Unknown'; - String uniqueId = "Unknown"; var projectsList = []; - bool _isInit = true; FocusNode focusPass = FocusNode(); FocusNode focusProject = FocusNode(); HospitalViewModel projectsProv; - var userInfo = UserModel( - userID: '', - password: '', - projectID: 15, - languageID: 2, - iPAdress: "11.11.11.11", - versionID: 1.2, - channel: 9, - sessionID: "i1UJwCTSqt"); - - AuthViewModel authProv; + var userInfo = UserModel(); @override void initState() { super.initState(); @@ -61,165 +48,198 @@ class _LoginFormState extends State { @override Widget build(BuildContext context) { - authProv = Provider.of(context); projectsProv = Provider.of(context); - return Form( key: loginFormKey, - child: Container( - width: SizeConfig.realScreenWidth * 0.90, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildSizedBox(), - TextFormField( - keyboardType: TextInputType.number, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterId, - 'assets/images/user_id_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterYourID; - } - return null; - }, - onSaved: (value) { - userInfo.userID = value.trim(); - }, - onChanged: (value) { - userInfo.userID = value.trim(); - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - }, - onEditingComplete: () {}, - autofocus: false, - ), - buildSizedBox(), - TextFormField( - focusNode: focusPass, - obscureText: true, - textInputAction: TextInputAction.next, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).enterPassword, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context).pleaseEnterPassword; - } - return null; - }, - onSaved: (value) { - userInfo.password = value; - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - helpers.showCupertinoPicker( - context, projectsList, 'facilityName', onSelectProject); - }, - onTap: () { - this.getProjects(userInfo.userID); - }, - ), - buildSizedBox(), - projectsList.length > 0 - ? TextFormField( - focusNode: focusProject, - controller: projectIdController, - onTap: () { - helpers.showCupertinoPicker(context, projectsList, - 'facilityName', onSelectProject); - }, - showCursor: false, - //readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).selectYourProject, - 'assets/images/password_icon.png'), - validator: (value) { - if (value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterYourProject; - } - return null; - }) - : TextFormField( - readOnly: true, - decoration: buildInputDecoration( - context, - TranslationBase.of(context).pleaseEnterYourProject, - 'assets/images/password_icon.png')), - buildSizedBox(), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - RaisedButton( - onPressed: () { - login(context, authProv, widget.changeLoadingStata); - }, - textColor: Colors.white, - elevation: 0.0, - padding: const EdgeInsets.all(0.0), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), - child: Container( - padding: const EdgeInsets.all(10.0), - height: 50, - width: SizeConfig.realScreenWidth * 0.35, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(TranslationBase.of(context).login, - style: TextStyle( - fontSize: SizeConfig.isMobilePortrait - ? 2.3 * SizeConfig.textMultiplier - : 2.3 * SizeConfig.textMultiplier)), - Image.asset('assets/images/login_btn_arrow_icon.png') - ], - ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: SizeConfig.realScreenWidth * 0.90, + height: SizeConfig.realScreenHeight * 0.65, + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + buildSizedBox(), + Padding( + child: AppText( + TranslationBase.of(context).enterCredentials, + fontSize: 18, + fontWeight: FontWeight.bold, ), - ) - ], - ), - ], - ), - ), - ); - } + padding: EdgeInsets.only(top: 10, bottom: 10)), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterId, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + labelText: '', + borderColor: Colors.white, + // keyboardType: TextInputType.number, + textInputAction: TextInputAction.next, -/* - *@author: Elham Rababah - *@Date:20/4/2020 - *@param: context, hint, asset - *@return: InputDecoration - *@desc: decorate input feilds - */ - InputDecoration buildInputDecoration(BuildContext context, hint, asset) { - return InputDecoration( - prefixIcon: Image.asset(asset), - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).errorColor), - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).errorColor), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourID; + } + return null; + }, + onSaved: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onChanged: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + }, + ) + ])), + buildSizedBox(), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterPassword, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + focusNode: focusPass, + obscureText: true, + borderColor: Colors.white, + textInputAction: TextInputAction.next, + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterPassword; + } + return null; + }, + onSaved: (value) { + userInfo.password = value; + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + Helpers.showCupertinoPicker(context, projectsList, + 'facilityName', onSelectProject); + }, + onTap: () { + this.getProjects(userInfo.userID); + }, + ) + ])), + buildSizedBox(), + projectsList.length > 0 + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusProject, + controller: projectIdController, + borderColor: Colors.white, + suffixIcon: Icons.arrow_drop_down, + onTap: () { + Helpers.showCupertinoPicker( + context, + projectsList, + 'facilityName', + onSelectProject); + }, + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourProject; + } + return null; + }) + ])) + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + readOnly: true, + borderColor: Colors.white, + prefix: IconButton( + icon: Icon(Icons.arrow_drop_down), + iconSize: 30, + padding: EdgeInsets.only(bottom: 30), + ), + ) + ])), + ]), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + child: AppButton( + title: TranslationBase.of(context).login, + color: HexColor('#D02127'), + fontWeight: FontWeight.bold, + onPressed: () { + login(context, this.widget.model); + }, + )), + ], + ) + ], ), ); + //)); } SizedBox buildSizedBox() { @@ -228,101 +248,27 @@ class _LoginFormState extends State { ); } - login(context, AuthViewModel authProv, Function changeLoadingStata) { - showLoading(); + login( + context, + model, + ) { if (loginFormKey.currentState.validate()) { loginFormKey.currentState.save(); sharedPref.setInt(PROJECT_ID, userInfo.projectID); - authProv.login(userInfo).then((res) { - //changeLoadingStata(false); - hideLoading(); - if (res['MessageStatus'] == 1) { - // insertDeviceImei(res, authProv); - saveObjToString(LOGGED_IN_USER, res); + model.login(userInfo).then((res) { + if (model.loginInfo['MessageStatus'] == 1) { + saveObjToString(LOGGED_IN_USER, model.loginInfo); sharedPref.remove(LAST_LOGIN_USER); - sharedPref.setString(TOKEN, res['LogInTokenID']); - print("token" + res['LogInTokenID']); - Navigator.of(context).pushReplacement(MaterialPageRoute( + sharedPref.setString(TOKEN, model.loginInfo['LogInTokenID']); + Navigator.of(AppGlobal.CONTEX).pushReplacement(MaterialPageRoute( builder: (BuildContext context) => VerificationMethodsScreen( password: userInfo.password, ))); - } else { - // handel error - helpers.showErrorToast(res['ErrorEndUserMessage']); } - }).catchError((err) { - hideLoading(); - changeLoadingStata(false); - helpers.showErrorToast(err); }); - } else { - changeLoadingStata(false); } } - insertDeviceImei(preRes, AuthViewModel authProv) { - if (_platformImei != 'Unknown') { - var imeiInfo = { - "IMEI": _platformImei, - "LogInType": 1, - "DoctorID": preRes['DoctorID'], - "DoctorName": "Test User", - "Gender": 1, - "ClinicID": 3, - "ProjectID": 15, - "DoctorTitle": "Mr.", - "ClinicName": "MED", - "ProjectName": "", - "DoctorImageURL": "UNKNOWN", - "LogInTokenID": preRes['LogInTokenID'], - "VersionID": 5.3 - }; - authProv.insertDeviceImei(imeiInfo).then((res) { - if (res['MessageStatus'] == 1) { - setSharedPref('platformImei', _platformImei); - saveObjToString(LOGGED_IN_USER, preRes); - - Navigator.of(context).pushReplacement(MaterialPageRoute( - builder: (BuildContext context) => VerificationMethodsScreen( - password: userInfo.password, - ))); - - // save imei on shared preferance - } else { - // handel error - helpers.showErrorToast(res['ErrorEndUserMessage']); - } - }).catchError((err) { - print(err); - helpers.showErrorToast(); - }); - } - } - - // Platform messages are asynchronous, so we initialize in an async method. - Future initPlatformState() async { - String platformImei; - String idunique; - // Platform messages may fail, so we use a try/catch PlatformException. - try { - platformImei = - await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false); - idunique = await ImeiPlugin.getImei(); - } catch (e) { - platformImei = 'Failed to get platform version.'; - } - - // If the widget was removed from the tree while the asynchronous platform - // message was in flight, we want to discard the reply rather than calling - // setState to update our non-existent appearance. - if (!mounted) return; - - setState(() { - _platformImei = platformImei; - uniqueId = idunique; - }); - } - Future setSharedPref(key, value) async { sharedPref.setString(key, value).then((success) { print("sharedPref.setString" + success.toString()); @@ -330,9 +276,7 @@ class _LoginFormState extends State { } getProjectsList(memberID) { - //showLoading(); projectsProv.getProjectsList(memberID).then((res) { - //hideLoading(); if (res['MessageStatus'] == 1) { projectsList = res['ProjectInfo']; setState(() { @@ -341,16 +285,7 @@ class _LoginFormState extends State { }); } else { print(res); - // handel error - // setState(() { - // projectsList = ListProject; - // }); } - }).catchError((err) { - setState(() { - print(err); - }); - print(err); }); } @@ -367,26 +302,11 @@ class _LoginFormState extends State { primaryFocus.unfocus(); } - showLoading() { - showDialog( - context: context, - builder: (BuildContext context) { - return Center( - child: CircularProgressIndicator(), - ); - }); - } - - hideLoading() { - Navigator.pop(context); - } - getProjects(value) { if (value != null && value != '') { if (projectsList.length == 0) { getProjectsList(value); } } - //_isInit = false; } } diff --git a/lib/widgets/auth/show_timer_text.dart b/lib/widgets/auth/show_timer_text.dart index fd09ec25..a418e1b5 100644 --- a/lib/widgets/auth/show_timer_text.dart +++ b/lib/widgets/auth/show_timer_text.dart @@ -96,10 +96,10 @@ class _ShowTimerTextState extends State { if (res['MessageStatus'] == 1) {resendCode()} else - {helpers.showErrorToast(res['ErrorEndUserMessage'])} + {Helpers.showErrorToast(res['ErrorEndUserMessage'])} }) .catchError((err) { - helpers.showErrorToast(); + Helpers.showErrorToast(); }); } } diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 587c248c..535efcf5 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/auth/check_activation_code_request_mod import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/auth/show_timer_text.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -17,7 +18,6 @@ import '../../util/dr_app_shared_pref.dart'; import '../../util/dr_app_toast_msg.dart'; import '../../util/helpers.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = Helpers(); @@ -239,13 +239,6 @@ class _VerifyAccountState extends State { }); } -/* - *@author: Elham Rababah - *@Date:19/4/2020 - *@param: - *@return: - *@desc: change the style for the input field - */ TextStyle buildTextStyle() { return TextStyle( fontSize: SizeConfig.textMultiplier * 3, @@ -260,16 +253,8 @@ class _VerifyAccountState extends State { return null; } -/* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return:InputDecoration - *@desc: buildInputDecoration - */ InputDecoration buildInputDecoration(BuildContext context) { return InputDecoration( - // ts/images/password_icon.png contentPadding: EdgeInsets.only(top: 30, bottom: 30), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), @@ -290,13 +275,6 @@ class _VerifyAccountState extends State { ); } -/* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: - *@return: RichText - *@desc: buildText - */ RichText buildText() { String medthodName; switch (model['OTP_SendType']) { @@ -329,13 +307,6 @@ class _VerifyAccountState extends State { ); } -/* - *@author: Elham Rababah - *@Date:15/4/2020 - *@param: authProv - *@return: - *@desc: verify Account func call sendActivationCodeByOtpNotificationType service - */ verifyAccount(AuthViewModel authProv, Function changeLoadingStata) async { if (verifyAccountForm.currentState.validate()) { changeLoadingStata(true); @@ -346,23 +317,6 @@ class _VerifyAccountState extends State { verifyAccountFormValue['digit3'] + verifyAccountFormValue['digit4']; - int projectID = await sharedPref.getInt(PROJECT_ID); - - Map model = { - "activationCode": activationCode, - "DoctorID": _loggedUser['DoctorID'], - "LogInTokenID": _loggedUser['LogInTokenID'], - "ProjectID": projectID, - "LanguageID": 2, - "stamp": "2020-02-26T14:48:27.221Z", - "IPAdress": "11.11.11.11", - "VersionID": 1.2, - "Channel": 9, - "TokenID": "", - "SessionID": "i1UJwCTSqt", - "IsLoginForDoctorApp": true, - "IsSilentLogIN": false - }; CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel( zipCode: _loggedUser['ZipCode'], @@ -387,22 +341,15 @@ class _VerifyAccountState extends State { } } else { changeLoadingStata(false); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { changeLoadingStata(false); - helpers.showErrorToast(err); + Helpers.showErrorToast(err); }); } } - /* - *@author: Elham Rababah - *@Date:17/5/2020 - *@param: Map profile, Function changeLoadingStata - *@return: - *@desc: loginProcessCompleted - */ loginProcessCompleted( Map profile, Function changeLoadingStata) { var doctor = DoctorProfileModel.fromJson(profile); @@ -412,43 +359,10 @@ class _VerifyAccountState extends State { } getDashboard(doctor, Function changeLoadingStata) { - // authProv.getDashboard(doctor).then((value) { - // print(value); changeLoadingStata(false); - // sharedPref.setObj(DASHBOARD_DATA, value); Navigator.of(context).pushReplacementNamed(HOME); - // }); - } - - Future _asyncSimpleDialog( - BuildContext context, List list, String txtKey, - [String text = '']) async { - return await showDialog( - context: context, - barrierDismissible: true, - builder: (BuildContext context) { - return SimpleDialog( - title: Text(text), - children: list.map((value) { - return SimpleDialogOption( - onPressed: () { - Navigator.pop(context, - value); //here passing the index to be return on item selection - }, - child: Text(value[txtKey]), //item value - ); - }).toList(), - ); - }); } - /* - *@author: Elham Rababah - *@Date:17/5/2020 - *@param: ClinicModel clinicInfo, Function changeLoadingStata - *@return: - *@desc: getDocProfiles - */ getDocProfiles(ClinicModel clinicInfo, Function changeLoadingStata) { ProfileReqModel docInfo = new ProfileReqModel( doctorID: clinicInfo.doctorID, @@ -462,11 +376,11 @@ class _VerifyAccountState extends State { loginProcessCompleted(res['DoctorProfileList'][0], changeLoadingStata); } else { changeLoadingStata(false); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { changeLoadingStata(false); - helpers.showErrorToast(err); + Helpers.showErrorToast(err); }); } } diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 5e8d7674..48d93f54 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -9,12 +9,13 @@ import 'package:doctor_app_flutter/models/auth/send_activation_code_model2.dart' import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/profile_req_Model.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/otp/sms-popup.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; @@ -24,6 +25,7 @@ import 'package:provider/provider.dart'; import '../../config/size_config.dart'; import '../../core/viewModel/auth_view_model.dart'; +import '../../landing_page.dart'; import '../../routes.dart'; import '../../util/dr_app_shared_pref.dart'; import '../../util/helpers.dart'; @@ -109,18 +111,18 @@ class _VerificationMethodsState extends State { return DrAppCircularProgressIndeicator(); default: if (snapshot.hasError) { - helpers.showErrorToast('Error: ${snapshot.error}'); + Helpers.showErrorToast('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}'); } else { return SingleChildScrollView( child: Container( - height: SizeConfig.realScreenHeight, + height: SizeConfig.realScreenHeight * .9, width: SizeConfig.realScreenWidth, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - // height: SizeConfig.realScreenHeight * 0.6, child: Column( children: [ user != null && isMoreOption == false @@ -130,13 +132,13 @@ class _VerificationMethodsState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ + AppText(TranslationBase.of(context) + .welcomeBack), AppText( - TranslationBase.of(context) - .welcomeBack + - ' ' + - user.doctorName, + Helpers.capitalize(user.doctorName), fontSize: SizeConfig.textMultiplier * 3.5, + fontWeight: FontWeight.bold, ), SizedBox( height: 20, @@ -145,55 +147,75 @@ class _VerificationMethodsState extends State { TranslationBase.of(context).accountInfo, fontSize: SizeConfig.textMultiplier * 2.5, + fontWeight: FontWeight.w600, ), SizedBox( height: 20, ), Card( - color: Colors.grey[300], + color: Colors.white, child: Row( children: [ Flexible( + flex: 3, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginAt, - textAlign: TextAlign.center, - overflow: - TextOverflow.ellipsis, - ), - subtitle: Text( - user.editedOn != null - ? formatDate(Helpers - .convertStringToDate( - user.editedOn)) - : user.createdOn != null - ? formatDate(Helpers - .convertStringToDate(user - .createdOn)) - : '--', - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )), + title: Text( + TranslationBase.of( + context) + .lastLoginAt, + overflow: TextOverflow + .ellipsis, + style: TextStyle( + fontFamily: + 'Poppins', + fontWeight: + FontWeight.w800, + fontSize: 14), + ), + subtitle: AppText( + getType( + user.logInTypeID, + context), + fontSize: 14, + ))), Flexible( + flex: 2, child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginWith, - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - subtitle: Text( - getType(user.logInTypeID, - context), - overflow: - TextOverflow.ellipsis, - textAlign: - TextAlign.center), - )) + title: AppText( + user.editedOn != null + ? getDate(DateUtils + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getDate(DateUtils + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + fontSize: 14, + fontWeight: + FontWeight.w800, + ), + subtitle: AppText( + user.editedOn != null + ? getTime(DateUtils + .convertStringToDate( + user + .editedOn)) + : user.createdOn != + null + ? getTime(DateUtils + .convertStringToDate( + user.createdOn)) + : '--', + textAlign: + TextAlign.right, + fontSize: 14, + ), + )) ], )), ], @@ -232,6 +254,11 @@ class _VerificationMethodsState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ + // Expanded( + // child: + // getButton(3, authProv)), + // Expanded( + // child: getButton(4, authProv)) Expanded( child: InkWell( onTap: () => { @@ -243,7 +270,7 @@ class _VerificationMethodsState extends State { authProv))), Expanded( child: getButton(5, authProv)) - ]) + ]), ]) : Column( mainAxisAlignment: MainAxisAlignment.start, @@ -287,10 +314,11 @@ class _VerificationMethodsState extends State { ? Row( children: [ Expanded( - child: Button( + child: AppButton( title: TranslationBase.of(context) .useAnotherAccount, - onTap: () { + color: Colors.red[700], + onPressed: () { Navigator.of(context).pushNamed(LOGIN); }, )), @@ -311,13 +339,6 @@ class _VerificationMethodsState extends State { return verificationMethod == 4 || verificationMethod == 3 ? true : false; } -/* - *@author: Elham Rababah - *@Date:15/4/2020 - *@param: oTPSendType - *@return: - *@desc: send Activation Code By Otp Notification Type - */ sendActivationCodeByOtpNotificationType( oTPSendType, AuthViewModel authProv) async { // TODO : build enum for verfication method @@ -346,19 +367,19 @@ class _VerificationMethodsState extends State { this.startSMSService(oTPSendType, authProv); } else { print(res['ErrorEndUserMessage']); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { print('$err'); widget.changeLoadingStata(false); - helpers.showErrorToast(); + Helpers.showErrorToast(); }); } catch (e) {} } else { // TODO route to this page with parameters to inicate we should present 2 option if (Platform.isAndroid && oTPSendType == 3) { - helpers.showErrorToast('Your device not support this feature'); + Helpers.showErrorToast('Your device not support this feature'); } else { // Navigator.of(context).push(MaterialPageRoute( // builder: (BuildContext context) => @@ -404,13 +425,13 @@ class _VerificationMethodsState extends State { } } else { print(res['ErrorEndUserMessage']); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { print('$err'); widget.changeLoadingStata(false); - helpers.showErrorToast(); + Helpers.showErrorToast(); }); } catch (e) {} // } @@ -424,25 +445,34 @@ class _VerificationMethodsState extends State { case 2: return InkWell( onTap: () => {authenticateUser(2, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/login/104.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + Row( + children: [ + Image.asset( + 'assets/images/verify-whtsapp.png', + height: 60, + width: 60, + ), + ], ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyWhatsApp, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -451,18 +481,22 @@ class _VerificationMethodsState extends State { case 1: return InkWell( onTap: () => {authenticateUser(1, true, authProv)}, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/103.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + 'assets/images/verify-sms.png', + height: 60, + width: 60, ), projectsProvider.isArabic ? SizedBox( @@ -473,10 +507,8 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).verifySMS, - fontSize: projectsProvider.isArabic - ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -488,29 +520,30 @@ class _VerificationMethodsState extends State { if (checkIfBiometricAvailable(BiometricType.fingerprint)) {authenticateUser(3, true, authProv)} }, - child: RoundedContainer( - backgroundColor: - checkIfBiometricAvailable(BiometricType.fingerprint) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, + child: Container( + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/login/102.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + 'assets/images/verification_fingerprint_icon.png', + height: 60, + width: 60, ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyFingerprint, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -523,33 +556,41 @@ class _VerificationMethodsState extends State { authenticateUser(4, true, authProv); } }, - child: RoundedContainer( - backgroundColor: checkIfBiometricAvailable(BiometricType.face) - ? Colors.white - : Colors.white.withOpacity(.7), - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/images/login/101.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, - ), - SizedBox( - height: 20, + child: + // RoundedContainer( + // backgroundColor: checkIfBiometricAvailable(BiometricType.face) + // ? Colors.white + // : Colors.white.withOpacity(.7), + // borderColor: Colors.grey, + // showBorder: false, + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + margin: EdgeInsets.all(10), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/verification_faceid_icon.png', + height: 60, + width: 60, + ), + SizedBox( + height: 20, + ), + AppText( + TranslationBase.of(context).verifyFaceID, + fontSize: 14, + fontWeight: FontWeight.w600, + ) + ], ), - AppText( - TranslationBase.of(context).verifyFaceID, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, - ) - ], - ), - ))); + ))); break; default: @@ -559,30 +600,37 @@ class _VerificationMethodsState extends State { isMoreOption = true; }) }, - child: RoundedContainer( - backgroundColor: Colors.white, - borderColor: Colors.grey, - showBorder: true, + child: Container( + // backgroundColor: Colors.white, + // borderColor: Colors.grey, + // showBorder: false, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), child: Padding( - padding: EdgeInsets.fromLTRB(5, 0, 5, 5), + padding: EdgeInsets.fromLTRB(20, 15, 20, 15), child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( 'assets/images/login/more_icon.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), projectsProvider.isArabic ? SizedBox( - height: 15, + height: 20, ) : SizedBox( height: 10, ), AppText( TranslationBase.of(context).moreVerification, - fontSize: SizeConfig.textMultiplier * 2, - textAlign: TextAlign.center, + fontSize: 14, + fontWeight: FontWeight.w600, + // textAlign: TextAlign.center, ) ], ), @@ -764,11 +812,11 @@ class _VerificationMethodsState extends State { } } else { Navigator.pop(context); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { Navigator.pop(context); - helpers.showErrorToast(err); + Helpers.showErrorToast(err); }); } @@ -777,7 +825,13 @@ class _VerificationMethodsState extends State { authProv.setDoctorProfile(doctor); sharedPref.setObj(DOCTOR_PROFILE, profile); projectsProvider.isLogin = true; - Navigator.of(context).pushReplacementNamed(HOME); + + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false); } getDocProfiles(ClinicModel clinicInfo, authProv) { @@ -793,11 +847,23 @@ class _VerificationMethodsState extends State { loginProcessCompleted(res['DoctorProfileList'][0], authProv); } else { // changeLoadingStata(false); - helpers.showErrorToast(res['ErrorEndUserMessage']); + Helpers.showErrorToast(res['ErrorEndUserMessage']); } }).catchError((err) { // changeLoadingStata(false); - helpers.showErrorToast(err); + Helpers.showErrorToast(err); }); } + + getDate(DateTime date) { + final DateFormat formatter = DateFormat('dd MMM yyyy'); + + return formatter.format(date); + } + + getTime(DateTime date) { + final DateFormat formatter = DateFormat('HH:mm a'); + + return formatter.format(date); + } } diff --git a/lib/widgets/charts/app_bar_chart.dart b/lib/widgets/charts/app_bar_chart.dart index 98ef3cfa..aa532306 100644 --- a/lib/widgets/charts/app_bar_chart.dart +++ b/lib/widgets/charts/app_bar_chart.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; +import 'package:flutter/material.dart'; class AppBarChart extends StatelessWidget { const AppBarChart({ diff --git a/lib/widgets/charts/app_line_chart.dart b/lib/widgets/charts/app_line_chart.dart index 553afec8..1a29b1e6 100644 --- a/lib/widgets/charts/app_line_chart.dart +++ b/lib/widgets/charts/app_line_chart.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; +import 'package:flutter/material.dart'; /// chart line /// [seriesList] charts series diff --git a/lib/widgets/dashboard/activity_button.dart b/lib/widgets/dashboard/activity_button.dart new file mode 100644 index 00000000..8258a1df --- /dev/null +++ b/lib/widgets/dashboard/activity_button.dart @@ -0,0 +1,39 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class GetActivityButton extends StatelessWidget { + final value; + GetActivityButton(this.value); + @override + Widget build(BuildContext context) { + return Container( + width: 120, + padding: EdgeInsets.all(5), + margin: EdgeInsets.all(5), + height: 120, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(20), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.all(10), + child: AppText(value.value.toString(), + fontSize: 32, fontWeight: FontWeight.bold)), + Expanded( + child: AppText( + value.kPIParameter, + textOverflow: TextOverflow.clip, + fontSize: 12, + textAlign: TextAlign.center, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ); + } +} diff --git a/lib/widgets/dashboard/dashboard_item_icons_texts.dart b/lib/widgets/dashboard/dashboard_item_icons_texts.dart index 03107f46..740ebb66 100644 --- a/lib/widgets/dashboard/dashboard_item_icons_texts.dart +++ b/lib/widgets/dashboard/dashboard_item_icons_texts.dart @@ -1,10 +1,9 @@ -import 'dart:ffi'; import 'package:doctor_app_flutter/config/size_config.dart'; - -import '../shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; + import '../shared/app_texts_widget.dart'; +import '../shared/rounded_container_widget.dart'; class DashboardItemIconText extends StatefulWidget { final IconData icon; @@ -39,7 +38,7 @@ class _DashboardItemTextsState extends State { @override Widget build(BuildContext context) { return new RoundedContainer( - margin: 10, + margin: EdgeInsets.all(10), child: Stack( children: [ Align( diff --git a/lib/widgets/dashboard/dashboard_item_texts_widget.dart b/lib/widgets/dashboard/dashboard_item_texts_widget.dart index 80b0aa17..659e4562 100644 --- a/lib/widgets/dashboard/dashboard_item_texts_widget.dart +++ b/lib/widgets/dashboard/dashboard_item_texts_widget.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../shared/rounded_container_widget.dart'; import '../shared/app_texts_widget.dart'; -import 'package:flutter/material.dart'; +import '../shared/rounded_container_widget.dart'; class DashboardItemTexts extends StatefulWidget { final String label; @@ -60,7 +60,7 @@ class _DashboardItemTextsState extends State { backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, - margin: 4, + margin: EdgeInsets.all(4), ); } } diff --git a/lib/widgets/dashboard/guage_chart.dart b/lib/widgets/dashboard/guage_chart.dart index ddd649d1..6769c568 100644 --- a/lib/widgets/dashboard/guage_chart.dart +++ b/lib/widgets/dashboard/guage_chart.dart @@ -1,6 +1,6 @@ + import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; -import 'dart:math'; class GaugeChart extends StatelessWidget { final List seriesList; diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart new file mode 100644 index 00000000..d5da97c6 --- /dev/null +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -0,0 +1,68 @@ +import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class GetOutPatientStack extends StatelessWidget { + final value; + GetOutPatientStack(this.value); + @override + Widget build(BuildContext context) { + value.summaryoptions + .sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); + + var list = new List(); + value.summaryoptions.forEach((result) => + {list.add(getStack(result, value.summaryoptions.first.value))}); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + AppText( + value.kPIName, + medium: true, + ), + Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list) + ], + ); + } + + getStack(Summaryoptions value, max) { + return Stack(children: [ + Container( + height: 150, + margin: EdgeInsets.all(5), + width: 40, + child: SizedBox(), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), color: Colors.red[50]), + ), + Positioned( + bottom: 0, + child: Container( + child: SizedBox(), + margin: EdgeInsets.all(5), + padding: EdgeInsets.all(10), + height: max != 0 ? (150 * value.value) / max : 0, + width: 40, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.red[300]))), + Container( + height: 150, + margin: EdgeInsets.only(left: 5, top: 5), + padding: EdgeInsets.all(10), + child: RotatedBox( + quarterTurns: 1, + child: Center( + child: Align( + child: AppText( + value.kPIParameter + ' (' + value.value.toString() + ') ', + fontSize: 10, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + )), + ), + )) + ]); + } +} diff --git a/lib/widgets/dashboard/row_count.dart b/lib/widgets/dashboard/row_count.dart new file mode 100644 index 00000000..c56613da --- /dev/null +++ b/lib/widgets/dashboard/row_count.dart @@ -0,0 +1,45 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class RowCounts extends StatelessWidget { + final name; + final int count; + final Color c; + RowCounts(this.name, this.count, this.c); + @override + Widget build(BuildContext context) { + return Row( + children: [ + dot(c), + Padding( + padding: EdgeInsets.only(top: 5, bottom: 5), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + name, + color: Colors.black, + textAlign: TextAlign.center, + fontSize: 12, + textOverflow: TextOverflow.ellipsis, + ), + AppText( + ' (' + count.toString() + ')', + color: Colors.black, + textAlign: TextAlign.center, + fontSize: 14, + fontWeight: FontWeight.bold, + ) + ], + )), + ], + ); + } + + Widget dot(Color c) { + return Container( + padding: EdgeInsets.all(5.0), + margin: EdgeInsets.all(5.0), + decoration: BoxDecoration(color: c, shape: BoxShape.circle)); + } +} diff --git a/lib/widgets/dashboard/swiper_rounded_pagination.dart b/lib/widgets/dashboard/swiper_rounded_pagination.dart new file mode 100644 index 00000000..7e5c2c70 --- /dev/null +++ b/lib/widgets/dashboard/swiper_rounded_pagination.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; + +class SwiperRoundedPagination extends StatelessWidget { + final active; + SwiperRoundedPagination(this.active); + @override + Widget build(BuildContext context) { + return active == true + ? Container( + height: 5, + width: 30, + // margin: EdgeInsets.only(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), color: Colors.black), + ) + : Container( + height: 5, + width: 8, + margin: EdgeInsets.all(2), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), color: Colors.grey)); + } +} diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 5660fde6..55173809 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -8,6 +9,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; class DoctorReplyWidget extends StatefulWidget { final ListGtMyPatientsQuestions reply; @@ -22,12 +25,14 @@ class DoctorReplyWidget extends StatefulWidget { class _DoctorReplyWidgetState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( child: CardWithBgWidget( bgColor: - widget.reply.status == 1 - ? Color(0xffc4aa54) - : Colors.red[700], + widget.reply.status == 2 + ? Color(0xFF2E303A) + : Color(0xFFD02127), hasBorder: false, widget: Container( // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), @@ -45,54 +50,82 @@ class _DoctorReplyWidgetState extends State { color: Colors.black), children: [ new TextSpan( - text: widget.reply.infoStatus!=null ? widget.reply.infoStatus :'', + text: widget.reply.status==2 ? "Active":widget.reply.status==1?"Hold":"Cancelled",//TranslationBase.of(context).replied :TranslationBase.of(context).unReplied , style: TextStyle( - color: widget.reply.status != null - ? widget.reply.status == 1 - ? Color(0xffc4aa54) - : widget.reply.status == 2 - ? Colors.green[700] - : Colors.red[700] - : Colors.grey[500], + color: widget.reply.status == 2 + ? Color(0xFF2E303A) + : Color(0xFFD02127), + fontWeight: FontWeight.w700, fontFamily: 'Poppins', fontSize: 2.0 * SizeConfig.textMultiplier)), ], ), ), - AppText( - DateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .day - .toString() + - " " + - DateUtils.getMonth( - DateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .month) - .toString() - .substring(0, 3) + - ' ' + + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + DateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .day + .toString() + + " " + + DateUtils.getMonth( + DateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .month) + .toString() + .substring(0, 3) + + ' ' + + DateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .year + .toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + AppText( DateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .hour + .toString() + + ":"+ + DateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) - .year - .toString(), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ) + .minute + .toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + + ], + ), ], ), Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: AppText( Helpers.capitalize( widget.reply.patientName), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" +widget.reply.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ), SizedBox( width: 4, ), @@ -200,21 +233,23 @@ class _DoctorReplyWidgetState extends State { Container( width: MediaQuery.of(context).size.width * 0.5, child: RichText( + maxLines: 3, + overflow: TextOverflow.ellipsis, text: new TextSpan( style: new TextStyle( fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), children: [ new TextSpan( - text: TranslationBase.of(context).doctorResponse + " : ", + text:"Patient Question :" ,//TranslationBase.of(context).doctorResponse + " : ", style: TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)), new TextSpan( - text: widget.reply.remarks, + text: widget.reply?.remarks?.trim()??'', style: TextStyle( fontFamily: 'Poppins', color: Color(0xFF575757), - fontSize: 15)), + fontSize: 12)), ], ), ), @@ -222,234 +257,15 @@ class _DoctorReplyWidgetState extends State { ],) ], ), - - SizedBox( - height: 20, - ), + // Container( + // alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight, + // child: Icon(FontAwesomeIcons.arrowRight, + // size: 20, color: Colors.black),) ], ), // onTap: onTap, )), ), ); - // Stack( - // children: [ - // Container( - // margin: EdgeInsets.symmetric(vertical: 10.0), - // width: double.infinity, - // decoration: BoxDecoration( - // color: HexColor('#FFFFFF'), - // borderRadius: BorderRadius.all( - // Radius.circular(20.0), - // ), - // ), - // child: Container( - // margin: EdgeInsets.all(5), - // child: Column( - // children: [ - // SizedBox(height: 18,), - // Container( - // margin: EdgeInsets.only(right: 15), - // child: Row( - // children: [ - // SizedBox(width: 5,), - // //LargeAvatar(icon: widget.reply.gender == 0 ? DoctorApp.male : DoctorApp.femaleicon ,), - // Container( - // decoration: BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment(-1, -1), - // end: Alignment(1, 1), - // colors: [ - // Colors.grey[100], - // Colors.grey[200], - // ]), - // boxShadow: [ - // BoxShadow( - // color: Color.fromRGBO(0, 0, 0, 0.08), - // offset: Offset(0.0, 5.0), - // blurRadius: 16.0) - // ], - // borderRadius: BorderRadius.all(Radius.circular(50.0)), - // ), - // width: 80, - // height: 80, - // child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.female_icon,size: 80,)), - // - // SizedBox(width: 15,), - // Expanded( - // child: Container( - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // widget.reply.patientName, - // fontSize: 1.5 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // ), - // SizedBox( - // height: 5, - // ), - // - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).fileNo, - // fontSize: 1.7 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // ), - // Container( - // margin: EdgeInsets.only(left: 5), - // child: AppText( - // '${widget.reply.patientID}', - // fontSize: 1.7 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // ), - // ), - // ], - // ), - // SizedBox( - // height: 5, - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).mobileNo, - // fontSize: 1.7 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // ), - // Container( - // margin: EdgeInsets.only(left: 5), - // child: AppText( - // widget.reply.mobileNumber, - // fontSize: 1.7 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // ), - // ), - // ], - // ), - // SizedBox( - // height: 5, - // ), - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Container( - // width: 70, - // height: 20, - // decoration: BoxDecoration( - // borderRadius: BorderRadius.all(Radius.circular(60.0)), - // color: Colors.green[600] - // ), - // child: Center( - // child: AppText( - // widget.reply.requestTime, - // fontSize: 1.5 * SizeConfig.textMultiplier, - // color: Colors.white, - // ), - // ), - // ), - // Container( - // - // child: AppText( - // '${Helpers.getDate(widget.reply.requestDate)}', - // fontSize: 1.7 * SizeConfig.textMultiplier, - // fontWeight: FontWeight.bold, - // color: Colors.black, - // ), - // ), - // ], - // ), - // - // ], - // ), - // ), - // ) - // - // ], - // ), - // ), - // - // !widget.isShowMore ? SizedBox(height: 18,) : - // AnimatedContainer( - // duration: Duration(milliseconds: 200), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Divider(color: Colors.grey), - // SizedBox(height: 5,), - // Row( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // TranslationBase.of(context).remarks + " : ", - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ),Expanded( - // child: AppText( - // widget.reply.remarks, - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ), - // ), - // ], - // ), - // SizedBox(height: 10,), - // Row( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // TranslationBase.of(context).doctorResponse + " : ", - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ),Expanded( - // child: AppText( - // widget.reply.doctorResponse, - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ), - // ), - // ], - // ),SizedBox(height: 10,), - // Row( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // TranslationBase.of(context).infoStatus + " : ", - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ),Expanded( - // child: AppText( - // widget.reply.infoStatus, - // fontSize: 2.5 * SizeConfig.textMultiplier, - // //fontWeight: FontWeight.bold, - // ), - // ), - // ], - // ) - // ], - // ), - // ), - // - // ], - // ), - // ), - // ), - // Positioned( - // right: 5, - // top: 20, - // child: InkWell( - // onTap: (){ - // setState(() { - // widget.isShowMore = !widget.isShowMore; - // }); - // }, - // child: Icon(widget.isShowMore? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down)), - // ) - // ], - // - // ); } } diff --git a/lib/widgets/doctor/lab_result_widget.dart b/lib/widgets/doctor/lab_result_widget.dart index 5ca50864..c4343a4b 100644 --- a/lib/widgets/doctor/lab_result_widget.dart +++ b/lib/widgets/doctor/lab_result_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -72,7 +72,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, color: Colors.white, ), @@ -84,7 +84,7 @@ class _LabResultWidgetState extends State { child: Container( color: HexColor('#515B5D'), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).value, color: Colors.white), ), @@ -99,7 +99,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).range, color: Colors.white), ), @@ -135,7 +135,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( '${result.description}', color: Colors.grey[800], ), @@ -146,7 +146,7 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: Texts('${result.resultValue}', + child: AppText('${result.resultValue}', color: Colors.grey[800]), ), height: 60), @@ -154,7 +154,7 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: Texts( + child: AppText( '${result.referenceRange}', color: Colors.grey[800]), ), diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index 98371a9f..453cff30 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -3,13 +3,10 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/referral_view_model.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.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/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -21,7 +18,12 @@ class MyReferralPatientWidget extends StatefulWidget { final bool isExpand; final Function expandClick; - MyReferralPatientWidget({Key key, this.myReferralPatientModel, this.model, this.isExpand, this.expandClick}); + MyReferralPatientWidget( + {Key key, + this.myReferralPatientModel, + this.model, + this.isExpand, + this.expandClick}); @override _MyReferralPatientWidgetState createState() => @@ -428,8 +430,9 @@ class _MyReferralPatientWidgetState extends State { Container( width: double.infinity, margin: EdgeInsets.only(left: 10, right: 10), - child: Button( - onTap: () async { + child: AppButton( + title : TranslationBase.of(context).replay, + onPressed: () async { final form = _formKey.currentState; if (form.validate()) { try { @@ -443,7 +446,6 @@ class _MyReferralPatientWidgetState extends State { } } }, - title: TranslationBase.of(context).replay, loading: widget.model.state == ViewState.BusyLocal, ), ) diff --git a/lib/widgets/doctor/my_referred_patient_widget.dart b/lib/widgets/doctor/my_referred_patient_widget.dart deleted file mode 100644 index 88063f93..00000000 --- a/lib/widgets/doctor/my_referred_patient_widget.dart +++ /dev/null @@ -1,311 +0,0 @@ -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/referred_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.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/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -class MyReferredPatientWidget extends StatefulWidget { - final MyReferredPatientModel myReferredPatientModel; - final ReferredPatientViewModel model; - - MyReferredPatientWidget({Key key, this.myReferredPatientModel, this.model}); - - @override - _MyReferredPatientWidgetState createState() => - _MyReferredPatientWidgetState(); -} - -class _MyReferredPatientWidgetState extends State { - bool _showDetails = false; - bool _isLoading = false; - TextEditingController answerController; - - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10), - padding: EdgeInsets.only(left: 0, top: 8, right: 0, bottom: 0), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.fromBorderSide(BorderSide( - color: Color(0xffCCCCCC), - width: 2, - )), - color: Color(0xffffffff), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - HeaderBodyExpandableNotifier( - headerWidget: Container( - margin: EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - AppText( - '${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}', - fontSize: 2.5 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - InkWell( - onTap: () { - setState(() { - _showDetails = !_showDetails; - }); - }, - child: Image.asset( - "assets/images/ic_circle_arrow.png", - width: 25, - height: 25, - color: Colors.black, - ), - ), - ], - ), - ), - bodyWidget: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 5, - ), - Divider( - color: Color(0xFF000000), - height: 0.5, - ), - Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 0.5), - ), - children: [ - TableRow(children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - decoration: BoxDecoration(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).fileNo, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - '${widget.myReferredPatientModel.patientId}', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ), - Container( - margin: EdgeInsets.only( - left: 4, top: 2.5, right: 2.5, bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).referralDoctor, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - Texts( - widget.myReferredPatientModel - .referralDoctorName, - maxLength: 80, - readMore: true, - ), - ], - ), - ), - ]), - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).referringClinic, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - '${widget.myReferredPatientModel.referralClinicDescription}', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ), - Container( - margin: EdgeInsets.only( - left: 4, top: 2.5, right: 2.5, bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).frequency, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - widget.myReferredPatientModel - .frequencyDescription, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ) - ], - ), - TableRow(children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).priority, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - '${widget.myReferredPatientModel.priorityDescription}', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ), - Container( - margin: EdgeInsets.only( - left: 4, top: 2.5, right: 2.5, bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).maxResponseTime, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - AppText( - Helpers.getDateFormatted(widget - .myReferredPatientModel.maxResponseTime), - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), - ) - ]) - ], - ), - Divider( - color: Color(0xFF000000), - height: 0.5, - ), - SizedBox( - height: 5, - ), - Container( - margin: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).clinicDetailsandRemarks, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - textAlign: TextAlign.start, - ), - SizedBox( - height: 5, - ), - Texts( - '${widget.myReferredPatientModel.referringDoctorRemarks}', - style: "bodyText1", - readMore: true, - textAlign: TextAlign.start, - maxLength: 100), - SizedBox( - height: 5, - ), - AppText( - TranslationBase.of(context).answerSuggestions, - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - textAlign: TextAlign.start, - ), - SizedBox( - height: 5, - ), - Texts( - '${widget.myReferredPatientModel.referredDoctorRemarks}', - style: "bodyText1", - readMore: true, - textAlign: TextAlign.start, - maxLength: 100), - ], - ), - ), - SizedBox( - height: 5, - ), - SizedBox(height: 10.0), - Container( - margin: EdgeInsets.all(10), - width: double.infinity, - child: Button( - onTap: () async { - try { - await widget.model - .verify(widget.myReferredPatientModel); - - DrAppToastMsg.showSuccesToast( - 'Verify Successfully'); - } catch (e) { - DrAppToastMsg.showErrorToast(e); - } - }, - title: TranslationBase.of(context).verify, - loading: widget.model.state == ViewState.BusyLocal, - ), - ) - ], - ) - ], - ), - isExpand: _showDetails, - ) - ], - ), - ); - } -} diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index c28cc8d3..e4112cf2 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -6,6 +7,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class MyScheduleWidget extends StatelessWidget { final ListDoctorWorkingHoursTable workingHoursTable; @@ -14,6 +16,7 @@ class MyScheduleWidget extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); List workingHours = Helpers.getWorkingHours( workingHoursTable.workingHours, ); @@ -21,31 +24,29 @@ class MyScheduleWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - AppText( - workingHoursTable.dayName, - fontSize: 2.5 * SizeConfig.textMultiplier, - fontFamily: 'Poppins', - // fontSize: 18 - ), - SizedBox( - height: 10, - ), - AppText( - ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', - fontSize: 2.5 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w700, - - fontFamily: 'Poppins', - // fontSize: 18 - ), - ], + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + AppText( + projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) , + fontSize: 16, + fontFamily: 'Poppins', + // fontSize: 18 + ), + AppText( + ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', + fontSize: 14, + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + // fontSize: 18 + ), + ], + ), ), Container( width: MediaQuery.of(context).size.width * 0.55, @@ -61,7 +62,7 @@ class MyScheduleWidget extends StatelessWidget { if (DateUtils.isToday(workingHoursTable.date)) AppText( "Today", - fontSize: 2.5 * SizeConfig.textMultiplier, + fontSize: 1.8 * SizeConfig.textMultiplier, fontFamily: 'Poppins', color: Colors.green[500], // fontSize: 18 @@ -73,16 +74,33 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: workingHours.map((work) { return Container( + margin: EdgeInsets.only(bottom:workingHours.length>1? 15:0), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 5, ), + if(workingHoursTable.clinicName!=null) + AppText( + workingHoursTable.clinicName??"", + fontSize: 15, + fontWeight: FontWeight.w700, + ), + Container( + width: MediaQuery.of(context).size.width*0.55, + child: AppText( + '${work.from} - ${work.to}', + fontSize: 15, + fontWeight: FontWeight.w300, + ), + ), + if(workingHoursTable.projectName!=null) AppText( - work.from + ' - ' + work.to, - fontSize: 2.0 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) + workingHoursTable.projectName??"", + fontSize: 15, + fontWeight: FontWeight.w700, + ), ], ), ); diff --git a/lib/widgets/medicine/medicine_item_widget.dart b/lib/widgets/medicine/medicine_item_widget.dart index d3a3830c..bd71e477 100644 --- a/lib/widgets/medicine/medicine_item_widget.dart +++ b/lib/widgets/medicine/medicine_item_widget.dart @@ -1,10 +1,12 @@ import 'dart:convert'; import 'dart:typed_data'; + import 'package:doctor_app_flutter/config/size_config.dart'; -import '../shared/rounded_container_widget.dart'; -import '../shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import '../shared/app_texts_widget.dart'; +import '../shared/rounded_container_widget.dart'; + /* *@author: ibrahim albitar *@Date:28/4/2020 @@ -67,7 +69,7 @@ class _MedicineItemWidgetState extends State { backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, - margin: 4, + margin: EdgeInsets.all(4), raduis: 10, ); } diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index fb5a9a0c..abf907a7 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; - import 'package:provider/provider.dart'; class SMSOTP { @@ -59,21 +58,10 @@ class SMSOTP { builder: (context) { projectProvider = Provider.of(context); return AlertDialog( - title: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - IconButton( - icon: Icon(Icons.close), - onPressed: () { - this.isClosed = true; - Navigator.pop(context); - this.onFailure(); - }, - ) - ], - ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0))), + contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 0.0, 24.0), + + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.all(Radius.circular(10.0))), content: StatefulBuilder(builder: (context, setState) { if (displayTime == '') { startTimer(setState); @@ -85,11 +73,46 @@ class SMSOTP { child: Center( child: SingleChildScrollView( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - type == 1 - ? Image.asset('assets/images/login/103.png') - : Image.asset('assets/images/login/104.png'), + Padding( + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + type == 1 + ? Padding( + child: Icon( + DoctorApp.verify_sms_1, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ) + : Padding( + child: Icon( + DoctorApp.verify_whtsapp, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, right: 10, bottom: 20), + child: IconButton( + icon: Icon(Icons.close), + iconSize: 40, + onPressed: () { + this.isClosed = true; + Navigator.pop(context); + this.onFailure(); + }, + )) + ], + ) + ])), Padding( padding: EdgeInsets.only(top: 5), child: AppText( @@ -98,7 +121,8 @@ class SMSOTP { mobileNo .toString() .substring(mobileNo.toString().length - 3), - textAlign: TextAlign.center, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, )), Form( key: verifyAccountForm, @@ -107,7 +131,7 @@ class SMSOTP { child: Directionality( textDirection: TextDirection.ltr, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Container( width: SizeConfig.realScreenWidth * 0.15, @@ -218,15 +242,23 @@ class SMSOTP { )), ), ), - Padding( - padding: EdgeInsets.only(top: 10), - child: AppText( - TranslationBase.of(context).validationMessage + - ' ' + - displayTime, - color: Colors.red, - textAlign: TextAlign.center, - )) + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).validationMessage + ' ', + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + displayTime, + color: Colors.red, + textAlign: TextAlign.start, + fontWeight: FontWeight.bold, + fontSize: 14, + ) + ]) ], ))), ); @@ -248,15 +280,15 @@ class SMSOTP { // contentPadding: EdgeInsets.only(top: 20, bottom: 20), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), + borderSide: BorderSide(color: Colors.grey[100]), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).errorColor), + borderSide: BorderSide(color: Colors.grey[100]), ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index c53a38d7..5dcedc7e 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -5,11 +5,9 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.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/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; class PatientCard extends StatelessWidget { @@ -17,12 +15,14 @@ class PatientCard extends StatelessWidget { final Function onTap; final String patientType; final String arrivalType; + final bool isInpatient; const PatientCard( {Key key, this.patientInfo, this.onTap, this.patientType, - this.arrivalType}) + this.arrivalType, + this.isInpatient}) : super(key: key); @override Widget build(BuildContext context) { @@ -35,17 +35,18 @@ class PatientCard extends StatelessWidget { color: Colors.white, ), child: Stack(children: [ - Container( - height: MediaQuery.of(context).size.height * .20, - width: 5, - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10), - bottomLeft: Radius.circular(10)), - color: patientInfo.patientStatusType == 43 - ? Colors.green[500] - : Colors.red[800], - )), + if (SERVICES_PATIANT2[int.parse(patientType)] != "List_MyInPatient") + Container( + height: MediaQuery.of(context).size.height * .20, + width: 5, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + bottomLeft: Radius.circular(10)), + color: patientInfo.patientStatusType == 43 + ? Colors.green[500] + : Colors.red[800], + )), Container( padding: EdgeInsets.only(left: 10, right: 0, bottom: 0), child: InkWell( @@ -55,7 +56,7 @@ class PatientCard extends StatelessWidget { height: 10, ), SERVICES_PATIANT2[int.parse(patientType)] == - "patientArrivalList" + "List_MyOutPatient" ? Padding( padding: EdgeInsets.only(left: 12.0), child: Row( @@ -80,7 +81,7 @@ class PatientCard extends StatelessWidget { ? AppText( patientInfo.startTime != null ? patientInfo.startTime - : '', + : patientInfo.startTimes, fontFamily: 'Poppins', fontWeight: FontWeight.w600, ) @@ -102,14 +103,17 @@ class PatientCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row(children: [ - AppText( - (Helpers.capitalize(patientInfo.firstName) + - " " + - Helpers.capitalize(patientInfo.lastName)), - fontSize: SizeConfig.textMultiplier * 2, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Container( + width: 170, + child: AppText( + (Helpers.capitalize(patientInfo.firstName) + + " " + + Helpers.capitalize(patientInfo.lastName)), + fontSize: 16, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + textOverflow: TextOverflow.ellipsis, + ), ), patientInfo.gender == 1 ? Icon( @@ -125,25 +129,34 @@ class PatientCard extends StatelessWidget { children: [ AppText( patientInfo.nationalityName != null - ? patientInfo.nationalityName + ? patientInfo.nationalityName.trim() : patientInfo.nationality != null - ? patientInfo.nationality - : "", + ? patientInfo.nationality.trim() + : patientInfo.nationalityId != null + ? patientInfo.nationalityId + : "", fontWeight: FontWeight.bold, fontSize: 14, + textOverflow: TextOverflow.ellipsis, ), - patientInfo.nationality != null + patientInfo.nationality != null || + patientInfo.nationalityId != null ? ClipRRect( borderRadius: BorderRadius.circular(20.0), child: Image.network( - patientInfo.nationalityFlagURL, + patientInfo.nationalityFlagURL != null + ? patientInfo.nationalityFlagURL + : '', height: 25, width: 30, errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) { - return Text('No Image'); + return AppText( + 'No Image', + fontSize: 10, + ); }, )) : SizedBox() @@ -200,110 +213,170 @@ class PatientCard extends StatelessWidget { ), ), ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black, - fontFamily: 'Poppins', + if (SERVICES_PATIANT2[int.parse(patientType)] != + "List_MyInPatient") + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: + TranslationBase.of(context).age + + " : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: + "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15)), + ], ), - children: [ + ), + ), + if (isInpatient == true) + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: + 2.0 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ new TextSpan( - text: TranslationBase.of(context).age + - " : ", + text: patientInfo.admissionDate == null + ? "" + : TranslationBase.of(context) + .admissionDate + + " : ", style: TextStyle(fontSize: 14)), new TextSpan( - text: - "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", + text: patientInfo.admissionDate == null + ? "" + : "${DateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), - ], - ), + ]))), + if (isInpatient == true) + Row( + children: [ + AppText( + "${TranslationBase.of(context).numOfDays}: ", + fontSize: 15, + ), + AppText( + "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", + fontSize: 15, + fontWeight: FontWeight.w700), + ], ), - ), - if (SERVICES_PATIANT2[int.parse(patientType)] == - "List_MyOutPatient") - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .appointmentDate + - " : ", - fontSize: 14, - ), - patientInfo.startTimes != null - ? Container( - height: 15, - width: 60, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(25), - color: HexColor("#20A169"), - ), - child: AppText( - patientInfo.startTimes, - color: Colors.white, - fontSize: 1.5 * - SizeConfig.textMultiplier, - textAlign: TextAlign.center, - fontWeight: FontWeight.bold, - ), - ) - : SizedBox(), - SizedBox( - width: 3.5, - ), - Container( - child: patientInfo.appointmentDate != null - ? AppText( - DateUtils - .convertDateFromServerFormat( - patientInfo - .appointmentDate - .toString(), - 'yyyy-MM-dd'), - fontSize: 1.5 * - SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ) - : SizedBox(), - ), - SizedBox( - height: 0.5, - ) - ], - ), - margin: EdgeInsets.only( - top: 8, - ), - ) + // Container( + // child: Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Expanded( + // child: AppText( + // TranslationBase.of(context).noOfDays + + // " : ", + // fontSize: 14, + // ), + // ), + // AppText( + // patientInfo.days, + // color: Colors.white, + // fontSize: 1.5 * SizeConfig.textMultiplier, + // textAlign: TextAlign.center, + // fontWeight: FontWeight.bold, + // ), + // SizedBox( + // height: 0.5, + // ) + // ], + // ), + // margin: EdgeInsets.only( + // top: 8, + // ), + // ), + //if (SERVICES_PATIANT2[int.parse(patientType)] == + // "List_MyOutPatient") + // Container( + // child: Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // AppText( + // TranslationBase.of(context) + // .appointmentDate + + // " : ", + // fontSize: 14, + // ), + + // // Container( + // // child: + // patientInfo.appointmentDate != null + // ? AppText( + // DateUtils + // .convertDateFromServerFormat( + // patientInfo.appointmentDate + // .toString(), + // 'yyyy-MM-dd'), + // fontSize: 12, + // fontWeight: FontWeight.bold, + // ) + // : SizedBox(), + // //), + // patientInfo.startTimes != null + // ? + // // + // // Container( + // // // height: 15, + // // // width: 60, + // // padding: EdgeInsets.all(5), + // // decoration: BoxDecoration( + // // borderRadius: + // // BorderRadius.circular(25), + // // color: HexColor("#20A169"), + // // ), + // // child: + + // AppText( + // ' ' + patientInfo.startTimes, + // fontSize: 11, + // fontWeight: FontWeight.bold, + // ) + // //) + // : SizedBox(), + // SizedBox( + // width: 3.5, + // ), + // //, + // SizedBox( + // height: 0.5, + // ) + // ], + // ), + // margin: EdgeInsets.only( + // top: 8, + // ), + //) ])) ]), SERVICES_PATIANT2[int.parse(patientType)] == - "patientArrivalList" + "List_MyOutPatient" ? Row( mainAxisAlignment: MainAxisAlignment.end, children: [ Container( padding: EdgeInsets.all(4), - // decoration: BoxDecoration( - // borderRadius: BorderRadius.only( - // bottomRight: Radius.circular(8), - // topLeft: Radius.circular(8), - // ), - // color: patientInfo.appointmentType == - // 'Regular' && - // patientInfo.visitTypeId == 100 - // ? HexColor('#D02127') - // : patientInfo.appointmentType == - // 'Walkin' - // ? HexColor('#28323A') - // : HexColor('#6C7379'), - // ), child: Image.asset( patientInfo.appointmentType == 'Regular' && @@ -317,7 +390,19 @@ class PatientCard extends StatelessWidget { width: 35, )), ]) - : SizedBox() + : (isInpatient == true) + ? Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(4), + child: Image.asset( + 'assets/images/inpatient.png', + height: 25, + width: 35, + )), + ]) + : SizedBox() ], ), onTap: onTap, diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index a6a492ca..d2a68acd 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 14afa5b6..a08282c0 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -1,273 +1,66 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.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/card_with_bg_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; class PatientReferralItemWidget extends StatelessWidget { + final String referralStatus; + final int referralStatusCode; final String patientName; + final int patientGender; + final String referredDate; + final String referredTime; final String patientID; - final String referralStatus; - final isReferredTo; final isSameBranch; + final bool isReferral; + final bool isReferralClinic; + final String referralClinic; + final String remark; + final String nationality; + final String nationalityFlag; + final String doctorAvatar; final String referralDoctorName; final String clinicDescription; - final String remark; - final String referredOn; - final String answerFromTarget; final Widget infoIcon; - final PendingReferral patientInfo; PatientReferralItemWidget( - this.patientID, { - this.patientName, - this.referralStatus, - this.isReferredTo = false, - this.isSameBranch, - this.referralDoctorName, - this.clinicDescription, - this.remark, - this.referredOn, - this.answerFromTarget, - this.infoIcon, - this.patientInfo, - }); + {this.referralStatus, + this.referralStatusCode, + this.patientName, + this.patientGender, + this.referredDate, + this.referredTime, + this.patientID, + this.isSameBranch, + this.isReferral, + this.remark, + this.nationality, + this.nationalityFlag, + this.doctorAvatar, + this.referralDoctorName, + this.clinicDescription, + this.infoIcon,this.isReferralClinic=false,this.referralClinic}); @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0), child: Column( children: [ - // TODO should be removed by mousa - // Row( - // children: [ - // Expanded( - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // if (referralStatus != null) - // 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, - // ), - // Row( - // children: [ - // AppText( - // isReferredTo - // ? "${TranslationBase.of(context).referTo}: " - // : "${TranslationBase.of(context).referredFrom}: ", - // color: Colors.grey, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // AppText( - // isSameBranch - // ? TranslationBase.of(context).sameBranch - // : TranslationBase.of(context).otherBranch, - // color: Colors.black, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // ], - // ), - // SizedBox( - // height: 8, - // ), - // 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, - // ), - // if (clinicDescription != null) - // Row( - // children: [ - // AppText( - // "${TranslationBase.of(context).clinic}: ", - // color: Colors.grey, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // AppText( - // clinicDescription, - // color: Colors.black, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // ], - // ), - // SizedBox( - // height: 8, - // ), - // 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( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // AppText( - // TranslationBase.of(context).referralRemark, - // color: Colors.grey, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // Expanded( - // child: 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, - // ), - // ], - // ), - // if (answerFromTarget != null) - // SizedBox( - // height: 8, - // ), - // if (answerFromTarget != null) - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).referralResponse, - // color: Colors.grey, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // AppText( - // answerFromTarget != "" ? answerFromTarget : '-', - // color: Colors.black, - // fontWeight: FontWeight.bold, - // fontSize: 12, - // ), - // ], - // ), - // SizedBox( - // height: 16, - // ), - // ], - // ), - // ), - // if (infoIcon != null) infoIcon, - // ], - // ), - // const Divider( - // color: Color(0xffCCCCCC), - // height: 1, - // thickness: 1, - // indent: 0, - // endIndent: 0, - // ), - // SizedBox( - // height: 8, - // ), Container( child: CardWithBgWidget( - bgColor: referralStatus != null - ? referralStatus == 'Pending' - ? Color(0xffc4aa54) - : Colors.red[800] - : Colors.grey[500], + bgColor: referralStatusCode == 1 + ? Color(0xffc4aa54) + : referralStatusCode == 46 + ? Colors.green[700] + : Colors.red[700], hasBorder: false, widget: Container( // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), @@ -278,206 +71,236 @@ class PatientReferralItemWidget extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: referralStatus != null - ? referralStatus - : "", - style: TextStyle( - color: referralStatus != null - ? referralStatus == 'Pending' - ? Color(0xffc4aa54) - : referralStatus == 'Accepted' - ? Colors.green[700] - : Colors.red[700] - : Colors.grey[500], - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 2.0 * SizeConfig.textMultiplier)), - ], - ), + AppText( + referralStatus != null ? referralStatus : "", + fontFamily: 'Poppins', + fontSize: 1.9 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700, + color: referralStatusCode == 1 + ? Color(0xffc4aa54) + : referralStatusCode == 46 + ? Colors.green[700] + : Colors.red[700], ), - //TODO :ask backend to return in the standard format AppText( - referredOn, + referredDate, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 2.1 * SizeConfig.textMultiplier, + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Color(0XFF28353E), ) ], ), Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: AppText( - patientInfo.patientName, - fontSize: SizeConfig.textMultiplier * 2.5, + patientName, + fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, + color: Colors.black, fontFamily: 'Poppins', ), ), SizedBox( width: 4, ), - /*patient.gender*/1 == 1 + patientGender == 1 ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) + DoctorApp.male_2, + color: Colors.blue, + ) : Icon( - DoctorApp.female_1, - color: Colors.pink, + DoctorApp.female_1, + color: Colors.pink, + ), + SizedBox( + width: 4, ), + AppText( + referredTime, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ) ], ), - SizedBox( - width: 10, - ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Column( - children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: TranslationBase.of(context).fileNumber, - style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), - new TextSpan( - text: patientInfo.patientID.toString(), - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).fileNumber, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + AppText( + patientID, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), ], ), - ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: TranslationBase.of(context).referredFrom, - style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), - new TextSpan( - text: isSameBranch - ? TranslationBase.of(context).sameBranch - : TranslationBase.of(context).otherBranch, - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), - ], - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + isSameBranch ? TranslationBase.of(context).referredFrom :TranslationBase.of(context).refClinic, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), + ), + + AppText( + !isReferralClinic? isSameBranch ? TranslationBase.of(context).sameBranch : TranslationBase.of(context).otherBranch: " "+referralClinic, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], ), - ), - ], + ], + ), ), Row( children: [ AppText( - /*patient.nationalityName ?? - patient.nationality*/ "Saudi", + nationality != null ? nationality : "", fontWeight: FontWeight.bold, - fontSize: 12, + color: Color(0xFF2E303A), + fontSize: 1.4 * SizeConfig.textMultiplier, ), - /* patient.nationality != null + nationalityFlag != null ? ClipRRect( - borderRadius: - BorderRadius - .circular( - 20.0), - child: Image.network( - patient - .nationalityFlagURL, - height: 25, - width: 30, - errorBuilder: - (BuildContext - context, - Object - exception, - StackTrace - stackTrace) { - return Text( - 'No Image'); - }, - ))*/ - /*:*/ SizedBox() + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + nationalityFlag, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() ], ) ], ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: - TranslationBase.of(context).remarks + " : ", - style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), - new TextSpan( - text: patientInfo.remarksFromSource, - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), - ], + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).remarks + " : ", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Color(0XFF575757), ), - ), - ), - SizedBox( - height: 20, + Expanded( + child: AppText( + remark, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.8 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + maxLines: 1, + ), + ), + ], ), - Column( + Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - RichText( - text: TextSpan( - style: TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - TextSpan( - text: TranslationBase.of(context) - .referralDoctor + - " : ", - style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), - TextSpan( - text: referralDoctorName, - style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 15)), - ], + Container( + margin: EdgeInsets.only(left: 10, right: 0), + child: Image.asset( + isReferral + ? 'assets/images/patient/ic_ref_arrow_up.png' + : 'assets/images/patient/ic_ref_arrow_left.png', + height: 50, + width: 30, ), - ) + ), + Container( + margin: EdgeInsets.only( + left: 0, top: 25, right: 0, bottom: 0), + padding: EdgeInsets.only(left: 4.0, right: 4.0), + child: Container( + width: 40, + height: 40, + child: doctorAvatar != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + doctorAvatar, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : Container( + child: Image.asset( + patientGender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 10, top: 25, right: 10, bottom: 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + referralDoctorName, + fontFamily: 'Poppins', + fontWeight: FontWeight.w800, + fontSize: 1.7 * SizeConfig.textMultiplier, + color: Colors.black, + ), + if (clinicDescription != null) + AppText( + clinicDescription, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + fontSize: 1.4 * SizeConfig.textMultiplier, + color: Color(0XFF2E303A), + ), + ], + ), + ), + ), ], ), Container( width: double.infinity, alignment: Alignment.centerRight, - child: Icon(FontAwesomeIcons.arrowRight, - size: 25, color: Colors.black)) + child: infoIcon ?? Container()) ], ), // onTap: onTap, diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index ebac98b5..a9db021f 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -13,13 +13,14 @@ class PatientProfileButton extends StatelessWidget { final PatiantInformtion patient; final String patientType; String arrivalType; + final bool isInPatient; String from; String to; final String url = "assets/images/"; final bool isDisable; final bool isLoading; final Function onTap; - + final bool isDischargedPatient; PatientProfileButton( {Key key, this.patient, @@ -33,7 +34,9 @@ class PatientProfileButton extends StatelessWidget { this.onTap, this.isLoading = false, this.from, - this.to}) + this.to, + this.isInPatient = false, this.isDischargedPatient=false, + }) : super(key: key); @override @@ -110,6 +113,9 @@ class PatientProfileButton extends StatelessWidget { } void navigator(BuildContext context, route) { + if(route == null) + return; + if (from == null) { from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } @@ -124,7 +130,9 @@ class PatientProfileButton extends StatelessWidget { 'from': from, 'to': to, 'patientType': patientType, - 'arrivalType': arrivalType + 'arrivalType': arrivalType, + 'isInpatient': isInPatient, + 'isDischargedPatient': isDischargedPatient, }); } } diff --git a/lib/widgets/patients/profile/add-order/addNewOrder.dart b/lib/widgets/patients/profile/add-order/addNewOrder.dart new file mode 100644 index 00000000..275888e3 --- /dev/null +++ b/lib/widgets/patients/profile/add-order/addNewOrder.dart @@ -0,0 +1,59 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class AddNewOrder extends StatelessWidget { + const AddNewOrder({ + Key key, + this.onTap, this.label, + }) : super(key: key); + + final Function onTap; + final String label; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + child: Container( + width: double.maxFinite, + height: 140, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.grey[300], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Container( + height: 90, + child: Column( + children: [ + Container( + height: 40, + width: 40, + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Icon( + Icons.add, + color: Colors.white, + ), + ), + ), + SizedBox( + height: 10, + ), + AppText( + label ??'', + color: Colors.grey[600], + fontWeight: FontWeight.w600, + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/widgets/patients/profile/large_avatar.dart b/lib/widgets/patients/profile/large_avatar.dart index e98c2de4..80f54e12 100644 --- a/lib/widgets/patients/profile/large_avatar.dart +++ b/lib/widgets/patients/profile/large_avatar.dart @@ -3,8 +3,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'avatar_gradients.dart'; - class LargeAvatar extends StatelessWidget { LargeAvatar( {Key key, diff --git a/lib/widgets/patients/profile/patient-page-header-widget.dart b/lib/widgets/patients/profile/patient-page-header-widget.dart index ffb297b1..b9312289 100644 --- a/lib/widgets/patients/profile/patient-page-header-widget.dart +++ b/lib/widgets/patients/profile/patient-page-header-widget.dart @@ -8,7 +8,6 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.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/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart new file mode 100644 index 00000000..48454af4 --- /dev/null +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -0,0 +1,318 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.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/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class PatientProfileHeaderNewDesignAppBar extends StatelessWidget + with PreferredSizeWidget { + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final double height; + + PatientProfileHeaderNewDesignAppBar( + this.patient, this.patientType, this.arrivalType, {this.height = 0.0}); + + @override + Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + return Container( + padding: EdgeInsets.only( + left: 0, + right: 5, + bottom: 5, + ), + decoration: BoxDecoration( + color: Colors.white, + ), + height: height == 0 ? 200 : height, + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ), + ]), + ), + Row(children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" + ? Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patient.patientStatusType == 43 + ? AppText( + TranslationBase.of(context).arrivedP, + color: Colors.green, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ) + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), + arrivalType == '1'|| patient.arrivedOn == null + ? AppText( + patient.startTime != null + ? patient.startTime + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : AppText( + patient.arrivedOn != null + ? DateUtils.convertStringToDateFormat( + patient.arrivedOn, + 'MM-dd-yyyy HH:mm') + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + ], + )) + : SizedBox(), + if (SERVICES_PATIANT2[int.parse(patientType)] == + "List_MyOutPatient") + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).appointmentDate + + " : ", + fontSize: 14, + ), + patient.startTime != null + ? Container( + height: 15, + width: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: HexColor("#20A169"), + ), + child: AppText( + patient.startTime??"", + color: Colors.white, + fontSize: 1.5 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ), + ) + : SizedBox(), + SizedBox( + width: 3.5, + ), + Container( + child: AppText( + convertDateFormat2( + patient.appointmentDate ?? ''), + fontSize: 1.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + ), + SizedBox( + height: 0.5, + ) + ], + ), + margin: EdgeInsets.only( + top: 8, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + fontSize: 1.6 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of(context).fileNumber, + style: TextStyle( + fontSize: 12, fontFamily: 'Poppins')), + new TextSpan( + text: patient.patientId.toString(), + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 14)), + ], + ), + ), + Row( + children: [ + AppText( + patient.nationalityName ?? patient.nationality?? patient.nationalityId ?? '', + fontWeight: FontWeight.bold, + fontSize: 12, + ), + patient.nationalityFlagURL != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 1.6 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: TranslationBase.of(context).age??'' + " : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}", + style: TextStyle( + fontWeight: FontWeight.w700, fontSize: 14)), + ], + ), + ), + ), + ], + ), + ), + ]), + ], + ), + ), + ); + } + + convertDateFormat2(String str) { + String newDate; + const start = "/Date("; + if (str.isNotEmpty) { + const end = "+0300)"; + + final startIndex = str.indexOf(start); + final endIndex = str.indexOf(end, startIndex + start.length); + + var date = new DateTime.fromMillisecondsSinceEpoch( + int.parse(str.substring(startIndex + start.length, endIndex))); + newDate = date.year.toString() + + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); + } + + return newDate??''; + } + + isToday(date) { + DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date); + return DateFormat("yyyy-MM-dd").format(tempDate) == + DateFormat("yyyy-MM-dd").format(DateTime.now()); + } + + myBoxDecoration() { + return BoxDecoration( + border: Border( + top: BorderSide( + color: Colors.green, + width: 5, + ), + ), + borderRadius: BorderRadius.circular(10)); + } + + @override + Size get preferredSize => Size(double.maxFinite, 200); +} diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index b50a191b..27984614 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -9,27 +9,39 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher.dart'; class PatientProfileHeaderNewDesign extends StatelessWidget { - final PatiantInformtion patient; final String patientType; final String arrivalType; + final double height; - PatientProfileHeaderNewDesign(this.patient, this.patientType, this.arrivalType); + PatientProfileHeaderNewDesign( + this.patient, this.patientType, this.arrivalType, + {this.height = 0.0}); @override Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + return Container( padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5, top: 5), + left: 0, + right: 5, + bottom: 5, + ), decoration: BoxDecoration( color: Colors.white, ), - height: 200, + height: height == 0 ? 200 : height, child: Container( - padding: EdgeInsets.only( - left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.only(top: 50), child: Column( children: [ @@ -41,24 +53,38 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), ), - patient.gender == 1 + gender == 1 ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) + DoctorApp.male_2, + color: Colors.blue, + ) : Icon( - DoctorApp.female_1, - color: Colors.pink, + DoctorApp.female_1, + color: Colors.pink, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), ), ]), ), @@ -69,7 +95,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { width: 60, height: 60, child: Image.asset( - patient.gender == 1 + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -81,121 +107,82 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { ), Expanded( child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SERVICES_PATIANT2[ - int.parse(patientType)] == - "patientArrivalList" + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" ? Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - patient.patientStatusType == - 43 - ? AppText( - TranslationBase.of( - context) - .arrivedP, - color: Colors.green, - fontWeight: - FontWeight.bold, - fontFamily: - 'Poppins', - fontSize: 12, - ) - : AppText( - TranslationBase.of( - context) - .notArrived, - color: - Colors.red[800], - fontWeight: - FontWeight.bold, - fontFamily: - 'Poppins', - fontSize: 12, - ), - arrivalType == '1' - ? AppText( - patient.startTime != - null - ? patient - .startTime - : '', - fontFamily: - 'Poppins', - fontWeight: - FontWeight.w600, - ) - : AppText( - DateUtils.convertStringToDateFormat( - patient - .arrivedOn, - 'MM-dd-yyyy HH:mm'), - fontFamily: - 'Poppins', - fontWeight: - FontWeight.w600, - ) - ], - )) + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patient.patientStatusType == 43 + ? AppText( + TranslationBase.of(context).arrivedP, + color: Colors.green, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ) + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), + arrivalType == '1' || patient.arrivedOn == null + ? AppText( + patient.startTime != null + ? patient.startTime + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : AppText( + DateUtils.getDayMonthYearDateFormatted(DateUtils.convertStringToDate(patient.arrivedOn)), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + ], + )) : SizedBox(), - if (SERVICES_PATIANT2[ - int.parse(patientType)] == + if (SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") Container( child: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context) - .appointmentDate + + TranslationBase.of(context).appointmentDate + " : ", fontSize: 14, ), patient.startTime != null ? Container( - height: 15, - width: 60, - decoration: - BoxDecoration( - borderRadius: - BorderRadius - .circular( - 25), - color: HexColor( - "#20A169"), - ), - child: AppText( - patient.startTime, - color: Colors.white, - fontSize: 1.5 * - SizeConfig - .textMultiplier, - textAlign: TextAlign - .center, - fontWeight: - FontWeight.bold, - ), - ) + height: 15, + width: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: HexColor("#20A169"), + ), + child: AppText( + patient.startTime ?? "", + color: Colors.white, + fontSize: 1.5 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ), + ) : SizedBox(), SizedBox( width: 3.5, ), Container( child: AppText( - convertDateFormat2(patient - .appointmentDate - .toString()), - fontSize: 1.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold, + convertDateFormat2( + patient.appointmentDate.toString() ?? ''), + fontSize: 1.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), ), SizedBox( @@ -208,34 +195,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { ), ), Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ RichText( text: TextSpan( style: TextStyle( - fontSize: 1.6 * - SizeConfig - .textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black), children: [ new TextSpan( - text: - TranslationBase.of( - context) - .fileNumber, + text: TranslationBase.of(context).fileNumber, style: TextStyle( - fontSize: 12, - fontFamily: - 'Poppins')), + fontSize: 12, fontFamily: 'Poppins')), new TextSpan( - text: patient.patientId - .toString(), + text: patient.patientId.toString(), style: TextStyle( - fontWeight: - FontWeight.w700, - fontFamily: - 'Poppins', + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', fontSize: 14)), ], ), @@ -244,32 +220,25 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { children: [ AppText( patient.nationalityName ?? - patient.nationality, + patient.nationality ?? + patient.nationalityId ?? + '', fontWeight: FontWeight.bold, fontSize: 12, ), - patient.nationality != null + patient.nationalityFlagURL != null ? ClipRRect( - borderRadius: - BorderRadius - .circular( - 20.0), - child: Image.network( - patient - .nationalityFlagURL, - height: 25, - width: 30, - errorBuilder: - (BuildContext - context, - Object - exception, - StackTrace - stackTrace) { - return Text( - 'No Image'); - }, - )) + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) : SizedBox() ], ) @@ -279,26 +248,19 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { child: RichText( text: new TextSpan( style: new TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black, fontFamily: 'Poppins', ), children: [ new TextSpan( - text: TranslationBase.of( - context) - .age + - " : ", - style: TextStyle( - fontSize: 14)), + text: TranslationBase.of(context).age + " : ", + style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}", style: TextStyle( - fontWeight: - FontWeight.w700, - fontSize: 14)), + fontWeight: FontWeight.w700, fontSize: 14)), ], ), ), @@ -314,20 +276,22 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { } convertDateFormat2(String str) { - String timeConvert; + String newDate; const start = "/Date("; - const end = "+0300)"; + if (str.isNotEmpty) { + const end = "+0300)"; - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); + final startIndex = str.indexOf(start); + final endIndex = str.indexOf(end, startIndex + start.length); - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "/" + - date.month.toString().padLeft(2, '0') + - "/" + - date.day.toString().padLeft(2, '0'); + var date = new DateTime.fromMillisecondsSinceEpoch( + int.parse(str.substring(startIndex + start.length, endIndex))); + newDate = date.year.toString() + + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); + } return newDate.toString(); } diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart new file mode 100644 index 00000000..272fc238 --- /dev/null +++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart @@ -0,0 +1,239 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.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/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final double height; + + PatientProfileHeaderNewDesignInPatient( + this.patient, this.patientType, this.arrivalType, + {this.height = 0.0}); + + @override + Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + + return Container( + padding: EdgeInsets.only( + left: 0, + right: 5, + bottom: 5, + ), + decoration: BoxDecoration( + color: Colors.white, + ), + height: height == 0 ? 200 : height, + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ), + ]), + ), + Row(children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).fileNumber, + fontSize: 1.2 * SizeConfig.textMultiplier, + ), + AppText(patient.patientId.toString(), + fontSize: 1.4 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700), + ], + ), + Row( + children: [ + AppText( + DateUtils.convertDateFromServerFormat( + patient.admissionDate, "hh:mm a"), + fontWeight: FontWeight.bold, + fontSize: 1.4 * SizeConfig.textMultiplier, + ), + ], + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).admissionDate}: ", + fontSize: 1.2 * SizeConfig.textMultiplier, + ), + AppText( + DateUtils.convertDateFromServerFormat( + patient.admissionDate, "dd MMM,yyyy"), + fontSize: 1.4 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700), + ], + ), + Row( + children: [ + AppText( + patient.nationalityName ?? + patient.nationality ?? + patient.nationalityId ?? + '', + fontWeight: FontWeight.bold, + fontSize: 1.4 * SizeConfig.textMultiplier, + ), + patient.nationalityFlagURL != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Row( + children: [ + AppText( + "${TranslationBase.of(context).numOfDays}: ", + fontSize: 1.2 * SizeConfig.textMultiplier, + ), + AppText( + "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + fontSize: 1.4 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w700), + ], + ), + ], + ), + ), + ]), + ], + ), + ), + ); + } + + convertDateFormat2(String str) { + String newDate; + const start = "/Date("; + if (str.isNotEmpty) { + const end = "+0300)"; + + final startIndex = str.indexOf(start); + final endIndex = str.indexOf(end, startIndex + start.length); + + var date = new DateTime.fromMillisecondsSinceEpoch( + int.parse(str.substring(startIndex + start.length, endIndex))); + newDate = date.year.toString() + + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); + } + + return newDate.toString(); + } + + isToday(date) { + DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date); + return DateFormat("yyyy-MM-dd").format(tempDate) == + DateFormat("yyyy-MM-dd").format(DateTime.now()); + } + + myBoxDecoration() { + return BoxDecoration( + border: Border( + top: BorderSide( + color: Colors.green, + width: 5, + ), + ), + borderRadius: BorderRadius.circular(10)); + } +} diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart index 26f474e2..acbb5f05 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart @@ -6,12 +6,12 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.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/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'large_avatar.dart'; @@ -26,7 +26,8 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { final String profileUrl; final String invoiceNO; final String orderNo; - + final bool isPrescriptions; + final String clinic; PatientProfileHeaderWhitAppointment( {this.patient, this.patientType, @@ -36,10 +37,17 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { this.appointmentDate, this.profileUrl, this.invoiceNO, - this.orderNo}); + this.orderNo, this.isPrescriptions = false, this.clinic}); @override Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + ProjectViewModel projectViewModel = Provider.of(context); return Container( padding: EdgeInsets.only( @@ -47,7 +55,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { decoration: BoxDecoration( color: Colors.white, ), - height: 300, + //height: 300, child: Container( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.only(top: 50), @@ -62,17 +70,19 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + patient.firstName != null ? + (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize( + patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier *2.2, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), ), - patient.gender == 1 + gender == 1 ? Icon( DoctorApp.male_2, color: Colors.blue, @@ -81,6 +91,18 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { DoctorApp.female_1, color: Colors.pink, ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ) ]), ), Row(children: [ @@ -90,7 +112,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { width: 60, height: 60, child: Image.asset( - patient.gender == 1 + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -139,7 +161,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { 'Poppins', fontSize: 12, ), - arrivalType == '1' + arrivalType == '1' || patient.arrivedOn == null ? AppText( patient.startTime != null @@ -209,9 +231,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { ), Container( child: AppText( - convertDateFormat2(patient - .appointmentDate - .toString()), + convertDateFormat2(patient.appointmentDate.toString()?? ''), fontSize: 1.5 * SizeConfig .textMultiplier, @@ -265,7 +285,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { children: [ AppText( patient.nationalityName ?? - patient.nationality, + patient.nationality??"", fontWeight: FontWeight.bold, fontSize: 12, ), @@ -276,8 +296,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { .circular( 20.0), child: Image.network( - patient - .nationalityFlagURL, + patient.nationalityFlagURL, height: 25, width: 30, errorBuilder: @@ -315,7 +334,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ??"": patient.dateofBirth??"", context)}", style: TextStyle( fontWeight: FontWeight.w700, @@ -365,44 +384,70 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( '${TranslationBase.of(context).dr}.$doctorName', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), - if (orderNo != null) + if (orderNo != null && !isPrescriptions) Row( children: [ - Texts( + AppText( 'Order No:', color: Colors.grey[800], ), - Texts( + AppText( orderNo ?? '', ) ], ), - if (invoiceNO != null) + if (invoiceNO != null && !isPrescriptions) Row( children: [ - Texts( + AppText( 'Invoice:', color: Colors.grey[800], ), - Texts( + AppText( invoiceNO, ) ], ), + if(isPrescriptions) + Row( + children: [ + AppText( + 'Branch:', + color: Colors.grey[800], + ), + AppText( + branch?? '', + ) + ], + ), + if(isPrescriptions) + Row( + children: [ + AppText( + 'Clinic:', + color: Colors.grey[800], + ), + AppText( + clinic?? '', + ) + ], + ), Row( children: [ - Texts( - 'Result Date:', + AppText( + !isPrescriptions? 'Result Date:': 'Prescriptions Date', color: Colors.grey[800], ), - Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + Expanded( + child: AppText( + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + ), ) ], ) @@ -423,20 +468,22 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { } convertDateFormat2(String str) { - String timeConvert; + String newDate =""; const start = "/Date("; const end = "+0300)"; - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); + if (str.isNotEmpty) { + final startIndex = str.indexOf(start); + final endIndex = str.indexOf(end, startIndex + start.length); - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "/" + - date.month.toString().padLeft(2, '0') + - "/" + - date.day.toString().padLeft(2, '0'); + var date = new DateTime.fromMillisecondsSinceEpoch( + int.parse(str.substring(startIndex + start.length, endIndex))); + newDate = date.year.toString() + + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); + } return newDate.toString(); } diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart new file mode 100644 index 00000000..593f18f0 --- /dev/null +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -0,0 +1,471 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.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/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import 'large_avatar.dart'; + +class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget + with PreferredSizeWidget { + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final String doctorName; + final String branch; + final DateTime appointmentDate; + final String profileUrl; + final String invoiceNO; + final String orderNo; + final bool isPrescriptions; + final bool isMedicalFile; + final String episode; + final String vistDate; + + final String clinic; + PatientProfileHeaderWhitAppointmentAppBar( + {this.patient, + this.patientType, + this.arrivalType, + this.doctorName, + this.branch, + this.appointmentDate, + this.profileUrl, + this.invoiceNO, + this.orderNo, + this.isPrescriptions = false, + this.clinic, + this.isMedicalFile = false, + this.episode, + this.vistDate}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + + return Container( + padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5), + decoration: BoxDecoration( + color: Colors.white, + ), + //height: 300, + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + ), + gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ) + ]), + ), + Row(children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" + ? Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patient.patientStatusType == 43 + ? AppText( + TranslationBase.of(context).arrivedP, + color: Colors.green, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ) + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), + arrivalType == '1' || patient.arrivedOn == null + ? AppText( + patient.startTime != null + ? patient.startTime + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : AppText( + DateUtils.convertStringToDateFormat( + patient.arrivedOn, + 'MM-dd-yyyy HH:mm'), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + ], + )) + : SizedBox(), + if (SERVICES_PATIANT2[int.parse(patientType)] == + "List_MyOutPatient") + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).appointmentDate + + " : ", + fontSize: 14, + ), + patient.startTime != null + ? Container( + height: 15, + width: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: HexColor("#20A169"), + ), + child: AppText( + patient.startTime ?? "", + color: Colors.white, + fontSize: 1.5 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ), + ) + : SizedBox(), + SizedBox( + width: 3.5, + ), + Container( + child: AppText( + convertDateFormat2( + patient.appointmentDate.toString() ?? ''), + fontSize: 1.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + ), + SizedBox( + height: 0.5, + ) + ], + ), + margin: EdgeInsets.only( + top: 8, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + fontSize: 1.6 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of(context).fileNumber, + style: TextStyle( + fontSize: 12, fontFamily: 'Poppins')), + new TextSpan( + text: patient.patientId.toString(), + style: TextStyle( + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 14)), + ], + ), + ), + Row( + children: [ + AppText( + patient.nationalityName ?? + patient.nationality ?? + "", + fontWeight: FontWeight.bold, + fontSize: 12, + ), + patient.nationality != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 1.6 * SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: TranslationBase.of(context).age + " : ", + style: TextStyle(fontSize: 14)), + new TextSpan( + text: + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", + style: TextStyle( + fontWeight: FontWeight.w700, fontSize: 14)), + ], + ), + ), + ), + ], + ), + ), + ]), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 30, + height: 30, + margin: EdgeInsets.only( + left: projectViewModel.isArabic ? 10 : 85, + right: projectViewModel.isArabic ? 85 : 10, + top: 5), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border( + bottom: BorderSide(color: Colors.grey[400], width: 2.5), + left: BorderSide(color: Colors.grey[400], width: 2.5), + )), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: LargeAvatar( + name: doctorName ?? "", + url: profileUrl, + ), + width: 25, + height: 25, + margin: EdgeInsets.only(top: 10), + ), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + '${TranslationBase.of(context).dr}$doctorName', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 9, + ), + if (orderNo != null && !isPrescriptions) + Row( + children: [ + AppText('Order No: ', + color: Colors.grey[800], + fontSize: 12), + AppText(orderNo ?? '', fontSize: 12) + ], + ), + if (invoiceNO != null && !isPrescriptions) + Row( + children: [ + AppText('Invoice: ', + color: Colors.grey[800], + fontSize: 12), + AppText(invoiceNO, fontSize: 12) + ], + ), + if (branch != null) + Row( + children: [ + AppText('Branch: ', + color: Colors.grey[800], + fontSize: 12), + AppText(branch ?? '', fontSize: 12) + ], + ), + if (isPrescriptions) + if (clinic != null) + Row( + children: [ + AppText('Clinic: ', + color: Colors.grey[800], + fontSize: 12), + AppText(clinic ?? '', fontSize: 12) + ], + ), + if (isMedicalFile && episode != null) + Row( + children: [ + AppText('Episode: ', + color: Colors.grey[800], + fontSize: 12), + AppText(episode ?? '', fontSize: 12) + ], + ), + if (isMedicalFile && vistDate != null) + Row( + children: [ + AppText('Visit Date: ', + color: Colors.grey[800], + fontSize: 12), + AppText(vistDate ?? '', fontSize: 12) + ], + ), + if (!isMedicalFile) + Row( + children: [ + Expanded( + child: AppText( + !isPrescriptions + ? 'Result Date: ' + : 'Prescriptions Date ', + color: Colors.grey[800], + fontSize: 12, + ), + ), + AppText( + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + fontSize: 14, + ) + ], + ) + ]), + ), + ), + ], + ), + ), + ), + ], + ) + ], + ), + ), + ); + } + + convertDateFormat2(String str) { + String newDate = ""; + const start = "/Date("; + const end = "+0300)"; + + if (str.isNotEmpty) { + final startIndex = str.indexOf(start); + final endIndex = str.indexOf(end, startIndex + start.length); + + var date = new DateTime.fromMillisecondsSinceEpoch( + int.parse(str.substring(startIndex + start.length, endIndex))); + newDate = date.year.toString() + + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); + } + + return newDate.toString(); + } + + isToday(date) { + DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date); + return DateFormat("yyyy-MM-dd").format(tempDate) == + DateFormat("yyyy-MM-dd").format(DateTime.now()); + } + + myBoxDecoration() { + return BoxDecoration( + border: Border( + top: BorderSide( + color: Colors.green, + width: 5, + ), + ), + borderRadius: BorderRadius.circular(10)); + } + + @override + Size get preferredSize => Size(double.maxFinite, 290); +} diff --git a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart index 1c9b4462..9d22962a 100644 --- a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart @@ -4,7 +4,6 @@ import 'package:doctor_app_flutter/routes.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/card_with_bgNew_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart index b4ceffb4..bd40c3ca 100644 --- a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart @@ -5,7 +5,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/medication.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/widgets/patients/profile/profile-welcome-widget.dart b/lib/widgets/patients/profile/profile-welcome-widget.dart index 72f06fb1..10586552 100644 --- a/lib/widgets/patients/profile/profile-welcome-widget.dart +++ b/lib/widgets/patients/profile/profile-welcome-widget.dart @@ -1,9 +1,5 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class ProfileWelcomeWidget extends StatelessWidget { @@ -57,7 +53,7 @@ class ProfileWelcomeWidget extends StatelessWidget { CircleAvatar( // radius: (52) child: ClipRRect( - borderRadius: BorderRadius.circular(10), + borderRadius: BorderRadius.circular(20), child: Image.network( authProvider.doctorProfile.doctorImageURL, fit: BoxFit.fill, diff --git a/lib/widgets/patients/profile/profile_general_info_content_widget.dart b/lib/widgets/patients/profile/profile_general_info_content_widget.dart index 713a98e1..f5c70ae6 100644 --- a/lib/widgets/patients/profile/profile_general_info_content_widget.dart +++ b/lib/widgets/patients/profile/profile_general_info_content_widget.dart @@ -1,8 +1,9 @@ -import '../../../config/size_config.dart'; -import '../../shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../../../config/size_config.dart'; +import '../../shared/app_texts_widget.dart'; + /* *@author: Elham Rababah *@Date:22/4/2020 diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index b5afa0af..a469138c 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -1,20 +1,11 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_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/patients/profile/PatientProfileButton.dart'; -import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/size_config.dart'; -import '../../shared/app_texts_widget.dart'; class ProfileMedicalInfoWidget extends StatelessWidget { final String from; @@ -22,6 +13,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; + final bool isInpatient; ProfileMedicalInfoWidget( {Key key, @@ -29,7 +21,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { this.patientType, this.arrivalType, this.from, - this.to}); + this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -43,35 +35,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget { childAspectRatio: 1 / 1.0, crossAxisCount: 3, children: [ - /*if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - isDisable: patient.episodeNo != 0 ? true : false, - nameLine1: TranslationBase.of(context).createNew, - nameLine2: TranslationBase.of(context).episode, - route: CREATE_EPISODE, - onTap: () async { - PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( - appointmentNo: patient.appointmentNo, - patientMRN: patient.patientMRN); - await model.postEpisode(postEpisodeReqModel); - patient.episodeNo = model.episodeID; - Navigator.of(context).pushNamed(CREATE_EPISODE, - arguments: {'patient': patient}); - }, - isLoading: model.state == ViewState.BusyLocal, - icon: 'create-episod.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - isDisable: patient.episodeNo == 0 ? true : false, - nameLine1: TranslationBase.of(context).update, - nameLine2: TranslationBase.of(context).episode, - route: UPDATE_EPISODE, - icon: 'modilfy-episode.png'),*/ - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -83,66 +46,45 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, icon: 'patient/vital_signs.png'), - if (selectedPatientType != 7) + // if (selectedPatientType != 7) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: LAB_RESULT, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), + route: MEDICAL_FILE, + nameLine1: "Health" ,//TranslationBase.of(context).medicalReport, + nameLine2: "Summary",//TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: TranslationBase.of(context).previewHealth, - nameLine2: TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - if (selectedPatientType != 0 && - selectedPatientType != 5 && - selectedPatientType != 7) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + route: LAB_RESULT, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_ADMISSION_REQUEST, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), - (int.parse(patientType) == 7 || int.parse(patientType) == 6) - ? PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png') - : PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_HISTORY, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + isInPatient:isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), PatientProfileButton( key: key, patient: patient, @@ -152,7 +94,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: 'patient/order_prescription.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -162,17 +104,17 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, icon: 'patient/Order_Procedures.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - nameLine1: TranslationBase.of(context).myReferral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -182,45 +124,59 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + if (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, route: PATIENT_UCAF_REQUEST, + isDisable: patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).ucaf, icon: 'patient/ucaf.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + if (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + route: REFER_PATIENT_TO_DOCTOR, + isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + if (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + route: PATIENT_ADMISSION_REQUEST, + isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'patient/admission_req.png'), + if (isInpatient) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + if (isInpatient) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + nameLine1:"Order", //"Text", + nameLine2: "Sheet", + icon: 'patient/Progress_notes.png'), ], ), ); diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart new file mode 100644 index 00000000..f01f96f3 --- /dev/null +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -0,0 +1,176 @@ +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_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/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { + final String from; + final String to; + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final bool isInpatient; + final bool isDischargedPatient; + + + + ProfileMedicalInfoWidgetInPatient( + {Key key, + this.patient, + this.patientType, + this.arrivalType, + this.from, + this.to, this.isInpatient, this.isDischargedPatient = false}); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + isInPatient: true, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + isInPatient: true, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).prescription, + icon: 'patient/order_prescription.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: "Order", //"Text", + nameLine2: "Sheet", //TranslationBase.of(context).orders, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: "Health", + //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: MEDICAL_FILE, + nameLine1: "Medical", //Health + //TranslationBase.of(context).medicalReport, + nameLine2: "Report", //Report + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_IN_PATIENT_TO_DOCTOR, + isInPatient: true, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).approvals, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: null, + nameLine1: "Discharge", + nameLine2: "Summery", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'patient/patient_sick_leave.png'), + ], + ), + ); + } +} diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index c49c4576..edca6000 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -13,6 +13,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; + final bool isInpatient; ProfileMedicalInfoWidgetSearch( {Key key, @@ -20,7 +21,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { this.patientType, this.arrivalType, this.from, - this.to}); + this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -39,19 +40,21 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + icon: 'patient/vital_signs.png'), PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), + route: MEDICAL_FILE, + nameLine1: "Health", //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, @@ -66,19 +69,20 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - from: from, - to: to, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), - // PatientProfileButton( - // key: key, - // patient: patient, - // route: PATIENT_ADMISSION_REQUEST, - // nameLine1: TranslationBase.of(context).admission, - // nameLine2: TranslationBase.of(context).request, - // icon: 'heartbeat.png'), + isInPatient:isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), (int.parse(patientType) == 7 || int.parse(patientType) == 6) ? PatientProfileButton( key: key, @@ -103,19 +107,19 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: TranslationBase.of(context).previewHealth, - nameLine2: TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + route: ORDER_PROCEDURE, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), PatientProfileButton( key: key, patient: patient, @@ -125,15 +129,37 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), + if (patient.admissionNo != null && patient.admissionNo != "0") + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + if (patient.admissionNo != null && patient.admissionNo != "0") + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + nameLine1: "Order", //"Text", + nameLine2: "Sheet", + icon: 'patient/Progress_notes.png'), + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_PATIENT_TO_DOCTOR, + // isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), ], ), ); diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart deleted file mode 100644 index a5bcf434..00000000 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ /dev/null @@ -1,466 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class StepsWidget extends StatelessWidget { - final int index; - final Function changeCurrentTab; - - StepsWidget({Key key, this.index, this.changeCurrentTab}); - - // TODO : Add translation to name - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - return !projectViewModel.isArabic - ? Stack( - children: [ - Container( - height: 120, - width: MediaQuery.of(context).size.width, - color: Colors.transparent, - child: Center( - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - ), - ), - Positioned( - top: index == 0 ? 15 : 30, - left: 0, - child: InkWell( - onTap: () => changeCurrentTab(0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: index == 0 ? 70 : 50, - height: index == 0 ? 70 : 50, - decoration: BoxDecoration( - border: index == 0 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 0 - ? null - : Border.all( - color: Colors.black, width: 0.75), - shape: BoxShape.circle, - color: index == 0 - ? Colors.white - : index > 0 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '1', - variant: index == 0 ? "heading2" : "", - bold: true, - color: index == 0 - ? Colors.black - : index > 0 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 0 ? 5 : 10, - ), - AppText( - "SUBJECTIVE", - fontWeight: FontWeight.bold, - fontSize: 14, - ), - ], - ), - ), - ), - Positioned( - top: index == 1 ? 15 : 30, - left: MediaQuery.of(context).size.width * 0.28, - child: InkWell( - onTap: () => index >= 1 ? changeCurrentTab(1) : null, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 1 ? 70 : 50, - height: index == 1 ? 70 : 50, - decoration: BoxDecoration( - border: index == 1 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 2 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 1 - ? Colors.white - : index > 1 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '2', - variant: index == 1 ? "heading2" : '', - bold: true, - color: index == 1 - ? Colors.black - : index > 1 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 1 ? 5 : 10, - ), - AppText( - "OBJECTIVE", - fontWeight: FontWeight.bold, - fontSize:14, - ), - ], - ), - ), - ), - Positioned( - top: index == 2 ? 15 : 30, - left: MediaQuery.of(context).size.width * 0.52, - child: InkWell( - onTap: () { - if(index >= 3) - changeCurrentTab(2); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 2 ? 70 : 50, - height: index == 2 ? 70 : 50, - decoration: BoxDecoration( - border: index == 2 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 2 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 2 - ? Colors.white - : index > 2 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '3', - variant: index == 2 ? "heading2" : '', - bold: true, - color: index == 2 - ? Colors.black - : index > 2 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 2 ? 5 : 10, - ), - AppText( - "ASSESSMENT", - fontWeight: FontWeight.bold, - fontSize:14, - ), - ], - ), - ), - ), - Positioned( - top: index == 3 ? 15 : 30, - right: 0, - child: InkWell( - onTap: () => index >= 3 ? changeCurrentTab(4) : null, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 3 ? 70 : 50, - height: index == 3 ? 70 : 50, - decoration: BoxDecoration( - border: index == 3 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 3 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 3 - ? Colors.white - : index > 3 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '4', - variant: index == 3 ? "heading2" : '', - bold: true, - color: index == 3 - ? Colors.black - : index > 3 - ? Colors.white - : Colors.grey, - ), - ) - ), - SizedBox( - height: index == 3 ? 5 : 10, - ), - Center( - child: AppText( - "PLAN", - fontWeight: FontWeight.bold, - textAlign: TextAlign.center, - fontSize:14, - ), - ), - ], - ), - ), - ), - ], - ) - : Stack( - children: [ - Container( - height: 120, - width: MediaQuery.of(context).size.width, - color: Colors.transparent, - child: Center( - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - ), - ), - Positioned( - top: index == 0 ? 15 : 30, - right: 0, - child: InkWell( - onTap: () => changeCurrentTab(0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: index == 0 ? 70 : 50, - height: index == 0 ? 70 : 50, - decoration: BoxDecoration( - border: index == 0 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 0 - ? null - : Border.all( - color: Colors.black, width: 0.75), - shape: BoxShape.circle, - color: index == 0 - ? Colors.white - : index > 0 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '1', - variant: index == 0 ? "heading2" : "", - bold: true, - color: index == 0 - ? Colors.black - : index > 0 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 0 ? 5 : 10, - ), - AppText( - "شخصي", - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ], - ), - ), - ), - Positioned( - top: index == 1 ? 15 : 30, - right: MediaQuery.of(context).size.width * 0.28, - child: InkWell( - onTap: () => index >= 2 ? changeCurrentTab(1) : null, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 1 ? 70 : 50, - height: index == 1 ? 70 : 50, - decoration: BoxDecoration( - border: index == 1 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 2 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 1 - ? Colors.white - : index > 1 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '2', - variant: index == 1 ? "heading2" : '', - bold: true, - color: index == 1 - ? Colors.black - : index > 1 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 1 ? 5 : 10, - ), - AppText( - "هدف", - fontWeight: FontWeight.bold, - fontSize:14, - ), - ], - ), - ), - ), - Positioned( - top: index == 2 ? 15 : 30, - right: MediaQuery.of(context).size.width * 0.52, - child: InkWell( - onTap: () => index >= 3 ? changeCurrentTab(2) : null, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 2 ? 70 : 50, - height: index == 2 ? 70 : 50, - decoration: BoxDecoration( - border: index == 2 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 2 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 2 - ? Colors.white - : index > 2 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '3', - variant: index == 2 ? "heading2" : '', - bold: true, - color: index == 2 - ? Colors.black - : index > 2 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 2 ? 5 : 10, - ), - Padding( - - padding: const EdgeInsets.only(right: 2), - child: AppText( - "تقدير", - fontWeight: FontWeight.bold, - fontSize:14, - ), - ), - ], - ), - ), - ), - Positioned( - top: index == 3 ? 15 : 30, - left: 0, - child: InkWell( - onTap: () => index >= 3 ? changeCurrentTab(4) : null, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: index == 3 ? 70 : 50, - height: index == 3 ? 70 : 50, - decoration: BoxDecoration( - border: index == 3 - ? Border.all(color: Color(0xFFB9382C), width: 2) - : index > 3 - ? null - : Border.all( - color: Color(0xFFCCCCCC), width: 0.75), - shape: BoxShape.circle, - color: index == 3 - ? Colors.white - : index > 3 - ? Color(0xFFB9382C) - : Color(0xFFCCCCCC), - ), - child: Center( - child: Texts( - '4', - variant: index == 3 ? "heading2" : '', - bold: true, - color: index == 3 - ? Colors.black - : index > 3 - ? Colors.white - : Colors.grey, - ), - ), - ), - SizedBox( - height: index == 3 ? 5 : 10, - ), - Container( - margin: EdgeInsets.only(right:index == 3? 15:0), - child: AppText( - "خطة", - fontWeight: FontWeight.bold, - fontSize:14, - ), - ), - ], - ), - ), - ), - ], - ); - } -} diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart deleted file mode 100644 index afd14809..00000000 --- a/lib/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart +++ /dev/null @@ -1,513 +0,0 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -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/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/master_key_dailog.dart'; -import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:provider/provider.dart'; - -import '../custom_validation_error.dart'; - -class UpdateAllergiesWidget extends StatefulWidget { - final List myAllergiesList; - - UpdateAllergiesWidget({Key key, this.myAllergiesList}); - - @override - _UpdateAllergiesWidgetState createState() => _UpdateAllergiesWidgetState(); -} - -class _UpdateAllergiesWidgetState extends State { - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - - return Column( - children: [ - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addAllergies, - fontSize: 13.5, - onTapTextFields: () { - openAllergiesList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Container( - margin: - EdgeInsets.only(left: 15, right: 15, top: 15), - child: Column( - children: widget.myAllergiesList.map((selectedAllergy) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Texts( - projectViewModel.isArabic - ? selectedAllergy.selectedAllergy.nameAr - : selectedAllergy.selectedAllergy.nameEn - .toUpperCase(), - variant: "bodyText", - textDecoration: selectedAllergy.isChecked - ? null - : TextDecoration.lineThrough, - bold: true, - color: Colors.black), - width: MediaQuery.of(context).size.width * 0.5, - ), - Texts( - projectViewModel.isArabic - ? selectedAllergy.selectedAllergySeverity.nameAr - : selectedAllergy.selectedAllergySeverity.nameEn - .toUpperCase(), - variant: "bodyText", - textDecoration: selectedAllergy.isChecked - ? null - : TextDecoration.lineThrough, - bold: true, - color: AppGlobal.appPrimaryColor), - if (selectedAllergy.isChecked) - InkWell( - child: Icon( - FontAwesomeIcons.trash, - color: Colors.grey, - size: 20, - ), - onTap: () => removeAllergy(selectedAllergy), - ) - ], - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - 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() - ], - ), - SizedBox( - height: 10, - ), - ], - ); - }).toList()), - ) - ], - ); - } - - removeAllergy(MySelectedAllergy mySelectedAllergy) { - List allergy = - // ignore: missing_return - widget.myAllergiesList.where((element) => - mySelectedAllergy.selectedAllergySeverity.id == - element.selectedAllergySeverity.id && - mySelectedAllergy.selectedAllergy.id == element.selectedAllergy.id - ).toList(); - - if (allergy.length > 0) { - setState(() { - allergy[0].isChecked = false; - }); - } - - - print(allergy); - } - - openAllergiesList(BuildContext context) { - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return AddAllergies( - addAllergiesFun: (MySelectedAllergy mySelectedAllergy) { - if (mySelectedAllergy.selectedAllergySeverity == null || - mySelectedAllergy.selectedAllergy == null) { - helpers.showErrorToast(TranslationBase - .of(context) - .requiredMsg); - - } else { - setState(() { - List allergy = - // ignore: missing_return - widget.myAllergiesList - .where((element) => - mySelectedAllergy.selectedAllergy.id == - element.selectedAllergy.id) - .toList(); - - if (allergy.isEmpty) { - widget.myAllergiesList.add(mySelectedAllergy); - Navigator.of(context).pop(); - } else { - allergy.first.selectedAllergy = - mySelectedAllergy.selectedAllergy; - allergy.first.selectedAllergySeverity = - mySelectedAllergy.selectedAllergySeverity; - allergy.first.remark = mySelectedAllergy.remark; - allergy.first.isChecked = mySelectedAllergy.isChecked; - Navigator.of(context).pop(); - - // helpers.showErrorToast(TranslationBase - // .of(context) - // .itemExist); - } - }); - } - },); - }); - } - -} - -class AddAllergies extends StatefulWidget { - final Function addAllergiesFun; - - const AddAllergies({Key key, this.addAllergiesFun}) : super(key: key); - - @override - _AddAllergiesState createState() => _AddAllergiesState(); -} - -class _AddAllergiesState extends State { - List allergiesList; - List allergySeverityList; - MasterKeyModel _selectedAllergySeverity; - MasterKeyModel _selectedAllergy; - TextEditingController remarkController = TextEditingController(); - TextEditingController severityController = TextEditingController(); - TextEditingController allergyController = TextEditingController(); - - GlobalKey key = new GlobalKey>(); - bool isFormSubmitted = false; - - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {IconData icon}) { - return InputDecoration( - contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 10, - color: Theme - .of(context) - .hintColor, - fontWeight: FontWeight.w700 - ), - ); - } - - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - final screenSize = MediaQuery - .of(context) - .size; - return FractionallySizedBox( - heightFactor: 0.7, - child: BaseView( - onModelReady: (model) async { - if (model.allergiesList.length == 0) { - await model.getMasterLookup(MasterKeysService.Allergies); - } - if (model.allergySeverityList.length == 0) { - await model.getMasterLookup(MasterKeysService.AllergySeverity); - } - }, - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: SingleChildScrollView( - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - SizedBox( - height: 16, - ), - AppText( - TranslationBase - .of(context) - .addAllergies, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.allergiesList != null - ? () { - setState(() { - _selectedAllergy = null; - allergyController.text = null; - }); - } - : null, - child: _selectedAllergy==null? AutoCompleteTextField( - decoration: textFieldSelectorDecoration( - TranslationBase - .of(context) - .selectAllergy, - _selectedAllergy != null - ? _selectedAllergy.nameEn - : null, true, icon: EvaIcons.search), - itemSubmitted: (item) => - setState(() { - _selectedAllergy = item; - allergyController.text = - projectViewModel.isArabic - ? _selectedAllergy - .nameAr - : _selectedAllergy - .nameEn; - }), - key: key, - suggestions: model.allergiesList, - itemBuilder: (context, suggestion) => - new Padding( - child: Texts( - projectViewModel.isArabic ? suggestion - .nameAr : suggestion.nameEn), - padding: EdgeInsets.all(2.0)), - itemSorter: (a, b) => 1, - itemFilter: (suggestion, input) => - suggestion.nameAr.toLowerCase().startsWith( - input.toLowerCase()) || - suggestion.nameEn.toLowerCase() - .startsWith(input.toLowerCase()), - ) : - TextFields( - onTapTextFields: model.allergiesList != null - ? () { - setState(() { - _selectedAllergy = null; - allergyController.text = null; - }); - } - : null, - hasLabelText: allergyController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .selectAllergy, - fontSize: 13.5, - readOnly: true, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: allergyController, - suffixIcon: EvaIcons.search, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }) - ), - ), - if(isFormSubmitted && _selectedAllergy == null) - CustomValidationError(), - SizedBox( - height: 10, - ), - TextFields( - onTapTextFields: model - .allergySeverityList != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.allergySeverityList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedAllergySeverity = - selectedValue; - - severityController.text = - projectViewModel.isArabic - ? _selectedAllergySeverity - .nameAr - : _selectedAllergySeverity - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: severityController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .selectSeverity, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: severityController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedAllergySeverity == null) - CustomValidationError(), - - SizedBox( - height: 10, - ), - Container( - 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, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 10, - controller: remarkController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), SizedBox( - height: 10, - ), - AppButton( - title: TranslationBase.of(context).add.toUpperCase(), - onPressed: () { - setState(() { - isFormSubmitted = true; - }); - if(_selectedAllergy !=null && _selectedAllergySeverity !=null) { - MySelectedAllergy mySelectedAllergy = new MySelectedAllergy( - remark: remarkController.text, - selectedAllergy: _selectedAllergy, - isChecked: true, - selectedAllergySeverity: _selectedAllergySeverity,); - widget.addAllergiesFun(mySelectedAllergy); - } - - }, - ), - ] - - ), - ), - ), - )), - ), - ); - } -} - - - - - - diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart deleted file mode 100644 index de5d2fb2..00000000 --- a/lib/widgets/patients/profile/soap_update/subjective/update_history_widget.dart +++ /dev/null @@ -1,427 +0,0 @@ -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/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; - -class UpdateHistoryWidget extends StatefulWidget { - final List myHistoryList; - - const UpdateHistoryWidget({Key key, this.myHistoryList}) : super(key: key); - - @override - _UpdateHistoryWidgetState createState() => _UpdateHistoryWidgetState(); -} - -class _UpdateHistoryWidgetState extends State - with TickerProviderStateMixin { - PageController _controller; - int _currentIndex = 0; - - changePageViewIndex(pageIndex) { - _controller.jumpToPage(pageIndex); - } - - @override - void initState() { - _controller = new PageController(); - - super.initState(); - } - - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - return Column( - children: [ - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addHistory, - fontSize: 13.5, - onTapTextFields: () { - openHistoryList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Container( - margin: - EdgeInsets.only(left: 15, right: 15, top: 15), - child: Column( - children: widget.myHistoryList.map((myHistory) { - return Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - child: Texts( - projectViewModel.isArabic - ? myHistory.selectedHistory.nameAr - : myHistory.selectedHistory.nameEn, - variant: "bodyText", - textDecoration: myHistory.isChecked - ? null - : TextDecoration.lineThrough, - bold: true, - color: Colors.black), - width: MediaQuery.of(context).size.width * 0.7, - ), - if (myHistory.isChecked) - InkWell( - child: Icon( - FontAwesomeIcons.trash, - color: Colors.grey, - size: 20, - ), - onTap: () => removeHistory(myHistory.selectedHistory), - ) - ], - ), - SizedBox( - height: 20, - ), - ], - ); - }).toList(), - ), - ) - ], - ); - } - - removeHistory(MasterKeyModel historyKey) { - // Iterable history = widget.myHistoryList.where((element) => - // masterKey.id == element.id && masterKey.typeId == element.typeId); - // - - List history = - // ignore: missing_return - widget.myHistoryList.where((element) => - historyKey.id == - element.selectedHistory.id && - historyKey.typeId == - element.selectedHistory.typeId - ).toList(); - - - if (history.length > 0) - setState(() { - history[0].isChecked = false; - }); - } - - openHistoryList(BuildContext context) { - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return AddHistoryDialog( - changePageViewIndex: changePageViewIndex, - controller: _controller, - myHistoryList: widget.myHistoryList, - addSelectedHistories: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - removeHistory: (masterKey) => removeHistory(masterKey), - ); - }); - } -} - -class PriorityBar extends StatefulWidget { - final Function onTap; - - const PriorityBar({Key key, this.onTap}) : super(key: key); - - @override - _PriorityBarState createState() => _PriorityBarState(); -} - -class _PriorityBarState extends State { - int _activePriority = 0; - int index =-1; - List _priorities = [ - "Family", - "Surgical/Sports", - "Medical", - ]; - List _prioritiesAr = [ - "أسرة", - "جراحي / رياضي" , - "طبي", - ]; - - 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, - )), - ); - } - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - ProjectViewModel projectViewModel = Provider.of(context); - - return Container( - height: screenSize.height * 0.070, - decoration: - containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)), - child: Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _priorities.map((item,) { - bool _isActive = _priorities[_activePriority] == item ? true : false; - if(index <2){ - index++; - } - return Expanded( - child: InkWell( - child: Center( - child: Container( - height: screenSize.height * 0.070, - decoration: containerBorderDecoration( - _isActive ? HexColor("#B8382B") : Colors.white, - _isActive ? HexColor("#B8382B") : Colors.white), - child: Center( - child: Text( - (projectViewModel.isArabic)?_prioritiesAr[index]: item, - style: TextStyle( - fontSize: 12, - color: _isActive - ? Colors.white - : Colors.black, //Colors.black, - fontWeight: FontWeight.bold, - ), - ), - )), - ), - onTap: () { - widget.onTap(_priorities.indexOf(item)); - - setState(() { - _activePriority = _priorities.indexOf(item); - }); - }), - ); - }).toList(), - ), - ); - } -} - -class AddHistoryDialog extends StatefulWidget { - final Function changePageViewIndex; - final PageController controller; - final List myHistoryList; - final Function addSelectedHistories; - final Function (MasterKeyModel) removeHistory; - - const AddHistoryDialog( - {Key key, this.changePageViewIndex, this.controller, this.myHistoryList, this.addSelectedHistories, this.removeHistory}) - : super(key: key); - - @override - _AddHistoryDialogState createState() => _AddHistoryDialogState(); -} - -class _AddHistoryDialogState extends State { - @override - Widget build(BuildContext context) { - return FractionallySizedBox( - heightFactor: 0.7, - child: BaseView( - onModelReady: (model) async { - if (model.historyFamilyList.length == 0) { - await model.getMasterLookup(MasterKeysService.HistoryFamily); - } - - if (model.historySurgicalList.length == 0) { - await model.getMasterLookup(MasterKeysService.HistorySurgical); - await model.getMasterLookup(MasterKeysService.HistorySports); - } - - if (model.historyMedicalList.length == 0) { - await model.getMasterLookup(MasterKeysService.HistoryMedical); - } - }, - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: Center( - child: Container( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - children: [ - SizedBox( - height: 10, - ), - PriorityBar(onTap: (activePriority) async { - widget.changePageViewIndex(activePriority); - }), - SizedBox( - height: 20, - ), - Expanded( - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: widget.controller, - onPageChanged: (index) { - setState(() { - // currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - NetworkBaseView( - baseViewModel: model, - child: MasterKeyCheckboxSearchWidget( - model: model, - masterList: model.historyFamilyList, - removeHistory: (history){ - setState(() { - widget.removeHistory(history); - }); - }, - addHistory: (history){ - setState(() { - createAndAddHistory( - history); - }); - }, - addSelectedHistories: (){ - widget.addSelectedHistories(); - }, - isServiceSelected: (master) =>isServiceSelected(master), - ), - ), - NetworkBaseView( - baseViewModel: model, - child: MasterKeyCheckboxSearchWidget( - model: model, - masterList: model.mergeHistorySurgicalWithHistorySportList, - removeHistory: (history){ - setState(() { - widget.removeHistory(history); - }); - }, - addHistory: (history){ - setState(() { - createAndAddHistory( - history); - }); - }, - addSelectedHistories: (){ - widget.addSelectedHistories(); - }, - isServiceSelected: (master) =>isServiceSelected(master), - ), - ), - NetworkBaseView( - baseViewModel: model, - child: MasterKeyCheckboxSearchWidget( - model: model, - masterList: model.historyMedicalList, - removeHistory: (history){ - setState(() { - widget.removeHistory(history); - }); - }, - addHistory: (history){ - setState(() { - createAndAddHistory( - history); - }); - }, - addSelectedHistories: (){ - widget.addSelectedHistories(); - }, - isServiceSelected: (master) =>isServiceSelected(master), - ), - ), - ], - ), - ), - ], - ), - )), - ), - ), - )); - } - - createAndAddHistory(MasterKeyModel history) { - List myhistory = widget.myHistoryList.where((element) => - history.id == - element.selectedHistory.id && - history.typeId == - element.selectedHistory.typeId - ).toList(); - - if (myhistory.isEmpty) { - setState(() { - MySelectedHistory mySelectedHistory = MySelectedHistory( - remark: history.remarks ?? "", - selectedHistory: history, - isChecked: true); - widget.myHistoryList.add(mySelectedHistory); - }); - } else { - myhistory.first.isChecked = true; - } - } - - isServiceSelected(MasterKeyModel masterKey) { - Iterable history = - widget - .myHistoryList - .where((element) => - masterKey.id == element.selectedHistory.id && - masterKey.typeId == element.selectedHistory.typeId && - element.isChecked); - if (history.length > 0) { - return true; - } - return false; - } - -} diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart deleted file mode 100644 index f32bfe6e..00000000 --- a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart +++ /dev/null @@ -1,563 +0,0 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -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/model/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/master_key_dailog.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../custom_validation_error.dart'; - -class UpdateMedicationWidget extends StatefulWidget { - final TextEditingController medicationController; - - UpdateMedicationWidget({ - Key key, - this.medicationController, - }); - - @override - _UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState(); -} - -class _UpdateMedicationWidgetState extends State { - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - - return Column( - children: [ - Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addMedication, - fontSize: 13.5, - onTapTextFields: () { - openMedicationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ) - ], - ); - } - - - openMedicationList(BuildContext context) { - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return AddMedication( - addMedicationFun: (MySelectedAllergy mySelectedAllergy) {}, - medicationController: widget.medicationController, - ); - }); - } -} - -// ignore: must_be_immutable -class AddMedication extends StatefulWidget { - final Function addMedicationFun; - TextEditingController medicationController; - - AddMedication({Key key, this.addMedicationFun, this.medicationController}) - : super(key: key); - - @override - _AddMedicationState createState() => _AddMedicationState(); -} - -class _AddMedicationState extends State { - MasterKeyModel _selectedMedicationDose; - MasterKeyModel _selectedMedicationStrength; - MasterKeyModel _selectedMedicationRoute; - MasterKeyModel _selectedMedicationFrequency; - - MasterKeyModel _selectedAllergy; - TextEditingController doseController = TextEditingController(); - TextEditingController strengthController = TextEditingController(); - TextEditingController routeController = TextEditingController(); - TextEditingController frequencyController = TextEditingController(); - GetMedicationResponseModel _selectedMedication; - - GlobalKey key = - new GlobalKey>(); - bool isFormSubmitted = false; - - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {IconData icon}) { - return InputDecoration( - contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 10, - color: Theme - .of(context) - .hintColor, - fontWeight: FontWeight.w700 - ), - ); - } - - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - final screenSize = MediaQuery - .of(context) - .size; - return FractionallySizedBox( - heightFactor: 0.7, - child: BaseView( - onModelReady: (model) async { - if (model.medicationStrengthList.length == 0) { - await model.getMasterLookup(MasterKeysService.MedicationStrength,); - } - if (model.medicationFrequencyList.length == 0) { - await model.getMasterLookup(MasterKeysService.MedicationFrequency); - } - if (model.medicationDoseTimeList.length == 0) { - await model.getMasterLookup(MasterKeysService.MedicationDoseTime); - } - if (model.medicationRouteList.length == 0) { - await model.getMasterLookup(MasterKeysService.MedicationRoute); - } - if (model.allMedicationList.length == 0) - await model.getMedicationList(); - }, - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: SingleChildScrollView( - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - - SizedBox( - height: 16, - ), - AppText( - TranslationBase - .of(context) - .addMedication, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - setState(() { - _selectedMedication = null; - }); - } - : null, - child: _selectedMedication == null - ? AutoCompleteTextField< - GetMedicationResponseModel>( - decoration: textFieldSelectorDecoration( - TranslationBase - .of(context) - .searchMedicineNameHere, - _selectedMedication != null - ? _selectedMedication.genericName - : null, - true, - icon: EvaIcons.search), - itemSubmitted: (item) => - setState( - () => _selectedMedication = item), - key: key, - suggestions: model.allMedicationList, - itemBuilder: (context, suggestion) => - new Padding( - child: Texts( - suggestion.description + '/' + - suggestion.genericName), - padding: EdgeInsets.all(8.0)), - itemSorter: (a, b) => 1, - itemFilter: (suggestion, input) => - suggestion.genericName - .toLowerCase() - .startsWith(input.toLowerCase()) || - suggestion.description - .toLowerCase() - .startsWith(input.toLowerCase()) || - suggestion.keywords - .toLowerCase() - .startsWith(input.toLowerCase()), - ) - : TextField( - minLines: 2, - maxLines: 2, - decoration: textFieldSelectorDecoration( - TranslationBase - .of(context) - .searchMedicineNameHere, - _selectedMedication != null - ? _selectedMedication.description + - (' (${_selectedMedication - .genericName} )') - : null, - true, - icon: EvaIcons.search), - enabled: false, - ), - ), - ), - if(isFormSubmitted && _selectedMedication == null) - CustomValidationError(), - SizedBox( - height: 5, - ), - TextFields( - onTapTextFields: model.medicationDoseTimeList != - null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.medicationDoseTimeList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedMedicationDose = - selectedValue; - - doseController.text = - projectViewModel.isArabic - ? _selectedMedicationDose - .nameAr - : _selectedMedicationDose - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: doseController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .doseTime, - //TODO add translation - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: doseController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedMedicationDose == null) - CustomValidationError(), SizedBox( - height: 5, - ), - TextFields( - onTapTextFields: model - .medicationStrengthList != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.medicationStrengthList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedMedicationStrength = - selectedValue; - - strengthController.text = - projectViewModel.isArabic - ? _selectedMedicationStrength - .nameAr - : _selectedMedicationStrength - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: strengthController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .strength, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: strengthController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedMedicationStrength == null) - CustomValidationError(), - - SizedBox( - height: 5, - ), - - TextFields( - onTapTextFields: model - .medicationRouteList != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.medicationRouteList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedMedicationRoute = - selectedValue; - - routeController.text = - projectViewModel.isArabic - ? _selectedMedicationRoute - .nameAr - : _selectedMedicationRoute - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: routeController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .route, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: routeController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedMedicationRoute == null) - CustomValidationError(), - SizedBox( - height: 5, - ), - TextFields( - onTapTextFields: model - .medicationFrequencyList != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.medicationFrequencyList, - okText: TranslationBase - .of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - _selectedMedicationFrequency = - selectedValue; - - frequencyController.text = - projectViewModel.isArabic - ? _selectedMedicationFrequency - .nameAr - : _selectedMedicationFrequency - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: frequencyController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .frequency, - //TODO add translation - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: frequencyController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - SizedBox( - height: 5, - ), - if(isFormSubmitted && - _selectedMedicationFrequency == null) - CustomValidationError(), - SizedBox( - height: 30, - ), - AppButton( - title: TranslationBase - .of(context) - .add - .toUpperCase(), - onPressed: () { - setState(() { - isFormSubmitted = true; - }); - if (_selectedMedication != null && - _selectedMedicationDose != - null && - _selectedMedicationStrength != null && - _selectedMedicationRoute != null && - _selectedMedicationFrequency != null) { - widget.medicationController.text = - widget.medicationController.text + - '${_selectedMedication - .description } (${TranslationBase - .of(context) - .doseTime} ) ${doseController - .text} (${TranslationBase - .of(context) - .strength}) ${strengthController - .text} (${TranslationBase - .of(context) - .route }) ${routeController - .text} (${TranslationBase - .of(context) - .frequency }) ${frequencyController - .text} \n \n'; - Navigator.of(context).pop(); - } - }, - ), - ] - - ), - ), - ), - ),), - ), - ); - } -} - - - - - - diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart deleted file mode 100644 index ddb7b9d6..00000000 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ /dev/null @@ -1,1026 +0,0 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/config.dart'; -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/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/master_key_dailog.dart'; -import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:provider/provider.dart'; - -import 'custom_validation_error.dart'; - -class UpdateAssessmentPage extends StatefulWidget { - final Function changePageViewIndex; - List mySelectedAssessmentList; - final PatiantInformtion patientInfo; - final Function changeLoadingState; - - UpdateAssessmentPage({Key key, - this.changePageViewIndex, - this.mySelectedAssessmentList, - this.patientInfo, this.changeLoadingState}); - - @override - _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); -} - -class _UpdateAssessmentPageState extends State { - bool isAssessmentExpand = false; - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - - return BaseView( - onModelReady: (model) async{ - widget.mySelectedAssessmentList.clear(); - GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( - patientMRN: widget.patientInfo.patientMRN, - episodeID: widget.patientInfo.episodeNo.toString(), - editedBy: '', - doctorID: '', - appointmentNo: widget.patientInfo.appointmentNo); - await model.getPatientAssessment(getAssessmentReqModel); - if(model.patientAssessmentList.isNotEmpty){ - if (model.listOfDiagnosisCondition.length == 0) { - await model.getMasterLookup(MasterKeysService.DiagnosisCondition); - } - if (model.listOfDiagnosisType.length == 0) { - await model.getMasterLookup(MasterKeysService.DiagnosisType); - } - if (model.listOfICD10.length == 0) { - await model.getMasterLookup(MasterKeysService.ICD10); - } - model.patientAssessmentList.forEach((element) { - MasterKeyModel diagnosisType = model.getOneMasterKey( - masterKeys: MasterKeysService.DiagnosisType, - id: element.diagnosisTypeID, - ); - MasterKeyModel selectedICD = model.getOneMasterKey( - masterKeys: MasterKeysService.ICD10, - id: element.icdCode10ID, - ); - MasterKeyModel diagnosisCondition = model.getOneMasterKey( - masterKeys: MasterKeysService.DiagnosisCondition, - id: element.conditionID, - ); - if(diagnosisCondition !=null &&diagnosisType !=null && diagnosisCondition!=null) { - MySelectedAssessment temMySelectedAssessment = MySelectedAssessment( - appointmentId: element.appointmentNo, - remark: element.remarks, - selectedDiagnosisType: diagnosisType, - selectedDiagnosisCondition: diagnosisCondition, - selectedICD: selectedICD, - doctorID: element.doctorID, - doctorName: element.doctorName, - createdBy: element.createdBy, - createdOn: element.createdOn, - icdCode10ID: element.icdCode10ID - ); - - widget.mySelectedAssessmentList.add(temMySelectedAssessment); - } - - }); - } - - widget.changeLoadingState(false); - - }, - builder: (_, model, w) => AppScaffold( - isShowAppBar: false, - // baseViewModel: model, - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase.of(context).assessment.toUpperCase(), - variant: - isAssessmentExpand ? "bodyText" : '', - bold: isAssessmentExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isAssessmentExpand = !isAssessmentExpand; - }); - }, - child: Icon(isAssessmentExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( - children: [ - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).addAssessment, - fontSize: 13.5, - onTapTextFields: () { - openAssessmentDialog(context,isUpdate: false, - model: model); - }, - readOnly: true, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal - .appPrimaryColor, - fontWeight: FontWeight.w600, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - - Column( - children: widget.mySelectedAssessmentList.map(( - assessment) { - return Container( - margin: EdgeInsets.only( - left: 5, right: 5, top: 15), - child: Row( - mainAxisAlignment: MainAxisAlignment - .spaceBetween, - crossAxisAlignment: CrossAxisAlignment - .start, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment - .start, - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - - assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day.toString(), - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - AppText( - Helpers.getMonth(assessment.createdOn !=null?DateTime.parse(assessment.createdOn).month:DateTime.now().month).toUpperCase(), - fontSize: 10, - color: Colors.grey, - ), - ], - ) - ], - ), - Column( - 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, - children: [ - AppText( - TranslationBase.of(context).appointmentNo, - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - AppText( - assessment - .appointmentId - .toString(), - fontSize: 10, - color: Colors.grey, - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).condition + " : ", - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - AppText( - projectViewModel.isArabic?assessment - .selectedDiagnosisCondition - .nameAr : assessment - .selectedDiagnosisCondition - .nameEn, - fontSize: 10, - color: Colors.grey, - - ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).dType+' : ', - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - AppText( - projectViewModel.isArabic?assessment - .selectedDiagnosisType - .nameAr:assessment - .selectedDiagnosisType - .nameEn, - fontSize: 10, - color: Colors.grey, - ), - ], - ), - if(assessment.doctorName != null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).doc, - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - AppText( - assessment.doctorName??'', - fontSize: 10, - color: Colors.grey, - ), - ], - ), - SizedBox( - height: 6, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - 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.38, - child: AppText( - assessment.remark ?? "", - fontSize: 10, - color: Colors.grey, - ), - ), - ], - ), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment - .start, - children: [ - Row( - - children: [ - AppText( - "ICD : ".toUpperCase(), - fontWeight: FontWeight - .bold, - fontSize: 13, - ), - Container( - child: AppText( - assessment.selectedICD - .code.trim() - .toUpperCase() ?? - "", - fontSize: 10, - color: Colors.grey, - ), - ), - ], - ) - ], - ), - Column( - children: [ - InkWell( - onTap: () { - openAssessmentDialog( - context, isUpdate: true, - assessment: assessment, - model: model); - }, - child: Icon(EvaIcons - .edit2Outline), - ) - ], - ), - ], - ), - ); - }).toList(),) - ], - ) - ]), - isExpand: isAssessmentExpand, - ), - DividerWithSpacesAround( - height: 30, - ), - AppButton( - title: TranslationBase - .of(context) - .next, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - if (widget.mySelectedAssessmentList.isEmpty) { - helpers.showErrorToast( - TranslationBase.of(context).assessmentErrorMsg); - } else { - widget.changePageViewIndex(3); - widget.changeLoadingState(true); - } - }, - ), - SizedBox( - height: 30, - ), - ], - ), - ), - ), - ))); - } - - - openAssessmentDialog(BuildContext context, - { - MySelectedAssessment assessment, bool isUpdate, - SOAPViewModel model - }) { - if (assessment == null) { - assessment = MySelectedAssessment( - remark: '', appointmentId: widget.patientInfo.appointmentNo); - } - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return AddAssessmentDetails( - mySelectedAssessment: assessment, - patientInfo: widget.patientInfo, - isUpdate: isUpdate, - mySelectedAssessmentList: widget.mySelectedAssessmentList, - addSelectedAssessment: (MySelectedAssessment mySelectedAssessment, - bool isUpdate) async { - setState(() { - widget.mySelectedAssessmentList.add(mySelectedAssessment); - - }); - }); - }); - } - -} - -class AddAssessmentDetails extends StatefulWidget { - final MySelectedAssessment mySelectedAssessment; - final List mySelectedAssessmentList; - final Function(MySelectedAssessment mySelectedAssessment, bool isUpdate) addSelectedAssessment; - final PatiantInformtion patientInfo; - final bool isUpdate; - AddAssessmentDetails( - {Key key, this.mySelectedAssessment, this.addSelectedAssessment, this.patientInfo, this.isUpdate = false, this.mySelectedAssessmentList}); - - - @override - _AddAssessmentDetailsState createState() => _AddAssessmentDetailsState(); -} - -class _AddAssessmentDetailsState extends State { - TextEditingController remarkController = TextEditingController(); - TextEditingController appointmentIdController = TextEditingController(); - TextEditingController conditionController = TextEditingController(); - TextEditingController typeController = TextEditingController(); - TextEditingController icdNameController = TextEditingController(); - - GlobalKey key = new GlobalKey>(); - bool isFormSubmitted = false; - - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - - remarkController.text = widget.mySelectedAssessment.remark ?? ""; - appointmentIdController.text = - widget.mySelectedAssessment.appointmentId.toString(); - if(widget.isUpdate){ - if(widget.mySelectedAssessment - .selectedDiagnosisCondition != null) - conditionController.text = projectViewModel.isArabic - ? widget.mySelectedAssessment - .selectedDiagnosisCondition - .nameAr - : widget.mySelectedAssessment - .selectedDiagnosisCondition - .nameEn; - if(widget.mySelectedAssessment - .selectedDiagnosisType !=null) - typeController.text = projectViewModel.isArabic - ? widget.mySelectedAssessment - .selectedDiagnosisType - .nameAr - : widget.mySelectedAssessment - .selectedDiagnosisType - .nameEn; - if(widget.mySelectedAssessment.selectedICD !=null) - icdNameController.text = widget.mySelectedAssessment.selectedICD.code; - } - final screenSize = MediaQuery.of(context).size; - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {IconData icon}) { - return InputDecoration( - contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.grey, width: 1.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 10, - color: Theme.of(context).hintColor, - fontWeight: FontWeight.w700), - ); - } - return FractionallySizedBox( - heightFactor: 0.75, - child: BaseView( - onModelReady: (model) async { - if (model.listOfDiagnosisCondition.length == 0) { - await model.getMasterLookup(MasterKeysService.DiagnosisCondition); - } - if (model.listOfDiagnosisType.length == 0) { - await model.getMasterLookup(MasterKeysService.DiagnosisType); - } - if (model.listOfICD10.length == 0) { - await model.getMasterLookup(MasterKeysService.ICD10); - } - }, - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: SingleChildScrollView( - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).addAssessmentDetails.toUpperCase(), - fontWeight: FontWeight.bold, - fontSize: 13, - ), - SizedBox( - height: 16, - ), - Container( - margin: EdgeInsets.only( - left: 0, right: 0, top: 15), - child: TextFields( - 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, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 10, - ), - Container( - height: screenSize.height * 0.080, - child: InkWell( - onTap: model.listOfICD10 != null - ? () { - setState(() { - widget.mySelectedAssessment - .selectedICD = null; - icdNameController.text = null; - }); - } - : null, - child: widget.mySelectedAssessment.selectedICD == null ? AutoCompleteTextField( - decoration: textFieldSelectorDecoration( - TranslationBase - .of(context) - .nameOrICD, - widget.mySelectedAssessment.selectedICD != - null ? widget.mySelectedAssessment - .selectedICD.nameEn : null, true, - icon: EvaIcons.search), - itemSubmitted: (item) => - setState(() - { - widget.mySelectedAssessment - .selectedICD = item; - icdNameController.text =item.code; - }), - key: key, - suggestions: model.listOfICD10, - itemBuilder: (context, suggestion) => - new Padding( - child: Texts( - suggestion.description + " / " + - suggestion.code.toString()), - padding: EdgeInsets.all(8.0)), - itemSorter: (a, b) => 1, - itemFilter: (suggestion, input) => - suggestion.description.toLowerCase().startsWith( - input.toLowerCase()) || - suggestion.description.toLowerCase() - .startsWith(input.toLowerCase()) - || suggestion.code.toLowerCase().startsWith( - input.toLowerCase()) - , - ) - : TextFields( - onTapTextFields: model.listOfICD10 != null - ? () { - setState(() { - widget.mySelectedAssessment.selectedICD = - null; - icdNameController.text = null; - }); - } - : null, - hasLabelText: icdNameController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .nameOrICD, - fontSize: 13.5, - readOnly: true, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: icdNameController, - suffixIcon: EvaIcons.search, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }) - - // TextField( - // decoration: textFieldSelectorDecoration( - // widget.mySelectedAssessment.selectedICD != - // null ? widget.mySelectedAssessment - // .selectedICD.code : "Name or ICD", - // widget.mySelectedAssessment.selectedICD != - // null ? projectViewModel.isArabic - // ? widget.mySelectedAssessment - // .selectedICD.nameAr - // : widget.mySelectedAssessment - // .selectedICD.nameEn : null, true, - // icon: EvaIcons.search), - // enabled: false, - // ), - ), - ), - if(isFormSubmitted && - widget.mySelectedAssessment - .selectedICD == null) - CustomValidationError(), - SizedBox( - height: 10, - ), - TextFields( - onTapTextFields: model - .listOfDiagnosisCondition != - null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.listOfDiagnosisCondition, - okText: TranslationBase - .of(context) - .ok, - okFunction: ( - MasterKeyModel selectedValue) { - setState(() { - widget.mySelectedAssessment - .selectedDiagnosisCondition = - selectedValue; - conditionController.text = - projectViewModel.isArabic - ? widget.mySelectedAssessment - .selectedDiagnosisCondition - .nameAr - : widget.mySelectedAssessment - .selectedDiagnosisCondition - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: conditionController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .condition, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: conditionController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - if(isFormSubmitted && - widget.mySelectedAssessment - .selectedDiagnosisCondition == null) - CustomValidationError(), - SizedBox( - height: 10, - ), - - - TextFields( - onTapTextFields: model - .listOfDiagnosisType != null - ? () { - MasterKeyDailog dialog = MasterKeyDailog( - list: model.listOfDiagnosisType, - okText: TranslationBase - .of(context) - .ok, - okFunction: ( - MasterKeyModel selectedValue) { - setState(() { - // _selectedDiagnosisType = - // selectedValue; - widget.mySelectedAssessment - .selectedDiagnosisType = - selectedValue; - typeController.text = - projectViewModel.isArabic - ? selectedValue - .nameAr - : selectedValue - .nameEn; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - hasLabelText: typeController.text != - '' ? true : false, - showLabelText: true, - hintText: TranslationBase - .of(context) - .dType, - fontSize: 13.5, - readOnly: true, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 2, - minLines: 1, - controller: typeController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - if(isFormSubmitted && - widget.mySelectedAssessment - .selectedDiagnosisType == null) - CustomValidationError(), - SizedBox( - height: 10, - ), - Container( - margin: EdgeInsets.only( - left: 0, right: 0, top: 15), - child: TextFields( - hintText: TranslationBase - .of(context) - .remarks, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 18, - minLines: 5, - hasLabelText: remarkController.text != - '' ? true : false, - showLabelText: true, - controller: remarkController, - onChanged: (value) { - widget.mySelectedAssessment.remark = - remarkController.text; - }, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 10, - ), - AppButton( - title: (widget.isUpdate?TranslationBase.of(context).update:TranslationBase.of(context).add).toUpperCase(), - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - setState(() { - isFormSubmitted = true; - }); - widget.mySelectedAssessment.remark = - remarkController.text; - widget.mySelectedAssessment - .appointmentId = int.parse( - appointmentIdController.text); - if (widget.mySelectedAssessment - .selectedDiagnosisCondition != - null && - widget.mySelectedAssessment - .selectedDiagnosisType != - null && - widget.mySelectedAssessment - .selectedICD != null) { - await submitAssessment( - isUpdate: widget.isUpdate, - model: model, - mySelectedAssessment: widget - .mySelectedAssessment); - } - }, - ), - ])), - ), - ), - ))), - ); - } - - submitAssessment( - {SOAPViewModel model, MySelectedAssessment mySelectedAssessment, bool isUpdate = false}) async { - if (isUpdate) { - PatchAssessmentReqModel patchAssessmentReqModel = - PatchAssessmentReqModel( - patientMRN: widget.patientInfo.patientMRN, - episodeID: widget.patientInfo.episodeNo, - appointmentNo: widget.patientInfo.appointmentNo, - remarks: mySelectedAssessment.remark, - complexDiagnosis: true, - conditionId: - mySelectedAssessment.selectedDiagnosisCondition.id, - diagnosisTypeId: - mySelectedAssessment.selectedDiagnosisType.id, - icdcode10Id: mySelectedAssessment.selectedICD.code, - prevIcdCode10ID: mySelectedAssessment.icdCode10ID - ); - - await model.patchAssessment(patchAssessmentReqModel); - } else { - PostAssessmentRequestModel postAssessmentRequestModel = - new PostAssessmentRequestModel( - patientMRN: widget.patientInfo.patientMRN, - episodeId: widget.patientInfo.episodeNo, - appointmentNo: widget.patientInfo.appointmentNo, - icdCodeDetails: [ - new IcdCodeDetails( - remarks: mySelectedAssessment.remark, - complexDiagnosis: true, - conditionId: - mySelectedAssessment.selectedDiagnosisCondition.id, - diagnosisTypeId: - mySelectedAssessment.selectedDiagnosisType.id, - icdcode10Id: mySelectedAssessment.selectedICD.code) - ]); - - await model.postAssessment(postAssessmentRequestModel); - } - - - if (model.state == ViewState.ErrorLocal) { - helpers - .showErrorToast(model.error); - } else { - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code; - mySelectedAssessment.doctorName = doctorProfile.doctorName; - - if (!isUpdate) { - // widget.mySelectedAssessmentList.add(mySelectedAssessment); - widget.addSelectedAssessment(mySelectedAssessment,isUpdate); - } - Navigator.of(context).pop(); - } - - - // widget.changePageViewIndex(3); - } -} - - -class PatchAssessmentReqModel { - int patientMRN; - int appointmentNo; - int episodeID; - String icdcode10Id; - String prevIcdCode10ID; - int conditionId; - int diagnosisTypeId; - bool complexDiagnosis; - String remarks; - - PatchAssessmentReqModel( - {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.icdcode10Id, - this.prevIcdCode10ID, - this.conditionId, - this.diagnosisTypeId, - this.complexDiagnosis, - this.remarks}); - - PatchAssessmentReqModel.fromJson(Map json) { - patientMRN = json['PatientMRN']; - appointmentNo = json['AppointmentNo']; - episodeID = json['EpisodeID']; - icdcode10Id = json['Icdcode10Id']; - prevIcdCode10ID = json['PrevIcdCode10ID']; - conditionId = json['ConditionId']; - diagnosisTypeId = json['DiagnosisTypeId']; - complexDiagnosis = json['ComplexDiagnosis']; - remarks = json['Remarks']; - } - - Map toJson() { - final Map data = new Map(); - data['PatientMRN'] = this.patientMRN; - data['AppointmentNo'] = this.appointmentNo; - data['EpisodeID'] = this.episodeID; - data['Icdcode10Id'] = this.icdcode10Id; - data['PrevIcdCode10ID'] = this.prevIcdCode10ID; - data['ConditionId'] = this.conditionId; - data['DiagnosisTypeId'] = this.diagnosisTypeId; - data['ComplexDiagnosis'] = this.complexDiagnosis; - data['Remarks'] = this.remarks; - return data; - } -} - - diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart deleted file mode 100644 index af960ff7..00000000 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ /dev/null @@ -1,632 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -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/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/divider_with_spaces_around.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:provider/provider.dart'; - -class UpdateObjectivePage extends StatefulWidget { - final Function changePageViewIndex; - final Function changeLoadingState; - - final List mySelectedExamination; - final PatiantInformtion patientInfo; - UpdateObjectivePage( - {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); - - @override - _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); -} - -class _UpdateObjectivePageState extends State { - bool isSysExaminationExpand = false; - - 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: 0.5, - )), - ); - } - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - ProjectViewModel projectViewModel = Provider.of(context); - - return BaseView( - onModelReady: (model) async { - widget.mySelectedExamination.clear(); - GetPhysicalExamReqModel getPhysicalExamReqModel = - GetPhysicalExamReqModel( - patientMRN: widget.patientInfo.patientMRN, - episodeID: widget.patientInfo.episodeNo.toString(), - appointmentNo: widget.patientInfo.appointmentNo); - - await model.getPatientPhysicalExam(getPhysicalExamReqModel); - if (model.patientPhysicalExamList.isNotEmpty) { - if (model.physicalExaminationList.length == 0) { - await model - .getMasterLookup(MasterKeysService.PhysicalExamination); - } - model.patientPhysicalExamList.forEach((element) { - MasterKeyModel examMaster = model.getOneMasterKey( - masterKeys: MasterKeysService.PhysicalExamination, - id: element.examId, - ); - MySelectedExamination tempEam = MySelectedExamination( - selectedExamination: examMaster, - remark: element.remarks, - isNormal: element.isNormal, - createdBy: element.createdBy, - notExamined: element.notExamined, - isNew: element.isNew, - isAbnormal: element.isAbnormal); - widget.mySelectedExamination.add(tempEam); - }); - } - - widget.changeLoadingState(false); - }, - builder: (_, model, w) => AppScaffold( - isShowAppBar: false, - // baseViewModel: model, - - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase.of(context).physicalSystemExamination, - variant: isSysExaminationExpand - ? "bodyText" - : '', - bold: isSysExaminationExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isSysExaminationExpand = - !isSysExaminationExpand; - }); - }, - child: Icon(isSysExaminationExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( - children: [ - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).physicalSystemExamination, - fontSize: 13.5, - onTapTextFields: () { - openExaminationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Column( - children: - widget.mySelectedExamination.map((examination) { - TextEditingController remarksController= TextEditingController(text :examination.remark); - - return Container( - margin: EdgeInsets.only( - left: 15, right: 15, top: 15), - child: Column(children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - ( examination - .selectedExamination.nameEn ) - .toUpperCase(), - variant: "bodyText", - bold: true, - color: Colors.black) - ], - ), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .isNormal - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.grey), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - TranslationBase.of(context).normal, - style: TextStyle( - fontSize: 12, - color: - examination - .isNormal - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), - ), - ), - )), - ), - onTap: () { - setState(() { - examination.isAbnormal = - false; - examination.isNormal = - true; - examination.notExamined = false; - }); - }), - SizedBox( - width: 12, - ), - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .isAbnormal - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.black), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - TranslationBase.of(context).abnormal, - style: TextStyle( - fontSize: 12, - color: - examination - .isAbnormal - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), - ), - ), - )), - ), - onTap: () { - setState(() { - examination.isNormal = - false; - examination.isAbnormal = - true; - examination.notExamined = false; - }); - }),SizedBox( - width: 12, - ), - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .notExamined - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.black), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - "Not Examined", - style: TextStyle( - fontSize: 12, - color: - examination - .notExamined - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), - ), - ), - )), - ), - onTap: () { - setState(() { - examination.isAbnormal = - false; - examination.isNormal = - false; - examination.notExamined = true; - }); - }), - ], - ), - InkWell( - - child: Icon( - FontAwesomeIcons.trash, - color: Colors.grey, - size: 20, - ), - onTap: () => removeExamination( - examination.selectedExamination), - ) - ], - ), - SizedBox( - height: 20, - ), - Container( - 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, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 4, - controller: remarksController, - onChanged: (val) { - examination.remark = val; - }, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - ])); - }).toList(), - ) - ], - ) - ]), - isExpand: isSysExaminationExpand, - ), - DividerWithSpacesAround(height: 30,), - AppButton( - title: TranslationBase.of(context).next, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - await submitUpdateObjectivePage(model); - }, - ), - SizedBox( - height: 30, - ), - ], - ), - ), - ), - ))); - } - - submitUpdateObjectivePage(SOAPViewModel model) async { - - if(widget.mySelectedExamination.isNotEmpty){ - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); - widget.mySelectedExamination.forEach((exam) { - if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == - null) - postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; - - postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add( - ListHisProgNotePhysicalExaminationVM( - patientMRN: widget.patientInfo.patientMRN, - episodeId: widget.patientInfo.episodeNo, - appointmentNo: widget.patientInfo.appointmentNo, - remarks: exam.remark ?? '', - createdBy: exam.createdBy??doctorProfile.doctorID, - createdOn: DateTime.now().toIso8601String(), - editedBy: doctorProfile.doctorID, - editedOn: DateTime.now().toIso8601String(), - examId: exam.selectedExamination.id, - examType: exam.selectedExamination.typeId, - isAbnormal: exam.isAbnormal, - isNormal: exam.isNormal, - // masterDescription: exam.selectedExamination, - notExamined: exam.notExamined, - examinationType: exam.isNormal?1:exam.isAbnormal?2:3, - examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined", - isNew:exam.isNew - - )); - }); - - if(model.patientPhysicalExamList.isEmpty) { - - await model.postPhysicalExam(postPhysicalExamRequestModel); - } else { - await model.patchPhysicalExam(postPhysicalExamRequestModel); - } - - if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - } else { - widget.changeLoadingState(true); - - widget.changePageViewIndex(2); - } - } else { - // widget.changeLoadingState(true); - // - // widget.changePageViewIndex(2); - - helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); - } - } - - removeExamination(MasterKeyModel masterKey) { - Iterable history = widget.mySelectedExamination - .where( - (element) => - masterKey.id == element.selectedExamination.id && - masterKey.typeId == element.selectedExamination.typeId); - - if (history.length > 0) - setState(() { - widget.mySelectedExamination.remove(history.first); - }); - } - - openExaminationList(BuildContext context) { - final screenSize = MediaQuery - .of(context) - .size; - InputDecoration textFieldSelectorDecoration(String hintText, - String selectedText, bool isDropDown) { - 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 ? Icon(Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - ); - } - - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return AddExaminationDailog( - mySelectedExamination: widget.mySelectedExamination, - addSelectedExamination: () { - setState(() { - Navigator.of(context).pop(); - }); - }, - removeExamination: (masterKey) => removeExamination(masterKey),); - }); - } -} - -class AddExaminationDailog extends StatefulWidget { - final List mySelectedExamination; - final Function addSelectedExamination; - final Function (MasterKeyModel) removeExamination; - - const AddExaminationDailog( - {Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination}) - : super(key: key); - - @override - _AddExaminationDailogState createState() => _AddExaminationDailogState(); -} - -class _AddExaminationDailogState extends State { - @override - Widget build(BuildContext context) { - return FractionallySizedBox( - heightFactor: 0.7, - child: BaseView( - onModelReady: (model) async { - if (model.physicalExaminationList.length == 0) { - await model.getMasterLookup( - MasterKeysService.PhysicalExamination); - } - }, - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - isShowAppBar: false, - body: Center( - child: Container( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).physicalSystemExamination, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - MasterKeyCheckboxSearchWidget( - model: model, - hintSearchText: TranslationBase.of(context).searchExamination, - buttonName: TranslationBase.of(context).addExamination, - masterList: model.physicalExaminationList, - removeHistory: (history){ - setState(() { - widget.removeExamination(history); - }); - }, - addHistory: (history){ - setState(() { - MySelectedExamination mySelectedExamination = new MySelectedExamination( - selectedExamination: history - ); - widget - .mySelectedExamination - .add( - mySelectedExamination); - }); - }, - addSelectedHistories: (){ - widget.addSelectedExamination(); - }, - isServiceSelected: (master) =>isServiceSelected(master), - ), - ]), - ))), - )), - ); - } - - isServiceSelected(MasterKeyModel masterKey) { - Iterable exam = - widget - .mySelectedExamination - .where((element) => - masterKey.id == element.selectedExamination.id && - masterKey.typeId == element.selectedExamination.typeId); - if (exam.length > 0) { - return true; - } - return false; - } -} diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart deleted file mode 100644 index e1388ef1..00000000 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ /dev/null @@ -1,406 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/divider_with_spaces_around.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; - -class UpdatePlanPage extends StatefulWidget { - final Function changePageViewIndex; - final PatiantInformtion patientInfo; - final Function changeLoadingState; - GetPatientProgressNoteResModel patientProgressNote; - - UpdatePlanPage( - {Key key, - this.changePageViewIndex, - this.patientInfo, - this.changeLoadingState, - this.patientProgressNote}); - - @override - _UpdatePlanPageState createState() => _UpdatePlanPageState(); -} - -class _UpdatePlanPageState extends State { - bool isProgressNoteExpand = false; - - - TextEditingController progressNoteController = - TextEditingController(text: null); - - 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: 0.5, - )), - ); - } - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) async { - GetGetProgressNoteReqModel getGetProgressNoteReqModel = - GetGetProgressNoteReqModel( - appointmentNo: widget.patientInfo.appointmentNo, - patientMRN: widget.patientInfo.patientMRN, - episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: ''); - await model.getPatientProgressNote(getGetProgressNoteReqModel); - - if (model.patientProgressNoteList.isNotEmpty) { - progressNoteController.text = helpers - .parseHtmlString(model.patientProgressNoteList[0].planNote); - widget.patientProgressNote.planNote = progressNoteController.text; - widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName; - widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; - widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; - widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; - - } - widget.changeLoadingState(false); - }, - builder: (_, model, w) => AppScaffold( - // baseViewModel: model, - isShowAppBar: false, - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .progressNoteSOAP, - variant: isProgressNoteExpand ? "bodyText" : '', - bold: isProgressNoteExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isProgressNoteExpand = !isProgressNoteExpand; - }); - }, - child: Icon(isProgressNoteExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( - children: [ - if(widget.patientProgressNote.planNote == null) - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - - hintText: TranslationBase - .of(context) - .addProgressNote, - fontSize: 13.5, - onTapTextFields: () { - openProgressNote(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - if ( widget.patientProgressNote.planNote != null) - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - - widget.patientProgressNote.createdOn !=null?DateTime.parse(widget.patientProgressNote.createdOn).day.toString():DateTime.now().day.toString(), - fontWeight: FontWeight - .bold, - fontSize: 16, - ), - AppText( - Helpers.getMonth(widget.patientProgressNote.createdOn !=null?(DateTime.parse(widget.patientProgressNote.createdOn).month):DateTime.now().month).toUpperCase(), - fontSize: 10, - color: Colors.grey, - ), - ], - ) - ], - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 6, - ), - Padding( - padding: const EdgeInsets.all(0.0), - child: Container( - width: MediaQuery.of(context) - .size - .width * - 0.6, - child: AppText( - progressNoteController.text, - fontSize: 10, - color: Colors.grey, - ), - ), - ), - ], - ), - SizedBox( - height: 8, - ), - if(widget.patientProgressNote.createdByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).createdBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.createdByName??"", - fontSize: 10, - color: Colors.grey, - ), - ], - ), - if(widget.patientProgressNote.editedByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).editedBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.editedByName??"", - fontSize: 10, - color: Colors.grey, - ), - ], - ), - ], - ), - Column( - children: [ - InkWell( - onTap: () { - openProgressNote(context); - }, - child: Icon(EvaIcons.edit2Outline), - ) - ], - ), - ], - ), - ) - ], - ) - ]), - isExpand: isProgressNoteExpand, - ), - DividerWithSpacesAround( - height: 30, - ), - AppButton( - title: TranslationBase.of(context).next, - loading: model.state == ViewState.BusyLocal, - onPressed: () { - submitPlan(model); - // widget.changePageViewIndex(2); - }, - ), - SizedBox( - height: 30, - ), - ], - ), - ), - ), - ), - ), - ); - } - - submitPlan(SOAPViewModel model) async { - if (progressNoteController.text.isNotEmpty) { - PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel( - patientMRN: widget.patientInfo.patientMRN, - episodeId: widget.patientInfo.episodeNo, - appointmentNo: widget.patientInfo.appointmentNo, - planNote: widget.patientProgressNote.planNote, doctorID: '', editedBy: ''); - - if(model.patientProgressNoteList.isEmpty){ - await model.postProgressNote(postProgressNoteRequestModel); - - }else { - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - postProgressNoteRequestModel.editedBy =doctorProfile.doctorID; - await model.patchProgressNote(postProgressNoteRequestModel); - - } - - if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); - } else { - Navigator.of(context).pop(); - } - } else { - helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); - } - } - - openProgressNote(BuildContext context) { - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return FractionallySizedBox( - heightFactor: 0.6, - child: Container( - child: FractionallySizedBox( - widthFactor: 0.9, - child: ListView( - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).addProgressNote, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 10, - ), - Container( - 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, - fontWeight: FontWeight.w600, - maxLines: 16, - minLines: 8, - controller: progressNoteController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ),SizedBox( - height: 10, - ), - AppButton( - title: TranslationBase.of(context).add.toUpperCase(), - onPressed: () async{ - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName??doctorProfile.doctorName; - widget.patientProgressNote.editedByName=doctorProfile.doctorName; - widget.patientProgressNote.createdOn= DateTime.now().toString() ; - widget.patientProgressNote.planNote = progressNoteController.text; - setState(() { - print(progressNoteController.text); - }); - Navigator.of(context).pop(); - }, - ), - ]), - )), - ); - }); - } -} diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart deleted file mode 100644 index 5c646121..00000000 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ /dev/null @@ -1,154 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; -import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_objective_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - - -class UpdateSoapIndex extends StatefulWidget { - final bool isUpdate; - - const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key); - @override - _UpdateSoapIndexState createState() => _UpdateSoapIndexState(); -} - -class _UpdateSoapIndexState extends State - with TickerProviderStateMixin { - PageController _controller; - int _currentIndex = 0; - List myAllergiesList = List(); - List myHistoryList = List(); - List mySelectedExamination = List(); - List mySelectedAssessment = List(); - - GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel(); - changePageViewIndex(pageIndex) { - if (pageIndex != _currentIndex) changeLoadingState(true); - _controller.jumpToPage(pageIndex); - } - - bool _isLoading = true; - - @override - void initState() { - // TODO: implement initState - _controller = new PageController(); - - super.initState(); - } - - void changeLoadingState(isLoading) { - setState(() { - _isLoading = isLoading; - }); - } - - @override - Widget build(BuildContext context) { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - return BaseView( - builder: (_, model, w) => AppScaffold( - // baseViewModel: model, - isLoading: _isLoading, - appBarTitle: TranslationBase.of(context).healthRecordInformation, - body: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: - BoxDecoration(boxShadow: [], color: Colors.white), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - PatientPageHeaderWidget(patient), - FractionallySizedBox( - child: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 0.75, - child: Column( - children: [ - Container( - margin: EdgeInsets.only( - left: - MediaQuery.of(context).size.width * 0.05, - right: - MediaQuery.of(context).size.width * 0.05), - child: StepsWidget( - index: _currentIndex, - changeCurrentTab: changePageViewIndex, - ), - ), - Expanded( - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: _controller, - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - UpdateSubjectivePage( - changePageViewIndex: changePageViewIndex, - myAllergiesList: myAllergiesList, - myHistoryList: myHistoryList, - patientInfo: patient, - changeLoadingState:changeLoadingState - ), - UpdateObjectivePage( - changePageViewIndex: changePageViewIndex, - mySelectedExamination: - mySelectedExamination, - patientInfo: patient, - changeLoadingState:changeLoadingState - ), - UpdateAssessmentPage( - changePageViewIndex: changePageViewIndex, - mySelectedAssessmentList: - mySelectedAssessment, - patientInfo: patient, - changeLoadingState:changeLoadingState - - ), - UpdatePlanPage( - changePageViewIndex: changePageViewIndex, - patientInfo: patient, - patientProgressNote: patientProgressNote, - changeLoadingState:changeLoadingState - - ) - ], - ), - ), - ], - ), - ), - ), - ) - ], - ), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index 41af8e1d..8635f597 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -60,7 +60,7 @@ class _VitalSignDetailsWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( widget.title1, color: Colors.white, ), @@ -77,7 +77,7 @@ class _VitalSignDetailsWidgetState extends State { ), ), child: Center( - child: Texts(widget.title2, color: Colors.white), + child: AppText(widget.title2, color: Colors.white), ), height: 60), ) @@ -89,8 +89,8 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( - '${Helpers.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${Helpers.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', + child: AppText( + '${DateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', textAlign: TextAlign.center, ), ), @@ -101,7 +101,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( '${vital.toJson()[widget.viewKey]}', textAlign: TextAlign.center, ), diff --git a/lib/widgets/shared/StarRating.dart b/lib/widgets/shared/StarRating.dart index 10c12fa5..f391e7bf 100644 --- a/lib/widgets/shared/StarRating.dart +++ b/lib/widgets/shared/StarRating.dart @@ -1,8 +1,7 @@ +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; -import 'Text.dart'; - class StarRating extends StatelessWidget { final double totalAverage; final double size; @@ -21,7 +20,7 @@ class StarRating extends StatelessWidget { Widget build(BuildContext context) { return Row(mainAxisAlignment: MainAxisAlignment.start, children: [ if (!forceStars && (totalAverage == null || totalAverage == 0)) - Texts("New", style: "caption"), + AppText("New", style: "caption"), if (forceStars || (totalAverage != null && totalAverage > 0)) ...List.generate( 5, @@ -38,7 +37,7 @@ class StarRating extends StatelessWidget { )), if (totalCount != null) SizedBox(width: 9.0), if (totalCount != null) - Texts( + AppText( "(" + totalCount.toString() + ")", style: "overline", color: Colors.grey[400], diff --git a/lib/widgets/shared/Text.dart b/lib/widgets/shared/Text.dart deleted file mode 100644 index 59929075..00000000 --- a/lib/widgets/shared/Text.dart +++ /dev/null @@ -1,261 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class Texts extends StatefulWidget { - final String text; - final String variant; - final Color color; - final bool bold; - final bool regular; - final bool medium; - final int maxLength; - final bool italic; - final TextAlign textAlign; - final int maxLines; - final bool readMore; - final String style; - final bool allowExpand; - final double fontSize; - final FontWeight fontWeight; - final TextDecoration textDecoration; - - Texts(this.text, - {Key key, - this.variant, - this.color, - this.bold, - this.regular, - this.medium, - this.allowExpand = true, - this.italic: false, - this.textAlign, - this.maxLength = 60, - this.maxLines, - this.readMore = false, - this.style, - this.textDecoration, this.fontSize, this.fontWeight}) - : super(key: key); - - @override - _TextsState createState() => _TextsState(); -} - -class _TextsState extends State { - bool hidden = false; - String text = ""; - - @override - void didUpdateWidget(Texts oldWidget) { - setState(() { - if (widget.style == "overline") - text = widget.text.toUpperCase(); - else { - text = widget.text; - } - }); - super.didUpdateWidget(oldWidget); - } - - @override - void initState() { - hidden = widget.readMore; - if (widget.style == "overline") - text = widget.text.toUpperCase(); - else { - text = widget.text; - } - super.initState(); - } - - double _getFontSize() { - switch (widget.variant) { - case "heading0": - return 40.0; - case "heading": - return 32.0; - case "heading2": - return 28.0; - case "heading3": - return 18.0; - case "body1": - return 18.0; - case "body2": - return 20.0; - case "body2Link": - return 16.0; - case "caption": - return 16.0; - case "caption2": - return 14.0; - case "bodyText": - return 15.0; - case "bodyText2": - return 17.0; - case "caption3": - return 12.0; - case "caption4": - return 9.0; - case "overline": - return 11.0; - case "date": - return 24.0; - default: - return 16.0; - } - } - - FontWeight _getFontWeight() { - if (widget.bold ?? false) { - return FontWeight.w900; - } else if (widget.regular ?? false) { - return FontWeight.w500; - } else if (widget.medium ?? false) { - return FontWeight.w800; - } else { - if (widget.style == null) { - switch (widget.variant) { - case "heading": - return FontWeight.w900; - case "heading2": - return FontWeight.w900; - case "heading3": - return FontWeight.w900; - case "body1": - return FontWeight.w800; - case "body2": - return FontWeight.w900; - case "body2Link": - return FontWeight.w800; - case "caption": - return FontWeight.w700; - case "caption2": - return FontWeight.w700; - case "bodyText": - return FontWeight.w500; - case "bodyText2": - return FontWeight.w500; - case "caption3": - return FontWeight.w600; - case "caption4": - return FontWeight.w600; - case "overline": - return FontWeight.w800; - case "date": - return FontWeight.w900; - default: - return FontWeight.w500; - } - } else { - return null; - } - } - } - - @override - Widget build(BuildContext context) { - TextStyle _getFontStyle() { - switch (widget.style) { - case "headline2": - return Theme.of(context).textTheme.headline2; - case "headline3": - return Theme.of(context).textTheme.headline3; - case "headline4": - return Theme.of(context).textTheme.headline4; - case "headline5": - return Theme.of(context).textTheme.headline5; - case "headline6": - return Theme.of(context).textTheme.headline6; - case "bodyText2": - return Theme.of(context).textTheme.bodyText2; - case "bodyText_15": - return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); - case "bodyText1": - return Theme.of(context).textTheme.bodyText1; - case "caption": - return Theme.of(context).textTheme.caption; - case "overline": - return Theme.of(context).textTheme.overline; - case "button": - return Theme.of(context).textTheme.button; - default: - return TextStyle(); - } - } - - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Text( - !hidden - ? text - : (text.substring( - 0, - text.length > widget.maxLength - ? widget.maxLength - : text.length)), - textAlign: widget.textAlign, - overflow: widget.maxLines != null - ? ((widget.maxLines > 1) - ? TextOverflow.fade - : TextOverflow.ellipsis) - : null, - maxLines: widget.maxLines ?? null, - style: widget.style != null - ? _getFontStyle().copyWith( - fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color != null ? widget.color : null, - fontWeight: widget.fontWeight ?? _getFontWeight(), - ) - : TextStyle( - fontStyle: widget.italic ? FontStyle.italic : null, - color: - widget.color != null ? widget.color : Colors.black, - fontSize:widget.fontSize?? _getFontSize(), - letterSpacing: - widget.variant == "overline" ? 1.5 : null, - fontWeight: widget.fontWeight ?? _getFontWeight(), - decoration: - widget.textDecoration //TextDecoration.lineThrough - )), - if (widget.readMore && text.length > widget.maxLength && hidden) - Positioned( - bottom: 0, - left: 0, - right: 0, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient(colors: [ - Theme.of(context).backgroundColor, - Theme.of(context).backgroundColor.withOpacity(0), - ], begin: Alignment.bottomCenter, end: Alignment.topCenter)), - height: 30, - ), - ) - ], - ), - if (widget.allowExpand && - widget.readMore && - text.length > widget.maxLength) - Padding( - padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), - child: InkWell( - onTap: () { - setState(() { - hidden = !hidden; - }); - }, - child: Text(hidden ? "Read More" : "Read less", - style: _getFontStyle().copyWith( - color: HexColor('#FF0000'), - fontWeight: FontWeight.w800, - fontFamily: "WorkSans", - )), - ), - ), - ], - ); - } -} diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 706c65b7..18d8e778 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -77,7 +77,7 @@ class TextFields extends StatefulWidget { this.hasBorder = true, this.onTapTextFields, this.hasLabelText = false, - this.showLabelText = false}) + this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, }) : super(key: key); final String hintText; @@ -116,6 +116,9 @@ class TextFields extends StatefulWidget { final Color fillColor; final bool hasBorder; final bool showLabelText; + Color borderColor; + final double borderRadius; + final double borderWidth; bool hasLabelText; @override @@ -200,6 +203,8 @@ class _TextFieldsState extends State { @override Widget build(BuildContext context) { + + widget.borderColor = widget.borderColor?? Colors.grey; return (AnimatedContainer( duration: Duration(milliseconds: 300), decoration: widget.bare @@ -276,6 +281,7 @@ class _TextFieldsState extends State { hintText: widget.hintText, hintStyle: TextStyle( fontSize: widget.fontSize, + fontWeight: widget.fontWeight, color: widget.hintColor ?? Theme.of(context).hintColor, ), @@ -304,7 +310,7 @@ class _TextFieldsState extends State { width: 1.0) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), focusedErrorBorder: OutlineInputBorder( @@ -315,28 +321,28 @@ class _TextFieldsState extends State { .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)), + borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)), focusedBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), disabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0)), enabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), ), diff --git a/lib/widgets/shared/app-textfield-custom.dart b/lib/widgets/shared/app-textfield-custom.dart deleted file mode 100644 index 15c8865a..00000000 --- a/lib/widgets/shared/app-textfield-custom.dart +++ /dev/null @@ -1,140 +0,0 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:flutter/material.dart'; - -import 'app_texts_widget.dart'; - -class AppTextFieldCustom extends StatefulWidget { - final double height; - final Function onClick; - final String hintText; - final TextEditingController controller; - final bool isDropDown; - final Icon suffixIcon; - final Color dropDownColor; - - AppTextFieldCustom( - {this.height = 0, - this.onClick, - this.hintText, - this.controller, - this.isDropDown = false, - this.suffixIcon, - this.dropDownColor}); - - @override - _AppTextFieldCustomState createState() => _AppTextFieldCustomState(); -} - -class _AppTextFieldCustomState extends State { - @override - Widget build(BuildContext context) { - return Container( - height: widget.height != 0 ? widget.height : null, - decoration: - containerBorderDecoration(Color(0Xffffffff), Color(0xFFEFEFEF)), - padding: EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), - child: InkWell( - onTap: widget.onClick ?? null, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (widget.controller.text != "") - AppText( - widget.hintText, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w600, - ), - TextField( - textAlign: TextAlign.left, - decoration: textFieldSelectorDecoration( - widget.hintText, null, true), - style: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - controller: widget.controller, - ), - ], - ), - ), - widget.isDropDown - ? widget.suffixIcon != null - ? widget.suffixIcon - : Icon( - Icons.arrow_drop_down, - color: widget.dropDownColor != null - ? widget.dropDownColor - : Colors.black, - ) - : Container(), - ], - ), - ), - ); - } - - BoxDecoration containerBorderDecoration( - Color containerColor, Color borderColor, - {double borderWidth = -1}) { - return BoxDecoration( - color: containerColor, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.all(Radius.circular(8)), - border: Border.fromBorderSide(BorderSide( - color: borderColor, - width: borderWidth == -1 ? 2.0 : borderWidth, - )), - ); - } - - static InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {Icon suffixIcon, Color dropDownColor}) { - return InputDecoration( - isDense: true, - contentPadding: EdgeInsets.symmetric(horizontal: 0, vertical: 0), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Color(0Xffffffff)), - ), - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Color(0Xffffffff)), - ), - border: UnderlineInputBorder( - borderSide: BorderSide(color: Color(0Xffffffff)), - ), - /*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, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - /*suffixIcon: isDropDown - ? suffixIcon != null - ? suffixIcon - : Icon( - Icons.arrow_drop_down, - color: dropDownColor != null ? dropDownColor : Colors.black, - ) - : null,*/ - // labelText: - // labelStyle: - ); - } -} diff --git a/lib/widgets/shared/app_button.dart b/lib/widgets/shared/app_button.dart deleted file mode 100644 index 60a3528d..00000000 --- a/lib/widgets/shared/app_button.dart +++ /dev/null @@ -1,150 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class Button extends StatefulWidget { - final String title; - final Widget icon; - final VoidCallback onTap; - final bool loading; - final Color color; - - Button({ - Key key, - this.title = "", - this.icon, - this.onTap, - this.loading= false, - this.color, - }) : super(key: key); - - - - @override - _ButtonState createState() => _ButtonState(); -} - -class _ButtonState extends State