<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-core-SampledData" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR SampledData Profile</b>
      </p>
      <p>Data that comes from a series of measurements taken by a device, which may have upper and lower limits. The data type also supports more than one dimension in the data.</p>
      <p>
        <b>SHR Mapping Summary</b>
      </p>
      <p>
        <pre>shr.core.SampledData maps to SampledData:
  string maps to data
  Origin maps to origin
  MillisecondsBetweenSamples maps to period
  CorrectionFactor maps to factor
  LowerLimit maps to lowerLimit
  UpperLimit maps to upperLimit
  Dimensions maps to dimensions
</pre>
      </p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-SampledData" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.core.SampledData" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR SampledData Profile" />
  <status value="draft" />
  <date value="2017-12-20" />
  <publisher value="The MITRE Corporation: Standard Health Record Collaborative" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://standardhealthrecord.org" />
    </telecom>
  </contact>
  <description value="Data that comes from a series of measurements taken by a device, which may have upper and lower limits. The data type also supports 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="3.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/SampledData" />
  <derivation value="constraint" />
  <snapshot>
    <element id="SampledData:shr-core-SampledData">
      <path value="SampledData" />
      <short value="SHR SampledData Profile" />
      <definition value="Data that comes from a series of measurements taken by a device, which may have upper and lower limits. The data type also supports 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="*" />
      <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() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="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:shr-core-SampledData.id">
      <path value="SampledData.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <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>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SampledData:shr-core-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. In order 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 is allowed to 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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="SampledData:shr-core-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://standardhealthrecord.org/fhir/StructureDefinition/shr-core-SimpleQuantity" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="SLIST.origin" />
      </mapping>
    </element>
    <element id="SampledData:shr-core-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:shr-core-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>
      <defaultValueDecimal value="1" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="SLIST.factor" />
      </mapping>
    </element>
    <element id="SampledData:shr-core-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:shr-core-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:shr-core-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:shr-core-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." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="SLIST.digits" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="SampledData:shr-core-SampledData">
      <path value="SampledData" />
      <short value="SHR SampledData Profile" />
      <definition value="Data that comes from a series of measurements taken by a device, which may have upper and lower limits. The data type also supports more than one dimension in the data." />
    </element>
    <element id="SampledData:shr-core-SampledData.origin">
      <path value="SampledData.origin" />
      <type>
        <code value="Quantity" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-SimpleQuantity" />
      </type>
    </element>
  </differential>
</StructureDefinition>