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.
27 lines
1.0 KiB
Dart
27 lines
1.0 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/core/model/active_medications/ActivePrescriptionReport.dart';
|
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
|
|
|
class ActiveMedicationsService extends BaseService{
|
|
|
|
List<ActivePrescriptionReport> activePrescriptionReport = List();
|
|
|
|
getActiveMedication() async {
|
|
hasError = false;
|
|
super.error = "";
|
|
Map<String, dynamic> body = Map();
|
|
body['isDentalAllowedBackend'] = false;
|
|
await baseAppClient.post(ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID,
|
|
onSuccess: (response, statusCode) async {
|
|
activePrescriptionReport.clear();
|
|
response['List_ActiveGetPrescriptionReportByPatientID'].forEach((appoitment) {
|
|
activePrescriptionReport
|
|
.add(ActivePrescriptionReport.fromJson(appoitment));
|
|
});
|
|
}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
}
|
|
|
|
} |