<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-ps-profile-documentreference" />
  <meta>
    <lastUpdated value="2024-02-14T18:41:21.1813796+00:00" />
  </meta>
  <url value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-DocumentReference" />
  <version value="0.12.0" />
  <name value="DocumentReferencePSON" />
  <title value="DocumentReference (PS-ON)" />
  <status value="active" />
  <date value="2023-05-23T19:54:30.1588299+00:00" />
  <publisher value="Ontario Health" />
  <description value="This profile defines a set of constraints to the FHIR DocumentReference resource for use in Ontario Patient Summaries (PS-ON). This profile is based on the DocumentReference profile from the base R4 FHIR standard." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.meta">
      <path value="DocumentReference.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.meta.profile">
      <path value="DocumentReference.meta.profile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-DocumentReference" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <definition value="Other identifiers associated with the document, including any identifier in the filling application, or a placer group number" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.identifier.system">
      <path value="DocumentReference.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.identifier.value">
      <path value="DocumentReference.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="60591-5" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category">
      <path value="DocumentReference.category" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category.coding">
      <path value="DocumentReference.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service">
      <path value="DocumentReference.category" />
      <sliceName value="sliceCategory-type-of-service" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.extension">
      <path value="DocumentReference.category.extension" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.extension:ext-LOINC-ontology-axis.value[x].code">
      <path value="DocumentReference.category.extension.value[x].code" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.extension:ext-LOINC-ontology-axis.value[x].display">
      <path value="DocumentReference.category.extension.value[x].display" />
      <label value="Type of Service" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.coding">
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-type-of-service.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <min value="1" />
      <fixedString value="Patient summary" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document">
      <path value="DocumentReference.category" />
      <sliceName value="sliceCategory-kind-of-document" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.extension">
      <path value="DocumentReference.category.extension" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.extension:ext-LOINC-ontology-axis.value[x].code">
      <path value="DocumentReference.category.extension.value[x].code" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.extension:ext-LOINC-ontology-axis.value[x].display">
      <path value="DocumentReference.category.extension.value[x].display" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.coding">
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
      <fixedCode value="LP173418-7" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-kind-of-document.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <min value="1" />
      <fixedString value="Note" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain">
      <path value="DocumentReference.category" />
      <sliceName value="sliceCategory-subject-matter-domain" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.extension">
      <path value="DocumentReference.category.extension" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.extension:ext-LOINC-ontology-axis.value[x].code">
      <path value="DocumentReference.category.extension.value[x].code" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.extension:ext-LOINC-ontology-axis.value[x].display">
      <path value="DocumentReference.category.extension.value[x].display" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.coding">
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA1009-1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-subject-matter-domain.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role">
      <path value="DocumentReference.category" />
      <sliceName value="sliceCategory-role" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.extension">
      <path value="DocumentReference.category.extension" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.extension:ext-LOINC-ontology-axis.value[x].code">
      <path value="DocumentReference.category.extension.value[x].code" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.extension:ext-LOINC-ontology-axis.value[x].display">
      <path value="DocumentReference.category.extension.value[x].display" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.coding">
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA4001-1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-role.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting">
      <path value="DocumentReference.category" />
      <sliceName value="sliceCategory-setting" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.extension">
      <path value="DocumentReference.category.extension" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.extension:ext-LOINC-ontology-axis">
      <path value="DocumentReference.category.extension" />
      <sliceName value="ext-LOINC-ontology-axis" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.extension:ext-LOINC-ontology-axis.url">
      <path value="DocumentReference.category.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ext-loinc-ontology-axis" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.extension:ext-LOINC-ontology-axis.value[x].code">
      <path value="DocumentReference.category.extension.value[x].code" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.extension:ext-LOINC-ontology-axis.value[x].display">
      <path value="DocumentReference.category.extension.value[x].display" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.coding">
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.coding.system">
      <path value="DocumentReference.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.coding.code">
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA5001-1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.category:sliceCategory-setting.coding.display">
      <path value="DocumentReference.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-Patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.date">
      <path value="DocumentReference.date" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-PractitionerRole" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-Organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.author.reference">
      <path value="DocumentReference.author.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-Organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.custodian.reference">
      <path value="DocumentReference.custodian.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment">
      <path value="DocumentReference.content.attachment" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>