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.
PatientApp-KKUMC/lib/core/service/PrescriptionDeliveryService...

40 lines
1.6 KiB
Dart

import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PrescriptionDeliveryService extends BaseService {
Future insertDeliveryOrder({int lineItemNo, double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['LineItemNo'] = lineItemNo;
body['Latitude'] = latitude;
body['Longitude'] = longitude;
body['AppointmentNo'] = appointmentNo;
body['CreatedBy'] = createdBy;
body['DischargeID'] = dischargeID;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) {
var asd = "";
}, onFailure: (String error, int statusCode) {
hasError = true;
print(error);
super.error = error;
}, body: body);
}
Future insertDeliveryOrderRC({double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID, int projectID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['latitude'] = latitude;
body['longitude'] = longitude;
body['AppointmentNo'] = appointmentNo.toString();
// body['CreatedBy'] = createdBy;
body['DischargeID'] = dischargeID.toString();
body['ProjectID'] = projectID;
await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
print(error);
super.error = error;
}, body: body);
}
}