chinging chief complaint in the soap

merge-requests/781/head
hussam al-habibeh 3 years ago
parent 2b429e6679
commit 36786a3079

@ -8,280 +8,199 @@ 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_ORDERS_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
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 PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
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 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_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN_DATA =
'Services/DoctorApplication.svc/REST/GetVitalSigns';
const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
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_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
const GET_LIVECARE_PENDINGLIST =
'Services/DoctorApplication.svc/REST/GetPendingPatientER';
const GET_LIVECARE_PENDINGLIST = 'Services/DoctorApplication.svc/REST/GetPendingPatientER';
const START_LIVECARE_CALL = 'LiveCareApi/DoctorApp/CallPatient';
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_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 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_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 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 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';
// const SELECT_DEVICE_IMEI =
// '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_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 MEMBER_CHECK_ACTIVATION_CODE_NEW =
'Services/Sentry.svc/REST/MemberCheckActivationCode_New';
const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = '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 TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin';
const END_CALL = 'LiveCareApi/DoctorApp/EndCall';
const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge';
const GET_DASHBOARD =
'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI';
const GET_SICKLEAVE_STATISTIC =
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_DASHBOARD = 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI';
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 GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_OFFTIME = '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 UPDATE_RESCHDEULE =
'Services/DoctorApplication.svc/REST/PatchRequisition';
const GET_RESCHEDULE_LEAVE =
'Services/DoctorApplication.svc/REST/GetRequisition';
const GET_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/GetPrescription';
const POST_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/PostPrescription';
const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const UPDATE_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PatchRequisition';
const GET_RESCHEDULE_LEAVE = 'Services/DoctorApplication.svc/REST/GetRequisition';
const GET_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/GetPrescription';
const POST_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/PostPrescription';
const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_PATIENT_ARRIVAL_LIST = 'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient';
const GET_PATIENT_IN_PATIENT_LIST = 'Services/DoctorApplication.svc/REST/GetMyInPatient';
const Verify_Referral_Doctor_Remarks =
'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
const Verify_Referral_Doctor_Remarks = 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL =
'Services/Notifications.svc/REST/SendLabReportEmail';
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_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
// SOAP
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PHYSICAL_EXAM =
'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE =
'/Services/DoctorApplication.svc/REST/PostProgressNote';
const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
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 PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
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_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PatchPhysicalExam';
const PATCH_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment';
const GET_ALLERGY = 'Services/DoctorApplication.svc/REST/GetAllergies';
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_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote';
const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment';
const GET_ORDER_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const GET_ORDER_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const GET_LIST_CATEGORISE =
'Services/DoctorApplication.svc/REST/GetProcedureCategories';
const GET_LIST_CATEGORISE = 'Services/DoctorApplication.svc/REST/GetProcedureCategories';
const GET_CATEGORISE_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetProcedure';
const GET_CATEGORISE_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetProcedure';
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 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_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors';
const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards';
const GET_ROOM_CATEGORIES =
'Services/DoctorApplication.svc/REST/GetRoomCategories';
const GET_DIAGNOSIS_TYPES =
'Services/DoctorApplication.svc/REST/DiagnosisTypes';
const GET_ROOM_CATEGORIES = '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_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes';
const POST_ADMISSION_REQUEST =
'Services/DoctorApplication.svc/REST/PostAdmissionRequest';
const GET_ITEM_BY_MEDICINE =
'Services/DoctorApplication.svc/REST/GetItemByMedicineCode';
const POST_ADMISSION_REQUEST = '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_BOX_QUANTITY =
'Services/DoctorApplication.svc/REST/CalculateBoxQuantity';
const GET_PROCEDURE_VALIDATION = 'Services/DoctorApplication.svc/REST/ValidateProcedures';
const GET_BOX_QUANTITY = 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity';
///GET ECG
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_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT =
"Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_MY_DISCHARGE_PATIENT = "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_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
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW =
'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_PRESCRIPTION_IN_PATIENT = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_INSURANCE_IN_PATIENT =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const GET_INSURANCE_IN_PATIENT = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
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";
var selectedPatientType = 1;
@ -337,7 +256,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 6.0;
const VERSION_ID = 6.2;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -4,9 +4,10 @@ class GetChiefComplaintReqModel {
int episodeId;
int episodeID;
dynamic doctorID;
int admissionNo;
GetChiefComplaintReqModel(
{this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID});
{this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID, this.admissionNo});
GetChiefComplaintReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
@ -14,8 +15,8 @@ class GetChiefComplaintReqModel {
episodeId = json['EpisodeId'];
episodeID = json['EpisodeID'];
doctorID = json['DoctorID'];
}
admissionNo = json['AdmissionNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
@ -24,6 +25,9 @@ class GetChiefComplaintReqModel {
data['EpisodeId'] = this.episodeId;
data['EpisodeID'] = this.episodeID;
data['DoctorID'] = this.doctorID;
if (this.admissionNo != null) {
data['AdmissionNo'] = this.admissionNo;
}
return data;
}

@ -36,6 +36,7 @@ class GetPhysicalExamReqModel {
data['To'] = this.to;
data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
return data;
}
}

