Searching Bundles with "composition" search parameter

449 views
Skip to first unread message

grazian...@yahoo.it

unread,
Apr 24, 2020, 11:04:30 AM4/24/20
to HAPI FHIR
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:



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

Victoria Tjia

unread,
Dec 21, 2022, 12:46:50 AM12/21/22
to HAPI FHIR
Hi, is there any solution regarding this issue? Thank you

Victoria

洪彬彬

unread,
May 19, 2023, 2:58:38 AM5/19/23
to HAPI FHIR
Hi, is there any solution regarding this issue? Thank you
The queary api:
1. yyy/fhir/Bundle?type=document&composition=1143
2.  yyy/fhir/Bundle?composition=1143
3. yyy/fhir/Bundle?composition=Composition/1143  

Created document bundle 
{
    "resourceType""Bundle",
    "id""1144",
    "meta": {
        "versionId""1",
        "lastUpdated""2023-05-19T14:27:54.501+08:00",
        "source""#BAYpg5W2h2Lx7Gce"
    },
    "type""document",
    "entry": [
        {
            "fullUrl""yyy/Composition/1143",
            "resource": {
                "resourceType""Composition",
                "id""1143",
                "meta": {
                    "versionId""1",
                    "lastUpdated""2023-05-19T14:27:54.409+08:00"
                },
                "status""final",
                "type": {
                    "coding": [
                        {
                            "system""xxx",
                            "code""xxx",
                            "display""xxx"
                        }
                    ]
                },
                "category": [
                    {
                        "coding": [
                            {
                                "system""http://loinc.org",
                                "code""LP173421-1",
                                "display""Report"
                            }
                        ]
                    }
                ],
                "subject": {
                    "reference""Patient/xxx",
                    "display""xxx"
                },
                "date""xxx",
                "author": [
                    {
                        "reference""PractitionerRole/xxx",
                        "display""xxx"
                    }
                ],
                "title""xxx",
                "custodian": {
                    "reference""Organization/xxx",
                    "display""xxx Hospital"
                },
                "section": [
                    {
                        "entry": [
                            {
                                "reference""Patient/xxx"
                            },
                            {
                                "reference""Organization/xxx"
                            },
                            {
                                "reference""PractitionerRole/xxx"
                            },
                            {
                                "reference""DocumentReference/xxx"
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

Jeshika

Victoria Tjia 在 2022年12月21日 星期三下午1:46:50 [UTC+8] 的信中寫道:

James Agnew

unread,
May 19, 2023, 9:16:03 AM5/19/23
to 洪彬彬, HAPI FHIR
Bundle SearchParameters are a bit weird, because they chain into the Bundle as oppposed to across resource boundaries. You need to define SearchParameters for the complete chain to make this work. This is described here: https://smilecdr.com/docs/fhir_storage_relational/chained_searches_and_sorts.html#document-and-message-search-parameters

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/82bc92cb-db90-425f-82e0-325282b497fan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages