Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-27861

Clarify use of wildcard (*) for _include/_revinclude

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Considered - Question answered
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R4
    • FHIR Infrastructure
    • Search
    • Hide

      Lee, thanks for the detailed background and clear question!

      You are 100% correct in your interpretations for #1 and #2.

      Note that there is community discussion underway exploring whether something should be added to support broader _revinclude queries (see https://jira.hl7.org/browse/FHIR-24888).

      Note that HAPI currently supports a non-standard syntax and allows searches like https://hapi.fhir.org/baseR4/Patient?_id=pat1&_revinclude=* – which probably contributes to some of the confusion you're hearing in the community.

      Show
      Lee, thanks for the detailed background and clear question! You are 100% correct in your interpretations for #1 and #2. Note that there is community discussion underway exploring whether something should be added to support broader _revinclude queries (see  https://jira.hl7.org/browse/FHIR-24888 ). Note that HAPI currently supports a non-standard syntax and allows searches like https://hapi.fhir.org/baseR4/Patient?_id=pat1&_revinclude=* – which probably contributes to some of the confusion you're hearing in the community.

    Description

      The CARIN BB IG is considering adding an implicit "_include=*" on searches.

      Ignoring whether that is a good idea or not, I noticed that the syntax here doesn't match what I would expect.

      https://www.hl7.org/fhir/search.html#revinclude says that values for this search parameter should be 2 or 3 parts:

      • The name of the source resource from which the join comes
      • The name of the search parameter which must be of type reference
      • (Optional) A specific of type of target resource (for when the search parameter refers to multiple possible target types)

      It goes on to say that include and _revinclude use the wild card "*" for the _search parameter name (which I interpreted to be just the second part).

       

      So, to me, it is fairly clear that:
      1. an _include search for an ExplanationOfBenefits and all search parameters it references would look like this:  _include=ExplanationOfBenefit:*

      and

      2. there is no way to perform a _revinclude in which any resource type referencing the current resource would be included. (i.e. _revinclude=* or _revinclude=:) is not allowed

       

      However, when I pressed this issue at https://chat.fhir.org/#narrow/stream/204607-CARIN-Blue.20Button.20IG/topic/Call.20Recaps/near/201662385 it seems that everyone else has been using `_include=*` and not including the resource type.

       

      Which is it?!

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lmsurprenant Lee Surprenant
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: