Compare commits

...

33 Commits

Author SHA1 Message Date
Aamir Muhammad 528a256e09 Voip Call 2 years ago
Sultan khan 9e122748e9 updated 2 years ago
Sultan khan aee83ce930 spacing added 2 years ago
Sultan khan 08c0c0abc1 doctor rota 2 years ago
Sultan khan b5851f384d DOCTOR ROTA AND LAB RAD CHANGES 2 years ago
Sultan khan 320af7d9e0 patch allergies updated. 3 years ago
Sultan khan bee21f1123 scroll added on add assessment 3 years ago
haroon amjad fde016c38b updates 3 years ago
Sultan khan 8b515ee14d progress not updated 3 years ago
Sultan khan 8428c2f632 Merge branch 'development-3.3' of http://34.17.52.79/Haroon6138/doctor_app_flutter into development-3.3
# Conflicts:
#	lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart
3 years ago
Sultan khan 324792d957 post assessment fix 3 years ago
haroon amjad f0204fcbb0 updates & fixes 3 years ago
haroon amjad 793f9ff905 add assessment updated 3 years ago
Sultan khan 5e63db7ea6 bug fixes and updates 3 years ago
haroon amjad 0d65197b2f updates & fixes 3 years ago
haroon amjad d2a16f5357 updates & fixes 3 years ago
haroon amjad e530646c28 VidaPlus changes for radiology 3 years ago
haroon amjad 1a67129a85 radiology fixes 3 years ago
haroon amjad fc21961807 updates & fixes 3 years ago
haroon amjad 4741a7b66d podfile 3 years ago
haroon amjad c50100613a updates 3 years ago
Sultan khan 2b13d43757 bug fixes 3 years ago
haroon amjad 0861a0c79f updates 3 years ago
haroon amjad 90382a1b27 Create Episode fixes 3 years ago
haroon amjad ac74e1e62d updates 3 years ago
haroon amjad 92c665197d SetupID made dynamic 3 years ago
haroon amjad 3b3e911af3 Search medicine bug fixed 3 years ago
haroon amjad 73ce9d02b8 chart fixes 3 years ago
haroon amjad 5d4aeff350 Updates & fixes 3 years ago
Sultan khan 51a8a93de1 pharmacy intervention null issue 3 years ago
Sultan khan b2773aa320 ios fixed for speech to text 3 years ago
mirza.shafique 705c9f6fb8 android fixes 3 years ago
Sultan khan ba5f29ee9f updated code for v.3.3 3 years ago

@ -26,11 +26,11 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 33
signingConfigs { signingConfigs {
release { release {
storeFile file('/Users/nextwo/Desktop/Elham/keys/doctor app key') storeFile file('/Users/mohamedmekawy/Documents/Work/DoctorApp/android/doctor_app_key')
storePassword 'Hmgdoctor1234' storePassword 'Hmgdoctor1234'
keyAlias 'hmgdoctor' keyAlias 'hmgdoctor'
keyPassword 'Hmgdoctor1234' keyPassword 'Hmgdoctor1234'
@ -49,7 +49,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hmg.hmgDr" applicationId "com.hmg.hmgDr"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 33
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -41,6 +41,7 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:exported="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

@ -17,8 +17,8 @@ import android.widget.Toast
import androidx.annotation.NonNull import androidx.annotation.NonNull
import com.google.gson.GsonBuilder import com.google.gson.GsonBuilder
import com.hmg.hmgDr.Service.VideoStreamFloatingWidgetService import com.hmg.hmgDr.Service.VideoStreamFloatingWidgetService
import com.hmg.hmgDr.model.GetSessionStatusModel import com.hmg.hmgDr.Model.GetSessionStatusModel
import com.hmg.hmgDr.model.SessionStatusModel import com.hmg.hmgDr.Model.SessionStatusModel
import com.hmg.hmgDr.ui.VideoCallResponseListener import com.hmg.hmgDr.ui.VideoCallResponseListener
import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine import io.flutter.embedding.engine.FlutterEngine

@ -133,10 +133,10 @@ abstract class BaseMovingFloatingWidget : Service() {
return true return true
} }
override fun onDoubleTap(e: MotionEvent?): Boolean { // override fun onDoubleTap(e: MotionEvent?): Boolean {
miniCircleDoubleTap() // miniCircleDoubleTap()
return super.onDoubleTap(e) // return super.onDoubleTap(e)
} // }
} }

@ -1,8 +1,8 @@
package com.hmg.hmgDr.Service; package com.hmg.hmgDr.Service;
import com.hmg.hmgDr.model.ChangeCallStatusRequestModel; import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
import com.hmg.hmgDr.model.GetSessionStatusModel; import com.hmg.hmgDr.Model.GetSessionStatusModel;
import com.hmg.hmgDr.model.SessionStatusModel; import com.hmg.hmgDr.Model.SessionStatusModel;
import retrofit2.Call; import retrofit2.Call;

@ -17,6 +17,9 @@ import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.view.GestureDetectorCompat import androidx.core.view.GestureDetectorCompat
import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel
import com.hmg.hmgDr.Model.GetSessionStatusModel
import com.hmg.hmgDr.Model.SessionStatusModel
import com.hmg.hmgDr.R import com.hmg.hmgDr.R
import com.hmg.hmgDr.model.* import com.hmg.hmgDr.model.*
import com.hmg.hmgDr.ui.VideoCallContract import com.hmg.hmgDr.ui.VideoCallContract

@ -1,4 +1,4 @@
package com.hmg.hmgDr.model; package com.hmg.hmgDr.Model;
import android.os.Parcel; import android.os.Parcel;

@ -1,4 +1,4 @@
package com.hmg.hmgDr.model; package com.hmg.hmgDr.Model;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

@ -1,4 +1,4 @@
package com.hmg.hmgDr.model; package com.hmg.hmgDr.Model;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

@ -1,8 +1,8 @@
package com.hmg.hmgDr.ui; package com.hmg.hmgDr.ui;
import com.hmg.hmgDr.model.ChangeCallStatusRequestModel; import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
import com.hmg.hmgDr.model.GetSessionStatusModel; import com.hmg.hmgDr.Model.GetSessionStatusModel;
import com.hmg.hmgDr.model.SessionStatusModel; import com.hmg.hmgDr.Model.SessionStatusModel;
public interface VideoCallContract { public interface VideoCallContract {

@ -1,8 +1,8 @@
package com.hmg.hmgDr.ui; package com.hmg.hmgDr.ui;
import com.hmg.hmgDr.model.ChangeCallStatusRequestModel; import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel;
import com.hmg.hmgDr.model.GetSessionStatusModel; import com.hmg.hmgDr.Model.GetSessionStatusModel;
import com.hmg.hmgDr.model.SessionStatusModel; import com.hmg.hmgDr.Model.SessionStatusModel;
import com.hmg.hmgDr.Service.AppRetrofit; import com.hmg.hmgDr.Service.AppRetrofit;
import com.hmg.hmgDr.Service.SessionStatusAPI; import com.hmg.hmgDr.Service.SessionStatusAPI;

@ -20,9 +20,9 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.view.GestureDetectorCompat import androidx.core.view.GestureDetectorCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.hmg.hmgDr.model.ChangeCallStatusRequestModel import com.hmg.hmgDr.Model.ChangeCallStatusRequestModel
import com.hmg.hmgDr.model.GetSessionStatusModel import com.hmg.hmgDr.Model.GetSessionStatusModel
import com.hmg.hmgDr.model.SessionStatusModel import com.hmg.hmgDr.Model.SessionStatusModel
import com.hmg.hmgDr.R import com.hmg.hmgDr.R
import com.hmg.hmgDr.ui.VideoCallContract.VideoCallPresenter import com.hmg.hmgDr.ui.VideoCallContract.VideoCallPresenter
import com.hmg.hmgDr.ui.VideoCallContract.VideoCallView import com.hmg.hmgDr.ui.VideoCallContract.VideoCallView
@ -143,8 +143,9 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
return R.style.dialogTheme return R.style.dialogTheme
} }
@SuppressLint("UseRequireInsteadOfGet")
override fun onCreateDialog(@Nullable savedInstanceState: Bundle?): Dialog {// FullScreenVideoTheme override fun onCreateDialog(@Nullable savedInstanceState: Bundle?): Dialog {// FullScreenVideoTheme
val layoutInflater = activity!!.layoutInflater val layoutInflater = requireActivity().layoutInflater
this.parentView = onCreateView(layoutInflater, null) this.parentView = onCreateView(layoutInflater, null)
val alertDialogBuilder: AlertDialog.Builder = val alertDialogBuilder: AlertDialog.Builder =
@ -230,7 +231,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
handleDragDialog() handleDragDialog()
mDetector = GestureDetectorCompat( mDetector = GestureDetectorCompat(
context, requireContext(),
MyGestureListener({ showControlPanelTemporarily() }, { miniCircleDoubleTap() }) MyGestureListener({ showControlPanelTemporarily() }, { miniCircleDoubleTap() })
) )
@ -772,16 +773,16 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
val mCallBtnLayoutParam: ConstraintLayout.LayoutParams = val mCallBtnLayoutParam: ConstraintLayout.LayoutParams =
mCallBtn.layoutParams as ConstraintLayout.LayoutParams mCallBtn.layoutParams as ConstraintLayout.LayoutParams
val iconSize: Int = context!!.resources.getDimension(R.dimen.video_icon_size).toInt() val iconSize: Int = requireContext().resources.getDimension(R.dimen.video_icon_size).toInt()
val iconSizeSmall: Int = val iconSizeSmall: Int =
context!!.resources.getDimension(R.dimen.video_icon_size_small).toInt() requireContext().resources.getDimension(R.dimen.video_icon_size_small).toInt()
val localPreviewMargin: Int = val localPreviewMargin: Int =
context!!.resources.getDimension(R.dimen.local_preview_margin_top).toInt() requireContext().resources.getDimension(R.dimen.local_preview_margin_top).toInt()
val localPreviewWidth: Int = val localPreviewWidth: Int =
context!!.resources.getDimension(R.dimen.local_preview_width).toInt() requireContext().resources.getDimension(R.dimen.local_preview_width).toInt()
val localPreviewHeight: Int = val localPreviewHeight: Int =
context!!.resources.getDimension(R.dimen.local_preview_height).toInt() requireContext().resources.getDimension(R.dimen.local_preview_height).toInt()
// val localPreviewIconSize: Int = context!!.resources.getDimension(R.dimen.local_back_icon_size).toInt() // val localPreviewIconSize: Int = context!!.resources.getDimension(R.dimen.local_back_icon_size).toInt()
// val localPreviewMarginSmall : Int = context!!.resources.getDimension(R.dimen.local_preview_margin_small).toInt() // val localPreviewMarginSmall : Int = context!!.resources.getDimension(R.dimen.local_preview_margin_small).toInt()
// val localPreviewWidthSmall : Int = context!!.resources.getDimension(R.dimen.local_preview_width_small).toInt() // val localPreviewWidthSmall : Int = context!!.resources.getDimension(R.dimen.local_preview_width_small).toInt()
@ -792,9 +793,9 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
mPublisherViewContainer.layoutParams as RelativeLayout.LayoutParams mPublisherViewContainer.layoutParams as RelativeLayout.LayoutParams
val remotePreviewIconSize: Int = val remotePreviewIconSize: Int =
context!!.resources.getDimension(R.dimen.remote_back_icon_size).toInt() requireContext().resources.getDimension(R.dimen.remote_back_icon_size).toInt()
val remotePreviewIconSizeSmall: Int = val remotePreviewIconSizeSmall: Int =
context!!.resources.getDimension(R.dimen.remote_back_icon_size_small).toInt() requireContext().resources.getDimension(R.dimen.remote_back_icon_size_small).toInt()
val remotePreviewLayoutParam: FrameLayout.LayoutParams = val remotePreviewLayoutParam: FrameLayout.LayoutParams =
mSubscriberViewIcon.layoutParams as FrameLayout.LayoutParams mSubscriberViewIcon.layoutParams as FrameLayout.LayoutParams
@ -884,17 +885,17 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
controlPanel.layoutParams as ConstraintLayout.LayoutParams controlPanel.layoutParams as ConstraintLayout.LayoutParams
val layoutNameHeight: Int = val layoutNameHeight: Int =
context!!.resources.getDimension(R.dimen.layout_name_height).toInt() requireContext().resources.getDimension(R.dimen.layout_name_height).toInt()
val layoutMiniHeight: Int = val layoutMiniHeight: Int =
context!!.resources.getDimension(R.dimen.layout_mini_height).toInt() requireContext().resources.getDimension(R.dimen.layout_mini_height).toInt()
val panelHeight: Int = context!!.resources.getDimension(R.dimen.layout_panel_height).toInt() val panelHeight: Int = requireContext().resources.getDimension(R.dimen.layout_panel_height).toInt()
val panelHeightSmall: Int = val panelHeightSmall: Int =
context!!.resources.getDimension(R.dimen.layout_panel_height_small).toInt() requireContext().resources.getDimension(R.dimen.layout_panel_height_small).toInt()
val panelPadding: Int = val panelPadding: Int =
context!!.resources.getDimension(R.dimen.padding_space_big).toInt() requireContext().resources.getDimension(R.dimen.padding_space_big).toInt()
val panelPaddingMedium: Int = val panelPaddingMedium: Int =
context!!.resources.getDimension(R.dimen.padding_space_medium).toInt() requireContext().resources.getDimension(R.dimen.padding_space_medium).toInt()
val temp = getStatusBarHeight() / 2 val temp = getStatusBarHeight() / 2
@ -1152,10 +1153,10 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
return true return true
} }
override fun onDoubleTap(e: MotionEvent?): Boolean { // override fun onDoubleTap(e: MotionEvent?): Boolean {
miniCircleDoubleTap() // miniCircleDoubleTap()
return super.onDoubleTap(e) // return super.onDoubleTap(e)
} // }
} }

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.7.20'
repositories { repositories {
google() google()
jcenter() jcenter()

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 8929">
<circle id="Ellipse 149" cx="12" cy="12" r="12" transform="matrix(-1 0 0 1 24 0)" fill="white"/>
<g id="back (1)">
<path id="Chevron_Right" d="M16.8096 11.9647L10.965 17.8073C10.9041 17.8683 10.8319 17.9167 10.7523 17.9498C10.6727 17.9829 10.5874 17.9999 10.5012 18C10.415 18.0001 10.3297 17.9832 10.2501 17.9503C10.1704 17.9174 10.098 17.8692 10.037 17.8083C9.97603 17.7474 9.92762 17.6751 9.89456 17.5955C9.8615 17.516 9.84444 17.4307 9.84435 17.3445C9.84426 17.2583 9.86114 17.173 9.89404 17.0933C9.92693 17.0137 9.97519 16.9413 10.0361 16.8803L15.4175 11.5008L10.0367 6.12134C9.91351 5.99816 9.84431 5.83108 9.84431 5.65687C9.84431 5.48265 9.91351 5.31558 10.0367 5.19239C10.1599 5.06921 10.327 5 10.5012 5C10.6754 5 10.8425 5.06921 10.9657 5.19239L16.8102 11.0357C16.932 11.1597 17.0001 11.3265 17 11.5003C16.9999 11.6741 16.9315 11.8408 16.8096 11.9647Z" fill="#2B353E"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1011 B

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="12" fill="white"/>
<path d="M7.1904 11.9647L13.035 17.8073C13.0959 17.8683 13.1681 17.9167 13.2477 17.9498C13.3273 17.9829 13.4126 17.9999 13.4988 18C13.585 18.0001 13.6703 17.9832 13.7499 17.9503C13.8296 17.9174 13.902 17.8692 13.963 17.8083C14.024 17.7474 14.0724 17.6751 14.1054 17.5955C14.1385 17.516 14.1556 17.4307 14.1557 17.3445C14.1557 17.2583 14.1389 17.173 14.106 17.0933C14.0731 17.0137 14.0248 16.9413 13.9639 16.8803L8.58255 11.5008L13.9633 6.12134C14.0865 5.99816 14.1557 5.83108 14.1557 5.65687C14.1557 5.48265 14.0865 5.31558 13.9633 5.19239C13.8401 5.06921 13.673 5 13.4988 5C13.3246 5 13.1575 5.06921 13.0343 5.19239L7.18976 11.0357C7.06803 11.1597 6.99988 11.3265 7 11.5003C7.00012 11.6741 7.0685 11.8408 7.1904 11.9647Z" fill="#2B353E"/>
</svg>

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
platform :ios, '11.0' platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -38,10 +38,24 @@ target 'Runner' do
# Plugin Pods # Plugin Pods
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'
end end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_CAMERA=1',
'PERMISSION_MICROPHONE=1',
]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end
end
end end
end end

@ -14,8 +14,8 @@
30F70E6C266F56FD005D8F8E /* MainAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */; }; 30F70E6C266F56FD005D8F8E /* MainAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */; };
30F70E6F266F6509005D8F8E /* VideoCallRequestParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6E266F6509005D8F8E /* VideoCallRequestParameters.swift */; }; 30F70E6F266F6509005D8F8E /* VideoCallRequestParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6E266F6509005D8F8E /* VideoCallRequestParameters.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
7645621A848A5D0B29B97C46 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4E9718EA62661304F55A32D /* Pods_Runner.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@ -37,13 +37,10 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
29211CD725C165D600DD740D /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = "<group>"; }; 29211CD725C165D600DD740D /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = "<group>"; };
29211E4125C172B700DD740D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; 29211E4125C172B700DD740D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
300790F9266FB14B0052174C /* VCEmbeder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VCEmbeder.swift; sourceTree = "<group>"; }; 300790F9266FB14B0052174C /* VCEmbeder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VCEmbeder.swift; sourceTree = "<group>"; };
300790FB26710CAB0052174C /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; }; 300790FB26710CAB0052174C /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainAppViewController.swift; sourceTree = "<group>"; }; 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainAppViewController.swift; sourceTree = "<group>"; };
@ -61,7 +58,10 @@
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9CE61EBC24AB366E008D68DD /* VideoCallViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCallViewController.swift; sourceTree = "<group>"; }; 9CE61EBC24AB366E008D68DD /* VideoCallViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCallViewController.swift; sourceTree = "<group>"; };
9CE61ECC24ADBB4C008D68DD /* ICallProtocoll.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICallProtocoll.swift; sourceTree = "<group>"; }; 9CE61ECC24ADBB4C008D68DD /* ICallProtocoll.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICallProtocoll.swift; sourceTree = "<group>"; };
E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
E4E9718EA62661304F55A32D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -69,7 +69,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */, 7645621A848A5D0B29B97C46 /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -104,9 +104,9 @@
7D66D387293CE5376A07EC5F /* Pods */ = { 7D66D387293CE5376A07EC5F /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */, C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */,
E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */, C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */,
0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */, E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
@ -129,7 +129,7 @@
97C146F01CF9000F007C117D /* Runner */, 97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */, 97C146EF1CF9000F007C117D /* Products */,
7D66D387293CE5376A07EC5F /* Pods */, 7D66D387293CE5376A07EC5F /* Pods */,
C1938275850F66EAA5D7AC0F /* Frameworks */, A9562A4C43D78E443FA8BFD1 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -171,10 +171,10 @@
name = "Supporting Files"; name = "Supporting Files";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
C1938275850F66EAA5D7AC0F /* Frameworks */ = { A9562A4C43D78E443FA8BFD1 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */, E4E9718EA62661304F55A32D /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -186,14 +186,14 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */, 4CBD0CB2C106C3E696B88FDB /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */, 9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */, 97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */, 97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */, C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -215,6 +215,7 @@
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1; CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 3A359E86ZF;
LastSwiftMigration = 1100; LastSwiftMigration = 1100;
}; };
}; };
@ -267,7 +268,43 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */ = { 4CBD0CB2C106C3E696B88FDB /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -280,7 +317,7 @@
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework",
"${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
@ -301,8 +338,7 @@
"${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework", "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework",
"${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework",
"${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework", "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework",
"${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework", "${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
@ -322,7 +358,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework",
@ -343,8 +379,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.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_ios.framework",
@ -361,42 +396,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -489,12 +488,12 @@
}; };
249021D4217E4FDB00AE95B9 /* Profile */ = { 249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -502,10 +501,7 @@
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
@ -521,6 +517,7 @@
}; };
97C147031CF9000F007C117D /* Debug */ = { 97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB31CF90195004384FC /* Generated.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -627,12 +624,12 @@
}; };
97C147061CF9000F007C117D /* Debug */ = { 97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; baseConfigurationReference = C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -640,10 +637,7 @@
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
@ -660,13 +654,13 @@
}; };
97C147071CF9000F007C117D /* Release */ = { 97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -674,10 +668,7 @@
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
@ -702,7 +693,7 @@
249021D3217E4FDB00AE95B9 /* Profile */, 249021D3217E4FDB00AE95B9 /* Profile */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Debug;
}; };
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
@ -712,7 +703,7 @@
249021D4217E4FDB00AE95B9 /* Profile */, 249021D4217E4FDB00AE95B9 /* Profile */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Debug;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
}; };

@ -65,5 +65,7 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict> </dict>
</plist> </plist>

@ -0,0 +1,4 @@
storePassword=HmGsa123
keyPassword=HmGsa123
keyAlias=hmgdoctor
storeFile=doctor_app_key

@ -5,10 +5,10 @@ import 'dart:io' show Platform;
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.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/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; 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_shared_pref.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -47,14 +47,12 @@ class BaseAppClient {
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
} }
if (body['DoctorID'] == "") body['DoctorID'] = null; if (body['DoctorID'] == "") body['DoctorID'] = null;
if (body['EditedBy'] == null) if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile?.doctorID;
body['EditedBy'] = doctorProfile?.doctorID;
if (body['ProjectID'] == null) { if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID; body['ProjectID'] = doctorProfile?.projectID;
} }
if (body['ClinicID'] == null) if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID;
body['ClinicID'] = doctorProfile?.clinicID;
} else { } else {
String doctorID = await sharedPref.getString(DOCTOR_ID); String doctorID = await sharedPref.getString(DOCTOR_ID);
if (body['DoctorID'] == '') { if (body['DoctorID'] == '') {
@ -62,6 +60,12 @@ class BaseAppClient {
} else if (doctorID != null) body['DoctorID'] = int.parse(doctorID); } else if (doctorID != null) body['DoctorID'] = int.parse(doctorID);
} }
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
? body['SetupID']
: await sharedPref.getString(DOCTOR_SETUP_ID)
: await sharedPref.getString(DOCTOR_SETUP_ID);
if (body['EditedBy'] == '') { if (body['EditedBy'] == '') {
body.remove("EditedBy"); body.remove("EditedBy");
} }
@ -88,54 +92,56 @@ class BaseAppClient {
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA; body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) { if (body['VidaAuthTokenID'] == null) {
body['VidaAuthTokenID'] = body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
} }
if (body['VidaRefreshTokenID'] == null) { if (body['VidaRefreshTokenID'] == null) {
body['VidaRefreshTokenID'] = body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
} }
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3) if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else if ((body.containsKey('facilityId') && body['facilityId'] == 2 || else if ((body.containsKey('facilityId') && body['facilityId'] == 2 || body['facilityId'] == 3) || body['ProjectID'] == 2 || body['ProjectID'] == 3)
body['facilityId'] == 3) ||
body['ProjectID'] == 2 ||
body['ProjectID'] == 3)
body['PatientOutSA'] = true; body['PatientOutSA'] = true;
else else
body['PatientOutSA'] = false; body['PatientOutSA'] = false;
// if (!body.containsKey('ProjectID')) {
// if (projectID != null) {
// body['ProjectID'] = projectID;
// } else {
// body['ProjectID'] = 0;
// }
// }
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
print("URL : $url");
print("Body : ${json.encode(body)}"); // body['DoctorID'] = 1002; //3844083
// body['TokenID'] = "@dm!n";
// print("ProjectID :");
// print(body['ProjectID']);
debugPrint("URL : $url");
debugPrint("Body : ${json.encode(body)}");
var asd = json.encode(body); var asd = json.encode(body);
var asd2; var asd2;
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url), final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
body: json.encode(body),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode); onFailure(Utils.generateContactAdminMsg(), statusCode);
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
print("Response : $parsed");
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) { if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) { if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) { } else if (!isAllowAny) {
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).logout();
listen: false)
.logout();
Utils.showErrorToast('Your session expired Please login again'); Utils.showErrorToast('Your session expired Please login again');
locator<NavigationService>().pushNamedAndRemoveUntil(ROOT); locator<NavigationService>().pushNamedAndRemoveUntil(ROOT);
@ -161,6 +167,7 @@ class BaseAppClient {
} }
} }
postPatient(String endPoint, postPatient(String endPoint,
{Map<String, dynamic> body, {Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,
@ -170,10 +177,7 @@ class BaseAppClient {
String url = BASE_URL + endPoint; String url = BASE_URL + endPoint;
try { try {
Map<String, String> headers = { Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
'Content-Type': 'application/json',
'Accept': 'application/json'
};
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
@ -184,13 +188,15 @@ class BaseAppClient {
body['DoctorID'] = doctorProfile?.doctorID; body['DoctorID'] = doctorProfile?.doctorID;
} }
} }
var languageID = if (body['DoctorID'] == 0) {
await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); body['DoctorID'] = null;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
? body['SetupID'] ? body['SetupID']
: SETUP_ID : await sharedPref.getString(DOCTOR_SETUP_ID)
: SETUP_ID; : await sharedPref.getString(DOCTOR_SETUP_ID);
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
@ -205,8 +211,7 @@ class BaseAppClient {
: PATIENT_OUT_SA_PATIENT_REQ; : PATIENT_OUT_SA_PATIENT_REQ;
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null ? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend'] ? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND
@ -232,9 +237,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token;
body['PatientID'] = body['PatientID'] != null body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient.patientId ?? patient.patientMRN;
? body['PatientID']
: patient.patientId ?? patient.patientMRN;
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe body['SessionID'] = SESSION_ID; //getSe
@ -245,13 +248,23 @@ class BaseAppClient {
else else
body['PatientOutSA'] = false; 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("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var asd = json.encode(body); var asd = json.encode(body);
var asd2; var asd2;
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
body: json.encode(body), headers: headers);
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -263,8 +276,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['ErrorType'] == 4) { if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
parsed['AndroidLink'], parsed['IOSLink']);
} }
if (parsed['IsAuthenticated'] == null) { if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
@ -280,28 +292,20 @@ class BaseAppClient {
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);
} }
} }
} else if (parsed['MessageStatus'] == 1 || } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else { } else {
if (parsed['message'] == null && if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message", onFailure("Server Error found with no available message", statusCode);
statusCode);
} else { } else {
onFailure(parsed['ErrorSearchMsg'], statusCode); onFailure(parsed['ErrorSearchMsg'], statusCode);
} }
} else { } else {
onFailure( onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
} }
} }
} else { } else {
@ -311,9 +315,7 @@ class BaseAppClient {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode); onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else { } else {
onFailure( onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
} }
} }
} }
@ -334,14 +336,9 @@ class BaseAppClient {
if (parsed["ValidationErrors"] != null) { if (parsed["ValidationErrors"] != null) {
error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
if (parsed["ValidationErrors"]["ValidationErrors"] != null && if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
parsed["ValidationErrors"]["ValidationErrors"].length != 0) { for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) {
for (var i = 0; error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n";
i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
"\n";
} }
} }
} }
@ -350,4 +347,19 @@ class BaseAppClient {
} }
return error; return error;
} }
get({String endPoint,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure}) async{
String token = await sharedPref.getString(TOKEN);
String url = DOCTOR_ROTATION + endPoint+'&token='+token;
final response = await http.get(Uri.parse(url));
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
} else {
var parsed = json.decode(response.body.toString());
onSuccess(parsed,statusCode);
}
}
} }

