|
|
|
@ -60,10 +60,12 @@ class PatientMedicalReportViewModel extends BaseViewModel {
|
|
|
|
|
await _service.addMedicalReport(patient, htmlText);
|
|
|
|
|
if (_service.hasError) {
|
|
|
|
|
error = _service.error;
|
|
|
|
|
await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
|
} else
|
|
|
|
|
await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
{ await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async {
|
|
|
|
@ -71,9 +73,11 @@ class PatientMedicalReportViewModel extends BaseViewModel {
|
|
|
|
|
await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber);
|
|
|
|
|
if (_service.hasError) {
|
|
|
|
|
error = _service.error;
|
|
|
|
|
await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
|
} else
|
|
|
|
|
await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
{
|
|
|
|
|
await getMedicalReportList(patient);
|
|
|
|
|
setState(ViewState.Idle);}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|