Stream: implementers
Topic: Searching DocumentReference
Ford Parsons (Jan 19 2020 at 04:29):
I'm attempting to query the DocumentReference
endpoint and I'm running into a little trouble. I hope this is the right place to ask.
I'd like to include the content of the clinical note in the results of a single FHIR query (rather than sending a subsequent request to the Binary endpoint). It seems like the _include
querystring parameter should be able to provide this, using something like this:
https://example.org/STU3/DocumentReference?patient=123456789&class=clinical-notes&_include=DocumentReference:content
However, only resources of type DocumentReference
are returned (no Binary
resources in the entry
array)
My question is: 1) Is this something I'm doing wrong, 2) Is this something not supported by my FHIR instance (Epic STU3), or 3) Is this not supported by FHIR?
The FHIR Search document seems to call out this exact use case (i.e., including binary resources), but it doesn't provide a sample query so I might have the syntax wrong.
Thanks for taking a look!
Best,
Ford
Michele Mottini (Jan 19 2020 at 04:45):
Yes, there is something wrong: _include
must use a search parameter - and content
is not a DocumentReference search parameter
Michele Mottini (Jan 19 2020 at 04:47):
Also, I think Epic does not supports _include
at all
Ford Parsons (Jan 19 2020 at 05:15):
Thanks for taking a look, @Michele Mottini . That makes sense.
Is there another technique that people are using to get the Binary content.attachment for a DocumentReference all in one request, or is it typical to use multiple requests?
Michele Mottini (Jan 19 2020 at 05:16):
I don't think it is possible
Ford Parsons (Jan 19 2020 at 05:17):
Also, for what it's worth, Epic does appear to support _include
(at least in their STU3 implementation). For example, this works: https://example.org/STU3/MedicationRequest?patient=12345&_include=MedicationRequest:medication
.
Ford Parsons (Jan 19 2020 at 05:18):
Thanks, appreciate your help @Michele Mottini
Michele Mottini (Jan 19 2020 at 05:22):
Did not even know they have a STU3 implementation now - I was talking about the good old DSTU2 one!
Ford Parsons (Jan 19 2020 at 05:28):
They're just quietly iterating away in Wisconsin!
Here's some of their STU3 documentation if you're interested
Michele Mottini (Jan 19 2020 at 05:35):
(Sort of a strange choice to implement STU3, with everyone going to R4)
Ford Parsons (Jan 19 2020 at 05:40):
Hey, I'm just a customer -- I'll take what I can get!
John Moehrke (Jan 19 2020 at 22:13):
also note that the DocumentReference.content.attachment.url is not defined as a Reference, it is defined as a simple URL. It can be pointing at a Binary, but might be any URL. Thus asking to _include might only work when the attachment is saved as a Binary.
Yunwei Wang (Jan 20 2020 at 16:17):
Epic AppOrchard supports both DSTU2, STU3. They are adding R4 resources since 2019.
Last updated: Apr 12 2022 at 19:14 UTC