You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
Dart
33 lines
1.3 KiB
Dart
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart';
|
|
import 'package:doctor_app_flutter/core/service/patient/LiveCarePatientServices.dart';
|
|
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
import '../../locator.dart';
|
|
|
|
class LiveCarePatientViewModel extends BaseViewModel {
|
|
List<PatiantInformtion> filterData = [];
|
|
|
|
LiveCarePatientServices _liveCarePatientServices =
|
|
locator<LiveCarePatientServices>();
|
|
|
|
getPendingPatientERForDoctorApp() async {
|
|
setState(ViewState.BusyLocal);
|
|
//TODO Change it to dynamic
|
|
PendingPatientERForDoctorAppRequestModel
|
|
pendingPatientERForDoctorAppRequestModel =
|
|
PendingPatientERForDoctorAppRequestModel(doctorID: 9920,sErServiceID: "7,3", outSA: false);
|
|
await _liveCarePatientServices
|
|
.getPendingPatientERForDoctorApp(pendingPatientERForDoctorAppRequestModel);
|
|
if (_liveCarePatientServices.hasError) {
|
|
error = _liveCarePatientServices.error;
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
} else {
|
|
filterData = _liveCarePatientServices.patientList;
|
|
setState(ViewState.Idle);
|
|
}
|
|
}
|
|
}
|