2

we are developing a generic browser for clinical documents expressed in Compositions.

We are browsing the different sections for a Composition for showing them in our portal and mobile app widgets.

Our doubt with the current composition samples in the specification is how to know the correct Resource Type for the Composition.section[].content ResourceReference. For example, in

<section>
    <title value="History of present illness"/>
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="10164-2"/>
      </coding>
    </code>
    <content>
      <reference value="**MedicationAdministration**/example"/>
    </content>
  </section>

But in another samples like this, using URI or URN, we dont know how to know the Resource Type:

<section>
          <title value="Reason for admission"/>
          <code>
            <coding>
              <system value="http://loinc.org"/>
              <code value="46241-6"/>
            </coding>
          </code>
          <content>
            <reference value="urn:guid:d0dd51d3-3ab2-4c84-b697-a630c3e40e7a"/>
          </content>
        </section>
        <section>
          <title value="Medications on Discharge"/>
          <code>
            <coding>
              <system value="http://loinc.org"/>
              <code value="10183-2"/>
            </coding>
          </code>
          <content>
            <reference value="urn:guid:673f8db5-0ffd-4395-9657-6da00420bbc1"/>
          </content>
        </section>
        <section>
          <title value="Known allergies"/>
          <code>
            <coding>
              <system value="http://loinc.org"/>
              <code value="48765-2"/>
            </coding>
          </code>
          <content>
            <reference value="urn:guid:68f86194-e6e1-4f65-b64a-5314256f8d7b"/>
          </content>
        </section>

I will appreciated any help about how to know Resource Type for these URI/URN resource references and querying for the resource.

Thanks in advance Regards

jmolmo
  • 542
  • 4
  • 6

2 Answers2

0

UUIDs can only be used in resource references within a bundle, so you automatically have a copy of the resource and can look up what type it is. This does mean you may have to navigate outside your context node. Is there a reason this causes a problem for your processing?

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Sorry, I dont get it. If I get a composition in a query like /Composition/example and in one of the sections i have a reference value like
    – jmolmo May 14 '14 at 20:31
0

Your second example is invalid. Hopefully this is not in the DSTU and is a example made up by you.

The section/content/reference should contain a reference to a Resource. This would be an absolute or relative URL; not an URN. Something like [baseUrl]/[ResourceType]/xxx or [ResourceType]/xxx. URNs are never used for a reference.

Your app should just do a GET of the resource reference and then based on returned Resource type dispatch accordingly.

References between Resources has more details.

BTW:urn:guid is invalid, it should be urn:uuid.

Richard Schneider
  • 34,944
  • 9
  • 57
  • 73