<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fiphr-heartrate-update-stu3" />
  <meta>
    <versionId value="0.03" />
    <lastUpdated value="2017-09-25T11:36:00-07:00" />
  </meta>
  <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://hl7.org/fhir/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://hl7.org/fhir/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://phr.kanta.fi/StructureDefinition/fiphr-heartrate-update-stu3" />
  <version value="0.03" />
  <name value="Finnish PHR Heart Rate profile" />
  <status value="draft" />
  <experimental value="true" />
  <date value="2017-02-07T15:44:17+01:00" />
  <publisher value="W2E" />
  <description value="Finnish PHR profile for heart rate measurement. Finnish PHR profile for Observation used in heart rate measurements.  The profile is based on the Finnish PHR vitalsigns profile." />
  <purpose value="This profile is used for storing heart rate measurement results in the Finnish PHR." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://phr.kanta.fi/StructureDefinition/fiphr-vitalsigns-stu3" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <short value="Finnish PHR Heart Rate profile" />
      <definition value="Finnish PHR profile for Observation used in heart rate measurements. The profile is based on the Finnish PHR observation profile." />
    </element>
    <element id="Observation.id">
      <path value="Observation.id" />
      <short value="Logical id of this artifact." />
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned,  this value never changes." />
    </element>
    <element id="Observation.extension">
      <path value="Observation.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.extension:heartRateRhytm">
      <path value="Observation.extension" />
      <sliceName value="heartRateRhytm" />
      <definition value="True: Rhythm is regular False: Rhythm is irregular." />
      <comment value="." />
      <requirements value="In Finnish PHR: Need possibility to store information of irregular rhythm." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://phr.kanta.fi/StructureDefinition/fiphr-boolean" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="Observation.code.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.code.coding:heartRate">
      <path value="Observation.code.coding" />
      <sliceName value="heartRateRhythm" />
      <short value="Observation of heart rate" />
      <definition value="Measurement of heart rate in beats/min." />
    </element>
    <element id="Observation.code.coding:heartRate.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="8867-4" />
    </element>
    <element id="Observation.code.coding:heartRateAverage24h">
      <path value="Observation.code.coding" />
      <sliceName value="heartRateAverage24h" />
      <short value="Average heart rate BPM in 24 hours" />
      <definition value="Measured average of heart rate in beats/min during a 24 hour period." />
    </element>
    <element id="Observation.code.coding:heartRateAverage24h.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="41924-2" />
    </element>
    <element id="Observation.code.coding:heartRateMinimum24h">
      <path value="Observation.code.coding" />
      <sliceName value="heartRateMinimum24h" />
      <short value="Minimum heart rate BPM in 24 hours" />
      <definition value="Measured minimum of heart rate in beats/min during a 24 hour period." />
    </element>
    <element id="Observation.code.coding:heartRateMinimum24h.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="8883-1" />
    </element>
    <element id="Observation.code.coding:heartRateMaximum24h">
      <path value="Observation.code.coding" />
      <sliceName value="heartRateMaximum24h" />
      <short value="Maximum heart rate BPM in 24 hours" />
      <definition value="Measured maximum of heart rate in beats/min during a 24 hour period." />
    </element>
    <element id="Observation.code.coding:heartRateMaximum24h.code">
      <path value="Observation.code.coding.code" />
      <fixedCode value="8873-2" />
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.valueQuantity" />
      <sliceName value="valueQuantity" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="valueQuantity:valueQuantity.value">
      <path value="Observation.valueQuantity.value" />
      <min value="1" />
    </element>
    <element id="Observation.value[x]:valueQuantity.comparator">
      <path value="Observation.valueQuantity.comparator" />
      <max value="0" />
    </element>
    <element id="valueQuantity:valueQuantity.unit">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Observation.valueQuantity.unit" />
      <short value="Finnish PHR: The unit presentation of the measured heart rate in beats/min" />
      <definition value="Finnish PHR:  A human-readable form of the unit.presentation of the measured heart rate in beats/min." />
      <requirements value="Unit is mandatory in FinnishPHR vital-signs Observations" />
      <min value="1" />
      <fixedString value="beats/min" />
    </element>
    <element id="valueQuantity:valueQuantity.system">
      <path value="Observation.valueQuantity.system" />
      <min value="1" />
      <fixedUri value="http://unitsofmeasure.org" />
    </element>
    <element id="Observation.value[x]:valueQuantity.code">
      <path value="Observation.valueQuantity.code" />
      <min value="1" />
      <fixedCode value="{Beats}/min" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>