|
|
|
@ -9,9 +9,12 @@ class Device {
|
|
|
|
String number;
|
|
|
|
String number;
|
|
|
|
String assetName;
|
|
|
|
String assetName;
|
|
|
|
String destBuildingName;
|
|
|
|
String destBuildingName;
|
|
|
|
|
|
|
|
int destBuildingId;
|
|
|
|
String destDepartmentName;
|
|
|
|
String destDepartmentName;
|
|
|
|
|
|
|
|
int destDepartmentId;
|
|
|
|
String destRoom;
|
|
|
|
String destRoom;
|
|
|
|
String destFloor;
|
|
|
|
String destFloor;
|
|
|
|
|
|
|
|
int destFloorId;
|
|
|
|
String destSiteName;
|
|
|
|
String destSiteName;
|
|
|
|
|
|
|
|
|
|
|
|
// String brand;
|
|
|
|
// String brand;
|
|
|
|
@ -33,6 +36,9 @@ class Device {
|
|
|
|
// this.brand,
|
|
|
|
// this.brand,
|
|
|
|
// this.model,
|
|
|
|
// this.model,
|
|
|
|
this.modelDefinition,
|
|
|
|
this.modelDefinition,
|
|
|
|
|
|
|
|
this.destFloorId,
|
|
|
|
|
|
|
|
this.destDepartmentId,
|
|
|
|
|
|
|
|
this.destBuildingId,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
factory Device.fromJson(Map<String, dynamic> parsedJson, {bool startKeyWithDest = true}) {
|
|
|
|
factory Device.fromJson(Map<String, dynamic> parsedJson, {bool startKeyWithDest = true}) {
|
|
|
|
@ -45,9 +51,12 @@ class Device {
|
|
|
|
modelDefinition: ModelDefinition.fromJson(parsedJson["modelDefinition"]),
|
|
|
|
modelDefinition: ModelDefinition.fromJson(parsedJson["modelDefinition"]),
|
|
|
|
hospital: Hospital.fromJson(parsedJson["site"]),
|
|
|
|
hospital: Hospital.fromJson(parsedJson["site"]),
|
|
|
|
destBuildingName: startKeyWithDest ? parsedJson["destBuildingName"] : parsedJson['building']['name'],
|
|
|
|
destBuildingName: startKeyWithDest ? parsedJson["destBuildingName"] : parsedJson['building']['name'],
|
|
|
|
|
|
|
|
destBuildingId: startKeyWithDest ? parsedJson["destBuildingName"] : parsedJson['building']['id'],
|
|
|
|
destDepartmentName: startKeyWithDest ? parsedJson["destDepartmentName"] : parsedJson['department']['departmentName'],
|
|
|
|
destDepartmentName: startKeyWithDest ? parsedJson["destDepartmentName"] : parsedJson['department']['departmentName'],
|
|
|
|
|
|
|
|
destDepartmentId: startKeyWithDest ? parsedJson["destDepartmentName"] : parsedJson['department']['id'],
|
|
|
|
destRoom: startKeyWithDest ? parsedJson["destRoom"] : parsedJson['room'],
|
|
|
|
destRoom: startKeyWithDest ? parsedJson["destRoom"] : parsedJson['room'],
|
|
|
|
destFloor: startKeyWithDest ? parsedJson["destFloor"] : parsedJson['floor']['name'],
|
|
|
|
destFloor: startKeyWithDest ? parsedJson["destFloor"] : parsedJson['floor']['name'],
|
|
|
|
|
|
|
|
destFloorId: startKeyWithDest ? null : parsedJson['floor']['id'],
|
|
|
|
destSiteName: parsedJson['destSiteName']
|
|
|
|
destSiteName: parsedJson['destSiteName']
|
|
|
|
// parsedJson["modelDefinition"] == null ? "" :
|
|
|
|
// parsedJson["modelDefinition"] == null ? "" :
|
|
|
|
// parsedJson["modelDefinition"]["manufacturerName"],
|
|
|
|
// parsedJson["modelDefinition"]["manufacturerName"],
|
|
|
|
|