|
|
|
|
@ -61,10 +61,18 @@ class RadiologyViewModel extends ChangeNotifier {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> getPatientRadiologyOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async {
|
|
|
|
|
patientRadiologyOrders.clear();
|
|
|
|
|
notifyListeners();
|
|
|
|
|
|
|
|
|
|
final result = await radiologyRepo.getPatientRadiologyOrders();
|
|
|
|
|
|
|
|
|
|
result.fold(
|
|
|
|
|
(failure) async => await errorHandlerService.handleError(failure: failure),
|
|
|
|
|
// (failure) async => await errorHandlerService.handleError(failure: failure),
|
|
|
|
|
(failure) {
|
|
|
|
|
isRadiologyOrdersLoading = false;
|
|
|
|
|
filterSuggestions();
|
|
|
|
|
notifyListeners();
|
|
|
|
|
},
|
|
|
|
|
(apiResponse) {
|
|
|
|
|
if (apiResponse.messageStatus == 2) {
|
|
|
|
|
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
|
|
|
|
|
|