<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-ps-profile-composition" />
  <url value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-composition" />
  <version value="0.12.0" />
  <name value="CompositionPSON" />
  <title value="Composition (PS-ON)" />
  <status value="active" />
  <date value="2022-10-15T12:00:00+00:00" />
  <publisher value="Ontario Health" />
  <description value="This profile defines a set of constraints to the FHIR Composition resource for use in Ontario Patient Summaries (PS-ON).  It refines constraints applied to the Composition resource by the PS-CA project.&#xD;&#xA;A Canadian Patient Summary (PS-CA) document is an electronic health record extract containing essential healthcare information about a subject of care. It is informed by the IPS-UV Composition profile, but differs in its application of MS flags on some of the sections to allow for jurisdictional implementors flexibility in what sections systems must support in order to show conformance to their respective patient summaries.&#xD;&#xA;The PS-CA dataset is minimal and non-exhaustive; specialty-agnostic and condition-independent; but still clinically relevant. Its informed by the requirements specified in EN 17269 and ISO/DIS 27269, it is designed for supporting the international use case scenario for ‘unplanned, cross border care’, but is also designed to support a variety of use cases for cross-jurisdiction exchange. It is intended to guide implementation nationally while ensuring international exchange of patient summaries is not impeded.&#xD;&#xA;&#xD;&#xA;This profile is based on the ClinicalDocument profile from the base R4 FHIR standard." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Composition" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Composition" />
  <derivation value="constraint" />
  <differential>
    <element id="Composition">
      <path value="Composition" />
      <short value="Ontario Patient Summary composition" />
      <definition value="Ontario Patient Summary Composition. &#xD;&#xA;A Composition is a set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. &#xD;&#xA;While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained." />
    </element>
    <element id="Composition.meta">
      <path value="Composition.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.meta.profile">
      <path value="Composition.meta.profile" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.text">
      <path value="Composition.text" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.identifier">
      <path value="Composition.identifier" />
      <min value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-identifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.status">
      <path value="Composition.status" />
      <comment value="If a patient summary composition is marked as withdrawn, it should never be displayed to a user without a clear visual indicator to distinguish valid from invalid documents. The flag 'entered-in-error' is why this element is labeled as a modifier of other elements." />
      <mustSupport value="true" />
    </element>
    <element id="Composition.type">
      <path value="Composition.type" />
      <short value="Kind of composition (&quot;Patient Summary&quot;)" />
      <definition value="Specifies that this composition refers to a Patient Summary (Loinc &quot;60591-5&quot;)" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="60591-5" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.category">
      <path value="Composition.category" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Composition.category.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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>
      <isModifier value="false" />
    </element>
    <element id="Composition.category.coding">
      <path value="Composition.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category.coding.system">
      <path value="Composition.category.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category.coding.code">
      <path value="Composition.category.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category.coding.display">
      <path value="Composition.category.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service">
      <path value="Composition.category" />
      <sliceName value="sliceCategory-type-of-service" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service.extension">
      <path value="Composition.category.extension" />
      <min value="1" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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="Composition.category:sliceCategory-type-of-service.coding">
      <path value="Composition.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service.coding.system">
      <path value="Composition.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service.coding.code">
      <path value="Composition.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-type-of-service.coding.display">
      <path value="Composition.category.coding.display" />
      <min value="1" />
      <fixedString value="Patient summary" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document">
      <path value="Composition.category" />
      <sliceName value="sliceCategory-kind-of-document" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document.extension">
      <path value="Composition.category.extension" />
      <min value="1" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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="Composition.category:sliceCategory-kind-of-document.coding">
      <path value="Composition.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document.coding.system">
      <path value="Composition.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document.coding.code">
      <path value="Composition.category.coding.code" />
      <min value="1" />
      <fixedCode value="LP173418-7" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-kind-of-document.coding.display">
      <path value="Composition.category.coding.display" />
      <min value="1" />
      <fixedString value="Note" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain">
      <path value="Composition.category" />
      <sliceName value="sliceCategory-subject-matter-domain" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain.extension">
      <path value="Composition.category.extension" />
      <min value="1" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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="Composition.category:sliceCategory-subject-matter-domain.coding">
      <path value="Composition.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain.coding.system">
      <path value="Composition.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain.coding.code">
      <path value="Composition.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA1009-1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-subject-matter-domain.coding.display">
      <path value="Composition.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-role">
      <path value="Composition.category" />
      <sliceName value="sliceCategory-role" />
    </element>
    <element id="Composition.category:sliceCategory-role.extension">
      <path value="Composition.category.extension" />
      <min value="1" />
    </element>
    <element id="Composition.category:sliceCategory-role.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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="Composition.category:sliceCategory-role.coding">
      <path value="Composition.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-role.coding.system">
      <path value="Composition.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-role.coding.code">
      <path value="Composition.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA4001-1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-role.coding.display">
      <path value="Composition.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-setting">
      <path value="Composition.category" />
      <sliceName value="sliceCategory-setting" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-setting.extension">
      <path value="Composition.category.extension" />
      <min value="1" />
    </element>
    <element id="Composition.category:sliceCategory-setting.extension:ext-LOINC-ontology-axis">
      <path value="Composition.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="Composition.category:sliceCategory-setting.coding">
      <path value="Composition.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-setting.coding.system">
      <path value="Composition.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-setting.coding.code">
      <path value="Composition.category.coding.code" />
      <min value="1" />
      <fixedCode value="CGTA5001-1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.category:sliceCategory-setting.coding.display">
      <path value="Composition.category.coding.display" />
      <min value="1" />
      <fixedString value="Unspecified" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.subject">
      <path value="Composition.subject" />
      <definition value="Who or what the composition is about. &#xD;&#xA;In general a composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).&#xD;&#xA;For the PS the subject is always the patient." />
      <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="Composition.subject.reference">
      <path value="Composition.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.encounter">
      <path value="Composition.encounter" />
      <comment value="While IPS-UV considers this a MS element, policy has not yet been developed in Canada confirming the expectations for when a patient summary is created (e.g., does it have to be created by a health professional or just validated, can it be automatically assembled, does it have to occur within an encounter, etc.) Further discussion is required to determine if systems will be expected to show they can construct an encounter resource in order to be conformant to the specification" />
    </element>
    <element id="Composition.date">
      <path value="Composition.date" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.author">
      <path value="Composition.author" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Who and/or what authored the patient summary" />
      <definition value="The Author is the Health Care Practitioner who reviews and signs off the Patient Summary composition before it is submitted to the repository. Where a HIC has opted into automated compilation and submission of a Patient Summary by the PoS System, the Author would instead be the PoS System." />
      <mustSupport value="true" />
    </element>
    <element id="Composition.author:authorPSON">
      <path value="Composition.author" />
      <sliceName value="authorPSON" />
      <short value="Who and/or what authored the patient summary" />
      <definition value="Identifies who is responsible for the information in the patient summary, not necessarily who typed it in.&#xD;&#xA;&#xD;&#xA;The type of author(s) contribute to determine the &quot;nature&quot;of the Patient Summary: e.g. a &quot;human-curated&quot; PS Vs. an &quot;automatically generated&quot; PS." />
      <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="Composition.author:DevicePSON">
      <path value="Composition.author" />
      <sliceName value="DevicePSON" />
      <short value="Who and/or what authored the patient summary" />
      <definition value="Identifies who is responsible for the information in the patient summary, not necessarily who typed it in.&#xD;&#xA;&#xD;&#xA;The type of author(s) contribute to determine the &quot;nature&quot;of the Patient Summary: e.g. a &quot;human-curated&quot; PS Vs. an &quot;automatically generated&quot; PS." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-device" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.title">
      <path value="Composition.title" />
      <short value="Ontario Patient Summary" />
      <definition value="Official human-readable label for the composition.&#xD;&#xA;&#xD;&#xA;For this document should be &quot;Ontario Patient Summary&quot; or any equivalent translation" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.attester">
      <path value="Composition.attester" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.attester.mode">
      <path value="Composition.attester.mode" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.attester.time">
      <path value="Composition.attester.time" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.attester.party">
      <path value="Composition.attester.party" />
      <min 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="Composition.custodian">
      <path value="Composition.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="Composition.event">
      <path value="Composition.event" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="The main activity being described by a PS is the provision of healthcare over a period of time. &#xD;&#xA;In the CDA representation of the PS this is shown by setting the value of serviceEvent/@classCode to “PCPR” (care provision) and indicating the duration over which care was provided in serviceEvent/effectiveTime. &#xD;&#xA;In the FHIR representation at lest one event should be used to record this information.&#xD;&#xA;Additional data from outside this duration may also be included if it is relevant to care provided during that time range (e.g., reviewed during the stated time range). For example if the PS is generated by a GP based on information recorded in his/her EHR-S, then the start value should represent the date when the treatment relationship between the patient and the GP started; and the end value the date of the latest care event." />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent">
      <path value="Composition.event" />
      <sliceName value="careProvisioningEvent" />
      <short value="The care provisioning being documented" />
      <definition value="The provision of healthcare over a period of time this PS is documented." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.code">
      <path value="Composition.event.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActClass" />
          <code value="PCPR" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.code.coding">
      <path value="Composition.event.code.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.code.coding.system">
      <path value="Composition.event.code.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ActClass" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.code.coding.code">
      <path value="Composition.event.code.coding.code" />
      <min value="1" />
      <fixedCode value="PCPR" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.period">
      <path value="Composition.event.period" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.period.start">
      <path value="Composition.event.period.start" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.event:careProvisioningEvent.period.end">
      <path value="Composition.event.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section">
      <path value="Composition.section" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="code" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <short value="Sections composing the PS" />
      <definition value="The root of the sections that make up the PS-ON composition." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-codeableconcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section.code.coding.display.extension:translation">
      <path value="Composition.section.code.coding.display.extension" />
      <sliceName value="translation" />
    </element>
    <element id="Composition.section.code.coding.display.extension:translation.extension">
      <path value="Composition.section.code.coding.display.extension.extension" />
      <min value="2" />
    </element>
    <element id="Composition.section.code.coding.display.extension:translation.url">
      <path value="Composition.section.code.coding.display.extension.url" />
      <fixedUri value="translation" />
    </element>
    <element id="Composition.section.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications">
      <path value="Composition.section" />
      <sliceName value="sectionMedications" />
      <short value="PS-ON Medication Summary Section" />
      <definition value="The medication summary section contains a description of the patient's medications relevant for the scope of the patient summary.&#xD;&#xA;The actual content could depend on the jurisdiction, it could report:&#xD;&#xA;- the currently active medications; &#xD;&#xA;- the current and past medications considered relevant by the authoring GP; &#xD;&#xA;- the patient prescriptions or dispensations automatically extracted by a regional or a national EHR.&#xD;&#xA;&#xD;&#xA; This section requires either an entry indicating the subject is known not to be on any relevant medication; an entry indicating that no information is available about medications; or entries summarizing the subject's relevant medications." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.title">
      <path value="Composition.section.title" />
      <short value="Medication Summary section" />
      <definition value="The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.&#xD;&#xA;&#xD;&#xA;Medication Summary" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="10160-0" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Medications relevant for the scope of the patient summary" />
      <definition value="This lists the medications relevant for the scope of the patient summary, or it is used to indicate either that the subject is known not to be on any relevant medication or that no information is available about medications." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.entry:medicationInformation">
      <path value="Composition.section.entry" />
      <sliceName value="medicationInformation" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-medicationstatement" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-medicationrequest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionMedications.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionMedications.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionAllergies">
      <path value="Composition.section" />
      <sliceName value="sectionAllergies" />
      <short value="PS-ON Allergies and Intolerances Section" />
      <definition value="This section documents the relevant allergies or intolerances (conditions) for that patient, describing the kind of reaction (e.g. rash, anaphylaxis,..) and the agents that cause it; and optionally the criticality and the certainty of the allergy.&#xD;&#xA;At a minimum, it should list currently active and any relevant historical allergies and adverse reactions.&#xD;&#xA;If no information about allergies is available, or if no allergies are known this should be clearly documented in the section." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.title">
      <path value="Composition.section.title" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="48765-2" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Relevant allergies or intolerances (conditions) for that patient." />
      <definition value="It lists the relevant allergies or intolerances (conditions) for that patient, describing the kind of reaction (e.g. rash, anaphylaxis,..), the agents that cause it; and optionally the criticality and the certainty of the allergy.&#xD;&#xA;At a minimum, it should list currently active and any relevant historical allergies and adverse reactions.&#xD;&#xA; This entry shall be used to document that no information about allergies is available, or that no allergies are known." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.entry:allergyOrIntolerance">
      <path value="Composition.section.entry" />
      <sliceName value="allergyOrIntolerance" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-allergyintolerance" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionAllergies.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionAllergies.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionProblems">
      <path value="Composition.section" />
      <sliceName value="sectionProblems" />
      <short value="PS-ON Problems Section" />
      <definition value="The PS problem section lists and describes clinical problems or conditions currently being monitored for the patient." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.title">
      <path value="Composition.section.title" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="11450-4" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Clinical problems or conditions currently being monitored for the patient." />
      <definition value="It lists and describes clinical problems or conditions currently being monitored for the patient.  This entry shall be used to document that no information about problems is available, or that no relevant problems are known." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.entry:problem">
      <path value="Composition.section.entry" />
      <sliceName value="problem" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-condition" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProblems.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionProblems.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionProceduresHx">
      <path value="Composition.section" />
      <sliceName value="sectionProceduresHx" />
      <short value="PS-ON History of Procedures Section" />
      <definition value="The History of Procedures Section contains a description of the patient past procedures that are pertinent to the scope of this document.&#xD;&#xA;Procedures may refer for example to:&#xD;&#xA;1. Invasive Diagnostic procedure:e.g. Cardiac catheterization; (the results of these procedure are documented in the results section)&#xD;&#xA;2. Therapeutic procedure: e.g. dialysis;&#xD;&#xA;3. Surgical procedure: e.g. appendectomy" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.title">
      <path value="Composition.section.title" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="47519-4" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Patient past procedures pertinent to the scope of this document." />
      <definition value="It lists the patient past procedures that are pertinent to the scope of this document.&#xD;&#xA;Procedures may refer for example to:&#xD;&#xA;1. Invasive Diagnostic procedure:e.g. Cardiac catheterization; (the results of these procedure are documented in the results section)&#xD;&#xA;2. Therapeutic procedure: e.g. dialysis;&#xD;&#xA;3. Surgical procedure: e.g. appendectomy. This entry shall be used to document that no information about past procedures is available, or that no relevant past procedures are known." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.entry:procedure">
      <path value="Composition.section.entry" />
      <sliceName value="procedure" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-procedure" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionProceduresHx.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionProceduresHx.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionImmunizations">
      <path value="Composition.section" />
      <sliceName value="sectionImmunizations" />
      <short value="PS-ON Immunizations Section" />
      <definition value="The Immunizations Section defines a patient's current immunization status and pertinent immunization history.&#xD;&#xA;The primary use case for the Immunization Section is to enable communication of a patient's immunization status.&#xD;&#xA;The section includes the current immunization status, and may contain the entire immunization history that is relevant to the period of time being summarized." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.title">
      <path value="Composition.section.title" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="11369-6" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Patient's immunization status and pertinent history." />
      <definition value="It defines the patient's current immunization status and pertinent immunization history.&#xD;&#xA;The primary use case for the Immunization Section is to enable communication of a patient's immunization status.&#xD;&#xA;It may contain the entire immunization history that is relevant to the period of time being summarized. This entry shall be used to document that no information about immunizations is available, or that no immunizations are known." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.entry:immunization">
      <path value="Composition.section.entry" />
      <sliceName value="immunization" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-immunization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionImmunizations.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionImmunizations.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx">
      <path value="Composition.section" />
      <sliceName value="sectionPastIllnessHx" />
      <short value="PS-CA History of Past Illness Section" />
      <definition value="The History of Past Illness section contains a description of the conditions the patient suffered in the past." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.title">
      <path value="Composition.section.title" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.code">
      <path value="Composition.section.code" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="11348-0" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.text">
      <path value="Composition.section.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.entry">
      <path value="Composition.section.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resolve()" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Conditions the patient suffered in the past." />
      <definition value="It contains a description of the conditions the patient suffered in the past." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.entry:pastProblem">
      <path value="Composition.section.entry" />
      <sliceName value="pastProblem" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-condition" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.emptyReason">
      <path value="Composition.section.emptyReason" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
    <element id="Composition.section:sectionPastIllnessHx.section">
      <path value="Composition.section.section" />
      <max value="0" />
      <mustSupport value="false" />
    </element>
  </differential>
</StructureDefinition>