<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Profile-nNGM-Observation-Raucherstatus" />
  <url value="http://uk-koeln.de/fhir/StructureDefinition/Observation/nNGM/raucherstatus" />
  <version value="1.0.0" />
  <name value="Profile_nNGM_Observation_Raucherstatus" />
  <title value="Profile - nNGM - Observation - Raucherstatus" />
  <status value="active" />
  <description value="Dieses Profil beschreibt den Raucherstatus des Patienten zum Zeitpunkt der Diagnostik-Anforderung innerhalb des nNGM-Projektes." />
  <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">
      <path value="Observation" />
      <constraint>
        <key value="obs-nngm-1" />
        <severity value="error" />
        <human value="Falls kein Messwert verfügbar ist, muss eine dataAbsentReason angegeben werden" />
        <expression value="value.exists().not() implies dataAbsentReason.exists()" />
      </constraint>
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <fixedCode value="final" />
    </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" />
    </element>
    <element id="Observation.category:social-history">
      <path value="Observation.category" />
      <sliceName value="social-history" />
      <label value="Social-History" />
      <short value="Zwingende Kodierung als Social-History zur Herstellung einer Interoperabilität zu nationalen und internationalen Projekten" />
      <min value="1" />
      <max value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/observation-category" />
          <code value="social-history" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.code.coding:loinc">
      <path value="Observation.code.coding" />
      <sliceName value="loinc" />
      <label value="LOINC" />
      <short value="Zwingende LOINC-Kodierung zur Herstellung einer Interoperabilität zu nationalen und internationalen Projekten" />
      <min value="1" />
      <patternCoding>
        <system value="http://loinc.org" />
        <code value="72166-2" />
      </patternCoding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <label value="Patient" />
      <short value="Ein Bezug zum Patienten muss stets gegeben sein" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
      </type>
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <label value="Erhebungsdatum" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <label value="Raucherstatus" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Raucherstatus des Patienten" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://uk-koeln.de/fhir/ValueSet/nNGM/raucherstatus" />
      </binding>
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <max value="0" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <max value="0" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <max value="0" />
    </element>
    <element id="Observation.device">
      <path value="Observation.device" />
      <max value="0" />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="code" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.component:packYears">
      <path value="Observation.component" />
      <sliceName value="packYears" />
      <max value="1" />
    </element>
    <element id="Observation.component:packYears.code">
      <path value="Observation.component.code" />
      <patternCodeableConcept>
        <coding>
          <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl" />
          <code value="C73993" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:packYears.value[x]">
      <path value="Observation.component.value[x]" />
      <label value="Pack years" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component:packYears.value[x]:valueQuantity">
      <path value="Observation.component.value[x]" />
      <sliceName value="valueQuantity" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.component:packYears.value[x]:valueQuantity.value">
      <path value="Observation.component.value[x].value" />
      <min value="1" />
    </element>
    <element id="Observation.component:packYears.value[x]:valueQuantity.unit">
      <path value="Observation.component.value[x].unit" />
      <label value="PackYears" />
      <min value="1" />
      <fixedString value="{PackYears}" />
    </element>
    <element id="Observation.component:packYears.value[x]:valueQuantity.system">
      <path value="Observation.component.value[x].system" />
      <min value="1" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.component:packYears.value[x]:valueQuantity.code">
      <path value="Observation.component.value[x].code" />
      <label value="PackYears" />
      <min value="1" />
      <fixedCode value="{PackYears}" />
    </element>
    <element id="Observation.component:packYears.referenceRange">
      <path value="Observation.component.referenceRange" />
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange" />
    </element>
    <element id="Observation.component:nichtraucherSeit">
      <path value="Observation.component" />
      <sliceName value="nichtraucherSeit" />
      <max value="1" />
    </element>
    <element id="Observation.component:nichtraucherSeit.code">
      <path value="Observation.component.code" />
      <patternCodeableConcept>
        <coding>
          <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl" />
          <code value="C124908" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:nichtraucherSeit.value[x]">
      <path value="Observation.component.value[x]" />
      <label value="Nichtraucher seit" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component:nichtraucherSeit.value[x]:valueQuantity">
      <path value="Observation.component.value[x]" />
      <sliceName value="valueQuantity" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="Observation.component:nichtraucherSeit.value[x]:valueQuantity.unit">
      <path value="Observation.component.value[x].unit" />
      <fixedString value="a" />
    </element>
    <element id="Observation.component:nichtraucherSeit.value[x]:valueQuantity.system">
      <path value="Observation.component.value[x].system" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.component:nichtraucherSeit.value[x]:valueQuantity.code">
      <path value="Observation.component.value[x].code" />
      <fixedCode value="a" />
    </element>
    <element id="Observation.component:nichtraucherSeit.referenceRange">
      <path value="Observation.component.referenceRange" />
      <contentReference value="http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange" />
    </element>
  </differential>
</StructureDefinition>