encode static method
Implementation
static Map<String, dynamic> encode(EncryptedHealthElement value) {
Map<String, dynamic> entityAsMap = {
"id" : value.id,
"identifiers" : value.identifiers.map((x0) => Identifier.encode(x0)).toList(),
"rev" : value.rev,
"created" : value.created,
"modified" : value.modified,
"author" : value.author,
"responsible" : value.responsible,
"medicalLocationId" : value.medicalLocationId,
"tags" : value.tags.map((x0) => CodeStub.encode(x0)).toList(),
"codes" : value.codes.map((x0) => CodeStub.encode(x0)).toList(),
"endOfLife" : value.endOfLife,
"deletionDate" : value.deletionDate,
"healthElementId" : value.healthElementId,
"valueDate" : value.valueDate,
"openingDate" : value.openingDate,
"closingDate" : value.closingDate,
"descr" : value.descr,
"note" : value.note,
"notes" : value.notes.map((x0) => Annotation.encode(x0)).toList(),
"relevant" : value.relevant,
"idOpeningContact" : value.idOpeningContact,
"idClosingContact" : value.idClosingContact,
"idService" : value.idService,
"status" : value.status,
"laterality" : value.laterality == null ? null : Laterality.encode(value.laterality!),
"plansOfAction" : value.plansOfAction.map((x0) => EncryptedPlanOfAction.encode(x0)).toList(),
"episodes" : value.episodes.map((x0) => EncryptedEpisode.encode(x0)).toList(),
"careTeam" : value.careTeam.map((x0) => EncryptedCareTeamMember.encode(x0)).toList(),
"secretForeignKeys" : value.secretForeignKeys.map((x0) => x0).toList(),
"cryptedForeignKeys" : value.cryptedForeignKeys.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
"delegations" : value.delegations.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
"encryptionKeys" : value.encryptionKeys.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
"encryptedSelf" : value.encryptedSelf,
"securityMetadata" : value.securityMetadata == null ? null : SecurityMetadata.encode(value.securityMetadata!)
};
return entityAsMap;
}