<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="RelatedArtifact" />
  <meta>
    <lastUpdated value="2019-11-01T09:29:23.356+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/RelatedArtifact" />
  <version value="4.0.1" />
  <name value="RelatedArtifact" />
  <status value="draft" />
  <date value="2019-11-01T09:29:23+11:00" />
  <publisher value="HL7 FHIR Standard" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <description value="Base StructureDefinition for RelatedArtifact Type: Related artifacts such as additional documentation, justification, or bibliographic references." />
  <purpose value="Knowledge resources must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="RelatedArtifact" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <snapshot>
    <element id="RelatedArtifact">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="trial-use" />
      </extension>
      <path value="RelatedArtifact" />
      <short value="Related artifacts for a knowledge resource" />
      <definition value="Related artifacts such as additional documentation, justification, or bibliographic references." />
      <comment value="Each related artifact is either an attachment, or a reference to another knowledge resource, but not both." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="RelatedArtifact" />
        <min value="0" />
        <max value="*" />
      </base>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.id">
      <path value="RelatedArtifact.id" />
      <representation value="xmlAttr" />
      <short value="Unique id for inter-element referencing" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string" />
        </extension>
        <code value="http://hl7.org/fhirpath/System.String" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.extension">
      <path value="RelatedArtifact.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <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. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
      <comment 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="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="RelatedArtifact.type">
      <path value="RelatedArtifact.type" />
      <short value="documentation | justification | citation | predecessor | successor | derived-from | depends-on | composed-of" />
      <definition value="The type of relationship to the related artifact." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.type" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="RelatedArtifactType" />
        </extension>
        <strength value="required" />
        <description value="The type of relationship to the related artifact." />
        <valueSet value="http://hl7.org/fhir/ValueSet/related-artifact-type|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.label">
      <path value="RelatedArtifact.label" />
      <short value="Short label" />
      <definition value="A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.label" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.display">
      <path value="RelatedArtifact.display" />
      <short value="Brief description of the related artifact" />
      <definition value="A brief description of the document or knowledge resource being referenced, suitable for display to a consumer." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.display" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.citation">
      <path value="RelatedArtifact.citation" />
      <short value="Bibliographic citation for the artifact" />
      <definition value="A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format." />
      <comment value="Additional structured information about citations should be captured as extensions." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.citation" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="markdown" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.url">
      <path value="RelatedArtifact.url" />
      <short value="Where the artifact can be accessed" />
      <definition value="A url for the artifact that can be followed to access the actual content." />
      <comment value="If a document or resource element is present, this element SHALL NOT be provided (use the url or reference in the Attachment or resource reference)." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.url" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="url" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="RelatedArtifact.document">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="RelatedArtifact.document" />
      <short value="What document is being referenced" />
      <definition value="The document being referenced, represented as an attachment. This is exclusive with the resource element." />
      <comment value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as &quot;Signed Procedure Consent&quot;." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.document" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Attachment" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="att-1" />
        <severity value="error" />
        <human value="If the Attachment has data, it SHALL have a contentType" />
        <expression value="data.empty() or contentType.exists()" />
        <xpath value="not(exists(f:data)) or exists(f:contentType)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Attachment" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="ED/RP" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="ED" />
      </mapping>
    </element>
    <element id="RelatedArtifact.resource">
      <path value="RelatedArtifact.resource" />
      <short value="What resource is being referenced" />
      <definition value="The related resource, such as a library, value set, profile, or other knowledge resource." />
      <comment value="If the type is predecessor, this is a reference to the succeeding knowledge resource. If the type is successor, this is a reference to the prior knowledge resource." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="RelatedArtifact.resource" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="canonical" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="RelatedArtifact">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="trial-use" />
      </extension>
      <path value="RelatedArtifact" />
      <short value="Related artifacts for a knowledge resource" />
      <definition value="Related artifacts such as additional documentation, justification, or bibliographic references." />
      <comment value="Each related artifact is either an attachment, or a reference to another knowledge resource, but not both." />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="RelatedArtifact.type">
      <path value="RelatedArtifact.type" />
      <short value="documentation | justification | citation | predecessor | successor | derived-from | depends-on | composed-of" />
      <definition value="The type of relationship to the related artifact." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="RelatedArtifactType" />
        </extension>
        <strength value="required" />
        <description value="The type of relationship to the related artifact." />
        <valueSet value="http://hl7.org/fhir/ValueSet/related-artifact-type|4.0.1" />
      </binding>
    </element>
    <element id="RelatedArtifact.label">
      <path value="RelatedArtifact.label" />
      <short value="Short label" />
      <definition value="A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="RelatedArtifact.display">
      <path value="RelatedArtifact.display" />
      <short value="Brief description of the related artifact" />
      <definition value="A brief description of the document or knowledge resource being referenced, suitable for display to a consumer." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="RelatedArtifact.citation">
      <path value="RelatedArtifact.citation" />
      <short value="Bibliographic citation for the artifact" />
      <definition value="A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format." />
      <comment value="Additional structured information about citations should be captured as extensions." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="markdown" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="RelatedArtifact.url">
      <path value="RelatedArtifact.url" />
      <short value="Where the artifact can be accessed" />
      <definition value="A url for the artifact that can be followed to access the actual content." />
      <comment value="If a document or resource element is present, this element SHALL NOT be provided (use the url or reference in the Attachment or resource reference)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="url" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="RelatedArtifact.document">
      <path value="RelatedArtifact.document" />
      <short value="What document is being referenced" />
      <definition value="The document being referenced, represented as an attachment. This is exclusive with the resource element." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Attachment" />
      </type>
      <isSummary value="true" />
    </element>
    <element id="RelatedArtifact.resource">
      <path value="RelatedArtifact.resource" />
      <short value="What resource is being referenced" />
      <definition value="The related resource, such as a library, value set, profile, or other knowledge resource." />
      <comment value="If the type is predecessor, this is a reference to the succeeding knowledge resource. If the type is successor, this is a reference to the prior knowledge resource." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="canonical" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
      </type>
      <isSummary value="true" />
    </element>
  </differential>
</StructureDefinition>