toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = id;
if (rev != null) {
json[r'rev'] = rev;
}
if (created != null) {
json[r'created'] = created;
}
if (modified != null) {
json[r'modified'] = modified;
}
if (author != null) {
json[r'author'] = author;
}
if (responsible != null) {
json[r'responsible'] = responsible;
}
if (medicalLocationId != null) {
json[r'medicalLocationId'] = medicalLocationId;
}
json[r'tags'] = tags.toList();
json[r'codes'] = codes.toList();
if (endOfLife != null) {
json[r'endOfLife'] = endOfLife;
}
if (deletionDate != null) {
json[r'deletionDate'] = deletionDate;
}
if (groupId != null) {
json[r'groupId'] = groupId;
}
if (openingDate != null) {
json[r'openingDate'] = openingDate;
}
if (closingDate != null) {
json[r'closingDate'] = closingDate;
}
if (descr != null) {
json[r'descr'] = descr;
}
if (location != null) {
json[r'location'] = location;
}
if (externalId != null) {
json[r'externalId'] = externalId;
}
if (encounterType != null) {
json[r'encounterType'] = encounterType;
}
json[r'subContacts'] = subContacts.toList();
json[r'services'] = services.toList();
if (healthcarePartyId != null) {
json[r'healthcarePartyId'] = healthcarePartyId;
}
if (modifiedContactId != null) {
json[r'modifiedContactId'] = modifiedContactId;
}
json[r'secretForeignKeys'] = secretForeignKeys.toList();
json[r'cryptedForeignKeys'] = cryptedForeignKeys.map((k, v) => MapEntry(k, v.toList()));
json[r'delegations'] = delegations.map((k, v) => MapEntry(k, v.toList()));
json[r'encryptionKeys'] = encryptionKeys.map((k, v) => MapEntry(k, v.toList()));
if (encryptedSelf != null) {
json[r'encryptedSelf'] = encryptedSelf;
}
return json;
}