Trying to retrieve provenance for a patient with version history

64 views
Skip to first unread message

Joel Turner

unread,
Feb 23, 2021, 4:26:51 PM2/23/21
to HAPI FHIR
Hi,

We are running hapi-fhir version 5.2.0 and we are experimenting with versioned provenance.

Business problem: we want to look up which agent updated a specific version of a patient. We have the patient and version e.g. "Patient/102/_history/20" - and we want to retrieve the specific provenance record for that change.

We call setDontStripVersionsFromReferencesAtPaths("Provenance.target"); to make sure the provenance targets include the version of (in this case) Patient.

example: 
"target": [
        {
             "reference": "Patient/102/_history/20"
        },
],

We then try to retrieve just that provenance record by the following url:

GET "{{fhir_url}}/Provenance?target=Patient/102/_history/20"

however, what gets returned is all of the provenance records for Patient/102.

Is this the expected behavior? Is there a different way to get the result we are hoping for?


James Agnew

unread,
Feb 23, 2021, 4:31:05 PM2/23/21
to jtu...@zeus.health, HAPI FHIR
Unfortunately this isn't currently supported. It could presumably be added, given that we now do store reference versions in the reference index table. Enhancement request ticket or PR welcomed.

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 on the web visit https://groups.google.com/d/msgid/hapi-fhir/b7ef9d45-fc89-46c6-99f7-a8f3867a817fn%40googlegroups.com.

Joel Turner

unread,
Feb 23, 2021, 4:34:05 PM2/23/21
to HAPI FHIR
Hi James,

Thanks for the quick response. 

-Joel

Reply all
Reply to author
Forward
0 new messages