Updates & fixes

development-3.3_voipCall
haroon amjad 3 years ago
parent 51a8a93de1
commit 5d4aeff350

@ -30,7 +30,7 @@ android {
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'

@ -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

@ -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,6 +143,7 @@ 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 = requireActivity().layoutInflater val layoutInflater = requireActivity().layoutInflater
this.parentView = onCreateView(layoutInflater, null) this.parentView = onCreateView(layoutInflater, null)

@ -38,6 +38,7 @@ 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|

@ -5,85 +5,125 @@ 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 BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";
const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
const GET_CLINICS_FOR_DOCTOR = 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PATIENT_GET_LIST_REFERAL_URL = "Services/Lists.svc/REST/GetList_STPReferralFrequency"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_GET_CLINIC_BY_PROJECT_URL = "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; const PATIENT_PROGRESS_NOTE_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_REFER_TO_DOCTOR_URL =
"Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
"Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";
const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital =
"Services/Doctors.svc/REST/SearchDoctorsByTime";
const GET_CLINICS_FOR_DOCTOR =
'Services/DoctorApplication.svc/REST/GetClinicsForDoctor';
const PATIENT_GET_LIST_REFERAL_URL =
"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 = 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; const GET_REFERRAL_FACILITIES =
'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 = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; const GET_PATIENT_VITAL_SIGN =
const GET_PATIENT_VITAL_SIGN_DATA = 'Services/DoctorApplication.svc/REST/GetVitalSigns'; 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_LAB_OREDERS = 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; const GET_PATIENT_VITAL_SIGN_DATA =
'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 = 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; const GET_LIVECARE_PENDINGLIST =
'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 = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL =
"Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/GetPrescriptionReport'; const GET_PRESCRIPTION_REPORT =
'Services/Patients.svc/REST/GetPrescriptionReport';
const GT_MY_PATIENT_QUESTION = 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; const GT_MY_PATIENT_QUESTION =
'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions';
const PRM_SEARCH_PATIENT = 'Services/Patients.svc/REST/GetPatientInformation_PRM'; const PRM_SEARCH_PATIENT =
'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 = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; const GET_MY_REFERRAL_PATIENT =
'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 = 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; const ADD_REFERRED_DOCTOR_REMARKS =
'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';
const GET_MY_REFERRED_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; const GET_MY_REFERRED_PATIENT =
'Services/DoctorApplication.svc/REST/GtMyReferredPatient';
const GET_MY_REFERRED_OUT_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; const GET_MY_REFERRED_OUT_PATIENT =
'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient';
const GET_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/PendingReferrals'; const GET_PENDING_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/PendingReferrals';
const CREATE_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/CreateReferral'; const CREATE_REFERRAL_PATIENT =
'Services/DoctorApplication.svc/REST/CreateReferral';
const RESPONSE_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/RespondReferral'; const RESPONSE_PENDING_REFERRAL_PATIENT =
'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 = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; const GET_DOCTOR_WORKING_HOURS_TABLE =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
const GET_PATIENT_LAB_RESULTS = 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; const GET_PATIENT_LAB_RESULTS =
'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 = 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; const INSERT_DEVICE_IMEI =
'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 = 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; const SELECT_DEVICE_IMEI =
'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI';
const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE =
'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP =
'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp';
const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = 'Services/DoctorApplication.svc/REST/SendVerificationCode'; const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN =
const MEMBER_CHECK_ACTIVATION_CODE_NEW = 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; 'Services/DoctorApplication.svc/REST/SendVerificationCode';
const MEMBER_CHECK_ACTIVATION_CODE_NEW =
'Services/Sentry.svc/REST/MemberCheckActivationCode_New';
const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP =
'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';
@ -91,179 +131,268 @@ 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 = 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; const GET_DASHBOARD =
const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI';
const ARRIVED_PATIENT_URL = 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const GET_SICKLEAVE_STATISTIC =
'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 = 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; const GET_COVERING_DOCTORS =
'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition';
const UPDATE_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PatchRequisition'; const UPDATE_RESCHDEULE =
const GET_RESCHEDULE_LEAVE = 'Services/DoctorApplication.svc/REST/GetRequisition'; 'Services/DoctorApplication.svc/REST/PatchRequisition';
const GET_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/GetPrescription'; const GET_RESCHEDULE_LEAVE =
'Services/DoctorApplication.svc/REST/GetRequisition';
const POST_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/PostPrescription'; const GET_PRESCRIPTION_LIST =
const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; '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_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_IN_PATIENT_LIST = 'Services/DoctorApplication.svc/REST/GetMyInPatient';
const Verify_Referral_Doctor_Remarks = 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient';
const Verify_Referral_Doctor_Remarks =
'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 = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; const GET_Patient_LAB_SPECIAL_RESULT =
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; const SEND_LAB_RESULT_EMAIL =
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription'; const GET_Patient_LAB_RESULT =
'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 = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; const POST_EPISODE_FOR_IN_PATIENT =
'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 = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; const POST_CHIEF_COMPLAINT =
const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote'; const POST_PHYSICAL_EXAM =
'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 = 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; const PATCH_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
const PATCH_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; const PATCH_PHYSICAL_EXAM =
const PATCH_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PatchProgressNote'; 'Services/DoctorApplication.svc/REST/PatchPhysicalExam';
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 = 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; const GET_CHIEF_COMPLAINT =
'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_CATEGORISE_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetProcedure'; const GET_LIST_CATEGORISE =
'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 = 'Services/DoctorApplication.svc/REST/PatchPrescription'; const UPDATE_PRESCRIPTION =
'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 = 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; const DRUG_TO_DRUG =
'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 = 'Services/DoctorApplication.svc/REST/GetRoomCategories'; const GET_ROOM_CATEGORIES =
const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; 'Services/DoctorApplication.svc/REST/GetRoomCategories';
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 = 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; const POST_ADMISSION_REQUEST =
const GET_ITEM_BY_MEDICINE = 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; 'Services/DoctorApplication.svc/REST/PostAdmissionRequest';
const GET_ITEM_BY_MEDICINE =
'Services/DoctorApplication.svc/REST/GetItemByMedicineCode';
const GET_PROCEDURE_VALIDATION = 'Services/DoctorApplication.svc/REST/ValidateProcedures'; const GET_PROCEDURE_VALIDATION =
const GET_BOX_QUANTITY = 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; 'Services/DoctorApplication.svc/REST/ValidateProcedures';
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 = "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; const GET_MY_REFERRAL_INPATIENT =
"Services/DoctorApplication.svc/REST/GtMyReferralPatient";
const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; const GET_MY_REFERRAL_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient";
const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; const GET_MY_DISCHARGE_PATIENT =
const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; const GET_PAtIENTS_INSURANCE_APPROVALS =
"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 = 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; const GET_IN_PATIENT_ORDERS =
'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions ///Prescriptions
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; const GET_PRESCRIPTIONS_ALL_ORDERS =
const GET_PRESCRIPTION_REPORT_NEW = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; const GET_PRESCRIPTION_REPORT_NEW =
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; const SEND_PRESCRIPTION_EMAIL =
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; 'Services/Notifications.svc/REST/SendPrescriptionEmail';
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 = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient";
const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport"; const PATIENT_MEDICAL_REPORT_GET_LIST =
const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID"; "Services/Patients.svc/REST/DAPP_ListMedicalReport";
const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; const PATIENT_MEDICAL_REPORT_GET_TEMPLATE =
const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; "Services/Patients.svc/REST/DAPP_GetTemplateByID";
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 = 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; const GET_PROCEDURE_TEMPLETE =
'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 = "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; const GET_PROCEDURE_TEMPLETE_DETAILS =
const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet";
const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP =
'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp';
const DOCTOR_CHECK_HAS_LIVE_CARE = "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; const DOCTOR_CHECK_HAS_LIVE_CARE =
"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 = "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; const ADD_REFERRED_REMARKS_NEW =
const GET_SPECIAL_CLINICAL_CARE_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New";
const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; const GET_SPECIAL_CLINICAL_CARE_LIST =
"Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList";
const INSERT_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST =
"Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList";
const UPDATE_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_UpdateMedicalReport";
const GET_SICK_LEAVE_DOCTOR_APP = "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; const INSERT_MEDICAL_REPORT =
"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 = "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; const CREATE_DOCTOR_RESPONSE =
const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; "Services/DoctorApplication.svc/REST/CreateDoctorResponse";
const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; const GET_DOCTOR_NOT_REPLIED_COUNTS =
const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts";
const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; const ALL_SPECIAL_LAB_RESULT =
"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 = "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; const GET_RESERVATIONS =
const GET_OPERATION_DETAILS = "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails"; "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails";
const UPDATE_OPERATION_REPORT = "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport"; const GET_OPERATION_DETAILS =
"Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails";
const UPDATE_OPERATION_REPORT =
"Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport";
const NURSING_PROGRESS_NOTE = "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; const NURSING_PROGRESS_NOTE =
const GET_DIAGNOSIS_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient"; "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote";
const GET_DIAGNOSIS_FOR_IN_PATIENT =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient";
const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; const GET_DIABETIC_CHART_VALUES =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues";
const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; const GET_PENDING_ORDERS =
"Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient";
const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; const GET_ADMISSION_ORDERS =
"/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders";
///Patient Registration Services ///Patient Registration Services
const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration"; const CHECK_PATIENT_FOR_REGISTRATION =
const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; "Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_ACTIVATION_CODE_FOR_PATIENT = "Services/Authentication.svc/REST/CheckActivationCode"; const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION =
const PATIENT_REGISTRATION = "Services/Authentication.svc/REST/PatientRegistration"; "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration";
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 = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; const GET_PENDING_DISCHARGE_SUMMARY =
const GET_ALL_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary";
const GET_ALL_DISCHARGE_SUMMARY =
"Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary";
const VTE_ASSESSMENT =
"Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo";
const VTE_ASSESSMENT = "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; const GET_INTERVENTION_MEDICATION =
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications";
const GET_INTERVENTION_MEDICATION = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; const GET_INTERVENTION_MEDICATION_HISTORY =
"Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory";
const GET_INTERVENTION_MEDICATION_HISTORY = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; const SET_ACCEPTED_OR_REJECTED =
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
const SET_ACCEPTED_OR_REJECTED = "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; const GET_STP_MASTER_LIST =
"Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
const GET_STP_MASTER_LIST = "Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment"; const DOCTOR_ER_SIGN_ASSESSMENT =
"Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment";
var selectedPatientType = 1; var selectedPatientType = 1;
@ -288,8 +417,26 @@ var SERVICES_PATIANT2 = [
"List_MyReferralPatient", "List_MyReferralPatient",
"patientArrivalList" "patientArrivalList"
]; ];
var SERVICES_PATIANT_HEADER = ["My OutPatient", "My InPatient", "Discharge", "Referred", "Referral Discharge", "Tomorrow", "Referral", "Arrival Patient"]; var SERVICES_PATIANT_HEADER = [
var SERVICES_PATIANT_HEADER_AR = ["المريض الخارجي", "المريض المنوم", "المريض المعافى", "المريض المحول الي", "المريض المحال المعافى", "مريض الغد", "المريض المحول مني", "المريض الواصل"]; "My OutPatient",
"My InPatient",
"Discharge",
"Referred",
"Referral Discharge",
"Tomorrow",
"Referral",
"Arrival Patient"
];
var SERVICES_PATIANT_HEADER_AR = [
"المريض الخارجي",
"المريض المنوم",
"المريض المعافى",
"المريض المحول الي",
"المريض المحال المعافى",
"مريض الغد",
"المريض المحول مني",
"المريض الواصل"
];
const PRIMARY_COLOR = 0xff515B5D; const PRIMARY_COLOR = 0xff515B5D;
@ -297,7 +444,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.9; const VERSION_ID = 8.6;
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;
@ -309,6 +456,7 @@ 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;
@ -317,6 +465,7 @@ class AppGlobal {
static Color appRedColor = Color(0xFFD02127); static Color appRedColor = Color(0xFFD02127);
static Color appGreenColor = Color(0xFF359846); static Color appGreenColor = Color(0xFF359846);
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": "إعادة جدولة"},

@ -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;
} }
} }

