{
  "resourceType": "StructureDefinition",
  "id": "fiphr-sd-bloodglucose-stu3",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-01-23T09:22:17.491+00:00"
  },
  "url": "http://phr.kanta.fi/StructureDefinition/fiphr-bloodglucose-stu3-201909",
  "version": "0.3",
  "name": "fiphr-sd-bloodglucose-stu3",
  "title": "Finnish PHR Blood Glucose profile",
  "status": "draft",
  "date": "2019-09-05",
  "publisher": "Kela",
  "description": "Finnish PHR profile for blood glucose measurement.",
  "purpose": "Finnish PHR profile for Observation used in blood glucose measurements. The profile is based on the Finnish PHR observation profile.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "fiphr-vitalsigns-stu3-201909",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "Finnish PHR Blood Glucose profile",
        "definition": "Finnish PHR profile for Observation used in blood glucose measurements. The profile is based on the Finnish PHR observation profile."
      },
      {
        "id": "Observation.meta.profile",
        "path": "Observation.meta.profile",
        "fixedUri": "http://phr.kanta.fi/StructureDefinition/fiphr-bloodglucose-stu3"
      },
      {
        "id": "Observation.extension",
        "path": "Observation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.extension:hoursAfterMeal",
        "path": "Observation.extension",
        "sliceName": "hoursAfterMeal",
        "label": "hoursAfterMeal",
        "short": "Meal context",
        "definition": "Meal context, how many hours after meal measurement is done.",
        "requirements": "Meal context needed for result interpretation.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://phr.kanta.fi/StructureDefinition/fiphr-unsignedint"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "closed"
        }
      },
      {
        "id": "Observation.code.coding.code",
        "path": "Observation.code.coding.code",
        "short": "Code of body Blood Glucose in Loinc",
        "comment": "."
      },
      {
        "id": "Observation.code.coding:GlucoseInBlood",
        "path": "Observation.code.coding",
        "sliceName": "GlucoseInBlood",
        "short": "Code to be used with home glucometer readings",
        "definition": "This code SHALL be used with home glucometer readings.",
        "comment": "This code SHALL be used with home glucometer readings. Ordering of codings is undefined and SHALL NOT be used to infer meaning.",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:GlucoseInBlood.code",
        "path": "Observation.code.coding.code",
        "fixedCode": "15074-8"
      },
      {
        "id": "Observation.code.coding:GlucoseInCapillaryBloodByGlucometer",
        "path": "Observation.code.coding",
        "sliceName": "GlucoseInCapillaryBloodByGlucometer",
        "short": "Code to be used with home glucometer readings",
        "definition": "This code SHALL be used with home glucometer readings.",
        "comment": "This code SHALL be used with home glucometer readings. Ordering of codings is undefined and SHALL NOT be used to infer meaning.",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:GlucoseInCapillaryBloodByGlucometer.code",
        "path": "Observation.code.coding.code",
        "fixedCode": "14743-9"
      },
      {
        "id": "Observation.code.coding:GlucoseInBodyFluid",
        "path": "Observation.code.coding",
        "sliceName": "GlucoseInBodyFluid",
        "short": "Code to be used with CGM readings",
        "definition": "This code SHALL be used with CGM readings.",
        "comment": "This code SHALL be used with CGM readings. Ordering of codings is undefined and SHALL NOT be used to infer meaning.",
        "max": "1"
      },
      {
        "id": "Observation.code.coding:GlucoseInBodyFluid.code",
        "path": "Observation.code.coding.code",
        "fixedCode": "14745-4"
      },
      {
        "id": "Observation.context",
        "path": "Observation.context",
        "definition": "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made ."
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.valueQuantity",
        "sliceName": "valueQuantity",
        "short": "FinnishPHR: Glucose in blood",
        "definition": "FinnishPHR: Glucose in blood",
        "comment": ".",
        "requirements": ".",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity.extension",
        "path": "Observation.valueQuantity.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.value[x]:valueQuantity.extension:alternativeQuantity",
        "path": "Observation.valueQuantity.extension",
        "sliceName": "alternativeQuantity",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://phr.kanta.fi/StructureDefinition/fiphr-ext-pq-translation"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity.extension:alternativeQuantity.valueQuantity:valueQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.valueQuantity.extension.valueQuantity.unit",
        "fixedString": "mg/dl"
      },
      {
        "id": "Observation.value[x]:valueQuantity.extension:alternativeQuantity.valueQuantity:valueQuantity.system",
        "path": "Observation.valueQuantity.extension.valueQuantity.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueQuantity.extension:alternativeQuantity.valueQuantity:valueQuantity.code",
        "path": "Observation.valueQuantity.extension.valueQuantity.code",
        "fixedCode": "mg/dL"
      },
      {
        "id": "Observation.value[x]:valueQuantity.value",
        "path": "Observation.valueQuantity.value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.valueQuantity.unit",
        "short": "Finnish PHR: The unit presentation of the measured glucose in blood",
        "definition": "Finnish PHR: A human-readable form of the unit.presentation of the measured  glucose in blood.",
        "comment": "Note that FHIR strings may not exceed 1MB in size.",
        "requirements": "Unit is mandatory in FinnishPHR vital-signs Observations",
        "min": 1,
        "fixedString": "mmol/l"
      },
      {
        "id": "Observation.value[x]:valueQuantity.system",
        "path": "Observation.valueQuantity.system",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueQuantity.code",
        "path": "Observation.valueQuantity.code",
        "min": 1,
        "fixedCode": "mmol/L"
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing. \r\nFinnish PHR: Codes 'astext' and 'error' are allowed, no other codes.",
        "comment": "Finnish PHR: Code 'error' SHALL be used when a device has been actively trying to measure the blood glucose but has failed for some reason. Code 'astext' SHALL be used when the measured value cannot be stored using the valueQuantity structure (with the comparator). In this case, the value SHALL be presented in the resource narrative. No other codes are allowed."
      },
      {
        "id": "Observation.dataAbsentReason.coding",
        "path": "Observation.dataAbsentReason.coding",
        "min": 1
      },
      {
        "id": "Observation.dataAbsentReason.coding.code",
        "path": "Observation.dataAbsentReason.coding.code",
        "comment": "Note that FHIR strings may not exceed 1MB in size. \r\nFinnish PHR: Code 'error' SHALL be used when a device has been actively trying to measure the blood glucose but has failed for some reason. Code 'astext' SHALL be used when the measured value cannot be stored using the valueQuantity structure (with the comparator). In this case, the value SHALL be presented in the resource narrative. No other codes are allowed."
      },
      {
        "id": "Observation.dataAbsentReason.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.dataAbsentReason.text",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "max": "0"
      }
    ]
  }
}