@ -2,6 +2,7 @@ class PostChiefComplaintRequestModel {
int appointmentNo;
int episodeID;
int patientMRN;
int admissionNo;
String chiefComplaint;
String hopi;
String currentMedication;
@ -11,7 +12,6 @@ class PostChiefComplaintRequestModel {
dynamic doctorID;
dynamic editedBy;
PostChiefComplaintRequestModel(
{this.appointmentNo,
this.episodeID,
@ -23,7 +23,8 @@ class PostChiefComplaintRequestModel {
this.isLactation,
this.doctorID,
this.editedBy,
this.numberOfWeeks});
this.numberOfWeeks,
this.admissionNo});
PostChiefComplaintRequestModel.fromJson(Map<String, dynamic> json) {
appointmentNo = json['AppointmentNo'];
@ -37,6 +38,7 @@ class PostChiefComplaintRequestModel {
numberOfWeeks = json['numberOfWeeks'];
doctorID = json['DoctorID'];
editedBy = json['EditedBy'];
admissionNo = json['AdmissionNo'];
}
Map<String, dynamic> toJson() {
@ -52,6 +54,9 @@ class PostChiefComplaintRequestModel {
data['numberOfWeeks'] = this.numberOfWeeks;
data['DoctorID'] = this.doctorID;
data['EditedBy'] = this.editedBy;
if (this.admissionNo != null) {
data['AdmissionNo'] = this.admissionNo;
}
return data;
}

@ -36,7 +36,8 @@ class UpdateObjectivePage extends StatefulWidget {
this.changePageViewIndex,
this.mySelectedExamination,
this.patientInfo,
this.changeLoadingState, this.currentIndex});
this.changeLoadingState,
this.currentIndex});
@override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -45,8 +46,7 @@ class UpdateObjectivePage extends StatefulWidget {
class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
bool isSysExaminationExpand = false;
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
@ -61,98 +61,89 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo);
onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: widget.patientInfo.appointmentNo);
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) {
await model
.getMasterLookup(MasterKeysService.PhysicalExamination);
}
model.patientPhysicalExamList.forEach((element) {
MasterKeyModel examMaster = model.getOneMasterKey(
masterKeys: MasterKeysService.PhysicalExamination,
id: element.examId,
);
MySelectedExamination tempEam = MySelectedExamination(
selectedExamination: examMaster,
remark: element.remarks,
isNormal: element.isNormal,
createdBy: element.createdBy,
notExamined: element.notExamined,
isNew: element.isNew,
isAbnormal: element.isAbnormal);
widget.mySelectedExamination.add(tempEam);
});
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
model.patientPhysicalExamList.forEach((element) {
MasterKeyModel examMaster = model.getOneMasterKey(
masterKeys: MasterKeysService.PhysicalExamination,
id: element.examId,
);
MySelectedExamination tempEam = MySelectedExamination(
selectedExamination: examMaster,
remark: element.remarks,
isNormal: element.isNormal,
createdBy: element.createdBy,
notExamined: element.notExamined,
isNew: element.isNew,
isAbnormal: element.isAbnormal);
widget.mySelectedExamination.add(tempEam);
});
}
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(
currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle:
TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () {
openExaminationList(context);
},),
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationItemCard(examination, () {
removeExamination(
examination.selectedExamination);
});
}).toList(),
)
],
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(
label: "${TranslationBase.of(context).addExamination}",
onTap: () {
openExaminationList(context);
},
),
Column(
children: widget.mySelectedExamination.map((examination) {
return ExaminationItemCard(examination, () {
removeExamination(examination.selectedExamination);
});
}).toList(),
)
],
),
isExpanded: isSysExaminationExpand,
),
isExpanded: isSysExaminationExpand,
),
SizedBox(height: MediaQuery
.of(context)
.size
.height * 0.12,)
],
SizedBox(
height: MediaQuery.of(context).size.height * 0.12,
)
],
),
),
),
),
),
bottomSheet:
Container(
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
width: double.infinity,
@ -161,50 +152,48 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 5,
),
),
],
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
),
),
),
),),
),
SizedBox(
height: 5,
),
],
),)
),
),
)),
);
}
@ -213,40 +202,36 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
});
if (model.patientPhysicalExamList.isEmpty) {
@ -268,10 +253,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}
removeExamination(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> history = widget.mySelectedExamination
.where((element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
Iterable<MySelectedExamination> history = widget.mySelectedExamination.where((element) =>
masterKey.id == element.selectedExamination.id && masterKey.typeId == element.selectedExamination.typeId);
if (history.length > 0)
setState(() {
@ -316,11 +299,7 @@ class AddExaminationDailog extends StatefulWidget {
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
const AddExaminationDailog(
{Key key,
this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination})
const AddExaminationDailog({Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
: super(key: key);
@override
@ -335,8 +314,7 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model
.getMasterLookup(MasterKeysService.PhysicalExamination);
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
@ -346,21 +324,19 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: Container(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
]),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
]),
))),
)),
);

