TAG META.SECURITY HAPI FHIR

11 views
Skip to first unread message

Michele S

unread,
Oct 20, 2025, 10:37:47 AMOct 20
to HAPI FHIR

When using a HAPI FHIR server, I noticed that when performing a PUT operation on a resource and updating the meta.security tag, the information is appended instead of being replaced.

According to the FHIR R4 standard, a PUT operation should replace the entire resource, including the meta fields.
How can I solve this problem so that the operation updates (replaces) the tag instead of appending it?

Thanks!

James Agnew

unread,
Oct 20, 2025, 10:58:40 AMOct 20
to Michele S, HAPI FHIR
Hi Michele,

FYI: The standard actually recommends the behaviour you're seeing. Tags and security labels work differently from the rest of the spec. See here: http://hl7.org/fhir/resource.html#tag-updates

> When a resource is updated (e.g. on the RESTful interface), servers generally follow this pattern:
> (...)
> Merge existing and new security labels

This isn't a hard SHALL requirement though, so servers don't have to work this way. You can change the "Tag Storage Mode" from the default of VERSIONED to a mode called INLINE which makes tag storage work as a snapshot just like the rest of the resource. This is available on the JpaStorageSettings bean - it looks like this hasn't yet been exposed as a setting on the JPA Starter project yet, so this would need to be added.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hapi-fhir/634cabe1-4d8d-4590-9a2c-0b6ed9653657n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages