ehealthsuisse / ch-atc

The profile CH:ATC defines the audit trail consumption requirements for the EPR in Switzerland which a community has to provide for a patients audit trail.
MIT License
2 stars 1 forks source link

Profiles: why using base64 for AuditEvent.entity.detail.value #41

Open qligier opened 2 weeks ago

qligier commented 2 weeks ago

In multiple profiles (e.g. DocumentAuditEvent), the type of AuditEvent.entity.detail.value has been fixed to base64Binary, despite the value being a string, not a binary blob.

The FHIR spec says:

The value can be string when known to be a string, else base64 encoding should be used to protect binary or undefined content.

When storing OIDs, UUIDs, format codes and titles, we are sure they are strings, nothing else. It hurts the readability of the resource for no gain. The reason is probably the DICOM way of using base64 values in ParticipantObjectDetail.

oliveregger commented 2 weeks ago

Most probably it came from https://hl7.org/fhir/STU3/auditevent.html where only base64 was allowed.