|
|
|
|
@ -519,8 +519,8 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onAddMedicationStart() async {
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
Future onAddMedicationStart({required bool allowSetState}) async {
|
|
|
|
|
if (allowSetState) setState(ViewState.Busy);
|
|
|
|
|
List services = [];
|
|
|
|
|
if (medicationStrengthList.length == 0) {
|
|
|
|
|
if (services.isEmpty) {
|
|
|
|
|
@ -562,9 +562,8 @@ class SOAPViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
|
if (_SOAPService.hasError || _prescriptionService.hasError) {
|
|
|
|
|
error = _SOAPService.error! + _prescriptionService.error!;
|
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
|
} else
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
if (allowSetState) setState(ViewState.ErrorLocal);
|
|
|
|
|
} else if (allowSetState) setState(ViewState.Idle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
callAddAssessmentLookupsServices({String searchKey = "", bool allowSetState = true}) async {
|
|
|
|
|
|