{
  "resourceType": "StructureDefinition",
  "id": "vitalsigns-bloodglucose",
  "url": "http://nictiz.nl/fhir/StructureDefinition/vitalsign-bloodglucose",
  "version": "1.0.1",
  "name": "Vital Signs BloodGlucose",
  "title": "VitalSigns BloodGlucose",
  "status": "active",
  "publisher": "Nictiz",
  "contact": [
    {
      "name": "Nictiz",
      "telecom": [
        {
          "system": "email",
          "value": "info@nictiz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This profile represents a single blood glucose self measurement based on the seven-point scale (SMBG).",
  "copyright": "CC0",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://nictiz.nl/fhir/StructureDefinition/zib-LaboratoryTestResult-Observation",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "FHIR Blood Glucose Profile"
      },
      {
        "id": "Observation.extension",
        "path": "Observation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.extension:eventTiming",
        "path": "Observation.extension",
        "sliceName": "eventTiming",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/observation-eventTiming"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.extension:eventTiming.extension:code",
        "path": "Observation.extension.extension",
        "sliceName": "code"
      },
      {
        "id": "Observation.extension:eventTiming.extension:code.valueCodeableConcept:valueCodeableConcept",
        "path": "Observation.extension.extension.valueCodeableConcept",
        "sliceName": "valueCodeableConcept"
      },
      {
        "id": "Observation.extension:eventTiming.extension:offset",
        "path": "Observation.extension.extension",
        "sliceName": "offset"
      },
      {
        "id": "Observation.extension:eventTiming.extension:offset.valueQuantity:valueQuantity",
        "path": "Observation.extension.extension.valueQuantity",
        "sliceName": "valueQuantity"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "constraint": [
          {
            "key": "bg-1",
            "severity": "error",
            "human": "Observation.code SHALL have at least one coding based on LOINC",
            "expression": "coding.where(system = 'http://loinc.org').exists()",
            "xpath": "f:coding[f:system/@value = 'http://loinc.org']"
          },
          {
            "key": "bg-2",
            "severity": "error",
            "human": "Observation.code MAY have a maximum of one coding based on NHG Table 45",
            "expression": "coding.where(system = 'https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen').count() <= 1",
            "xpath": "count(f:coding[f:system/@value = 'https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen']) <= 1"
          }
        ]
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            },
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.code.coding:fastingGlucoseloinc",
        "path": "Observation.code.coding",
        "sliceName": "fastingGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseloinc.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseloinc.code",
        "path": "Observation.code.coding.code",
        "min": 1,
        "fixedCode": "41604-0"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseloinc.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:generalGlucoseloinc",
        "path": "Observation.code.coding",
        "sliceName": "generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:generalGlucoseloinc.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.code.coding:generalGlucoseloinc.code",
        "path": "Observation.code.coding.code",
        "min": 1,
        "fixedCode": "14743-9"
      },
      {
        "id": "Observation.code.coding:generalGlucoseloinc.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:postMealGlucoseloinc",
        "path": "Observation.code.coding",
        "sliceName": "postMealGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:postMealGlucoseloinc.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://loinc.org"
      },
      {
        "id": "Observation.code.coding:postMealGlucoseloinc.code",
        "path": "Observation.code.coding.code",
        "min": 1,
        "fixedCode": "14760-3"
      },
      {
        "id": "Observation.code.coding:postMealGlucoseloinc.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:fastingGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "fastingGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to fastingGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 382, mnemonic GLUC BC NU, glucose nuchter, draagbare meter",
        "min": 1,
        "fixedCode": "382"
      },
      {
        "id": "Observation.code.coding:fastingGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:generalGlucosePortableDeviceNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "generalGlucosePortableDeviceNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:generalGlucosePortableDeviceNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:generalGlucosePortableDeviceNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3221, mnemonic GDC BC SR, glucose dagcurve (GDC), draagbare meter",
        "min": 1,
        "fixedCode": "3221"
      },
      {
        "id": "Observation.code.coding:generalGlucosePortableDeviceNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:generalGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "generalGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:generalGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:generalGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 355, mnemonic GDC B SR, glucose dagcurve (GDC)",
        "min": 1,
        "fixedCode": "355"
      },
      {
        "id": "Observation.code.coding:generalGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:postDinerGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "postDinerGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to postMealGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:postDinerGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:postDinerGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3222, menmonic GLUC BC TA, glucose (dagcurve) 2u na diner, draagb.m",
        "min": 1,
        "fixedCode": "3222"
      },
      {
        "id": "Observation.code.coding:postDinerGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:postLunchGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "postLunchGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to postMealGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:postLunchGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:postLunchGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3223, menmonic GLUC BC TM, glucose (dagcurve) 2u na lunch, draagb.m",
        "min": 1,
        "fixedCode": "3223"
      },
      {
        "id": "Observation.code.coding:postLunchGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:postBreakfastGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "postBreakfastGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to postMealGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:postBreakfastGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:postBreakfastGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3224, menmonic GLUC BC TO, glucose (dagcurve) 2u na ontbijt, drgb.m",
        "min": 1,
        "fixedCode": "3224"
      },
      {
        "id": "Observation.code.coding:postBreakfastGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:beforeLunchGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "beforeLunchGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:beforeLunchGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:beforeLunchGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3225, menmonic GLUC BC TL, glucose (dagcurve) voor de lunch, drgb.m",
        "min": 1,
        "fixedCode": "3225"
      },
      {
        "id": "Observation.code.coding:beforeLunchGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:beforeNightGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "beforeNightGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:beforeNightGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:beforeNightGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3226, menmonic GLUC BC TN, glucose (dagcurve) voor de nacht, drgb.m",
        "min": 1,
        "fixedCode": "3226"
      },
      {
        "id": "Observation.code.coding:beforeNightGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.code.coding:beforeDinerGlucoseNhgtable45",
        "path": "Observation.code.coding",
        "sliceName": "beforeDinerGlucoseNhgtable45",
        "definition": "The mapping of the LOINC code to NHG Table 45 MAY be included for primary care systems as second coding next to generalGlucoseloinc",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:beforeDinerGlucoseNhgtable45.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "https://referentiemodel.nhg.org/tabellen/nhg-tabel-45-diagnostische-bepalingen"
      },
      {
        "id": "Observation.code.coding:beforeDinerGlucoseNhgtable45.code",
        "path": "Observation.code.coding.code",
        "definition": "NHG Table 45 code 3227, menmonic GLUC BC TD, glucose (dagcurve)voor het diner, drgb.m",
        "min": 1,
        "fixedCode": "3227"
      },
      {
        "id": "Observation.code.coding:beforeDinerGlucoseNhgtable45.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.valueQuantity",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      }
    ]
  }
}