@ -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
kToken: startCallRes.openTokenID,
kSessionId: startCallRes.openSessionID,
kApiKey: '46209962', kApiKey: '46209962',
// kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
// kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", // kToken: startCallRes.openTokenID,
// kApiKey:'47247954', // kSessionId: startCallRes.openSessionID,
kToken: "T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9NjM4ZjgxNmFjZjI0ODU2YTk0YTMwMGIxMjFkNmZlY2E5OGJlYWNlZDpzZXNzaW9uX2lkPTJfTVg0ME5qSXdPVGsyTW41LU1UWTNNek0xTURFMk1qSTNPWDVZT0RGMWFVdElaRWRWVldGTlVGYzNObFYxVERWNFRFbC1mbjQmY3JlYXRlX3RpbWU9MTY3MzM1MDE2MiZub25jZT0wLjE5OTUyMjMwNzIyMDAyODczJnJvbGU9bW9kZXJhdG9yJmV4cGlyZV90aW1lPTE2NzM0MzY1NjImaW5pdGlhbF9sYXlvdXRfY2xhc3NfbGlzdD0=",
kSessionId: "2_MX40NjIwOTk2Mn5-MTY3MzM1MDE2MjI3OX5YODF1aUtIZEdVVWFNUFc3NlV1TDV4TEl-fn4",
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));

