{
  "resourceType": "StructureDefinition",
  "id": "UKCore-Observation-Lab",
  "url": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-Lab",
  "version": "3.0.0",
  "name": "UKCoreObservationLab",
  "title": "UK Core Observation Lab",
  "status": "active",
  "date": "2026-02-25",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "HL7 UK",
      "telecom": [
        {
          "system": "email",
          "value": "ukcore@hl7.org.uk",
          "use": "work",
          "rank": 1
        }
      ]
    }
  ],
  "description": "This profile defines the UK constraints and extensions on the International FHIR resource [Observation](https://hl7.org/fhir/R4/Observation.html), in order to represent an individual laboratory test and result value. These tests can be grouped together using the UKCore-Observation-Group-Lab profile.",
  "purpose": "To provide the minimum expectations for each individual laboratory test.",
  "copyright": "Copyright © 2021+ HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "constraint": [
          {
            "key": "ukcore-obs-lab-001",
            "severity": "warning",
            "human": "Either `value`, `dataAbsentReason` or `note` SHOULD be populated",
            "expression": "value.exists() or dataAbsentReason.exists() or note.exists()"
          }
        ]
      },
      {
        "id": "Observation.extension:ObservationOrganizer",
        "path": "Observation.extension",
        "sliceName": "ObservationOrganizer",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/6.0/StructureDefinition/extension-Observation.organizer"
            ]
          }
        ]
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "short": "The status of the result value.",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.code"
            }
          ],
          "rules": "open"
        },
        "short": "A code that classifies the general type of observation being made.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.category:laboratory",
        "path": "Observation.category",
        "sliceName": "laboratory",
        "short": "A mandatory code, to identify this observation as being Lab related.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.category:laboratory.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/observation-category"
      },
      {
        "id": "Observation.category:laboratory.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "laboratory"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "The type of lab related observation (code / type).",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "A code from the SNOMED Clinical Terminology UK coding system regarding laboratory medicine test results",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-PathologyAndLaboratoryMedicineObservables"
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "binding": {
          "strength": "preferred"
        }
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "binding": {
          "strength": "preferred"
        }
      }
    ]
  }
}