@ -5,119 +5,95 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; 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/';
// const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
// const BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; //Vida Plus URL
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_INSURANCE_APPROVALS_URL = const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor";
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";
const PATIENT_REFER_TO_DOCTOR_URL =
"Services/DoctorApplication.svc/REST/ReferToDoctor"; const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = "Services/Doctors.svc/REST/SearchDoctorsByTime";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
"Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; const GET_CLINICS_FOR_DOCTOR = 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor';
const PATIENT_GET_LIST_REFERAL_URL = "Services/Lists.svc/REST/GetList_STPReferralFrequency";
const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = const PATIENT_GET_CLINIC_BY_PROJECT_URL = "Services/DoctorApplication.svc/REST/GetClinicsByProjectID";
"Services/Doctors.svc/REST/SearchDoctorsByTime";
const GET_CLINICS_FOR_DOCTOR =
'Services/DoctorApplication.svc/REST/GetClinicsForDoctor';
const PATIENT_GET_LIST_REFERAL_URL =
"Services/Lists.svc/REST/GetList_STPReferralFrequency";
const PATIENT_GET_CLINIC_BY_PROJECT_URL =
"Services/DoctorApplication.svc/REST/GetClinicsByProjectID";
const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo"; const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo";
const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics"; const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics";
const GET_REFERRAL_FACILITIES = const GET_REFERRAL_FACILITIES = 'Services/DoctorApplication.svc/REST/GetReferralFacilities';
'Services/DoctorApplication.svc/REST/GetReferralFacilities';
const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo'; const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo';
const GET_PATIENT_VITAL_SIGN = const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; const GET_PATIENT_VITAL_SIGN_DATA = 'Services/DoctorApplication.svc/REST/GetVitalSigns';
const GET_PATIENT_VITAL_SIGN_DATA = const GET_PATIENT_LAB_OREDERS = 'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
'Services/DoctorApplication.svc/REST/GetVitalSigns';
const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_LIVECARE_PENDINGLIST = const GET_LIVECARE_PENDINGLIST = 'Services/DoctorApplication.svc/REST/GetPendingPatientER';
'Services/DoctorApplication.svc/REST/GetPendingPatientER';
const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient';
const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
"Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
const GET_PRESCRIPTION_REPORT = const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/GetPrescriptionReport';
'Services/Patients.svc/REST/GetPrescriptionReport';
const GT_MY_PATIENT_QUESTION = const GT_MY_PATIENT_QUESTION = 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions';
'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions';
const PRM_SEARCH_PATIENT = const PRM_SEARCH_PATIENT = 'Services/Patients.svc/REST/GetPatientInformation_PRM';
'Services/Patients.svc/REST/GetPatientInformation_PRM';
const GET_PATIENT = 'Services/DoctorApplication.svc/REST/'; const GET_PATIENT = 'Services/DoctorApplication.svc/REST/';
const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_MY_REFERRAL_PATIENT = const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor'; const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor';
const ADD_REFERRED_DOCTOR_REMARKS = const ADD_REFERRED_DOCTOR_REMARKS = 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';
'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';
const GET_MY_REFERRED_PATIENT = const GET_MY_REFERRED_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredPatient';
'Services/DoctorApplication.svc/REST/GtMyReferredPatient';
const GET_MY_REFERRED_OUT_PATIENT = const GET_MY_REFERRED_OUT_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient';
'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient';
const GET_PENDING_REFERRAL_PATIENT = const GET_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/PendingReferrals';
'Services/DoctorApplication.svc/REST/PendingReferrals';
const CREATE_REFERRAL_PATIENT = const CREATE_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/CreateReferral';
'Services/DoctorApplication.svc/REST/CreateReferral';
const RESPONSE_PENDING_REFERRAL_PATIENT = const RESPONSE_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/RespondReferral';
'Services/DoctorApplication.svc/REST/RespondReferral';
const GET_PATIENT_REFERRAL = 'Services/DoctorApplication.svc/REST/GetRefferal'; const GET_PATIENT_REFERRAL = 'Services/DoctorApplication.svc/REST/GetRefferal';
const POST_UCAF = 'Services/DoctorApplication.svc/REST/PostUCAF'; const POST_UCAF = 'Services/DoctorApplication.svc/REST/PostUCAF';
const GET_DOCTOR_WORKING_HOURS_TABLE = const GET_DOCTOR_WORKING_HOURS_TABLE = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
const GET_PATIENT_LAB_RESULTS = const GET_PATIENT_LAB_RESULTS = 'Services/DoctorApplication.svc/REST/GetPatientLabResults';
'Services/DoctorApplication.svc/REST/GetPatientLabResults';
const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New'; const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New';
const INSERT_DEVICE_IMEI = const INSERT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails';
'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails';
// 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI'; // 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
// const SELECT_DEVICE_IMEI = // const SELECT_DEVICE_IMEI =
// 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI'; // 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
const SELECT_DEVICE_IMEI = const SELECT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI';
'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI';
const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp';
'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp';
const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = 'Services/DoctorApplication.svc/REST/SendVerificationCode';
'Services/DoctorApplication.svc/REST/SendVerificationCode'; const MEMBER_CHECK_ACTIVATION_CODE_NEW = 'Services/Sentry.svc/REST/MemberCheckActivationCode_New';
const MEMBER_CHECK_ACTIVATION_CODE_NEW =
'Services/Sentry.svc/REST/MemberCheckActivationCode_New';
const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp';
'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp';
const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles';
const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin'; const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin';
@ -125,268 +101,182 @@ const SEND_SMS_INSTRUCTIONS = 'LiveCareApi/DoctorApp/SendSMSInstruction';
const GET_ALTERNATIVE_SERVICE = 'LiveCareApi/DoctorApp/GetAlternativeServices'; const GET_ALTERNATIVE_SERVICE = 'LiveCareApi/DoctorApp/GetAlternativeServices';
const END_CALL = 'LiveCareApi/DoctorApp/EndCall'; const END_CALL = 'LiveCareApi/DoctorApp/EndCall';
const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge'; const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge';
const GET_DASHBOARD = const GET_DASHBOARD = 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI';
'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const GET_SICKLEAVE_STATISTIC = const ARRIVED_PATIENT_URL = 'Services/DoctorApplication.svc/REST/PatientArrivalList';
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const GET_COVERING_DOCTORS = const GET_COVERING_DOCTORS = 'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition';
const UPDATE_RESCHDEULE = const UPDATE_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PatchRequisition';
'Services/DoctorApplication.svc/REST/PatchRequisition'; const GET_RESCHEDULE_LEAVE = 'Services/DoctorApplication.svc/REST/GetRequisition';
const GET_RESCHEDULE_LEAVE = const GET_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/GetPrescription';
'Services/DoctorApplication.svc/REST/GetRequisition';
const GET_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/GetPrescription';
const POST_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/PostPrescription';
const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const POST_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/PostPrescription';
const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_IN_PATIENT_LIST = const GET_PATIENT_IN_PATIENT_LIST = 'Services/DoctorApplication.svc/REST/GetMyInPatient';
'Services/DoctorApplication.svc/REST/GetMyInPatient';
const Verify_Referral_Doctor_Remarks = const Verify_Referral_Doctor_Remarks = 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const SEND_LAB_RESULT_EMAIL = const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
'Services/Notifications.svc/REST/SendLabReportEmail'; const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_Patient_LAB_RESULT = const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription';
'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT =
'Services/Patients.svc/REST/GetPatientLabOrdersResults';
const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION =
'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription';
// SOAP // SOAP
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_EPISODE_FOR_IN_PATIENT = const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient';
'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT = const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PHYSICAL_EXAM = const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote';
'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE =
'/Services/DoctorApplication.svc/REST/PostProgressNote';
const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment'; const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment';
const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies'; const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory'; const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory';
const PATCH_CHIEF_COMPLAINT = const PATCH_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
const PATCH_PHYSICAL_EXAM = const PATCH_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PatchPhysicalExam';
'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; const PATCH_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment';
const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory'; const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory';
const GET_CHIEF_COMPLAINT = const GET_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/GetChiefcomplaint';
'Services/DoctorApplication.svc/REST/GetChiefcomplaint';
const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam';
const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote';
const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment';
const GET_LIST_CATEGORISE = 'Services/DoctorApplication.svc/REST/GetProcedureCategories';
const GET_LIST_CATEGORISE = const GET_CATEGORISE_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetProcedure';
'Services/DoctorApplication.svc/REST/GetProcedureCategories';
const GET_CATEGORISE_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetProcedure';
const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure'; const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure';
const UPDATE_PRESCRIPTION = const UPDATE_PRESCRIPTION = 'Services/DoctorApplication.svc/REST/PatchPrescription';
'Services/DoctorApplication.svc/REST/PatchPrescription';
const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList'; const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList';
const DRUG_TO_DRUG = const DRUG_TO_DRUG = 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction';
'Services/DoctorApplication.svc/REST/DrugToDrugInteraction';
const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile'; const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile';
const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors'; const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors';
const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards'; const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards';
const GET_ROOM_CATEGORIES = const GET_ROOM_CATEGORIES = 'Services/DoctorApplication.svc/REST/GetRoomCategories';
'Services/DoctorApplication.svc/REST/GetRoomCategories'; const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes';
const GET_DIAGNOSIS_TYPES =
'Services/DoctorApplication.svc/REST/DiagnosisTypes';
const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes'; const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes';
const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes'; const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes';
const POST_ADMISSION_REQUEST = const POST_ADMISSION_REQUEST = 'Services/DoctorApplication.svc/REST/PostAdmissionRequest';
'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; const GET_ITEM_BY_MEDICINE = 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode';
const GET_ITEM_BY_MEDICINE =
'Services/DoctorApplication.svc/REST/GetItemByMedicineCode';
const GET_PROCEDURE_VALIDATION = const GET_PROCEDURE_VALIDATION = 'Services/DoctorApplication.svc/REST/ValidateProcedures';
'Services/DoctorApplication.svc/REST/ValidateProcedures'; const GET_BOX_QUANTITY = 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity';
const GET_BOX_QUANTITY =
'Services/DoctorApplication.svc/REST/CalculateBoxQuantity';
///GET ECG ///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
const GET_MY_REFERRAL_INPATIENT = const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient";
"Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_REFERRAL_OUT_PATIENT = const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient";
"Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient";
const GET_MY_DISCHARGE_PATIENT = const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
"Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
"Services/Patients.svc/REST/GetApprovalStatus";
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
const GET_IN_PATIENT_ORDERS = const GET_IN_PATIENT_ORDERS = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions ///Prescriptions
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTION_REPORT_NEW = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const GET_PRESCRIPTION_REPORT_NEW = const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
'Services/Patients.svc/REST/INP_GetPrescriptionReport'; const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const SEND_PRESCRIPTION_EMAIL = const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
'Services/Notifications.svc/REST/SendPrescriptionEmail'; const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient";
"Services/DoctorApplication.svc/REST/GetMyOutPatient";
const PATIENT_MEDICAL_REPORT_GET_LIST = const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport";
"Services/Patients.svc/REST/DAPP_ListMedicalReport"; const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID";
const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport";
"Services/Patients.svc/REST/DAPP_GetTemplateByID"; const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport";
const PATIENT_MEDICAL_REPORT_INSERT =
"Services/Patients.svc/REST/DAPP_InsertMedicalReport";
const PATIENT_MEDICAL_REPORT_VERIFIED =
"Services/Patients.svc/REST/DAPP_VerifiedMedicalReport";
const GET_PROCEDURE_TEMPLETE = const GET_PROCEDURE_TEMPLETE = 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet';
'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet';
const GET_TEMPLETE_LIST = 'Services/Doctors.svc/REST/DAPP_TemplateGet'; const GET_TEMPLETE_LIST = 'Services/Doctors.svc/REST/DAPP_TemplateGet';
const GET_PROCEDURE_TEMPLETE_DETAILS = const GET_PROCEDURE_TEMPLETE_DETAILS = "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet";
"Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp';
const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP =
'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp';
const DOCTOR_CHECK_HAS_LIVE_CARE = const DOCTOR_CHECK_HAS_LIVE_CARE = "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare";
"Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare";
const LIVE_CARE_IS_LOGIN = "LiveCareApi/DoctorApp/UseIsLogin"; const LIVE_CARE_IS_LOGIN = "LiveCareApi/DoctorApp/UseIsLogin";
const ADD_REFERRED_REMARKS_NEW = const ADD_REFERRED_REMARKS_NEW = "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New";
"Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; const GET_SPECIAL_CLINICAL_CARE_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList";
const GET_SPECIAL_CLINICAL_CARE_LIST = const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList";
"Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList";
const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = const INSERT_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New";
"Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList";
const UPDATE_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_UpdateMedicalReport";
const INSERT_MEDICAL_REPORT = const GET_SICK_LEAVE_DOCTOR_APP = "Services/DoctorApplication.svc/REST/GetAllSickLeaves";
"Services/Patients.svc/REST/DAPP_InsertMedicalReport_New";
const UPDATE_MEDICAL_REPORT =
"Services/Patients.svc/REST/DAPP_UpdateMedicalReport";
const GET_SICK_LEAVE_DOCTOR_APP =
"Services/DoctorApplication.svc/REST/GetAllSickLeaves";
const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor"; const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor";
const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue"; const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue";
const CREATE_DOCTOR_RESPONSE = const CREATE_DOCTOR_RESPONSE = "Services/DoctorApplication.svc/REST/CreateDoctorResponse";
"Services/DoctorApplication.svc/REST/CreateDoctorResponse"; const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts";
const GET_DOCTOR_NOT_REPLIED_COUNTS = const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL";
"Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient";
const ALL_SPECIAL_LAB_RESULT = const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient";
"services/Patients.svc/REST/GetPatientLabSpecialResultsALL";
const GET_MEDICATION_FOR_IN_PATIENT =
"Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient";
const GET_EPISODE_FOR_INPATIENT =
"/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient";
///Operation Details Services ///Operation Details Services
const GET_RESERVATIONS = const GET_RESERVATIONS = "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails";
"Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; const GET_OPERATION_DETAILS = "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails";
const GET_OPERATION_DETAILS = const UPDATE_OPERATION_REPORT = "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport";
"Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails";
const UPDATE_OPERATION_REPORT =
"Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport";
const NURSING_PROGRESS_NOTE = const NURSING_PROGRESS_NOTE = "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote";
"Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; const GET_DIAGNOSIS_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient";
const GET_DIAGNOSIS_FOR_IN_PATIENT =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient";
const GET_DIABETIC_CHART_VALUES = const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues";
"Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues";
const GET_PENDING_ORDERS = const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient";
"Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient";
const GET_ADMISSION_ORDERS = const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders";
"/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders";
///Patient Registration Services ///Patient Registration Services
const CHECK_PATIENT_FOR_REGISTRATION = const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration";
"Services/Authentication.svc/REST/CheckPatientForRegisteration"; const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration";
const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = const CHECK_ACTIVATION_CODE_FOR_PATIENT = "Services/Authentication.svc/REST/CheckActivationCode";
"Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; const PATIENT_REGISTRATION = "Services/Authentication.svc/REST/PatientRegistration";
const CHECK_ACTIVATION_CODE_FOR_PATIENT =
"Services/Authentication.svc/REST/CheckActivationCode";
const PATIENT_REGISTRATION =
"Services/Authentication.svc/REST/PatientRegistration";
const GET_PATIENT_INFO = "Services/NHIC.svc/REST/GetPatientInfo"; const GET_PATIENT_INFO = "Services/NHIC.svc/REST/GetPatientInfo";
/// Discharge Summary /// Discharge Summary
const GET_PENDING_DISCHARGE_SUMMARY = const GET_PENDING_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary";
"Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; const GET_ALL_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary";
const GET_ALL_DISCHARGE_SUMMARY =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; const VTE_ASSESSMENT = "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo";
const VTE_ASSESSMENT = const GET_INTERVENTION_MEDICATION = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications";
"Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo";
const GET_INTERVENTION_MEDICATION = const GET_INTERVENTION_MEDICATION_HISTORY = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory";
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications";
const GET_INTERVENTION_MEDICATION_HISTORY = const SET_ACCEPTED_OR_REJECTED = "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory";
const SET_ACCEPTED_OR_REJECTED = const GET_STP_MASTER_LIST = "Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
const GET_STP_MASTER_LIST = const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment";
"Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
const DOCTOR_ER_SIGN_ASSESSMENT = const DOCTOR_SCHEDULE = "api/ScheduledSchedule/GetallSchedulebyUser";
"Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment";
var selectedPatientType = 1; var selectedPatientType = 1;
@ -411,26 +301,8 @@ var SERVICES_PATIANT2 = [
"List_MyReferralPatient", "List_MyReferralPatient",
"patientArrivalList" "patientArrivalList"
]; ];
var SERVICES_PATIANT_HEADER = [ var SERVICES_PATIANT_HEADER = ["My OutPatient", "My InPatient", "Discharge", "Referred", "Referral Discharge", "Tomorrow", "Referral", "Arrival Patient"];
"My OutPatient", var SERVICES_PATIANT_HEADER_AR = ["المريض الخارجي", "المريض المنوم", "المريض المعافى", "المريض المحول الي", "المريض المحال المعافى", "مريض الغد", "المريض المحول مني", "المريض الواصل"];
"My InPatient",
"Discharge",
"Referred",
"Referral Discharge",
"Tomorrow",
"Referral",
"Arrival Patient"
];
var SERVICES_PATIANT_HEADER_AR = [
"المريض الخارجي",
"المريض المنوم",
"المريض المعافى",
"المريض المحول الي",
"المريض المحال المعافى",
"مريض الغد",
"المريض المحول مني",
"المريض الواصل"
];
const PRIMARY_COLOR = 0xff515B5D; const PRIMARY_COLOR = 0xff515B5D;
@ -438,7 +310,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 8.3; const VERSION_ID = 8.7;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;
@ -450,7 +322,6 @@ const GENERAL_ID = 'Cs2020@2016\$2958';
const PATIENT_TYPE = 1; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1; const PATIENT_TYPE_ID = 1;
/// Timer Info /// Timer Info
const TIMER_MIN = 10; const TIMER_MIN = 10;
@ -461,5 +332,4 @@ class AppGlobal {
static Color appTextColor = Color(0xFF2B353E); static Color appTextColor = Color(0xFF2B353E);
static Color scheduleTextColor = Color(0xFF2E303A); static Color scheduleTextColor = Color(0xFF2E303A);
static Color inProgressColor = Color(0xFFCC9B14); static Color inProgressColor = Color(0xFFCC9B14);
} }

@ -800,7 +800,7 @@ const Map<String, Map<String, String>> localizedValues = {
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
"fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "},
"searchPatient-name": { "searchPatient-name": {
"en": "Search Name, Medical File, Phone Number", "en": "Search Medical File, Phone Number",
"ar": "اسم البحث ، الملف الطبي ، رقم الهاتف" "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف"
}, },
"reschedule": {"en": "Reschedule", "ar": "إعادة جدولة"}, "reschedule": {"en": "Reschedule", "ar": "إعادة جدولة"},
@ -1146,4 +1146,9 @@ const Map<String, Map<String, String>> localizedValues = {
"yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"}, "yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"},
"youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""}, "youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""},
"conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"}, "conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"},
"doctorSchedule": {"en": "Doctor Schedule", "ar":"جدول الطبيب"},
"doctorRota": {"en": "Doctor Rota", "ar":"دوران الطبيب"},
"dateFrom": {"en": "Date From", "ar":"التاريخ من"},
"searchFindSchedule": {"en": "Search and find out the doctors schedule ", "ar":"بحث ومعرفة جدول الطبيب"}
}; };

@ -14,3 +14,4 @@ const DASHBOARD_DATA = 'dashboard-data';
const OTP_TYPE = 'otp-type'; const OTP_TYPE = 'otp-type';
const LAST_LOGIN_USER = 'last-login-user'; const LAST_LOGIN_USER = 'last-login-user';
const CLINIC_NAME = 'clinic-name'; const CLINIC_NAME = 'clinic-name';
const DOCTOR_SETUP_ID = 'doctor-setup-id';

