<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="observation-sexual-orientation-ca-core" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1" />
  </extension>
  <url value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/observation-sexual-orientation-ca-core" />
  <version value="1.1.0" />
  <name value="ObservationSexualOrientationCACore" />
  <title value="Sexual Orientation (CA-Core)" />
  <status value="active" />
  <experimental value="false" />
  <date value="2025-08-27" />
  <publisher value="Canada Health Infoway" />
  <contact>
    <name value="National Standards Release Centre" />
    <telecom>
      <system value="url" />
      <value value="http://www.infoway-inforoute.ca" />
    </telecom>
    <telecom>
      <system value="email" />
      <value value="standards@infoway-inforoute.ca" />
    </telecom>
  </contact>
  <description value="This profile applies constraints to the Observation resource for CA Core+ to support capture of a patient’s self-reported sexual orientation in the pan-Canadian context." />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA" />
    </coding>
  </jurisdiction>
  <copyright value="Copyright © 2025+ 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="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.category">
      <path value="Observation.category" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core" />
      </type>
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Sexual Orientation" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core" />
      </type>
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="76690-7" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.code.coding.display">
      <path value="Observation.code.coding.display" />
      <comment value="This LOINC Code has a display value of Sexual Orientation. Display values are not fixed to prevent errors when using this profile to validate a resource instance in a multilingual context or where the display may be different from its source." />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/patient-ca-core" />
      </type>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.value[x]:valueCodeableConcept">
      <path value="Observation.value[x]" />
      <sliceName value="valueCodeableConcept" />
      <short value="Sexual Orientation" />
      <definition value="The Sexual Orientation value." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/sexualorientationcode" />
      </binding>
    </element>
  </differential>
</StructureDefinition>