Question
· Jul 1, 2018

How to add Chained parameters on search operation to FHIRServer?

Hi guys,

I'm helping our client to pass a Chinese CHIMA FHIR certification, which requires to search  encounter by subject(Patient) name.

I noticed that in FHIR specification, chained parameters were included, as below:

2.21.1.4.13 Chained parameters 

In order to save a client from performing a series of search operations, reference parameters may be "chained" by appending them with a period (.) followed by the name of a search parameter defined for the target resource. This can be done recursively, following a logical path through a graph of related resources, separated by .. For instance, given that the resource DiagnosticReport has a search parameter named subject, which is usually a reference to a Patient resource, and the Patient resource includes a parameter namewhich searches on patient name, then the search

 GET [base]/DiagnosticReport?subject.name=peter

is a request to return all the lab reports that have a subject whose name includes "peter". Because the Diagnostic Report subject can be one of a set of different resources, it's necessary to limit the search to a particular type:

 GET [base]/DiagnosticReport?subject:Patient.name=peter

This request returns all the lab reports that have a subject which is a patient, whose name includes "peter".

Advanced Search Note: Where a chained parameter searches a resource reference that may have more than one type of resource as its target, the parameter chain may end up referring to search parameters with the same name on more than one kind of resource at once. Servers SHOULD reject a search where the logical id refers to more than one matching resource across different types. For example, the client has to specify the type explicitly using the syntax in the second example above.

I wonder whether this feature has already be included in our FHIRServer demo? If not, how can I add such a feature to the existing demo? Thanks.

Another thinking is to add the display value of encounter.subject as a search parameter to pass this certification, so  I tried to add a search parameter to HS.FHIR.Repository.Resource.Encounter as following:

<entry>
    <fullUrl value="http://hl7.org/fhir/SearchParameter/Encounter-subject-name"/>
    <resource>
      <SearchParameter>
        <id value="Encounter-subject-name"/>
        <url value="http://hl7.org/fhir/SearchParameter/Encounter-subject-name"/>
        <name value="subject-name"/>
        <publisher value="Health Level Seven International (Patient Administration)"/>
        <contact>
          <telecom>
            <system value="other"/>
            <value value="http://hl7.org/fhir"/>
          </telecom>
        </contact>
        <contact>
          <telecom>
            <system value="other"/>
            <value value="http://www.hl7.org/Special/committees/pafm/index.cfm"/>
          </telecom>
        </contact>
        <date value="2015-10-24T07:41:03+11:00"/>
        <code value="subject-name"/>
        <base value="Encounter"/>
        <type value="string"/>
        <description value="Role of participant in encounter"/>
        <xpath value="f:Encounter/f:subject/f:display"/>
        <xpathUsage value="normal"/>
      </SearchParameter>
    </resource>
  </entry>

and add the corresponding property to HS.Local.FHIR.Repository.Search.Encounter as following:

Property subjectName As list Of HS.FHIR.Model.Datatype.StringPrimitive;

Unfortunately it is not working. Can you guys share with us some experience? Thanks.

Discussion (2)1
Log in or sign up to continue

Hi Lin Zhu,

In the 15.03 Health Connect FHIR support, chained search parameters are not supported. Your contemplated workaround starts somewhat on the right track. However, the 15.03 product also does not truly allow for an acceptable approach for adding search parameters and supporting them. In 15.03, to accomplish what you suggest would require editing an in-product class. We hope to remedy that in a future release.

Best regards,
Paul Lomayesva