@ -26,6 +26,8 @@ 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: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:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:local_auth/auth_strings.dart'; // import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
@ -41,13 +43,20 @@ class AuthenticationViewModel extends BaseViewModel {
NewLoginInformationModel get loginInfo => _authService.loginInfo; NewLoginInformationModel get loginInfo => _authService.loginInfo;
List<DoctorProfileModel> get doctorProfilesList => _authService.doctorProfilesList; List<DoctorProfileModel> get doctorProfilesList =>
_authService.doctorProfilesList;
SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _authService.activationCodeVerificationScreenRes; SendActivationCodeForDoctorAppResponseModel
get activationCodeVerificationScreenRes =>
_authService.activationCodeVerificationScreenRes;
SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _authService.activationCodeForDoctorAppRes; SendActivationCodeForDoctorAppResponseModel
get activationCodeForDoctorAppRes =>
_authService.activationCodeForDoctorAppRes;
CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _authService.checkActivationCodeForDoctorAppRes; CheckActivationCodeForDoctorAppResponseModel
get checkActivationCodeForDoctorAppRes =>
_authService.checkActivationCodeForDoctorAppRes;
NewLoginInformationModel loggedUser; NewLoginInformationModel loggedUser;
GetIMEIDetailsModel user; GetIMEIDetailsModel user;
@ -62,6 +71,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();
@ -81,20 +91,32 @@ 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'] = loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; profileInfo['MobileNo'] =
InsertIMEIDetailsModel insertIMEIDetailsModel = InsertIMEIDetailsModel.fromJson(profileInfo); loggedIn != null ? loggedIn['MobileNumber'] : user.mobile;
insertIMEIDetailsModel.genderDescription = profileInfo['Gender_Description']; InsertIMEIDetailsModel insertIMEIDetailsModel =
insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; InsertIMEIDetailsModel.fromJson(profileInfo);
insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; insertIMEIDetailsModel.genderDescription =
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 = profileInfo['Title_DescriptionN']; insertIMEIDetailsModel.titleDescriptionN =
profileInfo['Title_DescriptionN'];
insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID); insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID);
insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user.doctorID; insertIMEIDetailsModel.doctorID = loggedIn != null
insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA; ? loggedIn['List_MemberInformation'][0]['MemberID']
insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); : user.doctorID;
insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); insertIMEIDetailsModel.outSA =
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 : int.parse(user.editedBy.toString()); insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID
: int.parse(user.editedBy.toString());
await _authService.insertDeviceImei(insertIMEIDetailsModel); await _authService.insertDeviceImei(insertIMEIDetailsModel);
if (_authService.hasError) { if (_authService.hasError) {
@ -122,22 +144,25 @@ class AuthenticationViewModel extends BaseViewModel {
} }
/// send activation code for for msg methods /// send activation code for for msg methods
Future sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async { Future sendActivationCodeVerificationScreen(
AuthMethodTypes authMethodType) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
ActivationCodeForVerificationScreenModel activationCodeModel = ActivationCodeForVerificationScreenModel( ActivationCodeForVerificationScreenModel activationCodeModel =
iMEI: user.iMEI, ActivationCodeForVerificationScreenModel(
facilityId: user.projectID, iMEI: user.iMEI,
memberID: user.doctorID, facilityId: user.projectID,
loginDoctorID: int.parse(user.editedBy.toString()), memberID: user.doctorID,
zipCode: user.outSA == true ? '971' : '966', loginDoctorID: int.parse(user.editedBy.toString()),
mobileNumber: user.mobile, zipCode: user.outSA == true ? '971' : '966',
oTPSendType: authMethodType.getTypeIdService(), mobileNumber: user.mobile,
isMobileFingerPrint: 1, oTPSendType: authMethodType.getTypeIdService(),
vidaAuthTokenID: user.vidaAuthTokenID, isMobileFingerPrint: 1,
vidaRefreshTokenID: user.vidaRefreshTokenID); vidaAuthTokenID: user.vidaAuthTokenID,
vidaRefreshTokenID: user.vidaRefreshTokenID);
await sharedPref.setString(DOCTOR_ID, user.editedBy.toString()); await sharedPref.setString(DOCTOR_ID, user.editedBy.toString());
await _authService.sendActivationCodeVerificationScreen(activationCodeModel); await _authService
.sendActivationCodeVerificationScreen(activationCodeModel);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -146,7 +171,8 @@ class AuthenticationViewModel extends BaseViewModel {
} }
/// send activation code for silent login /// send activation code for silent login
Future sendActivationCodeForDoctorApp({AuthMethodTypes authMethodType, String password}) async { Future sendActivationCodeForDoctorApp(
{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(
@ -161,46 +187,59 @@ class AuthenticationViewModel extends BaseViewModel {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await sharedPref.setString(TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID); await sharedPref.setString(
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({String activationCode, bool isSilentLogin = false}) async { Future checkActivationCodeForDoctorApp(
{String activationCode, bool isSilentLogin = false}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel( CheckActivationCodeRequestModel checkActivationCodeForDoctorApp =
zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, new CheckActivationCodeRequestModel(
mobileNumber: loggedUser != null ? loggedUser.mobileNumber : user.mobile, zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode,
projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user.projectID, mobileNumber:
logInTokenID: await sharedPref.getString(TOKEN), loggedUser != null ? loggedUser.mobileNumber : user.mobile,
activationCode: activationCode ?? '0000', projectID: await sharedPref.getInt(PROJECT_ID) != null
memberID: userInfo.userID != null ? int.parse(userInfo.userID) : user.doctorID, ? await sharedPref.getInt(PROJECT_ID)
password: userInfo.password, : user.projectID,
facilityId: userInfo.projectID != null ? userInfo.projectID.toString() : user.projectID.toString(), logInTokenID: await sharedPref.getString(TOKEN),
oTPSendType: await sharedPref.getInt(OTP_TYPE), activationCode: activationCode ?? '0000',
iMEI: localToken, memberID: userInfo.userID != null
loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID : int.parse(user.editedBy.toString()), ? int.parse(userInfo.userID)
: user.doctorID,
///loggedUser.listMemberInformation[0].employeeID, password: userInfo.password,
// loggedUser.listMemberInformation[0].employeeID, facilityId: userInfo.projectID != null
isForSilentLogin: isSilentLogin, ? userInfo.projectID.toString()
generalid: "Cs2020@2016\$2958"); : user.projectID.toString(),
await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); oTPSendType: await sharedPref.getInt(OTP_TYPE),
iMEI: localToken,
loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID
: int.parse(user.editedBy.toString()),///loggedUser.listMemberInformation[0].employeeID,
// loggedUser.listMemberInformation[0].employeeID,
isForSilentLogin: isSilentLogin,
generalid: "Cs2020@2016\$2958");
await _authService
.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await setDataAfterSendActivationSuccess(checkActivationCodeForDoctorAppRes); await setDataAfterSendActivationSuccess(
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;
@ -231,11 +270,16 @@ 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(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) async { setDataAfterSendActivationSuccess(
CheckActivationCodeForDoctorAppResponseModel
sendActivationCodeForDoctorAppResponseModel) async {
// print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
await sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); await sharedPref.setString(VIDA_AUTH_TOKEN_ID,
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
await sharedPref.setString(TOKEN, sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); await sharedPref.setString(VIDA_REFRESH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID);
await sharedPref.setString(TOKEN,
sendActivationCodeForDoctorAppResponseModel.authenticationTokenID);
} }
saveObjToString(String key, value) async { saveObjToString(String key, value) async {
@ -244,23 +288,21 @@ class AuthenticationViewModel extends BaseViewModel {
/// ask user to add his biometric /// ask user to add his biometric
showIOSAuthMessages() async { showIOSAuthMessages() async {
//TODO FOR UPGRADE NEED TO BE TESTED FIRST const iosStrings = const IOSAuthMessages(
cancelButton: 'cancel',
// const iosStrings = const IOSAuthMessages( goToSettingsButton: 'settings',
// cancelButton: 'cancel', goToSettingsDescription: 'Please set up your Touch ID.',
// goToSettingsButton: 'settings', lockOut: 'Please Enable Your Touch ID');
// goToSettingsDescription: 'Please set up your Touch ID.',
// lockOut: 'Please Enable Your Touch ID'); try {
await auth.authenticateWithBiometrics(
// try { localizedReason: 'Scan your fingerprint to authenticate',
// await auth.authenticateWithBiometrics( useErrorDialogs: true,
// localizedReason: 'Scan your fingerprint to authenticate', stickyAuth: true,
// useErrorDialogs: true, iOSAuthStrings: iosStrings);
// stickyAuth: true, } on PlatformException catch (e) {
// // iOSAuthStrings: iosStrings); DrAppToastMsg.showErrorToast(e.toString());
// } on PlatformException catch (e) { }
// DrAppToastMsg.showErrorToast(e.toString());
// }
} }
/// add profile to base view model super class /// add profile to base view model super class
@ -270,7 +312,12 @@ 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(doctorID: clinicInfo.doctorID, clinicID: clinicInfo.clinicID, license: true, projectID: clinicInfo.projectID, languageID: 2); ProfileReqModel docInfo = new ProfileReqModel(
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);
@ -285,12 +332,17 @@ 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(TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID); sharedPref.setString(
if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) { TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID);
localSetDoctorProfile(checkActivationCodeForDoctorAppRes.listDoctorProfile[0]); if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null &&
checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) {
localSetDoctorProfile(
checkActivationCodeForDoctorAppRes.listDoctorProfile[0]);
} else { } else {
sharedPref.setObj(CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic); sharedPref.setObj(
ClinicModel clinic = ClinicModel.fromJson(checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson()); CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic);
ClinicModel clinic = ClinicModel.fromJson(
checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson());
await getDoctorProfileBasedOnClinic(clinic); await getDoctorProfileBasedOnClinic(clinic);
} }
} }
@ -316,14 +368,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;
@ -334,8 +401,10 @@ 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(LAST_LOGIN_USER, _authService.dashboardItemsList[0]); sharedPref.setObj(
await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID); LAST_LOGIN_USER, _authService.dashboardItemsList[0]);
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;
} }

@ -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,150 +220,90 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
), ),
], ],
) )
: Column( : Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
mainAxisAlignment: MainAxisAlignment.spaceEvenly, this.onlySMSBox == false
crossAxisAlignment: CrossAxisAlignment.start, ? Container(
children: <Widget>[ margin: EdgeInsets.only(bottom: 20, top: 30),
this.onlySMSBox == false child: AppText(
? Container( TranslationBase.of(context).verifyLoginWith,
margin: EdgeInsets.only( fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
bottom: 20, top: 30), color: Color(0xFF2E303A),
child: AppText( fontWeight: FontWeight.bold,
TranslationBase.of(context) textAlign: TextAlign.left,
.verifyLoginWith, ),
fontSize: SizeConfig )
.getTextMultiplierBasedOnWidth() * : AppText(
4, TranslationBase.of(context).verifyFingerprint2,
color: Color(0xFF2E303A), fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontWeight: FontWeight.bold, textAlign: TextAlign.start,
textAlign: TextAlign.left, ),
), ]),
) authenticationViewModel.user != null && isMoreOption == false
: AppText( ? Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
TranslationBase.of(context) Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
.verifyFingerprint2, Expanded(
fontSize: SizeConfig child: InkWell(
.getTextMultiplierBasedOnWidth() * onTap: () => {
4, print("Fingerprint"),
textAlign: TextAlign.start, // TODO check this logic it seem it will create bug to us
), authenticateUser(AuthMethodTypes.Fingerprint, true)
]), },
authenticationViewModel.user != null && child: VerificationMethodsList(
isMoreOption == false authenticationViewModel: authenticationViewModel,
? Column( authMethodType: SelectedAuthMethodTypesService.getMethodsTypeService(authenticationViewModel.user.logInTypeID),
mainAxisAlignment: MainAxisAlignment.start, authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
crossAxisAlignment: CrossAxisAlignment.start, )),
children: <Widget>[ ),
Row( Expanded(
mainAxisAlignment: child: VerificationMethodsList(
MainAxisAlignment.center, authenticationViewModel: authenticationViewModel,
authMethodType: AuthMethodTypes.MoreOptions,
onShowMore: () {
setState(() {
isMoreOption = true;
});
},
))
]),
])
: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: InkWell( child: VerificationMethodsList(
onTap: () => { authenticationViewModel: authenticationViewModel,
// TODO check this logic it seem it will create bug to us authMethodType: AuthMethodTypes.Fingerprint,
authenticateUser( authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
AuthMethodTypes )),
.Fingerprint,
true)
},
child: VerificationMethodsList(
authenticationViewModel:
authenticationViewModel,
authMethodType:
SelectedAuthMethodTypesService
.getMethodsTypeService(
authenticationViewModel
.user
.logInTypeID),
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.MoreOptions,
onShowMore: () {
setState(() {
isMoreOption = true;
});
},
)) ))
]), ],
]) )
: Column( : SizedBox(),
mainAxisAlignment: MainAxisAlignment.start, Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
onlySMSBox == false Expanded(
? Row( child: VerificationMethodsList(
mainAxisAlignment: authenticationViewModel: authenticationViewModel,
MainAxisAlignment.center, authMethodType: AuthMethodTypes.SMS,
children: <Widget>[ authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
Expanded( )),
child: VerificationMethodsList( Expanded(
authenticationViewModel: child: VerificationMethodsList(
authenticationViewModel, authenticationViewModel: authenticationViewModel,
authMethodType: authMethodType: AuthMethodTypes.WhatsApp,
AuthMethodTypes.Fingerprint, authenticateUser: (AuthMethodTypes authMethodType, isActive) => authenticateUser(authMethodType, isActive),
authenticateUser: (AuthMethodTypes ))
authMethodType, ],
isActive) => ),
authenticateUser( ]),
authMethodType, isActive),
)),
Expanded(
child: VerificationMethodsList(
authenticationViewModel:
authenticationViewModel,
authMethodType:
AuthMethodTypes.FaceID,
authenticateUser: (AuthMethodTypes
authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
))
],
)
: SizedBox(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: VerificationMethodsList(
authenticationViewModel:
authenticationViewModel,
authMethodType: AuthMethodTypes.SMS,
authenticateUser:
(AuthMethodTypes authMethodType,
isActive) =>
authenticateUser(
authMethodType, isActive),
)),
Expanded(
child: VerificationMethodsList(
authenticationViewModel:
authenticationViewModel,
authMethodType:
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);

@ -361,7 +361,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage>
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
planNote: patientProgressNote.planNote, planNote: patientProgressNote.planNote,
doctorID: '', doctorID: widget.patientInfo.doctorId,
editedBy: ''); editedBy: '');
if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) {

@ -0,0 +1,296 @@
import 'package:doctor_app_flutter/core/model/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
class LineChartCurvedBloodPressureNew extends StatelessWidget {
final String title;
final List<TimeSeriesSales2> timeSeries1;
final List<TimeSeriesSales2> timeSeries2;
final int indexes;
final bool isOX;
LineChartCurvedBloodPressureNew({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.isOX = false});
List<int> xAxixs = List();
List<double> yAxixs = List();
@override
Widget build(BuildContext context) {
getXaxix();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Stack(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.only(
left: 20,
right: 20,
),
child: Text(
title,
style: TextStyle(
color: Colors.black,
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
textAlign: TextAlign.start,
),
),
SizedBox(
height: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Container(
width: 16,
height: 16,
decoration: containerRadius(Theme.of(context).primaryColor, 100),
),
SizedBox(
width: 5,
),
Text(
TranslationBase.of(context).systolicLng,
style: TextStyle(
color: Colors.black,
fontSize: 12,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
],
),
SizedBox(
width: 15,
),
Row(
children: [
Container(
width: 16,
height: 16,
decoration: containerRadius(Color(0xFFD02127), 100),
),
SizedBox(
width: 5,
),
Text(
TranslationBase.of(context).diastolicLng,
style: TextStyle(
color: Colors.black,
fontSize: 12,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
],
),
],
),
const SizedBox(
height: 12,
),
],
),
],
),
),
);
}
getXaxix() {
for (int index = 0; index < timeSeries1.length; index++) {
int mIndex = indexes * index;
if (mIndex < timeSeries1.length) {
xAxixs.add(mIndex);
}
}
}
LineChartData sampleData1(context) {
return LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white,
),
touchCallback: (touchEvent, LineTouchResponse touchResponse) {},
handleBuiltInTouches: true,
),
gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14),
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
getTextStyles: (cxt, value) => const TextStyle(
color: Colors.black,
fontSize: 10,
),
rotateAngle: -65,
margin: 22,
getTitles: (value) {
if (timeSeries1.length < 15) {
if (timeSeries1.length > value.toInt()) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0) 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())) {
return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}';
}
}
return '';
},
),
leftTitles: SideTitles(
showTitles: true,
getTextStyles: (cxt, value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
),
interval: getMaxY() - getMinY() <= 500
? 50
: getMaxY() - getMinY() <= 1000
? 100
: 200,
margin: 12,
),
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom: BorderSide(
color: Colors.black,
width: 0.5,
),
left: BorderSide(
color: Colors.black,
),
right: BorderSide(
color: Colors.black,
),
top: BorderSide(
color: Colors.transparent,
),
),
),
minX: 0,
maxX: (timeSeries1.length - 1).toDouble(),
maxY: getMaxY() + 15,
minY: getMinY() - 15,
lineBarsData: getData(context),
);
}
double getMaxY() {
double max = 0;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble();
}
double getMinY() {
double min = timeSeries1[0].sales;
timeSeries1.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
timeSeries2.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
});
int value = min.toInt();
return value.toDouble();
}
List<LineChartBarData> getData(context) {
List<FlSpot> spots = List();
for (int index = 0; index < timeSeries1.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales));
}
List<FlSpot> spots2 = List();
for (int index = 0; index < timeSeries2.length; index++) {
spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales));
}
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Colors.red],
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
final LineChartBarData lineChartBarData2 = LineChartBarData(
spots: spots2,
isCurved: true,
colors: [Theme.of(context).primaryColor],
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
belowBarData: BarAreaData(
show: false,
),
);
return [lineChartBarData1, lineChartBarData2];
}
Decoration containerRadius(Color background, double radius) {
return BoxDecoration(
color: background,
border: Border.all(
width: 1, //
color: background // <--- border width here
),
borderRadius: BorderRadius.circular(radius),
);
}
}

