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 (objectStoreReference != null) {
json[r'objectStoreReference'] = objectStoreReference;
}
if (documentLocation != null) {
json[r'documentLocation'] = documentLocation;
}
if (documentType != null) {
json[r'documentType'] = documentType;
}
if (documentStatus != null) {
json[r'documentStatus'] = documentStatus;
}
if (externalUri != null) {
json[r'externalUri'] = externalUri;
}
if (mainUti != null) {
json[r'mainUti'] = mainUti;
}
if (name != null) {
json[r'name'] = name;
}
if (version != null) {
json[r'version'] = version;
}
json[r'otherUtis'] = otherUtis.toList();
if (storedICureDocumentId != null) {
json[r'storedICureDocumentId'] = storedICureDocumentId;
}
if (externalUuid != null) {
json[r'externalUuid'] = externalUuid;
}
if (size != null) {
json[r'size'] = size;
}
if (hash != null) {
json[r'hash'] = hash;
}
if (openingContactId != null) {
json[r'openingContactId'] = openingContactId;
}
if (attachmentId != null) {
json[r'attachmentId'] = attachmentId;
}
if (encryptedAttachment != null) {
json[r'encryptedAttachment'] = encryptedAttachment;
}
if (decryptedAttachment != null) {
json[r'decryptedAttachment'] = decryptedAttachment;
}
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;
}