DocumentTemplate.fromJSON constructor
DocumentTemplate.fromJSON(
- Map<String, dynamic> data
)
Implementation
factory DocumentTemplate.fromJSON(Map<String, dynamic> data) {
return DocumentTemplate(
(data["id"] as String),
rev: (data["rev"] as String?),
created: (data["created"] as int?),
modified: (data["modified"] as int?),
author: (data["author"] as String?),
responsible: (data["responsible"] as String?),
medicalLocationId: (data["medicalLocationId"] as String?),
tags: (data["tags"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
codes: (data["codes"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
endOfLife: (data["endOfLife"] as int?),
deletionDate: (data["deletionDate"] as int?),
attachment: data["attachment"] == null ? null : base64Decode(data["attachment"] as String),
documentType: data["documentType"] == null ? null : DocumentType.fromJSON(data["documentType"]),
mainUti: (data["mainUti"] as String?),
name: (data["name"] as String?),
otherUtis: (data["otherUtis"] as List<dynamic>).map((x0) => (x0 as String) ).toSet(),
attachmentId: (data["attachmentId"] as String?),
version: data["version"] == null ? null : ReportVersion.fromJSON(data["version"]),
owner: (data["owner"] as String?),
guid: (data["guid"] as String?),
group: data["group"] == null ? null : DocumentGroup.fromJSON(data["group"]),
descr: (data["descr"] as String?),
disabled: (data["disabled"] as String?),
specialty: data["specialty"] == null ? null : CodeStub.fromJSON(data["specialty"]),
);
}