|
|
@ -100,7 +100,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
|
|
|
List<GetMedicationResponseModel> get allMedicationList => _prescriptionService.allMedicationList;
|
|
|
|
List<GetMedicationResponseModel> get allMedicationList => _prescriptionService.allMedicationList;
|
|
|
|
|
|
|
|
|
|
|
|
SubjectiveCallBack subjectiveCallBack;
|
|
|
|
late SubjectiveCallBack subjectiveCallBack;
|
|
|
|
|
|
|
|
|
|
|
|
setSubjectiveCallBack(SubjectiveCallBack callBack) {
|
|
|
|
setSubjectiveCallBack(SubjectiveCallBack callBack) {
|
|
|
|
this.subjectiveCallBack = callBack;
|
|
|
|
this.subjectiveCallBack = callBack;
|
|
|
@ -110,7 +110,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
subjectiveCallBack.nextFunction(model);
|
|
|
|
subjectiveCallBack.nextFunction(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ObjectiveCallBack objectiveCallBack;
|
|
|
|
late ObjectiveCallBack objectiveCallBack;
|
|
|
|
|
|
|
|
|
|
|
|
setObjectiveCallBack(ObjectiveCallBack callBack) {
|
|
|
|
setObjectiveCallBack(ObjectiveCallBack callBack) {
|
|
|
|
this.objectiveCallBack = callBack;
|
|
|
|
this.objectiveCallBack = callBack;
|
|
|
@ -120,7 +120,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
objectiveCallBack.nextFunction(model);
|
|
|
|
objectiveCallBack.nextFunction(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AssessmentCallBack assessmentCallBack;
|
|
|
|
late AssessmentCallBack assessmentCallBack;
|
|
|
|
|
|
|
|
|
|
|
|
setAssessmentCallBack(AssessmentCallBack callBack) {
|
|
|
|
setAssessmentCallBack(AssessmentCallBack callBack) {
|
|
|
|
this.assessmentCallBack = callBack;
|
|
|
|
this.assessmentCallBack = callBack;
|
|
|
@ -130,7 +130,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
assessmentCallBack.nextFunction(model);
|
|
|
|
assessmentCallBack.nextFunction(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PlanCallBack planCallBack;
|
|
|
|
late PlanCallBack planCallBack;
|
|
|
|
|
|
|
|
|
|
|
|
setPlanCallBack(PlanCallBack callBack) {
|
|
|
|
setPlanCallBack(PlanCallBack callBack) {
|
|
|
|
this.planCallBack = callBack;
|
|
|
|
this.planCallBack = callBack;
|
|
|
@ -299,8 +299,8 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
patientInfo.appointmentNo.toString(),
|
|
|
|
patientInfo.appointmentNo.toString(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (patientInfo.admissionNo != null && patientInfo.admissionNo.isNotEmpty)
|
|
|
|
if (patientInfo.admissionNo != null && patientInfo.admissionNo!.isNotEmpty)
|
|
|
|
getPhysicalExamReqModel.admissionNo = int.parse(patientInfo.admissionNo);
|
|
|
|
getPhysicalExamReqModel.admissionNo = int.parse(patientInfo!.admissionNo!);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
getPhysicalExamReqModel.admissionNo = 0;
|
|
|
|
getPhysicalExamReqModel.admissionNo = 0;
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
setState(ViewState.Busy);
|
|
|
@ -350,7 +350,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel =
|
|
|
|
GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel =
|
|
|
|
GetEpisodeForInpatientReqModel(
|
|
|
|
GetEpisodeForInpatientReqModel(
|
|
|
|
patientID: patient.patientId,
|
|
|
|
patientID: patient.patientId,
|
|
|
|
admissionNo: int.parse(patient.admissionNo),
|
|
|
|
admissionNo: int.parse(patient!.admissionNo!),
|
|
|
|
patientTypeID: 1);
|
|
|
|
patientTypeID: 1);
|
|
|
|
await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel);
|
|
|
|
await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel);
|
|
|
|
if (_SOAPService.hasError) {
|
|
|
|
if (_SOAPService.hasError) {
|
|
|
@ -480,10 +480,9 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
GetChiefComplaintReqModel getChiefComplaintReqModel =
|
|
|
|
GetChiefComplaintReqModel getChiefComplaintReqModel =
|
|
|
|
GetChiefComplaintReqModel(
|
|
|
|
GetChiefComplaintReqModel(
|
|
|
|
admissionNo:
|
|
|
|
admissionNo:
|
|
|
|
patientInfo
|
|
|
|
patientInfo!.admissionNo !=
|
|
|
|
.admissionNo !=
|
|
|
|
|
|
|
|
null
|
|
|
|
null
|
|
|
|
? int.parse(patientInfo.admissionNo)
|
|
|
|
? int.parse(patientInfo!.admissionNo!)
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
patientMRN: patientInfo.patientMRN,
|
|
|
|
patientMRN: patientInfo.patientMRN,
|
|
|
|
appointmentNo: patientInfo.appointmentNo != null
|
|
|
|
appointmentNo: patientInfo.appointmentNo != null
|
|
|
@ -644,7 +643,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
final results = await Future.wait(services ?? []);
|
|
|
|
final results = await Future.wait(services ?? []);
|
|
|
|
|
|
|
|
|
|
|
|
if (_SOAPService.hasError || _prescriptionService.hasError) {
|
|
|
|
if (_SOAPService.hasError || _prescriptionService.hasError) {
|
|
|
|
error = _SOAPService.error + _prescriptionService.error!;
|
|
|
|
error = _SOAPService.error! + _prescriptionService.error!;
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
setState(ViewState.Idle);
|
|
|
@ -716,11 +715,11 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
|
|
|
postSubjectServices(
|
|
|
|
postSubjectServices(
|
|
|
|
{patientInfo,
|
|
|
|
{patientInfo,
|
|
|
|
String complaintsText,
|
|
|
|
required String complaintsText,
|
|
|
|
String medicationText,
|
|
|
|
required String medicationText,
|
|
|
|
String illnessText,
|
|
|
|
required String illnessText,
|
|
|
|
List<MySelectedHistory> myHistoryList,
|
|
|
|
required List<MySelectedHistory> myHistoryList,
|
|
|
|
List<MySelectedAllergy> myAllergiesList}) async {
|
|
|
|
required List<MySelectedAllergy> myAllergiesList}) async {
|
|
|
|
var services;
|
|
|
|
var services;
|
|
|
|
|
|
|
|
|
|
|
|
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
|
|
|
|
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
|
|
|
@ -774,9 +773,9 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
|
|
|
PostChiefComplaintRequestModel createPostChiefComplaintRequestModel(
|
|
|
|
PostChiefComplaintRequestModel createPostChiefComplaintRequestModel(
|
|
|
|
{patientInfo,
|
|
|
|
{patientInfo,
|
|
|
|
String complaintsText,
|
|
|
|
required String complaintsText,
|
|
|
|
String medicationText,
|
|
|
|
required String medicationText,
|
|
|
|
String illnessText}) {
|
|
|
|
required String illnessText}) {
|
|
|
|
return new PostChiefComplaintRequestModel(
|
|
|
|
return new PostChiefComplaintRequestModel(
|
|
|
|
admissionNo: patientInfo.admissionNo != null
|
|
|
|
admissionNo: patientInfo.admissionNo != null
|
|
|
|
? int.parse(patientInfo.admissionNo)
|
|
|
|
? int.parse(patientInfo.admissionNo)
|
|
|
@ -794,13 +793,13 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PostHistoriesRequestModel createPostHistoriesRequestModel(
|
|
|
|
PostHistoriesRequestModel createPostHistoriesRequestModel(
|
|
|
|
{patientInfo, List<MySelectedHistory> myHistoryList}) {
|
|
|
|
{patientInfo, required List<MySelectedHistory> myHistoryList}) {
|
|
|
|
PostHistoriesRequestModel postHistoriesRequestModel =
|
|
|
|
PostHistoriesRequestModel postHistoriesRequestModel =
|
|
|
|
new PostHistoriesRequestModel(doctorID: '');
|
|
|
|
new PostHistoriesRequestModel(doctorID: '');
|
|
|
|
myHistoryList.forEach((history) {
|
|
|
|
myHistoryList.forEach((history) {
|
|
|
|
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
|
|
|
|
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
|
|
|
|
postHistoriesRequestModel.listMedicalHistoryVM = [];
|
|
|
|
postHistoriesRequestModel.listMedicalHistoryVM = [];
|
|
|
|
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
|
|
|
|
postHistoriesRequestModel.listMedicalHistoryVM!.add(ListMedicalHistoryVM(
|
|
|
|
patientMRN: patientInfo.patientMRN,
|
|
|
|
patientMRN: patientInfo.patientMRN,
|
|
|
|
episodeId: patientInfo.episodeNo,
|
|
|
|
episodeId: patientInfo.episodeNo,
|
|
|
|
appointmentNo: patientInfo.appointmentNo,
|
|
|
|
appointmentNo: patientInfo.appointmentNo,
|
|
|
@ -822,7 +821,7 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
|
|
|
|
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
|
|
|
|
null)
|
|
|
|
null)
|
|
|
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
|
|
|
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
|
|
|
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
|
|
|
|
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM!.add(
|
|
|
|
ListHisProgNotePatientAllergyDiseaseVM(
|
|
|
|
ListHisProgNotePatientAllergyDiseaseVM(
|
|
|
|
allergyDiseaseId: allergy.selectedAllergy.id,
|
|
|
|
allergyDiseaseId: allergy.selectedAllergy.id,
|
|
|
|
allergyDiseaseType: allergy.selectedAllergy.typeId,
|
|
|
|
allergyDiseaseType: allergy.selectedAllergy.typeId,
|
|
|
@ -831,9 +830,9 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
appointmentNo: patientInfo.appointmentNo,
|
|
|
|
appointmentNo: patientInfo.appointmentNo,
|
|
|
|
severity: allergy.selectedAllergySeverity.id,
|
|
|
|
severity: allergy.selectedAllergySeverity.id,
|
|
|
|
remarks: allergy.remark,
|
|
|
|
remarks: allergy.remark,
|
|
|
|
createdBy: allergy.createdBy ?? doctorProfile.doctorID,
|
|
|
|
createdBy: allergy.createdBy ?? doctorProfile!.doctorID,
|
|
|
|
createdOn: DateTime.now().toIso8601String(),
|
|
|
|
createdOn: DateTime.now().toIso8601String(),
|
|
|
|
editedBy: doctorProfile.doctorID,
|
|
|
|
editedBy: doctorProfile!.doctorID,
|
|
|
|
editedOn: DateTime.now().toIso8601String(),
|
|
|
|
editedOn: DateTime.now().toIso8601String(),
|
|
|
|
isChecked: allergy.isChecked,
|
|
|
|
isChecked: allergy.isChecked,
|
|
|
|
isUpdatedByNurse: false));
|
|
|
|
isUpdatedByNurse: false));
|
|
|
|