@ -1,9 +1,9 @@
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/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart';
import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.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/vital_sign/vital_sign_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart';
@ -20,8 +20,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
int projectID; int projectID;
bool isNotOneAppointment; bool isNotOneAppointment;
VitalSignDetailsScreen( VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true});
{this.appointmentNo, this.projectID, this.isNotOneAppointment = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,8 +35,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
String assetBasePath = "${imageBasePath}patient/vital_signs/"; String assetBasePath = "${imageBasePath}patient/vital_signs/";
return BaseView<VitalSignsViewModel>( return BaseView<VitalSignsViewModel>(
onModelReady: (model) => onModelReady: (model) => model.getPatientVitalSignHistory(patient, from, to, isInpatient),
model.getPatientVitalSignHistory(patient, from, to, isInpatient),
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
baseViewModel: mode, baseViewModel: mode,
isShowAppBar: true, isShowAppBar: true,
@ -76,8 +74,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.height * 0.23, height: MediaQuery.of(context).size.height * 0.23,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
horizontal: 16.0, vertical: 8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
color: Colors.white, color: Colors.white,
@ -101,17 +98,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 1 mode.getBMIStatus() != 1 ? '${assetBasePath}underweight_BMI.png' : '${assetBasePath}underweight_BMI-r.png',
? '${assetBasePath}underweight_BMI.png' height: MediaQuery.of(context).size.height * 0.10,
: '${assetBasePath}underweight_BMI-r.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -119,38 +110,26 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).bmiUnderWeight}", "${TranslationBase.of(context).bmiUnderWeight}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null,
color: mode.getBMIStatus() == 1
? Color(0XFFD02127)
: null,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
"(<18.5)", "(<18.5)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15, color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null,
color: mode.getBMIStatus() == 1
? Color(0XFFD02127)
: null,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
], ],
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 2 mode.getBMIStatus() != 2 ? '${assetBasePath}health_BMI.png' : '${assetBasePath}health_BMI-r.png',
? '${assetBasePath}health_BMI.png' height: MediaQuery.of(context).size.height * 0.10,
: '${assetBasePath}health_BMI-r.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -159,40 +138,27 @@ class VitalSignDetailsScreen extends StatelessWidget {
child: AppText( child: AppText(
"${TranslationBase.of(context).normal}", "${TranslationBase.of(context).normal}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier *
1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2 color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
), ),
AppText( AppText(
"(18.5-24.9)", "(18.5-24.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2 color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
], ],
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 3 mode.getBMIStatus() != 3 ? '${assetBasePath}ovrweight_BMI.png' : '${assetBasePath}ovrweight_BMI-r.png',
? '${assetBasePath}ovrweight_BMI.png' height: MediaQuery.of(context).size.height * 0.10,
: '${assetBasePath}ovrweight_BMI-r.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -200,38 +166,26 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).bmiOverWeight}", "${TranslationBase.of(context).bmiOverWeight}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.155,
SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3 color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
AppText( AppText(
"(25-29.9)", "(25-29.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.155,
SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3 color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
], ],
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 4 mode.getBMIStatus() != 4 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png',
? '${assetBasePath}Obese_BMI.png' height: MediaQuery.of(context).size.height * 0.10,
: '${assetBasePath}Obese_BMI-r.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -239,38 +193,26 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).bmiObese}", "${TranslationBase.of(context).bmiObese}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
AppText( AppText(
"(30-34.9)", "(30-34.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
], ],
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 5 mode.getBMIStatus() != 5 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png',
? '${assetBasePath}Obese_BMI.png' height: MediaQuery.of(context).size.height * 0.10,
: '${assetBasePath}Obese_BMI-r.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -280,24 +222,17 @@ class VitalSignDetailsScreen extends StatelessWidget {
child: AppText( child: AppText(
"${TranslationBase.of(context).bmiObeseExtreme}", "${TranslationBase.of(context).bmiObeseExtreme}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier *
1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 5 color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
), ),
AppText( AppText(
"(35<)", "(35<)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: fontSize: SizeConfig.textMultiplier * 1.15,
SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 5 color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) : null,
? Color(0XFFD02127)
: null,
), ),
], ],
)), )),
@ -309,8 +244,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16),
horizontal: 16.0, vertical: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -326,16 +260,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.Height,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).height,
.Height, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.height,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -345,40 +273,28 @@ class VitalSignDetailsScreen extends StatelessWidget {
: null, : null,
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).height,
.height, imagePath: "${assetBasePath}height.png",
imagePath:
"${assetBasePath}height.png",
lastVal: mode.heightCm, lastVal: mode.heightCm,
unit: TranslationBase.of(context) unit: TranslationBase.of(context).cm,
.cm,
), ),
), ),
), ),
if (isNotOneAppointment) if (isNotOneAppointment)
InkWell( InkWell(
onTap: () async { onTap: () async {
await locator<AnalyticsService>() await locator<AnalyticsService>().logEvent(
.logEvent( eventCategory: "Vital Sign Details Screen",
eventCategory: eventAction: "Vital Sign Details",
"Vital Sign Details Screen",
eventAction:
"Vital Sign Details",
); );
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.Weight,
pageKey: pageTitle: TranslationBase.of(context).weight,
vitalSignDetails.Weight, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.weight,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -387,12 +303,9 @@ class VitalSignDetailsScreen extends StatelessWidget {
); );
}, },
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).weight,
.weight, imagePath: "${assetBasePath}weight.png",
imagePath: unit: TranslationBase.of(context).kg,
"${assetBasePath}weight.png",
unit: TranslationBase.of(context)
.kg,
lastVal: mode.weightKg, lastVal: mode.weightKg,
), ),
), ),
@ -401,16 +314,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.Temperature,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).temperature,
.Temperature, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.temperature,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -420,13 +327,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
: null, : null,
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).temperature,
.temperature, imagePath: "${assetBasePath}temperature.png",
imagePath:
"${assetBasePath}temperature.png",
lastVal: mode.temperatureCelcius, lastVal: mode.temperatureCelcius,
unit: TranslationBase.of(context) unit: TranslationBase.of(context).tempC,
.tempC,
), ),
), ),
), ),
@ -435,16 +339,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.heart,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).heart,
.heart, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.heart,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -453,13 +351,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).heart,
.heart, imagePath: "${assetBasePath}heart_rate.png",
imagePath:
"${assetBasePath}heart_rate.png",
lastVal: mode.hartRat, lastVal: mode.hartRat,
unit: unit: TranslationBase.of(context).bpm,
TranslationBase.of(context).bpm,
), ),
), ),
InkWell( InkWell(
@ -467,16 +362,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.Respiration,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).respirationRate,
.Respiration, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.respirationRate,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -485,14 +374,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).respirationRate,
.respirationRate, imagePath: "${assetBasePath}respiration_rate.png",
imagePath: lastVal: mode.respirationBeatPerMinute,
"${assetBasePath}respiration_rate.png", unit: TranslationBase.of(context).respirationSigns,
lastVal:
mode.respirationBeatPerMinute,
unit: TranslationBase.of(context)
.respirationSigns,
), ),
), ),
InkWell( InkWell(
@ -500,31 +385,24 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.BloodPressure,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).bloodPressure,
.BloodPressure, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.bloodPressure,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
viewKey1: 'BloodPressureHigher',
viewKey2: 'BloodPressureLower',
), ),
), ),
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).bloodPressure,
.bloodPressure, imagePath: "${assetBasePath}blood_pressure.png",
imagePath:
"${assetBasePath}blood_pressure.png",
lastVal: mode.bloodPressure, lastVal: mode.bloodPressure,
unit: TranslationBase.of(context) unit: TranslationBase.of(context).sysDias,
.sysDias,
), ),
), ),
InkWell( InkWell(
@ -532,16 +410,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.Oxygenation,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).oxygenation,
.Oxygenation, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.oxygenation,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -550,10 +422,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).oxygenation,
.oxygenation, imagePath: "${assetBasePath}oxg.png",
imagePath:
"${assetBasePath}oxg.png",
lastVal: "${mode.oxygenation}%", lastVal: "${mode.oxygenation}%",
unit: "", unit: "",
), ),
@ -563,16 +433,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: page: VitalSignItemDetailsScreen(
VitalSignItemDetailsScreen( pageKey: vitalSignDetails.PainScale,
pageKey: vitalSignDetails pageTitle: TranslationBase.of(context).painScale,
.PainScale, vitalList: mode.patientVitalSignsHistory,
pageTitle:
TranslationBase.of(
context)
.painScale,
vitalList: mode
.patientVitalSignsHistory,
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -581,13 +445,10 @@ class VitalSignDetailsScreen extends StatelessWidget {
) )
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).painScale,
.painScale, imagePath: "${assetBasePath}painScale.png",
imagePath:
"${assetBasePath}painScale.png",
lastVal: mode.painScore, lastVal: mode.painScore,
unit: TranslationBase.of(context) unit: TranslationBase.of(context).severe,
.severe,
), ),
), ),
], ],