@ -1,14 +1,18 @@
class DoctorErSignAssessmentReqModel { class DoctorErSignAssessmentReqModel {
String setupID; // String setupID;
int signInType; int signInType;
int loginDoctorID; int loginDoctorID;
int patientID; int patientID;
DoctorErSignAssessmentReqModel( DoctorErSignAssessmentReqModel(
{this.setupID, this.signInType, this.loginDoctorID, this.patientID}); {
// this.setupID,
this.signInType,
this.loginDoctorID,
this.patientID});
DoctorErSignAssessmentReqModel.fromJson(Map<String, dynamic> json) { DoctorErSignAssessmentReqModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; // setupID = json['SetupID'];
signInType = json['SignInType']; signInType = json['SignInType'];
loginDoctorID = json['LoginDoctorID']; loginDoctorID = json['LoginDoctorID'];
patientID = json['PatientID']; patientID = json['PatientID'];
@ -16,7 +20,7 @@ class DoctorErSignAssessmentReqModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID; // data['SetupID'] = this.setupID;
data['SignInType'] = this.signInType; data['SignInType'] = this.signInType;
data['LoginDoctorID'] = this.loginDoctorID; data['LoginDoctorID'] = this.loginDoctorID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;

@ -2,18 +2,24 @@ class PostAssessmentRequestModel {
int patientMRN; int patientMRN;
int appointmentNo; int appointmentNo;
int episodeId; int episodeId;
String createdByName;
int createdBy;
List<IcdCodeDetails> icdCodeDetails; List<IcdCodeDetails> icdCodeDetails;
PostAssessmentRequestModel( PostAssessmentRequestModel(
{this.patientMRN, {this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.episodeId, this.episodeId,
this.createdByName,
this.createdBy,
this.icdCodeDetails}); this.icdCodeDetails});
PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) { PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeID']; episodeId = json['EpisodeID'];
createdByName = json['CreatedByName'];
createdBy= json['CreatedBy'];
if (json['icdCodeDetails'] != null) { if (json['icdCodeDetails'] != null) {
icdCodeDetails = new List<IcdCodeDetails>(); icdCodeDetails = new List<IcdCodeDetails>();
json['icdCodeDetails'].forEach((v) { json['icdCodeDetails'].forEach((v) {
@ -27,6 +33,8 @@ class PostAssessmentRequestModel {
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeId; data['EpisodeID'] = this.episodeId;
data['CreatedByName'] = this.createdByName;
data['CreatedBy'] = this.createdBy;
if (this.icdCodeDetails != null) { if (this.icdCodeDetails != null) {
data['icdCodeDetails'] = data['icdCodeDetails'] =
this.icdCodeDetails.map((v) => v.toJson()).toList(); this.icdCodeDetails.map((v) => v.toJson()).toList();

@ -5,6 +5,8 @@ class PostProgressNoteRequestModel {
String planNote; String planNote;
dynamic doctorID; dynamic doctorID;
dynamic editedBy; dynamic editedBy;
String createdByName;
int createdBy;
PostProgressNoteRequestModel( PostProgressNoteRequestModel(
{this.appointmentNo, {this.appointmentNo,
@ -12,7 +14,10 @@ class PostProgressNoteRequestModel {
this.patientMRN, this.patientMRN,
this.planNote, this.planNote,
this.doctorID, this.doctorID,
this.editedBy}); this.editedBy,
this.createdByName,
this.createdBy
});
PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) { PostProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo']; appointmentNo = json['AppointmentNo'];
@ -21,6 +26,8 @@ class PostProgressNoteRequestModel {
planNote = json['PlanNote']; planNote = json['PlanNote'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
createdByName = json['CreatedByName'];
createdBy = json['CreatedBy'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -31,6 +38,8 @@ class PostProgressNoteRequestModel {
data['PlanNote'] = this.planNote; data['PlanNote'] = this.planNote;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy; data['EditedBy'] = this.editedBy;
data['CreatedByName'] = this.createdByName;
data['CreatedBy'] = this.createdBy;
return data; return data;
} }
} }

@ -23,6 +23,7 @@ class AdmissionRequest {
bool isDietType; bool isDietType;
int dietType; int dietType;
String dietRemarks; String dietRemarks;
String diagnosis;
bool isPhysicalActivityModification; bool isPhysicalActivityModification;
String physicalActivityModificationComments; String physicalActivityModificationComments;
int orStatus; int orStatus;
@ -66,6 +67,7 @@ class AdmissionRequest {
this.isDietType, this.isDietType,
this.dietType, this.dietType,
this.dietRemarks, this.dietRemarks,
this.diagnosis,
this.isPhysicalActivityModification = false, this.isPhysicalActivityModification = false,
this.physicalActivityModificationComments = "", this.physicalActivityModificationComments = "",
this.orStatus = 1, this.orStatus = 1,
@ -109,9 +111,9 @@ class AdmissionRequest {
isDietType = json['isDietType']; isDietType = json['isDietType'];
dietType = json['dietType']; dietType = json['dietType'];
dietRemarks = json['dietRemarks']; dietRemarks = json['dietRemarks'];
diagnosis = json['diagnosis'];
isPhysicalActivityModification = json['isPhysicalActivityModification']; isPhysicalActivityModification = json['isPhysicalActivityModification'];
physicalActivityModificationComments = physicalActivityModificationComments = json['physicalActivityModificationComments'];
json['physicalActivityModificationComments'];
orStatus = json['orStatus']; orStatus = json['orStatus'];
mainLineOfTreatment = json['mainLineOfTreatment']; mainLineOfTreatment = json['mainLineOfTreatment'];
estimatedCost = json['estimatedCost']; estimatedCost = json['estimatedCost'];
@ -164,16 +166,14 @@ class AdmissionRequest {
data['transportComments'] = this.transportComments; data['transportComments'] = this.transportComments;
data['isPhysioAppointmentNeeded'] = this.isPhysioAppointmentNeeded; data['isPhysioAppointmentNeeded'] = this.isPhysioAppointmentNeeded;
data['physioAppointmentComments'] = this.physioAppointmentComments; data['physioAppointmentComments'] = this.physioAppointmentComments;
data['isOPDFollowupAppointmentNeeded'] = data['isOPDFollowupAppointmentNeeded'] = this.isOPDFollowupAppointmentNeeded;
this.isOPDFollowupAppointmentNeeded;
data['opdFollowUpComments'] = this.opdFollowUpComments; data['opdFollowUpComments'] = this.opdFollowUpComments;
data['isDietType'] = this.isDietType; data['isDietType'] = this.isDietType;
data['dietType'] = this.dietType; data['dietType'] = this.dietType;
data['dietRemarks'] = this.dietRemarks; data['dietRemarks'] = this.dietRemarks;
data['isPhysicalActivityModification'] = data['diagnosis'] = this.diagnosis;
this.isPhysicalActivityModification; data['isPhysicalActivityModification'] = this.isPhysicalActivityModification;
data['physicalActivityModificationComments'] = data['physicalActivityModificationComments'] = this.physicalActivityModificationComments;
this.physicalActivityModificationComments;
data['orStatus'] = this.orStatus; data['orStatus'] = this.orStatus;
data['mainLineOfTreatment'] = this.mainLineOfTreatment; data['mainLineOfTreatment'] = this.mainLineOfTreatment;
data['estimatedCost'] = this.estimatedCost; data['estimatedCost'] = this.estimatedCost;
@ -189,8 +189,7 @@ class AdmissionRequest {
// this.admissionRequestDiagnoses.map((v) => v.toJson()).toList(); // this.admissionRequestDiagnoses.map((v) => v.toJson()).toList();
} }
if (this.admissionRequestProcedures != null) { if (this.admissionRequestProcedures != null) {
data['admissionRequestProcedures'] = data['admissionRequestProcedures'] = this.admissionRequestProcedures.map((v) => v.toJson()).toList();
this.admissionRequestProcedures.map((v) => v.toJson()).toList();
} }
data['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
data['episodeID'] = this.episodeID; data['episodeID'] = this.episodeID;

@ -60,7 +60,7 @@ class CheckActivationCodeForDoctorAppResponseModel {
} }
class ListDoctorsClinic { class ListDoctorsClinic {
Null setupID; String setupID;
int projectID; int projectID;
int doctorID; int doctorID;
int clinicID; int clinicID;

@ -0,0 +1,80 @@
import 'dart:convert';
List<DoctorSchedule> doctorScheduleFromJson(String str) => List<DoctorSchedule>.from(json.decode(str).map((x) => DoctorSchedule.fromJson(x)));
String doctorScheduleToJson(List<DoctorSchedule> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
class DoctorSchedule {
int scheduledid;
int status;
String clinicname;
int clinicid;
List<Scheduleforuser> scheduleforuser;
DoctorSchedule({
this.scheduledid,
this.status,
this.clinicname,
this.clinicid,
this.scheduleforuser,
});
factory DoctorSchedule.fromJson(Map<String, dynamic> json) => DoctorSchedule(
scheduledid: json["scheduledid"],
status: json["status"],
clinicname: json["clinicname"],
clinicid: json["clinicid"],
scheduleforuser: List<Scheduleforuser>.from(json["scheduleforuser"].map((x) => Scheduleforuser.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"scheduledid": scheduledid,
"status": status,
"clinicname": clinicname,
"clinicid": clinicid,
"scheduleforuser": List<dynamic>.from(scheduleforuser.map((x) => x.toJson())),
};
}
class Scheduleforuser {
DateTime days;
int duration;
List<Shiftforuser> shiftforuser;
Scheduleforuser({
this.days,
this.duration,
this.shiftforuser,
});
factory Scheduleforuser.fromJson(Map<String, dynamic> json) => Scheduleforuser(
days: DateTime.parse(json["days"]),
duration: json["duration"],
shiftforuser: List<Shiftforuser>.from(json["shiftforuser"].map((x) => Shiftforuser.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"days": days.toIso8601String(),
"duration": duration,
"shiftforuser": List<dynamic>.from(shiftforuser.map((x) => x.toJson())),
};
}
class Shiftforuser {
String fromtimetext;
String totimetext;
Shiftforuser({
this.fromtimetext,
this.totimetext,
});
factory Shiftforuser.fromJson(Map<String, dynamic> json) => Shiftforuser(
fromtimetext: json["fromtimetext"],
totimetext: json["totimetext"],
);
Map<String, dynamic> toJson() => {
"fromtimetext": fromtimetext,
"totimetext": totimetext,
};
}

@ -23,7 +23,7 @@ class GetDischargeSummaryReqModel {
data['AdmissionNo'] = this.admissionNo; data['AdmissionNo'] = this.admissionNo;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['SetupID'] = "010266";
data['isDentalAllowedBackend'] = false; data['isDentalAllowedBackend'] = false;
return data; return data;
} }

@ -6,7 +6,7 @@
*@desc: Clinic Model *@desc: Clinic Model
*/ */
class ClinicModel { class ClinicModel {
Null setupID; String setupID;
int projectID; int projectID;
int doctorID; int doctorID;
int clinicID; int clinicID;

@ -0,0 +1,15 @@
class VidaPlusProjectListModel {
int projectID;
VidaPlusProjectListModel({this.projectID});
VidaPlusProjectListModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
return data;
}
}

@ -8,6 +8,7 @@ class GetHospitalsRequestModel {
String sessionID; String sessionID;
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
String memberID; String memberID;
String doctorID;
GetHospitalsRequestModel( GetHospitalsRequestModel(
{this.languageID, {this.languageID,
@ -18,7 +19,9 @@ class GetHospitalsRequestModel {
this.tokenID, this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.memberID}); this.memberID,
this.doctorID,
});
GetHospitalsRequestModel.fromJson(Map<String, dynamic> json) { GetHospitalsRequestModel.fromJson(Map<String, dynamic> json) {
languageID = json['LanguageID']; languageID = json['LanguageID'];
@ -30,6 +33,7 @@ class GetHospitalsRequestModel {
sessionID = json['SessionID']; sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
memberID = json['MemberID']; memberID = json['MemberID'];
doctorID = json['DoctorID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -43,6 +47,7 @@ class GetHospitalsRequestModel {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['MemberID'] = this.memberID; data['MemberID'] = this.memberID;
data['DoctorID'] = this.doctorID;
return data; return data;
} }
} }

@ -36,7 +36,7 @@ class PatientLabOrders {
String setupID; String setupID;
List<String> speciality; List<String> speciality;
bool isLiveCareAppointment; bool isLiveCareAppointment;
String invoiceType;
PatientLabOrders( PatientLabOrders(
{this.actualDoctorRate, {this.actualDoctorRate,
this.clinicDescription, this.clinicDescription,
@ -71,7 +71,9 @@ class PatientLabOrders {
this.qR, this.qR,
this.setupID, this.setupID,
this.speciality, this.speciality,
this.isLiveCareAppointment}); this.isLiveCareAppointment,
this.invoiceType
});
PatientLabOrders.fromJson(Map<String, dynamic> json) { PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
@ -108,6 +110,7 @@ class PatientLabOrders {
qR = json['QR']; qR = json['QR'];
setupID = json['SetupID']; setupID = json['SetupID'];
isLiveCareAppointment = json['IsLiveCareAppointment']; isLiveCareAppointment = json['IsLiveCareAppointment'];
invoiceType = json["InvoiceType"];
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<String>();
} }
@ -147,6 +150,7 @@ class PatientLabOrders {
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment; data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['InvoiceType'] = this.invoiceType;
return data; return data;
} }
} }

@ -4,6 +4,7 @@ class DoctorsByClinicIdRequest {
bool continueDentalPlan; bool continueDentalPlan;
bool isSearchAppointmnetByClinicID; bool isSearchAppointmnetByClinicID;
int patientID; int patientID;
int doctorID;
int gender; int gender;
bool isGetNearAppointment; bool isGetNearAppointment;
bool isVoiceCommand; bool isVoiceCommand;
@ -18,6 +19,7 @@ class DoctorsByClinicIdRequest {
this.continueDentalPlan = false, this.continueDentalPlan = false,
this.isSearchAppointmnetByClinicID = true, this.isSearchAppointmnetByClinicID = true,
this.patientID, this.patientID,
this.doctorID,
this.gender, this.gender,
this.isGetNearAppointment = false, this.isGetNearAppointment = false,
this.isVoiceCommand = true, this.isVoiceCommand = true,
@ -30,6 +32,7 @@ class DoctorsByClinicIdRequest {
DoctorsByClinicIdRequest.fromJson(Map<String, dynamic> json) { DoctorsByClinicIdRequest.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
doctorID = json['DoctorID'];
continueDentalPlan = json['ContinueDentalPlan']; continueDentalPlan = json['ContinueDentalPlan'];
isSearchAppointmnetByClinicID = json['IsSearchAppointmnetByClinicID']; isSearchAppointmnetByClinicID = json['IsSearchAppointmnetByClinicID'];
patientID = json['PatientID']; patientID = json['PatientID'];
@ -49,6 +52,7 @@ class DoctorsByClinicIdRequest {
data['ContinueDentalPlan'] = this.continueDentalPlan; data['ContinueDentalPlan'] = this.continueDentalPlan;
data['IsSearchAppointmnetByClinicID'] = this.isSearchAppointmnetByClinicID; data['IsSearchAppointmnetByClinicID'] = this.isSearchAppointmnetByClinicID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['DoctorID'] = this.doctorID;
data['gender'] = this.gender; data['gender'] = this.gender;
data['IsGetNearAppointment'] = this.isGetNearAppointment; data['IsGetNearAppointment'] = this.isGetNearAppointment;
data['IsVoiceCommand'] = this.isVoiceCommand; data['IsVoiceCommand'] = this.isVoiceCommand;

@ -227,7 +227,7 @@ class PatiantInformtion {
endTime = json['endTime']; endTime = json['endTime'];
episodeNo = json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo']; episodeNo = json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'];
fallRiskScore = json['fallRiskScore']; fallRiskScore = json['fallRiskScore'];
isSigned = json['isSigned']; isSigned = json['IsSigned'];
medicationOrders = json['medicationOrders']; medicationOrders = json['medicationOrders'];
nationality = json['nationality'] ?? json['NationalityNameN']; nationality = json['nationality'] ?? json['NationalityNameN'];
patientMRN = json['patientMRN'] ?? patientMRN = json['patientMRN'] ??

@ -22,7 +22,7 @@ class VitalSignData {
int patientType; int patientType;
int pulseBeatPerMinute; int pulseBeatPerMinute;
int pulseRhythm; int pulseRhythm;
int respirationBeatPerMinute; num respirationBeatPerMinute;
int respirationPattern; int respirationPattern;
int sao2; int sao2;
int status; int status;

@ -7,7 +7,7 @@ class InterventionMedicationHistoryResModel {
int orderNo; int orderNo;
int id; int id;
int interventionId; int interventionId;
Null intervention; dynamic intervention;
String remark; String remark;
int commentedBy; int commentedBy;
bool isDoctor; bool isDoctor;
@ -16,10 +16,10 @@ class InterventionMedicationHistoryResModel {
String createdByName; String createdByName;
String createdByNameN; String createdByNameN;
String createdOn; String createdOn;
Null editedBy; dynamic editedBy;
Null editedByName; dynamic editedByName;
Null editedByNameN; dynamic editedByNameN;
Null editedOn; dynamic editedOn;
InterventionMedicationHistoryResModel( InterventionMedicationHistoryResModel(
{this.setupId, {this.setupId,

@ -58,7 +58,7 @@ class EntityList {
this.subGroup, this.subGroup,
this.template, this.template,
this.remarks, this.remarks,
this.type}); this.type ='1'});
EntityList.fromJson(Map<String, dynamic> json) { EntityList.fromJson(Map<String, dynamic> json) {
allowedClinic = json['allowedClinic']; allowedClinic = json['allowedClinic'];

@ -6,6 +6,7 @@ class FinalRadiology {
dynamic patientID; dynamic patientID;
dynamic invoiceLineItemNo; dynamic invoiceLineItemNo;
dynamic invoiceNo; dynamic invoiceNo;
dynamic invoiceNo_VP;
dynamic doctorID; dynamic doctorID;
dynamic clinicID; dynamic clinicID;
DateTime orderDate; DateTime orderDate;
@ -43,13 +44,15 @@ class FinalRadiology {
bool isCVI; bool isCVI;
bool isRadMedicalReport; bool isRadMedicalReport;
bool isLiveCareAppodynamicment; bool isLiveCareAppodynamicment;
bool isRecordFromVidaPlus;
String invoiceType;
FinalRadiology( FinalRadiology(
{this.setupID, {this.setupID,
this.projectID, this.projectID,
this.patientID, this.patientID,
this.invoiceLineItemNo, this.invoiceLineItemNo,
this.invoiceNo, this.invoiceNo,
this.invoiceNo_VP,
this.doctorID, this.doctorID,
this.clinicID, this.clinicID,
this.orderDate, this.orderDate,
@ -86,7 +89,7 @@ class FinalRadiology {
this.speciality, this.speciality,
this.isCVI, this.isCVI,
this.isRadMedicalReport, this.isRadMedicalReport,
this.isLiveCareAppodynamicment}); this.isLiveCareAppodynamicment, this.isRecordFromVidaPlus, this.invoiceType});
FinalRadiology.fromJson(Map<dynamic, dynamic> json) { FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
try { try {
@ -95,6 +98,7 @@ class FinalRadiology {
patientID = json['PatientID']; patientID = json['PatientID'];
invoiceLineItemNo = json['InvoiceLineItemNo']; invoiceLineItemNo = json['InvoiceLineItemNo'];
invoiceNo = json['InvoiceNo']; invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); orderDate = AppDateUtils.convertStringToDate(json['OrderDate']);
@ -132,6 +136,8 @@ class FinalRadiology {
// speciality = json['Speciality'].cast<dynamic>(); // speciality = json['Speciality'].cast<dynamic>();
isCVI = json['isCVI']; isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport']; isRadMedicalReport = json['isRadMedicalReport'];
isRecordFromVidaPlus = json['IsRecordFromVidaPlus'];
invoiceType = json["InvoiceType"];
} catch (e) { } catch (e) {
print(e); print(e);
} }
@ -144,6 +150,7 @@ class FinalRadiology {
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['InvoiceLineItemNo'] = this.invoiceLineItemNo; data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['InvoiceNo'] = this.invoiceNo; data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['DoctorID'] = this.doctorID; data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['OrderDate'] = this.orderDate; data['OrderDate'] = this.orderDate;
@ -179,6 +186,8 @@ class FinalRadiology {
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['isCVI'] = this.isCVI; data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport; data['isRadMedicalReport'] = this.isRadMedicalReport;
data['IsRecordFromVidaPlus'] = this.isRecordFromVidaPlus;
data["InvoiceType"] =invoiceType;
return data; return data;
} }
} }

@ -9,6 +9,7 @@ class SickLeavePatientModel {
dynamic requestDate; dynamic requestDate;
dynamic sickLeaveDays; dynamic sickLeaveDays;
dynamic appointmentNo; dynamic appointmentNo;
dynamic appointmentNO;
dynamic admissionNo; dynamic admissionNo;
dynamic actualDoctorRate; dynamic actualDoctorRate;
dynamic appointmentDate; dynamic appointmentDate;
@ -98,7 +99,7 @@ class SickLeavePatientModel {
requestNo = json['RequestNo']; requestNo = json['RequestNo'];
requestDate = json['RequestDate']; requestDate = json['RequestDate'];
sickLeaveDays = json['SickLeaveDays']; sickLeaveDays = json['SickLeaveDays'];
appointmentNo = json['AppointmentNo']; appointmentNo = (json['AppointmentNo'] ==null ? json['appointmentNo'] : json['AppointmentNo']);
admissionNo = json['AdmissionNo']; admissionNo = json['AdmissionNo'];
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
appointmentDate = json['AppointmentDate']; appointmentDate = json['AppointmentDate'];

@ -4,7 +4,7 @@ class VteAssessmentRequestModel {
int transactionNo; int transactionNo;
VteAssessmentRequestModel( VteAssessmentRequestModel(
{this.setupID = "010266", this.parameterGroup = 7, this.transactionNo}); {this.setupID, this.parameterGroup = 7, this.transactionNo});
VteAssessmentRequestModel.fromJson(Map<String, dynamic> json) { VteAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];

@ -3,14 +3,13 @@ import 'package:firebase_analytics/observer.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class AnalyticsService { class AnalyticsService {
final FirebaseAnalytics _analytics = FirebaseAnalytics(); // final FirebaseAnalytics _analytics = FirebaseAnalytics();
static FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics);
static FirebaseAnalytics analytics = FirebaseAnalytics.instance;
FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: analytics);
FirebaseAnalyticsObserver getAnalyticsObserver() => Future logEvent({@required String eventCategory, @required String eventAction}) async {
FirebaseAnalyticsObserver(analytics: _analytics); await analytics.logEvent(name: 'event', parameters: {
Future logEvent(
{@required String eventCategory, @required String eventAction}) async {
await _analytics.logEvent(name: 'event', parameters: {
"eventCategory": eventCategory, "eventCategory": eventCategory,
"eventAction": eventAction, "eventAction": eventAction,
}); });

@ -34,12 +34,14 @@ class VideoCallService extends BaseService {
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen( await VideoChannel.openVideoCallScreen(
// TODO MOSA TEST // TODO MOSA TEST
kApiKey: '46209962',
kToken: startCallRes.openTokenID, kToken: startCallRes.openTokenID,
kSessionId: startCallRes.openSessionID, kSessionId: startCallRes.openSessionID,
kApiKey: '46209962', //
// kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", // kToken: "T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9NzE0MGE4YzM0ZTU2YjQ5NmQzOTgwOTNkYmU1NzEzMmQxYTdkMDliZTpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTVNakkxTkRjMU1EUTRObjVCVFZsM2MwODFNV1ZhTjFsUlEyZGxiRFZxZVZjNWNHMS1mbjQmY3JlYXRlX3RpbWU9MTY5MjI1NDc1MCZub25jZT0wLjY5OTQyNzkzMTg1NDg4NSZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjkyMjU2NTUwJmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
// kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", // kSessionId: "1_MX40NjIwOTk2Mn5-MTY5MjI1NDc1MDQ4Nn5BTVl3c081MWVaN1lRQ2dlbDVqeVc5cG1-fn4",
// kApiKey:'47247954',
vcId: patient.vcId, vcId: patient.vcId,
isRecording: isRecording, isRecording: isRecording,
patientName: patient.fullName ?? patientName: patient.fullName ??

@ -7,10 +7,10 @@ import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart'; import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart';
import 'package:doctor_app_flutter/core/model/auth/new_login_information_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/new_login_information_response_model.dart';
import 'package:doctor_app_flutter/core/model/auth/send_activation_code_for_doctor_app_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/send_activation_code_for_doctor_app_response_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/model/doctor/user_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/user_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class AuthenticationService extends BaseService { class AuthenticationService extends BaseService {
List<GetIMEIDetailsModel> _imeiDetails = []; List<GetIMEIDetailsModel> _imeiDetails = [];
@ -19,26 +19,16 @@ class AuthenticationService extends BaseService {
NewLoginInformationModel _loginInfo = NewLoginInformationModel(); NewLoginInformationModel _loginInfo = NewLoginInformationModel();
NewLoginInformationModel get loginInfo => _loginInfo; NewLoginInformationModel get loginInfo => _loginInfo;
SendActivationCodeForDoctorAppResponseModel SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel();
_activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel(); SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel();
get activationCodeVerificationScreenRes =>
_activationCodeVerificationScreenRes; SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel(); CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _checkActivationCodeForDoctorAppRes;
SendActivationCodeForDoctorAppResponseModel
get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel();
CheckActivationCodeForDoctorAppResponseModel
get checkActivationCodeForDoctorAppRes =>
_checkActivationCodeForDoctorAppRes;
Map<String, dynamic> _insertDeviceImeiRes = {}; Map<String, dynamic> _insertDeviceImeiRes = {};
List<DoctorProfileModel> _doctorProfilesList = []; List<DoctorProfileModel> _doctorProfilesList = [];
@ -47,8 +37,7 @@ class AuthenticationService extends BaseService {
Future selectDeviceImei(imei) async { Future selectDeviceImei(imei) async {
try { try {
await baseAppClient.post(SELECT_DEVICE_IMEI, await baseAppClient.post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_imeiDetails = []; _imeiDetails = [];
response['List_DoctorDeviceDetails'].forEach((v) { response['List_DoctorDeviceDetails'].forEach((v) {
_imeiDetails.add(GetIMEIDetailsModel.fromJson(v)); _imeiDetails.add(GetIMEIDetailsModel.fromJson(v));
@ -56,7 +45,7 @@ class AuthenticationService extends BaseService {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: {"IMEI": imei, "TokenID": "@dm!n"}); }, body: {"IMEI": imei});
} catch (error) { } catch (error) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -67,8 +56,7 @@ class AuthenticationService extends BaseService {
hasError = false; hasError = false;
_loginInfo = NewLoginInformationModel(); _loginInfo = NewLoginInformationModel();
try { try {
await baseAppClient.post(LOGIN_URL, await baseAppClient.post(LOGIN_URL, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_loginInfo = NewLoginInformationModel.fromJson(response); _loginInfo = NewLoginInformationModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -80,16 +68,12 @@ class AuthenticationService extends BaseService {
} }
} }
Future sendActivationCodeVerificationScreen( Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async {
ActivationCodeForVerificationScreenModel activationCodeModel) async {
hasError = false; hasError = false;
_activationCodeVerificationScreenRes = _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel();
try { try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN, await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
_activationCodeVerificationScreenRes =
SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -100,16 +84,12 @@ class AuthenticationService extends BaseService {
} }
} }
Future sendActivationCodeForDoctorApp( Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel) async {
ActivationCodeModel activationCodeModel) async {
hasError = false; hasError = false;
_activationCodeForDoctorAppRes = _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel();
SendActivationCodeForDoctorAppResponseModel();
try { try {
await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response);
_activationCodeForDoctorAppRes =
SendActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -120,16 +100,12 @@ class AuthenticationService extends BaseService {
} }
} }
Future checkActivationCodeForDoctorApp( Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel) async {
CheckActivationCodeRequestModel checkActivationCodeRequestModel) async {
hasError = false; hasError = false;
_checkActivationCodeForDoctorAppRes = _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
CheckActivationCodeForDoctorAppResponseModel();
try { try {
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -144,8 +120,7 @@ class AuthenticationService extends BaseService {
hasError = false; hasError = false;
_insertDeviceImeiRes = {}; _insertDeviceImeiRes = {};
try { try {
await baseAppClient.post(INSERT_DEVICE_IMEI, await baseAppClient.post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_insertDeviceImeiRes = response; _insertDeviceImeiRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -160,8 +135,7 @@ class AuthenticationService extends BaseService {
Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async { Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async {
hasError = false; hasError = false;
try { try {
await baseAppClient.post(GET_DOC_PROFILES, await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
_doctorProfilesList.clear(); _doctorProfilesList.clear();
response['DoctorProfileList'].forEach((v) { response['DoctorProfileList'].forEach((v) {
_doctorProfilesList.add(DoctorProfileModel.fromJson(v)); _doctorProfilesList.add(DoctorProfileModel.fromJson(v));

@ -55,10 +55,11 @@ class LookupService extends BaseService {
List<dynamic> listOfAdmissionType = []; List<dynamic> listOfAdmissionType = [];
List<dynamic> listOfDiagnosisSelectionTypes = []; List<dynamic> listOfDiagnosisSelectionTypes = [];
Future getMasterLookup(MasterKeysService masterKeys) async { Future getMasterLookup(MasterKeysService masterKeys, {String searchKey = ""}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = { Map<String, dynamic> body = {
"MasterInput": masterKeys.getMasterKeyService() "MasterInput": masterKeys.getMasterKeyService(),
"SearchKey": searchKey
}; };
await baseAppClient.post(GET_MASTER_LOOKUP_LIST, await baseAppClient.post(GET_MASTER_LOOKUP_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -2,6 +2,8 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart';
import '../../model/dashboard/doctor_schedule.dart';
class DashboardService extends BaseService { class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = []; List<DashboardModel> _dashboardItemsList = [];

@ -3,13 +3,17 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/request_schedule.dart'; import 'package:doctor_app_flutter/core/model/doctor/request_schedule.dart';
import '../../../config/shared_pref_kay.dart';
import '../../model/dashboard/doctor_schedule.dart';
class ScheduleService extends BaseService { class ScheduleService extends BaseService {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable => List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_listDoctorWorkingHoursTable; _listDoctorWorkingHoursTable;
List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = []; List<ListDoctorWorkingHoursTable> _listDoctorWorkingHoursTable = [];
RequestSchedule _requestSchedule = RequestSchedule(); RequestSchedule _requestSchedule = RequestSchedule();
List<DoctorSchedule> _doctorRota= [];
List<DoctorSchedule> get doctorRotation => _doctorRota;
Future getDoctorSchedule() async { Future getDoctorSchedule() async {
await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE, await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
@ -23,4 +27,23 @@ class ScheduleService extends BaseService {
super.error = error; super.error = error;
}, body: _requestSchedule.toJson(), isFallLanguage: true); }, body: _requestSchedule.toJson(), isFallLanguage: true);
} }
Future getDoctorRota(String fromDate, String toDate,{int pageNo = 1}) async{
hasError = false;
String doctorId = await sharedPref.getString(DOCTOR_ID); ////'7826';
String url = DOCTOR_SCHEDULE + '?userid='+doctorId+'&fromDate='+fromDate+'&toDate='+toDate+'&pagenumber='+pageNo.toString()+'&pagesize=10';
await baseAppClient.get( endPoint: url, onSuccess: (dynamic response, int statusCode) {
_doctorRota =[];
response['response'].forEach((res){
_doctorRota.add(DoctorSchedule.fromJson(res));
});
print(_doctorRota);
}, onFailure: (String error, int statusCode) {
print(error);
},
);
}
} }

@ -1,10 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/hospitals/VidaPlusProjectListModel.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class HospitalsService extends BaseService { class HospitalsService extends BaseService {
List<GetHospitalsResponseModel> hospitals = List(); List<GetHospitalsResponseModel> hospitals = List();
List<VidaPlusProjectListModel> vidaPlusProjectListModel = List();
Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async {
hasError = false; hasError = false;
@ -15,6 +17,12 @@ class HospitalsService extends BaseService {
response['ProjectInfo'].forEach((hospital) { response['ProjectInfo'].forEach((hospital) {
hospitals.add(GetHospitalsResponseModel.fromJson(hospital)); hospitals.add(GetHospitalsResponseModel.fromJson(hospital));
}); });
vidaPlusProjectListModel.clear();
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
});
}
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -8,8 +8,7 @@ class OutPatientService extends BaseService {
List<PatiantInformtion> get patientList => _patientList; List<PatiantInformtion> get patientList => _patientList;
Future getOutPatient( Future getOutPatient(PatientSearchRequestModel patientSearchRequestModel) async {
PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_MY_OUT_PATIENT, GET_MY_OUT_PATIENT,
@ -27,8 +26,7 @@ class OutPatientService extends BaseService {
); );
} }
Future getPatientFileInformation( Future getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel) async {
PatientSearchRequestModel patientSearchRequestModel) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
PRM_SEARCH_PATIENT, PRM_SEARCH_PATIENT,

@ -114,6 +114,7 @@ class PatientReferralService extends LookupService {
_doctorsByClinicIdRequest.clinicID = clinicId; _doctorsByClinicIdRequest.clinicID = clinicId;
_doctorsByClinicIdRequest.patientID = patient.patientId; _doctorsByClinicIdRequest.patientID = patient.patientId;
_doctorsByClinicIdRequest.gender = patient.gender; _doctorsByClinicIdRequest.gender = patient.gender;
_doctorsByClinicIdRequest.doctorID = 0;
await baseAppClient.postPatient(PATIENT_GET_DOCTOR_BY_CLINIC_Hospital, await baseAppClient.postPatient(PATIENT_GET_DOCTOR_BY_CLINIC_Hospital,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -33,10 +33,7 @@ class ERSignInService extends LookupService {
Future signInERPatient({DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel}) async { Future signInERPatient({DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel}) async {
hasError = false; hasError = false;
await baseAppClient.post(DOCTOR_ER_SIGN_ASSESSMENT, await baseAppClient.post(DOCTOR_ER_SIGN_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -112,7 +112,7 @@ class LabsService extends BaseService {
body['SetupID'] = patientLabOrder.setupID; body['SetupID'] = patientLabOrder.setupID;
body['ProjectID'] = patientLabOrder.projectID; body['ProjectID'] = patientLabOrder.projectID;
body['ClinicID'] = patientLabOrder.clinicID ?? 0; body['ClinicID'] = patientLabOrder.clinicID ?? 0;
body['InvoiceType'] = patientLabOrder.invoiceType ??"";
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult = []; patientLabSpecialResult = [];

@ -19,12 +19,12 @@ class MedicineService extends BaseService {
PharmaciesListRequestModel _listRequestModel = PharmaciesListRequestModel(); PharmaciesListRequestModel _listRequestModel = PharmaciesListRequestModel();
Future getMedicineItem(String itemName) async { Future getMedicineItem(String itemName) async {
_pharmacyItemsList.clear();
_itemsRequestModel.pHRItemName = itemName; _itemsRequestModel.pHRItemName = itemName;
searchText = itemName; searchText = itemName;
await baseAppClient.post( await baseAppClient.post(
PHARMACY_ITEMS_URL, PHARMACY_ITEMS_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_pharmacyItemsList.clear();
_pharmacyItemsList = response['ListPharmcy_Region_enh']; _pharmacyItemsList = response['ListPharmcy_Region_enh'];
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import '../../base/base_service.dart'; import '../../base/base_service.dart';
@ -8,20 +8,17 @@ import '../../base/base_service.dart';
class RadiologyService extends BaseService { class RadiologyService extends BaseService {
List<FinalRadiology> finalRadiologyList = List(); List<FinalRadiology> finalRadiologyList = List();
String url = ''; String url = '';
bool isRadiologyVIDAPlus = false;
Future getRadImageURL( Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient,String invoiceType}) async {
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
hasError = false; hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo; body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem; body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
body["InvoiceType"] = invoiceType;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
url = response['Data']; url = response['Data'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -29,8 +26,7 @@ class RadiologyService extends BaseService {
}, body: body); }, body: body);
} }
Future getPatientRadOrders(PatiantInformtion patient, Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
{isInPatient = false}) async {
String url = GET_PATIENT_ORDERS; String url = GET_PATIENT_ORDERS;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
if (isInPatient) { if (isInPatient) {
@ -39,19 +35,29 @@ class RadiologyService extends BaseService {
} }
finalRadiologyList.clear(); finalRadiologyList.clear();
hasError = false; hasError = false;
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
finalRadiologyList = []; finalRadiologyList = [];
String label = "ListRAD"; String label = "ListRAD";
if (isInPatient) { if (isInPatient) {
label = "List_GetRadOreders"; label = "List_GetRadOreders";
} }
if (response[label] == null || response[label].length == 0) { if (response['FinalRadiologyList'] != null && response['FinalRadiologyList'].length != 0) {
label = "FinalRadiologyList"; isRadiologyVIDAPlus = false;
} response['FinalRadiologyList'].forEach((radiology) {
response[label].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology)); finalRadiologyList.add(FinalRadiology.fromJson(radiology));
}); });
} else {
isRadiologyVIDAPlus = true;
response['FinalRadiologyListAPI'].forEach((radiology) {
finalRadiologyList.add(FinalRadiology.fromJson(radiology));
});
}
// if (response[label] == null || response[label].length == 0) {
// label = "FinalRadiologyList";
// }
// response[label].forEach((radiology) {
// finalRadiologyList.add(FinalRadiology.fromJson(radiology));
// });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -100,6 +100,7 @@ class SickLeaveService extends BaseService {
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
// Future.value(response); // Future.value(response);
getAllSickLeavePatient = []; getAllSickLeavePatient = [];
getAllSickLeavePatient.clear();
response['List_SickLeave'].forEach((v) { response['List_SickLeave'].forEach((v) {
getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v)); getAllSickLeavePatient.add(SickLeavePatientModel.fromJson(v));
}); });

@ -23,7 +23,7 @@ class PendingOrderService extends BaseService {
admissionNo: admissionNo, admissionNo: admissionNo,
patientTypeID: 1, patientTypeID: 1,
patientType: 1, patientType: 1,
setupID: "010266"); );
hasError = false; hasError = false;
await baseAppClient.post(GET_PENDING_ORDERS, await baseAppClient.post(GET_PENDING_ORDERS,
@ -50,7 +50,7 @@ class PendingOrderService extends BaseService {
admissionNo: admissionNo, admissionNo: admissionNo,
patientTypeID: 1, patientTypeID: 1,
patientType: 1, patientType: 1,
setupID: "010266"); );
hasError = false; hasError = false;
await baseAppClient.post(GET_ADMISSION_ORDERS, await baseAppClient.post(GET_ADMISSION_ORDERS,

@ -27,7 +27,7 @@ class ERSignInViewModel extends BaseViewModel {
Future signInERPatient({int patientId, int signInType}) async { Future signInERPatient({int patientId, int signInType}) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel = new DoctorErSignAssessmentReqModel(setupID:"010266", signInType:signInType, loginDoctorID:doctorProfile.doctorID, patientID: patientId ); DoctorErSignAssessmentReqModel doctorErSignAssessmentReqModel = new DoctorErSignAssessmentReqModel(signInType: signInType, loginDoctorID: doctorProfile.doctorID, patientID: patientId);
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _ERSignInService.signInERPatient(doctorErSignAssessmentReqModel: doctorErSignAssessmentReqModel); await _ERSignInService.signInERPatient(doctorErSignAssessmentReqModel: doctorErSignAssessmentReqModel);
if (_ERSignInService.hasError) { if (_ERSignInService.hasError) {
@ -36,6 +36,4 @@ class ERSignInViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -45,52 +45,39 @@ class SOAPViewModel extends BaseViewModel {
List<MasterKeyModel> get allergiesList => _SOAPService.allergiesList; List<MasterKeyModel> get allergiesList => _SOAPService.allergiesList;
List<MasterKeyModel> get allergySeverityList => List<MasterKeyModel> get allergySeverityList => _SOAPService.allergySeverityList;
_SOAPService.allergySeverityList;
List<MasterKeyModel> get historyFamilyList => _SOAPService.historyFamilyList; List<MasterKeyModel> get historyFamilyList => _SOAPService.historyFamilyList;
List<MasterKeyModel> get historyMedicalList => List<MasterKeyModel> get historyMedicalList => _SOAPService.historyMedicalList;
_SOAPService.historyMedicalList;
List<MasterKeyModel> get historySportList => _SOAPService.historySportList; List<MasterKeyModel> get historySportList => _SOAPService.historySportList;
List<MasterKeyModel> get historySocialList => _SOAPService.historySocialList; List<MasterKeyModel> get historySocialList => _SOAPService.historySocialList;
List<MasterKeyModel> get historySurgicalList => List<MasterKeyModel> get historySurgicalList => _SOAPService.historySurgicalList;
_SOAPService.historySurgicalList;
List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => List<MasterKeyModel> get mergeHistorySurgicalWithHistorySportList => [...historySurgicalList, ...historySportList];
[...historySurgicalList, ...historySportList];
List<MasterKeyModel> get physicalExaminationList => List<MasterKeyModel> get physicalExaminationList => _SOAPService.physicalExaminationList;
_SOAPService.physicalExaminationList;
List<MasterKeyModel> get listOfDiagnosisType => List<MasterKeyModel> get listOfDiagnosisType => _SOAPService.listOfDiagnosisType;
_SOAPService.listOfDiagnosisType;
List<MasterKeyModel> get listOfDiagnosisCondition => List<MasterKeyModel> get listOfDiagnosisCondition => _SOAPService.listOfDiagnosisCondition;
_SOAPService.listOfDiagnosisCondition;
List<MasterKeyModel> get listOfICD10 => _SOAPService.listOfICD10; List<MasterKeyModel> get listOfICD10 => _SOAPService.listOfICD10;
List<GetChiefComplaintResModel> get patientChiefComplaintList => List<GetChiefComplaintResModel> get patientChiefComplaintList => _SOAPService.patientChiefComplaintList;
_SOAPService.patientChiefComplaintList;
List<GetAllergiesResModel> get patientAllergiesList => List<GetAllergiesResModel> get patientAllergiesList => _SOAPService.patientAllergiesList;
_SOAPService.patientAllergiesList;
List<GetHistoryResModel> get patientHistoryList => List<GetHistoryResModel> get patientHistoryList => _SOAPService.patientHistoryList;
_SOAPService.patientHistoryList;
List<GetPhysicalExamResModel> get patientPhysicalExamList => List<GetPhysicalExamResModel> get patientPhysicalExamList => _SOAPService.patientPhysicalExamList;
_SOAPService.patientPhysicalExamList;
List<GetPatientProgressNoteResModel> get patientProgressNoteList => List<GetPatientProgressNoteResModel> get patientProgressNoteList => _SOAPService.patientProgressNoteList;
_SOAPService.patientProgressNoteList;
List<GetAssessmentResModel> get patientAssessmentList => List<GetAssessmentResModel> get patientAssessmentList => _SOAPService.patientAssessmentList;
_SOAPService.patientAssessmentList;
int get episodeID => _SOAPService.episodeID; int get episodeID => _SOAPService.episodeID;
@ -109,8 +96,7 @@ class SOAPViewModel extends BaseViewModel {
get medicationFrequencyList => _SOAPService.medicationFrequencyListWithModel; get medicationFrequencyList => _SOAPService.medicationFrequencyListWithModel;
List<GetMedicationResponseModel> get allMedicationList => List<GetMedicationResponseModel> get allMedicationList => _prescriptionService.allMedicationList;
_prescriptionService.allMedicationList;
SubjectiveCallBack subjectiveCallBack; SubjectiveCallBack subjectiveCallBack;
@ -151,13 +137,13 @@ class SOAPViewModel extends BaseViewModel {
nextOnPlanPage(model) { nextOnPlanPage(model) {
planCallBack.nextFunction(model); planCallBack.nextFunction(model);
} }
Future getMasterLookup(MasterKeysService masterKeys,
{bool isBusyLocal = false}) async { Future getMasterLookup(MasterKeysService masterKeys, {bool isBusyLocal = false, String searchKey = ""}) async {
if (isBusyLocal) { if (isBusyLocal) {
setState(ViewState.Busy); setState(ViewState.Busy);
} else } else
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getMasterLookup(masterKeys); await _SOAPService.getMasterLookup(masterKeys, searchKey: searchKey);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -175,12 +161,9 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postEpisodeForInPatient( Future postEpisodeForInPatient(PostEpisodeForInpatientRequestModel postEpisodeForInpatientRequestModel) async {
PostEpisodeForInpatientRequestModel
postEpisodeForInpatientRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.postEpisodeForInPatient( await _SOAPService.postEpisodeForInPatient(postEpisodeForInpatientRequestModel);
postEpisodeForInpatientRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -188,8 +171,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postPhysicalExam( Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
PostPhysicalExamRequestModel postPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel); await _SOAPService.postPhysicalExam(postPhysicalExamRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -199,8 +181,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postProgressNote( Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async {
PostProgressNoteRequestModel postProgressNoteRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.postProgressNote(postProgressNoteRequestModel); await _SOAPService.postProgressNote(postProgressNoteRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -210,8 +191,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postAssessment( Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async {
PostAssessmentRequestModel postAssessmentRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.postAssessment(postAssessmentRequestModel); await _SOAPService.postAssessment(postAssessmentRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -221,8 +201,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future patchPhysicalExam( Future patchPhysicalExam(PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.patchPhysicalExam(patchPhysicalExamRequestModel); await _SOAPService.patchPhysicalExam(patchPhysicalExamRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -232,8 +211,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future patchProgressNote( Future patchProgressNote(PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
PostProgressNoteRequestModel patchProgressNoteRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.patchProgressNote(patchProgressNoteRequestModel); await _SOAPService.patchProgressNote(patchProgressNoteRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -243,8 +221,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future patchAssessment( Future patchAssessment(PatchAssessmentReqModel patchAssessmentRequestModel) async {
PatchAssessmentReqModel patchAssessmentRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.patchAssessment(patchAssessmentRequestModel); await _SOAPService.patchAssessment(patchAssessmentRequestModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -254,8 +231,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP, Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP, {isLocalBusy = false}) async {
{isLocalBusy = false}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else } else
@ -274,14 +250,8 @@ class SOAPViewModel extends BaseViewModel {
String getAllergicNames(isArabic) { String getAllergicNames(isArabic) {
String allergiesString = ''; String allergiesString = '';
patientAllergiesList.forEach((element) { patientAllergiesList.forEach((element) {
MasterKeyModel selectedAllergy = getOneMasterKey( MasterKeyModel selectedAllergy = getOneMasterKey(masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType);
masterKeys: MasterKeysService.Allergies, if (selectedAllergy != null && element.isChecked) allergiesString += (isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn) + ' , ';
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
if (selectedAllergy != null && element.isChecked)
allergiesString +=
(isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn) +
' , ';
}); });
return allergiesString; return allergiesString;
} }
@ -291,9 +261,7 @@ class SOAPViewModel extends BaseViewModel {
) async { ) async {
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel( GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo == null episodeID: patientInfo.episodeNo == null ? "0" : patientInfo.episodeNo.toString(),
? "0"
: patientInfo.episodeNo.toString(),
appointmentNo: patientInfo.appointmentNo == null appointmentNo: patientInfo.appointmentNo == null
? 0 ? 0
: int.parse( : int.parse(
@ -313,8 +281,7 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientProgressNote( Future getPatientProgressNote(GetProgressNoteReqModel getGetProgressNoteReqModel) async {
GetProgressNoteReqModel getGetProgressNoteReqModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel); await _SOAPService.getPatientProgressNote(getGetProgressNoteReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
@ -324,7 +291,6 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getMedicationList() async { Future getMedicationList() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionService.getMedicationList(); await _prescriptionService.getMedicationList();
@ -337,11 +303,7 @@ class SOAPViewModel extends BaseViewModel {
Future getEpisodeForInpatient(PatiantInformtion patient) async { Future getEpisodeForInpatient(PatiantInformtion patient) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel = GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel = GetEpisodeForInpatientReqModel(patientID: patient.patientId, admissionNo: int.parse(patient.admissionNo), patientTypeID: 1);
GetEpisodeForInpatientReqModel(
patientID: patient.patientId,
admissionNo: int.parse(patient.admissionNo),
patientTypeID: 1);
await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel); await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
@ -353,13 +315,11 @@ class SOAPViewModel extends BaseViewModel {
} }
// ignore: missing_return // ignore: missing_return
MasterKeyModel getOneMasterKey( MasterKeyModel getOneMasterKey({@required MasterKeysService masterKeys, dynamic id, int typeId}) {
{@required MasterKeysService masterKeys, dynamic id, int typeId}) {
switch (masterKeys) { switch (masterKeys) {
case MasterKeysService.Allergies: case MasterKeysService.Allergies:
List<MasterKeyModel> result = allergiesList.where((element) { List<MasterKeyModel> result = allergiesList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -368,8 +328,7 @@ class SOAPViewModel extends BaseViewModel {
case MasterKeysService.HistoryFamily: case MasterKeysService.HistoryFamily:
List<MasterKeyModel> result = historyFamilyList.where((element) { List<MasterKeyModel> result = historyFamilyList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -377,8 +336,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistoryMedical: case MasterKeysService.HistoryMedical:
List<MasterKeyModel> result = historyMedicalList.where((element) { List<MasterKeyModel> result = historyMedicalList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -386,8 +344,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistorySocial: case MasterKeysService.HistorySocial:
List<MasterKeyModel> result = historySocialList.where((element) { List<MasterKeyModel> result = historySocialList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -395,8 +352,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.HistorySports: case MasterKeysService.HistorySports:
List<MasterKeyModel> result = historySocialList.where((element) { List<MasterKeyModel> result = historySocialList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -412,8 +368,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.PhysicalExamination: case MasterKeysService.PhysicalExamination:
List<MasterKeyModel> result = physicalExaminationList.where((element) { List<MasterKeyModel> result = physicalExaminationList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -421,8 +376,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.AllergySeverity: case MasterKeysService.AllergySeverity:
List<MasterKeyModel> result = allergySeverityList.where((element) { List<MasterKeyModel> result = allergySeverityList.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -430,8 +384,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = listOfDiagnosisType.where((element) { List<MasterKeyModel> result = listOfDiagnosisType.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -439,8 +392,7 @@ class SOAPViewModel extends BaseViewModel {
break; break;
case MasterKeysService.DiagnosisCondition: case MasterKeysService.DiagnosisCondition:
List<MasterKeyModel> result = listOfDiagnosisCondition.where((element) { List<MasterKeyModel> result = listOfDiagnosisCondition.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -458,10 +410,8 @@ class SOAPViewModel extends BaseViewModel {
} }
} }
int getFirstIndexForOldExamination( int getFirstIndexForOldExamination(List<MySelectedExamination> mySelectedExamination) {
List<MySelectedExamination> mySelectedExamination) { Iterable<MySelectedExamination> examList = mySelectedExamination.where((element) => !element.isLocal);
Iterable<MySelectedExamination> examList =
mySelectedExamination.where((element) => !element.isLocal);
if (examList.length > 0) { if (examList.length > 0) {
return mySelectedExamination.indexOf(examList.first); return mySelectedExamination.indexOf(examList.first);
@ -470,44 +420,25 @@ class SOAPViewModel extends BaseViewModel {
} }
onUpdateSubjectStepStart(PatiantInformtion patientInfo) async { onUpdateSubjectStepStart(PatiantInformtion patientInfo) async {
GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel(
GetChiefComplaintReqModel( admissionNo: patientInfo.admissionNo != null ? int.parse(patientInfo.admissionNo) : null,
admissionNo:
patientInfo
.admissionNo !=
null
? int.parse(patientInfo.admissionNo)
: null,
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
appointmentNo: patientInfo.appointmentNo != null appointmentNo: patientInfo.appointmentNo != null ? int.parse(patientInfo.appointmentNo.toString()) : null,
? int.parse(patientInfo.appointmentNo.toString())
: null,
episodeId: patientInfo.episodeNo, episodeId: patientInfo.episodeNo,
episodeID: patientInfo.episodeNo, episodeID: patientInfo.episodeNo,
doctorID: ''); doctorID: '');
var services = [ var services = [_SOAPService.getPatientChiefComplaint(getChiefComplaintReqModel)];
_SOAPService.getPatientChiefComplaint(getChiefComplaintReqModel)
];
if (patientInfo.admissionNo == null) { if (patientInfo.admissionNo == null) {
complaintsControllerError = ''; complaintsControllerError = '';
medicationControllerError = ''; medicationControllerError = '';
illnessControllerError = ''; illnessControllerError = '';
GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel( GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN, episodeID: patientInfo.episodeNo.toString(), appointmentNo: int.parse(patientInfo.appointmentNo.toString()), doctorID: '', editedBy: '');
episodeID: patientInfo.episodeNo.toString(), services.add(_SOAPService.getPatientHistories(getHistoryReqModel, isFirst: true));
appointmentNo: int.parse(patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
services.add(
_SOAPService.getPatientHistories(getHistoryReqModel, isFirst: true));
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( GeneralGetReqForSOAP generalGetReqForSOAP =
patientMRN: patientInfo.patientMRN, GeneralGetReqForSOAP(patientMRN: patientInfo.patientMRN, episodeId: patientInfo.episodeNo, appointmentNo: int.parse(patientInfo.appointmentNo.toString()), doctorID: '', editedBy: '');
episodeId: patientInfo.episodeNo,
appointmentNo: int.parse(patientInfo.appointmentNo.toString()),
doctorID: '',
editedBy: '');
services.add(_SOAPService.getPatientAllergy(generalGetReqForSOAP)); services.add(_SOAPService.getPatientAllergy(generalGetReqForSOAP));
} }
@ -521,40 +452,28 @@ class SOAPViewModel extends BaseViewModel {
if (patientHistoryList.isNotEmpty) { if (patientHistoryList.isNotEmpty) {
if (historyFamilyList.isEmpty) { if (historyFamilyList.isEmpty) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily)];
_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily));
_SOAPService.getMasterLookup(MasterKeysService.HistoryFamily));
} }
} }
if (historyMedicalList.isEmpty) { if (historyMedicalList.isEmpty) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical)];
_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical)
];
} else } else
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical));
_SOAPService.getMasterLookup(MasterKeysService.HistoryMedical));
} }
if (historySurgicalList.length == 0) { if (historySurgicalList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical)];
_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical)
];
} else } else
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical));
_SOAPService.getMasterLookup(MasterKeysService.HistorySurgical));
} }
if (historySportList.length == 0) { if (historySportList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.HistorySports)];
_SOAPService.getMasterLookup(MasterKeysService.HistorySports)
];
} else } else
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.HistorySports));
_SOAPService.getMasterLookup(MasterKeysService.HistorySports));
} }
} }
@ -565,12 +484,9 @@ class SOAPViewModel extends BaseViewModel {
services.add(_SOAPService.getMasterLookup(MasterKeysService.Allergies)); services.add(_SOAPService.getMasterLookup(MasterKeysService.Allergies));
if (allergySeverityList.isEmpty) { if (allergySeverityList.isEmpty) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity)];
_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity)
];
} else } else
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity));
_SOAPService.getMasterLookup(MasterKeysService.AllergySeverity));
} }
} }
@ -588,42 +504,30 @@ class SOAPViewModel extends BaseViewModel {
var services; var services;
if (medicationStrengthList.length == 0) { if (medicationStrengthList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength)];
_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength));
_SOAPService.getMasterLookup(MasterKeysService.MedicationStrength));
} }
} }
if (medicationFrequencyList.length == 0) { if (medicationFrequencyList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.MedicationFrequency)];
_SOAPService.getMasterLookup(MasterKeysService.MedicationFrequency)
];
} else { } else {
services.add(_SOAPService.getMasterLookup( services.add(_SOAPService.getMasterLookup(MasterKeysService.MedicationFrequency));
MasterKeysService.MedicationFrequency));
} }
} }
if (medicationDoseTimeList.length == 0) { if (medicationDoseTimeList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime)];
_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime));
_SOAPService.getMasterLookup(MasterKeysService.MedicationDoseTime));
} }
} }
if (medicationRouteList.length == 0) { if (medicationRouteList.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute)];
_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute));
_SOAPService.getMasterLookup(MasterKeysService.MedicationRoute));
} }
} }
if (allMedicationList.length == 0) { if (allMedicationList.length == 0) {
@ -643,34 +547,28 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
callAddAssessmentLookupsServices({bool allowSetState = true}) async { callAddAssessmentLookupsServices({String searchKey = "", bool allowSetState = true}) async {
if (allowSetState) setState(ViewState.Busy); if (allowSetState) setState(ViewState.Busy);
var services; var services;
if (listOfDiagnosisCondition.length == 0) { if (listOfDiagnosisCondition.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition)];
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition)
];
} else { } else {
services.add( services.add(_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition));
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisCondition));
} }
} }
if (listOfDiagnosisType.length == 0) { if (listOfDiagnosisType.length == 0) {
if (services == null) { if (services == null) {
services = [ services = [_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType)];
_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType)
];
} else { } else {
services services.add(_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType));
.add(_SOAPService.getMasterLookup(MasterKeysService.DiagnosisType));
} }
} }
if (listOfICD10.length == 0) { if (listOfICD10.length == 0) {
if (services == null) { if (services == null) {
services = [_SOAPService.getMasterLookup(MasterKeysService.ICD10)]; services = [_SOAPService.getMasterLookup(MasterKeysService.ICD10, searchKey: searchKey)];
} else { } else {
services.add(_SOAPService.getMasterLookup(MasterKeysService.ICD10)); services.add(_SOAPService.getMasterLookup(MasterKeysService.ICD10, searchKey: searchKey));
} }
} }
@ -686,11 +584,7 @@ class SOAPViewModel extends BaseViewModel {
onUpdateAssessmentStepStart(PatiantInformtion patientInfo) async { onUpdateAssessmentStepStart(PatiantInformtion patientInfo) async {
GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN, episodeID: patientInfo.episodeNo.toString(), editedBy: '', doctorID: '', appointmentNo: int.parse(patientInfo.appointmentNo.toString()));
episodeID: patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '',
appointmentNo: int.parse(patientInfo.appointmentNo.toString()));
var services = [_SOAPService.getPatientAssessment(getAssessmentReqModel)]; var services = [_SOAPService.getPatientAssessment(getAssessmentReqModel)];
@ -707,37 +601,21 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
postSubjectServices( postSubjectServices({patientInfo, String complaintsText, String medicationText, String illnessText, List<MySelectedHistory> myHistoryList, List<MySelectedAllergy> myAllergiesList}) async {
{patientInfo,
String complaintsText,
String medicationText,
String illnessText,
List<MySelectedHistory> myHistoryList,
List<MySelectedAllergy> myAllergiesList}) async {
var services; var services;
PostChiefComplaintRequestModel postChiefComplaintRequestModel = PostChiefComplaintRequestModel postChiefComplaintRequestModel =
createPostChiefComplaintRequestModel( createPostChiefComplaintRequestModel(patientInfo: patientInfo, illnessText: illnessText, medicationText: medicationText, complaintsText: complaintsText);
patientInfo: patientInfo,
illnessText: illnessText,
medicationText: medicationText,
complaintsText: complaintsText);
if (patientChiefComplaintList.isEmpty) { if (patientChiefComplaintList.isEmpty) {
postChiefComplaintRequestModel.editedBy = ''; postChiefComplaintRequestModel.editedBy = '';
services = [ services = [_SOAPService.postChiefComplaint(postChiefComplaintRequestModel)];
_SOAPService.postChiefComplaint(postChiefComplaintRequestModel)
];
} else { } else {
postChiefComplaintRequestModel.editedBy = ''; postChiefComplaintRequestModel.editedBy = '';
services = [ services = [_SOAPService.patchChiefComplaint(postChiefComplaintRequestModel)];
_SOAPService.patchChiefComplaint(postChiefComplaintRequestModel)
];
} }
if (myHistoryList.length != 0) { if (myHistoryList.length != 0) {
PostHistoriesRequestModel postHistoriesRequestModel = PostHistoriesRequestModel postHistoriesRequestModel = createPostHistoriesRequestModel(patientInfo: patientInfo, myHistoryList: myHistoryList);
createPostHistoriesRequestModel(
patientInfo: patientInfo, myHistoryList: myHistoryList);
if (patientHistoryList.isEmpty) { if (patientHistoryList.isEmpty) {
services.add(_SOAPService.postHistories(postHistoriesRequestModel)); services.add(_SOAPService.postHistories(postHistoriesRequestModel));
@ -747,9 +625,7 @@ class SOAPViewModel extends BaseViewModel {
} }
if (myAllergiesList.length != 0) { if (myAllergiesList.length != 0) {
PostAllergyRequestModel postAllergyRequestModel = PostAllergyRequestModel postAllergyRequestModel = createPostAllergyRequestModel(myAllergiesList: myAllergiesList, patientInfo: patientInfo);
createPostAllergyRequestModel(
myAllergiesList: myAllergiesList, patientInfo: patientInfo);
if (patientAllergiesList.isEmpty) { if (patientAllergiesList.isEmpty) {
services.add(_SOAPService.postAllergy(postAllergyRequestModel)); services.add(_SOAPService.postAllergy(postAllergyRequestModel));
} else { } else {
@ -766,15 +642,9 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
PostChiefComplaintRequestModel createPostChiefComplaintRequestModel( PostChiefComplaintRequestModel createPostChiefComplaintRequestModel({patientInfo, String complaintsText, String medicationText, String illnessText}) {
{patientInfo,
String complaintsText,
String medicationText,
String illnessText}) {
return new PostChiefComplaintRequestModel( return new PostChiefComplaintRequestModel(
admissionNo: patientInfo.admissionNo != null admissionNo: patientInfo.admissionNo != null ? int.parse(patientInfo.admissionNo) : null,
? int.parse(patientInfo.admissionNo)
: null,
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo ?? 0, episodeID: patientInfo.episodeNo ?? 0,
appointmentNo: patientInfo.appointmentNo ?? 0, appointmentNo: patientInfo.appointmentNo ?? 0,
@ -787,13 +657,10 @@ class SOAPViewModel extends BaseViewModel {
numberOfWeeks: 0); numberOfWeeks: 0);
} }
PostHistoriesRequestModel createPostHistoriesRequestModel( PostHistoriesRequestModel createPostHistoriesRequestModel({patientInfo, List<MySelectedHistory> myHistoryList}) {
{patientInfo, List<MySelectedHistory> myHistoryList}) { PostHistoriesRequestModel postHistoriesRequestModel = new PostHistoriesRequestModel(doctorID: '');
PostHistoriesRequestModel postHistoriesRequestModel =
new PostHistoriesRequestModel(doctorID: '');
myHistoryList.forEach((history) { myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null) if (postHistoriesRequestModel.listMedicalHistoryVM == null) postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM( postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,
episodeId: patientInfo.episodeNo, episodeId: patientInfo.episodeNo,
@ -808,16 +675,11 @@ class SOAPViewModel extends BaseViewModel {
return postHistoriesRequestModel; return postHistoriesRequestModel;
} }
PostAllergyRequestModel createPostAllergyRequestModel( PostAllergyRequestModel createPostAllergyRequestModel({myAllergiesList, patientInfo}) {
{myAllergiesList, patientInfo}) { PostAllergyRequestModel postAllergyRequestModel = new PostAllergyRequestModel();
PostAllergyRequestModel postAllergyRequestModel =
new PostAllergyRequestModel();
myAllergiesList.forEach((allergy) { myAllergiesList.forEach((allergy) {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == null) postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
null) postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(ListHisProgNotePatientAllergyDiseaseVM(
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id, allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId, allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: patientInfo.patientMRN, patientMRN: patientInfo.patientMRN,

@ -11,22 +11,26 @@ import 'package:doctor_app_flutter/core/model/auth/imei_details.dart';
import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart'; import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart';
import 'package:doctor_app_flutter/core/model/auth/new_login_information_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/new_login_information_response_model.dart';
import 'package:doctor_app_flutter/core/model/auth/send_activation_code_for_doctor_app_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/send_activation_code_for_doctor_app_response_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/model/doctor/user_model.dart';
import 'package:doctor_app_flutter/core/model/hospitals/VidaPlusProjectListModel.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart';
import 'package:doctor_app_flutter/core/service/authentication_service.dart'; import 'package:doctor_app_flutter/core/service/authentication_service.dart';
import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart'; import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/model/doctor/user_model.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:local_auth/auth_strings.dart'; import 'package:local_auth/auth_strings.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED, UNVERIFIED } enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED, UNVERIFIED }
@ -41,20 +45,15 @@ class AuthenticationViewModel extends BaseViewModel {
NewLoginInformationModel get loginInfo => _authService.loginInfo; NewLoginInformationModel get loginInfo => _authService.loginInfo;
List<DoctorProfileModel> get doctorProfilesList => List<DoctorProfileModel> get doctorProfilesList => _authService.doctorProfilesList;
_authService.doctorProfilesList;
SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _authService.activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _authService.activationCodeForDoctorAppRes;
get activationCodeVerificationScreenRes =>
_authService.activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _authService.checkActivationCodeForDoctorAppRes;
get activationCodeForDoctorAppRes =>
_authService.activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel List<VidaPlusProjectListModel> get vidaPlusProjectList => _hospitalsService.vidaPlusProjectListModel;
get checkActivationCodeForDoctorAppRes =>
_authService.checkActivationCodeForDoctorAppRes;
NewLoginInformationModel loggedUser; NewLoginInformationModel loggedUser;
GetIMEIDetailsModel user; GetIMEIDetailsModel user;
@ -69,6 +68,7 @@ class AuthenticationViewModel extends BaseViewModel {
bool isFromLogin = false; bool isFromLogin = false;
APP_STATUS appStatus = APP_STATUS.LOADING; APP_STATUS appStatus = APP_STATUS.LOADING;
String localToken = ""; String localToken = "";
bool isHuawei = false;
AuthenticationViewModel({bool checkDeviceInfo = false}) { AuthenticationViewModel({bool checkDeviceInfo = false}) {
getDeviceInfoFromFirebase(); getDeviceInfoFromFirebase();
@ -88,32 +88,20 @@ class AuthenticationViewModel extends BaseViewModel {
profileInfo['IMEI'] = token; profileInfo['IMEI'] = token;
profileInfo['LogInTypeID'] = await sharedPref.getInt(OTP_TYPE); profileInfo['LogInTypeID'] = await sharedPref.getInt(OTP_TYPE);
profileInfo['BioMetricEnabled'] = true; profileInfo['BioMetricEnabled'] = true;
profileInfo['MobileNo'] = profileInfo['MobileNo'] = loggedIn != null ? loggedIn['MobileNumber'] : user.mobile;
loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; InsertIMEIDetailsModel insertIMEIDetailsModel = InsertIMEIDetailsModel.fromJson(profileInfo);
InsertIMEIDetailsModel insertIMEIDetailsModel = insertIMEIDetailsModel.genderDescription = profileInfo['Gender_Description'];
InsertIMEIDetailsModel.fromJson(profileInfo); insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN'];
insertIMEIDetailsModel.genderDescription = insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN'];
profileInfo['Gender_Description'];
insertIMEIDetailsModel.genderDescriptionN =
profileInfo['Gender_DescriptionN'];
insertIMEIDetailsModel.genderDescriptionN =
profileInfo['Gender_DescriptionN'];
insertIMEIDetailsModel.titleDescription = profileInfo['Title_Description']; insertIMEIDetailsModel.titleDescription = profileInfo['Title_Description'];
insertIMEIDetailsModel.titleDescriptionN = insertIMEIDetailsModel.titleDescriptionN = profileInfo['Title_DescriptionN'];
profileInfo['Title_DescriptionN'];
insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID); insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID);
insertIMEIDetailsModel.doctorID = loggedIn != null insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user.doctorID;
? loggedIn['List_MemberInformation'][0]['MemberID'] insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA;
: user.doctorID; insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
insertIMEIDetailsModel.outSA = insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA;
insertIMEIDetailsModel.vidaAuthTokenID =
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
insertIMEIDetailsModel.vidaRefreshTokenID =
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
insertIMEIDetailsModel.password = userInfo.password; insertIMEIDetailsModel.password = userInfo.password;
insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID : int.parse(user.editedBy.toString());
: int.parse(user.editedBy.toString());
await _authService.insertDeviceImei(insertIMEIDetailsModel); await _authService.insertDeviceImei(insertIMEIDetailsModel);
if (_authService.hasError) { if (_authService.hasError) {
@ -141,11 +129,9 @@ class AuthenticationViewModel extends BaseViewModel {
} }
/// send activation code for for msg methods /// send activation code for for msg methods
Future sendActivationCodeVerificationScreen( Future sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async {
AuthMethodTypes authMethodType) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
ActivationCodeForVerificationScreenModel activationCodeModel = ActivationCodeForVerificationScreenModel activationCodeModel = ActivationCodeForVerificationScreenModel(
ActivationCodeForVerificationScreenModel(
iMEI: user.iMEI, iMEI: user.iMEI,
facilityId: user.projectID, facilityId: user.projectID,
memberID: user.doctorID, memberID: user.doctorID,
@ -158,8 +144,7 @@ class AuthenticationViewModel extends BaseViewModel {
vidaRefreshTokenID: user.vidaRefreshTokenID); vidaRefreshTokenID: user.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user.editedBy.toString()); await sharedPref.setString(DOCTOR_ID, user.editedBy.toString());
await _authService await _authService.sendActivationCodeVerificationScreen(activationCodeModel);
.sendActivationCodeVerificationScreen(activationCodeModel);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -168,8 +153,7 @@ class AuthenticationViewModel extends BaseViewModel {
} }
/// send activation code for silent login /// send activation code for silent login
Future sendActivationCodeForDoctorApp( Future sendActivationCodeForDoctorApp({AuthMethodTypes authMethodType, String password}) async {
{AuthMethodTypes authMethodType, String password}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
ActivationCodeModel activationCodeModel = ActivationCodeModel( ActivationCodeModel activationCodeModel = ActivationCodeModel(
@ -184,58 +168,47 @@ class AuthenticationViewModel extends BaseViewModel {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await sharedPref.setString( await sharedPref.setString(TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID);
TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
/// check activation code for sms and whats app /// check activation code for sms and whats app
Future checkActivationCodeForDoctorApp( Future checkActivationCodeForDoctorApp({String activationCode, bool isSilentLogin = false}) async {
{String activationCode, bool isSilentLogin = false}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel(
new CheckActivationCodeRequestModel(
zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode,
mobileNumber: mobileNumber: loggedUser != null ? loggedUser.mobileNumber : user.mobile,
loggedUser != null ? loggedUser.mobileNumber : user.mobile, projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user.projectID,
projectID: await sharedPref.getInt(PROJECT_ID) != null
? await sharedPref.getInt(PROJECT_ID)
: user.projectID,
logInTokenID: await sharedPref.getString(TOKEN), logInTokenID: await sharedPref.getString(TOKEN),
activationCode: activationCode ?? '0000', activationCode: activationCode ?? '0000',
memberID: userInfo.userID != null memberID: userInfo.userID != null ? int.parse(userInfo.userID) : user.doctorID,
? int.parse(userInfo.userID)
: user.doctorID,
password: userInfo.password, password: userInfo.password,
facilityId: userInfo.projectID != null facilityId: userInfo.projectID != null ? userInfo.projectID.toString() : user.projectID.toString(),
? userInfo.projectID.toString()
: user.projectID.toString(),
oTPSendType: await sharedPref.getInt(OTP_TYPE), oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken, iMEI: localToken,
loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID : int.parse(user.editedBy.toString()),
: int.parse(user.editedBy.toString()),///loggedUser.listMemberInformation[0].employeeID,
///loggedUser.listMemberInformation[0].employeeID,
// loggedUser.listMemberInformation[0].employeeID, // loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin: isSilentLogin, isForSilentLogin: isSilentLogin,
generalid: "Cs2020@2016\$2958"); generalid: "Cs2020@2016\$2958");
await _authService await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await setDataAfterSendActivationSuccess( await setDataAfterSendActivationSuccess(checkActivationCodeForDoctorAppRes);
checkActivationCodeForDoctorAppRes);
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
/// get list of Hospitals /// get list of Hospitals
Future getHospitalsList(memberID) async { Future getHospitalsList(memberID) async {
GetHospitalsRequestModel getHospitalsRequestModel = GetHospitalsRequestModel getHospitalsRequestModel = GetHospitalsRequestModel();
GetHospitalsRequestModel();
getHospitalsRequestModel.memberID = memberID; getHospitalsRequestModel.memberID = memberID;
getHospitalsRequestModel.doctorID = memberID;
await _hospitalsService.getHospitals(getHospitalsRequestModel); await _hospitalsService.getHospitals(getHospitalsRequestModel);
if (_hospitalsService.hasError) { if (_hospitalsService.hasError) {
error = _hospitalsService.error; error = _hospitalsService.error;
@ -265,17 +238,14 @@ class AuthenticationViewModel extends BaseViewModel {
} }
} }
/// add  token to shared preferences in case of send activation code is success /// add token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess( setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) async {
CheckActivationCodeForDoctorAppResponseModel
sendActivationCodeForDoctorAppResponseModel) async {
// print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, await sharedPref.setString(
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); DOCTOR_SETUP_ID, sendActivationCodeForDoctorAppResponseModel.listDoctorsClinic[0].setupID != null ? sendActivationCodeForDoctorAppResponseModel.listDoctorsClinic[0].setupID : "");
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, await sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID);
await sharedPref.setString(TOKEN, await sharedPref.setString(TOKEN, sendActivationCodeForDoctorAppResponseModel.authenticationTokenID);
sendActivationCodeForDoctorAppResponseModel.authenticationTokenID);
} }
saveObjToString(String key, value) async { saveObjToString(String key, value) async {
@ -284,18 +254,10 @@ class AuthenticationViewModel extends BaseViewModel {
/// ask user to add his biometric /// ask user to add his biometric
showIOSAuthMessages() async { showIOSAuthMessages() async {
const iosStrings = const IOSAuthMessages( const iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please Enable Your Touch ID');
cancelButton: 'cancel',
goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.',
lockOut: 'Please Enable Your Touch ID');
try { try {
await auth.authenticateWithBiometrics( await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings);
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true,
iOSAuthStrings: iosStrings);
} on PlatformException catch (e) { } on PlatformException catch (e) {
DrAppToastMsg.showErrorToast(e.toString()); DrAppToastMsg.showErrorToast(e.toString());
} }
@ -308,12 +270,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// get doctor profile based on clinic model /// get doctor profile based on clinic model
Future getDoctorProfileBasedOnClinic(ClinicModel clinicInfo) async { Future getDoctorProfileBasedOnClinic(ClinicModel clinicInfo) async {
ProfileReqModel docInfo = new ProfileReqModel( ProfileReqModel docInfo = new ProfileReqModel(doctorID: clinicInfo.doctorID, clinicID: clinicInfo.clinicID, license: true, projectID: clinicInfo.projectID, languageID: 2);
doctorID: clinicInfo.doctorID,
clinicID: clinicInfo.clinicID,
license: true,
projectID: clinicInfo.projectID,
languageID: 2);
///TODO change the lan ///TODO change the lan
await _authService.getDoctorProfileBasedOnClinic(docInfo); await _authService.getDoctorProfileBasedOnClinic(docInfo);
@ -328,17 +285,12 @@ class AuthenticationViewModel extends BaseViewModel {
/// add some logic in case of check activation code is success /// add some logic in case of check activation code is success
onCheckActivationCodeSuccess({bool isSilentLogin = false}) async { onCheckActivationCodeSuccess({bool isSilentLogin = false}) async {
sharedPref.setString( sharedPref.setString(TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID);
TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID); if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) {
if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && localSetDoctorProfile(checkActivationCodeForDoctorAppRes.listDoctorProfile[0]);
checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) {
localSetDoctorProfile(
checkActivationCodeForDoctorAppRes.listDoctorProfile[0]);
} else { } else {
sharedPref.setObj( sharedPref.setObj(CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic);
CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic); ClinicModel clinic = ClinicModel.fromJson(checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson());
ClinicModel clinic = ClinicModel.fromJson(
checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson());
await getDoctorProfileBasedOnClinic(clinic); await getDoctorProfileBasedOnClinic(clinic);
} }
} }
@ -364,14 +316,29 @@ class AuthenticationViewModel extends BaseViewModel {
} }
} }
// checkIsHuawei() async {
// HmsApiAvailability hmsApiAvailability = HmsApiAvailability();
// await hmsApiAvailability.isHMSAvailable().then((value) {
// isHuawei = value == 0 ? true : false;
// });
// print(isHuawei);
// }
/// call firebase service to check if the user already login in before or not /// call firebase service to check if the user already login in before or not
getDeviceInfoFromFirebase() async { getDeviceInfoFromFirebase() async {
// await checkIsHuawei();
var token;
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestPermission(); _firebaseMessaging.requestPermission();
} }
setState(ViewState.Busy); setState(ViewState.Busy);
var token = await _firebaseMessaging.getToken(); try {
token = await _firebaseMessaging.getToken();
} catch (ex) {
print(ex);
}
if (localToken == "") { if (localToken == "") {
localToken = token; localToken = token;
@ -382,10 +349,8 @@ class AuthenticationViewModel extends BaseViewModel {
} else { } else {
if (_authService.dashboardItemsList.length > 0) { if (_authService.dashboardItemsList.length > 0) {
user = _authService.dashboardItemsList[0]; user = _authService.dashboardItemsList[0];
sharedPref.setObj( sharedPref.setObj(LAST_LOGIN_USER, _authService.dashboardItemsList[0]);
LAST_LOGIN_USER, _authService.dashboardItemsList[0]); await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID);
await sharedPref.setString(
VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user.vidaAuthTokenID); await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user.vidaAuthTokenID);
this.unverified = true; this.unverified = true;
} }

@ -23,8 +23,7 @@ class BaseViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Future<DoctorProfileModel> getDoctorProfile( Future<DoctorProfileModel> getDoctorProfile({bool isGetProfile = false}) async {
{bool isGetProfile = false}) async {
if (isGetProfile) { if (isGetProfile) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) { if (profile != null) {

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/doctor_schedule.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart'; import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
@ -30,7 +31,6 @@ class DashboardViewModel extends BaseViewModel {
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList =>
_specialClinicsService.specialClinicalCareList; _specialClinicsService.specialClinicalCareList;
Future startHomeScreenServices(ProjectViewModel projectsProvider, Future startHomeScreenServices(ProjectViewModel projectsProvider,
AuthenticationViewModel authProvider) async { AuthenticationViewModel authProvider) async {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -130,4 +130,6 @@ class DashboardViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
} }

@ -55,7 +55,7 @@ class DoctorReplayViewModel extends BaseViewModel {
infoStatus: 6, infoStatus: 6,
createdBy: this.doctorProfile.doctorID, createdBy: this.doctorProfile.doctorID,
infoEnteredBy: this.doctorProfile.doctorID, infoEnteredBy: this.doctorProfile.doctorID,
setupID: "010266"); );
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _doctorReplyService.createDoctorResponse(createDoctorResponseModel); await _doctorReplyService.createDoctorResponse(createDoctorResponseModel);
if (_doctorReplyService.hasError) { if (_doctorReplyService.hasError) {

@ -18,19 +18,15 @@ import '../../locator.dart';
class UcafViewModel extends BaseViewModel { class UcafViewModel extends BaseViewModel {
UcafService _ucafService = locator<UcafService>(); UcafService _ucafService = locator<UcafService>();
List<GetChiefComplaintResModel> get patientChiefComplaintList => List<GetChiefComplaintResModel> get patientChiefComplaintList => _ucafService.patientChiefComplaintList;
_ucafService.patientChiefComplaintList;
List<VitalSignHistory> get patientVitalSignsHistory => List<VitalSignHistory> get patientVitalSignsHistory => _ucafService.patientVitalSignsHistory;
_ucafService.patientVitalSignsHistory;
List<GetAssessmentResModel> get patientAssessmentList => List<GetAssessmentResModel> get patientAssessmentList => _ucafService.patientAssessmentList;
_ucafService.patientAssessmentList;
List<MasterKeyModel> get diagnosisTypes => _ucafService.listOfDiagnosisType; List<MasterKeyModel> get diagnosisTypes => _ucafService.listOfDiagnosisType;
List<MasterKeyModel> get diagnosisConditions => List<MasterKeyModel> get diagnosisConditions => _ucafService.listOfDiagnosisCondition;
_ucafService.listOfDiagnosisCondition;
PrescriptionModel get prescriptionList => _ucafService.prescriptionList; PrescriptionModel get prescriptionList => _ucafService.prescriptionList;
@ -91,23 +87,16 @@ class UcafViewModel extends BaseViewModel {
if (bodyMax == "0" || bodyMax == null || bodyMax == 'null') { if (bodyMax == "0" || bodyMax == null || bodyMax == 'null') {
bodyMax = element.bodyMassIndex.toString(); bodyMax = element.bodyMassIndex.toString();
} }
if (temperatureCelcius == "0" || if (temperatureCelcius == "0" || temperatureCelcius == null || temperatureCelcius == 'null') {
temperatureCelcius == null ||
temperatureCelcius == 'null') {
temperatureCelcius = element.temperatureCelcius.toString(); temperatureCelcius = element.temperatureCelcius.toString();
} }
if (hartRat == "0" || hartRat == null || hartRat == 'null') { if (hartRat == "0" || hartRat == null || hartRat == 'null') {
hartRat = element.pulseBeatPerMinute.toString(); hartRat = element.pulseBeatPerMinute.toString();
} }
if (respirationBeatPerMinute == "0" || if (respirationBeatPerMinute == "0" || respirationBeatPerMinute == null || respirationBeatPerMinute == 'null') {
respirationBeatPerMinute == null || respirationBeatPerMinute = element.respirationBeatPerMinute.toString();
respirationBeatPerMinute == 'null') {
respirationBeatPerMinute =
element.respirationBeatPerMinute.toString();
} }
if (bloodPressure == "0 / 0" || if (bloodPressure == "0/0" || bloodPressure == null || bloodPressure == 'null') {
bloodPressure == null ||
bloodPressure == 'null') {
bloodPressure = element.bloodPressure.toString(); bloodPressure = element.bloodPressure.toString();
} }
}); });
@ -126,8 +115,7 @@ class UcafViewModel extends BaseViewModel {
} else { } else {
if (patientAssessmentList.isNotEmpty) { if (patientAssessmentList.isNotEmpty) {
if (diagnosisConditions.length == 0) { if (diagnosisConditions.length == 0) {
await _ucafService await _ucafService.getMasterLookup(MasterKeysService.DiagnosisCondition);
.getMasterLookup(MasterKeysService.DiagnosisCondition);
} }
if (diagnosisTypes.length == 0) { if (diagnosisTypes.length == 0) {
await _ucafService.getMasterLookup(MasterKeysService.DiagnosisType); await _ucafService.getMasterLookup(MasterKeysService.DiagnosisType);
@ -169,13 +157,11 @@ class UcafViewModel extends BaseViewModel {
} }
} }
MasterKeyModel findMasterDataById( MasterKeyModel findMasterDataById({@required MasterKeysService masterKeys, dynamic id}) {
{@required MasterKeysService masterKeys, dynamic id}) {
switch (masterKeys) { switch (masterKeys) {
case MasterKeysService.DiagnosisCondition: case MasterKeysService.DiagnosisCondition:
List<MasterKeyModel> result = diagnosisConditions.where((element) { List<MasterKeyModel> result = diagnosisConditions.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;
@ -183,8 +169,7 @@ class UcafViewModel extends BaseViewModel {
return null; return null;
case MasterKeysService.DiagnosisType: case MasterKeysService.DiagnosisType:
List<MasterKeyModel> result = diagnosisTypes.where((element) { List<MasterKeyModel> result = diagnosisTypes.where((element) {
return element.id == id && return element.id == id && element.typeId == masterKeys.getMasterKeyService();
element.typeId == masterKeys.getMasterKeyService();
}).toList(); }).toList();
if (result.isNotEmpty) { if (result.isNotEmpty) {
return result.first; return result.first;

@ -354,7 +354,7 @@ class PatientViewModel extends BaseViewModel {
patientTypeID: 1, patientTypeID: 1,
patientType: 1, patientType: 1,
resultType: resultType, resultType: resultType,
setupID: "010266"); );
await _patientService.getDiabeticChartValues(requestModel); await _patientService.getDiabeticChartValues(requestModel);
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;

@ -7,8 +7,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart';
import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' as cpe;
as cpe;
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart';
@ -36,14 +35,11 @@ class ProcedureViewModel extends BaseViewModel {
bool hasError = false; bool hasError = false;
ProcedureService _procedureService = locator<ProcedureService>(); ProcedureService _procedureService = locator<ProcedureService>();
List<GetOrderedProcedureModel> get procedureList => List<GetOrderedProcedureModel> get procedureList => _procedureService.procedureList;
_procedureService.procedureList;
List<ProcedureValadteModel> get valadteProcedureList => List<ProcedureValadteModel> get valadteProcedureList => _procedureService.valadteProcedureList;
_procedureService.valadteProcedureList;
List<CategoriseProcedureModel> get categoriesList => List<CategoriseProcedureModel> get categoriesList => _procedureService.categoriesList;
_procedureService.categoriesList;
List<dynamic> get categoryList => _procedureService.categoryList; List<dynamic> get categoryList => _procedureService.categoryList;
RadiologyService _radiologyService = locator<RadiologyService>(); RadiologyService _radiologyService = locator<RadiologyService>();
@ -51,40 +47,31 @@ class ProcedureViewModel extends BaseViewModel {
List<FinalRadiologyList> _finalRadiologyListClinic = List(); List<FinalRadiologyList> _finalRadiologyListClinic = List();
List<FinalRadiologyList> _finalRadiologyListHospital = List(); List<FinalRadiologyList> _finalRadiologyListHospital = List();
List<FinalRadiologyList> get finalRadiologyList => List<FinalRadiologyList> get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital;
filterType == FilterType.Clinic
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
List<FinalRadiology> get radiologyList => List<FinalRadiology> get radiologyList => _radiologyService.finalRadiologyList;
_radiologyService.finalRadiologyList;
List<PatientLabOrders> get patientLabOrdersList => List<PatientLabOrders> get patientLabOrdersList => _labsService.patientLabOrdersList;
_labsService.patientLabOrdersList;
List<LabOrderResult> get labOrdersResultsList => List<LabOrderResult> get labOrdersResultsList => _labsService.labOrdersResultsList;
_labsService.labOrdersResultsList;
List<ProcedureTempleteDetailsModel> get procedureTemplate => List<ProcedureTempleteDetailsModel> get procedureTemplate => _procedureService.templateList;
_procedureService.templateList;
List<ProcedureTempleteDetailsModelList> templateList = List(); List<ProcedureTempleteDetailsModelList> templateList = List();
List<ProcedureTempleteDetailsModel> get procedureTemplateDetails => List<ProcedureTempleteDetailsModel> get procedureTemplateDetails => _procedureService.templateDetailsList;
_procedureService.templateDetailsList;
Future getProcedure( bool _isRadiologyVIDAPlus = false;
{int mrn,
String patientType, bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus;
int appointmentNo,
bool isLocalBusy = false}) async { Future getProcedure({int mrn, String patientType, int appointmentNo, bool isLocalBusy = false}) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
else else
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedure( await _procedureService.getProcedure(mrn: mrn, appointmentNo: appointmentNo);
mrn: mrn, appointmentNo: appointmentNo);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
if (patientType == "7") if (patientType == "7")
@ -95,21 +82,14 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getProcedureCategory( Future getProcedureCategory({String categoryName, String categoryID, patientId, bool isLocalBusy = false}) async {
{String categoryName,
String categoryID,
patientId,
bool isLocalBusy = false}) async {
if (categoryName == null) return; if (categoryName == null) return;
hasError = false; hasError = false;
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
else else
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedureCategory( await _procedureService.getProcedureCategory(categoryName: categoryName, categoryID: categoryID, patientId: patientId);
categoryName: categoryName,
categoryID: categoryID,
patientId: patientId);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -129,17 +109,13 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getProcedureTemplate( Future getProcedureTemplate({String categoryID, bool isLocalBusy = false, BuildContext context}) async {
{String categoryID,
bool isLocalBusy = false,
BuildContext context}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
await _procedureService.getProcedureTemplate( await _procedureService.getProcedureTemplate(categoryID: categoryID, isLocalBusy: false);
categoryID: categoryID, isLocalBusy: false);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -150,20 +126,12 @@ class ProcedureViewModel extends BaseViewModel {
setTemplateListDependOnId() { setTemplateListDependOnId() {
procedureTemplate.forEach((element) { procedureTemplate.forEach((element) {
List<ProcedureTempleteDetailsModelList> templateListData = templateList List<ProcedureTempleteDetailsModelList> templateListData = templateList.where((elementTemplate) => elementTemplate.templateId == element.templateID).toList();
.where((elementTemplate) =>
elementTemplate.templateId == element.templateID)
.toList();
if (templateListData.length != 0) { if (templateListData.length != 0) {
templateList[templateList.indexOf(templateListData[0])] templateList[templateList.indexOf(templateListData[0])].procedureTemplate.add(element);
.procedureTemplate
.add(element);
} else { } else {
var template = ProcedureTempleteDetailsModelList( var template = ProcedureTempleteDetailsModelList(templateName: element.templateName, templateId: element.templateID, template: element);
templateName: element.templateName,
templateId: element.templateID,
template: element);
if (!templateList.contains(template)) templateList.add(template); if (!templateList.contains(template)) templateList.add(template);
} }
}); });
@ -185,8 +153,7 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future postProcedure(PostProcedureReqModel postProcedureReqModel, int mrn, Future postProcedure(PostProcedureReqModel postProcedureReqModel, int mrn, {bool isLocalBusy = false}) async {
{bool isLocalBusy = false}) async {
hasError = false; hasError = false;
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -202,9 +169,7 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
Future validationProcedure( Future validationProcedure(ProcedureValidationRequestModel procedureValidateRequestModel, {bool isLocalBusy = false}) async {
ProcedureValidationRequestModel procedureValidateRequestModel,
{bool isLocalBusy = false}) async {
hasError = false; hasError = false;
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -220,11 +185,11 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
Future updateProcedure( Future updateProcedure({UpdateProcedureRequestModel updateProcedureRequestModel, int mrn, bool isLocalBusy = false}) async {
{UpdateProcedureRequestModel updateProcedureRequestModel,
int mrn, bool isLocalBusy = false}) async {
hasError = false; hasError = false;
if(isLocalBusy)setState(ViewState.BusyLocal); else if (isLocalBusy)
setState(ViewState.BusyLocal);
else
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.updateProcedure(updateProcedureRequestModel); await _procedureService.updateProcedure(updateProcedureRequestModel);
if (_procedureService.hasError) { if (_procedureService.hasError) {
@ -235,11 +200,10 @@ class ProcedureViewModel extends BaseViewModel {
//await getProcedure(mrn: mrn); //await getProcedure(mrn: mrn);
} }
void getPatientRadOrders(PatiantInformtion patient, void getPatientRadOrders(PatiantInformtion patient, {String patientType, bool isInPatient = false}) async {
{String patientType, bool isInPatient = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient, await _radiologyService.getPatientRadOrders(patient, isInPatient: isInPatient);
isInPatient: isInPatient); _isRadiologyVIDAPlus = _radiologyService.isRadiologyVIDAPlus;
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
if (patientType == "7") if (patientType == "7")
@ -248,39 +212,25 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
_radiologyService.finalRadiologyList.forEach((element) { _radiologyService.finalRadiologyList.forEach((element) {
List<FinalRadiologyList> finalRadiologyListClinic = List<FinalRadiologyList> finalRadiologyListClinic = _finalRadiologyListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList();
_finalRadiologyListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (finalRadiologyListClinic.length != 0) { if (finalRadiologyListClinic.length != 0) {
_finalRadiologyListClinic[ _finalRadiologyListClinic[finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])].finalRadiologyList.add(element);
finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])]
.finalRadiologyList
.add(element);
} else { } else {
_finalRadiologyListClinic.add(FinalRadiologyList( _finalRadiologyListClinic.add(FinalRadiologyList(filterName: element.clinicDescription, finalRadiology: element));
filterName: element.clinicDescription, finalRadiology: element));
} }
// FinalRadiologyList list sort via project // FinalRadiologyList list sort via project
List<FinalRadiologyList> finalRadiologyListHospital = List<FinalRadiologyList> finalRadiologyListHospital = _finalRadiologyListHospital
_finalRadiologyListHospital
.where( .where(
(elementClinic) => (elementClinic) => elementClinic.filterName == element.projectName,
elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
if (finalRadiologyListHospital.length != 0) { if (finalRadiologyListHospital.length != 0) {
_finalRadiologyListHospital[finalRadiologyListHospital _finalRadiologyListHospital[finalRadiologyListHospital.indexOf(finalRadiologyListHospital[0])].finalRadiologyList.add(element);
.indexOf(finalRadiologyListHospital[0])]
.finalRadiologyList
.add(element);
} else { } else {
_finalRadiologyListHospital.add(FinalRadiologyList( _finalRadiologyListHospital.add(FinalRadiologyList(filterName: element.projectName, finalRadiology: element));
filterName: element.projectName, finalRadiology: element));
} }
}); });
@ -290,17 +240,9 @@ class ProcedureViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url; String get radImageURL => _radiologyService.url;
getRadImageURL( getRadImageURL({int invoiceNo, int lineItem, int projectId, @required PatiantInformtion patient}) async {
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getRadImageURL( await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, patient: patient);
invoiceNo: invoiceNo,
lineItem: lineItem,
projectId: projectId,
patient: patient);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -313,8 +255,7 @@ class ProcedureViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
List<PatientLabSpecialResult> get patientLabSpecialResult => List<PatientLabSpecialResult> get patientLabSpecialResult => _labsService.patientLabSpecialResult;
_labsService.patientLabSpecialResult;
List<LabResult> get labResultList => _labsService.labResultList; List<LabResult> get labResultList => _labsService.labResultList;
@ -335,19 +276,9 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
getLaboratoryResult( getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, PatiantInformtion patient}) async {
{String projectID,
int clinicID,
String invoiceNo,
String orderNo,
PatiantInformtion patient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getLaboratoryResult( await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, patient: patient);
invoiceNo: invoiceNo,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
patient: patient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -356,15 +287,9 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
getPatientLabOrdersResults( getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async {
{PatientLabOrders patientLabOrder,
String procedure,
PatiantInformtion patient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _labsService.getPatientLabOrdersResults( await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure, patient: patient);
patientLabOrder: patientLabOrder,
procedure: procedure,
patient: patient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.Error);
@ -372,9 +297,7 @@ class ProcedureViewModel extends BaseViewModel {
bool isShouldClear = false; bool isShouldClear = false;
if (_labsService.labOrdersResultsList.length == 1) { if (_labsService.labOrdersResultsList.length == 1) {
labOrdersResultsList.forEach((element) { labOrdersResultsList.forEach((element) {
if (element.resultValue.contains('/') || if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty) isShouldClear = true;
element.resultValue.contains('*') ||
element.resultValue.isEmpty) isShouldClear = true;
}); });
} }
if (isShouldClear) _labsService.labOrdersResultsList.clear(); if (isShouldClear) _labsService.labOrdersResultsList.clear();
@ -405,8 +328,7 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel(); PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
ProcedureValidationRequestModel procedureValadteRequestModel = ProcedureValidationRequestModel procedureValadteRequestModel = new ProcedureValidationRequestModel();
new ProcedureValidationRequestModel();
procedureValadteRequestModel.patientMRN = patient.patientMRN; procedureValadteRequestModel.patientMRN = patient.patientMRN;
procedureValadteRequestModel.episodeID = patient.episodeNo; procedureValadteRequestModel.episodeID = patient.episodeNo;
procedureValadteRequestModel.appointmentNo = patient.appointmentNo; procedureValadteRequestModel.appointmentNo = patient.appointmentNo;
@ -421,48 +343,34 @@ class ProcedureViewModel extends BaseViewModel {
procedureValadteRequestModel.procedure = [element.procedureId]; procedureValadteRequestModel.procedure = [element.procedureId];
List<Controls> controls = List(); List<Controls> controls = List();
controls.add( controls.add(
Controls( Controls(code: "remarks", controlValue: element.remarks != null ? element.remarks : ""),
code: "remarks",
controlValue: element.remarks != null ? element.remarks : ""),
); );
controls.add( controls.add(
Controls( Controls(code: "ordertype", controlValue: procedureType == ProcedureType.PROCEDURE ? element.type ?? "1" : "0"),
code: "ordertype",
controlValue: procedureType == ProcedureType.PROCEDURE
? element.type ?? "1"
: "0"),
); );
controlsProcedure.add(Procedures( controlsProcedure.add(Procedures(category: element.categoryID, procedure: element.procedureId, controls: controls));
category: element.categoryID,
procedure: element.procedureId,
controls: controls));
}); });
postProcedureReqModel.procedures = controlsProcedure; postProcedureReqModel.procedures = controlsProcedure;
await validationProcedure(procedureValadteRequestModel, await validationProcedure(procedureValadteRequestModel, isLocalBusy: isLocalBusy);
isLocalBusy: isLocalBusy);
if (state == ViewState.Idle) { if (state == ViewState.Idle) {
if (valadteProcedureList[0].entityList.length == 0) { if (valadteProcedureList[0].entityList.length == 0) {
await postProcedure(postProcedureReqModel, patient.patientMRN, await postProcedure(postProcedureReqModel, patient.patientMRN, isLocalBusy: isLocalBusy);
isLocalBusy: isLocalBusy);
if (state == ViewState.ErrorLocal) { if (state == ViewState.ErrorLocal) {
Utils.showErrorToast(error); Utils.showErrorToast(error);
getProcedure(mrn: patient.patientMRN, isLocalBusy: isLocalBusy); getProcedure(mrn: patient.patientMRN, isLocalBusy: isLocalBusy);
} else if (state == ViewState.Idle) { } else if (state == ViewState.Idle) {
DrAppToastMsg.showSuccesToast('procedure has been added'); DrAppToastMsg.showSuccesToast('procedure has been added');
if (Navigator.canPop(AppGlobal.CONTEX)) if (Navigator.canPop(AppGlobal.CONTEX)) Navigator.pop(AppGlobal.CONTEX);
Navigator.pop(AppGlobal.CONTEX); if (Navigator.canPop(AppGlobal.CONTEX)) Navigator.pop(AppGlobal.CONTEX);
if (Navigator.canPop(AppGlobal.CONTEX))
Navigator.pop(AppGlobal.CONTEX);
} }
} else { } else {
if (state == ViewState.ErrorLocal) { if (state == ViewState.ErrorLocal) {
Utils.showErrorToast(error); Utils.showErrorToast(error);
getProcedure(mrn: patient.patientMRN); getProcedure(mrn: patient.patientMRN);
} else if (state == ViewState.Idle) { } else if (state == ViewState.Idle) {
Utils.showErrorToast( Utils.showErrorToast(valadteProcedureList[0].entityList[0].warringMessages);
valadteProcedureList[0].entityList[0].warringMessages);
} }
} }
} else { } else {
@ -470,34 +378,23 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
bool isEntityListSelected( bool isEntityListSelected(cpe.EntityList masterKey, List<cpe.EntityList> entityList) {
cpe.EntityList masterKey, List<cpe.EntityList> entityList) { Iterable<cpe.EntityList> history = entityList.where((element) => masterKey.procedureId == element.procedureId);
Iterable<cpe.EntityList> history = entityList
.where((element) => masterKey.procedureId == element.procedureId);
if (history.length > 0) { if (history.length > 0) {
return true; return true;
} }
return false; return false;
} }
bool isProcedureEntityListSelected(ProcedureTempleteDetailsModel masterKey, bool isProcedureEntityListSelected(ProcedureTempleteDetailsModel masterKey, List<ProcedureTempleteDetailsModel> entityList) {
List<ProcedureTempleteDetailsModel> entityList) { Iterable<ProcedureTempleteDetailsModel> history = entityList.where((element) => masterKey.templateID == element.templateID && masterKey.procedureName == element.procedureName);
Iterable<ProcedureTempleteDetailsModel> history = entityList.where(
(element) =>
masterKey.templateID == element.templateID &&
masterKey.procedureName == element.procedureName);
if (history.length > 0) { if (history.length > 0) {
return true; return true;
} }
return false; return false;
} }
Future addProcedures( Future addProcedures(ProcedureViewModel model, List<ProcedureTempleteDetailsModel> items, PatiantInformtion patient, TextEditingController remarksController, {bool isLocalBusy = false}) async {
ProcedureViewModel model,
List<ProcedureTempleteDetailsModel> items,
PatiantInformtion patient,
TextEditingController remarksController,
{bool isLocalBusy = false}) async {
if (isLocalBusy) { if (isLocalBusy) {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
} else { } else {
@ -518,15 +415,10 @@ class ProcedureViewModel extends BaseViewModel {
eventCategory: "Procedure Checkout Screen", eventCategory: "Procedure Checkout Screen",
eventAction: "Add New Procedure", eventAction: "Add New Procedure",
); );
await model.preparePostProcedure( await model.preparePostProcedure(entityList: entityList, patient: patient, remarks: remarksController.text, isLocalBusy: isLocalBusy);
entityList: entityList,
patient: patient,
remarks: remarksController.text,
isLocalBusy: isLocalBusy);
} }
Future filterSearchResults(String query, List<cpe.EntityList> masterList, Future filterSearchResults(String query, List<cpe.EntityList> masterList, List<cpe.EntityList> items) async {
List<cpe.EntityList> items) async {
List<cpe.EntityList> dummySearchList = List(); List<cpe.EntityList> dummySearchList = List();
dummySearchList.addAll(masterList); dummySearchList.addAll(masterList);
if (query.isNotEmpty) { if (query.isNotEmpty) {
@ -544,13 +436,9 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
void filterProcedureSearchResults( void filterProcedureSearchResults(String query, List<ProcedureTempleteModel> masterList, List<ProcedureTempleteModel> items) {
String query,
List<ProcedureTempleteModel> masterList,
List<ProcedureTempleteModel> items) {
List<ProcedureTempleteModel> dummySearchList = List(); List<ProcedureTempleteModel> dummySearchList = List();
if(masterList!= null) if (masterList != null) dummySearchList.addAll(masterList);
dummySearchList.addAll(masterList);
if (query.isNotEmpty) { if (query.isNotEmpty) {
List<ProcedureTempleteModel> dummyListData = List(); List<ProcedureTempleteModel> dummyListData = List();
dummySearchList.forEach((item) { dummySearchList.forEach((item) {

@ -38,7 +38,7 @@ class OperationReportViewModel extends BaseViewModel {
GetOperationDetailsRequestModel( GetOperationDetailsRequestModel(
reservationNo: reservation.oTReservationID, reservationNo: reservation.oTReservationID,
patientID: reservation.patientID, patientID: reservation.patientID,
setupID: "010266"); );
await _operationReportService.getOperationReportDetails( await _operationReportService.getOperationReportDetails(
getOperationReportRequestModel: getOperationReportRequestModel); getOperationReportRequestModel: getOperationReportRequestModel);
if (_operationReportService.hasError) { if (_operationReportService.hasError) {

@ -1,11 +1,12 @@
import 'dart:async'; import 'dart:async';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/hospitals/VidaPlusProjectListModel.dart';
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -32,12 +33,14 @@ class ProjectViewModel with ChangeNotifier {
bool get isArabic => _isArabic; bool get isArabic => _isArabic;
StreamSubscription subscription; StreamSubscription subscription;
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = List();
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
ProjectViewModel() { ProjectViewModel() {
loadSharedPrefLanguage(); loadSharedPrefLanguage();
subscription = Connectivity() subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) { switch (result) {
case ConnectivityResult.wifi: case ConnectivityResult.wifi:
isInternetConnection = true; isInternetConnection = true;
@ -53,6 +56,11 @@ class ProjectViewModel with ChangeNotifier {
}); });
} }
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
void loadSharedPrefLanguage() async { void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_Language); currentLanguage = await sharedPref.getString(APP_Language);
_appLocale = Locale(currentLanguage ?? 'en'); _appLocale = Locale(currentLanguage ?? 'en');
@ -95,12 +103,18 @@ class ProjectViewModel with ChangeNotifier {
try { try {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_CLINICS_FOR_DOCTOR, await baseAppClient.post(GET_CLINICS_FOR_DOCTOR, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
doctorClinicsList = []; doctorClinicsList = [];
response['List_DoctorsClinic'].forEach((v) { response['List_DoctorsClinic'].forEach((v) {
doctorClinicsList.add(new ClinicModel.fromJson(v)); doctorClinicsList.add(new ClinicModel.fromJson(v));
}); });
_vidaPlusProjectListModel.clear();
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) {
_vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
});
setVidaPlusProjectList(_vidaPlusProjectListModel);
}
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -122,7 +136,6 @@ class ProjectViewModel with ChangeNotifier {
projectID: doctorProfile.projectID, projectID: doctorProfile.projectID,
); );
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false) await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).getDoctorProfileBasedOnClinic(clinicModel);
.getDoctorProfileBasedOnClinic(clinicModel);
} }
} }

@ -15,54 +15,35 @@ class RadiologyViewModel extends BaseViewModel {
List<FinalRadiologyList> _finalRadiologyListClinic = List(); List<FinalRadiologyList> _finalRadiologyListClinic = List();
List<FinalRadiologyList> _finalRadiologyListHospital = List(); List<FinalRadiologyList> _finalRadiologyListHospital = List();
List<FinalRadiologyList> get finalRadiologyList => List<FinalRadiologyList> get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital;
filterType == FilterType.Clinic
? _finalRadiologyListClinic
: _finalRadiologyListHospital;
void getPatientRadOrders(PatiantInformtion patient, void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async {
{isInPatient = false}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders(patient, await _radiologyService.getPatientRadOrders(patient, isInPatient: isInPatient);
isInPatient: isInPatient);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_radiologyService.finalRadiologyList.forEach((element) { _radiologyService.finalRadiologyList.forEach((element) {
List<FinalRadiologyList> finalRadiologyListClinic = List<FinalRadiologyList> finalRadiologyListClinic = _finalRadiologyListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList();
_finalRadiologyListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (finalRadiologyListClinic.length != 0) { if (finalRadiologyListClinic.length != 0) {
_finalRadiologyListClinic[ _finalRadiologyListClinic[finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])].finalRadiologyList.add(element);
finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])]
.finalRadiologyList
.add(element);
} else { } else {
_finalRadiologyListClinic.add(FinalRadiologyList( _finalRadiologyListClinic.add(FinalRadiologyList(filterName: element.clinicDescription, finalRadiology: element));
filterName: element.clinicDescription, finalRadiology: element));
} }
// FinalRadiologyList list sort via project // FinalRadiologyList list sort via project
List<FinalRadiologyList> finalRadiologyListHospital = List<FinalRadiologyList> finalRadiologyListHospital = _finalRadiologyListHospital
_finalRadiologyListHospital
.where( .where(
(elementClinic) => (elementClinic) => elementClinic.filterName == element.projectName,
elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
if (finalRadiologyListHospital.length != 0) { if (finalRadiologyListHospital.length != 0) {
_finalRadiologyListHospital[finalRadiologyListHospital _finalRadiologyListHospital[finalRadiologyListHospital.indexOf(finalRadiologyListHospital[0])].finalRadiologyList.add(element);
.indexOf(finalRadiologyListHospital[0])]
.finalRadiologyList
.add(element);
} else { } else {
_finalRadiologyListHospital.add(FinalRadiologyList( _finalRadiologyListHospital.add(FinalRadiologyList(filterName: element.projectName, finalRadiology: element));
filterName: element.projectName, finalRadiology: element));
} }
}); });
@ -72,17 +53,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url; String get radImageURL => _radiologyService.url;
getRadImageURL( getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus, @required PatiantInformtion patient, String invoiceType}) async {
{int invoiceNo,
int lineItem,
int projectId,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _radiologyService.getRadImageURL( await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus, patient: patient, invoiceType: invoiceType);
invoiceNo: invoiceNo,
lineItem: lineItem,
projectId: projectId,
patient: patient);
if (_radiologyService.hasError) { if (_radiologyService.hasError) {
error = _radiologyService.error; error = _radiologyService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/doctor_schedule.dart';
import 'package:doctor_app_flutter/core/service/home/schedule_service.dart'; import 'package:doctor_app_flutter/core/service/home/schedule_service.dart';
import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart';
@ -11,6 +12,8 @@ class ScheduleViewModel extends BaseViewModel {
List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable => List<ListDoctorWorkingHoursTable> get listDoctorWorkingHoursTable =>
_scheduleService.listDoctorWorkingHoursTable; _scheduleService.listDoctorWorkingHoursTable;
List<DoctorSchedule> get getDoctorRotation =>
_scheduleService.doctorRotation;
Future getDoctorSchedule() async { Future getDoctorSchedule() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _scheduleService.getDoctorSchedule(); await _scheduleService.getDoctorSchedule();
@ -20,4 +23,15 @@ class ScheduleViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getDoctorRota(String fromDate, String toDate,{int pageNo=1}) async {
setState(ViewState.Busy);
await _scheduleService.getDoctorRota(fromDate,toDate,pageNo:pageNo);
if (_scheduleService.hasError) {
error = _scheduleService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
} }

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/sick_leave/sickleave_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/sick_leave/sickleave_service.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
@ -13,8 +14,7 @@ class SickLeaveViewModel extends BaseViewModel {
SickLeaveService _sickLeaveService = locator<SickLeaveService>(); SickLeaveService _sickLeaveService = locator<SickLeaveService>();
PatientService _patientService = locator<PatientService>(); PatientService _patientService = locator<PatientService>();
SickLeaveStatisticsModel get sickLeaveStatistics => SickLeaveStatisticsModel get sickLeaveStatistics => _sickLeaveService.sickLeavestatisitics;
_sickLeaveService.sickLeavestatisitics;
get getAllSIckLeave => _sickLeaveService.getAllSickLeave; get getAllSIckLeave => _sickLeaveService.getAllSickLeave;
@ -30,10 +30,7 @@ class SickLeaveViewModel extends BaseViewModel {
get postSechedule => _sickLeaveService.postReschedule; get postSechedule => _sickLeaveService.postReschedule;
get getAllSIckLeavePatient => [ get getAllSIckLeavePatient => removeDuplicates([..._sickLeaveService.getAllSickLeaveDoctor, ..._sickLeaveService.getAllSickLeavePatient]);
..._sickLeaveService.getAllSickLeavePatient,
..._sickLeaveService.getAllSickLeaveDoctor
];
Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async { Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -88,17 +85,13 @@ class SickLeaveViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getSickLeaveForPatient(PatiantInformtion patient, Future getSickLeaveForPatient(PatiantInformtion patient, {bool isLocalBusy = false}) async {
{bool isLocalBusy = false}) async {
if (isLocalBusy) if (isLocalBusy)
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
else else
setState(ViewState.Busy); setState(ViewState.Busy);
var patientMRN = patient.patientMRN ?? patient.patientId; var patientMRN = patient.patientMRN ?? patient.patientId;
var services = [ var services = [_sickLeaveService.getSickLeavePatient(patientMRN), _sickLeaveService.getSickLeaveDoctor(patientMRN)];
_sickLeaveService.getSickLeavePatient(patientMRN),
_sickLeaveService.getSickLeaveDoctor(patientMRN)
];
final results = await Future.wait(services); final results = await Future.wait(services);
if (_sickLeaveService.hasError) { if (_sickLeaveService.hasError) {
@ -183,4 +176,13 @@ class SickLeaveViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
List<SickLeavePatientModel> removeDuplicates(List<SickLeavePatientModel> items) {
List<SickLeavePatientModel> uniqueItems = [];
var uniqueIDs = items.map((e) => e.appointmentNo).toSet();
uniqueIDs.forEach((e) {
uniqueItems.add(items.firstWhere((i) => i.appointmentNo == e));
});
return uniqueItems;
}
} }

@ -2,8 +2,7 @@ import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:doctor_app_flutter/voipcall/provider/chat_call_provider.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -37,13 +36,17 @@ class MyApp extends StatelessWidget {
return MultiProvider( return MultiProvider(
providers: [ providers: [
ChangeNotifierProvider<AuthenticationViewModel>( ChangeNotifierProvider<AuthenticationViewModel>(
create: (context) => AuthenticationViewModel()), create: (context) => AuthenticationViewModel(),
),
ChangeNotifierProvider<ProjectViewModel>( ChangeNotifierProvider<ProjectViewModel>(
create: (context) => ProjectViewModel(), create: (context) => ProjectViewModel(),
), ),
ChangeNotifierProvider<LiveCareViewModel>( ChangeNotifierProvider<LiveCareViewModel>(
create: (context) => LiveCareViewModel(), create: (context) => LiveCareViewModel(),
), ),
ChangeNotifierProvider<ChatCallProvider>(
create: (context) => ChatCallProvider(),
),
StreamProvider.value( StreamProvider.value(
value: RobotProvider().intStream(), value: RobotProvider().intStream(),
initialData: RobotProvider().setValue({}), initialData: RobotProvider().setValue({}),

@ -40,8 +40,9 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientSearchHeader(title: "ER Sign In",) appBar: PatientSearchHeader(
, title: "ER Sign In",
),
body: Center( body: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7),
@ -58,10 +59,7 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
SizedBox( SizedBox(
height: 7, height: 7,
), ),
AppText(TranslationBase.of(context).scanERQrCode, AppText(TranslationBase.of(context).scanERQrCode, fontSize: 14, fontWeight: FontWeight.w400, textAlign: TextAlign.center),
fontSize: 14,
fontWeight: FontWeight.w400,
textAlign: TextAlign.center),
SizedBox( SizedBox(
height: 15, height: 15,
), ),
@ -98,22 +96,21 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
try { try {
List<String> listOfParams = result.split(','); List<String> listOfParams = result.split(',');
int patientID = 0; int patientID = 0;
if (listOfParams[0].length != 0) if (listOfParams[0].length != 0) patientID = int.parse(listOfParams[0]);
patientID = int.parse(listOfParams[0]); showMyDialog(
showMyDialog(context:context, firstAction: (){ context: context,
firstAction: () {
signInERPatient(context: context, model: model, patientId: patientID, signInType: 1); signInERPatient(context: context, model: model, patientId: patientID, signInType: 1);
} , secondAction: (){ },
secondAction: () {
signInERPatient(context: context, model: model, patientId: patientID, signInType: 2); signInERPatient(context: context, model: model, patientId: patientID, signInType: 2);
}); });
} catch (e) { } catch (e) {
Utils.showErrorToast("Please Enter Valid Code"); Utils.showErrorToast("Please Enter Valid Code");
} }
} }
} }
signInERPatient({BuildContext context, ERSignInViewModel model, patientId, signInType}) async { signInERPatient({BuildContext context, ERSignInViewModel model, patientId, signInType}) async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.signInERPatient(patientId: patientId, signInType: signInType); await model.signInERPatient(patientId: patientId, signInType: signInType);
@ -125,11 +122,14 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
/// TODO Elham* Make this as custom Dialog /// TODO Elham* Make this as custom Dialog
showMyDialog({BuildContext context, Function firstAction,Function secondAction, }) { showMyDialog({
BuildContext context,
Function firstAction,
Function secondAction,
}) {
showDialog( showDialog(
context: context, context: context,
builder: (ctx) => Center( builder: (ctx) => Center(
@ -172,9 +172,7 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
projectViewModel.isArabic projectViewModel.isArabic ? "الرجاء اختيار الإجراء الذي تريد القيام به" : 'Please choose the action you want to do ',
? "الرجاء اختيار الإجراء الذي تريد القيام به"
: 'Please choose the action you want to do ',
fontSize: 15, fontSize: 15,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -189,21 +187,19 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
FlatButton( ElevatedButton(
child: AppText( child: AppText(
"Sing In", "Sign In",
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.black, color: Colors.black,
fontSize: 16, fontSize: 16,
), //Text("Cancel"), ), //Text("Cancel"),
onPressed: () async { onPressed: () async {
await firstAction(); await firstAction();
}), }),
FlatButton( ElevatedButton(
child: AppText( child: AppText(
"Sing Out", "Sign Out",
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.black, color: Colors.black,
fontSize: 16, fontSize: 16,
@ -222,6 +218,4 @@ class _ErSignInScreenState extends State<ErSignInScreen> {
), ),
)); ));
} }
} }

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
@ -32,10 +33,12 @@ class _LoginScreenState extends State<LoginScreen> {
FocusNode focusPass = FocusNode(); FocusNode focusPass = FocusNode();
FocusNode focusProject = FocusNode(); FocusNode focusProject = FocusNode();
AuthenticationViewModel authenticationViewModel; AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authenticationViewModel = Provider.of<AuthenticationViewModel>(context); authenticationViewModel = Provider.of<AuthenticationViewModel>(context);
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
backgroundColor: HexColor('#F8F8F8'), backgroundColor: HexColor('#F8F8F8'),
@ -44,9 +47,7 @@ class _LoginScreenState extends State<LoginScreen> {
Container( Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 30), margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 30),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Column( child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -63,40 +64,21 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
], ],
), ),
Column( Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Text( Text(
TranslationBase.of(context).welcomeTo, TranslationBase.of(context).welcomeTo,
style: TextStyle( style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, fontFamily: 'Poppins'),
fontSize: 16,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins'),
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).drSulaimanAlHabib,
.drSulaimanAlHabib, style: TextStyle(color: Color(0xFF2B353E), fontWeight: FontWeight.bold, fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, fontFamily: 'Poppins'),
style: TextStyle(
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
fontSize: SizeConfig.isMobile
? 24
: SizeConfig.realScreenWidth *
0.029,
fontFamily: 'Poppins'),
), ),
Text( Text(
"Doctor App", "Doctor App",
style: TextStyle( style: TextStyle(fontSize: SizeConfig.isMobile ? 16 : SizeConfig.realScreenWidth * 0.030, fontWeight: FontWeight.w600, color: Color(0xFFD02127)),
fontSize: SizeConfig.isMobile
? 16
: SizeConfig.realScreenWidth *
0.030,
fontWeight: FontWeight.w600,
color: Color(0xFFD02127)),
), ),
]), ]),
], ],
@ -112,41 +94,32 @@ class _LoginScreenState extends State<LoginScreen> {
Container( Container(
width: SizeConfig.realScreenWidth * 0.90, width: SizeConfig.realScreenWidth * 0.90,
height: SizeConfig.realScreenHeight * 0.65, height: SizeConfig.realScreenHeight * 0.65,
child: Column( child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
buildSizedBox(), buildSizedBox(),
AppTextFieldCustom( AppTextFieldCustom(
hintText: hintText: TranslationBase.of(context).enterId,
TranslationBase.of(context).enterId,
hasBorder: true, hasBorder: true,
controller: userIdController, controller: userIdController,
onChanged: (value) { onChanged: (value) {
if (value != null) if (value != null)
setState(() { setState(() {
authenticationViewModel.userInfo authenticationViewModel.userInfo.userID = value.trim();
.userID = value.trim();
}); });
}, },
), ),
buildSizedBox(), buildSizedBox(),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).enterPassword,
.enterPassword,
hasBorder: true, hasBorder: true,
isSecure: true, isSecure: true,
controller: passwordController, controller: passwordController,
onChanged: (value) { onChanged: (value) {
if (value != null) if (value != null)
setState(() { setState(() {
authenticationViewModel.userInfo authenticationViewModel.userInfo.password = value.trim();
.password = value.trim();
}); });
// if(allowCallApi) { // if(allowCallApi) {
this.getProjects( this.getProjects(authenticationViewModel.userInfo.userID);
authenticationViewModel
.userInfo.userID);
// setState(() { // setState(() {
// allowCallApi = false; // allowCallApi = false;
// }); // });
@ -156,19 +129,13 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
buildSizedBox(), buildSizedBox(),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).selectYourProject,
.selectYourProject,
hasBorder: true, hasBorder: true,
controller: projectIdController, controller: projectIdController,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
enabled: false, enabled: false,
onClick: () { onClick: () {
Utils.showCupertinoPicker( Utils.showCupertinoPicker(context, projectsList, 'facilityName', onSelectProject, authenticationViewModel);
context,
projectsList,
'facilityName',
onSelectProject,
authenticationViewModel);
}, },
), ),
buildSizedBox() buildSizedBox()
@ -195,8 +162,7 @@ class _LoginScreenState extends State<LoginScreen> {
title: TranslationBase.of(context).login, title: TranslationBase.of(context).login,
color: AppGlobal.appRedColor, color: AppGlobal.appRedColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
disabled: authenticationViewModel.userInfo.userID == null || disabled: authenticationViewModel.userInfo.userID == null || authenticationViewModel.userInfo.password == null,
authenticationViewModel.userInfo.password == null,
onPressed: () { onPressed: () {
login(context); login(context);
}, },
@ -246,8 +212,7 @@ class _LoginScreenState extends State<LoginScreen> {
onSelectProject(index) { onSelectProject(index) {
setState(() { setState(() {
authenticationViewModel.userInfo.projectID = authenticationViewModel.userInfo.projectID = projectsList[index].facilityId;
projectsList[index].facilityId;
projectIdController.text = projectsList[index].facilityName; projectIdController.text = projectsList[index].facilityName;
}); });
@ -264,8 +229,8 @@ class _LoginScreenState extends State<LoginScreen> {
if (authenticationViewModel.state == ViewState.Idle) { if (authenticationViewModel.state == ViewState.Idle) {
projectsList = authenticationViewModel.hospitals; projectsList = authenticationViewModel.hospitals;
setState(() { setState(() {
authenticationViewModel.userInfo.projectID = projectViewModel.setVidaPlusProjectList(authenticationViewModel.vidaPlusProjectList);
projectsList[0].facilityId; authenticationViewModel.userInfo.projectID = projectsList[0].facilityId;
projectIdController.text = projectsList[0].facilityName; projectIdController.text = projectsList[0].facilityName;
}); });
} }

@ -35,8 +35,7 @@ class VerificationMethodsScreen extends StatefulWidget {
}); });
@override @override
_VerificationMethodsScreenState createState() => _VerificationMethodsScreenState createState() => _VerificationMethodsScreenState();
_VerificationMethodsScreenState();
} }
class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> { class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
@ -64,16 +63,13 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 6 : 4),
(SizeConfig.isHeightVeryShort ? 6 : 4),
), ),
if (authenticationViewModel.isFromLogin) if (authenticationViewModel.isFromLogin)
InkWell( InkWell(
onTap: () { onTap: () {
authenticationViewModel.setUnverified(false, authenticationViewModel.setUnverified(false, isFromLogin: false);
isFromLogin: false); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
authenticationViewModel
.setAppStatus(APP_STATUS.UNAUTHENTICATED);
}, },
child: Icon( child: Icon(
Icons.arrow_back_ios, Icons.arrow_back_ios,
@ -82,30 +78,23 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
Column( Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: SizeConfig.heightMultiplier * height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 3 : 4),
(SizeConfig.isHeightVeryShort ? 3 : 4),
), ),
authenticationViewModel.user != null && authenticationViewModel.user != null && isMoreOption == false
isMoreOption == false
? Column( ? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).welcomeBack, TranslationBase.of(context).welcomeBack,
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
.getTextMultiplierBasedOnWidth() *
3.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
letterSpacing: -0.72, letterSpacing: -0.72,
), ),
AppText( AppText(
Utils.convertToTitleCase( Utils.convertToTitleCase(authenticationViewModel.user.doctorName),
authenticationViewModel.user.doctorName), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 6,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
6,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -1.44, letterSpacing: -1.44,
@ -115,15 +104,12 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
AppText( AppText(
TranslationBase.of(context).accountInfo, TranslationBase.of(context).accountInfo,
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.64, letterSpacing: -0.64,
), ),
SizedBox( SizedBox(height: SizeConfig.heightMultiplier * 4),
height: SizeConfig.heightMultiplier * 4),
Container( Container(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -131,149 +117,85 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10), Radius.circular(10),
), ),
border: Border.all( border: Border.all(color: HexColor('#707070'), width: 0.1),
color: HexColor('#707070'), width: 0.1),
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
width: SizeConfig.realScreenWidth * .5, width: SizeConfig.realScreenWidth * .5,
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).lastLoginAt,
.lastLoginAt,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.4), letterSpacing: -0.4),
), ),
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.55,
.size
.width *
0.55,
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: TranslationBase.of( text: TranslationBase.of(context).verifyWith + ':',
context)
.verifyWith +
':',
style: TextStyle( style: TextStyle(
color: color: Color(0xFF575757),
Color(0xFF575757), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.5,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
letterSpacing: -0.4), letterSpacing: -0.4),
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(
text: authenticationViewModel text: authenticationViewModel.getType(authenticationViewModel.user.logInTypeID, context),
.getType(
authenticationViewModel
.user
.logInTypeID,
context),
style: TextStyle( style: TextStyle(
color: AppGlobal color: AppGlobal.appTextColor,
.appTextColor, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
fontSize: SizeConfig fontFamily: 'Poppins',
.getTextMultiplierBasedOnWidth() * fontWeight: FontWeight.w600,
3.5, letterSpacing: -0.48),
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
letterSpacing:
-0.48),
) )
]), ]),
), ),
), ),
], ],
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
), ),
), ),
Column( Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
authenticationViewModel authenticationViewModel.user.editedOn != null
.user.editedOn != ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn), isMonthShort: true)
null : authenticationViewModel.user.createdOn != null
? AppDateUtils ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn), isMonthShort: true)
.getDayMonthYearDateFormatted(
AppDateUtils
.convertStringToDate(
authenticationViewModel
.user
.editedOn),
isMonthShort: true)
: authenticationViewModel
.user.createdOn !=
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.convertStringToDate(
authenticationViewModel
.user
.createdOn),
isMonthShort: true)
: '--', : '--',
textAlign: TextAlign.right, textAlign: TextAlign.right,
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
AppText( AppText(
authenticationViewModel authenticationViewModel.user.editedOn != null
.user.editedOn != ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.editedOn))
null : authenticationViewModel.user.createdOn != null
? AppDateUtils.getHour(AppDateUtils ? AppDateUtils.getHour(AppDateUtils.convertStringToDate(authenticationViewModel.user.createdOn))
.convertStringToDate(
authenticationViewModel
.user.editedOn))
: authenticationViewModel
.user.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.convertStringToDate(
authenticationViewModel
.user
.createdOn))
: '--', : '--',
textAlign: TextAlign.right, textAlign: TextAlign.right,
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
.getTextMultiplierBasedOnWidth() *
3.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
color: Color(0xFF575757), color: Color(0xFF575757),
) )
], ],
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.end,
CrossAxisAlignment.end,
) )
], ],
), ),
@ -286,9 +208,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
//todo add translation //todo add translation
AppText( AppText(
"Please Verify", "Please Verify",
fontSize: SizeConfig fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5,
.getTextMultiplierBasedOnWidth() *
4.5,
color: AppGlobal.appTextColor, color: AppGlobal.appTextColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -.64, letterSpacing: -.64,
@ -300,77 +220,44 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
], ],
) )
: Column( : Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
this.onlySMSBox == false this.onlySMSBox == false
? Container( ? Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(bottom: 20, top: 30),
bottom: 20, top: 30),
child: AppText( child: AppText(
TranslationBase.of(context) TranslationBase.of(context).verifyLoginWith,
.verifyLoginWith, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.left, textAlign: TextAlign.left,
), ),
) )
: AppText( : AppText(
TranslationBase.of(context) TranslationBase.of(context).verifyFingerprint2,
.verifyFingerprint2, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
]), ]),
authenticationViewModel.user != null && authenticationViewModel.user != null && isMoreOption == false
isMoreOption == false ? Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
? Column( Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () => { onTap: () => {
print("Fingerprint"),
// TODO check this logic it seem it will create bug to us // TODO check this logic it seem it will create bug to us
authenticateUser( authenticateUser(AuthMethodTypes.Fingerprint, true)
AuthMethodTypes
.Fingerprint,
true)
}, },
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel, authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID),
authMethodType: authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
SelectedAuthMethodTypesService
.getMethodsTypeService(
authenticationViewModel
.user
.logInTypeID),
authenticateUser:
(AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType,
isActive),
)), )),
), ),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel, authMethodType: AuthMethodTypes.MoreOptions,
authMethodType:
AuthMethodTypes.MoreOptions,
onShowMore: () { onShowMore: () {
setState(() { setState(() {
isMoreOption = true; isMoreOption = true;
@ -379,38 +266,22 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
)) ))
]), ]),
]) ])
: Column( : Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false onlySMSBox == false
? Row( ? Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel, authMethodType: AuthMethodTypes.Fingerprint,
authMethodType: authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
AuthMethodTypes.Fingerprint,
authenticateUser: (AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)), )),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel, authMethodType: AuthMethodTypes.FaceID,
authMethodType: authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
AuthMethodTypes.FaceID,
authenticateUser: (AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)) ))
], ],
) )
@ -420,26 +291,15 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel,
authMethodType: AuthMethodTypes.SMS, authMethodType: AuthMethodTypes.SMS,
authenticateUser: authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
(AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)), )),
Expanded( Expanded(
child: VerificationMethodsList( child: VerificationMethodsList(
authenticationViewModel: authenticationViewModel: authenticationViewModel,
authenticationViewModel, authMethodType: AuthMethodTypes.WhatsApp,
authMethodType: authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
AuthMethodTypes.WhatsApp,
authenticateUser:
(AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)) ))
], ],
), ),
@ -468,14 +328,12 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: title: TranslationBase.of(context).useAnotherAccount ?? '',
TranslationBase.of(context).useAnotherAccount ?? '',
color: Color(0xFFD02127), color: Color(0xFFD02127),
//fontWeight: FontWeight.w700, //fontWeight: FontWeight.w700,
onPressed: () { onPressed: () {
authenticationViewModel.deleteUser(); authenticationViewModel.deleteUser();
authenticationViewModel authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
.setAppStatus(APP_STATUS.UNAUTHENTICATED);
}, },
), ),
SizedBox( SizedBox(
@ -489,15 +347,11 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
); );
} }
sendActivationCodeByOtpNotificationType( sendActivationCodeByOtpNotificationType(AuthMethodTypes authMethodType) async {
AuthMethodTypes authMethodType) async { if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) {
if (authMethodType == AuthMethodTypes.SMS ||
authMethodType == AuthMethodTypes.WhatsApp) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await authenticationViewModel.sendActivationCodeForDoctorApp( await authenticationViewModel.sendActivationCodeForDoctorApp(authMethodType: authMethodType, password: authenticationViewModel.userInfo.password);
authMethodType: authMethodType,
password: authenticationViewModel.userInfo.password);
if (authenticationViewModel.state == ViewState.ErrorLocal) { if (authenticationViewModel.state == ViewState.ErrorLocal) {
Utils.showErrorToast(authenticationViewModel.error); Utils.showErrorToast(authenticationViewModel.error);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -515,19 +369,14 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async { sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await authenticationViewModel await authenticationViewModel.sendActivationCodeVerificationScreen(authMethodType);
.sendActivationCodeVerificationScreen(authMethodType);
if (authenticationViewModel.state == ViewState.ErrorLocal) { if (authenticationViewModel.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Utils.showErrorToast(authenticationViewModel.error); Utils.showErrorToast(authenticationViewModel.error);
} else { } else {
await sharedPref.setString( await sharedPref.setString(TOKEN, authenticationViewModel.activationCodeVerificationScreenRes.logInTokenID);
TOKEN, if (authMethodType == AuthMethodTypes.SMS || authMethodType == AuthMethodTypes.WhatsApp) {
authenticationViewModel
.activationCodeVerificationScreenRes.logInTokenID);
if (authMethodType == AuthMethodTypes.SMS ||
authMethodType == AuthMethodTypes.WhatsApp) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
this.startSMSService(authMethodType, isSilentLogin: true); this.startSMSService(authMethodType, isSilentLogin: true);
} else { } else {
@ -537,12 +386,10 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
authenticateUser(AuthMethodTypes authMethodType, isActive) { authenticateUser(AuthMethodTypes authMethodType, isActive) {
if (authMethodType == AuthMethodTypes.Fingerprint || if (authMethodType == AuthMethodTypes.Fingerprint || authMethodType == AuthMethodTypes.FaceID) {
authMethodType == AuthMethodTypes.FaceID) {
fingerPrintBefore = authMethodType; fingerPrintBefore = authMethodType;
} }
this.selectedOption = this.selectedOption = fingerPrintBefore != null ? fingerPrintBefore : authMethodType;
fingerPrintBefore != null ? fingerPrintBefore : authMethodType;
switch (authMethodType) { switch (authMethodType) {
case AuthMethodTypes.SMS: case AuthMethodTypes.SMS:
@ -552,8 +399,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
sendActivationCode(authMethodType); sendActivationCode(authMethodType);
break; break;
case AuthMethodTypes.Fingerprint: case AuthMethodTypes.Fingerprint:
this.loginWithFingerPrintOrFaceID( this.loginWithFingerPrintOrFaceID(AuthMethodTypes.Fingerprint, isActive);
AuthMethodTypes.Fingerprint, isActive);
break; break;
case AuthMethodTypes.FaceID: case AuthMethodTypes.FaceID:
this.loginWithFingerPrintOrFaceID(AuthMethodTypes.FaceID, isActive); this.loginWithFingerPrintOrFaceID(AuthMethodTypes.FaceID, isActive);
@ -576,9 +422,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
new SMSOTP( new SMSOTP(
context, context,
type, type,
authenticationViewModel.loggedUser != null authenticationViewModel.loggedUser != null ? authenticationViewModel.loggedUser.mobileNumber : authenticationViewModel.user.mobile,
? authenticationViewModel.loggedUser.mobileNumber
: authenticationViewModel.user.mobile,
(value) { (value) {
showDialog( showDialog(
context: context, context: context,
@ -594,18 +438,13 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
).displayDialog(context); ).displayDialog(context);
} }
loginWithFingerPrintOrFaceID( loginWithFingerPrintOrFaceID(AuthMethodTypes authMethodTypes, isActive) async {
AuthMethodTypes authMethodTypes, isActive) async {
if (isActive) { if (isActive) {
await authenticationViewModel.showIOSAuthMessages(); await authenticationViewModel.showIOSAuthMessages();
if (!mounted) return; if (!mounted) return;
if (authenticationViewModel.user != null && if (authenticationViewModel.user != null &&
(SelectedAuthMethodTypesService.getMethodsTypeService( (SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID) == AuthMethodTypes.Fingerprint ||
authenticationViewModel.user.logInTypeID) == SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID) == AuthMethodTypes.FaceID)) {
AuthMethodTypes.Fingerprint ||
SelectedAuthMethodTypesService.getMethodsTypeService(
authenticationViewModel.user.logInTypeID) ==
AuthMethodTypes.FaceID)) {
this.sendActivationCode(authMethodTypes); this.sendActivationCode(authMethodTypes);
} else { } else {
setState(() { setState(() {
@ -616,8 +455,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
} }
checkActivationCode({String value, bool isSilentLogin = false}) async { checkActivationCode({String value, bool isSilentLogin = false}) async {
await authenticationViewModel.checkActivationCodeForDoctorApp( await authenticationViewModel.checkActivationCodeForDoctorApp(activationCode: value, isSilentLogin: isSilentLogin);
activationCode: value, isSilentLogin: isSilentLogin);
if (authenticationViewModel.state == ViewState.ErrorLocal) { if (authenticationViewModel.state == ViewState.ErrorLocal) {
Navigator.pop(context); Navigator.pop(context);
Utils.showErrorToast(authenticationViewModel.error); Utils.showErrorToast(authenticationViewModel.error);

@ -0,0 +1,472 @@
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../core/viewModel/project_view_model.dart';
import '../../core/viewModel/schedule_view_model.dart';
import '../../icons_app/doctor_app_icons.dart';
import '../../utils/date-utils.dart';
import '../../utils/translations_delegate_base_utils.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/errors/error_message.dart';
import '../base/base_view.dart';
class DoctorSchedulePage extends StatefulWidget {
@override
_DoctorSchedulePageState createState() => _DoctorSchedulePageState();
}
class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
DashboardService service;
PageController _pageController = PageController();
double currentPage = 0;
int selectedindex = 0;
List weeks = [];
int weekMS = 604800 * 1000;
List<String> freeSlots = [];
bool isPageChange = false;
String fromDate = DateFormat('yyyy-MM-dd').format(DateTime.now());
String toDate =
DateFormat('yyyy-MM-dd').format(DateTime.now().add(Duration(days: 30)));
int pageNo=1;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ScheduleViewModel>(
onModelReady: (model) => model.getDoctorRota(fromDate, toDate),
builder: (_, model, widget2) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).doctorSchedule,
isShowAppBar: true,
baseViewModel: model,
isHomeIcon: false,
isLoading: true,
actionButton: IconButton(
icon: Icon(DoctorApp.search_1),
color: Colors.black, //Colors.black,
onPressed: () => searchSchedule(model),
),
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Column(
children: [
Padding(
padding: EdgeInsets.only(left: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).dateFrom +
" " +
DateFormat("dd-MMM").format(
DateFormat('yyyy-MM-dd')
.parse(fromDate)) +
" " +
TranslationBase.of(context).to +
" " +
DateFormat("dd-MMM").format(
DateFormat('yyyy-MM-dd')
.parse(toDate)),
style: TextStyle(fontWeight: FontWeight.w600),
),
Row(
children: [
IconButton(
onPressed: () {
if(pageNo >1) {
pageNo--;
model.getDoctorRota(fromDate, toDate,
pageNo: pageNo);
}
},
icon: SvgPicture.asset(
'assets/images/svgs/prev.svg',
height: 25,
width: 10)),
IconButton(
onPressed: () {
pageNo++;
model.getDoctorRota(fromDate, toDate, pageNo: pageNo);
},
icon: SvgPicture.asset(
'assets/images/svgs/next.svg',
height: 25,
width: 10))
],
),
],
)),
],
),
model.getDoctorRotation.length ==0 ? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
)) :
Container(
margin: EdgeInsets.only(top: 45),
child: PageView.builder(
controller: _pageController,
itemCount: model.getDoctorRotation.length,
onPageChanged: (index) {
setState(() {
isPageChange = true;
this.currentPage = index.toDouble();
});
},
itemBuilder: (context, index) {
return model.getDoctorRotation[index]
.scheduleforuser.length ==0 ? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
)) : Container(
child: ListView.builder(
itemCount: model.getDoctorRotation[index]
.scheduleforuser.length,
itemBuilder: (context, index2) => InkWell(
onTap: () {
// final weekDay = weeks[index][index2]['DayName'];
},
child: Row(
children: [
Expanded(
flex: 1,
child: Padding(
padding:
projectViewModel.isArabic
? EdgeInsets.only(
right: 17)
: EdgeInsets.only(
left: 17),
child: Row(children: [
Column(
children: [
Text(DateFormat('EEEE')
.format(model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days)
// fontSize: 13,
// fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
),
Text(getDayMonths(model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days))
// fontWeight: FontWeight.bold,
// fontSize: 18,
],
)
])),
),
Expanded(
flex: 3,
child: ClipRRect(
borderRadius:
const BorderRadius.all(
Radius.circular(
20.0)),
child: Container(
padding: EdgeInsets.only(
left: 10,
right: 10,
top: 15,
bottom: 20),
margin: EdgeInsets.only(
left: 20,
right: 20,
top: 7,
bottom: 7),
decoration: BoxDecoration(
boxShadow: [
model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days
.toString()
.substring(
0,
10) ==
DateTime.now()
.toString()
.substring(
0, 10)
? BoxShadow(
color: Colors
.green,
offset: Offset(
projectViewModel.isArabic
? 5
: -5,
0))
: BoxShadow(
color: Colors
.grey[
100],
blurRadius:
5,
spreadRadius:
4,
offset:
Offset(
0,
10),
),
],
borderRadius:
const BorderRadius.all(
Radius.circular(
10.0)),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.days
.toString()
.substring(
0,
10) ==
DateTime.now()
.toString()
.substring(
0,
10)
? Text(
TranslationBase.of(
context)
.today,
style:
TextStyle(
color: Colors
.green,
fontWeight:
FontWeight
.w600,
fontSize:
12,
))
: SizedBox(),
// : SizedBox(),
Row(
children: [
Expanded(
child: Text(
model
.getDoctorRotation[
index]
.clinicname,
style:
TextStyle(
fontWeight:
FontWeight
.w600,
),
),
),
// Icon(Icons.arrow_forward, size: 16.0),
],
),
Container(
height: 45,
child: ListView
.builder(
itemCount: model
.getDoctorRotation[
index]
.scheduleforuser[
index2]
.shiftforuser
.length,
itemBuilder: (context,
index3) =>
Row(children: [
Text(model.getDoctorRotation[index].scheduleforuser[index2].shiftforuser[index3].fromtimetext.toString()),
Text(" "+TranslationBase.of(context).to +" "),
Text(model.getDoctorRotation[index].scheduleforuser[index2].shiftforuser[index3].totimetext.toString())
])))
// ],)
]))),
),
],
))));
},
)),
// PageViewIndicator(
// isActive: true,
// currentPage: this.currentPage,
// length: weeks.length,
// )
],
)),
);
});
}
searchSchedule(model) {
showDialog(
context: context,
builder: (BuildContext context) {
return StatefulBuilder(
builder:(context, setState) {
return
AlertDialog(
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).search,
style: TextStyle(fontSize: 22),
),
Text(
TranslationBase.of(context).searchFindSchedule,
style: TextStyle(fontSize: 16),
)
],
),
content: Container(
height: 150,
child: Column(children: [
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
fromDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).dateFrom,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(fromDate, style: TextStyle(fontSize: 14),),
Icon(Icons.calendar_month_outlined)
])
],
))),
SizedBox(height: 20,),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
toDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 56,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).toDate,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(toDate, style: TextStyle(fontSize: 14),),
Icon(Icons.calendar_month_outlined)
])
],
)))
]),
),
actions: [
AppButton(
title:TranslationBase.of(context).search,
onPressed: () {
setState((){
model.getDoctorRota(fromDate, toDate);
Navigator.pop(context);
});
},
)
],
);
;
}
);
},
);
}
String getDayMonths(DateTime dateTime) {
String dateFormat =
'${dateTime.day} ${AppDateUtils.getMonth(dateTime.month).toString().substring(0, 3)}';
return dateFormat;
}
}

@ -70,10 +70,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
kApiKey: '46209962', kApiKey: '46209962',
vcId: widget.patientData.vcId, vcId: widget.patientData.vcId,
isRecording: tokenData != null ? tokenData.isRecording : false, isRecording: tokenData != null ? tokenData.isRecording : false,
patientName: widget.patientData.fullName ?? patientName: widget.patientData.fullName ?? widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-",
widget.patientData.firstName != null
? "${widget.patientData.firstName} ${widget.patientData.lastName}"
: "-",
tokenID: token, tokenID: token,
//"hfkjshdf347r8743", //"hfkjshdf347r8743",
generalId: "Cs2020@2016\$2958", generalId: "Cs2020@2016\$2958",
@ -105,8 +102,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
}); });
connectOpenTok(result); connectOpenTok(result);
}).catchError((error) => }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()});
{Utils.showErrorToast(error), Navigator.of(context).pop()});
} }
@override @override
@ -134,20 +130,14 @@ class _VideoCallPageState extends State<VideoCallPage> {
), ),
Text( Text(
_start == 0 ? 'Dailing' : 'Connected', _start == 0 ? 'Dailing' : 'Connected',
style: TextStyle( style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15),
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300,
fontSize: 15),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
), ),
Text( Text(
widget.patientData.fullName, widget.patientData.fullName,
style: TextStyle( style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w900, fontSize: 20),
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w900,
fontSize: 20),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
@ -155,10 +145,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
Container( Container(
child: Text( child: Text(
_start == 0 ? 'Connecting...' : _timmer.toString(), _start == 0 ? 'Connecting...' : _timmer.toString(),
style: TextStyle( style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15),
color: Colors.deepPurpleAccent,
fontWeight: FontWeight.w300,
fontSize: 15),
)), )),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.02, height: MediaQuery.of(context).size.height * 0.02,
@ -205,22 +192,21 @@ class _VideoCallPageState extends State<VideoCallPage> {
_showAlert(BuildContext context) async { _showAlert(BuildContext context) async {
await showDialog( await showDialog(
context: context, context: context,
builder: (dialogContex) => AlertDialog(content: StatefulBuilder( builder: (dialogContex) => AlertDialog(content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
builder: (BuildContext context, StateSetter setState) {
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.7, height: MediaQuery.of(context).size.height * 0.7,
width: MediaQuery.of(context).size.width * .9, width: MediaQuery.of(context).size.width * .9,
child: Stack( child: Stack(
fit: StackFit.loose, fit: StackFit.loose,
overflow: Overflow.visible, // overflow: Overflow.visible,
children: <Widget>[ children: <Widget>[
Positioned( Positioned(
right: -40.0, right: -40.0,
top: -40.0, top: -40.0,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
Navigator.of(context, rootNavigator: true) Navigator.of(context, rootNavigator: true).pop('dialog');
.pop('dialog');
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: CircleAvatar( child: CircleAvatar(
@ -236,41 +222,41 @@ class _VideoCallPageState extends State<VideoCallPage> {
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: ElevatedButton(
onPressed: () => {endCall()}, onPressed: () => {endCall()},
child: child: Text(TranslationBase.of(context).endcall),
Text(TranslationBase.of(context).endcall), style: ElevatedButton.styleFrom(backgroundColor: Colors.red, textStyle: TextStyle(color: Colors.white))
color: Colors.red,
textColor: Colors.white, //color: Colors.red,
//textColor: Colors.white,
)), )),
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: ElevatedButton(
onPressed: () => {resumeCall()}, onPressed: () => {resumeCall()},
child: child: Text(TranslationBase.of(context).resumecall),
Text(TranslationBase.of(context).resumecall), style: ElevatedButton.styleFrom(backgroundColor: AppGlobal.appGreenColor, textStyle: TextStyle(color: Colors.white))
color: AppGlobal.appGreenColor,
textColor: Colors.white, // color: AppGlobal.appGreenColor,
// textColor: Colors.white,
), ),
), ),
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: ElevatedButton(
onPressed: () => {endCallWithCharge()}, onPressed: () => {endCallWithCharge()},
child: Text(TranslationBase.of(context) child: Text(TranslationBase.of(context).endcallwithcharge),
.endcallwithcharge), style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.white))),
textColor: Colors.white,
),
), ),
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: RaisedButton( child: ElevatedButton(
onPressed: () => { onPressed: () => {
setState(() => {isTransfer = true}) setState(() => {isTransfer = true})
}, },
child: Text( child: Text(TranslationBase.of(context).transfertoadmin),
TranslationBase.of(context).transfertoadmin), style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.yellow[900])),
color: Colors.yellow[900], // color: Colors.yellow[900],
), ),
), ),
isTransfer == true isTransfer == true
@ -283,16 +269,13 @@ class _VideoCallPageState extends State<VideoCallPage> {
child: TextField( child: TextField(
maxLines: 3, maxLines: 3,
controller: notes, controller: notes,
decoration: InputDecoration.collapsed( decoration: InputDecoration.collapsed(hintText: "Enter your notes here"),
hintText:
"Enter your notes here"),
)), )),
Center( Center(
child: RaisedButton( child: ElevatedButton(
onPressed: () => onPressed: () => {this.transferToAdmin(notes)},
{this.transferToAdmin(notes)},
child: Text('Transfer'), child: Text('Transfer'),
color: Colors.yellow[900], style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.yellow[900])),
)) ))
], ],
) )
@ -312,33 +295,24 @@ class _VideoCallPageState extends State<VideoCallPage> {
transferToAdmin(notes) { transferToAdmin(notes) {
closeRoute(); closeRoute();
_liveCareProvider _liveCareProvider.transfterToAdmin(widget.patientData, notes).then((result) {
.transfterToAdmin(widget.patientData, notes)
.then((result) {
connectOpenTok(result); connectOpenTok(result);
}).catchError((error) => }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()});
{Utils.showErrorToast(error), Navigator.of(context).pop()});
} }
endCall() { endCall() {
closeRoute(); closeRoute();
_liveCareProvider _liveCareProvider.endCall(widget.patientData, false, doctorprofile['DoctorID']).then((result) {
.endCall(widget.patientData, false, doctorprofile['DoctorID'])
.then((result) {
print(result); print(result);
}).catchError((error) => }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()});
{Utils.showErrorToast(error), Navigator.of(context).pop()});
} }
endCallWithCharge() { endCallWithCharge() {
_liveCareProvider _liveCareProvider.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']).then((result) {
.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID'])
.then((result) {
closeRoute(); closeRoute();
print('end callwith charge'); print('end callwith charge');
print(result); print(result);
}).catchError((error) => }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()});
{Utils.showErrorToast(error), Navigator.of(context).pop()});
} }
closeRoute() { closeRoute() {

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
@ -30,18 +30,7 @@ class MedicalFileDetails extends StatefulWidget {
String doctorImage; String doctorImage;
MedicalFileDetails( MedicalFileDetails(
{this.age, {this.age, this.firstName, this.lastName, this.gender, this.encounterNumber, this.pp, this.patient, this.doctorName, this.vistDate, this.clinicName, this.episode, this.doctorImage});
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp,
this.patient,
this.doctorName,
this.vistDate,
this.clinicName,
this.episode,
this.doctorImage});
@override @override
_MedicalFileDetailsState createState() => _MedicalFileDetailsState( _MedicalFileDetailsState createState() => _MedicalFileDetailsState(
@ -75,18 +64,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
String doctorImage; String doctorImage;
_MedicalFileDetailsState( _MedicalFileDetailsState(
{this.age, {this.age, this.firstName, this.lastName, this.gender, this.encounterNumber, this.pp, this.patient, this.doctorName, this.vistDate, this.clinicName, this.episode, this.doctorImage});
this.firstName,
this.lastName,
this.gender,
this.encounterNumber,
this.pp,
this.patient,
this.doctorName,
this.vistDate,
this.clinicName,
this.episode,
this.doctorImage});
bool isPhysicalExam = true; bool isPhysicalExam = true;
bool isProcedureExpand = true; bool isProcedureExpand = true;
@ -102,9 +80,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
model.getMedicalFile(mrn: pp); model.getMedicalFile(mrn: pp);
} }
}, },
builder: builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold(
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
doctorName: doctorName, doctorName: doctorName,
@ -113,8 +89,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
isPrescriptions: true, isPrescriptions: true,
isMedicalFile: true, isMedicalFile: true,
episode: episode, episode: episode,
visitDate: visitDate: '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(
'${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(
vistDate, vistDate,
), isArabic: projectViewModel.isArabic)}', ), isArabic: projectViewModel.isArabic)}',
isAppointmentHeader: true, isAppointmentHeader: true,
@ -128,125 +103,67 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
model.medicalFileList.length != 0 && model.medicalFileList.length != 0 && model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations.length != 0
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0
? Padding( ? Padding(
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
SizedBox(height: 25.0), SizedBox(height: 25.0),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 && model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations.length != 0)
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10, left: 10, right: 10),
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(color: Colors.grey[200], width: 0.5),
color: Colors.grey[200],
width: 0.5),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: HeaderBodyExpandableNotifier( child: HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(TranslationBase.of(context).historyOfPresentIllness.toUpperCase(),
TranslationBase.of( variant: isHistoryExpand ? "bodyText" : '', bold: isHistoryExpand ? true : true, color: Colors.black),
context)
.historyOfPresentIllness
.toUpperCase(),
variant: isHistoryExpand
? "bodyText"
: '',
bold: isHistoryExpand
? true
: true,
color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isHistoryExpand = isHistoryExpand = !isHistoryExpand;
!isHistoryExpand;
}); });
}, },
child: Icon(isHistoryExpand child: Icon(isHistoryExpand ? EvaIcons.arrowUp : EvaIcons.arrowDown))
? EvaIcons.arrowUp
: EvaIcons.arrowDown))
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
physics: physics: NeverScrollableScrollPhysics(),
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstCheifComplaint.length,
.medicalFileList[0] itemBuilder: (BuildContext ctxt, int index) {
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstCheifComplaint
.length,
itemBuilder: (BuildContext ctxt,
int index) {
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Container( child: Container(
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment
.center,
children: [ children: [
Row( Row(
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstCheifComplaint[index].hOPI
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstCheifComplaint[
index]
.hOPI
.trim(), .trim(),
), ),
), ),
SizedBox( SizedBox(width: 35.0),
width: 35.0),
], ],
), ),
], ],
@ -265,87 +182,50 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 && model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations.length != 0)
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10, left: 10, right: 10),
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(color: Colors.grey[200], width: 0.5),
color: Colors.grey[200],
width: 0.5),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: HeaderBodyExpandableNotifier( child: HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(TranslationBase.of(context).assessment.toUpperCase(),
TranslationBase.of( variant: isAssessmentExpand ? "bodyText" : '', bold: isAssessmentExpand ? true : true, color: Colors.black),
context)
.assessment
.toUpperCase(),
variant:
isAssessmentExpand
? "bodyText"
: '',
bold: isAssessmentExpand
? true
: true,
color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isAssessmentExpand = isAssessmentExpand = !isAssessmentExpand;
!isAssessmentExpand;
}); });
}, },
child: Icon(isAssessmentExpand child: Icon(isAssessmentExpand ? EvaIcons.arrowUp : EvaIcons.arrowDown))
? EvaIcons.arrowUp
: EvaIcons.arrowDown))
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
physics: physics: NeverScrollableScrollPhysics(),
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments.length,
.medicalFileList[0] itemBuilder: (BuildContext ctxt, int index) {
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments
.length,
itemBuilder: (BuildContext ctxt,
int index) {
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Container( child: Container(
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment
.center,
children: [ children: [
Row( Row(
children: [ children: [
@ -354,59 +234,25 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
fontSize: 13.0, fontSize: 13.0,
), ),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments[index].iCD10.trim(),
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.iCD10
.trim(),
fontSize: 13.5, fontSize: 13.5,
fontWeight: fontWeight: FontWeight.w700,
FontWeight
.w700,
), ),
SizedBox( SizedBox(width: 15.0),
width: 15.0),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).condition + ": ",
context)
.condition +
": ",
fontSize: 12.5, fontSize: 12.5,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments[index].condition
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.condition
.trim(), .trim(),
fontSize: 13.0, fontSize: 13.0,
fontWeight: fontWeight: FontWeight.w700,
FontWeight
.w700,
), ),
), ),
], ],
@ -415,23 +261,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments[index].description,
.medicalFileList[ fontWeight: FontWeight.w700,
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.description,
fontWeight:
FontWeight
.w700,
fontSize: 15.0, fontSize: 15.0,
), ),
) )
@ -440,32 +271,14 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
Row( Row(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).type + ": ",
context)
.type +
": ",
fontSize: 15.5, fontSize: 15.5,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments[index].type,
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.type,
fontSize: 16.0, fontSize: 16.0,
fontWeight: fontWeight: FontWeight.w700,
FontWeight
.w700,
), ),
), ),
], ],
@ -474,18 +287,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
height: 15.0, height: 15.0,
), ),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstAssessments[index].remarks.trim(),
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[
index]
.remarks
.trim(),
), ),
Divider( Divider(
height: 1, height: 1,
@ -508,86 +310,50 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 && model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations.length != 0)
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10, left: 10, right: 10),
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(color: Colors.grey[200], width: 0.5),
color: Colors.grey[200],
width: 0.5),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: HeaderBodyExpandableNotifier( child: HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(TranslationBase.of(context).test.toUpperCase(),
TranslationBase.of( variant: isProcedureExpand ? "bodyText" : '', bold: isProcedureExpand ? true : true, color: Colors.black),
context)
.test
.toUpperCase(),
variant: isProcedureExpand
? "bodyText"
: '',
bold: isProcedureExpand
? true
: true,
color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isProcedureExpand = isProcedureExpand = !isProcedureExpand;
!isProcedureExpand;
}); });
}, },
child: Icon(isProcedureExpand child: Icon(isProcedureExpand ? EvaIcons.arrowUp : EvaIcons.arrowDown))
? EvaIcons.arrowUp
: EvaIcons.arrowDown))
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
physics: physics: NeverScrollableScrollPhysics(),
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstProcedure.length,
.medicalFileList[0] itemBuilder: (BuildContext ctxt, int index) {
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstProcedure
.length,
itemBuilder: (BuildContext ctxt,
int index) {
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Container( child: Container(
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
MainAxisAlignment
.center,
children: [ children: [
Row( Row(
children: [ children: [
@ -597,65 +363,26 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'Procedure ID: ', 'Procedure ID: ',
), ),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstProcedure[index].procedureId
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstProcedure[
index]
.procedureId
.trim(), .trim(),
fontSize: fontSize: 13.5,
13.5, fontWeight: FontWeight.w700,
fontWeight:
FontWeight
.w700,
), ),
], ],
), ),
SizedBox( SizedBox(width: 35.0),
width: 35.0),
Column( Column(
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).orderDate + ": ",
context)
.orderDate +
": ",
), ),
AppText( AppText(
AppDateUtils AppDateUtils.getDateFormatted(DateTime.parse(
.getDateFormatted( model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstProcedure[index].orderDate
DateTime
.parse(
model
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstProcedure[
index]
.orderDate
.trim(), .trim(),
)), )),
fontSize: fontSize: 13.5,
13.5, fontWeight: FontWeight.w700,
fontWeight:
FontWeight
.w700,
), ),
], ],
), ),
@ -668,23 +395,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstProcedure[index].procName,
.medicalFileList[ fontWeight: FontWeight.w700,
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstProcedure[
index]
.procName,
fontWeight:
FontWeight
.w700,
), ),
) )
], ],
@ -695,23 +407,9 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
'CPT Code : ', 'CPT Code : ',
), ),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstProcedure[index].patientID
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstProcedure[
index]
.patientID
.toString(), .toString(),
fontWeight: fontWeight: FontWeight.w700,
FontWeight
.w700,
), ),
], ],
), ),
@ -739,79 +437,45 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
if (model.medicalFileList.length != 0 && if (model.medicalFileList.length != 0 && model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations.length != 0)
model
.medicalFileList[0]
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations
.length !=
0)
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10, left: 10, right: 10),
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(color: Colors.grey[200], width: 0.5),
color: Colors.grey[200],
width: 0.5),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: HeaderBodyExpandableNotifier( child: HeaderBodyExpandableNotifier(
headerWidget: Row( headerWidget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
children: [ children: [
AppText( AppText(TranslationBase.of(context).physicalSystemExamination.toUpperCase(),
TranslationBase.of( variant: isPhysicalExam ? "bodyText" : '', bold: isPhysicalExam ? true : true, color: Colors.black),
context)
.physicalSystemExamination
.toUpperCase(),
variant: isPhysicalExam
? "bodyText"
: '',
bold: isPhysicalExam
? true
: true,
color: Colors.black),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isPhysicalExam = isPhysicalExam = !isPhysicalExam;
!isPhysicalExam;
}); });
}, },
child: Icon(isPhysicalExam child: Icon(isPhysicalExam ? EvaIcons.arrowUp : EvaIcons.arrowDown))
? EvaIcons.arrowUp
: EvaIcons.arrowDown))
], ],
), ),
bodyWidget: ListView.builder( bodyWidget: ListView.builder(
physics: physics: NeverScrollableScrollPhysics(),
NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: model itemCount: model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstPhysicalExam.length,
.medicalFileList[0] itemBuilder: (BuildContext ctxt, int index) {
.entityList[0]
.timelines[encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam
.length,
itemBuilder: (BuildContext ctxt,
int index) {
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Container( child: Container(
@ -819,75 +483,27 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
children: [ children: [
Row( Row(
children: [ children: [
AppText(TranslationBase.of( AppText(TranslationBase.of(context).examType + ": "),
context)
.examType +
": "),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstPhysicalExam[index].examDesc,
.medicalFileList[ fontWeight: FontWeight.w700,
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstPhysicalExam[
index]
.examDesc,
fontWeight:
FontWeight
.w700,
), ),
], ],
), ),
Row( Row(
children: [ children: [
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstPhysicalExam[index].examDesc,
.medicalFileList[ fontWeight: FontWeight.w700,
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstPhysicalExam[
index]
.examDesc,
fontWeight:
FontWeight
.w700,
) )
], ],
), ),
Row( Row(
children: [ children: [
AppText(TranslationBase.of( AppText(TranslationBase.of(context).abnormal + ": "),
context)
.abnormal +
": "),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstPhysicalExam[index].abnormal,
.medicalFileList[ fontWeight: FontWeight.w700,
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstPhysicalExam[
index]
.abnormal,
fontWeight:
FontWeight
.w700,
), ),
], ],
), ),
@ -895,17 +511,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
height: 15.0, height: 15.0,
), ),
AppText( AppText(
model model.medicalFileList[0].entityList[0].timelines[encounterNumber].timeLineEvents[0].consulations[0].lstPhysicalExam[index].remarks,
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstPhysicalExam[
index]
.remarks,
), ),
Divider( Divider(
height: 1, height: 1,

@ -70,11 +70,18 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
}); });
} }
@override
void dispose() {
super.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicineViewModel>(onModelReady: (model) async { return BaseView<MedicineViewModel>(onModelReady: (model) async {
}, builder: (_, model, w) { }, builder: (_, model, w) {
myController.text = model.searchText; // myController.text = model.searchText;
return AppScaffold( return AppScaffold(
// baseViewModel: model, // baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
@ -86,7 +93,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 20, height: 10,
), ),
AppTextFieldCustomSearch( AppTextFieldCustomSearch(
hintText: hintText:

@ -1,16 +1,16 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart'; import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart';
import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patient-sick-leave/add_patient_sick_leave_screen.dart'; import 'package:doctor_app_flutter/screens/patient-sick-leave/add_patient_sick_leave_screen.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -64,18 +64,14 @@ class PatientSickLeaveScreen extends StatelessWidget {
if (!projectsProvider.isArabic) if (!projectsProvider.isArabic)
AppText( AppText(
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
fontSize: fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 3 : 4),
SizeConfig.getTextMultiplierBasedOnWidth() *
(SizeConfig.isWidthLarge ? 3 : 4),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
letterSpacing: -0.72, letterSpacing: -0.72,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
), ),
AppText( AppText(
TranslationBase.of(context).sickLeave, TranslationBase.of(context).sickLeave,
fontSize: fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 6 : 6),
SizeConfig.getTextMultiplierBasedOnWidth() *
(SizeConfig.isWidthLarge ? 6 : 6),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: -1.44, letterSpacing: -1.44,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
@ -105,8 +101,7 @@ class PatientSickLeaveScreen extends StatelessWidget {
shrinkWrap: true, shrinkWrap: true,
itemCount: model.getAllSIckLeavePatient.length, itemCount: model.getAllSIckLeavePatient.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
SickLeavePatientModel item = SickLeavePatientModel item = model.getAllSIckLeavePatient[index];
model.getAllSIckLeavePatient[index];
return Column( return Column(
children: [ children: [
CardWithBgWidget( CardWithBgWidget(
@ -122,23 +117,16 @@ class PatientSickLeaveScreen extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
if (item.doctorName != null) if (item.doctorName != null)
Row( Row(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded( Expanded(
// width: MediaQuery.of(context).size.width*0.51, // width: MediaQuery.of(context).size.width*0.51,
child: AppText( child: AppText(
Utils.capitalize( Utils.capitalize(item.doctorName ?? ""),
item.doctorName ?? ""),
fontSize: 18, fontSize: 18,
color: Color(0xff2e303a), color: Color(0xff2e303a),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
textOverflow: textOverflow: TextOverflow.ellipsis,
TextOverflow.ellipsis,
), ),
), ),
]), ]),
@ -148,16 +136,12 @@ class PatientSickLeaveScreen extends StatelessWidget {
Row( Row(
children: [ children: [
ClipRRect( ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(50.0),
BorderRadius.circular(50.0),
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: item.doctorImageURL ?? imageUrl: item.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
height: 30, height: 30,
width: 30, width: 30,
errorWidget: errorWidget: (context, url, error) => AppText(
(context, url, error) =>
AppText(
'No Image', 'No Image',
fontSize: 10, fontSize: 10,
), ),
@ -170,90 +154,36 @@ class PatientSickLeaveScreen extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
CustomRow( CustomRow(
label: TranslationBase.of( label: TranslationBase.of(context).daysSickleave,
context) labelSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.3,
.daysSickleave, valueSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
labelSize: SizeConfig value:
.getTextMultiplierBasedOnWidth() * (item.sickLeaveDays.toString() != null && item.sickLeaveDays.toString() != "null") ? item.sickLeaveDays.toString() : item.noOfDays.toString(),
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: (item.sickLeaveDays
.toString() !=
null &&
item.sickLeaveDays
.toString() !=
"null")
? item.sickLeaveDays
.toString()
: item.noOfDays
.toString(),
), ),
CustomRow( CustomRow(
label: TranslationBase.of( label: TranslationBase.of(context).startDate + ' ' ?? "",
context) labelSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.3,
.startDate + valueSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
' ' ?? value: AppDateUtils.getDayMonthYearDateFormatted(
"", item.startDate.contains("/Date(") ? AppDateUtils.convertStringToDate(item.startDate) : DateTime.parse(item.startDate),
labelSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item
.startDate)
: DateTime.parse(
item.startDate),
), ),
), ),
CustomRow( CustomRow(
label: TranslationBase.of( label: TranslationBase.of(context).endDate + ' ' ?? "",
context) labelSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.3,
.endDate + valueSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
' ' ?? value: AppDateUtils.getDayMonthYearDateFormatted(
"", item.startDate.contains("/Date(")
labelSize: SizeConfig ? AppDateUtils.convertStringToDate(item.endDate ?? "").add(
.getTextMultiplierBasedOnWidth() * Duration(days: item.noOfDays ?? item.sickLeaveDays),
3.3,
valueSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
4,
value: AppDateUtils
.getDayMonthYearDateFormatted(
item.startDate.contains(
"/Date(")
? AppDateUtils
.convertStringToDate(
item.endDate ??
"")
.add(
Duration(
days: item
.noOfDays ??
item.sickLeaveDays),
) )
: DateTime.parse( : DateTime.parse(item.startDate ?? "").add(
item.startDate ?? Duration(days: item.noOfDays ?? ""),
"")
.add(
Duration(
days:
item.noOfDays ??
""),
), ),
), ),
), ),
], ],
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
), ),
), ),
], ],

@ -72,136 +72,70 @@ class _DischargedPatientState extends State<DischargedPatient> {
model.filterData.length, model.filterData.length,
(index) => InkWell( (index) => InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(PATIENTS_PROFILE,
PATIENTS_PROFILE, arguments: {"patient": model.filterData[index], "patientType": "1", "isSearch": false, "isInpatient": true, "isDischargedPatient": true});
arguments: {
"patient":
model.filterData[index],
"patientType": "1",
"isSearch": false,
"isInpatient": true,
"isDischargedPatient": true
});
}, },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
left: 0,
right: 5,
bottom: 5,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(15),
BorderRadius.circular(15),
color: Colors.white, color: Colors.white,
), ),
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 12.0),
left: 12.0),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment
.spaceBetween,
children: [ children: [
Row(children: [ Row(children: [
Container( Container(
width: 170, width: 170,
child: AppText( child: AppText(
(Utils.capitalize(model (Utils.capitalize(model.filterData[index].firstName) + " " + Utils.capitalize(model.filterData[index].lastName)),
.filterData[
index]
.firstName) +
" " +
Utils.capitalize(model
.filterData[
index]
.lastName)),
fontSize: 16, fontSize: 16,
fontWeight: fontWeight: FontWeight.bold,
FontWeight fontFamily: 'Poppins',
.bold, textOverflow: TextOverflow.ellipsis,
fontFamily: ),
'Poppins', ),
textOverflow: model.filterData[index].gender == 1
TextOverflow
.ellipsis,
),
),
model.filterData[index]
.gender ==
1
? Icon( ? Icon(
DoctorApp DoctorApp.male_2,
.male_2, color: Colors.blue,
color: Colors
.blue,
) )
: Icon( : Icon(
DoctorApp DoctorApp.female_1,
.female_1, color: Colors.pink,
color: Colors
.pink,
), ),
]), ]),
Row( Row(
children: [ children: [
AppText( AppText(
model.filterData[index].nationalityName != model.filterData[index].nationalityName != null
null ? model.filterData[index].nationalityName.trim()
? model : model.filterData[index].nationality != null
.filterData[ ? model.filterData[index].nationality.trim()
index] : model.filterData[index].nationalityId != null
.nationalityName
.trim()
: model.filterData[index].nationality !=
null
? model
.filterData[
index]
.nationality
.trim()
: model.filterData[index].nationalityId !=
null
? model.filterData[index].nationalityId ? model.filterData[index].nationalityId
: "", : "",
fontWeight: fontWeight: FontWeight.bold,
FontWeight
.bold,
fontSize: 14, fontSize: 14,
textOverflow: textOverflow: TextOverflow.ellipsis,
TextOverflow ),
.ellipsis, model.filterData[index].nationality != null || model.filterData[index].nationalityId != null
),
model.filterData[index].nationality !=
null ||
model.filterData[index].nationalityId !=
null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius.circular( child: Image.network(
20.0), model.filterData[index].nationalityFlagURL != null ? model.filterData[index].nationalityFlagURL : '',
child: Image height: 25,
.network( width: 30,
model.filterData[index].nationalityFlagURL != errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
null
? model.filterData[index].nationalityFlagURL
: '',
height:
25,
width:
30,
errorBuilder: (BuildContext context,
Object
exception,
StackTrace
stackTrace) {
return AppText( return AppText(
'', '',
fontSize: fontSize: 10,
10,
); );
}, },
)) ))
@ -213,26 +147,16 @@ class _DischargedPatientState extends State<DischargedPatient> {
Row( Row(
children: <Widget>[ children: <Widget>[
Column( Column(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment
.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: padding: EdgeInsets.only(left: 12.0),
EdgeInsets.only(
left: 12.0),
child: Container( child: Container(
width: 60, width: 60,
height: 60, height: 60,
child: child: Image.asset(
Image.asset( model.filterData[index].gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
model.filterData[index] fit: BoxFit.cover,
.gender ==
1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit
.cover,
), ),
), ),
), ),
@ -243,118 +167,57 @@ class _DischargedPatientState extends State<DischargedPatient> {
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: [ children: [
Container( Container(
child: RichText( child: RichText(
text: text: new TextSpan(
new TextSpan( style: new TextStyle(fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black),
style: new TextStyle( children: <TextSpan>[
fontSize: 2.0 * new TextSpan(text: TranslationBase.of(context).fileNumber, style: TextStyle(fontSize: 14, fontFamily: 'Poppins')),
SizeConfig
.textMultiplier,
color: Colors
.black),
children: <
TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context) text: model.filterData[index].patientId.toString(),
.fileNumber, style: TextStyle(fontWeight: FontWeight.w700, fontFamily: 'Poppins', fontSize: 15)),
style: TextStyle(
fontSize:
14,
fontFamily:
'Poppins')),
new TextSpan(
text: model
.filterData[
index]
.patientId
.toString(),
style: TextStyle(
fontWeight: FontWeight
.w700,
fontFamily:
'Poppins',
fontSize:
15)),
], ],
), ),
), ),
), ),
Container( Container(
child: RichText( child: RichText(
text: text: new TextSpan(
new TextSpan( style: new TextStyle(
style: fontSize: 2.0 * SizeConfig.textMultiplier,
new TextStyle( color: Colors.black,
fontSize: 2.0 * fontFamily: 'Poppins',
SizeConfig ),
.textMultiplier, children: <TextSpan>[
color: Colors
.black,
fontFamily:
'Poppins',
),
children: <
TextSpan>[
new TextSpan( new TextSpan(
text: model.filterData[index].admissionDate == text: model.filterData[index].admissionDate == null ? "" : TranslationBase.of(context).admissionDate + " : ",
null style: TextStyle(fontSize: 14)),
? ""
: TranslationBase.of(context).admissionDate +
" : ",
style: TextStyle(
fontSize:
14)),
new TextSpan( new TextSpan(
text: model.filterData[index].admissionDate == text: model.filterData[index].admissionDate == null
null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(fontWeight: FontWeight.w700, fontSize: 15)),
fontWeight:
FontWeight.w700,
fontSize: 15)),
], ],
), ),
), ),
), ),
Container( Container(
child: RichText( child: RichText(
text: text: new TextSpan(
new TextSpan( style: new TextStyle(
style: fontSize: 2.0 * SizeConfig.textMultiplier,
new TextStyle( color: Colors.black,
fontSize: 2.0 * fontFamily: 'Poppins',
SizeConfig ),
.textMultiplier, children: <TextSpan>[
color: Colors new TextSpan(text: model.filterData[index].dischargeDate == null ? "" : "Discharge Date : ", style: TextStyle(fontSize: 14)),
.black,
fontFamily:
'Poppins',
),
children: <
TextSpan>[
new TextSpan(
text: model.filterData[index].dischargeDate ==
null
? ""
: "Discharge Date : ",
style: TextStyle(
fontSize:
14)),
new TextSpan( new TextSpan(
text: model.filterData[index].dischargeDate == text: model.filterData[index].dischargeDate == null
null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(fontWeight: FontWeight.w700, fontSize: 15)),
fontWeight:
FontWeight.w700,
fontSize: 15)),
], ],
), ),
), ),
@ -364,17 +227,12 @@ class _DischargedPatientState extends State<DischargedPatient> {
AppText( AppText(
"${TranslationBase.of(context).numOfDays}: ", "${TranslationBase.of(context).numOfDays}: ",
fontSize: 14, fontSize: 14,
fontWeight: fontWeight: FontWeight.w300,
FontWeight
.w300,
), ),
AppText( AppText(
"${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", "${AppDateUtils.convertStringToDate(model.filterData[index].dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}",
fontSize: fontSize: 15,
15, fontWeight: FontWeight.w700),
fontWeight:
FontWeight
.w700),
], ],
), ),
], ],

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/date-utils.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/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -23,10 +24,7 @@ class ECGPage extends StatelessWidget {
String arrivalType = routeArgs['arrival-type']; String arrivalType = routeArgs['arrival-type'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PatientMuseViewModel>( return BaseView<PatientMuseViewModel>(
onModelReady: (model) => model.getECGPatient( onModelReady: (model) => model.getECGPatient(patientType: patient.patientType, patientOutSA: 0, patientID: patient.patientId),
patientType: patient.patientType,
patientOutSA: 0,
patientID: patient.patientId),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
@ -59,19 +57,24 @@ class ECGPage extends StatelessWidget {
model.patientMuseResultsModelList.length, model.patientMuseResultsModelList.length,
(index) => InkWell( (index) => InkWell(
onTap: () async { onTap: () async {
await launch(model Uri ecgImageURL = Uri.parse(model.patientMuseResultsModelList[index].imageURL);
.patientMuseResultsModelList[index].imageURL); await canLaunchUrl(ecgImageURL).then((value) async {
await launchUrl(ecgImageURL);
}).catchError((err) {
DrAppToastMsg.showErrorToast(err.toString());
});
// if (await canLaunchUrl(ecgImageURL)) {
// await launchUrl(ecgImageURL);
// } else {
// DrAppToastMsg.showErrorToast("Unable to open ECG Image");
// }
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 120, height: 120,
margin: EdgeInsets.only(top: 5, bottom: 5), margin: EdgeInsets.only(top: 5, bottom: 5),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(border: Border.all(color: Colors.white, width: 2), color: Colors.white, borderRadius: BorderRadius.circular(8)),
border:
Border.all(color: Colors.white, width: 2),
color: Colors.white,
borderRadius: BorderRadius.circular(8)),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -79,8 +82,7 @@ class ECGPage extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
'ECG Report', 'ECG Report',
@ -90,26 +92,12 @@ class ECGPage extends StatelessWidget {
SizedBox(height: 3), SizedBox(height: 3),
RichText( RichText(
text: TextSpan( text: TextSpan(
style: TextStyle( style: TextStyle(fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black),
fontSize: 1.6 *
SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan(text: TranslationBase.of(context).orderNo, style: TextStyle(fontSize: 12, fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: TranslationBase.of( text: '${/*model.patientMuseResultsModelList[index].orderNo?? */ '3455'}',
context) style: TextStyle(fontWeight: FontWeight.w600, fontFamily: 'Poppins', fontSize: 14)),
.orderNo,
style: TextStyle(
fontSize: 12,
fontFamily: 'Poppins')),
new TextSpan(
text:
'${/*model.patientMuseResultsModelList[index].orderNo?? */ '3455'}',
style: TextStyle(
fontWeight:
FontWeight.w600,
fontFamily: 'Poppins',
fontSize: 14)),
], ],
), ),
) )
@ -118,8 +106,7 @@ class ECGPage extends StatelessWidget {
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.end,
CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
'${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime, isArabic: projectViewModel.isArabic)}',

@ -1,12 +1,12 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/patient/patient_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
@ -20,6 +20,7 @@ import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_cus
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'filter_date_page.dart'; import 'filter_date_page.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
@ -107,8 +108,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: _times.map((item) { children: _times.map((item) {
bool _isActive = bool _isActive = _times[_activeLocation] == item ? true : false;
_times[_activeLocation] == item ? true : false;
return Expanded( return Expanded(
child: InkWell( child: InkWell(
@ -128,8 +128,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
await model.getPatientBasedOnDate( await model.getPatientBasedOnDate(
item: item, item: item,
selectedPatientType: widget.selectedPatientType, selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel: patientSearchRequestModel: widget.patientSearchRequestModel,
widget.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo, isSearchWithKeyInfo: widget.isSearchWithKeyInfo,
outPatientFilterType: outPatientFilterType); outPatientFilterType: outPatientFilterType);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -140,24 +139,15 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
decoration: TabUtils.getBoxTabsBoxDecoration( decoration: TabUtils.getBoxTabsBoxDecoration(
isActive: _isActive, isActive: _isActive,
isFirst: _times.indexOf(item) == 0, isFirst: _times.indexOf(item) == 0,
isLast: isLast: _times.indexOf(item) == _times.length - 1,
_times.indexOf(item) == _times.length - 1, isMiddle: _times.indexOf(item) != 0 && _times.indexOf(item) != _times.length - 1,
isMiddle: _times.indexOf(item) != 0 &&
_times.indexOf(item) != _times.length - 1,
projectViewModel: projectsProvider), projectViewModel: projectsProvider),
child: Center( child: Center(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
TabUtils.getTabText( TabUtils.getTabText(title: item, isActive: _isActive),
title: item, isActive: _isActive), _isActive && _activeLocation != 0 && model.state == ViewState.Idle ? TabUtils.getTabCounter(isActive: _isActive, counter: model.filterData.length) : Container(),
_isActive &&
_activeLocation != 0 &&
model.state == ViewState.Idle
? TabUtils.getTabCounter(
isActive: _isActive,
counter: model.filterData.length)
: Container(),
], ],
), ),
), ),
@ -177,9 +167,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
marginTop: 5, marginTop: 5,
suffixIcon: IconButton( suffixIcon: IconButton(
icon: Icon( icon: Icon(
_activeLocation != 0 _activeLocation != 0 ? DoctorApp.filter_1 : FontAwesomeIcons.slidersH,
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black, color: Colors.black,
), ),
iconSize: 20, iconSize: 20,
@ -189,21 +177,17 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) => FilterDatePage(
FilterDatePage(
outPatientFilterType: outPatientFilterType, outPatientFilterType: outPatientFilterType,
patientSearchViewModel: model, patientSearchViewModel: model,
), ),
settings: RouteSettings( settings: RouteSettings(name: 'FilterOutPatentDateScreen'),
name: 'FilterOutPatentDateScreen'),
)); ));
}, },
), ),
positionedChild: IconButton( positionedChild: IconButton(
icon: Icon( icon: Icon(
isSortDes isSortDes ? FontAwesomeIcons.sortAmountDown : FontAwesomeIcons.sortAmountUp,
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black, color: Colors.black,
), ),
iconSize: 20, iconSize: 20,
@ -218,8 +202,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
child: model.filterData.isEmpty child: model.filterData.isEmpty
? Center( ? Center(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context) error: TranslationBase.of(context).youDontHaveAnyPatient,
.youDontHaveAnyPatient,
), ),
) )
: ListView.builder( : ListView.builder(
@ -227,15 +210,9 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
shrinkWrap: true, shrinkWrap: true,
itemCount: model.filterData.length, itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
if (_activeLocation != 0 || if (_activeLocation != 0 || (model.filterData[index].patientStatusType != null && model.filterData[index].patientStatusType == 43))
(model.filterData[index].patientStatusType !=
null &&
model.filterData[index]
.patientStatusType ==
43))
return Padding( return Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(horizontal: 8, vertical: 0),
horizontal: 8, vertical: 0),
child: PatientCard( child: PatientCard(
patientInfo: model.filterData[index], patientInfo: model.filterData[index],
patientType: patientType, patientType: patientType,
@ -244,19 +221,16 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
isInpatient: widget.isInpatient, isInpatient: widget.isInpatient,
onTap: () { onTap: () {
// TODO change the parameter to daynamic // TODO change the parameter to daynamic
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index], "patient": model.filterData[index],
"patientType": "1", "patientType": "1",
"from": widget "from": widget.patientSearchRequestModel.from,
.patientSearchRequestModel.from, "to": widget.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": false, "isSearch": false,
"isInpatient": false, "isInpatient": false,
"arrivalType": "7", "arrivalType": "7",
"isSearchAndOut": false, "isSearchAndOut": false,
"isSigned": model.filterData[index].isSigned != null ? model.filterData[index].isSigned : false,
}); });
}, },
// isFromSearch: widget.isSearch, // isFromSearch: widget.isSearch,

@ -26,12 +26,10 @@ import '../../../../routes.dart';
class AdmissionRequestFirstScreen extends StatefulWidget { class AdmissionRequestFirstScreen extends StatefulWidget {
@override @override
_AdmissionRequestThirdScreenState createState() => _AdmissionRequestThirdScreenState createState() => _AdmissionRequestThirdScreenState();
_AdmissionRequestThirdScreenState();
} }
class _AdmissionRequestThirdScreenState class _AdmissionRequestThirdScreenState extends State<AdmissionRequestFirstScreen> {
extends State<AdmissionRequestFirstScreen> {
final _dietTypeRemarksController = TextEditingController(); final _dietTypeRemarksController = TextEditingController();
final _sickLeaveCommentsController = TextEditingController(); final _sickLeaveCommentsController = TextEditingController();
final _postMedicalHistoryController = TextEditingController(); final _postMedicalHistoryController = TextEditingController();
@ -92,8 +90,7 @@ class _AdmissionRequestThirdScreenState
height: 15, height: 15,
), ),
Container( Container(
margin: margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16),
EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -120,45 +117,27 @@ class _AdmissionRequestThirdScreenState
: _selectedClinic['clinicNameEnglish'] : _selectedClinic['clinicNameEnglish']
: null, : null,
enabled: false, enabled: false,
onClick: model.clinicList != null && onClick: model.clinicList != null && model.clinicList.length > 0
model.clinicList.length > 0
? () { ? () {
openListDialogField( openListDialogField(projectViewModel.isArabic ? 'clinicNameArabic' : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) {
projectViewModel.isArabic
? 'clinicNameArabic'
: 'clinicNameEnglish',
'clinicID',
model.clinicList, (selectedValue) {
setState(() { setState(() {
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context); await model.getClinics().then((_) => GifLoaderDialogUtils.hideDialog(context));
await model.getClinics().then((_) => if (model.state == ViewState.Idle && model.clinicList.length > 0) {
GifLoaderDialogUtils.hideDialog( openListDialogField(projectViewModel.isArabic ? 'clinicNameArabic' : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) {
context));
if (model.state == ViewState.Idle &&
model.clinicList.length > 0) {
openListDialogField(
projectViewModel.isArabic
? 'clinicNameArabic'
: 'clinicNameEnglish',
'clinicID',
model.clinicList, (selectedValue) {
setState(() { setState(() {
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state == ViewState.ErrorLocal) {
ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error);
DrAppToastMsg.showErrorToast(
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast("Empty List");
"Empty List");
} }
}, },
), ),
@ -169,47 +148,31 @@ class _AdmissionRequestThirdScreenState
height: screenSize.height * 0.075, height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).doctor, hintText: TranslationBase.of(context).doctor,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
dropDownText: _selectedDoctor != null dropDownText: _selectedDoctor != null ? _selectedDoctor['DoctorName'] : null,
? _selectedDoctor['DoctorName']
: null,
enabled: false, enabled: false,
validationError: doctorError, validationError: doctorError,
onClick: _selectedClinic != null onClick: _selectedClinic != null
? model.doctorsList != null && ? model.doctorsList != null && model.doctorsList.length > 0
model.doctorsList.length > 0
? () { ? () {
openListDialogField('DoctorName', openListDialogField('DoctorName', 'DoctorID', model.doctorsList, (selectedValue) {
'DoctorID', model.doctorsList,
(selectedValue) {
setState(() { setState(() {
_selectedDoctor = selectedValue; _selectedDoctor = selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context); await model.getClinicDoctors(_selectedClinic['clinicID']).then((_) => GifLoaderDialogUtils.hideDialog(context));
await model if (model.state == ViewState.Idle && model.doctorsList.length > 0) {
.getClinicDoctors( openListDialogField('DoctorName', 'DoctorID', model.doctorsList, (selectedValue) {
_selectedClinic['clinicID'])
.then((_) => GifLoaderDialogUtils
.hideDialog(context));
if (model.state == ViewState.Idle &&
model.doctorsList.length > 0) {
openListDialogField('DoctorName',
'DoctorID', model.doctorsList,
(selectedValue) {
setState(() { setState(() {
_selectedDoctor = selectedValue; _selectedDoctor = selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state == ViewState.ErrorLocal) {
ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error);
DrAppToastMsg.showErrorToast(
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast("Empty List");
"Empty List");
} }
} }
: null, : null,
@ -241,8 +204,7 @@ class _AdmissionRequestThirdScreenState
_patientPregnant = newValue; _patientPregnant = newValue;
}); });
}, },
controlAffinity: controlAffinity: ListTileControlAffinity.leading,
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
CheckboxListTile( CheckboxListTile(
@ -266,8 +228,7 @@ class _AdmissionRequestThirdScreenState
height: 8, height: 8,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: hintText: TranslationBase.of(context).sickLeaveComments,
TranslationBase.of(context).sickLeaveComments,
controller: _sickLeaveCommentsController, controller: _sickLeaveCommentsController,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
@ -282,45 +243,29 @@ class _AdmissionRequestThirdScreenState
hintText: TranslationBase.of(context).dietType, hintText: TranslationBase.of(context).dietType,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
validationError: dietTypeError, validationError: dietTypeError,
dropDownText: _selectedDietType != null dropDownText: _selectedDietType != null ? _selectedDietType['nameEn'] : null,
? _selectedDietType['nameEn']
: null,
enabled: false, enabled: false,
onClick: model.dietTypesList != null && onClick: model.dietTypesList != null && model.dietTypesList.length > 0
model.dietTypesList.length > 0
? () { ? () {
openListDialogField( openListDialogField('nameEn', 'id', model.dietTypesList, (selectedValue) {
'nameEn', 'id', model.dietTypesList,
(selectedValue) {
setState(() { setState(() {
_selectedDietType = selectedValue; _selectedDietType = selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context); await model.getDietTypes(patient.patientId).then((_) => GifLoaderDialogUtils.hideDialog(context));
await model if (model.state == ViewState.Idle && model.dietTypesList.length > 0) {
.getDietTypes(patient.patientId) openListDialogField('nameEn', 'id', model.dietTypesList, (selectedValue) {
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.dietTypesList.length > 0) {
openListDialogField(
'nameEn', 'id', model.dietTypesList,
(selectedValue) {
setState(() { setState(() {
_selectedDietType = selectedValue; _selectedDietType = selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state == ViewState.ErrorLocal) {
ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error);
DrAppToastMsg.showErrorToast(
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast("Empty List");
"Empty List");
} }
}, },
), ),
@ -328,8 +273,7 @@ class _AdmissionRequestThirdScreenState
height: 10, height: 10,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: hintText: TranslationBase.of(context).dietTypeRemarks,
TranslationBase.of(context).dietTypeRemarks,
controller: _dietTypeRemarksController, controller: _dietTypeRemarksController,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
@ -339,8 +283,7 @@ class _AdmissionRequestThirdScreenState
height: 10, height: 10,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).pastMedicalHistory,
.pastMedicalHistory,
controller: _postMedicalHistoryController, controller: _postMedicalHistoryController,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
@ -351,8 +294,7 @@ class _AdmissionRequestThirdScreenState
height: 10, height: 10,
), ),
AppTextFieldCustom( AppTextFieldCustom(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).pastSurgicalHistory,
.pastSurgicalHistory,
controller: _postSurgicalHistoryController, controller: _postSurgicalHistoryController,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
@ -385,80 +327,56 @@ class _AdmissionRequestThirdScreenState
_sickLeaveCommentsController.text != "" && _sickLeaveCommentsController.text != "" &&
_postMedicalHistoryController.text != "" && _postMedicalHistoryController.text != "" &&
_postSurgicalHistoryController.text != "") { _postSurgicalHistoryController.text != "") {
model.admissionRequestData.patientMRN = model.admissionRequestData.patientMRN = patient.patientMRN;
patient.patientMRN; model.admissionRequestData.appointmentNo = patient.appointmentNo;
model.admissionRequestData.appointmentNo =
patient.appointmentNo;
model.admissionRequestData.episodeID = patient.episodeNo; model.admissionRequestData.episodeID = patient.episodeNo;
model.admissionRequestData.admissionRequestNo = 0; model.admissionRequestData.admissionRequestNo = 0;
model.admissionRequestData.admitToClinic = model.admissionRequestData.admitToClinic = _selectedClinic['clinicID'];
_selectedClinic['clinicID']; model.admissionRequestData.mrpDoctorID = _selectedDoctor['DoctorID'];
model.admissionRequestData.mrpDoctorID =
_selectedDoctor['DoctorID'];
model.admissionRequestData.isPregnant = _patientPregnant; model.admissionRequestData.isPregnant = _patientPregnant;
model.admissionRequestData.isSickLeaveRequired = model.admissionRequestData.isSickLeaveRequired = _isSickLeaveRequired;
_isSickLeaveRequired; model.admissionRequestData.sickLeaveComments = _sickLeaveCommentsController.text;
model.admissionRequestData.sickLeaveComments = model.admissionRequestData.isDietType = _selectedDietType != null ? true : false;
_sickLeaveCommentsController.text; model.admissionRequestData.dietType = _selectedDietType != null ? _selectedDietType['id'] : 0;
model.admissionRequestData.isDietType = model.admissionRequestData.dietRemarks = _dietTypeRemarksController.text;
_selectedDietType != null ? true : false; model.admissionRequestData.diagnosis = "0";
model.admissionRequestData.dietType = model.admissionRequestData.pastMedicalHistory = _postMedicalHistoryController.text;
_selectedDietType != null model.admissionRequestData.pastSurgicalHistory = _postSurgicalHistoryController.text;
? _selectedDietType['id']
: 0;
model.admissionRequestData.dietRemarks =
_dietTypeRemarksController.text;
model.admissionRequestData.pastMedicalHistory =
_postMedicalHistoryController.text;
model.admissionRequestData.pastSurgicalHistory =
_postSurgicalHistoryController.text;
Navigator.of(context) Navigator.of(context)
.pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: { .pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: {'patient': patient, 'patientType': patientType, 'arrivalType': arrivalType, 'admission-data': model.admissionRequestData});
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'admission-data': model.admissionRequestData
});
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(TranslationBase.of(context).pleaseFill);
TranslationBase.of(context).pleaseFill);
setState(() { setState(() {
if (_selectedClinic == null) { if (_selectedClinic == null) {
clinicError = clinicError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
clinicError = null; clinicError = null;
} }
if (_selectedDoctor == null) { if (_selectedDoctor == null) {
doctorError = doctorError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
doctorError = null; doctorError = null;
} }
if (_sickLeaveCommentsController.text == "") { if (_sickLeaveCommentsController.text == "") {
sickLeaveCommentError = sickLeaveCommentError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
sickLeaveCommentError = null; sickLeaveCommentError = null;
} }
if (_selectedDietType == null) { if (_selectedDietType == null) {
dietTypeError = dietTypeError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
dietTypeError = null; dietTypeError = null;
} }
if (_postMedicalHistoryController.text == "") { if (_postMedicalHistoryController.text == "") {
medicalHistoryError = medicalHistoryError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
medicalHistoryError = null; medicalHistoryError = null;
} }
if (_postSurgicalHistoryController.text == "") { if (_postSurgicalHistoryController.text == "") {
surgicalHistoryError = surgicalHistoryError = TranslationBase.of(context).fieldRequired;
TranslationBase.of(context).fieldRequired;
} else { } else {
surgicalHistoryError = null; surgicalHistoryError = null;
} }
@ -470,8 +388,7 @@ class _AdmissionRequestThirdScreenState
); );
} }
void openListDialogField(String attributeName, String attributeValueId, void openListDialogField(String attributeName, String attributeValueId, List<dynamic> list, Function(dynamic selectedValue) okFunction) {
List<dynamic> list, Function(dynamic selectedValue) okFunction) {
ListSelectDialog dialog = ListSelectDialog( ListSelectDialog dialog = ListSelectDialog(
list: list, list: list,
attributeName: attributeName, attributeName: attributeName,

@ -10,8 +10,7 @@ class LineChartForDiabetic extends StatelessWidget {
final int indexes; final int indexes;
final bool isOX; final bool isOX;
LineChartForDiabetic( LineChartForDiabetic({this.title, this.timeSeries1, this.indexes, this.isOX = false});
{this.title, this.timeSeries1, this.indexes, this.isOX = false});
List<int> xAxixs = List(); List<int> xAxixs = List();
List<double> yAxixs = List(); List<double> yAxixs = List();
@ -52,8 +51,7 @@ class LineChartForDiabetic extends StatelessWidget {
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart( child: LineChart(
sampleData1(context), sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250), swapAnimationDuration: const Duration(milliseconds: 250),
@ -84,11 +82,10 @@ class LineChartForDiabetic extends StatelessWidget {
touchTooltipData: LineTouchTooltipData( touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white, tooltipBgColor: Colors.white,
), ),
touchCallback: (LineTouchResponse touchResponse) {}, //touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true, handleBuiltInTouches: true,
), ),
gridData: FlGridData( gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true),
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData( titlesData: FlTitlesData(
bottomTitles: SideTitles( bottomTitles: SideTitles(
showTitles: true, showTitles: true,
@ -109,10 +106,8 @@ class LineChartForDiabetic extends StatelessWidget {
} else } else
return ''; return '';
} else { } else {
if (value.toInt() == 0) if (value.toInt() == 0) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; if (value.toInt() == timeSeries1.length - 1) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (value.toInt() == timeSeries1.length - 1)
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) { if (xAxixs.contains(value.toInt())) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
} }

@ -42,7 +42,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
admissionNo: int.parse(patient.admissionNo), admissionNo: int.parse(patient.admissionNo),
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
patientID: patient.patientId, patientID: patient.patientId,
setupID: "010266"); );
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel); model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel);
} }

@ -90,11 +90,10 @@ class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
touchTooltipData: LineTouchTooltipData( touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white, tooltipBgColor: Colors.white,
), ),
touchCallback: (LineTouchResponse touchResponse) {}, // touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true, handleBuiltInTouches: true,
), ),
gridData: FlGridData( gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true),
show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData( titlesData: FlTitlesData(
bottomTitles: SideTitles( bottomTitles: SideTitles(
showTitles: true, showTitles: true,
@ -108,8 +107,7 @@ class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
rotateAngle: -65, rotateAngle: -65,
getTitles: (value) { getTitles: (value) {
print(value); print(value);
DateTime date = AppDateUtils.convertStringToDate( DateTime date = AppDateUtils.convertStringToDate(widget.labResultHistory[value.toInt()].verifiedOnDateTime);
widget.labResultHistory[value.toInt()].verifiedOnDateTime);
if (widget.labResultHistory.length < 8) { if (widget.labResultHistory.length < 8) {
if (widget.labResultHistory.length > value.toInt()) { if (widget.labResultHistory.length > value.toInt()) {
return '${date.day}/ ${date.year}'; return '${date.day}/ ${date.year}';
@ -117,8 +115,7 @@ class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
return ''; return '';
} else { } else {
if (value.toInt() == 0) return '${date.day}/ ${date.year}'; if (value.toInt() == 0) return '${date.day}/ ${date.year}';
if (value.toInt() == widget.labResultHistory.length - 1) if (value.toInt() == widget.labResultHistory.length - 1) return '${date.day}/ ${date.year}';
return '${date.day}/ ${date.year}';
if (xAxixs.contains(value.toInt())) { if (xAxixs.contains(value.toInt())) {
return '${date.day}/ ${date.year}'; return '${date.day}/ ${date.year}';
} }
@ -203,8 +200,7 @@ class LineChartCurvedLabHistoryState extends State<LineChartCurvedLabHistory> {
List<FlSpot> spots = List(); List<FlSpot> spots = List();
for (int index = 0; index < widget.labResultHistory.length; index++) { for (int index = 0; index < widget.labResultHistory.length; index++) {
try { try {
var resultValueDouble = var resultValueDouble = double.parse(widget.labResultHistory[index].resultValue);
double.parse(widget.labResultHistory[index].resultValue);
spots.add(FlSpot(index.toDouble(), resultValueDouble)); spots.add(FlSpot(index.toDouble(), resultValueDouble));
} catch (e) { } catch (e) {
print(e); print(e);

@ -58,6 +58,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,
patient: widget.patient, patient: widget.patient,
isInpatient: widget.patientType == "1", isInpatient: widget.patientType == "1",
invoiceType:widget.patientLabOrders.invoiceType
), ),
), ),
), ),

@ -23,7 +23,7 @@ class LaboratoryResultWidget extends StatefulWidget {
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
final PatiantInformtion patient; final PatiantInformtion patient;
final bool isInpatient; final bool isInpatient;
final String invoiceType;
const LaboratoryResultWidget( const LaboratoryResultWidget(
{Key key, {Key key,
this.onTap, this.onTap,
@ -32,7 +32,9 @@ class LaboratoryResultWidget extends StatefulWidget {
this.orderNo, this.orderNo,
this.patientLabOrder, this.patientLabOrder,
this.patient, this.patient,
this.isInpatient}) this.isInpatient,
this.invoiceType
})
: super(key: key); : super(key: key);
@override @override

@ -45,8 +45,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
AuthenticationViewModel authenticationViewModel; AuthenticationViewModel authenticationViewModel;
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
getProgressNoteList(BuildContext context, PatientViewModel model, getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
{bool isLocalBusy = false}) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
@ -61,10 +60,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
tokenID: token, tokenID: token,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
languageID: 2); languageID: 2);
model model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) {
.getPatientProgressNote(progressNoteRequest.toJson(),
isLocalBusy: isLocalBusy)
.then((c) {
notesList = model.patientProgressNoteList; notesList = model.patientProgressNoteList;
}); });
} }
@ -76,8 +72,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
if (routeArgs.containsKey('isDischargedPatient')) if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient'];
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<PatientViewModel>( return BaseView<PatientViewModel>(
onModelReady: (model) => getProgressNoteList(context, model), onModelReady: (model) => getProgressNoteList(context, model),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
@ -112,9 +107,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
); );
}, },
label: widget.visitType == 3 label: widget.visitType == 3 ? TranslationBase.of(context).addNewOrderSheet : TranslationBase.of(context).addProgressNote,
? TranslationBase.of(context).addNewOrderSheet
: TranslationBase.of(context).addProgressNote,
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -125,105 +118,55 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
widthFactor: 0.95, widthFactor: 0.95,
child: CardWithBgWidget( child: CardWithBgWidget(
hasBorder: false, hasBorder: false,
bgColor: model.patientProgressNoteList[index] bgColor: model.patientProgressNoteList[index].status == 1 && authenticationViewModel.doctorProfile.doctorID != model.patientProgressNoteList[index].createdBy
.status ==
1 &&
authenticationViewModel
.doctorProfile.doctorID !=
model
.patientProgressNoteList[
index]
.createdBy
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: model.patientProgressNoteList[index] : model.patientProgressNoteList[index].status == 4
.status ==
4
? Colors.red.shade700 ? Colors.red.shade700
: model.patientProgressNoteList[index] : model.patientProgressNoteList[index].status == 2
.status ==
2
? AppGlobal.appGreenColor ? AppGlobal.appGreenColor
: Color(0xFFCC9B14), : Color(0xFFCC9B14),
widget: Column( widget: Column(
children: [ children: [
Column( Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
if (model if (model.patientProgressNoteList[index].status == 1 && authenticationViewModel.doctorProfile.doctorID != model.patientProgressNoteList[index].createdBy)
.patientProgressNoteList[
index]
.status ==
1 &&
authenticationViewModel
.doctorProfile.doctorID !=
model
.patientProgressNoteList[
index]
.createdBy)
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).notePending,
.notePending,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFFCC9B14), color: Color(0xFFCC9B14),
fontSize: 12, fontSize: 12,
), ),
if (model if (model.patientProgressNoteList[index].status == 4)
.patientProgressNoteList[
index]
.status ==
4)
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).noteCanceled,
.noteCanceled,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.red.shade700, color: Colors.red.shade700,
fontSize: 12, fontSize: 12,
), ),
if (model if (model.patientProgressNoteList[index].status == 2)
.patientProgressNoteList[
index]
.status ==
2)
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).noteVerified,
.noteVerified,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: AppGlobal.appGreenColor, color: AppGlobal.appGreenColor,
fontSize: 12, fontSize: 12,
), ),
if (model.patientProgressNoteList[index].status != 2 && if (model.patientProgressNoteList[index].status != 2 &&
model model.patientProgressNoteList[index].status != 4 &&
.patientProgressNoteList[ authenticationViewModel.doctorProfile.doctorID == model.patientProgressNoteList[index].createdBy)
index]
.status !=
4 &&
authenticationViewModel
.doctorProfile.doctorID ==
model
.patientProgressNoteList[
index]
.createdBy)
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => builder: (context) => UpdateNoteOrder(
UpdateNoteOrder( note: model.patientProgressNoteList[index],
note: model patientModel: model,
.patientProgressNoteList[ patient: patient,
index], visitType: widget.visitType,
patientModel:
model,
patient:
patient,
visitType: widget
.visitType,
isUpdate: true, isUpdate: true,
)), )),
); );
@ -231,9 +174,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[600], color: Colors.grey[600],
borderRadius: borderRadius: BorderRadius.circular(10),
BorderRadius.circular(
10),
), ),
// color:Colors.red[600], // color:Colors.red[600],
@ -248,9 +189,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
width: 2, width: 2,
), ),
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).update,
context)
.update,
fontSize: 10, fontSize: 10,
color: Colors.white, color: Colors.white,
), ),
@ -268,65 +207,34 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
context: context, context: context,
actionName: "verify", actionName: "verify",
confirmFun: () async { confirmFun: () async {
GifLoaderDialogUtils GifLoaderDialogUtils.showMyDialog(context);
.showMyDialog( UpdateNoteReqModel reqModel = UpdateNoteReqModel(
context); admissionNo: int.parse(patient.admissionNo),
UpdateNoteReqModel cancelledNote: false,
reqModel = lineItemNo: model.patientProgressNoteList[index].lineItemNo,
UpdateNoteReqModel( conditionId: model.patientProgressNoteList[index].condition,
admissionNo: int createdBy: model.patientProgressNoteList[index].createdBy,
.parse(patient notes: model.patientProgressNoteList[index].notes,
.admissionNo),
cancelledNote:
false,
lineItemNo: model
.patientProgressNoteList[
index]
.lineItemNo,
conditionId: model
.patientProgressNoteList[
index].condition,
createdBy: model
.patientProgressNoteList[
index]
.createdBy,
notes: model
.patientProgressNoteList[
index]
.notes,
verifiedNote: true, verifiedNote: true,
patientTypeID: patientTypeID: patient.patientType,
patient
.patientType,
patientOutSA: false, patientOutSA: false,
); );
await model await model.updatePatientProgressNote(reqModel);
.updatePatientProgressNote( await getProgressNoteList(context, model, isLocalBusy: true);
reqModel); GifLoaderDialogUtils.hideDialog(context);
await getProgressNoteList(
context, model,
isLocalBusy:
true);
GifLoaderDialogUtils
.hideDialog(
context);
}); });
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppGlobal color: AppGlobal.appGreenColor,
.appGreenColor, borderRadius: BorderRadius.circular(10),
borderRadius:
BorderRadius.circular(
10),
), ),
// color:Colors.red[600], // color:Colors.red[600],
child: Row( child: Row(
children: [ children: [
Icon( Icon(
FontAwesomeIcons FontAwesomeIcons.check,
.check,
size: 12, size: 12,
color: Colors.white, color: Colors.white,
), ),
@ -334,9 +242,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
width: 2, width: 2,
), ),
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).noteVerify,
context)
.noteVerify,
fontSize: 10, fontSize: 10,
color: Colors.white, color: Colors.white,
), ),
@ -352,69 +258,38 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onTap: () async { onTap: () async {
showMyDialog( showMyDialog(
context: context, context: context,
actionName: actionName: TranslationBase.of(context).cancel,
TranslationBase.of(
context)
.cancel,
confirmFun: () async { confirmFun: () async {
GifLoaderDialogUtils GifLoaderDialogUtils.showMyDialog(
.showMyDialog(
context, context,
); );
UpdateNoteReqModel UpdateNoteReqModel reqModel = UpdateNoteReqModel(
reqModel = admissionNo: int.parse(patient.admissionNo),
UpdateNoteReqModel( conditionId: model.patientProgressNoteList[index].condition,
admissionNo: int
.parse(patient
.admissionNo),
conditionId: model
.patientProgressNoteList[
index].condition,
cancelledNote: true, cancelledNote: true,
lineItemNo: model lineItemNo: model.patientProgressNoteList[index].lineItemNo,
.patientProgressNoteList[ createdBy: model.patientProgressNoteList[index].createdBy,
index] notes: model.patientProgressNoteList[index].notes,
.lineItemNo,
createdBy: model
.patientProgressNoteList[
index]
.createdBy,
notes: model
.patientProgressNoteList[
index]
.notes,
verifiedNote: false, verifiedNote: false,
patientTypeID: patientTypeID: patient.patientType,
patient
.patientType,
patientOutSA: false, patientOutSA: false,
); );
await model await model.updatePatientProgressNote(reqModel);
.updatePatientProgressNote( await getProgressNoteList(context, model, isLocalBusy: true);
reqModel); GifLoaderDialogUtils.hideDialog(context);
await getProgressNoteList(
context, model,
isLocalBusy:
true);
GifLoaderDialogUtils
.hideDialog(
context);
}); });
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red[600], color: Colors.red[600],
borderRadius: borderRadius: BorderRadius.circular(10),
BorderRadius.circular(
10),
), ),
// color:Colors.red[600], // color:Colors.red[600],
child: Row( child: Row(
children: [ children: [
Icon( Icon(
FontAwesomeIcons FontAwesomeIcons.trash,
.trash,
size: 12, size: 12,
color: Colors.white, color: Colors.white,
), ),
@ -440,40 +315,25 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
height: 10, height: 10,
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: MediaQuery.of(context) width: MediaQuery.of(context).size.width * 0.60,
.size
.width *
0.60,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: [ children: [
AppText( AppText(
TranslationBase.of( TranslationBase.of(context).createdBy + ' ',
context)
.createdBy + ' ',
fontSize: 10, fontSize: 10,
), ),
Expanded( Expanded(
child: AppText( child: AppText(
model model.patientProgressNoteList[index].doctorName ?? '',
.patientProgressNoteList[ fontWeight: FontWeight.w600,
index]
.doctorName ??
'',
fontWeight:
FontWeight.w600,
fontSize: 12, fontSize: 12,
isCopyable: true, isCopyable: true,
), ),
@ -481,9 +341,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
], ],
), ),
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).conditionDescription + ' : ', TranslationBase.of(context).conditionDescription + ' : ',
@ -492,8 +350,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
Expanded( Expanded(
child: AppText( child: AppText(
model.patientProgressNoteList[index].conditionDescription ?? '', model.patientProgressNoteList[index].conditionDescription ?? '',
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600,
fontSize: 12, fontSize: 12,
isCopyable: true, isCopyable: true,
), ),
@ -506,68 +363,34 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
Column( Column(
children: [ children: [
AppText( AppText(
model model.patientProgressNoteList[index].createdOn != null
.patientProgressNoteList[ ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn),
index] isArabic: projectViewModel.isArabic, isMonthShort: true)
.createdOn != : AppDateUtils.getDayMonthYearDateFormatted(DateTime.now(), isArabic: projectViewModel.isArabic),
null
? AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.patientProgressNoteList[
index]
.createdOn),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true)
: AppDateUtils
.getDayMonthYearDateFormatted(
DateTime.now(),
isArabic:
projectViewModel
.isArabic),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
isCopyable: true, isCopyable: true,
), ),
AppText( AppText(
model model.patientProgressNoteList[index].createdOn != null
.patientProgressNoteList[ ? AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn))
index] : AppDateUtils.getHour(DateTime.now()),
.createdOn !=
null
? AppDateUtils.getHour(
AppDateUtils
.getDateTimeFromServerFormat(model
.patientProgressNoteList[
index]
.createdOn))
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
isCopyable: true, isCopyable: true,
), ),
], ],
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.end,
CrossAxisAlignment.end,
) )
], ],
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row( Row(mainAxisAlignment: MainAxisAlignment.start, children: [
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded( Expanded(
child: AppText( child: AppText(
model model.patientProgressNoteList[index].notes,
.patientProgressNoteList[
index]
.notes,
fontSize: 10, fontSize: 10,
isCopyable: true, isCopyable: true,
), ),
@ -592,7 +415,6 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
); );
} }
/// TODO Elham* Make this as custom Dialog /// TODO Elham* Make this as custom Dialog
showMyDialog({BuildContext context, Function confirmFun, String actionName}) { showMyDialog({BuildContext context, Function confirmFun, String actionName}) {
showDialog( showDialog(
@ -637,9 +459,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
color: Colors.white, color: Colors.white,
child: AppText( child: AppText(
projectViewModel.isArabic projectViewModel.isArabic ? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟" : 'Are you sure you want $actionName this order?',
? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟"
: 'Are you sure you want $actionName this order?',
fontSize: 15, fontSize: 15,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -654,7 +474,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
FlatButton( ElevatedButton(
child: AppText( child: AppText(
TranslationBase.of(context).cancel, TranslationBase.of(context).cancel,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -664,7 +484,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}), }),
FlatButton( ElevatedButton(
child: AppText( child: AppText(
TranslationBase.of(context).noteConfirm, TranslationBase.of(context).noteConfirm,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -377,12 +378,14 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
void resultListener(result) { void resultListener(result) {
recognizedWord = result.recognizedWords; recognizedWord = result.recognizedWords;
event.setValue({"searchText": recognizedWord}); event.setValue({"searchText": recognizedWord});
if (result.finalResult ==true) { if (result.finalResult ==true) {
setState(() { setState(() {
SpeechToText.closeAlertDialog(context); if (mounted) {
speech.stop(); // speech.stop();
progressNoteController.text += recognizedWord + '\n'; progressNoteController.text += recognizedWord + '\n';
SpeechToText.closeAlertDialog(context);
}
}); });
} else { } else {
print(result.finalResult); print(result.finalResult);

@ -45,7 +45,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
admissionNo: int.parse(patient.admissionNo), admissionNo: int.parse(patient.admissionNo),
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
patientID: patient.patientId, patientID: patient.patientId,
setupID: "010266"); );
model.getNursingProgressNote(getNursingProgressNoteRequestModel); model.getNursingProgressNote(getNursingProgressNoteRequestModel);
} }

@ -591,7 +591,7 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
widget.patient.admissionNo), widget.patient.admissionNo),
createdBy: createdBy:
model.doctorProfile.doctorID, model.doctorProfile.doctorID,
setupID: "010266"); );
await model.updateOperationReport( await model.updateOperationReport(
createUpdateOperationReportRequestModel); createUpdateOperationReportRequestModel);

@ -1,22 +1,24 @@
import 'dart:async'; import 'dart:async';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/post_episode_for_Inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/service/VideoCallService.dart'; import 'package:doctor_app_flutter/core/service/VideoCallService.dart';
import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/in_patient/post_episode_for_Inpatient_request_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/live_care/end_call_screen.dart'; import 'package:doctor_app_flutter/screens/live_care/end_call_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_other.dart'; import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_other.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_search.dart'; import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_search.dart';
import 'package:doctor_app_flutter/utils/notification_permission_utils.dart'; import 'package:doctor_app_flutter/utils/notification_permission_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
@ -24,6 +26,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'package:quiver/async.dart'; import 'package:quiver/async.dart';
import '../../../../locator.dart'; import '../../../../locator.dart';
@ -34,14 +37,15 @@ class PatientProfileScreen extends StatefulWidget {
_PatientProfileScreenState createState() => _PatientProfileScreenState(); _PatientProfileScreenState createState() => _PatientProfileScreenState();
} }
class _PatientProfileScreenState extends State<PatientProfileScreen> class _PatientProfileScreenState extends State<PatientProfileScreen> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
PatiantInformtion patient; PatiantInformtion patient;
LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel(); LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel();
bool isFromSearch = false; bool isFromSearch = false;
bool isFromLiveCare = false; bool isFromLiveCare = false;
bool isSigned = false;
bool isInpatient = false; bool isInpatient = false;
bool isMyPatient = false; bool isMyPatient = false;
bool isCallFinished = false; bool isCallFinished = false;
@ -85,6 +89,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
arrivalType = routeArgs['arrivalType']; arrivalType = routeArgs['arrivalType'];
from = routeArgs['from']; from = routeArgs['from'];
to = routeArgs['to']; to = routeArgs['to'];
isSigned = routeArgs['isSigned'];
if (routeArgs.containsKey("isSearch")) { if (routeArgs.containsKey("isSearch")) {
isFromSearch = routeArgs['isSearch']; isFromSearch = routeArgs['isSearch'];
} }
@ -115,8 +120,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
StreamSubscription callTimer; StreamSubscription callTimer;
callConnected() { callConnected() {
callTimer = callTimer = CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
..onDone(() { ..onDone(() {
callTimer.cancel(); callTimer.cancel();
}) })
@ -138,10 +142,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context);
return BaseView<LiveCarePatientViewModel>( return BaseView<LiveCarePatientViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1) if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId);
await model.addPatientToDoctorList(patient.vcId);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
@ -154,13 +158,11 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
children: [ children: [
Column( Column(
children: [ children: [
PatientProfileHeaderNewDesignAppBar( PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType,
patient, arrivalType ?? '0', patientType,
videoCallDurationStream: videoCallDurationStream, videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient, isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare, isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && height: (patient.patientStatusType != null && patient.patientStatusType == 43)
patient.patientStatusType == 43)
? 210 ? 210
: isDischargedPatient : isDischargedPatient
? 240 ? 240
@ -192,8 +194,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
isInpatient: isInpatient, isInpatient: isInpatient,
from: from, from: from,
to: to, to: to,
isDischargedPatient: isDischargedPatient: isDischargedPatient,
isDischargedPatient,
isFromSearch: isFromSearch, isFromSearch: isFromSearch,
) )
: ProfileGridForOther( : ProfileGridForOther(
@ -204,6 +205,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
isFromLiveCare: isFromLiveCare, isFromLiveCare: isFromLiveCare,
from: from, from: from,
to: to, to: to,
projectViewModel: projectViewModel,
), ),
), ),
SizedBox( SizedBox(
@ -218,8 +220,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
? true ? true
: isFromLiveCare : isFromLiveCare
? patient.episodeNo != null ? patient.episodeNo != null
: patient.patientStatusType != null && : patient.patientStatusType != null && patient.patientStatusType == 43)
patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.getDoctorProfile(); model.getDoctorProfile();
@ -237,10 +238,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
if (patient.episodeNo == 0) if (patient.episodeNo == 0)
AppButton( AppButton(
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
disabled: disabled: model.state == ViewState.BusyLocal,
model.state == ViewState.BusyLocal, title: "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare || isInpatient color: isFromLiveCare || isInpatient
? AppGlobal.appRedColor ? AppGlobal.appRedColor
: patient.patientStatusType == 43 : patient.patientStatusType == 43
@ -248,8 +247,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
: AppGlobal.appRedColor, : AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
// vPadding: 8, // vPadding: 8,
height: SizeConfig.heightMultiplier * height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 9 : 6),
(SizeConfig.isHeightVeryShort ? 9 : 6),
radius: 30, radius: 30,
hPadding: 25, hPadding: 25,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -260,34 +258,24 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30, height: 30,
), ),
onPressed: () async { onPressed: () async {
if ((isFromLiveCare && if ((isFromLiveCare && patient.appointmentNo != null) || patient.patientStatusType == 43 || isInpatient) {
patient.appointmentNo != null) || createEpisode(patient: patient, model: model);
patient.patientStatusType == 43 ||
isInpatient) {
createEpisode(
patient: patient, model: model);
} }
}, },
), ),
if (patient.episodeNo != 0) if (patient.episodeNo != 0)
AppButton( AppButton(
loading: loading: model.state == ViewState.BusyLocal,
model.state == ViewState.BusyLocal, // disabled: model.state == ViewState.BusyLocal || isSigned,
disabled: title: "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
model.state == ViewState.BusyLocal, color: ((isInpatient) || isFromLiveCare) && model.state != ViewState.BusyLocal
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: ((isInpatient) ||
isFromLiveCare) &&
model.state != ViewState.BusyLocal
? AppGlobal.appRedColor ? AppGlobal.appRedColor
: patient.patientStatusType == 43 : patient.patientStatusType == 43
? AppGlobal.appRedColor ? AppGlobal.appRedColor
: AppGlobal.appRedColor, : AppGlobal.appRedColor,
fontColor: Colors.white, fontColor: Colors.white,
// vPadding: 8, // vPadding: 8,
height: SizeConfig.heightMultiplier * height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 9 : 6),
(SizeConfig.isHeightVeryShort ? 9 : 6),
radius: 30, radius: 30,
hPadding: 25, hPadding: 25,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -298,19 +286,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
height: 30, height: 30,
), ),
onPressed: () async { onPressed: () async {
await locator<AnalyticsService>() await locator<AnalyticsService>().logEvent(
.logEvent(
eventCategory: "Patient Profile ", eventCategory: "Patient Profile ",
eventAction: "Update Episode", eventAction: "Update Episode",
); );
if ((isFromLiveCare && if ((isFromLiveCare && patient.appointmentNo != null && patient.appointmentNo != 0) || patient.patientStatusType == 43 || isInpatient) {
patient.appointmentNo != null && Navigator.of(context).pushNamed(UPDATE_EPISODE, arguments: {'patient': patient});
patient.appointmentNo != 0) ||
patient.patientStatusType == 43 ||
isInpatient) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {'patient': patient});
} }
}), }),
], ],
@ -342,14 +323,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
child: Center( child: Center(
child: AppButton( child: AppButton(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: isCallFinished color: isCallFinished ? Colors.red[600] : AppGlobal.appGreenColor,
? Colors.red[600] title: isCallFinished ? TranslationBase.of(context).endCall : TranslationBase.of(context).initiateCall,
: AppGlobal.appGreenColor, disabled: isCallStarted || model.state == ViewState.BusyLocal,
title: isCallFinished
? TranslationBase.of(context).endCall
: TranslationBase.of(context).initiateCall,
disabled: isCallStarted ||
model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
// TODO MOSA TEST // TODO MOSA TEST
// AppPermissionsUtils // AppPermissionsUtils
@ -367,49 +343,31 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) => EndCallScreen(patient: patient),
EndCallScreen(patient: patient), settings: RouteSettings(name: 'EndCallScreen'),
settings:
RouteSettings(name: 'EndCallScreen'),
), ),
); );
} else { } else {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.startCall( await model.startCall(isReCall: false, vCID: patient.vcId);
isReCall: false, vCID: patient.vcId);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
await model.getDoctorProfile(); await model.getDoctorProfile();
patient.appointmentNo = int.parse(model patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
.startCallRes.appointmentNo
.toString());
patient.episodeNo = 0; patient.episodeNo = 0;
model.updateInCallPatient( model.updateInCallPatient(patient: patient, appointmentNo: int.parse(model.startCallRes.appointmentNo.toString()));
patient: patient,
appointmentNo: int.parse(model
.startCallRes.appointmentNo
.toString()));
setState(() { setState(() {
isCallStarted = true; isCallStarted = true;
}); });
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils AppPermissionsUtils.requestVideoCallPermission(
.requestVideoCallPermission(
context: context, context: context,
onTapGrant: () { onTapGrant: () {
locator<VideoCallService>() locator<VideoCallService>()
.openVideo( .openVideo(model.startCallRes, patient, model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected, callDisconnected);
model.startCallRes,
patient,
model.startCallRes != null
? model.startCallRes
.isRecording
: true,
callConnected,
callDisconnected);
}); });
} }
} }
@ -436,15 +394,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
); );
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
if (patient.admissionNo != null && patient.admissionNo.isNotEmpty) { if (patient.admissionNo != null && patient.admissionNo.isNotEmpty) {
PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel(admissionNo: int.parse(patient.admissionNo), patientID: patient.patientId);
PostEpisodeForInpatientRequestModel(
admissionNo: int.parse(patient.admissionNo),
patientID: patient.patientId);
await model.postEpisodeForInPatient(postEpisodeReqModel); await model.postEpisodeForInPatient(postEpisodeReqModel);
} else { } else {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(appointmentNo: int.parse(patient.appointmentNo.toString()), patientMRN: patient.patientMRN);
appointmentNo: int.parse(patient.appointmentNo.toString()),
patientMRN: patient.patientMRN);
await model.postEpisode(postEpisodeReqModel); await model.postEpisode(postEpisodeReqModel);
} }
@ -454,8 +407,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
patient.episodeNo = model.episodeID; patient.episodeNo = model.episodeID;
Navigator.of(context) Navigator.of(context).pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
} }
} }
} }
@ -469,12 +421,7 @@ class AvatarWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.08), offset: Offset(0.0, 5.0), blurRadius: 16.0)],
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)), borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
), ),

