FHIR Chat · Search complex extension · implementers

Stream: implementers

Topic: Search complex extension


view this post on Zulip Paul Barry (Jul 25 2016 at 02:07):

If we are storing a complex extension against a resource what is the correct syntax to search for that resource by the extension. An example of the extension is below

<patient>
  <extension url="http://medview.com.au/fhir/StructureDefinition/patient-hospitalrecord" >
    <extension url="http://medview.com.au/fhir/StructureDefinition/patient-unitrecord" >
      <valueString value="1234dr5" />
    </extension>
    <extension url="http://medview.com.au/fhir/StructureDefinition/hospital-name" >
      <valueString value="Austin Hospial" />
    </extension>
  </extension>
</patient>

view this post on Zulip Brian Postlethwaite (Jul 25 2016 at 02:11):

To search by that you need to define a custom search parameter type, attach it to your server's conformance statement which then defines the name to use.
Then your search will use that.

view this post on Zulip Brian Postlethwaite (Jul 25 2016 at 02:12):

No sure why you would have that extension on the patient. If anything on an encounter, or the other item that you are referencing.

view this post on Zulip Brian Postlethwaite (Jul 25 2016 at 02:13):

Have heard of some wanting to do that for long term residential care where they would link to a location resource. (as basically doesn't change in their system)

view this post on Zulip Grahame Grieve (Jul 25 2016 at 02:42):

isn't that just an identifier?

view this post on Zulip Paul Barry (Jul 25 2016 at 04:09):

@Grahame Grieve yes I'm now thinking it should just be another identifer

        <identifier>
          <use value="secondary" />
          <extension>
            <url>http://medview.com.au/fhir/StructureDefinition/hospital-name</url>
            <valueString>AustinHospital</valueString>
          </extension>
          <extension>
            <url>http://medview.com.au/fhir/StructureDefinition/hospitalrecord-createdon</url>
            <valueDateTime>2016-07-25</valueDateTime>
          </extension>
          <system value="http://medview.com.au/fhir/StructureDefinition/patient-unitrecord" />
          <value value="23423423" />
        </identifier>

Then the search syntax would be

http://[base]/Patient?identifier:exact=http://medview.com.au/fhir/StructureDefinition/patient-unitrecord|23423423

view this post on Zulip Grahame Grieve (Jul 25 2016 at 04:27):

I don't think you need extensions at all:

<identifier>
  <use value="secondary"/>
  <system value="http://medview.com.au/fhir/StructureDefinition/patient-unitrecord"/>
  <value value="23423423"/>
  <period>
    <start value="2016-07-25"/>
  </period>
  <assigner>
    <display value="Austin Hospital"/>
  </assigner>
</identifier>

view this post on Zulip Paul Barry (Jul 25 2016 at 05:07):

Great! Thanks @Grahame Grieve

view this post on Zulip Brian Postlethwaite (Jul 25 2016 at 05:38):

Yes, that all looks correct, I thought you were assigning a location to the patient, rather than the Identifier from other systems.

view this post on Zulip Paul Barry (Jul 25 2016 at 06:07):

@Brian Postlethwaite thanks for your help!


Last updated: Apr 12 2022 at 19:14 UTC