Stream: hapi
Topic: Query on Bundle of type 'document'
Alessio Graziani (May 02 2020 at 12:37):
Hi all,
I'm querying the Bundle resource, to retrieve a Bundle of type "document" that contains a specific instance of Composition (as the first entry). The problem is that I don't get any results back, it seems like the "composition" search parameter is not taken into account. Am I doing something wrong or the search parameter is not supported?
1) These are examples of query I'd like to submit:
http://localhost:8080/NCP/fhir/Bundle?composition=Composition/53
http://localhost:8080/NCP/fhir/Bundle?type=document&composition.type=http://loinc.org|60591-5
2) this is the created Bundle:
{
"resourceType": "Bundle",
"id": "52",
"meta": {
"versionId": "1",
"lastUpdated": "2020-04-24T16:32:43.170+02:00",
"source": "#eDCJBwn2rScDUh79"
},
"type": "document",
"entry": [
{
"fullUrl": "Composition/53",
"resource": {
"resourceType": "Composition",
"id": "53",
"status": "final",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "60591-5",
"display": "Profilo sanitario sintetico"
}
]
},
"subject": {
"reference": "urn:uuid:561bbebe-4679-49e4-a572-eb2f39353524"
},
"title": "Patient Summary di: Duck [Donald]"
}
},
{
"fullUrl": "Patient/54",
"resource": {
"resourceType": "Patient",
"id": "54",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Donald <b>DUCK </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>DNDDCKABCDEFG</td></tr></tbody></table></div>"
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "TAX"
}
]
},
"value": "DNDDCKABCDEFG"
}
],
"name": [
{
"family": "Duck",
"given": [
"Donald"
]
}
],
"gender": "male"
}
}
]
}
3) I'm running on hapi fhir server: version 4.1.0 - Rev 03163c2cf5, with embedded DB
Thanks
Alessio
James Agnew (May 04 2020 at 21:43):
The Bundle:composition search parameter does not currently work unfortunately. It is very different from all other SearchParams and needs its own indexing strategy
Alessio Graziani (May 05 2020 at 15:24):
Thanks @James Agnew
We're using FHIR in an EU research project (InteropEHRate) and we stored a patient summary instance (compliant to IPS) into our customized HAPI FHIR server. Now we're trying to retrieve it, for us, the best way to do it is to query for Bundle using "composition" search parameter. Unfortunately, it does not work. We're able to contribute to developing this functionality, but we need a little bit of initial help. Another doubt regarding this approach is related to potential security issues: how can a security interceptor assure that the retrieved bundle contains only data in the compartment of the Patient (or, how can the interceptor assure that the instance of Bundle refers to the requesting patient)?
As an alternative, we're currently using the $document operation on the Composition instance (don't know why it does not create "fullUrl", but only partial, so we added an interceptor to modify this Bundle).
Cheers and thanks
Alessio
Last updated: Apr 12 2022 at 19:14 UTC