<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>
      <isModifier value="false" />
      <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>
      <isModifier value="false" />
      <isSummary value="false" />
      <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>
      <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(.), &quot;value&quot;)])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <isModifier value="false" />
      <isSummary value="false" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </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" />
      <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>
      <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>
      <isModifier value="false" />
      <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" />
      <base>
        <path value="SampledData.period" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <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>
      <isModifier value="false" />
      <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" />
      <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" />
      <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>
      <isModifier value="false" />
      <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" />
      <base>
        <path value="SampledData.lowerLimit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <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>
      <isModifier value="false" />
      <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" />
      <base>
        <path value="SampledData.upperLimit" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="decimal" />
      </type>
      <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>
      <isModifier value="false" />
      <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" />
      <base>
        <path value="SampledData.dimensions" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="positiveInt" />
      </type>
      <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>
      <isModifier value="false" />
      <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" />
      <base>
        <path value="SampledData.data" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <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>
      <isModifier value="false" />
      <isSummary value="false" />
      <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>