<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="condition-ca-ps" />
  <url value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/condition-ca-ps" />
  <version value="2.2.0" />
  <name value="ConditionPSCA" />
  <title value="Condition (PS-CA)" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2024-04-09T00:00:00-08:00" />
  <description value="This profile represents the constraints applied to the Condition resource by the PS-CA project to allow for cross-border and cross-jurisdiction sharing of a record of a problem represented in the patient summary as an instance of the Condition resource constrained by this profile." />
  <copyright value="Copyright © 2024+ Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy)." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Condition" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Condition" />
  <derivation value="constraint" />
  <differential>
    <element id="Condition.clinicalStatus">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:able-to-populate" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHOULD:handle" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="Condition.clinicalStatus" />
      <comment value="While the IPS-UV specification considers this a Must Support element, some systems will not have a field directly representing clinicalStatus, but have other means of differentiating between current and historical conditions. Implementers are expected to be able to differentiate between active and inactive conditions. However, the valueSet that is required in the base specification does not provide an 'unknown' concept to support legacy data without a clinicalStatus. This has resulted in additional burdens that some participating systems could not meet with their legacy data.&#xA;&#xA; The requirement from the base FHIR specification to provide a system and value from the bound value set means the PS-CA CodeableConcept data type profile does not need to be applied on this particular element.&#xA;&#xA;In the scope of the IPS-UV the entered-in-error concept is not allowed and so the modifier on this element has been removed." />
      <mustSupport value="true" />
    </element>
    <element id="Condition.verificationStatus">
      <path value="Condition.verificationStatus" />
      <comment value="IPS-UV no longer flags this as a Must Support element. It is not currently flagged as Must Support in PS-CA, as stakeholders have indicated the element may not be supported by the majority of systems today. Systems that do support the element are encouraged to include it in generated Patient Summary documents, and support it when received.&#xA;&#xA;FHIR Base Note: This element is a modifier element with a required vocabulary binding in the base FHIR specification.&#xA;&#xA;IPS-UV Note: In the scope of the IPS-UV the entered-in-error concept is not allowed and so the modifier on this element has been removed." />
    </element>
    <element id="Condition.category">
      <path value="Condition.category" />
      <definition value="A category assigned to the condition. In this profile, a health problem of the patient, therefore a 'problem-list-item'." />
      <comment value="IPS-UV flags this as a Must Support element. It is not currently flagged as Must Support in PS-CA, as stakeholders have indicated the element may not be supported by the majority of systems today. Systems that do support the element are encouraged to include it in generated Patient Summary documents, and support it when received. &#xA;&#xA; Implementers should be aware that IPS encourages the use of 'problem-list-item'. This is identified through the additionalBinding extension as a component value set (which provides a subset of values from the base valueSet and context around their use). &#xA;&#xA; IPS also provides an additionalBinding to the LOINC value of 75326-9 for backwards compatibility. While not preferred for continued use this is also identified as a additional binding to reflect what legacy IPS instances may include (in alignment to IPS approach)." />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="component" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/problem-type-uv-ips" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Component of extensible valueSet put forth in IPS to encourage the use condition records with the category code of 'problem-list-item' for use in the Problems Section and History of Past Illness Section." />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/problem-type-loinc" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Codes put forth in IPS to supply an additional binding to the LOINC &quot;Problem&quot; code - retained for backward compatibility. While not preferred for continued use this is also identified as an additional binding to reflect what legacy IPS instances may include (in alignment to IPS approach)." />
          </extension>
        </extension>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/condition-category" />
      </binding>
    </element>
    <element id="Condition.severity">
      <path value="Condition.severity" />
      <comment value="IPS-UV flags this as a Must Support element. It is not currently flagged as Must Support in PS-CA, as stakeholders have indicated the element may not be supported by the majority of systems today. Systems that do support the element are encouraged to include it in generated Patient Summary documents, and support it when received." />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/ValueSet/condition-severity" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Codes representing the severity of a problem using the preferred value set from base FHIR." />
          </extension>
        </extension>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/severitycode" />
      </binding>
    </element>
    <element id="Condition.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:populate" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:handle" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHOULD:display" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="Condition.code" />
      <definition value="Identification of the condition, problem or diagnosis or recording of &quot;problem absent&quot; or of &quot;problems unknown&quot;." />
      <comment value="Many Canadian implementations use codes from either SNOMED CT and the SNOMED CT Canada Extension to describe this concept, while others may still be using localized code systems or text descriptions. The Condition - IPS ValueSet contains codes that are subsumed within the SNOMED CT CA ClinicalFindingCode ValueSet that is preferred for this element.&#xA;&#xA;Future releases of PS-CA may require use of coded entries. In this release, however, implementations that support codings are encouraged to send the codings for codeable concepts if they are available. Consistent with FHIR best practice, receivers should not produce failures or rejections if codings are received. Vendors should expect that some jurisdictions may further constrain support of this element within the context of their own jurisdictional content." />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/CodeableConcept-ca-ps" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ValueSet/ICD9CM" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Any code from ICD-9 CM. While not the preferred terminology for broader pan-Canadian exchange use cases, this additional binding is surfaced to socialize the value sets that may be more commonly in use. Where multiple codings can be supplied, it is encouraged to supply the original coding alongside the pan-Canadian preferred terminology." />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ValueSet/ICD10CA" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Any Code from ICD-10 CA. While not the preferred terminology for broader pan-Canadian exchange use cases, this additional binding is surfaced to socialize the value sets that may be more commonly in use. Where multiple codings can be supplied, it is encouraged to supply the original coding alongside the pan-Canadian preferred terminology." />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Absent problem or unknown problem." />
          </extension>
        </extension>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/healthconditioncode" />
      </binding>
    </element>
    <element id="Condition.bodySite">
      <path value="Condition.bodySite" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/anatomicaloracquiredbodystructurecode" />
      </binding>
    </element>
    <element id="Condition.subject">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:populate" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:handle" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHOULD:display" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="Condition.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/patient-ca-ps" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Condition.subject.reference">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:populate" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:handle" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHOULD:display" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="Condition.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Condition.onset[x]">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:able-to-populate" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHOULD:handle" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/io/psca/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="Condition.onset[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="IPS-UV constrains the condition onset element to only DateTime and Period data types. Both IPS-UV and PS-CA prefer the use of onsetDateTime" />
      <mustSupport value="true" />
    </element>
    <element id="Condition.onset[x]:onsetDateTime">
      <path value="Condition.onset[x]" />
      <sliceName value="onsetDateTime" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>