Merge branch 'roaa_schedule_design' into 'development'

Delete repeated API's

See merge request Cloud_Solution/doctor_app_flutter!970
merge-requests/971/merge
Elham Ali 4 years ago
commit d4cef7ba5f

@ -13,8 +13,6 @@ const PATIENT_PROGRESS_NOTE_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL = const PATIENT_INSURANCE_APPROVALS_URL =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL =
"Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_REFER_TO_DOCTOR_URL = const PATIENT_REFER_TO_DOCTOR_URL =
"Services/DoctorApplication.svc/REST/ReferToDoctor"; "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL = const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
@ -44,7 +42,6 @@ const GET_PATIENT_VITAL_SIGN_DATA =
const GET_PATIENT_LAB_OREDERS = const GET_PATIENT_LAB_OREDERS =
'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; 'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
const GET_LIVECARE_PENDINGLIST = const GET_LIVECARE_PENDINGLIST =
'Services/DoctorApplication.svc/REST/GetPendingPatientER'; 'Services/DoctorApplication.svc/REST/GetPendingPatientER';
@ -138,7 +135,7 @@ 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_OFFTIME = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const GET_COVERING_DOCTORS = const GET_COVERING_DOCTORS =
'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; 'Services/DoctorApplication.svc/REST/GetCoveringDoctor';
const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition';
@ -155,8 +152,6 @@ const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; '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_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const GET_PATIENT_IN_PATIENT_LIST = const GET_PATIENT_IN_PATIENT_LIST =
'Services/DoctorApplication.svc/REST/GetMyInPatient'; 'Services/DoctorApplication.svc/REST/GetMyInPatient';
@ -180,8 +175,6 @@ const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION =
// SOAP // SOAP
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode';
const POST_EPISODE_FOR_IN_PATIENT = const POST_EPISODE_FOR_IN_PATIENT =
@ -208,15 +201,13 @@ const PATCH_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PatchProgressNote'; 'Services/DoctorApplication.svc/REST/PatchProgressNote';
const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; 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_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory';
const GET_CHIEF_COMPLAINT = const GET_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; 'Services/DoctorApplication.svc/REST/GetChiefcomplaint';
const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam';
const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote';
const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment';
const GET_ORDER_PROCEDURE =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const GET_LIST_CATEGORISE = const GET_LIST_CATEGORISE =
'Services/DoctorApplication.svc/REST/GetProcedureCategories'; 'Services/DoctorApplication.svc/REST/GetProcedureCategories';
@ -271,7 +262,6 @@ const GET_IN_PATIENT_ORDERS =
'Services/DoctorApplication.svc/REST/GetPatientRadResult'; 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT_NEW = const GET_PRESCRIPTION_REPORT_NEW =
@ -280,18 +270,11 @@ const SEND_PRESCRIPTION_EMAIL =
'Services/Notifications.svc/REST/SendPrescriptionEmail'; 'Services/Notifications.svc/REST/SendPrescriptionEmail';
const GET_PRESCRIPTION_REPORT_ENH = const GET_PRESCRIPTION_REPORT_ENH =
'Services/Patients.svc/REST/GetPrescriptionReport_enh'; 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = const UPDATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = const CREATE_PROGRESS_NOTE_FOR_INPATIENT =
"Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const GET_PRESCRIPTION_IN_PATIENT =
'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
const GET_INSURANCE_IN_PATIENT =
"Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = const GET_MY_OUT_PATIENT =
"Services/DoctorApplication.svc/REST/GetMyOutPatient"; "Services/DoctorApplication.svc/REST/GetMyOutPatient";
@ -398,6 +381,9 @@ const GET_INTERVENTION_MEDICATION_HISTORY =
const SET_ACCEPTED_OR_REJECTED = const SET_ACCEPTED_OR_REJECTED =
"Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention";
const GET_STP_MASTER_LIST =
"Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList";
var selectedPatientType = 1; var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************ //*********change value to decode json from Dropdown ************

@ -1138,4 +1138,8 @@ const Map<String, Map<String, String>> localizedValues = {
"old": {"en": "Old", "ar":"القديمه"}, "old": {"en": "Old", "ar":"القديمه"},
"orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"}, "orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"},
"doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"}, "doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"},
"selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"},
"yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"},
"youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""},
"conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"},
}; };

