Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into sultan
commit
c5f12ca307
@ -0,0 +1,108 @@
|
|||||||
|
class ReferralRequest {
|
||||||
|
String roomID;
|
||||||
|
String referralClinic;
|
||||||
|
String referralDoctor;
|
||||||
|
int createdBy;
|
||||||
|
int editedBy;
|
||||||
|
int patientID;
|
||||||
|
int patientTypeID;
|
||||||
|
int referringClinic;
|
||||||
|
int referringDoctor;
|
||||||
|
int projectID;
|
||||||
|
int admissionNo;
|
||||||
|
String referringDoctorRemarks;
|
||||||
|
String priority;
|
||||||
|
String frequency;
|
||||||
|
String extension;
|
||||||
|
int languageID;
|
||||||
|
String stamp;
|
||||||
|
String iPAdress;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String tokenID;
|
||||||
|
String sessionID;
|
||||||
|
bool isLoginForDoctorApp;
|
||||||
|
bool patientOutSA;
|
||||||
|
|
||||||
|
ReferralRequest(
|
||||||
|
{this.roomID,
|
||||||
|
this.referralClinic,
|
||||||
|
this.referralDoctor,
|
||||||
|
this.createdBy,
|
||||||
|
this.editedBy,
|
||||||
|
this.patientID,
|
||||||
|
this.patientTypeID,
|
||||||
|
this.referringClinic,
|
||||||
|
this.referringDoctor,
|
||||||
|
this.projectID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.referringDoctorRemarks,
|
||||||
|
this.priority,
|
||||||
|
this.frequency,
|
||||||
|
this.extension,
|
||||||
|
this.languageID,
|
||||||
|
this.stamp,
|
||||||
|
this.iPAdress,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.tokenID,
|
||||||
|
this.sessionID,
|
||||||
|
this.isLoginForDoctorApp,
|
||||||
|
this.patientOutSA});
|
||||||
|
|
||||||
|
ReferralRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
roomID = json['RoomID'];
|
||||||
|
referralClinic = json['ReferralClinic'];
|
||||||
|
referralDoctor = json['ReferralDoctor'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
referringClinic = json['ReferringClinic'];
|
||||||
|
referringDoctor = json['ReferringDoctor'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
referringDoctorRemarks = json['ReferringDoctorRemarks'];
|
||||||
|
priority = json['Priority'];
|
||||||
|
frequency = json['Frequency'];
|
||||||
|
extension = json['Extension'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
stamp = json['stamp'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['RoomID'] = this.roomID;
|
||||||
|
data['ReferralClinic'] = this.referralClinic;
|
||||||
|
data['ReferralDoctor'] = this.referralDoctor;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['ReferringClinic'] = this.referringClinic;
|
||||||
|
data['ReferringDoctor'] = this.referringDoctor;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['ReferringDoctorRemarks'] = this.referringDoctorRemarks;
|
||||||
|
data['Priority'] = this.priority;
|
||||||
|
data['Frequency'] = this.frequency;
|
||||||
|
data['Extension'] = this.extension;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['stamp'] = this.stamp;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,48 +1,46 @@
|
|||||||
import 'package:doctor_app_flutter/config/config.dart';
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/ReferralRequest.dart';
|
||||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||||
|
|
||||||
class ReferralService extends BaseService {
|
class ReferralService extends BaseService {
|
||||||
|
|
||||||
//TODO Jammal
|
|
||||||
Future referralPatient(
|
Future referralPatient(
|
||||||
{String admissionNo,
|
{int admissionNo,
|
||||||
String roomID,
|
String roomID,
|
||||||
String referralClinic,
|
int referralClinic,
|
||||||
String referralDoctor,
|
int referralDoctor,
|
||||||
String patientID,
|
int patientID,
|
||||||
String patientTypeID,
|
int patientTypeID,
|
||||||
String referringClinic,
|
int priority,
|
||||||
|
int frequency,
|
||||||
String referringDoctorRemarks,
|
String referringDoctorRemarks,
|
||||||
String priority,String frequency,String extension}) async {
|
String extension}) async {
|
||||||
await getDoctorProfile();
|
await getDoctorProfile();
|
||||||
hasError = false;
|
ReferralRequest referralRequest = ReferralRequest();
|
||||||
Map<String, dynamic> body = Map();
|
referralRequest.admissionNo = admissionNo;
|
||||||
body['ProjectID'] = doctorProfile.projectID;
|
referralRequest.roomID = roomID;
|
||||||
body['AdmissionNo'] = admissionNo;
|
referralRequest.referralClinic = referralClinic.toString();
|
||||||
body['RoomID'] = roomID;
|
referralRequest.referralDoctor = referralDoctor.toString();
|
||||||
body['ReferralClinic'] = referralClinic;
|
referralRequest.patientID = patientID;
|
||||||
body['ReferralDoctor'] = referralDoctor;
|
referralRequest.patientTypeID = patientTypeID;
|
||||||
body['CreatedBy'] = doctorProfile.doctorID;
|
referralRequest.priority = priority.toString();
|
||||||
body['EditedBy'] = doctorProfile.doctorID;
|
referralRequest.frequency = frequency.toString();
|
||||||
body['PatientID'] = patientID;
|
referralRequest.referringDoctorRemarks = referringDoctorRemarks;
|
||||||
body['PatientTypeID'] = patientTypeID;
|
referralRequest.referringClinic = doctorProfile.clinicID;
|
||||||
body['ReferringClinic'] = referringClinic;
|
referralRequest.referringDoctor = doctorProfile.doctorID;
|
||||||
body['ReferringDoctor'] = doctorProfile.doctorID;
|
referralRequest.extension = extension;
|
||||||
body['ReferringDoctorRemarks'] = referringDoctorRemarks;
|
referralRequest.editedBy = doctorProfile.doctorID;
|
||||||
body['Priority'] = priority;
|
referralRequest.createdBy = doctorProfile.doctorID;
|
||||||
body['Frequency'] = frequency;
|
referralRequest.patientOutSA = false;
|
||||||
body['Extension'] = extension;
|
|
||||||
|
|
||||||
await baseAppClient.post(
|
await baseAppClient.post(
|
||||||
REFER_TO_DOCTOR,
|
REFER_TO_DOCTOR,
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
onSuccess: (dynamic response, int statusCode) {},
|
||||||
|
|
||||||
},
|
|
||||||
onFailure: (String error, int statusCode) {
|
onFailure: (String error, int statusCode) {
|
||||||
hasError = true;
|
hasError = true;
|
||||||
super.error = error;
|
super.error = error;
|
||||||
},
|
},
|
||||||
body: body,
|
body: referralRequest.toJson(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue