FHIR Chat · HAPI FHIR - versioned references · implementers

Stream: implementers

Topic: HAPI FHIR - versioned references


view this post on Zulip Thomas Stigsen (Sep 24 2018 at 09:57):

Hi there implementers
Hope you can help.
We need help with versions being stripped from AudiEvent entitiy references.

We are using a HAPI FHIR client version 3.4 to access a HAPI FHIR server (3.1)
We can not get the AuditEvent.entity.reference to store the version of the resource being accessed.
We are setting the reference like "CarePlan/12345/_history/5"
And this is what goes over the wire.
But the server only seams to store the Id ie. we only get "CarePlan/12345" when reading the AuditEvent
We have tried to set the setDontStripVersionsFromReferencesAtPaths on the parser configuration after creating the context...but no success.
context.getParserOptions()
.setDontStripVersionsFromReferencesAtPaths("AuditEvent.entity.reference");

view this post on Zulip Lloyd McKenzie (Sep 24 2018 at 14:49):

@James Agnew ?

view this post on Zulip James Agnew (Sep 24 2018 at 16:53):

Hi @Thomas Stigsen ,

Have you set the setDontStripVersionsFromReferencesAtPaths setting on the contexts on both the server and the client? This certainly should work.

One other thing to try would be to register a LoggingInterceptor on your client (or on your server) to log the payload just to verify that the version is actually being transmitted (this would confirm that youhave the syntax right in your argument to setDontStripVersionsFromReferencesAtPaths)

view this post on Zulip Thomas Stigsen (Sep 28 2018 at 09:53):

Hi @James Agnew
Thank you for the answer.
I can see in the log that we do decorate the ID's with the version.
So it must be the target FHIR server that is missing the setDontStripVersionsFromReferencesAtPaths in the configuration.
Well get that fixed :-)
Thanks - and have a great weekend


Last updated: Apr 12 2022 at 19:14 UTC