WD: post physical Examination.

update_flutter_3.24_vida_plus_episode_v2
taha.alam 11 months ago
parent d098b419e2
commit 2fbb25de77

@ -148,7 +148,9 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.auditDiagnosislist;
List<GeneralSpeciality> get speciality => _SOAPService.generalSpeciality;
List<ProgressNote> get progressNote => _SOAPService.patientProgressNoteListVidaPlus;
List<ProgressNote> get progressNote =>
_SOAPService.patientProgressNoteListVidaPlus;
Map<String, List<Category>> get specialityDetails =>
_SOAPService.specialityDetails;
@ -1179,11 +1181,16 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future<bool> postPhysicalExamination(PatiantInformtion patientInfo,
List<Category> physicalExamination) async {
Future<bool> postPhysicalExamination(PatiantInformtion patientInfo) async {
setState(ViewState.BusyLocal);
bool result = await _SOAPService.postPhysicalExamination(
patientInfo, physicalExamination);
List<Category> mappedItems = [];
for (List<Category> category in specialityDetails.values) {
var selectedCategory =
category.where((value) => value.isSelected == true);
mappedItems.addAll(selectedCategory);
}
bool result =
await _SOAPService.postPhysicalExamination(patientInfo, mappedItems);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
@ -1203,9 +1210,11 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
void getSpecialityDetails(String speciality,int? specialityId, PatiantInformtion patientInfo) async {
void getSpecialityDetails(String speciality, int? specialityId,
PatiantInformtion patientInfo) async {
setState(ViewState.BusyLocal);
await _SOAPService.getSpecialityDetails(speciality,specialityId, patientInfo);
await _SOAPService.getSpecialityDetails(
speciality, specialityId, patientInfo);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
@ -1221,20 +1230,6 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.showAuditBottomSheet = status;
}
/**
* todo as physical examination is having some issue and under discussion
*/
void savePhysicalexamination() {
var mappedItems =
setState(ViewState.BusyLocal);
// await _SOAPService.getSpecialityDetails(speciality);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
void getProgressNote(PatiantInformtion patientInformation) async {
setState(ViewState.BusyLocal);
await _SOAPService.getProgressNoteNew(patientInformation);

@ -112,7 +112,7 @@ class _AddDetailsToExaminationVidaPlusState
fontColor: Colors.white,
fontWeight: FontWeight.w600,
onPressed: () async {
model.savePhysicalexamination();
model.postPhysicalExamination(widget.patientInfo,);
},
),
),

Loading…
Cancel
Save