{
  "resourceType": "StructureDefinition",
  "id": "digidot-ehds-body-structure",
  "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure",
  "version": "0.5.1",
  "name": "DigidotEhdsBodyStructure",
  "title": "DigiDOT inline Xt-EHR Body structure",
  "status": "draft",
  "publisher": "Novari AS - DigiDOT",
  "description": "Readiness: [In development](https://simplifier.net/guide/Visual-overview/Home/Review-status-and-releases.page.md?version=current#readiness-ehds-body-structure).\n\nDigiDOT-defined R4 complex extension representing the five fields, datatypes and cardinalities of Xt-EHR EHDSBodyStructure 1.0.0. The logical model prefers SNOMED CT without specifying concrete ValueSets. The required bindings and dental selection subsets here are DigiDOT choices; they support teeth and other anatomical locations.",
  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": false,
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "context": [
    {
      "type": "element",
      "expression": "CodeableConcept"
    }
  ],
  "mapping": [
    {
      "identity": "xt-ehr",
      "uri": "http://www.xt-ehr.eu/fhir/models/StructureDefinition/EHDSBodyStructure",
      "name": "Xt-EHR EHDSBodyStructure 1.0.0",
      "comment": "Field, datatype and cardinality mapping; the concrete terminology restrictions are DigiDOT-specific."
    }
  ],
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Inline Xt-EHR Body structure logical model",
        "definition": "One inline anatomical group representing the five fields of Xt-EHR EHDSBodyStructure 1.0.0. DigiDOT adds terminology rules and location-presence constraints. No independent resource identity is required.",
        "constraint": [
          {
            "key": "digidot-anatomy-qualifier-location",
            "severity": "error",
            "human": "A locationQualifier requires a location in the same anatomical group.",
            "expression": "extension.where(url = 'locationQualifier').empty() or extension.where(url = 'location').exists()"
          },
          {
            "key": "digidot-anatomy-laterality-location",
            "severity": "error",
            "human": "Laterality requires a location in the same anatomical group.",
            "expression": "extension.where(url = 'laterality').empty() or extension.where(url = 'location').exists()"
          }
        ]
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "min": 0,
        "max": "*"
      },
      {
        "id": "Extension.extension:morphology",
        "path": "Extension.extension",
        "sliceName": "morphology",
        "min": 0,
        "max": "1",
        "short": "The kind of structure being represented by the body structure at BodyStructure.location. This can define both normal and abnormal morphologies.",
        "definition": "The kind of structure being represented by the body structure at BodyStructure.location. This can define both normal and abnormal morphologies.",
        "mapping": [
          {
            "identity": "xt-ehr",
            "map": "EHDSBodyStructure.morphology"
          }
        ]
      },
      {
        "id": "Extension.extension:morphology.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:morphology.url",
        "path": "Extension.extension.url",
        "fixedUri": "morphology"
      },
      {
        "id": "Extension.extension:morphology.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "preferred",
          "description": "SNOMED CT"
        }
      },
      {
        "id": "Extension.extension:location",
        "path": "Extension.extension",
        "sliceName": "location",
        "min": 0,
        "max": "1",
        "short": "Body site",
        "definition": "One anatomical body structure. For a numbered tooth, choose a code from the Norwegian teeth reference set in the same SNOMED CT release. Other appropriate body structures may be used.",
        "mapping": [
          {
            "identity": "xt-ehr",
            "map": "EHDSBodyStructure.location"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Extension.extension:location.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:location.url",
        "path": "Extension.extension.url",
        "fixedUri": "location"
      },
      {
        "id": "Extension.extension:location.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "DigiDOT required anatomical scope: SNOMED CT Body structure hierarchy (<< 123037004). The additional national teeth binding provides the preferred subset for numbered teeth.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/snomed-body-structures",
          "extension": [
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "key",
                  "valueId": "national-teeth"
                },
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://novari.no/fhir/digidot/ValueSet/teeth"
                },
                {
                  "url": "shortDoco",
                  "valueString": "National teeth subset when recording a numbered tooth"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "When location is a numbered tooth, prefer Norwegian refset 598051000202104. This additional binding does not restrict other anatomical locations to teeth. The primary required Body Structures binding still applies."
                }
              ]
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Extension.extension:location.value[x].coding",
        "path": "Extension.extension.value[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "definition": "SNOMED CT codings use the shared SCTpre profile. The slice is selected by system; no Coding.id marker is required. Other code systems remain subject to the existing field binding."
      },
      {
        "id": "Extension.extension:location.value[x].coding:SCTpre",
        "path": "Extension.extension.value[x].coding",
        "sliceName": "SCTpre",
        "short": "Precoordinated SNOMED CT coding",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no"
            ]
          }
        ]
      },
      {
        "id": "Extension.extension:location.value[x].coding:SCTpre.system",
        "path": "Extension.extension.value[x].coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Extension.extension:locationQualifier",
        "path": "Extension.extension",
        "sliceName": "locationQualifier",
        "min": 0,
        "max": "*",
        "short": "Tooth surface or other anatomical qualifier of the location",
        "definition": "One qualifier value refining the location in the same anatomical group. For a tooth, use the dental surface selection where it covers the intended meaning; repeat locationQualifier for multiple surfaces. Other clinically appropriate qualifiers remain available for teeth or other structures. Record left/right in laterality. A code valid in the broad ValueSet is not necessarily suitable for every structure.",
        "mapping": [
          {
            "identity": "xt-ehr",
            "map": "EHDSBodyStructure.locationQualifier"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Extension.extension:locationQualifier.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:locationQualifier.url",
        "path": "Extension.extension.url",
        "fixedUri": "locationQualifier"
      },
      {
        "id": "Extension.extension:locationQualifier.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "DigiDOT required broad scope of SNOMED CT anatomical qualifier values. The additional dental subset provides focused selection without excluding other suitable qualifiers. Tooth-surface body-structure concepts are not interchangeable with qualifier values.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/bodystructure-location-qualifiers",
          "extension": [
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "key",
                  "valueId": "dental-surface-selection"
                },
                {
                  "url": "purpose",
                  "valueCode": "ui"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://novari.no/fhir/digidot/ValueSet/tooth-surface-qualifiers"
                },
                {
                  "url": "shortDoco",
                  "valueString": "Published dental qualifier selection; incomplete five-surface coverage"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "A focused selection for a tooth location, using existing active SNOMED CT qualifier values. This draft subset is not a complete five-surface terminology and does not replace the broader required binding. Buccal/labial and lingual/palatal representation still requires terminology agreement. Do not substitute Tongue or Cheek structure for a tooth surface qualifier."
                }
              ]
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Extension.extension:locationQualifier.value[x].coding",
        "path": "Extension.extension.value[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "definition": "SNOMED CT codings use the shared SCTpre profile. The slice is selected by system; no Coding.id marker is required. Other code systems remain subject to the existing field binding."
      },
      {
        "id": "Extension.extension:locationQualifier.value[x].coding:SCTpre",
        "path": "Extension.extension.value[x].coding",
        "sliceName": "SCTpre",
        "short": "Precoordinated SNOMED CT coding",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no"
            ]
          }
        ]
      },
      {
        "id": "Extension.extension:locationQualifier.value[x].coding:SCTpre.system",
        "path": "Extension.extension.value[x].coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Extension.extension:laterality",
        "path": "Extension.extension",
        "sliceName": "laterality",
        "min": 0,
        "max": "1",
        "short": "Body structure laterality (e.g. left, right).",
        "definition": "Left or right only when the selected structure can logically be lateralized and does not already encode a side. Do not repeat the side of a numbered tooth.",
        "mapping": [
          {
            "identity": "xt-ehr",
            "map": "EHDSBodyStructure.laterality"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Extension.extension:laterality.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:laterality.url",
        "path": "Extension.extension.url",
        "fixedUri": "laterality"
      },
      {
        "id": "Extension.extension:laterality.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "SNOMED CT Left or Right qualifier values. This binding does not alone prove that the location permits laterality.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/bodystructure-laterality"
        },
        "mustSupport": true
      },
      {
        "id": "Extension.extension:laterality.value[x].coding",
        "path": "Extension.extension.value[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "definition": "SNOMED CT codings use the shared SCTpre profile. The slice is selected by system; no Coding.id marker is required. Other code systems remain subject to the existing field binding."
      },
      {
        "id": "Extension.extension:laterality.value[x].coding:SCTpre",
        "path": "Extension.extension.value[x].coding",
        "sliceName": "SCTpre",
        "short": "Precoordinated SNOMED CT coding",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no"
            ]
          }
        ]
      },
      {
        "id": "Extension.extension:laterality.value[x].coding:SCTpre.system",
        "path": "Extension.extension.value[x].coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "Extension.extension:description",
        "path": "Extension.extension",
        "sliceName": "description",
        "min": 0,
        "max": "1",
        "short": "Textual description of the body structure",
        "definition": "Textual description of the body structure",
        "mapping": [
          {
            "identity": "xt-ehr",
            "map": "EHDSBodyStructure.description"
          }
        ]
      },
      {
        "id": "Extension.extension:description.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:description.url",
        "path": "Extension.extension.url",
        "fixedUri": "description"
      },
      {
        "id": "Extension.extension:description.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  },
  "date": "2026-11-03",
  "purpose": "Keep one location and its qualifiers together inside a clinical bodySite. This is a mapping of the Xt-EHR logical model, not an official EHDS exchange profile or the HL7 R5 BodyStructure.includedStructure backport extension. See https://www.xt-ehr.eu/fhir/models/en/StructureDefinition-EHDSBodyStructure.html."
}