@ -18,6 +18,7 @@ class CreateNoteModel {
String sessionID; String sessionID;
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
bool patientOutSA; bool patientOutSA;
int conditionId;
CreateNoteModel( CreateNoteModel(
{this.visitType, {this.visitType,
@ -38,7 +39,8 @@ class CreateNoteModel {
this.tokenID, this.tokenID,
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA}); this.patientOutSA,
this.conditionId});
CreateNoteModel.fromJson(Map<String, dynamic> json) { CreateNoteModel.fromJson(Map<String, dynamic> json) {
visitType = json['VisitType']; visitType = json['VisitType'];
@ -60,6 +62,7 @@ class CreateNoteModel {
sessionID = json['SessionID']; sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
conditionId = json['ConditionId'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -83,6 +86,7 @@ class CreateNoteModel {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['ConditionId'] = this.conditionId;
return data; return data;
} }
} }

@ -19,6 +19,8 @@ class NoteModel {
Null doctorClinicName; Null doctorClinicName;
String doctorName; String doctorName;
String visitTypeDesc; String visitTypeDesc;
int condition;
String conditionDescription;
NoteModel( NoteModel(
{this.setupID, {this.setupID,
@ -40,7 +42,10 @@ class NoteModel {
this.admissionClinicName, this.admissionClinicName,
this.doctorClinicName, this.doctorClinicName,
this.doctorName, this.doctorName,
this.visitTypeDesc}); this.visitTypeDesc,
this.condition,
this.conditionDescription,
});
NoteModel.fromJson(Map<String, dynamic> json) { NoteModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -63,6 +68,8 @@ class NoteModel {
doctorClinicName = json['DoctorClinicName']; doctorClinicName = json['DoctorClinicName'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
visitTypeDesc = json['VisitTypeDesc']; visitTypeDesc = json['VisitTypeDesc'];
condition = json['Condition'];
conditionDescription = json['ConditionDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -87,6 +94,8 @@ class NoteModel {
data['DoctorClinicName'] = this.doctorClinicName; data['DoctorClinicName'] = this.doctorClinicName;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['VisitTypeDesc'] = this.visitTypeDesc; data['VisitTypeDesc'] = this.visitTypeDesc;
data['Condition'] = this.condition;
data['ConditionDescription'] = this.conditionDescription;
return data; return data;
} }
} }

@ -0,0 +1,32 @@
class StpMasterListRequestModel {
bool isDentalAllowedBackend;
int languageID;
int projectID;
int parameterGroup;
int parameterType;
StpMasterListRequestModel(
{this.isDentalAllowedBackend,
this.languageID,
this.projectID,
this.parameterGroup,
this.parameterType});
StpMasterListRequestModel.fromJson(Map<String, dynamic> json) {
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
projectID = json['ProjectID'];
parameterGroup = json['parameterGroup'];
parameterType = json['parameterType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;
data['ProjectID'] = this.projectID;
data['parameterGroup'] = this.parameterGroup;
data['parameterType'] = this.parameterType;
return data;
}
}

@ -0,0 +1,22 @@
class StpMasterListResponseModel {
int parameterCode;
String description;
Null descriptionN;
StpMasterListResponseModel(
{this.parameterCode, this.description, this.descriptionN});
StpMasterListResponseModel.fromJson(Map<String, dynamic> json) {
parameterCode = json['ParameterCode'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ParameterCode'] = this.parameterCode;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -16,6 +16,7 @@ class UpdateNoteReqModel {
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
bool patientOutSA; bool patientOutSA;
int patientTypeID; int patientTypeID;
int conditionId;
UpdateNoteReqModel( UpdateNoteReqModel(
{this.projectID, {this.projectID,
@ -34,7 +35,8 @@ class UpdateNoteReqModel {
this.sessionID, this.sessionID,
this.isLoginForDoctorApp, this.isLoginForDoctorApp,
this.patientOutSA, this.patientOutSA,
this.patientTypeID}); this.patientTypeID,
this.conditionId});
UpdateNoteReqModel.fromJson(Map<String, dynamic> json) { UpdateNoteReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -54,6 +56,7 @@ class UpdateNoteReqModel {
isLoginForDoctorApp = json['IsLoginForDoctorApp']; isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA']; patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
conditionId = json['ConditionId'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -75,6 +78,7 @@ class UpdateNoteReqModel {
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA; data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['ConditionId'] = this.conditionId;
return data; return data;
} }
} }

@ -5,14 +5,14 @@ import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartVal
import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart';
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_req_model.dart';
import 'package:doctor_app_flutter/core/model/note/stp_master_list_res_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.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/patient/get_clinic_by_project_id_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart';
import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart'; import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart';
@ -26,6 +26,8 @@ import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_
import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart'; import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientService extends BaseService { class PatientService extends BaseService {
List<VitalSignResModel> _patientVitalSignList = []; List<VitalSignResModel> _patientVitalSignList = [];
@ -78,6 +80,8 @@ class PatientService extends BaseService {
List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList => List<GetDiabeticChartValuesResponseModel> get diabeticChartValuesList =>
_diabeticChartValuesList; _diabeticChartValuesList;
List<dynamic> stpMasterList = [];
// TODO: replace var with model // TODO: replace var with model
var _insuranceApporvalsList = []; var _insuranceApporvalsList = [];
@ -270,7 +274,7 @@ class PatientService extends BaseService {
Future getPatientRadiology(patient) async { Future getPatientRadiology(patient) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_RADIOLOGY, GET_IN_PATIENT_ORDERS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_patientRadiologyList = []; _patientRadiologyList = [];
response['List_GetRadOreders'].forEach((v) { response['List_GetRadOreders'].forEach((v) {
@ -558,4 +562,22 @@ class PatientService extends BaseService {
body: getDiabeticChartValuesRequestModel.toJson(), body: getDiabeticChartValuesRequestModel.toJson(),
); );
} }
Future getStpMasterList(
StpMasterListRequestModel stpMasterListRequestModel) async {
hasError = false;
await baseAppClient.post(
GET_STP_MASTER_LIST,
onSuccess: (dynamic response, int statusCode) {
stpMasterList = [];
stpMasterList = response['List_STPMasterList'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: stpMasterListRequestModel.toJson(),
);
}
} }

@ -34,7 +34,7 @@ class InsuranceCardService extends BaseService {
hasError = false; hasError = false;
insuranceApprovalInPatient.clear(); insuranceApprovalInPatient.clear();
await baseAppClient.post(GET_INSURANCE_IN_PATIENT, await baseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear(); //prescriptionsList.clear();
response['List_ApprovalMain_InPatient'].forEach((prescriptions) { response['List_ApprovalMain_InPatient'].forEach((prescriptions) {

@ -275,7 +275,7 @@ class PrescriptionService extends LookupService {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, await baseAppClient.postPatient(GET_PRESCRIPTION, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionsList.clear(); prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) { response['PatientPrescriptionList'].forEach((prescriptions) {

@ -186,7 +186,7 @@ class SickLeaveService extends BaseService {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_OFFTIME, GET_MASTER_LOOKUP_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
offTime = []; offTime = [];
response['MasterLookUpList']['entityList'].forEach((item) => { response['MasterLookUpList']['entityList'].forEach((item) => {
@ -208,7 +208,7 @@ class SickLeaveService extends BaseService {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
GET_OFFTIME, GET_MASTER_LOOKUP_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
reasonse = []; reasonse = [];
reasonse = response['MasterLookUpList']['entityList']; reasonse = response['MasterLookUpList']['entityList'];

@ -229,7 +229,7 @@ class SOAPService extends LookupService {
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async {
hasError = false; hasError = false;
await baseAppClient.post(GET_ALLERGY, await baseAppClient.post(GET_ALLERGIES,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
patientAllergiesList.clear(); patientAllergiesList.clear();

@ -159,7 +159,7 @@ class UcafService extends LookupService {
body['AppointmentNo'] = patient.appointmentNo; body['AppointmentNo'] = patient.appointmentNo;
body['EpisodeID'] = patient.episodeNo; body['EpisodeID'] = patient.episodeNo;
await baseAppClient.post(GET_ORDER_PROCEDURE, await baseAppClient.post(GET_PROCEDURE_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
orderProcedureList.clear(); orderProcedureList.clear();

@ -8,8 +8,6 @@ import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequest
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.dart'; import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.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';
@ -18,10 +16,12 @@ import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_
import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart';
import 'package:flutter/cupertino.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../model/note/stp_master_list_req_model.dart';
import '../model/note/stp_master_list_res_model.dart';
import 'base_view_model.dart'; import 'base_view_model.dart';
class PatientViewModel extends BaseViewModel { class PatientViewModel extends BaseViewModel {
@ -73,6 +73,9 @@ class PatientViewModel extends BaseViewModel {
List<dynamic> get referralFrequencyList => List<dynamic> get referralFrequencyList =>
_patientService.referalFrequancyList; _patientService.referalFrequancyList;
List<dynamic> get stpMasterList =>
_patientService.stpMasterList;
Future getPatientList(patient, patientType, Future getPatientList(patient, patientType,
{bool isBusyLocal = false, isView}) async { {bool isBusyLocal = false, isView}) async {
var localRes; var localRes;
@ -353,6 +356,32 @@ class PatientViewModel extends BaseViewModel {
resultType: resultType, resultType: resultType,
setupID: "010266"); setupID: "010266");
await _patientService.getDiabeticChartValues(requestModel); await _patientService.getDiabeticChartValues(requestModel);
if (_patientService.hasError) {
error = _patientService.error;
if (isLocalBusy)
setState(ViewState.ErrorLocal);
else
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future getStpMasterList({bool isLocalBusy = false}) async {
if (isLocalBusy)
setState(ViewState.BusyLocal);
else
setState(ViewState.Busy);
StpMasterListRequestModel requestModel = StpMasterListRequestModel(
isDentalAllowedBackend: false,
languageID: 1,
projectID: 15,
parameterGroup: 7,
parameterType: 362);
await _patientService.getStpMasterList(requestModel);
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;
if (isLocalBusy) if (isLocalBusy)

@ -456,7 +456,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
AppText( AppText(
TranslationBase.of( TranslationBase.of(
context) context)
.createdBy, .createdBy + ' ',
fontSize: 10, fontSize: 10,
), ),
Expanded( Expanded(
@ -474,6 +474,26 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
], ],
), ),
Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
AppText(
TranslationBase.of(context).conditionDescription + ' : ',
fontSize: 10,
),
Expanded(
child: AppText(
model.patientProgressNoteList[index].conditionDescription ?? '',
fontWeight:
FontWeight.w600,
fontSize: 12,
isCopyable: true,
),
),
],
),
], ],
), ),
), ),

@ -2,16 +2,16 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart';
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -26,6 +26,8 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
import '../../../../../widgets/shared/dialogs/dailog-list-select.dart';
import '../../../../base/base_view.dart';
class UpdateNoteOrder extends StatefulWidget { class UpdateNoteOrder extends StatefulWidget {
final NoteModel note; final NoteModel note;
@ -33,6 +35,8 @@ class UpdateNoteOrder extends StatefulWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final int visitType; final int visitType;
final bool isUpdate; final bool isUpdate;
final List<dynamic> elementList;
final Function(dynamic) okFunction;
const UpdateNoteOrder( const UpdateNoteOrder(
{Key key, {Key key,
@ -40,7 +44,9 @@ class UpdateNoteOrder extends StatefulWidget {
this.patientModel, this.patientModel,
this.patient, this.patient,
this.visitType, this.visitType,
this.isUpdate}) this.isUpdate,
this.elementList,
this.okFunction})
: super(key: key); : super(key: key);
@override @override
@ -48,6 +54,7 @@ class UpdateNoteOrder extends StatefulWidget {
} }
class _UpdateNoteOrderState extends State<UpdateNoteOrder> { class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
dynamic selectValue;
int selectedType; int selectedType;
bool isSubmitted = false; bool isSubmitted = false;
stt.SpeechToText speech = stt.SpeechToText(); stt.SpeechToText speech = stt.SpeechToText();
@ -78,120 +85,35 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String keyId = 'ParameterCode';
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (widget.note != null) { if (widget.note != null) {
progressNoteController.text = widget.note.notes; progressNoteController.text = widget.note.notes;
} if(selectValue==null)
selectValue={};
selectValue['parameterCode'] = widget.note.condition;
selectValue['description'] = widget.note.conditionDescription;
return AppScaffold( }
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 1.0,
child: Padding(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BottomSheetTitle(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Stack(
children: [
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).progressNote,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
minLines: 25,
hasBorder: true,
// isTextFieldHasSuffix: true, return BaseView<PatientViewModel>(
validationError: onModelReady: (model) {
progressNoteController.text.isEmpty && model.getStpMasterList(isLocalBusy: false);
isSubmitted },
? TranslationBase.of(context).emptyMessage builder: (_, model, w) => AppScaffold(
: null, isShowAppBar: false,
), backgroundColor: Theme.of(context).scaffoldBackgroundColor,
Positioned( body: SingleChildScrollView(
top: child: Container(
-2, //MediaQuery.of(context).size.height * 0, height: MediaQuery.of(context).size.height * 1.0,
right: projectViewModel.isArabic child: Padding(
? MediaQuery.of(context).size.width * 0.75 padding: EdgeInsets.all(0.0),
: 15, child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
IconButton( BottomSheetTitle(
icon: Icon(DoctorApp.speechtotext,
color: Colors.black, size: 35),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
],
))
],
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
height: progressNoteController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column(
children: <Widget>[
if (progressNoteController.text.isNotEmpty)
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() {
progressNoteController.text = '';
});
},
),
),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: widget.visitType == 3 title: widget.visitType == 3
? (widget.isUpdate ? (widget.isUpdate
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate
@ -201,73 +123,220 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
? TranslationBase.of(context).noteUpdate ? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) + : TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote, TranslationBase.of(context).progressNote,
color: AppGlobal.appGreenColor, ),
// disabled: progressNoteController.text.isEmpty, SizedBox(
fontWeight: FontWeight.w700, height: 10.0,
onPressed: () async { ),
Container(
padding: EdgeInsets.only(right: 20, left: 20),
child: InkWell(
onTap: model.stpMasterList != null
? () {
Helpers.hideKeyboard(context);
ListSelectDialog dialog = ListSelectDialog(
list: model.stpMasterList,
attributeName: 'Description',
attributeValueId:
model.stpMasterList.length == 1
? model.stpMasterList[0]['${keyId}']
.toString()
: '${keyId}',
okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) => {
setState(() {
selectValue = selectedValue;
selectValue['isDefault'] = true;
})
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
}
: null,
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).selectCondition,//'Select Condition',
dropDownText: model.stpMasterList.length == 1
? model.stpMasterList[0]['Description']
: selectValue == null
? null
: selectValue['Description'],
enabled: false,
isTextFieldHasSuffix: true,
),
),
),
SizedBox(
height: 10.0,
),
Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: [
Stack(
children: [
AppTextFieldCustom(
hintText: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context)
.noteUpdate
: TranslationBase.of(context)
.noteAdd) +
TranslationBase.of(context)
.progressNote,
//TranslationBase.of(context).addProgressNote,
controller: progressNoteController,
maxLines: 35,
minLines: 25,
hasBorder: true,
// isTextFieldHasSuffix: true,
validationError: progressNoteController
.text.isEmpty &&
isSubmitted
? TranslationBase.of(context).emptyMessage
: null,
),
Positioned(
top: -2,
//MediaQuery.of(context).size.height * 0,
right: projectViewModel.isArabic
? MediaQuery.of(context).size.width * 0.75
: 15,
child: Column(
children: [
IconButton(
icon: Icon(DoctorApp.speechtotext,
color: Colors.black, size: 35),
onPressed: () {
initSpeechState()
.then((value) => {onVoiceText()});
},
),
],
))
],
),
],
),
),
),
],
),
),
),
),
bottomSheet: Container(
height: progressNoteController.text.isNotEmpty ? 130 : 70,
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Column(
children: <Widget>[
if (progressNoteController.text.isNotEmpty)
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: TranslationBase.of(context).clearText,
onPressed: () {
setState(() { setState(() {
isSubmitted = true; progressNoteController.text = '';
}); });
if (progressNoteController.text.trim().isNotEmpty) { },
GifLoaderDialogUtils.showMyDialog(context); ),
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); ),
Container(
margin: EdgeInsets.all(5),
child: AppButton(
title: widget.visitType == 3
? (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).orderSheet
: (widget.isUpdate
? TranslationBase.of(context).noteUpdate
: TranslationBase.of(context).noteAdd) +
TranslationBase.of(context).progressNote,
color: AppGlobal.appGreenColor,
// disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700,
onPressed: () async {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile); DoctorProfileModel.fromJson(profile);
if (widget.isUpdate) { if (widget.isUpdate) {
UpdateNoteReqModel reqModel = UpdateNoteReqModel( UpdateNoteReqModel reqModel = UpdateNoteReqModel(
admissionNo: int.parse(widget.patient.admissionNo), admissionNo:
cancelledNote: false, int.parse(widget.patient.admissionNo),
lineItemNo: widget.note.lineItemNo, cancelledNote: false,
createdBy: widget.note.createdBy, lineItemNo: widget.note.lineItemNo,
notes: progressNoteController.text, createdBy: widget.note.createdBy,
verifiedNote: false, notes: progressNoteController.text,
patientTypeID: widget.patient.patientType, verifiedNote: false,
patientOutSA: false, patientTypeID: widget.patient.patientType,
); patientOutSA: false,
await widget.patientModel conditionId: selectValue['ParameterCode']);
.updatePatientProgressNote(reqModel); await widget.patientModel
} else { .updatePatientProgressNote(reqModel);
CreateNoteModel reqModel = CreateNoteModel( } else {
admissionNo: CreateNoteModel reqModel = CreateNoteModel(
int.parse(widget.patient.admissionNo), admissionNo:
createdBy: doctorProfile.doctorID, int.parse(widget.patient.admissionNo),
visitType: widget.visitType, createdBy: doctorProfile.doctorID,
patientID: widget.patient.patientId, visitType: widget.visitType,
nursingRemarks: ' ', patientID: widget.patient.patientId,
patientTypeID: widget.patient.patientType, nursingRemarks: ' ',
patientOutSA: false, patientTypeID: widget.patient.patientType,
notes: progressNoteController.text); patientOutSA: false,
notes: progressNoteController.text,
conditionId: selectValue['ParameterCode']);
await widget.patientModel await widget.patientModel
.createPatientProgressNote(reqModel); .createPatientProgressNote(reqModel);
} }
if (widget.patientModel.state == ViewState.ErrorLocal) { if (widget.patientModel.state ==
Helpers.showErrorToast(widget.patientModel.error); ViewState.ErrorLocal) {
Helpers.showErrorToast(widget.patientModel.error);
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).yourOrderAddedSuccessfully);
Navigator.of(context).pop();
} else { } else {
ProgressNoteRequest progressNoteRequest = Helpers.showErrorToast(TranslationBase.of(context).youCannotAddOnlySpaces);
ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo:
int.parse(widget.patient.admissionNo),
projectID: widget.patient.projectId,
patientTypeID: widget.patient.patientType,
languageID: 2);
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
} }
GifLoaderDialogUtils.hideDialog(context); })),
DrAppToastMsg.showSuccesToast( ],
"Your Order added Successfully"); ),
Navigator.of(context).pop();
} else {
Helpers.showErrorToast("You cant add only spaces");
}
})),
],
), ),
), ),
); );

@ -1716,6 +1716,14 @@ class TranslationBase {
String get doseDetails => localizedValues['doseDetails'][locale.languageCode]; String get doseDetails => localizedValues['doseDetails'][locale.languageCode];
String get selectCondition => localizedValues['selectCondition'][locale.languageCode];
String get yourOrderAddedSuccessfully => localizedValues['yourOrderAddedSuccessfully'][locale.languageCode];
String get youCannotAddOnlySpaces => localizedValues['youCannotAddOnlySpaces'][locale.languageCode];
String get conditionDescription => localizedValues['conditionDescription'][locale.languageCode];
} }

Loading…
Cancel
Save