{
  "resourceType": "StructureDefinition",
  "id": "observation-sexual-orientation-ca-core",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1
    }
  ],
  "url": "http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/observation-sexual-orientation-ca-core",
  "version": "1.1.0",
  "name": "ObservationSexualOrientationCACore",
  "title": "Sexual Orientation (CA-Core)",
  "status": "active",
  "experimental": false,
  "date": "2025-08-27",
  "publisher": "Canada Health Infoway",
  "contact": [
    {
      "name": "National Standards Release Centre",
      "telecom": [
        {
          "system": "url",
          "value": "http://www.infoway-inforoute.ca"
        },
        {
          "system": "email",
          "value": "standards@infoway-inforoute.ca"
        }
      ]
    }
  ],
  "description": "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": [
        {
          "code": "CA",
          "system": "urn:iso:std:iso:3166"
        }
      ]
    }
  ],
  "copyright": "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": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core"
            ]
          }
        ]
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Sexual Orientation",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core"
            ]
          }
        ],
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "76690-7",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.code.coding.display",
        "path": "Observation.code.coding.display",
        "comment": "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."
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/patient-ca-core"
            ]
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.value[x]",
        "sliceName": "valueCodeableConcept",
        "short": "Sexual Orientation",
        "definition": "The Sexual Orientation value.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/codeableconcept-ca-core"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/sexualorientationcode"
        }
      }
    ]
  }
}