@ -1,11 +1,15 @@
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/charts/app_time_series_chart.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/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.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/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/line_chart_curved_blood_pressure.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.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';
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';
@ -21,9 +25,17 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
String patientType; String patientType;
String arrivalType; String arrivalType;
List<TimeSeriesSales2> timeSeriesData1 = [];
List<TimeSeriesSales2> timeSeriesData2 = [];
final String viewKey1;
final String viewKey2;
VitalSignItemDetailsScreen( VitalSignItemDetailsScreen(
{this.vitalList, {this.vitalList,
this.pageKey, this.pageKey,
@required this.viewKey1,
@required this.viewKey2,
this.pageTitle, this.pageTitle,
this.patient, this.patient,
this.patientType, this.patientType,
@ -34,6 +46,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
generateData();
switch (pageKey) { switch (pageKey) {
case vitalSignDetails.BodyMeasurements: case vitalSignDetails.BodyMeasurements:
VSchart = [ VSchart = [
@ -233,6 +246,15 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
if (vitalListTemp.length != 0 && if (vitalListTemp.length != 0 &&
chartInfo['viewKey'] == 'BloodPressure' || chartInfo['viewKey'] == 'BloodPressure' ||
chartInfo['viewKey'] == 'O2') { chartInfo['viewKey'] == 'O2') {
// return LineChartCurvedBloodPressureNew(
// title: projectViewModel.isArabic
// ? chartInfo['nameAr']
// : chartInfo['name'],
// timeSeries1: timeSeriesData1,
// timeSeries2: timeSeriesData2,
// indexes: timeSeriesData1.length ~/ 5.5,
// );
return VitalSingChartBloodPressure( return VitalSingChartBloodPressure(
vitalList: vitalList, vitalList: vitalList,
name: projectViewModel.isArabic name: projectViewModel.isArabic
@ -252,6 +274,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
? 'BloodPressureLower' ? 'BloodPressureLower'
: 'FIO2', : 'FIO2',
); );
} }
return vitalListTemp.length != 0 return vitalListTemp.length != 0
@ -274,4 +297,30 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
), ),
); );
} }
generateData() {
if (vitalList.length > 0) {
vitalList.reversed.toList().forEach(
(element) {
if (element.toJson()[viewKey1]?.toInt() != 0)
timeSeriesData1.add(
TimeSeriesSales2(
AppDateUtils.convertStringToDate(element.createdOn),
// new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey1].toDouble(),
),
);
if (element.toJson()[viewKey2]?.toInt() != 0)
timeSeriesData2.add(
TimeSeriesSales2(
AppDateUtils.convertStringToDate(element.createdOn),
// new DateTime(element.vitalSignDate.year, element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey2].toDouble(),
),
);
},
);
}
}
} }

