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.
76 lines
2.1 KiB
Dart
76 lines
2.1 KiB
Dart
class RRTRequestModel {
|
|
num patientId;
|
|
int patientOutSa;
|
|
bool isOutPatient;
|
|
int nearestProjectId;
|
|
num longitude;
|
|
num latitude;
|
|
String additionalDetails;
|
|
String nationality;
|
|
num paymentAmount;
|
|
List<Procedures> procedures;
|
|
|
|
RRTRequestModel(
|
|
{this.patientId,
|
|
this.patientOutSa,
|
|
this.isOutPatient,
|
|
this.nearestProjectId,
|
|
this.longitude,
|
|
this.latitude,
|
|
this.additionalDetails,
|
|
this.nationality,
|
|
this.paymentAmount,
|
|
this.procedures});
|
|
|
|
RRTRequestModel.fromJson(Map<String, dynamic> json) {
|
|
patientId = json['patientId'];
|
|
patientOutSa = json['patientOutSa'];
|
|
isOutPatient = json['isOutPatient'];
|
|
nearestProjectId = json['nearestProjectId'];
|
|
longitude = json['longitude'];
|
|
latitude = json['latitude'];
|
|
additionalDetails = json['additionalDetails'];
|
|
nationality = json['nationality'];
|
|
paymentAmount = json['paymentAmount'];
|
|
if (json['procedures'] != null) {
|
|
procedures = <Procedures>[];
|
|
json['procedures'].forEach((v) {
|
|
procedures.add(new Procedures.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['patientId'] = this.patientId;
|
|
data['patientOutSa'] = this.patientOutSa;
|
|
data['isOutPatient'] = this.isOutPatient;
|
|
data['nearestProjectId'] = this.nearestProjectId;
|
|
data['longitude'] = this.longitude;
|
|
data['latitude'] = this.latitude;
|
|
data['additionalDetails'] = this.additionalDetails;
|
|
data['nationality'] = this.nationality;
|
|
data['paymentAmount'] = this.paymentAmount;
|
|
if (this.procedures != null) {
|
|
data['procedures'] = this.procedures.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Procedures {
|
|
String serviceID;
|
|
|
|
Procedures({this.serviceID});
|
|
|
|
Procedures.fromJson(Map<String, dynamic> json) {
|
|
serviceID = json['ServiceID'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['ServiceID'] = this.serviceID;
|
|
return data;
|
|
}
|
|
}
|