add new referral service
parent
8d5cd9eb90
commit
fd790978c4
Binary file not shown.
|
After Width: | Height: | Size: 348 KiB |
@ -0,0 +1,48 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
|
||||||
|
class ReferralService extends BaseService {
|
||||||
|
|
||||||
|
//TODO Jammal
|
||||||
|
Future referralPatient(
|
||||||
|
{String admissionNo,
|
||||||
|
String roomID,
|
||||||
|
String referralClinic,
|
||||||
|
String referralDoctor,
|
||||||
|
String patientID,
|
||||||
|
String patientTypeID,
|
||||||
|
String referringClinic,
|
||||||
|
String referringDoctorRemarks,
|
||||||
|
String priority,String frequency,String extension}) async {
|
||||||
|
await getDoctorProfile();
|
||||||
|
hasError = false;
|
||||||
|
Map<String, dynamic> body = Map();
|
||||||
|
body['ProjectID'] = doctorProfile.projectID;
|
||||||
|
body['AdmissionNo'] = admissionNo;
|
||||||
|
body['RoomID'] = roomID;
|
||||||
|
body['ReferralClinic'] = referralClinic;
|
||||||
|
body['ReferralDoctor'] = referralDoctor;
|
||||||
|
body['CreatedBy'] = doctorProfile.doctorID;
|
||||||
|
body['EditedBy'] = doctorProfile.doctorID;
|
||||||
|
body['PatientID'] = patientID;
|
||||||
|
body['PatientTypeID'] = patientTypeID;
|
||||||
|
body['ReferringClinic'] = referringClinic;
|
||||||
|
body['ReferringDoctor'] = doctorProfile.doctorID;
|
||||||
|
body['ReferringDoctorRemarks'] = referringDoctorRemarks;
|
||||||
|
body['Priority'] = priority;
|
||||||
|
body['Frequency'] = frequency;
|
||||||
|
body['Extension'] = extension;
|
||||||
|
|
||||||
|
await baseAppClient.post(
|
||||||
|
REFER_TO_DOCTOR,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
|
||||||
|
},
|
||||||
|
onFailure: (String error, int statusCode) {
|
||||||
|
hasError = true;
|
||||||
|
super.error = error;
|
||||||
|
},
|
||||||
|
body: body,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue