DSTU2 Ballot Source

This page is part of the FHIR Specification (v0.5.0: DSTU 2 Ballot 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Reference.profile.xml

Raw XML (canonical form)

StructureDefinition for Reference

Raw XML

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Reference"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/Reference"/>
  <name value="Reference"/>
  <publisher value="HL7 FHIR Standard"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://hl7.org/fhir"/>
    </telecom>
  </contact>
  <description value="Base StructureDefinition for Reference Resource"/>
  <status value="draft"/>
  <date value="2015-04-03T14:24:32+11:00"/>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM"/>
  </mapping>
  <type value="type"/>
  <abstract value="false"/>
  <base value="http://hl7.org/fhir/StructureDefinition/Element"/>
  <snapshot>
    <element>
      <path value="Reference"/>
      <short value="A reference from one resource to another"/>
      <definition value="A reference from one resource to another."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Element"/>
      </type>
      <constraint>
        <key value="ref-1"/>
        <name value="Inline"/>
        <severity value="error"/>
        <human value="SHALL have a local reference if the resource is provided inline"/>
        <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::f:entry/f:resource/f:*/f:contained/f:*
        [f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=subst
        ring-after(current()/f:reference/@value, '#')])"/>
      </constraint>
      <mapping>
        <identity value="rim"/>
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.reference"/>
      <short value="Relative, internal or absolute URL reference"/>
      <definition value="A reference to a location at which the other resource is found. The reference may be a
       relative reference, in which case it is relative to the service base URL, or an absolute
       URL that resolves to the location where the resource is found. The reference may be version
       specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed
       to be version specific. Internal fragment references (start with '#') refer to contained
       resources."/>
      <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context,
       while using relative/logical references provides a flexible approach suitable for use
       when trading across closed eco-system boundaries.   Absolute URLs do not need to point
       to a FHIR RESTful server, though this is the preferred approach. If the url conforms to
       the structure &quot;/[type]/[id]&quot; then it should be assumed that the reference is
       to a FHIR RESTful server."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <condition value="ref-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.display"/>
      <short value="Text alternative for the resource"/>
      <definition value="Plain text narrative that identifies the resource in addition to the resource reference."/>
      <comments value="This is generally not the same as the Resource.text of the referenced resource.  The purpose
       is to identify what's being referenced, not to fully describe it."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element>
      <path value="Reference"/>
      <short value="A reference from one resource to another"/>
      <definition value="A reference from one resource to another."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Element"/>
      </type>
      <constraint>
        <key value="ref-1"/>
        <name value="Inline"/>
        <severity value="error"/>
        <human value="SHALL have a local reference if the resource is provided inline"/>
        <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::f:entry/f:resource/f:*/f:contained/f:*
        [f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=subst
        ring-after(current()/f:reference/@value, '#')])"/>
      </constraint>
      <mapping>
        <identity value="rim"/>
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.reference"/>
      <short value="Relative, internal or absolute URL reference"/>
      <definition value="A reference to a location at which the other resource is found. The reference may be a
       relative reference, in which case it is relative to the service base URL, or an absolute
       URL that resolves to the location where the resource is found. The reference may be version
       specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed
       to be version specific. Internal fragment references (start with '#') refer to contained
       resources."/>
      <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context,
       while using relative/logical references provides a flexible approach suitable for use
       when trading across closed eco-system boundaries.   Absolute URLs do not need to point
       to a FHIR RESTful server, though this is the preferred approach. If the url conforms to
       the structure &quot;/[type]/[id]&quot; then it should be assumed that the reference is
       to a FHIR RESTful server."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <condition value="ref-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="Reference.display"/>
      <short value="Text alternative for the resource"/>
      <definition value="Plain text narrative that identifies the resource in addition to the resource reference."/>
      <comments value="This is generally not the same as the Resource.text of the referenced resource.  The purpose
       is to identify what's being referenced, not to fully describe it."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
  </differential>
</StructureDefinition>

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.