@ -1,6 +1,7 @@
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/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/core/model/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.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';
@ -45,7 +46,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12)), borderRadius: BorderRadius.circular(12)),
child: LineChartCurvedBloodPressure( child: LineChartCurvedBloodPressureNew(
title: name, title: name,
isOX: title2 == "SAO2", isOX: title2 == "SAO2",
timeSeries1: timeSeriesData1, timeSeries1: timeSeriesData1,

@ -112,6 +112,7 @@ class Utils {
}); });
} }
static TextStyle textStyle(context) => static TextStyle textStyle(context) =>
TextStyle(color: Theme.of(context).primaryColor); TextStyle(color: Theme.of(context).primaryColor);

@ -1,12 +1,12 @@
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/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/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/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/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -15,8 +15,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'header_row.dart'; import 'header_row.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget {
with PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType; final String patientType;
final String arrivalType; final String arrivalType;
@ -27,13 +26,8 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final Stream<String> videoCallDurationStream; final Stream<String> videoCallDurationStream;
PatientProfileHeaderNewDesignAppBar( PatientProfileHeaderNewDesignAppBar(this.patient, this.patientType, this.arrivalType,
this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient = false, this.isDischargedPatient = false, this.isFromLiveCare = false, this.videoCallDurationStream});
{this.height = 0.0,
this.isInpatient = false,
this.isDischargedPatient = false,
this.isFromLiveCare = false,
this.videoCallDurationStream});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -73,11 +67,8 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
Expanded( Expanded(
child: AppText( child: AppText(
patient.firstName != null patient.firstName != null
? (Utils.capitalize(patient.firstName) + ? (Utils.capitalize(patient.firstName) + " " + Utils.capitalize(patient.lastName))
" " + : Utils.capitalize(patient.fullName ?? patient.patientDetails.fullName),
Utils.capitalize(patient.lastName))
: Utils.capitalize(patient.fullName ??
patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -110,17 +101,13 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
StreamBuilder( StreamBuilder(
stream: videoCallDurationStream, stream: videoCallDurationStream,
builder: builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
(BuildContext context, AsyncSnapshot<String> snapshot) {
if (snapshot.hasData && snapshot.data != null) if (snapshot.hasData && snapshot.data != null)
return InkWell( return InkWell(
onTap: () {}, onTap: () {},
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.circular(20)),
color: Colors.red, padding: EdgeInsets.symmetric(vertical: 2, horizontal: 10),
borderRadius: BorderRadius.circular(20)),
padding:
EdgeInsets.symmetric(vertical: 2, horizontal: 10),
child: Text( child: Text(
snapshot.data, snapshot.data,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
@ -140,9 +127,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
gender == 1 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,
), ),
), ),
@ -154,58 +139,48 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SERVICES_PATIANT2[int.parse(patientType)] == SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList"
"patientArrivalList"
? Container( ? Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
patient.patientStatusType == 43 if (patient.patientStatusType != null)
? AppText( patient.patientStatusType == 43
TranslationBase.of(context).arrivedP, ? AppText(
color: AppGlobal.appGreenColor, TranslationBase.of(context).arrivedP,
fontWeight: FontWeight.bold, color: AppGlobal.appGreenColor,
fontFamily: 'Poppins', fontWeight: FontWeight.bold,
fontSize: 12, fontFamily: 'Poppins',
) fontSize: 12,
: AppText( )
TranslationBase.of(context).notArrived, : AppText(
color: Colors.red[800], TranslationBase.of(context).notArrived,
fontWeight: FontWeight.bold, color: Colors.red[800],
fontFamily: 'Poppins', fontWeight: FontWeight.bold,
fontSize: 12, fontFamily: 'Poppins',
), fontSize: 12,
),
arrivalType == '1' || patient.arrivedOn == null arrivalType == '1' || patient.arrivedOn == null
? AppText( ? AppText(
patient.startTime != null patient.startTime != null ? patient.startTime : '',
? patient.startTime
: '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
: AppText( : AppText(
patient.arrivedOn != null patient.arrivedOn != null ? AppDateUtils.convertStringToDateFormat(patient.arrivedOn, 'MM-dd-yyyy HH:mm') : '',
? AppDateUtils
.convertStringToDateFormat(
patient.arrivedOn,
'MM-dd-yyyy HH:mm')
: '',
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
], ],
)) ))
: SizedBox(), : SizedBox(),
if (SERVICES_PATIANT2[int.parse(patientType)] == if (SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient" && !isFromLiveCare)
"List_MyOutPatient" &&
!isFromLiveCare)
Container( Container(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).appointmentDate + TranslationBase.of(context).appointmentDate + " : ",
" : ",
fontSize: 14, fontSize: 14,
), ),
patient.startTime != null patient.startTime != null
@ -230,8 +205,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2( convertDateFormat2(patient.appointmentDate ?? ''),
patient.appointmentDate ?? ''),
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -261,10 +235,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
child: Container( child: Container(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AppText( child: AppText(
patient.nationalityName ?? patient.nationalityName ?? patient.nationality ?? patient.nationalityId ?? '',
patient.nationality ??
patient.nationalityId ??
'',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
@ -277,9 +248,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
patient.nationalityFlagURL, patient.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: (BuildContext context, errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) {
Object exception,
StackTrace stackTrace) {
return Text(''); return Text('');
}, },
)) ))
@ -299,19 +268,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
HeaderRow( HeaderRow(
label: patient.admissionDate == null label: patient.admissionDate == null ? "" : TranslationBase.of(context).admissionDate + " : ",
? "" value: patient.admissionDate == null ? "" : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}"),
: TranslationBase.of(context).admissionDate +
" : ",
value: patient.admissionDate == null
? ""
: "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}"),
if (patient.admissionDate != null) if (patient.admissionDate != null)
HeaderRow( HeaderRow(
label: label: "${TranslationBase.of(context).numOfDays}: ",
"${TranslationBase.of(context).numOfDays}: ", value: isDischargedPatient && patient.dischargeDate != null
value: isDischargedPatient &&
patient.dischargeDate != null
? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}" ? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}"
: "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", : "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}",
) )
@ -336,13 +298,8 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length); final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(str.substring(startIndex + start.length, endIndex)));
int.parse(str.substring(startIndex + start.length, endIndex))); newDate = date.year.toString() + "/" + date.month.toString().padLeft(2, '0') + "/" + date.day.toString().padLeft(2, '0');
newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
} }
return newDate ?? ''; return newDate ?? '';
@ -350,8 +307,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget
isToday(date) { isToday(date) {
DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date); DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date);
return DateFormat("yyyy-MM-dd").format(tempDate) == return DateFormat("yyyy-MM-dd").format(tempDate) == DateFormat("yyyy-MM-dd").format(DateTime.now());
DateFormat("yyyy-MM-dd").format(DateTime.now());
} }
myBoxDecoration() { myBoxDecoration() {

@ -38,7 +38,7 @@ dependencies:
# imei_plugin: ^1.2.0 # imei_plugin: ^1.2.0
# flutter_flexible_toast: ^0.1.4 # flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8 fluttertoast: ^8.0.8
local_auth: ^2.1.3 local_auth: 1.1.8
http_interceptor: ^1.0.2 http_interceptor: ^1.0.2
connectivity: ^3.0.6 connectivity: ^3.0.6
@ -71,7 +71,7 @@ dependencies:
get_it: ^7.1.3 get_it: ^7.1.3
#chart #chart
fl_chart: ^0.40.2 fl_chart: ^0.45.0
# Firebase # Firebase
firebase_messaging: ^14.2.1 firebase_messaging: ^14.2.1
@ -93,8 +93,8 @@ dependencies:
file_picker: ^4.6.1 file_picker: ^4.6.1
#speech to text #speech to text
# speech_to_text: # speech_to_text:
# path: speech_to_text # path: speech_to_text
speech_to_text: ^6.1.1 speech_to_text: ^6.1.1
quiver: ^3.0.0 quiver: ^3.0.0
@ -187,4 +187,4 @@ flutter:
- asset: assets/fonts/DoctorApp.ttf - asset: assets/fonts/DoctorApp.ttf
# #
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
Loading…
Cancel
Save