<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-observation-smokingstatus" />
  <url value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-observation-smokingstatus" />
  <version value="1.0.0-Ballot" />
  <name value="ObservationSmokingStatusOCRE" />
  <title value="Experimental Smoking Status Observation Profile" />
  <status value="active" />
  <description value="Smoking Status Observation Profile inherits from the FHIR [Observation](https://hl7.org/fhir/R4/observation.html) resource; refer to it for scope and usage definitions. This profile meets the requirements of the U.S. Core Data for Interoperability (USCDI)  *Smoking Status* Data Element. This profile sets minimum expectations for the Observation resource to record, search, and fetch smoking status data associated with a patient. It specifies which core elements, extensions,  vocabularies, and value sets **SHALL** be present in the resource and constrains how the elements are used. Providing the floor for standards development for specific use cases promotes interoperability and adoption." />
  <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.status">
      <path value="Observation.status" />
      <short value="final | entered-in-error" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.category:SocialHistory">
      <path value="Observation.category" />
      <sliceName value="SocialHistory" />
      <min value="1" />
      <max value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/observation-category" />
          <code value="social-history" />
          <display value="Social History" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Smoking Status" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="72166-2" />
          <display value="Tobacco smoking status" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/observation-codes" />
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.value[x]" />
      <sliceName value="valueQuantity" />
      <short value="Quantitative Response" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-UnitsOfMeasureCaseSensitive" />
      </binding>
    </element>
    <element id="Observation.value[x]:valueCodeableConcept">
      <path value="Observation.value[x]" />
      <sliceName value="valueCodeableConcept" />
      <short value="Coded Response" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Smoking status comprehensive" />
        <valueSet value="http://ontariohealth.ca/fhir/ocre/ValueSet/current-smoking-status" />
      </binding>
    </element>
  </differential>
</StructureDefinition>