<?xml-model href="http://hl7.org/fhir/STU3/structuredefinition.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<StructureDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir http://hl7.org/fhir/STU3/structuredefinition.xsd" xmlns="http://hl7.org/fhir">
  <id value="bloodGlucoseSelfMeasurement" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/bloodGlucoseSelfMeasurement" />
  <version value="1.0" />
  <name value="BloodGlucoseSelfMeasurement" />
  <title value="Blood Glucose Self Measurement" />
  <status value="draft" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="email" />
      <value value="info@nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="This profiles represents a single blood glucose self measurement based on the seven-point scale (SMBG)." />
  <copyright value="CC0" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <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:eventTiming">
      <path value="Observation.extension" />
      <sliceName value="eventTiming" />
      <short value="Approximate time of observation" />
      <definition value="Regular life events the observation is tied to. This is useful for recording imprecise or &quot;fuzzy&quot; times when the observation occurred.  For example, a blood glucose measurement &quot;after breakfast&quot;.  It is interpreted as relative to the `effectiveTime` element or the `issued` element if `effectiveTime` is absent.  For example the blood glucose measurement could be reported that same day (&quot;today after breakfast&quot;) or some other day (&quot;yesterday after breakfast&quot;)." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/observation-eventTiming" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Observation.extension:eventTiming.url">
      <path value="Observation.extension.url" />
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/observation-eventTiming" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.code" />
        </discriminator>
        <rules value="closed" />
      </slicing>
    </element>
    <element id="Observation.code:fastingGlucose">
      <path value="Observation.code" />
      <sliceName value="fastingGlucose" />
    </element>
    <element id="Observation.code:fastingGlucose.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.code:fastingGlucose.coding:loinc">
      <path value="Observation.code.coding" />
      <sliceName value="loinc" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code:fastingGlucose.coding:loinc.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code:fastingGlucose.coding:loinc.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
      <fixedCode value="41604-0" />
    </element>
    <element id="Observation.code:fastingGlucose.coding:loinc.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Observation.code.coding.display" />
      <fixedString value="Fasting Glucose [moles/volume] in capillary blood by Glucometer" />
    </element>
    <element id="Observation.code:generalGlucose">
      <path value="Observation.code" />
      <sliceName value="generalGlucose" />
    </element>
    <element id="Observation.code:generalGlucose.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.code:generalGlucose.coding:loinc">
      <path value="Observation.code.coding" />
      <sliceName value="loinc" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code:generalGlucose.coding:loinc.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code:generalGlucose.coding:loinc.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
      <fixedCode value="14743-9" />
    </element>
    <element id="Observation.code:generalGlucose.coding:loinc.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Observation.code.coding.display" />
      <fixedString value="Glucose [moles/volume] in capillary blood by Glucometer" />
    </element>
    <element id="Observation.code:postMealGlucose">
      <path value="Observation.code" />
      <sliceName value="postMealGlucose" />
    </element>
    <element id="Observation.code:postMealGlucose.coding">
      <path value="Observation.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.code:postMealGlucose.coding:loinc">
      <path value="Observation.code.coding" />
      <sliceName value="loinc" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code:postMealGlucose.coding:loinc.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
      <fixedUri value="http://loinc.org" />
    </element>
    <element id="Observation.code:postMealGlucose.coding:loinc.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
      <fixedCode value="14760-3" />
    </element>
    <element id="Observation.code:postMealGlucose.coding:loinc.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Observation.code.coding.display" />
      <fixedString value="Glucose [moles/volume] in capillary blood by Glucometer -- 2 hours post meal" />
    </element>
    <element id="Observation.value[x]:valueQuantity">
      <path value="Observation.valueQuantity" />
      <sliceName value="valueQuantity" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
  </differential>
</StructureDefinition>