diff --git a/.metadata b/.metadata
index 01d2dcb9..d2765fcb 100644
--- a/.metadata
+++ b/.metadata
@@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited.
version:
- revision: 0b8abb4724aa590dd0f429683339b1e045a1594d
- channel: stable
+ revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
+ channel: "stable"
project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: android
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: ios
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: linux
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: macos
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: web
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ - platform: windows
+ create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+ base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 00000000..0d290213
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 64723504..e87052e9 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -59,7 +59,7 @@ android {
buildTypes {
release {
// TODO: Add your own signing config for the release build.
- signingConfig signingConfigs.release
+ signingConfig signingConfigs.debug
}
debug {
@@ -103,14 +103,17 @@ dependencies {
//openTok
implementation 'com.opentok.android:opentok-android-sdk:2.20.1'
//permissions
- implementation 'pub.devrel:easypermissions:0.4.0'
+// implementation 'pub.devrel:easypermissions:0.4.0'
+ implementation project(':easypermissions')
+
//retrofit
+
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
-
+ implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:17.4.1'
}
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index 5254f6aa..98c26f7a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.8.20'
+ ext.kotlin_version = '2.0.0'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.3'
+ classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
}
diff --git a/android/easypermissions/build.gradle b/android/easypermissions/build.gradle
index 5c6af4bc..89a6fb5f 100644
--- a/android/easypermissions/build.gradle
+++ b/android/easypermissions/build.gradle
@@ -6,7 +6,7 @@ ext {
SNAPSHOT_REPOSITORY_URL = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
-apply plugin: 'com.vanniktech.maven.publish'
+//apply plugin: 'com.vanniktech.maven.publish'
android {
compileSdkVersion 30
diff --git a/android/settings.gradle b/android/settings.gradle
index 5a2f14fb..90238d2f 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,4 +1,4 @@
-include ':app'
+include ':app', ':easypermissions'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
diff --git a/assets/images/svgs/add-square.svg b/assets/images/svgs/add-square.svg
new file mode 100644
index 00000000..6c6363f5
--- /dev/null
+++ b/assets/images/svgs/add-square.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svgs/audit.svg b/assets/images/svgs/audit.svg
new file mode 100644
index 00000000..7d46a569
--- /dev/null
+++ b/assets/images/svgs/audit.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svgs/delete.svg b/assets/images/svgs/delete.svg
new file mode 100644
index 00000000..7cdd0f32
--- /dev/null
+++ b/assets/images/svgs/delete.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/svgs/edit-icon.svg b/assets/images/svgs/edit-icon.svg
new file mode 100644
index 00000000..8fdc3cba
--- /dev/null
+++ b/assets/images/svgs/edit-icon.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svgs/edit.svg b/assets/images/svgs/edit.svg
new file mode 100644
index 00000000..586202aa
--- /dev/null
+++ b/assets/images/svgs/edit.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svgs/favorite.svg b/assets/images/svgs/favorite.svg
new file mode 100644
index 00000000..c9ff828d
--- /dev/null
+++ b/assets/images/svgs/favorite.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/svgs/favoriteadded.svg b/assets/images/svgs/favoriteadded.svg
new file mode 100644
index 00000000..3b4577cf
--- /dev/null
+++ b/assets/images/svgs/favoriteadded.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/svgs/information.svg b/assets/images/svgs/information.svg
new file mode 100644
index 00000000..5ec862f2
--- /dev/null
+++ b/assets/images/svgs/information.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/svgs/resolve.svg b/assets/images/svgs/resolve.svg
new file mode 100644
index 00000000..51d064f3
--- /dev/null
+++ b/assets/images/svgs/resolve.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svgs/save_as_draft.svg b/assets/images/svgs/save_as_draft.svg
new file mode 100644
index 00000000..a06e6b69
--- /dev/null
+++ b/assets/images/svgs/save_as_draft.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/svgs/unavailable.svg b/assets/images/svgs/unavailable.svg
new file mode 100644
index 00000000..7e692d97
--- /dev/null
+++ b/assets/images/svgs/unavailable.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/zoom/chat-send@2x.png b/assets/images/zoom/chat-send@2x.png
new file mode 100644
index 00000000..73e7cd31
Binary files /dev/null and b/assets/images/zoom/chat-send@2x.png differ
diff --git a/assets/images/zoom/chat-send@3x.png b/assets/images/zoom/chat-send@3x.png
new file mode 100644
index 00000000..2c18a6b9
Binary files /dev/null and b/assets/images/zoom/chat-send@3x.png differ
diff --git a/assets/images/zoom/default-avatar.png b/assets/images/zoom/default-avatar.png
new file mode 100644
index 00000000..c5fd1e71
Binary files /dev/null and b/assets/images/zoom/default-avatar.png differ
diff --git a/assets/images/zoom/hamburger@2x.png b/assets/images/zoom/hamburger@2x.png
new file mode 100644
index 00000000..9b490c25
Binary files /dev/null and b/assets/images/zoom/hamburger@2x.png differ
diff --git a/assets/images/zoom/hamburger@3x.png b/assets/images/zoom/hamburger@3x.png
new file mode 100644
index 00000000..434601f9
Binary files /dev/null and b/assets/images/zoom/hamburger@3x.png differ
diff --git a/assets/images/zoom/index.ts b/assets/images/zoom/index.ts
new file mode 100644
index 00000000..fce1d508
--- /dev/null
+++ b/assets/images/zoom/index.ts
@@ -0,0 +1,22 @@
+export const icons = {
+ chatSend: require('./chat-send.png'),
+ defaultAvatar: require('./default-avatar.png'),
+ locked: require('./locked.png'),
+ more: require('./more.png'),
+ mute: require('./mute.png'),
+ muted: require('./muted.png'),
+ shareOn: require('./share-on.png'),
+ shareOff: require('./share-off.png'),
+ speakerOn: require('./speaker-on.png'),
+ speakerOff: require('./speaker-off.png'),
+ switchCamera: require('./switch-camera.png'),
+ hamburger: require('./hamburger.png'),
+ questionBalloon: require('./question-ballon.png'),
+ talking: require('./talking.png'),
+ unmute: require('./unmute.png'),
+ unlocked: require('./unlocked.png'),
+ videoOn: require('./video-on.png'),
+ videoOff: require('./video-off.png'),
+};
+
+export type IconTypes = keyof typeof icons;
diff --git a/assets/images/zoom/locked@2x.png b/assets/images/zoom/locked@2x.png
new file mode 100644
index 00000000..c6d98060
Binary files /dev/null and b/assets/images/zoom/locked@2x.png differ
diff --git a/assets/images/zoom/locked@3x.png b/assets/images/zoom/locked@3x.png
new file mode 100644
index 00000000..170f6e22
Binary files /dev/null and b/assets/images/zoom/locked@3x.png differ
diff --git a/assets/images/zoom/more@2x.png b/assets/images/zoom/more@2x.png
new file mode 100644
index 00000000..e98bc18e
Binary files /dev/null and b/assets/images/zoom/more@2x.png differ
diff --git a/assets/images/zoom/more@3x.png b/assets/images/zoom/more@3x.png
new file mode 100644
index 00000000..e69710c6
Binary files /dev/null and b/assets/images/zoom/more@3x.png differ
diff --git a/assets/images/zoom/mute@2x.png b/assets/images/zoom/mute@2x.png
new file mode 100644
index 00000000..65b555a6
Binary files /dev/null and b/assets/images/zoom/mute@2x.png differ
diff --git a/assets/images/zoom/mute@3x.png b/assets/images/zoom/mute@3x.png
new file mode 100644
index 00000000..da7b29c3
Binary files /dev/null and b/assets/images/zoom/mute@3x.png differ
diff --git a/assets/images/zoom/muted@2x.png b/assets/images/zoom/muted@2x.png
new file mode 100644
index 00000000..35043632
Binary files /dev/null and b/assets/images/zoom/muted@2x.png differ
diff --git a/assets/images/zoom/muted@3x.png b/assets/images/zoom/muted@3x.png
new file mode 100644
index 00000000..808ef3e9
Binary files /dev/null and b/assets/images/zoom/muted@3x.png differ
diff --git a/assets/images/zoom/question-ballon@2x.png b/assets/images/zoom/question-ballon@2x.png
new file mode 100644
index 00000000..ba79fd3f
Binary files /dev/null and b/assets/images/zoom/question-ballon@2x.png differ
diff --git a/assets/images/zoom/question-ballon@3x.png b/assets/images/zoom/question-ballon@3x.png
new file mode 100644
index 00000000..019c69de
Binary files /dev/null and b/assets/images/zoom/question-ballon@3x.png differ
diff --git a/assets/images/zoom/share-off@2x.png b/assets/images/zoom/share-off@2x.png
new file mode 100644
index 00000000..1dba94cb
Binary files /dev/null and b/assets/images/zoom/share-off@2x.png differ
diff --git a/assets/images/zoom/share-off@3x.png b/assets/images/zoom/share-off@3x.png
new file mode 100644
index 00000000..46989fea
Binary files /dev/null and b/assets/images/zoom/share-off@3x.png differ
diff --git a/assets/images/zoom/share-on@2x.png b/assets/images/zoom/share-on@2x.png
new file mode 100644
index 00000000..285118e0
Binary files /dev/null and b/assets/images/zoom/share-on@2x.png differ
diff --git a/assets/images/zoom/share-on@3x.png b/assets/images/zoom/share-on@3x.png
new file mode 100644
index 00000000..9ed57131
Binary files /dev/null and b/assets/images/zoom/share-on@3x.png differ
diff --git a/assets/images/zoom/speaker-off.png b/assets/images/zoom/speaker-off.png
new file mode 100644
index 00000000..9763a5a7
Binary files /dev/null and b/assets/images/zoom/speaker-off.png differ
diff --git a/assets/images/zoom/speaker-on.png b/assets/images/zoom/speaker-on.png
new file mode 100644
index 00000000..f3355ba0
Binary files /dev/null and b/assets/images/zoom/speaker-on.png differ
diff --git a/assets/images/zoom/switch-camera.png b/assets/images/zoom/switch-camera.png
new file mode 100644
index 00000000..5927b7b7
Binary files /dev/null and b/assets/images/zoom/switch-camera.png differ
diff --git a/assets/images/zoom/talking@2x.png b/assets/images/zoom/talking@2x.png
new file mode 100644
index 00000000..676d61dd
Binary files /dev/null and b/assets/images/zoom/talking@2x.png differ
diff --git a/assets/images/zoom/talking@3x.png b/assets/images/zoom/talking@3x.png
new file mode 100644
index 00000000..7028a357
Binary files /dev/null and b/assets/images/zoom/talking@3x.png differ
diff --git a/assets/images/zoom/unlocked@2x.png b/assets/images/zoom/unlocked@2x.png
new file mode 100644
index 00000000..aa5403e2
Binary files /dev/null and b/assets/images/zoom/unlocked@2x.png differ
diff --git a/assets/images/zoom/unlocked@3x.png b/assets/images/zoom/unlocked@3x.png
new file mode 100644
index 00000000..25f9390f
Binary files /dev/null and b/assets/images/zoom/unlocked@3x.png differ
diff --git a/assets/images/zoom/unmute@2x.png b/assets/images/zoom/unmute@2x.png
new file mode 100644
index 00000000..4c6d2393
Binary files /dev/null and b/assets/images/zoom/unmute@2x.png differ
diff --git a/assets/images/zoom/unmute@3x.png b/assets/images/zoom/unmute@3x.png
new file mode 100644
index 00000000..dad68fac
Binary files /dev/null and b/assets/images/zoom/unmute@3x.png differ
diff --git a/assets/images/zoom/video-off@2x.png b/assets/images/zoom/video-off@2x.png
new file mode 100644
index 00000000..3e209dd7
Binary files /dev/null and b/assets/images/zoom/video-off@2x.png differ
diff --git a/assets/images/zoom/video-off@3x.png b/assets/images/zoom/video-off@3x.png
new file mode 100644
index 00000000..06674059
Binary files /dev/null and b/assets/images/zoom/video-off@3x.png differ
diff --git a/assets/images/zoom/video-on@2x.png b/assets/images/zoom/video-on@2x.png
new file mode 100644
index 00000000..cdd85446
Binary files /dev/null and b/assets/images/zoom/video-on@2x.png differ
diff --git a/assets/images/zoom/video-on@3x.png b/assets/images/zoom/video-on@3x.png
new file mode 100644
index 00000000..03e69760
Binary files /dev/null and b/assets/images/zoom/video-on@3x.png differ
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 47198fbc..a012e30c 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -194,6 +194,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */,
+ 294E280337160E3088FD37C0 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -210,7 +211,8 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1430;
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -254,6 +256,24 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 294E280337160E3088FD37C0 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
+ "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputPaths = (
+ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/permission_handler_apple_privacy.bundle",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -318,7 +338,6 @@
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework",
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
- "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework",
@@ -344,7 +363,7 @@
"${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
- "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
+ "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework",
"${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
@@ -356,7 +375,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework",
@@ -382,7 +400,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
@@ -456,6 +474,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -466,6 +485,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -474,7 +494,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -539,6 +559,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -549,6 +570,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -563,7 +585,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -594,6 +616,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -604,6 +627,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -612,10 +636,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
@@ -637,7 +662,10 @@
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 00000000..f9b0d7c5
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 4ba725f4..0b02bfc6 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
+
+
+
+ PreviewsEnabled
+
+
+
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
new file mode 100644
index 00000000..dc9ada47
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 00000000..86a7c3b1
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart
index 6794d92d..5747ccb4 100644
--- a/lib/client/base_app_client.dart
+++ b/lib/client/base_app_client.dart
@@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/service/NavigationService.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart';
+import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/exception_report.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:flutter/cupertino.dart';
@@ -24,11 +25,11 @@ class BaseAppClient {
//TODO change the post fun to nun static when you change all service
post(String endPoint,
{Map? body,
- required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- bool isAllowAny = false,
- bool isLiveCare = false,
- bool isFallLanguage = false}) async {
+ required Function(dynamic response, int statusCode) onSuccess,
+ required Function(String error, int statusCode) onFailure,
+ bool isAllowAny = false,
+ bool isLiveCare = false,
+ bool isFallLanguage = false}) async {
String url;
if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint;
@@ -45,7 +46,9 @@ class BaseAppClient {
if (body == null || body['DoctorID'] == null) {
body!['DoctorID'] = doctorProfile.doctorID;
}
- if (body['DoctorID'] == "") body['DoctorID'] = doctorProfile.doctorID; // changed from null; because create update episode not working
+ if (body['DoctorID'] == "")
+ body['DoctorID'] = doctorProfile
+ .doctorID; // changed from null; because create update episode not working
if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile.doctorID;
if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile.projectID;
@@ -61,8 +64,8 @@ class BaseAppClient {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
- ? body['SetupID']
- : await sharedPref.getString(DOCTOR_SETUP_ID)
+ ? body['SetupID']
+ : await sharedPref.getString(DOCTOR_SETUP_ID)
: await sharedPref.getString(DOCTOR_SETUP_ID);
if (body['EditedBy'] == '') {
@@ -91,16 +94,21 @@ class BaseAppClient {
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) {
- body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
+ body['VidaAuthTokenID'] =
+ await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
}
if (body['VidaRefreshTokenID'] == null) {
- body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
+ body['VidaRefreshTokenID'] =
+ await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
}
int? projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true;
- else if ((body.containsKey('facilityId') && body['facilityId'] == 2 || body['facilityId'] == 3) || body['ProjectID'] == 2 || body['ProjectID'] == 3)
+ else if ((body.containsKey('facilityId') && body['facilityId'] == 2 ||
+ body['facilityId'] == 3) ||
+ body['ProjectID'] == 2 ||
+ body['ProjectID'] == 3)
body['PatientOutSA'] = true;
else
body['PatientOutSA'] = false;
@@ -127,29 +135,47 @@ class BaseAppClient {
var asd = json.encode(body);
var asd2;
if (await Utils.checkConnection()) {
- final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
+ final response = await http.post(Uri.parse(url),
+ body: json.encode(body),
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json'
+ });
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: "$statusCode");
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: "$statusCode");
} else {
var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) {
- helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
+ helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
+ parsed['AndroidLink'], parsed['IOSLink']);
}
if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
- if(parsed['ErrorCode'] =='699'){
- onSuccess(parsed, statusCode);
- }else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: getError(parsed));
- onFailure(getError(parsed), statusCode);
- }
+ if (parsed['ErrorCode'] == '699') {
+ onSuccess(parsed, statusCode);
+ } else {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: getError(parsed));
+ onFailure(getError(parsed), statusCode);
+ }
} else if (!isAllowAny) {
- await Provider.of(AppGlobal.CONTEX, listen: false).logout();
+ await Provider.of(AppGlobal.CONTEX,
+ listen: false)
+ .logout();
//todo nofailure is placed here and but have to handle the response here as well
Utils.showErrorToast('Your session expired Please login again');
locator().pushNamedAndRemoveUntil(ROOT);
@@ -159,18 +185,38 @@ class BaseAppClient {
}
} else if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated']) {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: getError(parsed));
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: getError(parsed));
onFailure(getError(parsed), statusCode);
} else
onSuccess(parsed, statusCode);
} else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: getError(parsed));
- onFailure(getError(parsed), statusCode);
+ final validations = parsed['ValidationErrorsCSI']?['errors']?['Validations'];
+
+ if (validations is List && validations.isNotEmpty) {
+ final error = validations.first['Error'];
+ if (error != null) {
+ onFailure(error, statusCode);
+ return;
+ }
+ }
+ if (body['DoctorID'] != null) {
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: getError(parsed));
+ }
+ onFailure(getError(parsed), statusCode);
+ }
}
- }
- } else {
+ } else {
onFailure('Please Check The Internet Connection', -1);
}
} catch (e) {
@@ -179,202 +225,264 @@ class BaseAppClient {
}
}
- postPatient(String endPoint,
- {Map? body,
- required Function(dynamic response, int statusCode) onSuccess,
- required Function(String error, int statusCode) onFailure,
- PatiantInformtion? patient,
- bool isExternal = false}) async {
+ postPatient(String endPoint,
+ {Map? body,
+ required Function(dynamic response, int statusCode) onSuccess,
+ required Function(String error, int statusCode) onFailure,
+ PatiantInformtion? patient,
+ bool isExternal = false}) async {
String url = BASE_URL + endPoint;
try {
- Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
-
- String? token = await sharedPref.getString(TOKEN);
- Map? profile = await sharedPref.getObj(DOCTOR_PROFILE);
-
- if (profile != null) {
- DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
- if (body!['DoctorID'] == null) {
- body['DoctorID'] = doctorProfile.doctorID;
- }
- }
- if (body!['DoctorID'] == 0) {
- body['DoctorID'] = null;
- }
- var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
- body['SetupID'] = body!.containsKey('SetupID')
- ? body['SetupID'] != null
- ? body['SetupID']
- : await sharedPref.getString(DOCTOR_SETUP_ID)
- : await sharedPref.getString(DOCTOR_SETUP_ID);
-
- body['VersionID'] = VERSION_ID;
- body['Channel'] = CHANNEL;
- body['LanguageID'] = languageID == 'ar' ? 1 : 2;
-
- body['IPAdress'] = "10.20.10.20";
- body['generalid'] = GENERAL_ID;
- body['PatientOutSA'] = body.containsKey('PatientOutSA')
- ? body['PatientOutSA'] != null
- ? body['PatientOutSA']
- : PATIENT_OUT_SA_PATIENT_REQ
- : PATIENT_OUT_SA_PATIENT_REQ;
-
- if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
- }
-
- body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
-
- body['PatientType'] = body.containsKey('PatientType')
- ? body['PatientType'] != null
- ? body['PatientType']
- : patient!.patientType != null
- ? patient.patientType
- : PATIENT_TYPE
- : PATIENT_TYPE;
-
- body['PatientTypeID'] = body.containsKey('PatientTypeID')
- ? body['PatientTypeID'] != null
- ? body['PatientTypeID']
- : patient!.patientType != null
- ? patient.patientType
- : PATIENT_TYPE_ID
- : PATIENT_TYPE_ID;
-
- body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token;
- body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN;
-
- body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
- body['SessionID'] = SESSION_ID; //getSe
-
- int? projectID = await sharedPref.getInt(PROJECT_ID);
- if (projectID == 2 || projectID == 3)
- body['PatientOutSA'] = true;
- else
- body['PatientOutSA'] = false;
-
- // if(!body.containsKey('ProjectID')) {
- // if (projectID != null) {
- // body['ProjectID'] = 313;
- // } else {
- // body['ProjectID'] = 0;
- // }
- // }
-
- // body['DoctorID'] = 24; //3844083
- // body['TokenID'] = "@dm!n";
-
- print("URL : $url");
- print("Body : ${json.encode(body)}");
- var asd = json.encode(body);
- var asd2;
- if (await Utils.checkConnection()) {
- final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
- final int statusCode = response.statusCode;
- print("statusCode :$statusCode");
- if (statusCode < 200 || statusCode >= 400 || json == null) {
- onFailure('Error While Fetching data', statusCode);
- } else {
- // var parsed = json.decode(response.body.toString());
- var parsed = json.decode(utf8.decode(response.bodyBytes));
- 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);
- } else if (parsed['MessageStatus'] == 1) {
- onSuccess(parsed, statusCode);
- } else if (parsed['Result'] == 'OK') {
- onSuccess(parsed, statusCode);
- } else {
- if (parsed != null) {
- onSuccess(parsed, statusCode);
- } else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: getError(parsed));
- onFailure(getError(parsed), statusCode);
- }
- }
- } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
- onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
- if (parsed['SameClinicApptList'] != null) {
- onSuccess(parsed, statusCode);
- } else {
- if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
- if (parsed['ErrorSearchMsg'] == null) {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: "Server Error found with no available message");
-
- onFailure("Server Error found with no available message", statusCode);
- } else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: parsed['ErrorSearchMsg']);
- onFailure(parsed['ErrorSearchMsg'], statusCode);
- }
- } else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
- onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
- }
- }
- } else {
- if (parsed['SameClinicApptList'] != null) {
- onSuccess(parsed, statusCode);
- } else {
- if (parsed['message'] != null) {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: parsed['message'] );
-
- onFailure(parsed['message'] ?? parsed['message'], statusCode);
- } else {
- if(body['DoctorID'] !=null )
- postFailureResponse(doctorId:body['DoctorID'], url:url , request: json.encode(body), response: response.body, exception: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
+ Map headers = {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json'
+ };
+
+ String? token = await sharedPref.getString(TOKEN);
+ Map? profile = await sharedPref.getObj(DOCTOR_PROFILE);
+
+ if (profile != null) {
+ DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
+ if (body!['DoctorID'] == null) {
+ body['DoctorID'] = doctorProfile.doctorID;
+ }
+ }
+ if (body!['DoctorID'] == 0) {
+ body['DoctorID'] = null;
+ }
+ var languageID =
+ await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
+ body['SetupID'] = body!.containsKey('SetupID')
+ ? body['SetupID'] != null
+ ? body['SetupID']
+ : await sharedPref.getString(DOCTOR_SETUP_ID)
+ : await sharedPref.getString(DOCTOR_SETUP_ID);
+
+ body['VersionID'] = VERSION_ID;
+ body['Channel'] = CHANNEL;
+ body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+
+ body['IPAdress'] = "10.20.10.20";
+ body['generalid'] = GENERAL_ID;
+ body['PatientOutSA'] = body.containsKey('PatientOutSA')
+ ? body['PatientOutSA'] != null
+ ? body['PatientOutSA']
+ : PATIENT_OUT_SA_PATIENT_REQ
+ : PATIENT_OUT_SA_PATIENT_REQ;
+
+ if (body.containsKey('isDentalAllowedBackend')) {
+ body['isDentalAllowedBackend'] =
+ body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
+ }
- onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
- }
- }
- }
- }
- }
- } else {
- onFailure('Please Check The Internet Connection', -1);
- }
+ body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
+
+ body['PatientType'] = body.containsKey('PatientType')
+ ? body['PatientType'] != null
+ ? body['PatientType']
+ : patient!.patientType != null
+ ? patient.patientType
+ : PATIENT_TYPE
+ : PATIENT_TYPE;
+
+ body['PatientTypeID'] = body.containsKey('PatientTypeID')
+ ? body['PatientTypeID'] != null
+ ? body['PatientTypeID']
+ : patient!.patientType != null
+ ? patient.patientType
+ : PATIENT_TYPE_ID
+ : PATIENT_TYPE_ID;
+
+ body['TokenID'] =
+ body.containsKey('TokenID') ? body['TokenID'] ?? token : token;
+ body['PatientID'] = body['PatientID'] != null
+ ? body['PatientID']
+ : patient!.patientId ?? patient.patientMRN;
+
+ body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
+ body['SessionID'] = SESSION_ID; //getSe
+
+ int? projectID = await sharedPref.getInt(PROJECT_ID);
+ if (projectID == 2 || projectID == 3)
+ body['PatientOutSA'] = true;
+ else
+ body['PatientOutSA'] = false;
+
+ // if(!body.containsKey('ProjectID')) {
+ // if (projectID != null) {
+ // body['ProjectID'] = 313;
+ // } else {
+ // body['ProjectID'] = 0;
+ // }
+ // }
+
+ // body['DoctorID'] = 24; //3844083
+ // body['TokenID'] = "@dm!n";
+
+ print("URL : $url");
+ print("Body : ${json.encode(body)}");
+ var asd = json.encode(body);
+ var asd2;
+ if (await Utils.checkConnection()) {
+ final response = await http.post(Uri.parse(url.trim()),
+ body: json.encode(body), headers: headers);
+ final int statusCode = response.statusCode;
+ print("statusCode :$statusCode");
+ if (statusCode < 200 || statusCode >= 400 || json == null) {
+ onFailure('Error While Fetching data', statusCode);
+ } else {
+ // var parsed = json.decode(response.body.toString());
+ var parsed = json.decode(utf8.decode(response.bodyBytes));
+ 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);
+ } else if (parsed['MessageStatus'] == 1) {
+ onSuccess(parsed, statusCode);
+ } else if (parsed['Result'] == 'OK') {
+ onSuccess(parsed, statusCode);
+ } else {
+ if (parsed != null) {
+ onSuccess(parsed, statusCode);
+ } else {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: getError(parsed));
+ onFailure(getError(parsed), statusCode);
+ }
+ }
+ } else if (parsed['MessageStatus'] == 1 ||
+ parsed['SMSLoginRequired'] == true) {
+ onSuccess(parsed, statusCode);
+ } else if (parsed['MessageStatus'] == 2 &&
+ parsed['IsAuthenticated']) {
+ if (parsed['SameClinicApptList'] != null) {
+ onSuccess(parsed, statusCode);
+ } else {
+ if (parsed['message'] == null &&
+ parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['ErrorSearchMsg'] == null) {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception:
+ "Server Error found with no available message");
+
+ onFailure("Server Error found with no available message",
+ statusCode);
+ } else {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: parsed['ErrorSearchMsg']);
+ onFailure(parsed['ErrorSearchMsg'], statusCode);
+ }
+ } else {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: parsed['message'] ??
+ parsed['ErrorEndUserMessage'] ??
+ parsed['ErrorMessage']);
+ onFailure(
+ parsed['message'] ??
+ parsed['ErrorEndUserMessage'] ??
+ parsed['ErrorMessage'],
+ statusCode);
+ }
+ }
+ } else {
+ if (parsed['SameClinicApptList'] != null) {
+ onSuccess(parsed, statusCode);
+ } else {
+ if (parsed['message'] != null) {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: parsed['message']);
+
+ onFailure(parsed['message'] ?? parsed['message'], statusCode);
+ } else {
+ if (body['DoctorID'] != null)
+ postFailureResponse(
+ doctorId: body['DoctorID'],
+ url: url,
+ request: json.encode(body),
+ response: response.body,
+ exception: parsed['ErrorEndUserMessage'] ??
+ parsed['ErrorMessage']);
+
+ onFailure(
+ parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
+ statusCode);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ onFailure('Please Check The Internet Connection', -1);
+ }
} catch (e) {
- print(e);
- onFailure(e.toString(), -1);
+ print(e);
+ onFailure(e.toString(), -1);
+ }
}
- }
- String getError(parsed) {
+ String getError(parsed) {
//TODO change this fun
String? error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'];
if (parsed["ValidationErrors"] != null) {
- error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
-
- if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
- for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) {
- error = error! + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n";
- }
- }
+ error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
+
+ if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
+ parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
+ for (var i = 0;
+ i < parsed["ValidationErrors"]["ValidationErrors"].length;
+ i++) {
+ error = error! +
+ parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
+ "\n";
+ }
+ }
}
if (error == null || error == "null" || error == "null\n") {
- return Utils.generateContactAdminMsg();
+ return Utils.generateContactAdminMsg();
}
return error;
- }
+ }
- get({required String endPoint, required Function(dynamic response, int statusCode) onSuccess, required Function(String error, int statusCode) onFailure}) async {
+ get(
+ {required String endPoint,
+ required Function(dynamic response, int statusCode) onSuccess,
+ required Function(String error, int statusCode) onFailure}) async {
String token = await sharedPref.getString(TOKEN);
String url = DOCTOR_ROTATION + endPoint + '&token=' + token;
print(url);
@@ -382,10 +490,10 @@ class BaseAppClient {
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
- onFailure(Utils.generateContactAdminMsg(), statusCode);
+ onFailure(Utils.generateContactAdminMsg(), statusCode);
} else {
- var parsed = json.decode(response.body.toString());
- onSuccess(parsed, statusCode);
+ var parsed = json.decode(response.body.toString());
+ onSuccess(parsed, statusCode);
+ }
}
}
-}
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 8aec8ae0..9effc423 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -7,9 +7,9 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
-const BASE_URL = 'https://hmgwebservices.com/';
+// const BASE_URL = 'https://hmgwebservices.com/';
-// const BASE_URL = 'https://uat.hmgwebservices.com/';
+const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://webservices.hmg.com/';
@@ -285,6 +285,88 @@ const DOCTOR_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/
const ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/Acknowledgeradcriticalfindings";
+
+ /*vida plus API */
+
+const PATIENT_ALLERGIES = 'Services/DoctorApplication.svc/REST/PatientAllergies';
+
+const SEARCH_ALLERGIES = 'Services/DoctorApplication.svc/REST/SearchAllergies';
+
+const POST_ALLERGIES = 'Services/DoctorApplication.svc/REST/PostAllergies';
+
+const CREATE_HOPI = 'Services/DoctorApplication.svc/REST/CreateHOPI';
+
+const HOPI_DETAILS = 'Services/DoctorApplication.svc/REST/DetailHOPI';
+
+const POST_CHIEF_COMPLAINT_VP = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
+
+const SEARCH_CHIEF_COMPLAINT_VP = 'Services/DoctorApplication.svc/REST/SearchChiefcomplaint';
+
+const RESOLVE_ALLERGIES = 'Services/DoctorApplication.svc/REST/ResolveAllergy';
+
+const UPDATE_ALLERGIES = 'Services/DoctorApplication.svc/REST/UpdateAllergy';
+
+const GET_CHIEF_COMPLAINT_VP = 'Services/DoctorApplication.svc/REST/ChiefComplaintDetails';
+
+const SEARCH_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/SearchDiagnosis';
+
+const DIAGNOSIS_TYPE = 'Services/DoctorApplication.svc/REST/DiagnosisType';
+
+const CONDITION_TYPE = 'Services/DoctorApplication.svc/REST/DiagnosisCondition';
+
+const CREATE_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/CreateDiagnosis';
+
+const PREVIOUS_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisPreviousDetails';
+
+const AUDIT_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisAudit';
+
+const REMOVE_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisRemove';
+
+const FAVORITE_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisGetFavourite';
+
+const ADD_TO_FAVORITE_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisAddFavourite';
+
+const MAKE_PREVIOUS_AS_CURRENT_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/ContinuePreviousEpisode';
+
+const SEARCH_PHYSICAL_EXAMINATION = 'Services/DoctorApplication.svc/REST/SearchPhysicalExam';
+
+const GET_GENERAL_SPECIALITY = 'Services/DoctorApplication.svc/REST/GetGeneralSpeciality';
+
+const GET_SPECIALITY_DETAILS = 'Services/DoctorApplication.svc/REST/SearchGeneralSpeciality';
+
+const POST_PHYSICAL_EXAMINATION = 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
+
+const GET_PROGRESS_NOTE_NEW = 'Services/DoctorApplication.svc/REST/GetProgressNote';
+
+const GET_LIST_OF_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisDetailsSearch';
+
+const EDIT_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/EditDiagnosis';
+
+const RESOLVE_DIAGNOSIS = 'Services/DoctorApplication.svc/REST/DiagnosisResolve';
+const GET_CLINIC = 'Services/DoctorApplication.svc/REST/GetDoctorClinicsForVidaPlus';
+
+const CONTINUE_EPISODE_VP = 'Services/DoctorApplication.svc/REST/ContinueEpisode';
+
+const UPDATE_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/UpdateChiefComplaint';
+
+const EPISODE_BY_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/EpisodeByChiefcomplaint';
+
+const GET_EDIT_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergy';
+
+const GET_HOME_MEDICATION = 'Services/DoctorApplication.svc/REST/GetHomeMedication';
+
+const SEARCH_CURRENT_MEDICATION = 'Services/DoctorApplication.svc/REST/SearchFormulary';
+
+const SEARCH_CURRENT_MEDICATION_DETAILS = 'Services/DoctorApplication.svc/REST/GetFormularyMaster';
+
+const REMOVE_CURRENT_MEDICATION = 'Services/DoctorApplication.svc/REST/DeleteHomeMedication';
+
+const ADD_CURRENT_MEDICATION = 'Services/DoctorApplication.svc/REST/AddHomeMedication';
+
+const CREATE_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PostProgressNote';
+
+const GET_PATIENT_CLINIC = 'Services/DoctorApplication.svc/REST/GetPatientConditionProgress';
+
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index c31788f9..fca9679f 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -254,6 +254,7 @@ const Map> localizedValues = {
"beingBad": {"en": "being bad", "ar": "سيء"},
"beingGreat": {"en": "being great", "ar": "رائع"},
"cancel": {"en": "CANCEL", "ar": "الغاء"},
+ "cancelSmall": {"en": "Cancel", "ar": "الغاء"},
"ok": {"en": "OK", "ar": "موافق"},
"done": {"en": "DONE", "ar": "تأكيد"},
"resumecall": {"en": "Resume call", "ar": "استئناف المكالمة"},
@@ -484,6 +485,7 @@ const Map> localizedValues = {
"ar": "ملاحظات على نوع النظام الغذائي"
},
"save": {"en": "SAVE", "ar": "حفظ"},
+ "saveSmall": {"en": "Save", "ar": "حفظ"},
"postPlansEstimatedCost": {
"en": "POST PLANS & ESTIMATED COST",
"ar": "خطط ما بعد العملية والتكلفة المقدرة"
@@ -677,6 +679,7 @@ const Map> localizedValues = {
"progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"},
"addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"},
"createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "},
+ "createdOn": {"en": "Created On :", "ar": "تم إنشاؤه في: "},
"riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"},
"editedBy": {"en": "Edited By :", "ar": "عدلت من : "},
"currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"},
@@ -1160,7 +1163,72 @@ const Map> localizedValues = {
"afterOrderCreation": {"en": "After order created, you cannot modify the principal diagnosis, Do you want to continue?", "ar":"بعد إنشاء الطلب، لا يمكنك تعديل التشخيص الأساسي، هل تريد المتابعة؟"},
"principalCoveredOrNot": {"en": "Principal Diagnosis is not covered for this patient", "ar":"لا يتم تغطية التشخيص الرئيسي لهذا المريض"},
"complexDiagnosis": {"en": "Complex Diagnosis", "ar":"التشخيص المعقد"},
+ "noComplaintsFound": {"en": "No Chief Complaints added, please add it from the button above", "ar":"لم تتم إضافة شكاوى رئيسية ، يرجى إضافتها من الزر أعلاه"},
+ "noKnownAllergies": {"en": "No Known Allergies", "ar":"لا يوجد حساسية معروفة"},
+ "addChiefComplaint": {"en": "Add Chief Complaints*", "ar":"إضافة الشكاوى الرئيسية*"},
+ "myFavoriteList": {"en": "My Favourite List", "ar":"قائمتي المفضلة"},
+ "generalList": {"en": "General list", "ar":"قائمة عامة"},
+ "specialList": {"en": "Special List", "ar":"قائمة خاصة"},
+ "enterChiefCompliants": {"en": "Enter Chief Compliants", "ar":"أدخل رئيس الامتثال"},
+ "previousChiefCompaints": {"en": "Previous Chief Compaints", "ar":"رئيس الرسامين السابق"},
+ "listOfActiveEpisodes": {"en": "List of active episodes , select one to procedd", "ar":"قائمة الحلقات النشطة ، حدد واحدة لتقديمها"},
+ "select": {"en": "Select", "ar":"اختار"},
+ "resolve": {"en": "Resolve", "ar":"حسم"},
+ "audit": {"en": "Audit", "ar":"مراجعه الحسابات"},
+ "delete": {"en": "Delete", "ar":"حذف"},
+ "acute": {"en": "Acute", "ar":"شديد"},
+ "chronic": {"en": "Acute", "ar":"مزمن"},
+ "subAcute": {"en": "sub-acute", "ar":"شبه الحاد"},
+ "addDiagnosis": {"en": "Add Diagnosis", "ar":"إضافة تشخيص"},
+ "showAllDiagnosis": {"en": "Show all diagnosis", "ar":"عرض جميع التشخيصات"},
+ "makeCurrentDiagnosis": {"en": "Make Current Diagnosis", "ar":"جعل التشخيص الحالي"},
+ "mappedDiagnosis": {"en": "Mapped Diagnosis", "ar":"التشخيص المعين"},
+ "previousDiagnosis": {"en": "Previous Diagnosis", "ar":"التشخيص السابق"},
+ "addNewDiagnosis": {"en": "Add New Diagnosis", "ar":"إضافة تشخيص جديد"},
+ "currentDiagnosis": {"en": "Current Diagnosis", "ar":"التشخيص الحالي"},
+ "progressNoteType": {"en": "Progress Note Type", "ar":"نوع ملاحظة التقدم"},
+ "doctorProgressNote": {"en": "Doctor Progress Note", "ar":"مذكرة تقدم الطبيب"},
+ "addYourNote": {"en": "Add Your Note", "ar":"أضف ملاحظتك"},
+ "saveAsDraft": {"en": "Save As Draft", "ar":"حفظ كمسودة"},
+ "nurseNote": {"en": "Nurse Note", "ar":"ملاحظة الممرضة"},
+ "patientCondition": {"en": "Patient Condition", "ar":"حالة المريض"},
+ "examinationPart": {"en": "Examination Part", "ar":"جزء الامتحان"},
+ "historyOfIllness": {"en": "History of Present Illness*", "ar":"تاريخ المرض الحالي*"},
+ "historyTakenFrom": {"en": "History taken from", "ar":"التاريخ مأخوذ من"},
+ "familySpecify": {"en": "Family, Specify", "ar":"العائلة، حدد"},
+ "otherSpecify": {"en": "Other, Specify", "ar":"أخرى، حدد"},
+ "physicalExamination": {"en": "Physical Examination", "ar":"الفحص البدني"},
+ "addPhysicalExamination": {"en": "Add Physical Examination", "ar":"إضافة الفحص البدني"},
+ "noPhysicalExamination": {"en": "No Physical Examination added, please add it from the button above", "ar":"لم يتم إضافة فحص بدني ، يرجى إضافته من الزر أعلاه"},
+ "noProgressNote": {"en": "No Diagnosis added, please add it from the button above", "ar":"لم يتم إضافة تشخيص ، يرجى إضافته من الزر أعلاه"},
+ "mild": {"en": "Mild", "ar":"خفيف"},
+ "moderate": {"en": "Moderate", "ar":"معتدل"},
+ "remarksCanNotBeEmpty": {"en": "Remarks Can Not Be Empty", "ar":"لا يمكن أن تكون الملاحظات فارغة"},
+ "kindlySelectCategory": {"en": "Kindly Select Any Diagnosis Category", "ar":"يرجى اختيار أي فئة تشخيص"},
+ "noRemarks": {"en": "No Remarks", "ar":"لا ملاحظات"},
+ "event": {"en": "Event: ", "ar":"حدث: "},
+ "editDiagnosis": {"en": "Edit Diagnosis ", "ar":"تحرير التشخيص"},
+ "selectedDiagnosis": {"en": "Kindly Select Diagnosis", "ar":"يرجى اختيار التشخيص: "},
+ "selectConditionFirst": {"en": "Kindly Select Diagnosis Condition", "ar":"يرجى اختيار حالة التشخيص: "},
+ "deletedRemarks": {"en": "Deleted Remarks: ", "ar":"ملاحظات محذوفة: "},
+ "newValue": {"en": "New Value: ", "ar":"قيمة جديدة: "},
+ "fieldName": {"en": "Field Name: ", "ar":"اسم الحقل: "},
+ "noChangeRecorded": {"en": "No Change Recorded Unable To Perform Edit", "ar":"لم يتم تسجيل أي تغيير، غير قادر على إجراء التحرير"},
+ "oldValue": {"en": "Old Value: ", "ar":"القيمة القديمة: "},
+ "favoriteDiagnosis": {"en": "Favorite Diagnosis", "ar":"التشخيص المفضل"},
+ "addToFavorite": {"en": "Add To Favorite", "ar":"إضافة إلى المفضلة"},
+ "noDiagnosisFound": {"en": "No Diagnosis added, please add it from the button above", "ar":"لم يتم إضافة تشخيص ، يرجى إضافته من الزر أعلاه"},
+ "areYouSureYouWantToDeleteDiagnosis": {
+ "en": "Are you sure you want to delete diagnosis",
+ "ar": "هل أنت متأكد من أنك تريد حذف التشخيص"
+ },
+ "activate": {"en": "Activate", "ar":"فعل"},
+ "resolved": {"en": "Resolved", "ar":"تم الحل"},
+ "diagnosisAlreadyDeleted": {"en": "Diagnosis Already Deleted", "ar":"تم حذف التشخيص بالفعل"},
+ "diagnosisAlreadyResolved": {"en": "Diagnosis Already Resolved", "ar":"تم حل التشخيص بالفعل"},
+ "selectReaction": {"en": "Select Reaction", "ar":"حدد رد الفعل"},
+ "progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"ملاحظة التقدم لا يمكن أن تكون فارغة"},
};
diff --git a/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart b/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart
new file mode 100644
index 00000000..09a4d3cc
--- /dev/null
+++ b/lib/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart
@@ -0,0 +1,130 @@
+class AllergiesListVidaPlus {
+ int? allergyID;
+ String? allergyName;
+ List? allergyReactionDTOs;
+ int? allergyRevisionID;
+ String? allergyTypeCode;
+ int? allergyTypeID;
+ String? allergyTypeName;
+ int? hospitalGroupID;
+ int? hospitalID;
+ bool? isActive;
+ bool? isSnowMedAllergy;
+ String? snowMedCode;
+ String? remark;
+ AllergiesListVidaPlus(
+ {this.allergyID,
+ this.allergyName,
+ this.allergyReactionDTOs,
+ this.allergyRevisionID,
+ this.allergyTypeCode,
+ this.allergyTypeID,
+ this.allergyTypeName,
+ this.hospitalGroupID,
+ this.hospitalID,
+ this.isActive,
+ this.isSnowMedAllergy,
+ this.snowMedCode,
+ this.remark
+ });
+
+ AllergiesListVidaPlus.fromJson(Map json) {
+ allergyID = json['allergyID'];
+ allergyName = json['allergyName'];
+ if (json['allergyReactionDTOs'] != null) {
+ allergyReactionDTOs = [];
+ json['allergyReactionDTOs'].forEach((v) {
+ allergyReactionDTOs!.add(new AllergyReactionDTOs.fromJson(v));
+ });
+ }
+ allergyRevisionID = json['allergyRevisionID'];
+ allergyTypeCode = json['allergyTypeCode'];
+ allergyTypeID = json['allergyTypeID'];
+ allergyTypeName = json['allergyTypeName'];
+ hospitalGroupID = json['hospitalGroupID'];
+ hospitalID = json['hospitalID'];
+ isActive = json['isActive'];
+ isSnowMedAllergy = json['isSnowMedAllergy'];
+ snowMedCode = json['snowMedCode'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['allergyID'] = this.allergyID;
+ data['allergyName'] = this.allergyName;
+ if (this.allergyReactionDTOs != null) {
+ data['allergyReactionDTOs'] =
+ this.allergyReactionDTOs!.map((v) => v.toJson()).toList();
+ }
+ data['allergyRevisionID'] = this.allergyRevisionID;
+ data['allergyTypeCode'] = this.allergyTypeCode;
+ data['allergyTypeID'] = this.allergyTypeID;
+ data['allergyTypeName'] = this.allergyTypeName;
+ data['hospitalGroupID'] = this.hospitalGroupID;
+ data['hospitalID'] = this.hospitalID;
+ data['isActive'] = this.isActive;
+ data['isSnowMedAllergy'] = this.isSnowMedAllergy;
+ data['snowMedCode'] = this.snowMedCode;
+ return data;
+ }
+}
+
+class AllergyReactionDTOs {
+ int? allergyReactionID;
+ String? allergyReactionName;
+ int? allergyReactionRevisionID;
+ dynamic? hospitalGroupID;
+ int? hospitalID;
+ bool? isActive;
+ bool? isSelected =false;
+ int? dbCRUDOperation =1;
+ int? pomrid;
+ int? patientID;
+ int? allergyReactionMappingID = 0;
+ int? severity =1;
+ AllergyReactionDTOs(
+ {this.allergyReactionID,
+ this.allergyReactionName,
+ this.allergyReactionRevisionID,
+ this.hospitalGroupID,
+ this.hospitalID,
+ this.isActive,
+ this.isSelected,
+ this.dbCRUDOperation,
+ this.pomrid,
+ this.patientID,
+ this.allergyReactionMappingID,
+ this.severity =1
+ });
+
+ AllergyReactionDTOs.fromJson(Map json) {
+ allergyReactionID = json['allergyReactionID'];
+ allergyReactionName = json['allergyReactionName'];
+ allergyReactionRevisionID = json['allergyReactionRevisionID'];
+ hospitalGroupID = json['hospitalGroupID'];
+ hospitalID = json['hospitalID'];
+ isActive = json['isActive'];
+ dbCRUDOperation = json["DbCRUDOperation"];
+ pomrid = json['pomrid'];
+ patientID = json['patientID'];
+ allergyReactionMappingID = json['allergyReactionMappingID'];
+ severity = json['severity'];
+
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['allergyReactionID'] = this.allergyReactionID;
+ data['allergyReactionName'] = this.allergyReactionName;
+ data['allergyReactionRevisionID'] = this.allergyReactionRevisionID;
+ data['hospitalGroupID'] = this.hospitalGroupID;
+ data['hospitalID'] = this.hospitalID;
+ data['isActive'] = this.isActive;
+ data["DbCRUDOperation"] = this.dbCRUDOperation;
+ data['pomrid'] = this.pomrid;
+ data['patientID'] = patientID;
+ data['allergyReactionMappingID'] = this.allergyReactionMappingID;
+ data['severity'] = this.severity;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart b/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart
new file mode 100644
index 00000000..ce84f58b
--- /dev/null
+++ b/lib/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart
@@ -0,0 +1,128 @@
+class PatientAllergiesVidaPlus {
+ int? allergyID;
+ String? allergyName;
+ int? allergyTypeID;
+ String? allergyTypeName;
+ int? hospitalGroupID;
+ int? hospitalID;
+ bool? isActivePatientsAllergy;
+ int? patientID;
+ List? patientsAllergyReactionsDTOs;
+ int? patientsAllergyRevisionID;
+ int? pomrID;
+ String? remark;
+
+ PatientAllergiesVidaPlus(
+ {this.allergyID,
+ this.allergyName,
+ this.allergyTypeID,
+ this.allergyTypeName,
+ this.hospitalGroupID,
+ this.hospitalID,
+ this.isActivePatientsAllergy,
+ this.patientID,
+ this.patientsAllergyReactionsDTOs,
+ this.patientsAllergyRevisionID,
+ this.pomrID,
+ this.remark});
+
+ PatientAllergiesVidaPlus.fromJson(Map json) {
+ allergyID = json['allergyID'];
+ allergyName = json['allergyName'];
+ allergyTypeID = json['allergyTypeID'];
+ allergyTypeName = json['allergyTypeName'];
+ hospitalGroupID = json['hospitalGroupID'];
+ hospitalID = json['hospitalID'];
+ isActivePatientsAllergy = json['isActivePatientsAllergy'];
+ patientID = json['patientID'];
+ if (json['patientsAllergyReactionsDTOs'] != null) {
+ patientsAllergyReactionsDTOs = [];
+ json['patientsAllergyReactionsDTOs'].forEach((v) {
+ patientsAllergyReactionsDTOs!
+ .add(new PatientsAllergyReactionsDTOs.fromJson(v));
+ });
+ }
+ patientsAllergyRevisionID = json['patientsAllergyRevisionID'];
+ pomrID = json['pomrID'];
+ remark = json['remark'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['allergyID'] = this.allergyID;
+ data['allergyName'] = this.allergyName;
+ data['allergyTypeID'] = this.allergyTypeID;
+ data['allergyTypeName'] = this.allergyTypeName;
+ data['hospitalGroupID'] = this.hospitalGroupID;
+ data['hospitalID'] = this.hospitalID;
+ data['isActivePatientsAllergy'] = this.isActivePatientsAllergy;
+ data['patientID'] = this.patientID;
+ if (this.patientsAllergyReactionsDTOs != null) {
+ data['patientsAllergyReactionsDTOs'] =
+ this.patientsAllergyReactionsDTOs!.map((v) => v.toJson()).toList();
+ }
+ data['patientsAllergyRevisionID'] = this.patientsAllergyRevisionID;
+ data['pomrID'] = this.pomrID;
+ data['remark'] = this.remark;
+ return data;
+ }
+}
+
+class PatientsAllergyReactionsDTOs {
+ int? allergyReactionID;
+ int? allergyReactionMappingID;
+ String? allergyReactionName;
+ int? hospitalGroupID;
+ int? hospitalID;
+ bool? isActive;
+ int? patientID;
+ int? patientsAllergyReactionRevisionID;
+ int? pomrId;
+ int? severity =1;
+ bool? isSelected =true;
+ String? reactionSelection ="";
+ PatientsAllergyReactionsDTOs(
+ {this.allergyReactionID,
+ this.allergyReactionMappingID,
+ this.allergyReactionName,
+ this.hospitalGroupID,
+ this.hospitalID,
+ this.isActive,
+ this.patientID,
+ this.patientsAllergyReactionRevisionID,
+ this.pomrId,
+ this.severity =1,
+ this.isSelected,
+ this.reactionSelection
+ });
+
+ PatientsAllergyReactionsDTOs.fromJson(Map json) {
+ allergyReactionID = json['allergyReactionID'];
+ allergyReactionMappingID = json['allergyReactionMappingID'];
+ allergyReactionName = json['allergyReactionName'];
+ hospitalGroupID = json['hospitalGroupID'];
+ hospitalID = json['hospitalID'];
+ isActive = json['isActive'];
+ patientID = json['patientID'];
+ patientsAllergyReactionRevisionID =
+ json['patientsAllergyReactionRevisionID'];
+ pomrId = json['pomrId'];
+ severity = json['severity'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['allergyReactionID'] = this.allergyReactionID;
+ data['allergyReactionMappingID'] = this.allergyReactionMappingID;
+ data['allergyReactionName'] = this.allergyReactionName;
+ data['hospitalGroupID'] = this.hospitalGroupID;
+ data['hospitalID'] = this.hospitalID;
+ data['isActive'] = this.isActive;
+ data['patientID'] = this.patientID;
+ data['patientsAllergyReactionRevisionID'] =
+ this.patientsAllergyReactionRevisionID;
+ data['pomrId'] = this.pomrId;
+ data['severity'] = this.severity;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/assessment/FavoriteDiseaseDetails.dart b/lib/core/model/SOAP/assessment/FavoriteDiseaseDetails.dart
new file mode 100644
index 00000000..19614800
--- /dev/null
+++ b/lib/core/model/SOAP/assessment/FavoriteDiseaseDetails.dart
@@ -0,0 +1,92 @@
+class FavoriteDiseaseDetails {
+ String? categoryCode;
+ int? categoryId;
+ String? chapterCode;
+ String? codeRange;
+ String? createdBy;
+ String? diseaseType;
+ String? diseases;
+ String? diseasesCode;
+ int? diseasesId;
+ int? favoritesId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ int? icdId;
+ String? icdSubVersion;
+ String? icdType;
+ String? icdVersion;
+ bool? isDeleted;
+ String? parentDiseasesCode;
+ String? problemCode;
+ String? problemDescription;
+ int? problemMasterId;
+ int? problemMasterRevisionId;
+ String? problemName;
+ String? problemType;
+ String? rowVersion;
+ String? sectionCode;
+ int? specificationId;
+
+ FavoriteDiseaseDetails.fromJson(Map json) {
+ categoryCode = json['CategoryCode'];
+ categoryId = json['CategoryId'];
+ chapterCode = json['ChapterCode'];
+ codeRange = json['CodeRange'];
+ createdBy = json['CreatedBy'];
+ diseaseType = json['DiseaseType'];
+ diseases = json['Diseases'];
+ diseasesCode = json['DiseasesCode'];
+ diseasesId = json['DiseasesId'];
+ favoritesId = json['FavoritesId'];
+ hospitalGroupId = json['HospitalGroupID'];
+ hospitalId = json['HospitalID'];
+ icdId = json['IcdId'];
+ icdSubVersion = json['IcdSubVersion'];
+ icdType = json['IcdType'];
+ icdVersion = json['IcdVersion'];
+ isDeleted = json['IsDeleted'];
+ parentDiseasesCode = json['ParentDiseasesCode'];
+ problemCode = json['ProblemCode'];
+ problemDescription = json['ProblemDescription'];
+ problemMasterId = json['ProblemMasterID'];
+ problemMasterRevisionId = json['ProblemMasterRevisionID'];
+ problemName = json['ProblemName'];
+ problemType = json['ProblemType'];
+ rowVersion = json['RowVersion'];
+ sectionCode = json['SectionCode'];
+ specificationId = json['SpecificationId'];
+ }
+
+ // toJson method
+ Map toJson() {
+ return {
+ 'CategoryCode': categoryCode,
+ 'CategoryId': categoryId,
+ 'ChapterCode': chapterCode,
+ 'CodeRange': codeRange,
+ 'CreatedBy': createdBy,
+ 'DiseaseType': diseaseType,
+ 'Diseases': diseases,
+ 'DiseasesCode': diseasesCode,
+ 'DiseasesId': diseasesId,
+ 'FavoritesId': favoritesId,
+ 'HospitalGroupID': hospitalGroupId,
+ 'HospitalID': hospitalId,
+ 'IcdId': icdId,
+ 'IcdSubVersion': icdSubVersion,
+ 'IcdType': icdType,
+ 'IcdVersion': icdVersion,
+ 'IsDeleted': isDeleted,
+ 'ParentDiseasesCode': parentDiseasesCode,
+ 'ProblemCode': problemCode,
+ 'ProblemDescription': problemDescription,
+ 'ProblemMasterID': problemMasterId,
+ 'ProblemMasterRevisionID': problemMasterRevisionId,
+ 'ProblemName': problemName,
+ 'ProblemType': problemType,
+ 'RowVersion': rowVersion,
+ 'SectionCode': sectionCode,
+ 'SpecificationId': specificationId,
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/assessment/audit_diagnosis.dart b/lib/core/model/SOAP/assessment/audit_diagnosis.dart
new file mode 100644
index 00000000..ac7abbdc
--- /dev/null
+++ b/lib/core/model/SOAP/assessment/audit_diagnosis.dart
@@ -0,0 +1,37 @@
+class AuditDiagnosis {
+ String? approvedBy;
+ String? approvedOn;
+ String? createdBy;
+ String? createdOn;
+ String? deletedBy;
+ String? deletedOn;
+ String? deletedRemarks;
+ String? diagnosisType;
+ bool? isEventIdentifiedExternally;
+ bool? isResolved;
+ String? modifiedBy;
+ String? modifiedOn;
+ int? patientId;
+ int? patientProblemRevisionId;
+ String? remarks;
+ String? status;
+
+ AuditDiagnosis.fromJson(Map json) {
+ approvedBy = json['approvedBy'];
+ approvedOn = json['approvedOn'];
+ createdBy = json['createdBy'];
+ createdOn = json['createdOn'];
+ deletedBy = json['deletedBy'];
+ deletedOn = json['deletedOn'];
+ deletedRemarks = json['deletedRemarks'];
+ diagnosisType = json['diagnosisType'];
+ isEventIdentifiedExternally = json['isEventIdentifiedExternally'];
+ isResolved = json['isResolved'];
+ modifiedBy = json['modifiedBy'];
+ modifiedOn = json['modifiedOn'];
+ patientId = json['patientId'];
+ patientProblemRevisionId = json['patientProblemRevisionId'];
+ remarks = json['remarks'];
+ status = json['status'];
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/assessment/diagnosis_type.dart b/lib/core/model/SOAP/assessment/diagnosis_type.dart
new file mode 100644
index 00000000..549342d0
--- /dev/null
+++ b/lib/core/model/SOAP/assessment/diagnosis_type.dart
@@ -0,0 +1,10 @@
+class DiagnosisType {
+ String? diagnosisType;
+ String? name;
+
+
+ DiagnosisType.fromJson(Map json) {
+ diagnosisType = json['diagnosisType'] ?? '';
+ name = json['name'] ?? '';
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/assessment/patient_previous_diagnosis.dart b/lib/core/model/SOAP/assessment/patient_previous_diagnosis.dart
new file mode 100644
index 00000000..99a50bf6
--- /dev/null
+++ b/lib/core/model/SOAP/assessment/patient_previous_diagnosis.dart
@@ -0,0 +1,287 @@
+class PatientPreviousDiagnosis {
+ bool? active;
+ int? admissionId;
+ int? admissionRequestId;
+ int? appointmentId;
+ String? approvedBy;
+ String? approvedOn;
+ int? assessmentId;
+ int? chiefComplainId;
+ int? clinicGroupId;
+ int? clinicId;
+ String? condition;
+ String? createdBy;
+ String? createdOn;
+ String? deletedBy;
+ String? deletedByDoctorName;
+ String? deletedOn;
+ String? deletedRemarks;
+ String? diagnosisType;
+ int? doctorId;
+ int? episodeId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ dynamic icdCodeDetailsDto;
+ String? icdSubVersion;
+ String? icdType;
+ dynamic icdVersion;
+ String? location;
+ String? loginUserId;
+ String? modifiedBy;
+ String? modifiedOn;
+ String? module;
+ String? parentLocation;
+ int? patientId;
+ dynamic patientProblemChangeHistories;
+ int? patientProblemId;
+ int? patientProblemRevisionId;
+ int? pomrId;
+ bool? previousProblem;
+ int? problemId;
+ String? problemName;
+ String? remarks;
+ bool? resolved;
+ String? selectedCategoryCode;
+ String? selectedChapterCode;
+ String? selectedDisease;
+ String? selectedIcdCode;
+ String? selectedSectionCode;
+ String? status;
+ List? visitWisePatientDiagnoses;
+ bool? visitWiseSelected;
+
+ PatientPreviousDiagnosis.fromJson(Map json) {
+ active = json['active'];
+ admissionId = json['admissionId'];
+ admissionRequestId = json['admissionRequestId'];
+ appointmentId = json['appointmentId'];
+ approvedBy = json['approvedBy'];
+ approvedOn = json['approvedOn'];
+ assessmentId = json['assessmentId'];
+ chiefComplainId = json['chiefComplainId'];
+ clinicGroupId = json['clinicGroupId'];
+ clinicId = json['clinicId'];
+ condition = json['condition'];
+ createdBy = json['createdBy'];
+ createdOn = json['createdOn'];
+ deletedBy = json['deletedBy'];
+ deletedByDoctorName = json['deletedByDoctorName'];
+ deletedOn = json['deletedOn'];
+ deletedRemarks = json['deletedRemarks'];
+ diagnosisType = json['diagnosisType'];
+ doctorId = json['doctorId'];
+ episodeId = json['episodeId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ icdCodeDetailsDto = json['icdCodeDetailsDto'];
+ icdSubVersion = json['icdSubVersion'];
+ icdType = json['icdType'];
+ icdVersion = json['icdVersion'];
+ location = json['location'];
+ loginUserId = json['loginUserId'];
+ modifiedBy = json['modifiedBy'];
+ modifiedOn = json['modifiedOn'];
+ module = json['module'];
+ parentLocation = json['parentLocation'];
+ patientId = json['patientId'];
+ patientProblemChangeHistories = json['patientProblemChangeHistories'];
+ patientProblemId = json['patientProblemId'];
+ patientProblemRevisionId = json['patientProblemRevisionId'];
+ pomrId = json['pomrId'];
+ previousProblem = json['previousProblem'];
+ problemId = json['problemId'];
+ problemName = json['problemName'];
+ remarks = json['remarks'];
+ resolved = json['resolved'];
+ selectedCategoryCode = json['selectedCategoryCode'];
+ selectedChapterCode = json['selectedChapterCode'];
+ selectedDisease = json['selectedDisease'];
+ selectedIcdCode = json['selectedIcdCode'];
+ selectedSectionCode = json['selectedSectionCode'];
+ status = json['status'];
+ visitWiseSelected = json['visitWiseSelected'];
+ if (json['visitWisePatientDiagnoses'] != null) {
+ visitWisePatientDiagnoses = [];
+ json['visitWisePatientDiagnoses'].forEach((v) {
+ visitWisePatientDiagnoses!.add(VisitWisePatientDiagnosis.fromJson(v));
+ });
+ }
+ }
+
+ Map toJson() {
+ return {
+ 'active': active,
+ 'admissionId': admissionId ?? 0,
+ 'admissionRequestId': admissionRequestId ?? 0,
+ 'appointmentId': appointmentId ?? 0,
+ 'approvedBy': approvedBy,
+ 'approvedOn': approvedOn,
+ 'assessmentId': assessmentId ?? 0,
+ 'chiefComplainId': chiefComplainId ?? 0,
+ 'clinicGroupId': clinicGroupId ?? 0,
+ 'clinicId': clinicId,
+ 'condition': condition,
+ 'createdBy': createdBy,
+ 'createdOn': createdOn,
+ 'deletedBy': deletedBy,
+ 'deletedByDoctorName': deletedByDoctorName,
+ 'deletedOn': deletedOn,
+ 'deletedRemarks': deletedRemarks,
+ 'diagnosisType': diagnosisType,
+ 'doctorId': doctorId,
+ 'episodeId': episodeId ?? 0,
+ 'hospitalGroupId': hospitalGroupId,
+ 'hospitalId': hospitalId,
+ 'icdCodeDetailsDto': icdCodeDetailsDto,
+ 'icdSubVersion': icdSubVersion,
+ 'icdType': icdType,
+ 'icdVersion': icdVersion,
+ 'location': location,
+ 'loginUserId': loginUserId,
+ 'modifiedBy': modifiedBy,
+ 'modifiedOn': modifiedOn,
+ 'module': module,
+ 'parentLocation': parentLocation,
+ 'patientId': patientId,
+ 'patientProblemChangeHistories': patientProblemChangeHistories,
+ 'patientProblemId': patientProblemId,
+ 'patientProblemRevisionId': patientProblemRevisionId,
+ 'pomrId': pomrId,
+ 'previousProblem': previousProblem,
+ 'problemId': problemId,
+ 'problemName': problemName,
+ 'remarks': remarks,
+ 'resolved': resolved,
+ 'selectedCategoryCode': selectedCategoryCode,
+ 'selectedChapterCode': selectedChapterCode,
+ 'selectedDisease': selectedDisease,
+ 'selectedIcdCode': selectedIcdCode,
+ 'selectedSectionCode': selectedSectionCode,
+ 'status': status,
+ 'visitWiseSelected': visitWiseSelected,
+ 'visitWisePatientDiagnoses': visitWisePatientDiagnoses?.map((v) => v.toJson()).toList(),
+ };
+ }
+}
+
+class VisitWisePatientDiagnosis {
+ bool? active;
+ int? admissionId;
+ int? appointmentId;
+ String? approvedBy;
+ String? approvedOn;
+ int? assessmentId;
+ int? clinicId;
+ String? condition;
+ String? createdBy;
+ String? createdOn;
+ String? deletedBy;
+ String? deletedOn;
+ String? deletedRemarks;
+ String? diagnosisType;
+ int? doctorId;
+ int? episodeId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? icdSubVersion;
+ String? icdType;
+ dynamic icdVersion;
+ bool? isPreviousProblem;
+ String? location;
+ String? loginUserId;
+ String? modifiedBy;
+ String? modifiedOn;
+ int? patientDiagnosisId;
+ int? patientId;
+ int? patientProblemRevisionId;
+ int? pomrId;
+ String? problemName;
+ String? remarks;
+ bool? resolved;
+ bool? selected;
+ String? selectedDisease;
+ int? selectedDoctorId;
+ String? selectedIcdCode;
+
+ VisitWisePatientDiagnosis.fromJson(Map json) {
+ active = json['active'];
+ admissionId = json['admissionId'];
+ appointmentId = json['appointmentId'];
+ approvedBy = json['approvedBy'];
+ approvedOn = json['approvedOn'];
+ assessmentId = json['assessmentId'];
+ clinicId = json['clinicId'];
+ condition = json['condition'];
+ createdBy = json['createdBy'];
+ createdOn = json['createdOn'];
+ deletedBy = json['deletedBy'];
+ deletedOn = json['deletedOn'];
+ deletedRemarks = json['deletedRemarks'];
+ diagnosisType = json['diagnosisType'];
+ doctorId = json['doctorId'];
+ episodeId = json['episodeId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ icdSubVersion = json['icdSubVersion'];
+ icdType = json['icdType'];
+ icdVersion = json['icdVersion'];
+ isPreviousProblem = json['isPreviousProblem'];
+ location = json['location'];
+ loginUserId = json['loginUserId'];
+ modifiedBy = json['modifiedBy'];
+ modifiedOn = json['modifiedOn'];
+ patientDiagnosisId = json['patientDiagnosisId'];
+ patientId = json['patientId'];
+ patientProblemRevisionId = json['patientProblemRevisionId'];
+ pomrId = json['pomrId'];
+ problemName = json['problemName'];
+ remarks = json['remarks'];
+ resolved = json['resolved'];
+ selected = json['selected'];
+ selectedDisease = json['selectedDisease'];
+ selectedDoctorId = json['selectedDoctorId'];
+ selectedIcdCode = json['selectedIcdCode'];
+ }
+
+ Map toJson() {
+ return {
+ 'active': active,
+ 'admissionId': admissionId,
+ 'appointmentId': appointmentId,
+ 'approvedBy': approvedBy,
+ 'approvedOn': approvedOn,
+ 'assessmentId': assessmentId,
+ 'clinicId': clinicId,
+ 'condition': condition,
+ 'createdBy': createdBy,
+ 'createdOn': createdOn,
+ 'deletedBy': deletedBy,
+ 'deletedOn': deletedOn,
+ 'deletedRemarks': deletedRemarks,
+ 'diagnosisType': diagnosisType,
+ 'doctorId': doctorId,
+ 'episodeId': episodeId,
+ 'hospitalGroupId': hospitalGroupId,
+ 'hospitalId': hospitalId,
+ 'icdSubVersion': icdSubVersion,
+ 'icdType': icdType,
+ 'icdVersion': icdVersion,
+ 'isPreviousProblem': isPreviousProblem,
+ 'location': location,
+ 'loginUserId': loginUserId,
+ 'modifiedBy': modifiedBy,
+ 'modifiedOn': modifiedOn,
+ 'patientDiagnosisId': patientDiagnosisId,
+ 'patientId': patientId,
+ 'patientProblemRevisionId': patientProblemRevisionId,
+ 'pomrId': pomrId,
+ 'problemName': problemName,
+ 'remarks': remarks,
+ 'resolved': resolved,
+ 'selected': selected,
+ 'selectedDisease': selectedDisease,
+ 'selectedDoctorId': selectedDoctorId,
+ 'selectedIcdCode': selectedIcdCode,
+ };
+ }
+}
diff --git a/lib/core/model/SOAP/assessment/search_diagnosis.dart b/lib/core/model/SOAP/assessment/search_diagnosis.dart
new file mode 100644
index 00000000..0a7ab2e7
--- /dev/null
+++ b/lib/core/model/SOAP/assessment/search_diagnosis.dart
@@ -0,0 +1,99 @@
+class SearchDiagnosis {
+ String? category;
+ String? categoryId;
+ String? codeRange;
+ String? diseaseType;
+ String? diseases;
+ String? diseasesBCode;
+ String? diseasesCode;
+ String? diseasesDataId;
+ String? diseasesId;
+ String? diseasesName;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? icdSubVersion;
+ String? icdType;
+ List? icdVersion;
+ String? icdVersionDisplay;
+ bool? isDeleted;
+ String? layerID;
+ String? parentDiseasesCode;
+ String? specification;
+ int? specificationId;
+ String? specificationNo;
+ String? selectedIcdCode;
+ String? selectedCategoryCode;
+ String? selectedSectionCode;
+ String? selectedChapterCode;
+ String? selectedNandaCode;
+ bool isFavorite = false;
+
+ // Default constructor
+ SearchDiagnosis();
+
+ // fromJson constructor
+ SearchDiagnosis.fromJson(Map json) {
+ category = json['category'];
+ categoryId = json['categoryId'];
+ codeRange = json['codeRange'];
+ diseaseType = json['diseaseType'];
+ diseases = json['diseases'];
+ diseasesBCode = json['diseasesBCode'];
+ diseasesCode = json['diseasesCode'];
+ diseasesDataId = json['diseasesDataId'];
+ diseasesId = json['diseasesId'];
+ diseasesName = json['diseasesName'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ icdSubVersion = json['icdSubVersion'];
+ icdType = json['icdType'];
+ icdVersion = json['icdVersion'] != null
+ ? List.from(json['icdVersion'])
+ : null;
+ icdVersionDisplay = json['icdVersionDisplay'];
+ isDeleted = json['isDeleted'] == "True";
+ layerID = json['layerID'];
+ parentDiseasesCode = json['parentDiseasesCode'];
+ specification = json['specification'];
+ specificationId = json['specificationId'];
+ specificationNo = json['specificationNo'];
+ selectedIcdCode = json['selectedIcdCode'];
+ selectedCategoryCode = json['selectedCategoryCode'];
+ selectedSectionCode = json['selectedSectionCode'];
+ selectedChapterCode = json['selectedChapterCode'];
+ selectedNandaCode = json['selectedNandaCode'];
+ }
+
+ // toJson method
+ Map toJson() {
+ return {
+ 'category': category,
+ 'categoryId': categoryId,
+ 'codeRange': codeRange,
+ 'diseaseType': diseaseType,
+ 'diseases': diseases,
+ 'diseasesBCode': diseasesBCode,
+ 'diseasesCode': diseasesCode,
+ 'diseasesDataId': diseasesDataId,
+ 'diseasesId': diseasesId,
+ 'diseasesName': diseasesName,
+ 'hospitalGroupId': hospitalGroupId,
+ 'hospitalId': hospitalId,
+ 'icdSubVersion': icdSubVersion,
+ 'icdType': icdType,
+ 'icdVersion': icdVersion,
+ 'icdVersionDisplay': icdVersionDisplay,
+ 'isDeleted': isDeleted.toString(),
+ 'layerID': layerID,
+ 'parentDiseasesCode': parentDiseasesCode,
+ 'specification': specification,
+ 'specificationId': specificationId,
+ 'specificationNo': specificationNo,
+ 'selectedIcdCode': selectedIcdCode,
+ 'selectedCategoryCode': selectedCategoryCode,
+ 'selectedSectionCode': selectedSectionCode,
+ 'selectedChapterCode': selectedChapterCode,
+ 'selectedNandaCode': selectedNandaCode,
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/chief_complaint/episode_by_chief_complaint_vidaplus.dart b/lib/core/model/SOAP/chief_complaint/episode_by_chief_complaint_vidaplus.dart
new file mode 100644
index 00000000..13005c9e
--- /dev/null
+++ b/lib/core/model/SOAP/chief_complaint/episode_by_chief_complaint_vidaplus.dart
@@ -0,0 +1,249 @@
+class EpisodeByChiefComplaintVidaPlus {
+ int? clinicId;
+ String? createdOn;
+ int? doctorId;
+ int? episodeStatus;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? modifiedOn;
+ int? patientEpisodeId;
+ int? patientId;
+ List? patientPomrs;
+
+ EpisodeByChiefComplaintVidaPlus(
+ {this.clinicId,
+ this.createdOn,
+ this.doctorId,
+ this.episodeStatus,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.modifiedOn,
+ this.patientEpisodeId,
+ this.patientId,
+ this.patientPomrs});
+
+ EpisodeByChiefComplaintVidaPlus.fromJson(Map json) {
+ clinicId = json['clinicId'];
+ createdOn = json['createdOn'];
+ doctorId = json['doctorId'];
+ episodeStatus = json['episodeStatus'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ modifiedOn = json['modifiedOn'];
+ patientEpisodeId = json['patientEpisodeId'];
+ patientId = json['patientId'];
+ if (json['patientPomrs'] != null) {
+ patientPomrs = [];
+ json['patientPomrs'].forEach((v) {
+ patientPomrs!.add(new PatientPomrs.fromJson(v));
+ });
+ }
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['clinicId'] = this.clinicId;
+ data['createdOn'] = this.createdOn;
+ data['doctorId'] = this.doctorId;
+ data['episodeStatus'] = this.episodeStatus;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['modifiedOn'] = this.modifiedOn;
+ data['patientEpisodeId'] = this.patientEpisodeId;
+ data['patientId'] = this.patientId;
+ if (this.patientPomrs != null) {
+ data['patientPomrs'] = this.patientPomrs!.map((v) => v.toJson()).toList();
+ }
+ return data;
+ }
+}
+
+class PatientPomrs {
+ int? appointmentId;
+ int? chiefComplainTemplateId;
+ List? chiefComplains;
+ int? clinicGroupId;
+ String? createdOn;
+ int? doctorId;
+ String? doctorName;
+ int? episodeId;
+ bool? fallowUp;
+ bool? fallowUpRequired;
+ bool? isReadOnly;
+ String? modifiedOn;
+ int? patientId;
+ int? patientPomrId;
+ String? pomrSingOn;
+ int? pomrStatus;
+ bool? readOnly;
+ String? seenAtStatus;
+ String? vprnSeenAtStatus;
+
+ PatientPomrs(
+ {this.appointmentId,
+ this.chiefComplainTemplateId,
+ this.chiefComplains,
+ this.clinicGroupId,
+ this.createdOn,
+ this.doctorId,
+ this.doctorName,
+ this.episodeId,
+ this.fallowUp,
+ this.fallowUpRequired,
+ this.isReadOnly,
+ this.modifiedOn,
+ this.patientId,
+ this.patientPomrId,
+ this.pomrSingOn,
+ this.pomrStatus,
+ this.readOnly,
+ this.seenAtStatus,
+ this.vprnSeenAtStatus});
+
+ PatientPomrs.fromJson(Map json) {
+ appointmentId = json['appointmentId'];
+ chiefComplainTemplateId = json['chiefComplainTemplateId'];
+ if (json['chiefComplains'] != null) {
+ chiefComplains = [];
+ json['chiefComplains'].forEach((v) {
+ chiefComplains!.add(new ChiefComplains.fromJson(v));
+ });
+ }
+ clinicGroupId = json['clinicGroupId'];
+ createdOn = json['createdOn'];
+ doctorId = json['doctorId'];
+ doctorName = json['doctorName'];
+ episodeId = json['episodeId'];
+ fallowUp = json['fallowUp'];
+ fallowUpRequired = json['fallowUpRequired'];
+ isReadOnly = json['isReadOnly'];
+ modifiedOn = json['modifiedOn'];
+ patientId = json['patientId'];
+ patientPomrId = json['patientPomrId'];
+ pomrSingOn = json['pomrSingOn'];
+ pomrStatus = json['pomrStatus'];
+ readOnly = json['readOnly'];
+ seenAtStatus = json['seenAtStatus'];
+ vprnSeenAtStatus = json['vprnSeenAtStatus'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['appointmentId'] = this.appointmentId;
+ data['chiefComplainTemplateId'] = this.chiefComplainTemplateId;
+ if (this.chiefComplains != null) {
+ data['chiefComplains'] =
+ this.chiefComplains!.map((v) => v.toJson()).toList();
+ }
+ data['clinicGroupId'] = this.clinicGroupId;
+ data['createdOn'] = this.createdOn;
+ data['doctorId'] = this.doctorId;
+ data['doctorName'] = this.doctorName;
+ data['episodeId'] = this.episodeId;
+ data['fallowUp'] = this.fallowUp;
+ data['fallowUpRequired'] = this.fallowUpRequired;
+ data['isReadOnly'] = this.isReadOnly;
+ data['modifiedOn'] = this.modifiedOn;
+ data['patientId'] = this.patientId;
+ data['patientPomrId'] = this.patientPomrId;
+ data['pomrSingOn'] = this.pomrSingOn;
+ data['pomrStatus'] = this.pomrStatus;
+ data['readOnly'] = this.readOnly;
+ data['seenAtStatus'] = this.seenAtStatus;
+ data['vprnSeenAtStatus'] = this.vprnSeenAtStatus;
+ return data;
+ }
+}
+
+class ChiefComplains {
+ int? appointmentId;
+ String? chiefComplain;
+ int? chiefComplainId;
+ int? clinicId;
+ String? createdBy;
+ int? createdId;
+ String? createdOn;
+ int? doctorId;
+ String? doctorName;
+ int? episodeId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? loginUserId;
+ String? modifiedBy;
+ Null? modifiedId;
+ String? modifiedOn;
+ int? patientId;
+ String? patientName;
+ int? patientPomrId;
+ int? chiefComplainTemplateId;
+
+
+ ChiefComplains(
+ {this.appointmentId,
+ this.chiefComplain,
+ this.chiefComplainId,
+ this.clinicId,
+ this.createdBy,
+ this.createdId,
+ this.createdOn,
+ this.doctorId,
+ this.doctorName,
+ this.episodeId,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.loginUserId,
+ this.modifiedBy,
+ this.modifiedId,
+ this.modifiedOn,
+ this.patientId,
+ this.patientName,
+ this.patientPomrId});
+
+ ChiefComplains.fromJson(Map json) {
+ appointmentId = json['appointmentId'];
+ chiefComplain = json['chiefComplain'];
+ chiefComplainTemplateId = json['chiefComplainTemplateId'];
+ chiefComplainId = json['chiefComplainId'];
+ clinicId = json['clinicId'];
+ createdBy = json['createdBy'];
+ createdId = json['createdId'];
+ createdOn = json['createdOn'];
+ doctorId = json['doctorId'];
+ doctorName = json['doctorName'];
+ episodeId = json['episodeId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ loginUserId = json['loginUserId'];
+ modifiedBy = json['modifiedBy'];
+ modifiedId = json['modifiedId'];
+ modifiedOn = json['modifiedOn'];
+ patientId = json['patientId'];
+ patientName = json['patientName'];
+ patientPomrId = json['patientPomrId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['appointmentId'] = this.appointmentId;
+ data['chiefComplain'] = this.chiefComplain;
+ data['chiefComplainId'] = this.chiefComplainId;
+ data['clinicId'] = this.clinicId;
+ data['createdBy'] = this.createdBy;
+ data['createdId'] = this.createdId;
+ data['createdOn'] = this.createdOn;
+ data['doctorId'] = this.doctorId;
+ data['doctorName'] = this.doctorName;
+ data['episodeId'] = this.episodeId;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['loginUserId'] = this.loginUserId;
+ data['modifiedBy'] = this.modifiedBy;
+ data['chiefComplainTemplateId'] = this.chiefComplainTemplateId;
+ data['modifiedId'] = this.modifiedId;
+ data['modifiedOn'] = this.modifiedOn;
+ data['patientId'] = this.patientId;
+ data['patientName'] = this.patientName;
+ data['patientPomrId'] = this.patientPomrId;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/chief_complaint/get_chief_complaint_vida_plus.dart b/lib/core/model/SOAP/chief_complaint/get_chief_complaint_vida_plus.dart
new file mode 100644
index 00000000..cf2c5f7b
--- /dev/null
+++ b/lib/core/model/SOAP/chief_complaint/get_chief_complaint_vida_plus.dart
@@ -0,0 +1,68 @@
+class GetChiefComplaintVidaPlus {
+ int? appointmentId;
+ String? chiefComplain;
+ int? chiefComplainId;
+ int? chiefComplainTemplateId;
+ int? clinicGroupId;
+ int? clinicId;
+ int? doctorId;
+ String? doctorName;
+ int? episodeId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? loginUserId;
+ int? patientId;
+ int? patientPomrId;
+
+ GetChiefComplaintVidaPlus(
+ {this.appointmentId,
+ this.chiefComplain,
+ this.chiefComplainId,
+ this.chiefComplainTemplateId,
+ this.clinicGroupId,
+ this.clinicId,
+ this.doctorId,
+ this.doctorName,
+ this.episodeId,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.loginUserId,
+ this.patientId,
+ this.patientPomrId});
+
+ GetChiefComplaintVidaPlus.fromJson(Map json) {
+ appointmentId = json['appointmentId'];
+ chiefComplain = json['chiefComplain'];
+ chiefComplainId = json['chiefComplainId'];
+ chiefComplainTemplateId = json['chiefComplainTemplateId'];
+ clinicGroupId = json['clinicGroupId'];
+ clinicId = json['clinicId'];
+ doctorId = json['doctorId'];
+ doctorName = json['doctorName'];
+ episodeId = json['episodeId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ loginUserId = json['loginUserId'];
+ patientId = json['patientId'];
+ patientPomrId = json['patientPomrId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['appointmentId'] = this.appointmentId;
+ data['chiefComplain'] = this.chiefComplain;
+ data['chiefComplainId'] = this.chiefComplainId;
+ data['chiefComplainTemplateId'] = this.chiefComplainTemplateId;
+ data['clinicGroupId'] = this.clinicGroupId;
+ data['clinicId'] = this.clinicId;
+ data['doctorId'] = this.doctorId;
+ data['doctorName'] = this.doctorName;
+ data['episodeId'] = this.episodeId;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['loginUserId'] = this.loginUserId;
+ data['patientId'] = this.patientId;
+ data['patientPomrId'] = this.patientPomrId;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/chief_complaint/search_chief_complaint_vidaplus.dart b/lib/core/model/SOAP/chief_complaint/search_chief_complaint_vidaplus.dart
new file mode 100644
index 00000000..389cd99f
--- /dev/null
+++ b/lib/core/model/SOAP/chief_complaint/search_chief_complaint_vidaplus.dart
@@ -0,0 +1,40 @@
+class SearchChiefComplaint {
+ String? chiefComplain;
+ String? chiefComplainCode;
+ int? chiefComplainId;
+ String? clinic;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? nursingGroup;
+
+ SearchChiefComplaint(
+ {this.chiefComplain,
+ this.chiefComplainCode,
+ this.chiefComplainId,
+ this.clinic,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.nursingGroup});
+
+ SearchChiefComplaint.fromJson(Map json) {
+ chiefComplain = json['chiefComplain'];
+ chiefComplainCode = json['chiefComplainCode'];
+ chiefComplainId = json['chiefComplainId'];
+ clinic = json['clinic'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ nursingGroup = json['nursingGroup'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['chiefComplain'] = this.chiefComplain;
+ data['chiefComplainCode'] = this.chiefComplainCode;
+ data['chiefComplainId'] = this.chiefComplainId;
+ data['clinic'] = this.clinic;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['nursingGroup'] = this.nursingGroup;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/get_hopi_details.dart b/lib/core/model/SOAP/get_hopi_details.dart
new file mode 100644
index 00000000..eadf19ba
--- /dev/null
+++ b/lib/core/model/SOAP/get_hopi_details.dart
@@ -0,0 +1,66 @@
+class GetHopiDetails {
+ int? clinicId;
+ int? doctorId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? hpi;
+ int? hpiId;
+ bool? isHpiTakenFamily;
+ bool? isHpiTakenOther;
+ bool? isHpiTakenPatient;
+ String? hpiTakenFamilyText;
+ String? hpiTakenOtherText;
+ String? loginUserId;
+ int? patientId;
+ int? patientPomrId;
+
+ GetHopiDetails(
+ {this.clinicId,
+ this.doctorId,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.hpi,
+ this.hpiId,
+ this.isHpiTakenFamily,
+ this.isHpiTakenOther,
+ this.isHpiTakenPatient,
+ this.loginUserId,
+ this.patientId,
+ this.patientPomrId});
+
+ GetHopiDetails.fromJson(Map json) {
+ clinicId = json['clinicId'];
+ doctorId = json['doctorId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ hpi = json['hpi'];
+ hpiId = json['hpiId'];
+ isHpiTakenFamily = json['isHpiTakenFamily'];
+ isHpiTakenOther = json['isHpiTakenOther'];
+ isHpiTakenPatient = json['isHpiTakenPatient'];
+ loginUserId = json['loginUserId'];
+ patientId = json['patientId'];
+ patientPomrId = json['patientPomrId'];
+ hpiTakenFamilyText = json['hpiTakenFamilyText'];
+ hpiTakenOtherText = json['hpiTakenOtherText'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['clinicId'] = this.clinicId;
+ data['doctorId'] = this.doctorId;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['hpi'] = this.hpi;
+ data['hpiId'] = this.hpiId;
+ data['isHpiTakenFamily'] = this.isHpiTakenFamily;
+ data['isHpiTakenOther'] = this.isHpiTakenOther;
+ data['isHpiTakenPatient'] = this.isHpiTakenPatient;
+ data['loginUserId'] = this.loginUserId;
+ data['patientId'] = this.patientId;
+ data['patientPomrId'] = this.patientPomrId;
+ data['hpiTakenFamilyText'] = this.hpiTakenFamilyText;
+ data['hpiTakenOtherText'] = this.hpiTakenOtherText;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/home_medication_vp/GetHomeMedication.dart b/lib/core/model/SOAP/home_medication_vp/GetHomeMedication.dart
new file mode 100644
index 00000000..01d186c3
--- /dev/null
+++ b/lib/core/model/SOAP/home_medication_vp/GetHomeMedication.dart
@@ -0,0 +1,156 @@
+class GetHomeMedicationList {
+ List? personalizationEntity;
+ int? appointmentId;
+ int? clinicGroupId;
+ int? clinicId;
+ String? createdTime;
+ String? doseQuantity;
+ String? formularyName;
+ String? frequencyId;
+ String? frequencyString;
+ String? genericFormularyId;
+ String? homeMedFrom;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? id;
+ bool? isActive;
+ bool? isEHRIPReconciled;
+ bool? isEHROPReconciled;
+ bool? isERIPReconciled;
+ bool? isFreeText;
+ bool? isReconciled;
+ bool? isUnknownDetail;
+ String? lastUpdatedTime;
+ int? patientId;
+ int? patientPomrId;
+ String? prescribeTypeAlias;
+ int? prescribedItemId;
+ String? prescribedItemName;
+ String? remarks;
+ String? routeId;
+ String? routeString;
+ String? rowVersion;
+ String? sentence;
+ String? strengthId;
+ String? strengthString;
+
+ GetHomeMedicationList(
+ {this.personalizationEntity,
+ this.appointmentId,
+ this.clinicGroupId,
+ this.clinicId,
+ this.createdTime,
+ this.doseQuantity,
+ this.formularyName,
+ this.frequencyId,
+ this.frequencyString,
+ this.genericFormularyId,
+ this.homeMedFrom,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.id,
+ this.isActive,
+ this.isEHRIPReconciled,
+ this.isEHROPReconciled,
+ this.isERIPReconciled,
+ this.isFreeText,
+ this.isReconciled,
+ this.isUnknownDetail,
+ this.lastUpdatedTime,
+ this.patientId,
+ this.patientPomrId,
+ this.prescribeTypeAlias,
+ this.prescribedItemId,
+ this.prescribedItemName,
+ this.remarks,
+ this.routeId,
+ this.routeString,
+ this.rowVersion,
+ this.sentence,
+ this.strengthId,
+ this.strengthString});
+
+ GetHomeMedicationList.fromJson(Map json) {
+ if (json['PersonalizationEntity'] != null) {
+ personalizationEntity = [];
+ json['PersonalizationEntity'].forEach((v) {
+ personalizationEntity!.add( v.fromJson(v));
+ });
+ }
+ appointmentId = json['appointmentId'];
+ clinicGroupId = json['clinicGroupId'];
+ clinicId = json['clinicId'];
+ createdTime = json['createdTime'];
+ doseQuantity = json['doseQuantity'];
+ formularyName = json['formularyName'];
+ frequencyId = json['frequencyId'];
+ frequencyString = json['frequencyString'];
+ genericFormularyId = json['genericFormularyId'];
+ homeMedFrom = json['homeMedFrom'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ id = json['id'];
+ isActive = json['isActive'];
+ isEHRIPReconciled = json['isEHRIPReconciled'];
+ isEHROPReconciled = json['isEHROPReconciled'];
+ isERIPReconciled = json['isERIPReconciled'];
+ isFreeText = json['isFreeText'];
+ isReconciled = json['isReconciled'];
+ isUnknownDetail = json['isUnknownDetail'];
+ lastUpdatedTime = json['lastUpdatedTime'];
+ patientId = json['patientId'];
+ patientPomrId = json['patientPomrId'];
+ prescribeTypeAlias = json['prescribeTypeAlias'];
+ prescribedItemId = json['prescribedItemId'];
+ prescribedItemName = json['prescribedItemName'];
+ remarks = json['remarks'];
+ routeId = json['routeId'];
+ routeString = json['routeString'];
+ rowVersion = json['rowVersion'];
+ sentence = json['sentence'];
+ strengthId = json['strengthId'];
+ strengthString = json['strengthString'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.personalizationEntity != null) {
+ data['PersonalizationEntity'] =
+ this.personalizationEntity!.map((v) => v.toJson()).toList();
+ }
+ data['appointmentId'] = this.appointmentId;
+ data['clinicGroupId'] = this.clinicGroupId;
+ data['clinicId'] = this.clinicId;
+ data['createdTime'] = this.createdTime;
+ data['doseQuantity'] = this.doseQuantity;
+ data['formularyName'] = this.formularyName;
+ data['frequencyId'] = this.frequencyId;
+ data['frequencyString'] = this.frequencyString;
+ data['genericFormularyId'] = this.genericFormularyId;
+ data['homeMedFrom'] = this.homeMedFrom;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['id'] = this.id;
+ data['isActive'] = this.isActive;
+ data['isEHRIPReconciled'] = this.isEHRIPReconciled;
+ data['isEHROPReconciled'] = this.isEHROPReconciled;
+ data['isERIPReconciled'] = this.isERIPReconciled;
+ data['isFreeText'] = this.isFreeText;
+ data['isReconciled'] = this.isReconciled;
+ data['isUnknownDetail'] = this.isUnknownDetail;
+ data['lastUpdatedTime'] = this.lastUpdatedTime;
+ data['patientId'] = this.patientId;
+ data['patientPomrId'] = this.patientPomrId;
+ data['prescribeTypeAlias'] = this.prescribeTypeAlias;
+ data['prescribedItemId'] = this.prescribedItemId;
+ data['prescribedItemName'] = this.prescribedItemName;
+ data['remarks'] = this.remarks;
+ data['routeId'] = this.routeId;
+ data['routeString'] = this.routeString;
+ data['rowVersion'] = this.rowVersion;
+ data['sentence'] = this.sentence;
+ data['strengthId'] = this.strengthId;
+ data['strengthString'] = this.strengthString;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedication.dart b/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedication.dart
new file mode 100644
index 00000000..fd94d9cf
--- /dev/null
+++ b/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedication.dart
@@ -0,0 +1,40 @@
+class GetSearchCurrentMedication {
+ String? formularyName;
+ String? genericFormularyCode;
+ String? genericFormularyId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? itemType;
+ bool? outOfStock;
+
+ GetSearchCurrentMedication(
+ {this.formularyName,
+ this.genericFormularyCode,
+ this.genericFormularyId,
+ this.hospitalGroupId,
+ this.hospitalId,
+ this.itemType,
+ this.outOfStock});
+
+ GetSearchCurrentMedication.fromJson(Map json) {
+ formularyName = json['formularyName'];
+ genericFormularyCode = json['genericFormularyCode'];
+ genericFormularyId = json['genericFormularyId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ itemType = json['itemType'];
+ outOfStock = json['outOfStock'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['formularyName'] = this.formularyName;
+ data['genericFormularyCode'] = this.genericFormularyCode;
+ data['genericFormularyId'] = this.genericFormularyId;
+ data['hospitalGroupId'] = this.hospitalGroupId;
+ data['hospitalId'] = this.hospitalId;
+ data['itemType'] = this.itemType;
+ data['outOfStock'] = this.outOfStock;
+ return data;
+ }
+}
diff --git a/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedicationDetails.dart b/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedicationDetails.dart
new file mode 100644
index 00000000..0cdd9ada
--- /dev/null
+++ b/lib/core/model/SOAP/home_medication_vp/GetSearchCurrentMedicationDetails.dart
@@ -0,0 +1,108 @@
+class GetSearchCurrentMedicationDetails {
+ List? genericItemFrequencyDetailsEntity;
+ List? genericItemRouteDetailsEntity;
+ List? itemStrengthDetailsDto;
+ int? patientTypeId;
+
+ GetSearchCurrentMedicationDetails({this.genericItemFrequencyDetailsEntity, this.genericItemRouteDetailsEntity, this.itemStrengthDetailsDto, this.patientTypeId});
+
+ GetSearchCurrentMedicationDetails.fromJson(Map json) {
+ if (json['genericItemFrequencyDetailsEntity'] != null) {
+ genericItemFrequencyDetailsEntity = [];
+ json['genericItemFrequencyDetailsEntity'].forEach((v) { genericItemFrequencyDetailsEntity!.add(new GenericItemFrequencyDetailsEntity.fromJson(v)); });
+ }
+ if (json['genericItemRouteDetailsEntity'] != null) {
+ genericItemRouteDetailsEntity = [];
+ json['genericItemRouteDetailsEntity'].forEach((v) { genericItemRouteDetailsEntity!.add(new GenericItemRouteDetailsEntity.fromJson(v)); });
+ }
+ if (json['itemStrengthDetailsDto'] != null) {
+ itemStrengthDetailsDto = [];
+ json['itemStrengthDetailsDto'].forEach((v) { itemStrengthDetailsDto!.add(new ItemStrengthDetailsDto.fromJson(v)); });
+ }
+ patientTypeId = json['patientTypeId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ if (this.genericItemFrequencyDetailsEntity != null) {
+ data['genericItemFrequencyDetailsEntity'] = this.genericItemFrequencyDetailsEntity!.map((v) => v.toJson()).toList();
+ }
+ if (this.genericItemRouteDetailsEntity != null) {
+ data['genericItemRouteDetailsEntity'] = this.genericItemRouteDetailsEntity!.map((v) => v.toJson()).toList();
+ }
+ if (this.itemStrengthDetailsDto != null) {
+ data['itemStrengthDetailsDto'] = this.itemStrengthDetailsDto!.map((v) => v.toJson()).toList();
+ }
+ data['patientTypeId'] = this.patientTypeId;
+ return data;
+ }
+}
+
+class GenericItemFrequencyDetailsEntity {
+ bool? Default;
+ String? frequency;
+ int? frequencyId;
+ int? interval;
+
+ GenericItemFrequencyDetailsEntity({this.Default, this.frequency, this.frequencyId, this.interval});
+
+GenericItemFrequencyDetailsEntity.fromJson(Map json) {
+Default = json['Default'];
+frequency = json['Frequency'];
+frequencyId = json['FrequencyId'];
+interval = json['Interval'];
+}
+
+Map toJson() {
+final Map data = new Map();
+data['Default'] = this.Default;
+data['Frequency'] = this.frequency;
+data['FrequencyId'] = this.frequencyId;
+data['Interval'] = this.interval;
+return data;
+}
+}
+
+class GenericItemRouteDetailsEntity {
+bool? Default;
+String? route;
+int? routeId;
+
+GenericItemRouteDetailsEntity({this.Default, this.route, this.routeId});
+
+GenericItemRouteDetailsEntity.fromJson(Map json) {
+Default = json['default'];
+route = json['route'];
+routeId = json['routeId'];
+}
+
+Map toJson() {
+final Map data = new Map();
+data['default'] = this.Default;
+data['route'] = this.route;
+data['routeId'] = this.routeId;
+return data;
+}
+}
+
+class ItemStrengthDetailsDto {
+bool? Default;
+String? strength;
+int? strengthId;
+
+ItemStrengthDetailsDto({this.Default, this.strength, this.strengthId});
+
+ItemStrengthDetailsDto.fromJson(Map json) {
+Default = json['default'];
+strength = json['strength'];
+strengthId = json['strengthId'];
+}
+
+Map toJson() {
+final Map data = new Map();
+data['default'] = this.Default;
+data['strength'] = this.strength;
+data['strengthId'] = this.strengthId;
+return data;
+}
+}
diff --git a/lib/core/model/SOAP/physical_exam/Category.dart b/lib/core/model/SOAP/physical_exam/Category.dart
new file mode 100644
index 00000000..26542d27
--- /dev/null
+++ b/lib/core/model/SOAP/physical_exam/Category.dart
@@ -0,0 +1,96 @@
+import 'package:flutter/material.dart';
+
+class Condition {
+ String? conditionCode;
+ String? conditionName;
+
+ Condition();
+
+ Condition.fromJson(Map json) {
+ conditionCode = json['conditionCode'];
+ conditionName = json['conditionName'];
+ }
+
+ Map toJson() {
+ return {
+ 'conditionCode': conditionCode,
+ 'conditionName': conditionName,
+ };
+ }
+}
+
+class Category {
+ int? categoryId;
+ String? code;
+ String? codeAlias;
+ List? conditionsList;
+ String? description;
+ String? descriptionAlias;
+ int? id;
+ bool? isActive;
+ bool? isBuiltin;
+ String? languageCode;
+ String? name;
+ String? nameAlias;
+ int? rowVersion;
+ int? specialityId;
+ String? specialityName;
+ List? translationValues;
+ bool isSelected = false;
+ TextEditingController remarksController = TextEditingController();
+ int selectedCondition = -1;
+ String selectedConditionName = "";
+ String? pomrId;
+ int? paitientId;
+ int? userID;
+ bool isExpanded = false;
+
+ Category();
+
+ Category.fromJson(Map json,int? specialityId, String specialityName, String? pomrId, int paitientId, int userID) {
+ categoryId = json['categoryId'];
+ code = json['code'];
+ codeAlias = json['codeAlias'];
+ if (json['conditionsList'] != null) {
+ conditionsList = [];
+ json['conditionsList'].forEach((v) {
+ conditionsList!.add(Condition.fromJson(v));
+ });
+ }
+ if(conditionsList?.isNotEmpty == true) selectedCondition = int.parse(conditionsList?.first.conditionName ??'-1');
+ description = json['description'];
+ descriptionAlias = json['descriptionAlias'];
+ id = json['id'];
+ isActive = json['isActive'];
+ isBuiltin = json['isBuiltin'];
+ languageCode = json['languageCode'];
+ name = json['name'];
+ nameAlias = json['nameAlias'];
+ rowVersion = json['rowVersion'];
+ translationValues = json['translationValues'];
+ this.specialityName = specialityName;
+ this.specialityId = specialityId;
+ this.pomrId = pomrId;
+ this.paitientId = paitientId;
+ this.userID = userID;
+ }
+
+ Map toJson() {
+ return {
+ 'categoryId': categoryId,
+ 'code': code,
+ 'codeAlias': codeAlias,
+ 'conditionsList': conditionsList?.map((v) => v.toJson()).toList(),
+ 'description': description,
+ 'descriptionAlias': descriptionAlias,
+ 'id': id,
+ 'isActive': isActive,
+ 'isBuiltin': isBuiltin,
+ 'languageCode': languageCode,
+ 'name': name,
+ 'nameAlias': nameAlias,
+ 'rowVersion': rowVersion,
+ 'translationValues': translationValues,
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/physical_exam/CreatePhysicalExamination.dart b/lib/core/model/SOAP/physical_exam/CreatePhysicalExamination.dart
new file mode 100644
index 00000000..7a60cd06
--- /dev/null
+++ b/lib/core/model/SOAP/physical_exam/CreatePhysicalExamination.dart
@@ -0,0 +1,74 @@
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/Category.dart';
+
+class CreatePhysicalExamination {
+ bool? isChecked; // it will be told
+ bool? selected; // same as above
+ String? pomrid; // paitient
+ int? patientID; // paitint
+ bool? isClinicPhysicalExamination; // it will be told
+ dynamic? physicalExaminationSystemID; // category id
+ String? physicalExaminationDescription; // name of the category
+ int? specialityID; // id of the specialitiy id
+ dynamic selectedOptions; // it will also be told but it could be sent as null
+ bool? isMandatory; // it will also be checked default value is false
+ String? specialityDescription; // name of the speciality
+ int? physicalExaminationCondition; // condition selected
+ String? loginUserId; // doctor id
+ String? remark;
+
+ CreatePhysicalExamination();
+
+ CreatePhysicalExamination.fromJson(Map json) {
+ isChecked = json['isChecked'];
+ selected = json['selected'];
+ pomrid = json['pomrid'];
+ patientID = json['patientID'];
+ isClinicPhysicalExamination = json['isClinicPhysicalExamination'];
+ physicalExaminationSystemID = json['physicalExaminationSystemID'];
+ physicalExaminationDescription = json['physicalExaminationDescription'];
+ specialityID = json['specialityID'];
+ selectedOptions = json['selectedOptions'];
+ isMandatory = json['isMandatory'];
+ specialityDescription = json['specialityDescription'];
+ physicalExaminationCondition = json['physicalExaminationCondition'];
+ loginUserId = json['loginUserId'];
+ remark = json['remark'];
+ }
+
+ Map toJson() {
+ return {
+ 'isChecked': isChecked,
+ 'selected': selected,
+ 'pomrid': pomrid,
+ 'patientID': patientID,
+ 'isClinicPhysicalExamination': isClinicPhysicalExamination,
+ 'physicalExaminationSystemID': physicalExaminationSystemID,
+ 'physicalExaminationDescription': physicalExaminationDescription,
+ 'specialityID': specialityID,
+ 'selectedOptions': selectedOptions,
+ 'isMandatory': isMandatory,
+ 'specialityDescription': specialityDescription,
+ 'physicalExaminationCondition': physicalExaminationCondition,
+ 'loginUserId': loginUserId,
+ 'remark': remark,
+ };
+ }
+}
+
+extension ConvertCategoryToCreatePhysicalExamination on Category {
+ CreatePhysicalExamination createPhysicalExaminationFromCategory() =>
+ CreatePhysicalExamination()
+ ..isChecked = true
+ ..physicalExaminationDescription = this.name
+ ..physicalExaminationSystemID = this.id
+ ..physicalExaminationCondition = this.selectedCondition
+ ..remark = this.remarksController.text
+ ..selected = false
+ ..specialityID = this.specialityId
+ ..patientID = this.paitientId
+ ..pomrid = this.pomrId
+ ..loginUserId = this.userID?.toString()
+ ..isMandatory = false
+ ..specialityDescription = this.specialityName
+ ..isClinicPhysicalExamination = true;
+}
diff --git a/lib/core/model/SOAP/physical_exam/GeneralSpeciality.dart b/lib/core/model/SOAP/physical_exam/GeneralSpeciality.dart
new file mode 100644
index 00000000..7428f6a2
--- /dev/null
+++ b/lib/core/model/SOAP/physical_exam/GeneralSpeciality.dart
@@ -0,0 +1,24 @@
+class GeneralSpeciality {
+ int? id;
+ bool? isActive;
+ String? name;
+ int? rowVersion;
+ bool isSelected = false;
+
+ GeneralSpeciality();
+
+ GeneralSpeciality.fromJson(Map json) {
+ id = json['id'];
+ isActive = json['isActive'];
+ name = json['name'];
+ rowVersion = json['rowVersion'];
+ }
+ Map toJson() {
+ return {
+ 'id': id,
+ 'isActive': isActive,
+ 'name': name,
+ 'rowVersion': rowVersion,
+ };
+ }
+}
diff --git a/lib/core/model/SOAP/physical_exam/patient_physical_examination.dart b/lib/core/model/SOAP/physical_exam/patient_physical_examination.dart
new file mode 100644
index 00000000..ec4253a6
--- /dev/null
+++ b/lib/core/model/SOAP/physical_exam/patient_physical_examination.dart
@@ -0,0 +1,97 @@
+class PatientPhysicalExamination {
+ int? patientPhysicalExaminationRevisionID;
+ int? patientPhysicalExaminationID;
+ int? patientID;
+ int? physicalExaminationSystemID;
+ String? physicalExaminationDescription;
+ int? physicalExaminationCondition;
+ String? remark;
+ int? assessmentId;
+ String? userType;
+ int? specialtyID;
+ String? specialityDescription;
+ String? loginUserId;
+ bool? isMandatory;
+ String? examinationType;
+ dynamic additionalParams; // Use dynamic for null or varied types
+ int? hospitalGroupID;
+ int? hospitalID;
+ int? dbCRUDOperation;
+ bool? isActive;
+ int? createdBy;
+ String? createdOn;
+ int? modifiedBy;
+ String? modifiedOn;
+ int? approvedBy;
+ String? approvedOn;
+ String? rowVersion;
+ String? pomrid;
+
+ // Default constructor
+ PatientPhysicalExamination();
+
+ // fromJson constructor
+ PatientPhysicalExamination.fromJson(Map json) {
+ patientPhysicalExaminationRevisionID =
+ json['patientPhysicalExaminationRevisionID'];
+ patientPhysicalExaminationID = json['patientPhysicalExaminationID'];
+ patientID = json['patientID'];
+ physicalExaminationSystemID = json['physicalExaminationSystemID'];
+ physicalExaminationDescription = json['physicalExaminationDescription'];
+ physicalExaminationCondition = json['physicalExaminationCondition'];
+ remark = json['remark'];
+ assessmentId = json['assessmentId'];
+ userType = json['userType'];
+ specialtyID = json['specialtyID'];
+ specialityDescription = json['specialityDescription'];
+ loginUserId = json['loginUserId'];
+ isMandatory = json['isMandatory'];
+ examinationType = json['examinationType'];
+ additionalParams = json['additionalParams'];
+ hospitalGroupID = json['hospitalGroupID'];
+ hospitalID = json['hospitalID'];
+ dbCRUDOperation = json['dbCRUDOperation'];
+ isActive = json['isActive'];
+ createdBy = json['createdBy'];
+ createdOn = json['createdOn'];
+ modifiedBy = json['modifiedBy'];
+ modifiedOn = json['modifiedOn'];
+ approvedBy = json['approvedBy'];
+ approvedOn = json['approvedOn'];
+ rowVersion = json['rowVersion'];
+ pomrid = json['pomrid'];
+ }
+
+ // toJson method
+ Map toJson() {
+ return {
+ 'patientPhysicalExaminationRevisionID': patientPhysicalExaminationRevisionID,
+ 'patientPhysicalExaminationID': patientPhysicalExaminationID,
+ 'patientID': patientID,
+ 'physicalExaminationSystemID': physicalExaminationSystemID,
+ 'physicalExaminationDescription': physicalExaminationDescription,
+ 'physicalExaminationCondition': physicalExaminationCondition,
+ 'remark': remark,
+ 'assessmentId': assessmentId,
+ 'userType': userType,
+ 'specialtyID': specialtyID,
+ 'specialityDescription': specialityDescription,
+ 'loginUserId': loginUserId,
+ 'isMandatory': isMandatory,
+ 'examinationType': examinationType,
+ 'additionalParams': additionalParams,
+ 'hospitalGroupID': hospitalGroupID,
+ 'hospitalID': hospitalID,
+ 'dbCRUDOperation': dbCRUDOperation,
+ 'isActive': isActive,
+ 'createdBy': createdBy,
+ 'createdOn': createdOn,
+ 'modifiedBy': modifiedBy,
+ 'modifiedOn': modifiedOn,
+ 'approvedBy': approvedBy,
+ 'approvedOn': approvedOn,
+ 'rowVersion': rowVersion,
+ 'pomrid': pomrid,
+ };
+ }
+}
diff --git a/lib/core/model/SOAP/physical_exam/post_physical_examination_model.dart b/lib/core/model/SOAP/physical_exam/post_physical_examination_model.dart
new file mode 100644
index 00000000..026d8c54
--- /dev/null
+++ b/lib/core/model/SOAP/physical_exam/post_physical_examination_model.dart
@@ -0,0 +1,55 @@
+@deprecated
+class PostPhysicalExaminationModel {
+ bool? isChecked;
+ bool? selected;
+ int? pomrid;
+ int? patientID;
+ bool? isClinicPhysicalExamination;
+ int? physicalExaminationSystemID;
+ String? physicalExaminationDescription;
+ int? specialityID;
+ dynamic selectedOptions;
+ bool? isMandatory;
+ String? specialityDescription;
+ int? physicalExaminationCondition;
+ String? loginUserId;
+ String? remark;
+
+ PostPhysicalExaminationModel();
+
+ PostPhysicalExaminationModel.fromJson(Map json) {
+ isChecked = json['isChecked'];
+ selected = json['selected'];
+ pomrid = json['pomrid'];
+ patientID = json['patientID'];
+ isClinicPhysicalExamination = json['isClinicPhysicalExamination'];
+ physicalExaminationSystemID = json['physicalExaminationSystemID'];
+ physicalExaminationDescription = json['physicalExaminationDescription'];
+ specialityID = json['specialityID'];
+ selectedOptions = json['selectedOptions'];
+ isMandatory = json['isMandatory'];
+ specialityDescription = json['specialityDescription'];
+ physicalExaminationCondition = json['physicalExaminationCondition'];
+ loginUserId = json['loginUserId'];
+ remark = json['remark'];
+ }
+
+ Map toJson() {
+ return {
+ 'isChecked': isChecked,
+ 'selected': selected,
+ 'pomrid': pomrid,
+ 'patientID': patientID,
+ 'isClinicPhysicalExamination': isClinicPhysicalExamination,
+ 'physicalExaminationSystemID': physicalExaminationSystemID,
+ 'physicalExaminationDescription': physicalExaminationDescription,
+ 'specialityID': specialityID,
+ 'selectedOptions': selectedOptions,
+ 'isMandatory': isMandatory,
+ 'specialityDescription': specialityDescription,
+ 'physicalExaminationCondition': physicalExaminationCondition,
+ 'loginUserId': loginUserId,
+ 'remark': remark,
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/progress_note/Clinic.dart b/lib/core/model/SOAP/progress_note/Clinic.dart
new file mode 100644
index 00000000..2e452990
--- /dev/null
+++ b/lib/core/model/SOAP/progress_note/Clinic.dart
@@ -0,0 +1,35 @@
+class SOAPClinic {
+ int? clinicGroupID;
+ String? clinicGroupName;
+ int? clinicID;
+ String? clinicNameArabic;
+ String? clinicNameEnglish;
+
+ SOAPClinic({
+ this.clinicGroupID,
+ this.clinicGroupName,
+ this.clinicID,
+ this.clinicNameArabic,
+ this.clinicNameEnglish,
+ });
+
+ factory SOAPClinic.fromJson(Map json) {
+ return SOAPClinic(
+ clinicGroupID: json['clinicGroupID'],
+ clinicGroupName: json['clinicGroupName'],
+ clinicID: json['clinicID'],
+ clinicNameArabic: json['clinicNameArabic'],
+ clinicNameEnglish: json['clinicNameEnglish'],
+ );
+ }
+
+ Map toJson() {
+ return {
+ 'clinicGroupID': clinicGroupID,
+ 'clinicGroupName': clinicGroupName,
+ 'clinicID': clinicID,
+ 'clinicNameArabic': clinicNameArabic,
+ 'clinicNameEnglish': clinicNameEnglish,
+ };
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/progress_note/PatientCondition.dart b/lib/core/model/SOAP/progress_note/PatientCondition.dart
new file mode 100644
index 00000000..c082c501
--- /dev/null
+++ b/lib/core/model/SOAP/progress_note/PatientCondition.dart
@@ -0,0 +1,11 @@
+class PatientCondition{
+ String? code;
+ int? id;
+ String? name;
+
+ PatientCondition.fromJson(Map json){
+ name = json['name'] ?? '';
+ id = json['id'] ?? -1;
+ code = json['code'] ?? '';
+ }
+}
\ No newline at end of file
diff --git a/lib/core/model/SOAP/progress_note/progress_note.dart b/lib/core/model/SOAP/progress_note/progress_note.dart
new file mode 100644
index 00000000..3afc7be9
--- /dev/null
+++ b/lib/core/model/SOAP/progress_note/progress_note.dart
@@ -0,0 +1,85 @@
+class ProgressNote {
+ int? clinicGroupId;
+ int? clinicId;
+ int? createdById;
+ String? createdOn;
+ int? employeeId;
+ int? hospitalGroupId;
+ int? hospitalId;
+ String? loginUserId;
+ String? manualDate;
+ String? modifiedOn;
+ String? patientCondition;
+ String? patientConditionName;
+ int? patientId;
+ int? patientPomrId;
+ String? progressNote;
+ int? progressNoteId;
+ String? progressNotesTypes;
+ String? progressNotesTypesName;
+ String? speciality;
+ String? specialityName;
+ int? subCategoryId;
+ String? userFullName;
+ int? userId;
+ String? userType;
+
+ ProgressNote();
+
+ ProgressNote.fromJson(Map json) {
+ clinicGroupId = json['clinicGroupId'];
+ clinicId = json['clinicId'];
+ createdById = json['createdById'];
+ createdOn = json['createdOn'];
+ employeeId = json['employeeId'];
+ hospitalGroupId = json['hospitalGroupId'];
+ hospitalId = json['hospitalId'];
+ loginUserId = json['loginUserId'];
+ manualDate = json['manualDate'];
+ modifiedOn = json['modifiedOn'];
+ patientCondition = json['patientCondition'];
+ patientConditionName = json['patientConditionName'];
+ patientId = json['patientId'];
+ patientPomrId = json['patientPomrId'];
+ progressNote = json['progressNote'];
+ progressNoteId = json['progressNoteId'];
+ progressNotesTypes = json['progressNotesTypes'];
+ progressNotesTypesName = json['progressNotesTypesName'];
+ speciality = json['speciality'];
+ specialityName = json['specialityName'];
+ subCategoryId = json['subCategoryId'];
+ userFullName = json['userFullName'];
+ userId = json['userId'];
+ userType = json['userType'];
+ }
+
+ // toJson method
+ Map toJson() {
+ return {
+ 'clinicGroupId': clinicGroupId,
+ 'clinicId': clinicId,
+ 'createdById': createdById,
+ 'createdOn': createdOn,
+ 'employeeId': employeeId,
+ 'hospitalGroupId': hospitalGroupId,
+ 'hospitalId': hospitalId,
+ 'loginUserId': loginUserId,
+ 'manualDate': manualDate,
+ 'modifiedOn': modifiedOn,
+ 'patientCondition': patientCondition,
+ 'patientConditionName': patientConditionName,
+ 'patientId': patientId,
+ 'patientPomrId': patientPomrId,
+ 'progressNote': progressNote,
+ 'progressNoteId': progressNoteId,
+ 'progressNotesTypes': progressNotesTypes,
+ 'progressNotesTypesName': progressNotesTypesName,
+ 'speciality': speciality,
+ 'specialityName': specialityName,
+ 'subCategoryId': subCategoryId,
+ 'userFullName': userFullName,
+ 'userId': userId,
+ 'userType': userType,
+ };
+ }
+}
diff --git a/lib/core/model/patient/patiant_info_model.dart b/lib/core/model/patient/patiant_info_model.dart
index af04e752..4fb49f80 100644
--- a/lib/core/model/patient/patiant_info_model.dart
+++ b/lib/core/model/patient/patiant_info_model.dart
@@ -79,7 +79,7 @@ class PatiantInformtion {
int? status;
int? vcId;
String? voipToken;
-
+ String? pomrId;
PatiantInformtion(
{this.patientDetails,
this.projectId,
@@ -155,7 +155,9 @@ class PatiantInformtion {
this.vcId,
this.voipToken,
this.admissionDateWithDateTimeForm,
- this.appointmentDateWithDateTimeForm});
+ this.appointmentDateWithDateTimeForm,
+ this.pomrId
+ });
PatiantInformtion.fromJson(Map json) {
{
@@ -262,6 +264,7 @@ class PatiantInformtion {
consultationNotes = json['ConsultationNotes'];
patientStatus = json['PatientStatus'];
voipToken = json['VoipToken'];
+ pomrId = json['pomrId'];
admissionDateWithDateTimeForm = json["AdmissionDate"] != null
? AppDateUtils.convertStringToDate(json["AdmissionDate"])
: json["admissionDate"] != null
@@ -340,7 +343,7 @@ class PatiantInformtion {
data['ProjectID'] = this.projectId;
data['VC_ID'] = this.vcId;
data['VoipToken'] = this.voipToken;
-
+ data['pomrId'] = this.pomrId;
data["DateofBirth"] = this.dateofBirth;
data["dob"] = this.dateofBirth;
data['DateOfBirth'] = this.dateofBirth;
diff --git a/lib/core/service/base/lookup-service.dart b/lib/core/service/base/lookup-service.dart
index f1e086a1..b9f6a69f 100644
--- a/lib/core/service/base/lookup-service.dart
+++ b/lib/core/service/base/lookup-service.dart
@@ -214,4 +214,6 @@ class LookupService extends BaseService {
break;
}
}
+
+
}
diff --git a/lib/core/service/patient_medical_file/soap/SOAP_service.dart b/lib/core/service/patient_medical_file/soap/SOAP_service.dart
index ab87eeb8..a1cfd751 100644
--- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart
+++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart
@@ -1,8 +1,28 @@
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/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/allergy/get_allergies_list_vida_plus.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/allergy/get_patient_allergies_list_vida_plus.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/assessment/FavoriteDiseaseDetails.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/assessment/audit_diagnosis.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/assessment/patient_previous_diagnosis.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/assessment/search_diagnosis.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/assessment/patch_assessment_req_model.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/episode_by_chief_complaint_vidaplus.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_vida_plus.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/search_chief_complaint_vidaplus.dart';
import 'package:doctor_app_flutter/core/model/SOAP/general_get_req_for_SOAP.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/get_hopi_details.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/Category.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/CreatePhysicalExamination.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/GeneralSpeciality.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/patient_physical_examination.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/post_physical_examination_model.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/home_medication_vp/GetHomeMedication.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/home_medication_vp/GetSearchCurrentMedication.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/home_medication_vp/GetSearchCurrentMedicationDetails.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart';
@@ -17,10 +37,20 @@ import 'package:doctor_app_flutter/core/model/SOAP/history/post_histories_reques
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_list_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/get_physical_exam_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/post_physical_exam_request_model.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/progress_note/Clinic.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/GetGetProgressNoteResModel.dart';
+import 'package:doctor_app_flutter/core/model/SOAP/progress_note/PatientCondition.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/get_progress_note_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/post_progress_note_request_model.dart';
-
+import 'package:doctor_app_flutter/core/model/SOAP/progress_note/progress_note.dart';
+import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
+import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
+import 'package:doctor_app_flutter/utils/date-utils.dart';
+import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
+import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
+import 'package:doctor_app_flutter/utils/utils.dart';
+import '../../../../config/shared_pref_kay.dart';
+import '../../../../utils/date-utils.dart';
import '../../../model/SOAP/assessment/patch_assessment_req_model.dart';
import '../../../model/patient/patiant_info_model.dart';
import '../../base/lookup-service.dart';
@@ -31,10 +61,40 @@ class SOAPService extends LookupService {
List patientHistoryList = [];
List patientPhysicalExamList = [];
List patientProgressNoteList = [];
+ List patientProgressNoteListVidaPlus = [];
List patientAssessmentList = [];
+ List searchAllergiesList = [];
+ List patientAllergiesVidaPlus = [];
+ List hopiDetails = [];
+ List patientChiefComplaintListVidaPlus = [];
+ List searchChiefComplaintListVidaPlus = [];
+ List episodeByChiefComplaintListVidaPlus =
+ [];
+ List getHomeMedicationList = [];
+ List getSearchCurrentMedication = [];
+ List getSearchCurrentMedicationDetails =
+ [];
+ List patientPreviousDiagnosisList = [];
+ List patientDiagnosisList = [];
+ List favoriteDiagnosisDetailsList = [];
+ List auditDiagnosislist = [];
+ List searchDiagnosisList = [];
+ List patientPhysicalExaminationList = [];
+ List generalSpeciality = [];
+ List clinicsList = [];
+ List patientConditionList = [];
+ Map> specialityDetails = {};
+ Map patientConditionMap = {};
+ Map diagnosisTypeList = {};
+ Map diagnosisTypeTypeMapWithIdAsKey = {};
+ Map conditionTypeList = {};
+ Map conditionTypeMapWithIdAsKey = {};
+ List icdVersionList = [];
+ bool showAuditBottomSheet = false;
int? episodeID;
- bool isPrescriptionOrder =false;
+ bool isPrescriptionOrder = false;
+
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
hasError = false;
@@ -318,22 +378,1224 @@ class SOAPService extends LookupService {
super.error = error;
}, body: getEpisodeForInpatientReqModel.toJson());
}
- Future isPrescriptionOrderCreated(
- PatiantInformtion patientInfo) async {
+
+ Future isPrescriptionOrderCreated(PatiantInformtion patientInfo) async {
hasError = false;
await baseAppClient.post(IS_PRESCRIPTION_ORDER_CREATED,
onSuccess: (dynamic response, int statusCode) {
- print("Success");
-
- isPrescriptionOrder = response['IsPrescriptionCreated'];
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body: {
- "PatientMRN":patientInfo.patientMRN,
- "EncounterNo":patientInfo.appointmentNo,
- "EncounterType":patientInfo.appointmentTypeId,
- "DoctorID":patientInfo.doctorId,
+ print("Success");
+
+ isPrescriptionOrder = response['IsPrescriptionCreated'];
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "PatientMRN": patientInfo.patientMRN,
+ "EncounterNo": patientInfo.appointmentNo,
+ "EncounterType": patientInfo.appointmentTypeId,
+ "DoctorID": patientInfo.doctorId,
+ });
+ }
+
+/* vida plus API allergies */
+
+ Future patientAllergies(PatiantInformtion patientInfo) async {
+ Map request = {
+ "patientId": patientInfo.patientMRN,
+ "ProjectID": patientInfo.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ hasError = false;
+ await baseAppClient.post(PATIENT_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ print("Success");
+ patientAllergiesVidaPlus.clear();
+
+ response['List_PatientAllergies']['resultData'].forEach((v) {
+ patientAllergiesVidaPlus.add(PatientAllergiesVidaPlus.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ Future getEditAllergies(int allergyId) async {
+ hasError = false;
+
+ await baseAppClient.post(GET_EDIT_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ print("Success");
+ searchAllergiesList.clear();
+
+ response['List_SearchAllergies']['resultData'].forEach((v) {
+ searchAllergiesList.add(AllergiesListVidaPlus.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "allergyId": allergyId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ });
+ }
+
+ Future searchAllergies(String searchKey) async {
+ hasError = false;
+
+ await baseAppClient.post(SEARCH_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ print("Success");
+ searchAllergiesList.clear();
+
+ response['List_SearchAllergies']['resultData'].forEach((v) {
+ searchAllergiesList.add(AllergiesListVidaPlus.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ searchAllergiesList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "AllergyName": searchKey,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ });
+ }
+
+ Future addAllergies(AllergiesListVidaPlus allergy,
+ PatiantInformtion patientInfo, bool isNoKnown) async {
+ var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
+
+ if (!isNoKnown) {
+ allergy.allergyReactionDTOs!.forEach((value) {
+ value.patientID = patientInfo.patientMRN;
+ value.pomrid = int.parse(patientInfo.pomrId!);
+ value.allergyReactionMappingID = 1;
+ value.severity = value.severity ?? 1;
+ });
+ }
+ allergy.allergyReactionDTOs?.forEach((value) {
+ value.hospitalGroupID = hospitalGroudpId;
+ value.hospitalID = patientInfo.projectId;
+ });
+
+ var request = {
+ "patientsAllergyRevisionID": allergy.allergyRevisionID,
+ "patientMRN": patientInfo.patientMRN,
+ "allergyDiseaseType": 0,
+ "allergyTypeName": allergy.allergyTypeName,
+ "episodeId": patientInfo.episodeNo,
+ "isUpdatedByNurse": false,
+ "remarks": allergy.remark,
+ "createdBy": patientInfo.doctorId,
+ "createdOn": AppDateUtils.convertDateToFormat(
+ DateTime.now(), "yyyy-MM-dd kk:mm:ss"),
+ "assessmentId": 0,
+ "isActive": allergy.isActive,
+ "isActivePatientsAllergy": true,
+ "patientsAllergyReactionsDTOs": allergy.allergyReactionDTOs,
+ "dbCRUDOperation": 1,
+ "allergyID": allergy.allergyID,
+ "allergyName": allergy.allergyName,
+ "allergyTypeID": allergy.allergyTypeID,
+ };
+
+ if (isNoKnown) {
+ request['isAllergy'] = 'NO_KNOWN_ALLERGIES';
+ request['allergyName'] = "No Known Allergies";
+ request['userType'] = 'DOCTOR';
+ request['allergyTypeID'] = request['allergyID'] = 0;
+ request['isActive'] = true;
+ request['remarks'] = "";
+ request['isActivePatientsAllergy'] = true;
+ request['patientsAllergyReactionsDTOs'] = [];
+ }
+
+ hasError = false;
+
+ await baseAppClient.post(POST_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast("Allergies Saved Successfully");
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "listProgNotePatientAllergyDiseaseVM": [request],
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ });
+ }
+
+ Future resolveAllergies(
+ PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async {
+ /*changed request parameters based on the vida plus requested */
+
+ var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
+ var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
+
+ List? reaction =
+ allergy.patientsAllergyReactionsDTOs!;
+ List? reactionRequest = [];
+ reaction.forEach((value) async {
+ reactionRequest.add(AllergyReactionDTOs(
+ patientID: patientInfo.patientMRN,
+ pomrid: int.parse(patientInfo.pomrId!),
+ hospitalGroupID: hospitalGroudpId,
+ allergyReactionMappingID: 0,
+ hospitalID: patientInfo.projectId,
+ isActive: value.isActive,
+ allergyReactionID: value.allergyReactionID,
+ allergyReactionName: value.allergyReactionName,
+ severity: value.severity));
+ });
+
+ var request = {
+ "pomrId": patientInfo.pomrId,
+ "patientMRN": patientInfo.patientMRN,
+ "allergyTypeName": allergy.allergyTypeName,
+ "assessmentId": 0,
+ "isActive": allergy.isActivePatientsAllergy,
+ "patientsAllergyReactionsDTOs": reactionRequest,
+ "dbCRUDOperation": 2,
+ "allergyID": allergy.allergyID,
+ "allergyName": allergy.allergyName,
+ "allergyTypeID": allergy.allergyTypeID,
+ "remarks": allergy.remark,
+ "projectId": patientInfo.projectId,
+ "editedBy": doctorProfile['List_MemberInformation'][0]['MemberID'],
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ hasError = false;
+ await baseAppClient.post(RESOLVE_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast("Resolved Successfully");
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "listProgNotePatientAllergyDiseaseVM": [request]
+ });
+ }
+
+ Future updateAllergies(
+ PatientAllergiesVidaPlus allergy, PatiantInformtion patientInfo) async {
+ var doctorProfile = await sharedPref.getObj(LOGGED_IN_USER);
+ var hospitalGroudpId = await sharedPref.getString(DOCTOR_SETUP_ID);
+ List? reaction =
+ allergy.patientsAllergyReactionsDTOs!;
+ List? reactionRequest = [];
+ reaction.forEach((value) {
+ reactionRequest.add(AllergyReactionDTOs(
+ patientID: patientInfo.patientMRN,
+ pomrid: int.parse(patientInfo.pomrId!),
+ hospitalGroupID: hospitalGroudpId,
+ allergyReactionMappingID: 0,
+ hospitalID: patientInfo.projectId,
+ isActive: value.isActive,
+ allergyReactionID: value.allergyReactionID,
+ allergyReactionName: value.allergyReactionName,
+ severity: value.severity));
+ });
+
+ var request = {
+ "pomrId": patientInfo.pomrId,
+ "patientMRN": patientInfo.patientMRN,
+ "allergyTypeName": allergy.allergyTypeName,
+ "assessmentId": 0,
+ "isActive": allergy.isActivePatientsAllergy,
+ "isActivePatientsAllergy": allergy.isActivePatientsAllergy,
+ "patientsAllergyReactionsDTOs": reactionRequest,
+ "dbCRUDOperation": 2,
+ "allergyID": allergy.allergyID,
+ "allergyName": allergy.allergyName,
+ "allergyTypeID": allergy.allergyTypeID,
+ "remarks": allergy.remark,
+ "projectId": patientInfo.projectId,
+ "editedBy": doctorProfile['List_MemberInformation'][0]['MemberID'],
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+
+ hasError = false;
+
+ await baseAppClient.post(UPDATE_ALLERGIES,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast("Allergies Updated Successfully");
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: {
+ "listProgNotePatientAllergyDiseaseVM": [request]
+ });
+ }
+
+ saveHopi(Map req, PatiantInformtion patient) async {
+ var request = {
+ "clinicGroupId": patient.clinicGroupId, // patient.clinicGroupId
+ "clinicId": patient.clinicId,
+ "doctorId": patient.doctorId,
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID), //setup
+ "hospitalId": patient.projectId, //projectid
+ "patientId": patient.patientMRN,
+ "patientPomrId": patient.pomrId,
+ };
+ Map finalRequest = {}
+ ..addAll(request)
+ ..addAll(req);
+ hasError = false;
+ bool success = false;
+ await baseAppClient.post(CREATE_HOPI,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast("History Saved Successfully");
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ DrAppToastMsg.showErrorToast(error);
+ super.error = error;
+ }, body: finalRequest);
+ return success;
+ }
+
+ getHopi(PatiantInformtion patient) async {
+ Map request = {
+ "patientId": patient.patientMRN,
+ "pomrId": patient.pomrId,
+ };
+ hasError = false;
+ hopiDetails.clear();
+ await baseAppClient.post(HOPI_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['DetailHOPI']['resultData'].forEach((v) {
+ hopiDetails.add(GetHopiDetails.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getChiefComplaint(PatiantInformtion patient) async {
+ Map request = {
+ "ProjectID": patient.projectId,
+ "pomrId": patient.pomrId,
+ };
+ hasError = false;
+ patientChiefComplaintListVidaPlus.clear();
+ await baseAppClient.post(GET_CHIEF_COMPLAINT_VP,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListChiefComplaintDetails']['resultData'].forEach((v) {
+ patientChiefComplaintListVidaPlus
+ .add(GetChiefComplaintVidaPlus.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ DrAppToastMsg.showErrorToast(error);
+ }, body: request);
+ }
+
+ postChiefComplaintVidaPlus(
+ PatiantInformtion patient, String cheifComplaint) async {
+ Map request = {
+ "ListCreateChiefComplaint": [
+ {
+ "appointmentNo": patient.appointmentNo,
+ "pomrId": patient.pomrId,
+ "patientMRN": patient.patientMRN,
+ "chiefComplaint": cheifComplaint,
+ }
+ ],
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ hasError = false;
+ await baseAppClient.post(POST_CHIEF_COMPLAINT_VP,
+ onSuccess: (dynamic response, int statusCode) {
+ print("Success");
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ searchChiefComplaintVidaPlus(PatiantInformtion patient, String CC) async {
+ Map request = {
+ "doctorId": patient.doctorId,
+ "searchParam": CC,
+ };
+ hasError = false;
+ searchChiefComplaintListVidaPlus.clear();
+ await baseAppClient.post(SEARCH_CHIEF_COMPLAINT_VP,
+ onSuccess: (dynamic response, int statusCode) {
+ searchChiefComplaintListVidaPlus.clear();
+ //
+ response['List_SearchChiefComplaint']['resultData'].forEach((v) {
+ searchChiefComplaintListVidaPlus.add(SearchChiefComplaint.fromJson(v));
+ });
+ }, onFailure: (String error, int statusCode) {
+ searchChiefComplaintListVidaPlus.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ searchDiagnosis(PatiantInformtion patient, String diagnosis) async {
+ Map request = {
+ "diseaseCode": diagnosis,
+ };
+ hasError = false;
+ clearSearchResult();
+
+ await baseAppClient.post(SEARCH_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['List_Diagnosis']['resultData']
+ .forEach((v) => searchDiagnosisList.add(SearchDiagnosis.fromJson(v)));
+ _processData();
+ }, onFailure: (String error, int statusCode) {
+ clearSearchResult();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ clearSearchResult() {
+ searchDiagnosisList.clear();
+ icdVersionList.clear();
+ }
+
+ void _processData() {
+ Set icdVersions = {};
+ for (var item in searchDiagnosisList) {
+ if (item.icdVersion != null) {
+ icdVersions.addAll(item.icdVersion ?? []);
+ }
+ }
+ icdVersionList = icdVersions.toList();
+ }
+
+ SearchDiagnosis? findParent(String selectedICD) {
+ for (var item in searchDiagnosisList) {
+ if (item.icdVersion != null &&
+ (item.icdVersion as List).contains(selectedICD)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ getDiagnosisType(PatiantInformtion patient) async {
+ Map request = {};
+ hasError = false;
+ diagnosisTypeList.clear();
+ await baseAppClient.post(DIAGNOSIS_TYPE,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDiagnosisTypeModel']['resultData']
+ .forEach((v) {
+ diagnosisTypeList[v['name']] = v['diagnosisType'];
+ diagnosisTypeTypeMapWithIdAsKey[v['diagnosisType']] = v['name'];
+ });
+ }, onFailure: (String error, int statusCode) {
+ searchChiefComplaintListVidaPlus.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getConditionType(PatiantInformtion patient) async {
+ Map request = {};
+ hasError = false;
+ conditionTypeList.clear();
+ await baseAppClient.post(CONDITION_TYPE,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDiagnosisCondition']['resultData']
+ .forEach((v) => conditionTypeList[v['itemName']] = v['id']);
+ ;
+ response['ListDiagnosisCondition']['resultData']
+ .forEach((v) => conditionTypeMapWithIdAsKey[v['id']] = v['itemName']);
+ ;
+ }, onFailure: (String error, int statusCode) {
+ searchChiefComplaintListVidaPlus.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ auditDiagnosis(
+ PatiantInformtion patient,
+ String patientProblemRevisionID,
+ ) async {
+ print('the setup id is ${await sharedPref.getString(DOCTOR_SETUP_ID)}');
+ Map request = {
+ "patientProblemRevisionId": patientProblemRevisionID,
+ "ProjectID": patient.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ hasError = false;
+ auditDiagnosislist.clear();
+ await baseAppClient.post(AUDIT_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDaignosisAudit']['resultData']
+ .forEach((v) => auditDiagnosislist.add(AuditDiagnosis.fromJson(v)));
+ showAuditBottomSheet = auditDiagnosislist.isNotEmpty;
+ }, onFailure: (String error, int statusCode) {
+ auditDiagnosislist.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getPreviousDiagnosis(PatiantInformtion patient) async {
+ Map request = {
+ "HospitalGroupID": await sharedPref.getString(DOCTOR_SETUP_ID), //setup
+ "hospitalId": patient.projectId,
+ "patientId": patient.patientId,
+ "patientPomrId": patient.pomrId,
+ "startRow": 0,
+ "endRow": 1000,
+ "ProjectID": patient.projectId
+ //todo just for the test as the create diagnosis is still not working
+ // "HospitalGroupID": 105,
+ // "hospitalId": 313,
+ // "patientId": 70010976,
+ // "patientPomrId": 8414,
+ // "startRow": 0,
+ // "endRow": 2,
+ // "ProjectID": 313
+ };
+ hasError = false;
+ patientPreviousDiagnosisList.clear();
+ await baseAppClient.post(PREVIOUS_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDiagnosisPrviousDetials']['resultData'].forEach((v) =>
+ patientPreviousDiagnosisList
+ .add(PatientPreviousDiagnosis.fromJson(v)));
+ }, onFailure: (String error, int statusCode) {
+ patientPreviousDiagnosisList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getDiagnosis(PatiantInformtion patient) async {
+ Map request = {
+ // "hospitalGroupId": 105,
+ // "hospitalId": 313,
+ // "patientId": 70023498,
+ // "patientPomrId": 9907,
+ // "startRow": 0,
+ // "endRow": 10,
+ // "isSelected": true,
+ // "ProjectID": 313
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "hospitalId": patient.projectId,
+ "patientId": patient.patientId,
+ "patientPomrId": patient.pomrId,
+ "startRow": 0,
+ "endRow": 1000000,
+ "ProjectID": patient.projectId
+ };
+ hasError = false;
+ await baseAppClient.post(GET_LIST_OF_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ patientDiagnosisList.clear();
+ response['ListDiagnosisDetailsSearch']['resultData'].forEach((v) =>
+ patientDiagnosisList.add(PatientPreviousDiagnosis.fromJson(v)));
+ }, onFailure: (String error, int statusCode) {
+ patientDiagnosisList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ removeDiagnosis(PatiantInformtion patientInfo, String? patientProblemId,
+ String? problemId, String? deletedRemarks) async {
+ Map request = {
+ "patientProblemId": patientProblemId,
+ "patientId": patientInfo.patientId,
+ "problemId": problemId,
+ "deletedRemarks": deletedRemarks,
+ "ProjectID": patientInfo.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ //todo just for the test as the create diagnosis is still not working
+ // "patientProblemId": 13691,
+ // "patientId": 70010986,
+ // "problemId": 41698,
+ // "deletedRemarks": "kethees test",
+ // "ProjectID": 313,
+ // "setupId": 105
+ };
+ hasError = false;
+ var success = false;
+ patientPreviousDiagnosisList.clear();
+ await baseAppClient.post(REMOVE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast(response['ListDiagnosisRemove']['message']);
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ patientPreviousDiagnosisList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ return success;
+ }
+
+ favoriteDiagnosis(
+ PatiantInformtion patientInfo,
+ ) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+
+ Map request = {
+ "projectId": patientInfo.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "userId": user?['List_MemberInformation'][0]['MemberID'],
+ "favoritesType": "DIAGNOSIS",
+ "clinicId": patientInfo.clinicId,
+ "ProjectID": patientInfo.projectId,
+ };
+ hasError = false;
+ favoriteDiagnosisDetailsList.clear();
+ await baseAppClient.post(FAVORITE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDiagnosisGetFavourite']['resultData'].forEach((v) =>
+ favoriteDiagnosisDetailsList.add(FavoriteDiseaseDetails.fromJson(v)));
+ }, onFailure: (String error, int statusCode) {
+ favoriteDiagnosisDetailsList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getPhysicalExamination(
+ PatiantInformtion patientInfo,
+ ) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+
+ Map request =
+ // {
+ // "patientId": 70024978,
+ // "pomrId": 10819,
+ // "hospitalId": 313,
+ // "hospitalGroupId": 105,
+ // "ProjectID": 313
+ // };
+
+ {
+ "patientId": patientInfo.patientId,
+ "pomrId": patientInfo.pomrId,
+ "hospitalId": patientInfo.projectId,
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "ProjectID": patientInfo.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ hasError = false;
+ patientPhysicalExaminationList.clear();
+ await baseAppClient.post(SEARCH_PHYSICAL_EXAMINATION,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListPhysicalExam']['resultData'].forEach((v) =>
+ patientPhysicalExaminationList
+ .add(PatientPhysicalExamination.fromJson(v)));
+ }, onFailure: (String error, int statusCode) {
+ physicalExaminationList.clear();
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ Future postPhysicalExamination(
+ PatiantInformtion patientInfo, List physicalExamination) async {
+ List jsonListOfPhysicalExamination = [];
+ physicalExamination.forEach((value) => jsonListOfPhysicalExamination
+ .add(value.createPhysicalExaminationFromCategory()));
+
+ Map request = {
+ "ProjectID": patientInfo.projectId,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "listCreatPhysicalExam": jsonListOfPhysicalExamination
+ };
+ hasError = false;
+ var success = false;
+ await baseAppClient.post(POST_PHYSICAL_EXAM,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast(response['ListPhysicalExam']['message']);
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ success = false;
+ }, body: request);
+
+ return success;
+ }
+
+ getGeneralSpeciality(PatiantInformtion patientInfo) async {
+ Map request = {
+ "ProjectID": patientInfo.projectId,
+ };
+ hasError = false;
+ generalSpeciality.clear();
+ await baseAppClient.post(GET_GENERAL_SPECIALITY,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListGeneralSpeciality']['resultData'].forEach((v) =>
+ v['categories'].forEach(
+ (cat) => generalSpeciality.add(GeneralSpeciality.fromJson(cat))));
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ generalSpeciality.clear();
+ super.error = error;
+ }, body: request);
+ }
+
+ Future addToFavoriteDiagnosis(PatiantInformtion paitientInfo,
+ String doctorName, String subFavoriteCode, dynamic? userId) async {
+ Map request = {
+ "ProjectID": paitientInfo.projectId,
+ "listDiagnosisFavourite": [
+ {
+ "createdBy": doctorName,
+ "favoritesType": "DIAGNOSIS",
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "hospitalId": paitientInfo.projectId,
+ "subFavoritesCode": subFavoriteCode,
+ "userId": userId
+ }
+ ]
+ };
+ hasError = false;
+ var isFavoriteAdded = false;
+ await baseAppClient.post(ADD_TO_FAVORITE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ var result = response['ListDiagnosisAddFavourite']['resultData'];
+ isFavoriteAdded = true;
+ if ((result is List) && (result as List).isEmpty) {
+ if (response['ListDiagnosisAddFavourite']['message'] != null)
+ DrAppToastMsg.showErrorToast(
+ response['ListDiagnosisAddFavourite']['message']);
+ else
+ DrAppToastMsg.showErrorToast("Unable to Add");
+ } else {
+ if (response['ListDiagnosisAddFavourite']['message'] != null)
+ DrAppToastMsg.showSuccesToast(
+ response['ListDiagnosisAddFavourite']['message']);
+ else
+ DrAppToastMsg.showErrorToast("Diagnosis Added To Favorite");
+ }
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ isFavoriteAdded = false;
+ super.error = error;
+ }, body: request);
+
+ return isFavoriteAdded;
+ }
+
+ Future convertPreviousDiagnosisCurrent(
+ PatiantInformtion patient, PatientPreviousDiagnosis diagnosis) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+ Map request = {
+ "patientProblemRevisionId": diagnosis.patientProblemRevisionId,
+ "patientId": patient.patientId,
+ "doctorId": patient.doctorId,
+ "pomrId": patient.pomrId,
+ "appointmentId": patient.appointmentNo,
+ "createdBy": patient.doctorId,
+ "hospitalId": patient.projectId,
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "clinicGroupId": diagnosis.clinicGroupId ?? patient.clinicGroupId,
+ "clinicId": diagnosis.clinicId,
+ "isSelected": true,
+ "ProjectID": patient.projectId
+ };
+ hasError = false;
+ var success = false;
+ await baseAppClient.post(MAKE_PREVIOUS_AS_CURRENT_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) async {
+ DrAppToastMsg.showSuccesToast(
+ response['ContinuePreviousEpisode']['message']);
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ return success;
+ }
+
+ Future getProgressNoteNew(PatiantInformtion patientInformation) async {
+ Map request = {
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "hospitalId": patientInformation.projectId,
+ "patientId": patientInformation.patientId,
+ "patientPomrId": patientInformation.pomrId,
+ "endRow": 10000, // because no information is provided for the end row
+ "startRow": 0,
+ "ProjectID": patientInformation.projectId
+ };
+ hasError = false;
+ patientProgressNoteListVidaPlus.clear();
+ await baseAppClient.post(GET_PROGRESS_NOTE,
+ onSuccess: (dynamic response, int statusCode) {
+ print("Success");
+ response['ListProgressNote']['resultData'].forEach((v) {
+ v['data'].forEach((progressNote) {
+ patientProgressNoteListVidaPlus
+ .add(ProgressNote.fromJson(progressNote));
});
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ }
+
+ getSpecialityDetails(String speciality, int? specialityId,
+ PatiantInformtion patientInfo) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+ var userId = user?['List_MemberInformation'][0]['MemberID'];
+ Map request = {"searchParam": speciality};
+ hasError = false;
+ specialityDetails.clear();
+ List categoryData = [];
+ await baseAppClient.post(GET_SPECIALITY_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListEyeGeneralSpeciality']['resultData'].forEach((value) =>
+ categoryData.add(Category.fromJson(
+ value,
+ specialityId,
+ speciality,
+ patientInfo.pomrId,
+ patientInfo.patientId,
+ user?['List_MemberInformation'][0]['MemberID'])));
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: request);
+ if (!hasError) {
+ specialityDetails[speciality] = categoryData;
+ }
+ }
+
+ Future createDiagnosis(
+ PatiantInformtion patient,
+ SearchDiagnosis? searchDiagnosis,
+ String? diagnosisType,
+ String conditionType,
+ String remarks,
+ bool isNew) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+ var mappedConditionValue = conditionTypeList[conditionType] ?? '';
+
+ var request = {
+ "pomrId": patient.pomrId,
+ "appointmentId": patient.appointmentNo,
+ "clinicGroupId": patient.clinicGroupId,
+ "clinicId": patient.clinicId,
+ "patientId": patient.patientId,
+ "hospitalId": patient.projectId,
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "diagnosisType": diagnosisType,
+ "condition": mappedConditionValue,
+ "remarks": remarks,
+ "icdType": searchDiagnosis!.icdType,
+ // "icdVersion": searchDiagnosis.icdVersion,
+ "icdSubVersion": searchDiagnosis.icdSubVersion,
+ "isNew": isNew,
+ "specificationId": searchDiagnosis.specificationId,
+ "selectedDisease": searchDiagnosis.diseasesName,
+ "diseasesCode": searchDiagnosis.diseasesCode,
+ "diseasesId": searchDiagnosis.diseasesId,
+ "selectedIcdCode": searchDiagnosis.selectedIcdCode,
+ "selectedCategoryCode": searchDiagnosis.selectedCategoryCode,
+ "selectedSectionCode": searchDiagnosis.selectedSectionCode,
+ "selectedChapterCode": searchDiagnosis.selectedChapterCode,
+ "selectedNandaCode": searchDiagnosis.selectedNandaCode,
+ "isResolved": false,
+ "doctorId": patient.doctorId,
+ "doctorCode": user?['List_MemberInformation'][0]['MemberID'],
+ "ProjectID": patient.projectId,
+ "codeRange": searchDiagnosis.codeRange
+ };
+ var success = false;
+ await baseAppClient.post(CREATE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast(response['CreatDiagnosis']['message']);
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future createDiagnosisFromFavorite(
+ PatiantInformtion patient,
+ FavoriteDiseaseDetails? searchDiagnosis,
+ String? diagnosisType,
+ String conditionType,
+ String remarks,
+ bool isNew) async {
+ Map? user = await sharedPref.getObj(LOGGED_IN_USER);
+ var mappedConditionValue = conditionTypeList[conditionType] ?? '';
+ var request = {
+ "pomrId": patient.pomrId,
+ "appointmentId": patient.appointmentNo,
+ "clinicGroupId": patient.clinicGroupId,
+ "clinicId": patient.clinicId,
+ "patientId": patient.patientId,
+ "hospitalId": patient.projectId,
+ "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID),
+ "diagnosisType": diagnosisType,
+ "condition": mappedConditionValue,
+ "remarks": remarks,
+ "icdType": searchDiagnosis!.icdType,
+ "selectedIcdCode": searchDiagnosis.diseasesCode,
+ "selectedNandaCode": searchDiagnosis.diseasesCode,
+ // "icdVersion": searchDiagnosis.icdVersion,
+ "icdSubVersion": searchDiagnosis.icdSubVersion,
+ "isNew": isNew,
+ "specificationId": searchDiagnosis.specificationId,
+ "selectedDisease": searchDiagnosis.diseases,
+ "diseasesCode": searchDiagnosis.diseasesCode,
+ "diseasesId": searchDiagnosis.diseasesId,
+ // "selectedIcdCode": searchDiagnosis.icdId,
+ "selectedCategoryCode": searchDiagnosis.categoryCode,
+ "selectedSectionCode": searchDiagnosis.sectionCode,
+ "selectedChapterCode": searchDiagnosis.chapterCode,
+ // "selectedNandaCode": searchDiagnosis.selectedNandaCode,
+ "isResolved": false,
+ "doctorId": patient.doctorId,
+ "doctorCode": user?['List_MemberInformation'][0]['MemberID'],
+ "ProjectID": patient.projectId,
+ "codeRange": searchDiagnosis.codeRange
+ };
+ var success = false;
+ await baseAppClient.post(CREATE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ DrAppToastMsg.showSuccesToast(response['CreatDiagnosis']['message']);
+ success = true;
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future createProgressNote(
+ PatiantInformtion patient,
+ String? clinicID,
+ String conditionType,
+ String note,
+ ) async {
+ Map request = {
+ "planNote": note,
+ "PatientMRN": patient.patientMRN,
+ "EpisodeID": patient.pomrId,
+ "CreatedByName": patient.doctorName,
+ "CreatedBy": patient.doctorId,
+ "Speciality": clinicID,
+ "ProgressNotesTypes": "DOCTOR_NOTE",
+ "PatientCondition": conditionType,
+ "ProjectID": patient.projectId
+ };
+ var success = false;
+ await baseAppClient.post(CREATE_PROGRESS_NOTE,
+ onSuccess: (dynamic response, int statusCode) {
+ if (response['ListCreateProgressNote'] != null) {
+ DrAppToastMsg.showSuccesToast(
+ response['ListCreateProgressNote']['message']);
+ success = true;
+ }
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future editDiagnosis(PatientPreviousDiagnosis diagnosis) async {
+ var request = diagnosis.toJson();
+ var success = false;
+ await baseAppClient.post(EDIT_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ if (response['ListVisitWisePatientDiagnosis']['resultData'] != null &&
+ (response['ListVisitWisePatientDiagnosis']['resultData'] as List)
+ .isNotEmpty) {
+ success = true;
+ return;
+ }
+ success = false;
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future resolveDiagnosis(PatientPreviousDiagnosis diagnosis) async {
+ var request = {
+ "patientProblemRevisionId": diagnosis.patientProblemRevisionId,
+ "patientProblemId": diagnosis.patientProblemId,
+ "patientId": diagnosis.patientId,
+ "doctorId": diagnosis.doctorId,
+ "pomrId": diagnosis.pomrId,
+ "appointmentId": diagnosis.appointmentId ?? 0,
+ "problemId": diagnosis.problemId,
+ "diagnosisType": diagnosis.diagnosisType,
+ "setupId": await sharedPref.getString(DOCTOR_SETUP_ID)
+ };
+ var success = false;
+ await baseAppClient.post(RESOLVE_DIAGNOSIS,
+ onSuccess: (dynamic response, int statusCode) {
+ if (response['ListDiagnosisResolve'] != null &&
+ response['ListDiagnosisResolve']['resultData'] != null &&
+ (response['ListDiagnosisResolve']['resultData'] as List).isNotEmpty) {
+ success = true;
+ }
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ DrAppToastMsg.showErrorToast(error);
+
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future getClinic() async {
+ Map request = {};
+ var success = false;
+ await baseAppClient.post(GET_CLINIC,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListDoctorClinics']
+ .forEach((v) => clinicsList.add(SOAPClinic.fromJson(v)));
+ success = false;
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future getPatientCondition() async {
+ Map request = {};
+ var success = false;
+ patientConditionList.clear();
+ patientConditionMap.clear();
+ await baseAppClient.post(GET_PATIENT_CLINIC,
+ onSuccess: (dynamic response, int statusCode) {
+ response['ListPatientConditionProgress']['resultData'].forEach((v) =>
+ v['PATIENT_CONDITION'].forEach((item) {
+ patientConditionList.add(PatientCondition.fromJson(item));
+ patientConditionMap[item['code']]= item['name'];
+ }));
+ success = false;
+ }, onFailure: (String error, int statusCode) {
+ success = false;
+ hasError = true;
+ super.error = error;
+ }, body: request);
+
+ return success;
+ }
+
+ Future continueEpisodeVidaPlus(
+ PatiantInformtion patient, List chiefComplaint) async {
+ List