@ -1,6 +1,8 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -16,122 +18,50 @@ class ProfileGridForOther extends StatelessWidget {
final bool isFromLiveCare; final bool isFromLiveCare;
String from; String from;
String to; String to;
ProjectViewModel projectViewModel;
ProfileGridForOther( ProfileGridForOther({Key key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient, this.from, this.to, this.isFromLiveCare, this.projectViewModel}) : super(key: key);
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.height,
this.isInpatient,
this.from,
this.to,
this.isFromLiveCare})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<PatientProfileCardModel> cardsList = [ final List<PatientProfileCardModel> cardsList = [
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient),
TranslationBase.of(context).vital, PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient),
TranslationBase.of(context).signs, PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg',
VITAL_SIGN_DETAILS,
'assets/images/svgs/profile_screen/vital signs.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).result,
LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).lab,
TranslationBase.of(context).special,
ALL_SPECIAL_LAB_RESULT,
'assets/images/svgs/profile_screen/lab results.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg',
TranslationBase.of(context).radiology,
TranslationBase.of(context).service,
RADIOLOGY_PATIENT,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', ORDER_PRESCRIPTION_OLD,
TranslationBase.of(context).orders,
TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})',
ORDER_PRESCRIPTION_OLD,
'assets/images/svgs/profile_screen/order prescription.svg', 'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg',
TranslationBase.of(context).patient,
TranslationBase.of(context).prescription,
ORDER_PRESCRIPTION_NEW,
'assets/images/svgs/profile_screen/order prescription.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg',
TranslationBase.of(context).health,
TranslationBase.of(context).summary,
HEALTH_SUMMARY,
'assets/images/svgs/profile_screen/health summary.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient),
PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/insurance approval.svg',
TranslationBase.of(context).orders,
TranslationBase.of(context).procedures,
ORDER_PROCEDURE,
'assets/images/svgs/profile_screen/Order Procedures.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
PatientProfileCardModel( PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, 'assets/images/svgs/profile_screen/patient sick leave.svg',
TranslationBase.of(context).insurance,
TranslationBase.of(context).service,
PATIENT_INSURANCE_APPROVALS_NEW,
'assets/images/svgs/profile_screen/insurance approval.svg',
isInPatient: isInpatient),
PatientProfileCardModel(
TranslationBase.of(context).patientSick,
TranslationBase.of(context).leave,
ADD_SICKLEAVE,
'assets/images/svgs/profile_screen/patient sick leave.svg',
isInPatient: isInpatient), isInPatient: isInpatient),
if (isFromLiveCare || if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
(patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg',
PatientProfileCardModel( isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null : patient.patientStatusType != 43 || patient.appointmentNo == null),
TranslationBase.of(context).patient, if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
TranslationBase.of(context).ucaf,
PATIENT_UCAF_REQUEST,
'assets/images/svgs/profile_screen/UCAF.svg',
isInPatient: isInpatient,
isDisable: isFromLiveCare
? patient.appointmentNo == null
: patient.patientStatusType != 43 ||
patient.appointmentNo == null),
if (isFromLiveCare ||
(patient.appointmentNo != null && patient.appointmentNo != 0))
PatientProfileCardModel( PatientProfileCardModel(
TranslationBase.of(context).referral, TranslationBase.of(context).referral,
TranslationBase.of(context).patient, TranslationBase.of(context).patient,
REFER_PATIENT_TO_DOCTOR, REFER_PATIENT_TO_DOCTOR,
'assets/images/svgs/profile_screen/refer patient.svg', 'assets/images/svgs/profile_screen/refer patient.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isFromLiveCare isDisable: isFromLiveCare ? patient.appointmentNo == null : patient.patientStatusType != 43 || patient.appointmentNo == null,
? patient.appointmentNo == null
: patient.patientStatusType != 43 ||
patient.appointmentNo == null,
), ),
if (isFromLiveCare || if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0))
(patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg',
PatientProfileCardModel(
TranslationBase.of(context).admission,
TranslationBase.of(context).request,
PATIENT_ADMISSION_REQUEST,
'assets/images/svgs/profile_screen/admission req.svg',
isInPatient: isInpatient, isInPatient: isInpatient,
isDisable: isFromLiveCare isDisable:
? patient.appointmentNo == null Utils.isVidaPlusProject(projectViewModel, patient.projectId) || (isFromLiveCare ? patient.appointmentNo == null : patient.patientStatusType != 43) || patient.appointmentNo == null),
: patient.patientStatusType != 43 ||
patient.appointmentNo == null),
]; ];
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15),

