WD: post physical Examination.

update_flutter_3.24_vida_plus_episode_v2
taha.alam 1 year ago
parent d098b419e2
commit 2fbb25de77

@ -148,7 +148,9 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.auditDiagnosislist; _SOAPService.auditDiagnosislist;
List<GeneralSpeciality> get speciality => _SOAPService.generalSpeciality; List<GeneralSpeciality> get speciality => _SOAPService.generalSpeciality;
List<ProgressNote> get progressNote => _SOAPService.patientProgressNoteListVidaPlus;
List<ProgressNote> get progressNote =>
_SOAPService.patientProgressNoteListVidaPlus;
Map<String, List<Category>> get specialityDetails => Map<String, List<Category>> get specialityDetails =>
_SOAPService.specialityDetails; _SOAPService.specialityDetails;
@ -1179,11 +1181,16 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future<bool> postPhysicalExamination(PatiantInformtion patientInfo, Future<bool> postPhysicalExamination(PatiantInformtion patientInfo) async {
List<Category> physicalExamination) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
bool result = await _SOAPService.postPhysicalExamination( List<Category> mappedItems = [];
patientInfo, physicalExamination); 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) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -1203,9 +1210,11 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
void getSpecialityDetails(String speciality,int? specialityId, PatiantInformtion patientInfo) async { void getSpecialityDetails(String speciality, int? specialityId,
PatiantInformtion patientInfo) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.getSpecialityDetails(speciality,specialityId, patientInfo); await _SOAPService.getSpecialityDetails(
speciality, specialityId, patientInfo);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -1221,20 +1230,6 @@ class SOAPViewModel extends BaseViewModel {
_SOAPService.showAuditBottomSheet = status; _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 { void getProgressNote(PatiantInformtion patientInformation) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _SOAPService.getProgressNoteNew(patientInformation); await _SOAPService.getProgressNoteNew(patientInformation);

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

Loading…
Cancel
Save