<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SampledData" />
  <meta>
    <lastUpdated value="2019-11-01T09:29:23.356+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/SampledData" />
  <version value="4.0.1" />
  <name value="SampledData" />
  <status value="draft" />
  <date value="2019-11-01T09:29:23+11:00" />
  <publisher value="HL7 FHIR Standard" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <description value="Base StructureDefinition for SampledData Type: A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data." />
  <purpose value="There is a need for a concise way to handle the data produced by devices that sample a physical state at a high frequency." />
  <fhirVersion value="4.0.1" />
  <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>
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="SampledData" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <snapshot>
    <element id="SampledData">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="trial-use" />
      </extension>
      <path value="SampledData" />
      <short value="A series of measurements taken by a device" />
      <definition value="A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data." />
      <comment value="The data is not interpretable without at least origin, period, and dimensions, but these are optional to allow a separation between the template of measurement and the actual measurement, such as between DeviceCapabilities and DeviceLog.  When providing a summary view (for example with Observation.value[x]) SampledData should be represented with a brief display text such as &quot;Sampled Data&quot;." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="SampledData" />
        <min value="0" />
        <max value="*" />
      </base>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="N/A (but see section 7.14 in v2.7)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SLIST + GLIST" />
      </mapping>
    </element>
    <element id="SampledData.id">
      <path value="SampledData.id" />
      <representation value="xmlAttr" />
      <short value="Unique id for inter-element referencing" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string" />
        </extension>
        <code value="http://hl7.org/fhirpath/System.String" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SampledData.extension">
      <path value="SampledData.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional content defined by implementations" />
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
      <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <alias value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="SampledData.origin">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="SampledData.origin" />
      <short value="Zero value and units" />
      <definition value="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." />
      <comment value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SampledData.origin" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="qty-3" />
        <severity value="error" />
        <human value="If a code for the unit is present, the system SHALL also be present" />
        <expression value="code.empty() or system.exists()" />
        <xpath value="not(exists(f:code)) or exists(f:system)" />
        <source value="http://hl7.org/fhir/StructureDefinition/Quantity" />
      </constraint>
      <constraint>
        <key value="sqty-1" />
        <severity value="error" />
        <human value="The comparator is not used on a SimpleQuantity" />
        <expression value="comparator.empty()" />
        <xpath value="not(exists(f:comparator))" />
        <source value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </constraint>
      <isModifier value="false" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="SN (see also Range) or CQ" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SLIST.origin" />
      </mapping>
    </element>
    <element id="SampledData.period">
      <path value="SampledData.period" />
      <short value="Number of milliseconds between samples" />
      <definition value="The length of time between sampling times, measured in milliseconds." />
      <comment value="This is usually a whole number." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SampledData.period" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="GLIST.increment" />
      </mapping>
    </element>
    <element id="SampledData.factor">
      <path value="SampledData.factor" />
      <short value="Multiply data by this before adding to origin" />
      <definition value="A correction factor that is applied to the sampled data points before they are added to the origin." />
      <comment value="Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SampledData.factor" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <meaningWhenMissing value="If no factor is assigned, the data is not adjusted before adding to the origin" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SLIST.factor" />
      </mapping>
    </element>
    <element id="SampledData.lowerLimit">
      <path value="SampledData.lowerLimit" />
      <short value="Lower limit of detection" />
      <definition value="The lower limit of detection of the measured points. This is needed if any of the data points have the value &quot;L&quot; (lower than detection limit)." />
      <comment value="Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SampledData.lowerLimit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A (use SLIST.digits.nullFlavor)" />
      </mapping>
    </element>
    <element id="SampledData.upperLimit">
      <path value="SampledData.upperLimit" />
      <short value="Upper limit of detection" />
      <definition value="The upper limit of detection of the measured points. This is needed if any of the data points have the value &quot;U&quot; (higher than detection limit)." />
      <comment value="Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SampledData.upperLimit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A (use SLIST.digits.nullFlavor)" />
      </mapping>
    </element>
    <element id="SampledData.dimensions">
      <path value="SampledData.dimensions" />
      <short value="Number of sample points at each time point" />
      <definition value="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." />
      <comment value="If there is more than one dimension, the code for the type of data will define the meaning of the dimensions (typically ECG data)." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="SampledData.dimensions" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A (fixed to 1)" />
      </mapping>
    </element>
    <element id="SampledData.data">
      <path value="SampledData.data" />
      <short value="Decimal values with spaces, or &quot;E&quot; | &quot;U&quot; | &quot;L&quot;" />
      <definition value="A series of data points which are decimal values separated by a single space (character u20). The special values &quot;E&quot; (error), &quot;L&quot; (below detection limit) and &quot;U&quot; (above detection limit) can also be used in place of a decimal value." />
      <comment value="Data may be missing if it is omitted for summarization purposes. In general, data is required for any actual use of a SampledData." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="SampledData.data" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SLIST.digits" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="SampledData">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="trial-use" />
      </extension>
      <path value="SampledData" />
      <short value="A series of measurements taken by a device" />
      <definition value="A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data." />
      <comment value="The data is not interpretable without at least origin, period, and dimensions, but these are optional to allow a separation between the template of measurement and the actual measurement, such as between DeviceCapabilities and DeviceLog.  When providing a summary view (for example with Observation.value[x]) SampledData should be represented with a brief display text such as &quot;Sampled Data&quot;." />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="v2" />
        <map value="N/A (but see section 7.14 in v2.7)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SLIST + GLIST" />
      </mapping>
    </element>
    <element id="SampledData.origin">
      <path value="SampledData.origin" />
      <short value="Zero value and units" />
      <definition value="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Quantity" />
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="SLIST.origin" />
      </mapping>
    </element>
    <element id="SampledData.period">
      <path value="SampledData.period" />
      <short value="Number of milliseconds between samples" />
      <definition value="The length of time between sampling times, measured in milliseconds." />
      <comment value="This is usually a whole number." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="GLIST.increment" />
      </mapping>
    </element>
    <element id="SampledData.factor">
      <path value="SampledData.factor" />
      <short value="Multiply data by this before adding to origin" />
      <definition value="A correction factor that is applied to the sampled data points before they are added to the origin." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <meaningWhenMissing value="If no factor is assigned, the data is not adjusted before adding to the origin" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="SLIST.factor" />
      </mapping>
    </element>
    <element id="SampledData.lowerLimit">
      <path value="SampledData.lowerLimit" />
      <short value="Lower limit of detection" />
      <definition value="The lower limit of detection of the measured points. This is needed if any of the data points have the value &quot;L&quot; (lower than detection limit)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="N/A (use SLIST.digits.nullFlavor)" />
      </mapping>
    </element>
    <element id="SampledData.upperLimit">
      <path value="SampledData.upperLimit" />
      <short value="Upper limit of detection" />
      <definition value="The upper limit of detection of the measured points. This is needed if any of the data points have the value &quot;U&quot; (higher than detection limit)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="N/A (use SLIST.digits.nullFlavor)" />
      </mapping>
    </element>
    <element id="SampledData.dimensions">
      <path value="SampledData.dimensions" />
      <short value="Number of sample points at each time point" />
      <definition value="The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once." />
      <comment value="If there is more than one dimension, the code for the type of data will define the meaning of the dimensions (typically ECG data)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="positiveInt" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="N/A (fixed to 1)" />
      </mapping>
    </element>
    <element id="SampledData.data">
      <path value="SampledData.data" />
      <short value="Decimal values with spaces, or &quot;E&quot; | &quot;U&quot; | &quot;L&quot;" />
      <definition value="A series of data points which are decimal values separated by a single space (character u20). The special values &quot;E&quot; (error), &quot;L&quot; (below detection limit) and &quot;U&quot; (above detection limit) can also be used in place of a decimal value." />
      <comment value="Data may be missing if it is omitted for summarization purposes. In general, data is required for any actual use of a SampledData." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="SLIST.digits" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>