@ -33,14 +33,16 @@ class UpdateSubjectivePage extends StatefulWidget {
final List<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> myHistoryList;
final PatiantInformtion patientInfo;
final int currentIndex;
final int currentIndex;
UpdateSubjectivePage(
{Key key,
this.changePageViewIndex,
this.myAllergiesList,
this.myHistoryList,
this.patientInfo, this.changeLoadingState, this.currentIndex});
this.patientInfo,
this.changeLoadingState,
this.currentIndex});
@override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
@ -67,7 +69,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
doctorID: '',
editedBy: '');
await model.getPatientHistories(getHistoryReqModel,isFirst: true);
await model.getPatientHistories(getHistoryReqModel, isFirst: true);
if (model.patientHistoryList.isNotEmpty) {
if (model.historyFamilyList.isEmpty) {
@ -84,62 +86,50 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}
model.patientHistoryList.forEach((element) {
if (element.historyType ==
MasterKeysService.HistoryFamily.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistoryFamily.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryFamily,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistoryMedical.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistoryMedical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryMedical,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistorySports.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistorySports.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySports,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistorySurgical.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistorySurgical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySurgical,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
@ -157,23 +147,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP);
if (model.patientAllergiesList.isNotEmpty) {
if (model.allergiesList.isEmpty)
await model.getMasterLookup(MasterKeysService.Allergies);
if (model.allergySeverityList.isEmpty)
await model.getMasterLookup(MasterKeysService.AllergySeverity);
if (model.allergiesList.isEmpty) await model.getMasterLookup(MasterKeysService.Allergies);
if (model.allergySeverityList.isEmpty) await model.getMasterLookup(MasterKeysService.AllergySeverity);
model.patientAllergiesList.forEach((element) {
MasterKeyModel selectedAllergy = model.getOneMasterKey(
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType);
MasterKeyModel selectedAllergySeverity;
if (element.severity == 0) {
selectedAllergySeverity = MasterKeyModel(
id: 0,
typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
id: 0, typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
} else {
selectedAllergySeverity = model.getOneMasterKey(
selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity,
id: element.severity,
);
@ -185,8 +170,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
createdBy: element.createdBy,
remark: element.remarks,
selectedAllergySeverity: selectedAllergySeverity);
if (selectedAllergy != null && selectedAllergySeverity != null)
widget.myAllergiesList.add(mySelectedAllergy);
if (selectedAllergy != null && selectedAllergySeverity != null) widget.myAllergiesList.add(mySelectedAllergy);
});
}
}
@ -198,33 +182,31 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.myAllergiesList.clear();
widget.myHistoryList.clear();
GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: widget.patientInfo.appointmentNo,
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');
GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel(
admissionNo: int.parse(widget.patientInfo.admissionNo),
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: widget.patientInfo.appointmentNo,
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');
await model.getPatientChiefComplaint(getChiefComplaintReqModel);
if (model.patientChiefComplaintList.isNotEmpty) {
isChiefExpand = true;
complaintsController.text = Helpers.parseHtmlString(
model.patientChiefComplaintList[0].chiefComplaint);
complaintsController.text = Helpers.parseHtmlString(model.patientChiefComplaintList[0].chiefComplaint);
illnessController.text = model.patientChiefComplaintList[0].hopi;
medicationController.text =!(model.patientChiefComplaintList[0].currentMedication).isNotEmpty ? model.patientChiefComplaintList[0].currentMedication + '\n \n':model.patientChiefComplaintList[0].currentMedication;
medicationController.text = !(model.patientChiefComplaintList[0].currentMedication).isNotEmpty
? model.patientChiefComplaintList[0].currentMedication + '\n \n'
: model.patientChiefComplaintList[0].currentMedication;
}
await getHistory(model);
await getAllergies(model);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -234,12 +216,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context)
.chiefComplaints
,
headerTitle: TranslationBase.of(context).chiefComplaints,
onTap: () {
setState(() {
isChiefExpand = !isChiefExpand;
@ -259,12 +238,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox(
height: 30,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
.histories,
headerTitle: TranslationBase.of(context).histories,
isRequired: false,
onTap: () {
setState(() {
@ -272,22 +247,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
});
},
child: Column(
children: [
UpdateHistoryWidget(myHistoryList: widget.myHistoryList)
],
children: [UpdateHistoryWidget(myHistoryList: widget.myHistoryList)],
),
isExpanded: isHistoryExpand,
),
SizedBox(
height: 30,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
.allergiesSoap
,
headerTitle: TranslationBase.of(context).allergiesSoap,
isRequired: false,
onTap: () {
setState(() {
@ -296,8 +264,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
},
child: Column(
children: [
UpdateAllergiesWidget(myAllergiesList: widget
.myAllergiesList,),
UpdateAllergiesWidget(
myAllergiesList: widget.myAllergiesList,
),
SizedBox(
height: 30,
),
@ -306,7 +275,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isAllergiesExpand,
),
SizedBox(
height:MediaQuery.of(context).size.height * 0.16,
height: MediaQuery.of(context).size.height * 0.16,
),
],
),
@ -319,9 +288,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
width: double.infinity,
@ -330,38 +297,35 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color:Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(
model: model,
myAllergiesList: widget.myAllergiesList,
myHistoryList: widget.myHistoryList);
},
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(
model: model, myAllergiesList: widget.myAllergiesList, myHistoryList: widget.myHistoryList);
},
),
),
),
),),
),
SizedBox(
height: 5,
),
],
),),
),
),
),
);
}
addSubjectiveInfo({SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList,
List<MySelectedHistory> myHistoryList}) async {
addSubjectiveInfo(
{SOAPViewModel model, List<MySelectedAllergy> myAllergiesList, List<MySelectedHistory> myHistoryList}) async {
formKey.currentState.save();
formKey.currentState.validate();
@ -391,66 +355,49 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.changeLoadingState(true);
widget.changePageViewIndex(1);
} else {
setState(() {
if (complaintsController.text.isEmpty) {
complaintsControllerError = TranslationBase
.of(context)
.emptyMessage;
complaintsControllerError = TranslationBase.of(context).emptyMessage;
} else if (complaintsController.text.length < 25) {
complaintsControllerError = TranslationBase
.of(context)
.chiefComplaintLength;
complaintsControllerError = TranslationBase.of(context).chiefComplaintLength;
}
if (illnessController.text.isEmpty) {
illnessControllerError = TranslationBase
.of(context)
.emptyMessage;
illnessControllerError = TranslationBase.of(context).emptyMessage;
}
if (medicationController.text.isEmpty) {
medicationControllerError = TranslationBase
.of(context)
.emptyMessage;
medicationControllerError = TranslationBase.of(context).emptyMessage;
}
});
Helpers.showErrorToast(TranslationBase
.of(context)
.chiefComplaintErrorMsg);
Helpers.showErrorToast(TranslationBase.of(context).chiefComplaintErrorMsg);
}
}
postAllergy(
{List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
PostAllergyRequestModel postAllergyRequestModel =
new PostAllergyRequestModel();
postAllergy({List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
PostAllergyRequestModel postAllergyRequestModel = new PostAllergyRequestModel();
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
widget.myAllergiesList.forEach((allergy) {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
null)
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == null)
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy??doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
});
if (model.patientAllergiesList.isEmpty) {
await model.postAllergy(postAllergyRequestModel);
@ -464,20 +411,17 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
appointmentNo: widget.patientInfo.appointmentNo,
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy : true);
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy: true);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
postHistories(
{List<MySelectedHistory> myHistoryList, SOAPViewModel model}) async {
PostHistoriesRequestModel postHistoriesRequestModel =
new PostHistoriesRequestModel(doctorID: '');
postHistories({List<MySelectedHistory> myHistoryList, SOAPViewModel model}) async {
PostHistoriesRequestModel postHistoriesRequestModel = new PostHistoriesRequestModel(doctorID: '');
widget.myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
if (postHistoriesRequestModel.listMedicalHistoryVM == null) postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -489,14 +433,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
));
});
if (model.patientHistoryList.isEmpty) {
await model.postHistories(postHistoriesRequestModel);
} else {
await model.patchHistories(postHistoriesRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
@ -504,20 +446,19 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
postChiefComplaint({SOAPViewModel model}) async {
formKey.currentState.save();
if(formKey.currentState.validate()){
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text,
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
if (formKey.currentState.validate()) {
PostChiefComplaintRequestModel postChiefComplaintRequestModel = new PostChiefComplaintRequestModel(
admissionNo: int.parse(widget.patientInfo.admissionNo),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text,
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) {
postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel);
@ -527,8 +468,3 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}
}
}

@ -573,7 +573,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -615,7 +615,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -907,7 +907,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
sticky_headers:
dependency: "direct main"
description:
@ -1098,5 +1098,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <2.11.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save