<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="vitalsigns" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">to do</div>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-summary">
    <valueMarkdown value="### Complete Summary of the Mandatory Requirements&#xA;&#xA;1.  One status in `Observation.status`which has a [required](http://build.fhir.org/terminologies.html#extensible) binding to:&#xA;    -    [ObservationStatus] value set.&#xA;1.  A category in `Observation.category` which must have:&#xA;    -   a fixed `Observation.category.coding.system`=&quot;http://hl7.org/fhir/observation-category&quot;&#xA;    -   a fixed `Observation.category.coding.code`= &quot;vital-signs&quot;&#xA;&#xA;1.  A code in `Observation.code`&#xA;    -   a fixed `Observation.code.coding.system`= &quot;http://loinc.org&quot;&#xA;    -   a LOINC code in `Observation.code.coding.code` which has an [extensible](http://build.fhir.org/terminologies.html#extensible) binding to:&#xA;         -   [Vital Signs] value set.&#xA;                &#xA;1.  One patient in `Observation.subject`&#xA;1.  A date and time in `effectiveDateTime` or `effectivePeriod`&#xA;1.  Either one `Observation.valueQuantity` or, if there is no value, one code in `Observation.DataAbsentReason`&#xA;    -   Each Observation.valueQuantity must have:&#xA;        -   One numeric value in `Observation.valueQuantity.value`&#xA;        -   a fixed `Observation.valueQuantity.system`=&quot;http://unitsofmeasure&quot;&#xA;        -   a UCUM unit code in `Observation.valueQuantity.code` which has an [required] binding to:&#xA;             -   [Vital Signs Units] value set.&#xA;    -   Observation.DataAbsentReason is bound to [Observation Value&#xA;        Absent Reason] value set.&#xA;&#xA;1.  When using a panel code to group component observations (Note: See&#xA;    the comments regarding blood pressure in the table above), one or&#xA;    more `Observation.component.code` each of which must have:&#xA;    -   a fixed&#xA;        `Observation.component.code.coding.system` =&quot;&lt;http://loinc.org&gt;&quot;&#xA;         -   a LOINC code in `Observation.code.coding.code` which has an [extensible] binding to:&#xA;             -   [Vital Signs Units] value set.&#xA;&#xA;1.  Either one `Observation.component.valueQuantity` or, if there is&#xA;    no value, one code in `Observation.component.DataAbsentReason`&#xA;    -   Each Observation.component.valueQuantity must have:&#xA;        -   One numeric value in&#xA;            `Observation.component.valueQuantity.value`&#xA;        -   a fixed `Observation.component.valueQuantity.system`= &quot;&lt;http://unitsofmeasure.org&gt;&quot;&#xA;        -   a UCUM unit code in&#xA;            `Observation.component.valueQuantity.code` which has an [required] binding to:&#xA;             -   [Vital Signs Units] value set.&#xA;    -   Observation.component.DataAbsentReason is bound to [Observation&#xA;        Value Absent Reason] value set.&#xA;&#xA;1.  When using a panel code to group observations, one or more reference&#xA;    to Vitals Signs Observations in `Observation.related.target`&#xA;    -   a fixed `Observation.related.type`= &quot;has-member&quot;&#xA;&#xA; [Vital Signs]: valueset-observation-vitalsignresult.html&#xA;  [Vital Signs Units]: valueset-ucum-vitals-common.html&#xA;  [extensible]: terminologies.html#extensible&#xA;  [ObservationStatus]: valueset-observation-status.html&#xA; [Observation Value Absent Reason]: valueset-observation-valueabsentreason.html&#xA;[required]: terminologies.html#required" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/vitalsigns" />
  <name value="Vital Signs Profile" />
  <title value="VitalSigns" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2016-03-25" />
  <publisher value="Health Level Seven International (Orders and Observations Workgroup)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/orders/index.cfm Orders and Observations" />
    </telecom>
  </contact>
  <description value="FHIR Vital Signs Profile" />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-concept" />
    <uri value="http://snomed.info/conceptdomain" />
    <name value="SNOMED CT Concept Domain Binding" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="sct-attr" />
    <uri value="http://snomed.info/sct" />
    <name value="SNOMED CT Attribute Binding" />
  </mapping>
  <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" />
      <short value="FHIR Vital Signs Profile" />
      <definition value="The FHIR Vitals Signs profile sets a minimum expectations for the Observation Resource to record, search and fetch the vital signs associated with a patient." />
      <alias value="Vital Signs" />
      <alias value="Measurement" />
      <alias value="Results" />
      <alias value="Tests" />
      <min value="0" />
      <max value="*" />
      <constraint>
        <key value="vs-2" />
        <severity value="error" />
        <human value="If there is no component or related element then either a value[x] or a data absent reason must be present" />
        <expression value="(component.empty() and related.empty()) implies (dataAbsentReason or value)" />
        <xpath value="exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)" />
      </constraint>
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Status" />
        </extension>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-status" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <condition value="vs-4" />
      <constraint>
        <key value="vs-4" />
        <severity value="error" />
        <human value="Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'" />
        <expression value="where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()" />
        <xpath value="exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <short value="Coded Responses from C-CDA Vital Sign Results" />
      <definition value="Coded Responses from C-CDA Vital Sign Results." />
      <requirements value="5. SHALL contain exactly one [1..1] code, where the @code SHOULD be selected from ValueSet HITSP Vital Sign Result Type 2.16.840.1.113883.3.88.12.80.62 DYNAMIC (CONF:7301)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="VitalSigns" />
        </extension>
        <strength value="extensible" />
        <description value="This identifies the vital sign result type." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <short value="Often just a dateTime for Vital Signs" />
      <definition value="Often just a dateTime for Vital Signs." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <condition value="vs-1" />
      <constraint>
        <key value="vs-1" />
        <severity value="error" />
        <human value="Datetime must be at least to day." />
        <expression value="($this as dateTime).toString().length() &gt;= 8" />
        <xpath value="f:matches(effectiveDateTime,/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Observation.valueQuantity">
      <path value="Observation.valueQuantity" />
      <short value="Vital Sign Value recorded with UCUM" />
      <definition value="Vital Sign Value recorded with UCUM." />
      <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type=&quot;PQ&quot; (CONF:7305)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <condition value="vs-2" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="VitalSignsUnits" />
        </extension>
        <strength value="required" />
        <description value="Common UCUM units for recording Vital Signs" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/ucum-vitals-common" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.valueQuantity.value">
      <path value="Observation.valueQuantity.value" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.valueQuantity.unit">
      <path value="Observation.valueQuantity.unit" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.valueQuantity.system">
      <path value="Observation.valueQuantity.system" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <short value="Coded responses from the common UCUM units for vital signs value set." />
      <definition value="Coded responses from the common UCUM units for vital signs value set." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <condition value="vs-2" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DAR" />
        </extension>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-valueabsentreason" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.related">
      <path value="Observation.related" />
      <short value="Used when reporting vital signs panel components" />
      <definition value="Used when reporting vital signs panel components." />
      <mustSupport value="true" />
    </element>
    <element id="Observation.related.type">
      <path value="Observation.related.type" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <fixedCode value="has-member" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.related.target">
      <path value="Observation.related.target" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/vitalsigns" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <short value="Used when reporting systolic and diastolic blood pressure." />
      <definition value="Used when reporting systolic and diastolic blood pressure." />
      <constraint>
        <key value="vs-3" />
        <severity value="error" />
        <human value="If there is no a value a data absent reason must be present" />
        <expression value="value.exists() or dataAbsentReason.exists()" />
        <xpath value="exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.code">
      <path value="Observation.component.code" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="VitalSigns" />
        </extension>
        <strength value="extensible" />
        <description value="This identifies the vital sign result type." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-vitalsignresult" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.component.valueQuantity">
      <path value="Observation.component.valueQuantity" />
      <short value="Vital Sign Value recorded with UCUM" />
      <definition value="Vital Sign Value recorded with UCUM." />
      <requirements value="9. SHALL contain exactly one [1..1] value with @xsi:type=&quot;PQ&quot; (CONF:7305)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <condition value="vs-3" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="VitalSignsUnits" />
        </extension>
        <strength value="required" />
        <description value="Common UCUM units for recording Vital Signs" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/ucum-vitals-common" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Observation.component.valueQuantity.value">
      <path value="Observation.component.valueQuantity.value" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.valueQuantity.unit">
      <path value="Observation.component.valueQuantity.unit" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.valueQuantity.system">
      <path value="Observation.component.valueQuantity.system" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.valueQuantity.code">
      <path value="Observation.component.valueQuantity.code" />
      <short value="Coded responses from the common UCUM units for vital signs value set." />
      <definition value="Coded responses from the common UCUM units for vital signs value set." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.component.dataAbsentReason">
      <path value="Observation.component.dataAbsentReason" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <condition value="vs-3" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DAR" />
        </extension>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/observation-valueabsentreason" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>