@ -1,15 +1,18 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart';
import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../../../locator.dart'; import '../../../../locator.dart';
@ -20,23 +23,24 @@ class RadiologyDetailsPage extends StatelessWidget {
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
final bool isInpatient; final bool isInpatient;
final bool isVidaPlus;
RadiologyDetailsPage( RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType, this.isInpatient = false, this.isVidaPlus = false});
{Key key,
this.finalRadiology,
this.patient,
this.patientType,
this.arrivalType,
this.isInpatient = false});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<RadiologyViewModel>( return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getRadImageURL( onModelReady: (model) => model.getRadImageURL(
patient: patient, patient: patient,
projectId: finalRadiology.projectID, projectId: finalRadiology.projectID,
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo), invoiceType:finalRadiology.invoiceType,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID) ? finalRadiology.invoiceNo_VP : finalRadiology.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology.projectID,
),
),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
@ -99,11 +103,9 @@ class RadiologyDetailsPage extends StatelessWidget {
height: 80, height: 80,
width: double.maxFinite, width: double.maxFinite,
child: Container( child: Container(
margin: margin: EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12),
EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12),
child: AppButton( child: AppButton(
color: Color(0xffD02127), color: Color(0xffD02127),
disabled: finalRadiology.dIAPACSURL == "",
onPressed: () async { onPressed: () async {
await locator<AnalyticsService>().logEvent( await locator<AnalyticsService>().logEvent(
eventCategory: "RadiologyDetailsPage", eventCategory: "RadiologyDetailsPage",

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart';
import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart';
@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../../widgets/shared/errors/error_message.dart'; import '../../../../widgets/shared/errors/error_message.dart';
class RadiologyHomePage extends StatefulWidget { class RadiologyHomePage extends StatefulWidget {
@ -47,8 +48,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient, onModelReady: (model) => model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false),
patientType: patientType, isInPatient: false),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
@ -66,21 +66,17 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if (model.radiologyList.isNotEmpty && if (model.radiologyList.isNotEmpty && patient.patientStatusType != 43)
patient.patientStatusType != 43)
ServiceTitle( ServiceTitle(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
subTitle: TranslationBase.of(context).result, subTitle: TranslationBase.of(context).result,
), ),
if (patient.patientStatusType != null && if (patient.patientStatusType != null && patient.patientStatusType == 43)
patient.patientStatusType == 43)
ServiceTitle( ServiceTitle(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
subTitle: TranslationBase.of(context).result, subTitle: TranslationBase.of(context).result,
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder( AddNewOrder(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -96,6 +92,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
}, },
label: TranslationBase.of(context).applyForRadiologyOrder, label: TranslationBase.of(context).applyForRadiologyOrder,
), ),
///TODO Elham * fix this to be list view builder ///TODO Elham * fix this to be list view builder
...List.generate( ...List.generate(
model.radiologyList.length, model.radiologyList.length,
@ -117,43 +114,26 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
height: 160, height: 160,
decoration: BoxDecoration( decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545) //Colors.red[900] Color(0xff404545)
color: model.radiologyList[index] color: model.radiologyList[index].isLiveCareAppodynamicment
.isLiveCareAppodynamicment
? Colors.red[900] ? Colors.red[900]
: !model.radiologyList[index].isInOutPatient : !model.radiologyList[index].isInOutPatient
? Colors.black ? Colors.black
: Color(0xffa9a089), : Color(0xffa9a089),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
? Radius.circular(0) bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
: Radius.circular(8), topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomLeft: projectViewModel.isArabic bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)),
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0)),
), ),
child: RotatedBox( child: RotatedBox(
quarterTurns: 3, quarterTurns: 3,
child: Center( child: Center(
child: Text( child: Text(
model.radiologyList[index] model.radiologyList[index].isLiveCareAppodynamicment
.isLiveCareAppodynamicment ? TranslationBase.of(context).liveCare.toUpperCase()
? TranslationBase.of(context) : !model.radiologyList[index].isInOutPatient
.liveCare ? TranslationBase.of(context).inPatientLabel.toUpperCase()
.toUpperCase() : TranslationBase.of(context).outpatient.toUpperCase(),
: !model.radiologyList[index]
.isInOutPatient
? TranslationBase.of(context)
.inPatientLabel
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
)), )),
@ -161,28 +141,27 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
Expanded( Expanded(
child: DoctorCard( child: DoctorCard(
isNoMargin: true, isNoMargin: true,
doctorName: doctorName: Utils.convertToTitleCase(model.radiologyList[index].doctorName),
Utils.convertToTitleCase(model.radiologyList[index].doctorName), profileUrl: model.radiologyList[index].doctorImageURL,
profileUrl: invoiceNO: Utils.isVidaPlusProject(projectViewModel, model.radiologyList[index].projectID)
model.radiologyList[index].doctorImageURL, ? '${model.radiologyList[index].invoiceNo_VP}'
invoiceNO: : '${model.radiologyList[index].invoiceNo}',
'${model.radiologyList[index].invoiceNo}', // model.isRadiologyVIDAPlus ? '${model.radiologyList[index].invoiceNo}' : '${model.radiologyList[index].invoiceNo}',
branch: branch: '${model.radiologyList[index].projectName}',
'${model.radiologyList[index].projectName}', clinic: Utils.convertToTitleCase(model.radiologyList[index].clinicDescription),
clinic: appointmentDate: model.radiologyList[index].orderDate ?? model.radiologyList[index].reportDate,
Utils.convertToTitleCase(model.radiologyList[index].clinicDescription),
appointmentDate:
model.radiologyList[index].orderDate ??
model.radiologyList[index].reportDate,
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: RadiologyDetailsPage( page: RadiologyDetailsPage(
finalRadiology: finalRadiology: model.radiologyList[index],
model.radiologyList[index],
patient: patient, patient: patient,
isInpatient: isInpatient), isInpatient: isInpatient,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, model.radiologyList[index].projectID)
// false
// model.radiologyList[index].isRecordFromVidaPlus
),
), ),
); );
}, },
@ -191,8 +170,7 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
], ],
), ),
)), )),
if (model.radiologyList.isEmpty && if (model.radiologyList.isEmpty && patient.patientStatusType != 43)
patient.patientStatusType != 43)
Center( Center(
child: ErrorMessage( child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable, error: TranslationBase.of(context).noDataAvailable,

@ -2,19 +2,20 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/PatientType.dart'; import 'package:doctor_app_flutter/core/enum/PatientType.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referred_patient_model.dart'; import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referred_patient_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/utils/date-utils.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/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../../../routes.dart'; import '../../../../../routes.dart';
class ReferredPatientDetailScreen extends StatelessWidget { class ReferredPatientDetailScreen extends StatelessWidget {
@ -52,8 +53,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
(Utils.capitalize( (Utils.capitalize("${referredPatient.firstName} ${referredPatient.lastName}")),
"${referredPatient.firstName} ${referredPatient.lastName}")),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -70,19 +70,14 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
PatiantInformtion patient = PatiantInformtion patient = model.getPatientFromReferral(referredPatient);
model.getPatientFromReferral(referredPatient); Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient, "patient": patient,
"patientType": "1", "patientType": "1",
"isInpatient": "isInpatient": patientType == PatientType.IN_PATIENT,
patientType == PatientType.IN_PATIENT,
"arrivalType": "1", "arrivalType": "1",
"from": AppDateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
DateTime.now(), 'yyyy-MM-dd'), "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
child: Icon( child: Icon(
@ -97,19 +92,14 @@ class ReferredPatientDetailScreen extends StatelessWidget {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
PatiantInformtion patient = PatiantInformtion patient = model.getPatientFromReferral(referredPatient);
model.getPatientFromReferral(referredPatient); Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient, "patient": patient,
"patientType": "1", "patientType": "1",
"isInpatient": "isInpatient": patientType == PatientType.IN_PATIENT,
patientType == PatientType.IN_PATIENT,
"arrivalType": "1", "arrivalType": "1",
"from": AppDateUtils.convertDateToFormat( "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
DateTime.now(), 'yyyy-MM-dd'), "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'),
"to": AppDateUtils.convertDateToFormat(
DateTime.now(), 'yyyy-MM-dd'),
}); });
}, },
child: Column( child: Column(
@ -120,9 +110,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
referredPatient.gender == 1 referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -146,8 +134,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( AppText(
referredPatient.referralStatusDesc, referredPatient.referralStatusDesc,
@ -161,9 +148,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
: Colors.red[700], : Colors.red[700],
), ),
AppText( AppText(
AppDateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate, "dd MMM,yyyy"),
referredPatient.referralDate,
"dd MMM,yyyy"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
@ -172,20 +157,16 @@ class ReferredPatientDetailScreen extends StatelessWidget {
], ],
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).fileNumber,
.fileNumber,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
AppText( AppText(
@ -198,9 +179,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
], ],
), ),
AppText( AppText(
AppDateUtils.convertDateFromServerFormat( AppDateUtils.convertDateFromServerFormat(referredPatient.referralDate, "hh:mm a"),
referredPatient.referralDate,
"hh:mm a"),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier, fontSize: 1.8 * SizeConfig.textMultiplier,
@ -209,29 +188,25 @@ class ReferredPatientDetailScreen extends StatelessWidget {
], ],
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).refClinic}: ", "${TranslationBase.of(context).refClinic}: ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * fontSize: 1.7 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
referredPatient referredPatient.referralClinicDescription,
.referralClinicDescription,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 13, fontSize: 13,
@ -240,29 +215,21 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
], ],
), ),
if (referredPatient if (referredPatient.frequencyDescription != null)
.frequencyDescription !=
null)
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).frequency + ": ",
.frequency +
": ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.7 * fontSize: 1.7 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
referredPatient referredPatient.frequencyDescription,
.frequencyDescription,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 14, fontSize: 14,
@ -277,29 +244,19 @@ class ReferredPatientDetailScreen extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
referredPatient.nationalityName != referredPatient.nationalityName != null ? referredPatient.nationalityName : "",
null
? referredPatient.nationalityName
: "",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: fontSize: 1.4 * SizeConfig.textMultiplier,
1.4 * SizeConfig.textMultiplier,
), ),
referredPatient.nationalityFlagURL != referredPatient.nationalityFlagURL != null
null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius.circular(20.0),
child: Image.network( child: Image.network(
referredPatient referredPatient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: (BuildContext errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
context,
Object exception,
StackTrace stackTrace) {
return Text('No Image'); return Text('No Image');
}, },
)) ))
@ -311,16 +268,13 @@ class ReferredPatientDetailScreen extends StatelessWidget {
if (referredPatient.priorityDescription != null) if (referredPatient.priorityDescription != null)
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).priority + TranslationBase.of(context).priority + ": ",
": ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
AppText( AppText(
@ -335,33 +289,21 @@ class ReferredPatientDetailScreen extends StatelessWidget {
if (referredPatient.mAXResponseTime != null) if (referredPatient.mAXResponseTime != null)
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).maxResponseTime + ": ",
.maxResponseTime +
": ",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757), color: Color(0XFF575757),
), ),
Expanded( Expanded(
child: AppText( child: AppText(
referredPatient.mAXResponseTime != referredPatient.mAXResponseTime != null ? AppDateUtils.convertDateFromServerFormat(referredPatient.mAXResponseTime, "dd MMM,yyyy") : '',
null
? AppDateUtils
.convertDateFromServerFormat(
referredPatient
.mAXResponseTime,
"dd MMM,yyyy")
: '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: fontSize: 1.8 * SizeConfig.textMultiplier,
1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
), ),
@ -371,8 +313,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: margin: EdgeInsets.only(left: 10, right: 0),
EdgeInsets.only(left: 10, right: 0),
child: Image.asset( child: Image.asset(
'assets/images/patient/ic_ref_arrow_left.png', 'assets/images/patient/ic_ref_arrow_left.png',
height: 50, height: 50,
@ -380,34 +321,22 @@ class ReferredPatientDetailScreen extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0),
left: 0, padding: EdgeInsets.only(left: 4.0, right: 4.0),
top: 25, child: referredPatient.doctorImageURL != null
right: 0,
bottom: 0),
padding: EdgeInsets.only(
left: 4.0, right: 4.0),
child: referredPatient.doctorImageURL !=
null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius: BorderRadius.circular(20.0),
BorderRadius.circular(20.0),
child: Image.network( child: Image.network(
referredPatient.doctorImageURL, referredPatient.doctorImageURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
(BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image'); return Text('No Image');
}, },
)) ))
: Container( : Container(
child: Image.asset( child: Image.asset(
referredPatient.gender == 1 referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -415,30 +344,22 @@ class ReferredPatientDetailScreen extends StatelessWidget {
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 10, top: 30, right: 10, bottom: 0),
left: 10,
top: 30,
right: 10,
bottom: 0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).dr} ${referredPatient.referralDoctorName}", "${TranslationBase.of(context).dr} ${referredPatient.referralDoctorName}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: 1.5 * fontSize: 1.5 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Colors.black, color: Colors.black,
), ),
AppText( AppText(
referredPatient referredPatient.referralClinicDescription,
.referralClinicDescription,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 1.3 * fontSize: 1.3 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
], ],
@ -495,8 +416,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 0, top: 0, right: 4, bottom: 0),
left: 0, top: 0, right: 4, bottom: 0),
padding: EdgeInsets.only(left: 4.0, right: 4.0), padding: EdgeInsets.only(left: 4.0, right: 4.0),
child: referredPatient.doctorImageURL != null child: referredPatient.doctorImageURL != null
? ClipRRect( ? ClipRRect(
@ -505,17 +425,13 @@ class ReferredPatientDetailScreen extends StatelessWidget {
referredPatient.doctorImageURL, referredPatient.doctorImageURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: (BuildContext context, errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
Object exception,
StackTrace stackTrace) {
return Text('No Image'); return Text('No Image');
}, },
)) ))
: Container( : Container(
child: Image.asset( child: Image.asset(
referredPatient.gender == 1 referredPatient.gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png',
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -532,15 +448,11 @@ class ReferredPatientDetailScreen extends StatelessWidget {
color: Color(0XFF2E303A), color: Color(0XFF2E303A),
), ),
AppText( AppText(
referredPatient.referredDoctorRemarks == referredPatient.referredDoctorRemarks == null
null
? '' ? ''
: referredPatient.referredDoctorRemarks : referredPatient.referredDoctorRemarks.isNotEmpty
.isNotEmpty ? referredPatient.referredDoctorRemarks
? referredPatient : TranslationBase.of(context).notRepliedYet,
.referredDoctorRemarks
: TranslationBase.of(context)
.notRepliedYet,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 1.6 * SizeConfig.textMultiplier, fontSize: 1.6 * SizeConfig.textMultiplier,
@ -576,8 +488,7 @@ class ReferredPatientDetailScreen extends StatelessWidget {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast( DrAppToastMsg.showSuccesToast("Referral is acknowledged");
"Referral is acknowledged");
Navigator.pop(context); Navigator.pop(context);
} }
}, },

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

Loading…
Cancel
Save