http://hl7.org/fhir/StructureDefinition/StructureDefinition|5.0.0

A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
description: A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
derivation: specialization
name: StructureDefinition
type: StructureDefinition
elements:
  description: {isModifier: false, short: Natural language description of the structure definition, mustSupport: false, isSummary: false, index: 12}
  date: {isModifier: false, short: Date last changed, mustSupport: false, isSummary: true, index: 9}
  derivation:
    isModifier: false
    short: specialization | constraint - How relates to base definition
    mustSupport: false
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/type-derivation-rule|5.0.0'}
    isSummary: true
    index: 33
  publisher: {isModifier: false, short: Name of the publisher/steward (organization or individual), mustSupport: false, isSummary: true, index: 10}
  contextInvariant: {isModifier: false, short: FHIRPath invariants - when the extension can be used, mustSupport: false, array: true, isSummary: true, index: 30}
  fhirVersion:
    isModifier: false
    short: FHIR Version this StructureDefinition targets
    mustSupport: false
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/FHIR-version|5.0.0'}
    isSummary: true
    index: 19
  jurisdiction:
    isModifier: false
    short: Intended jurisdiction for structure definition (if applicable)
    mustSupport: false
    array: true
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/jurisdiction'}
    isSummary: true
    index: 14
  purpose: {isModifier: false, short: Why this structure definition is defined, mustSupport: false, isSummary: false, index: 15}
  name: {isModifier: false, short: Name for this structure definition (computer friendly), mustSupport: false, isSummary: true, index: 5}
  mapping:
    constraint:
      sdf-2: {human: Must have at least a name or a uri (or both), source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: name.exists() or uri.exists()}
    isModifier: false
    short: External specification that the content is mapped to
    index: 20
    mustSupport: false
    array: true
    elements:
      identity: {isModifier: false, short: Internal id when this mapping is used, mustSupport: false, isSummary: false, index: 21}
      uri: {isModifier: false, short: Identifies what this mapping refers to, mustSupport: false, isSummary: false, index: 22}
      name: {isModifier: false, short: Names what this mapping refers to, mustSupport: false, isSummary: false, index: 23}
      comment: {isModifier: false, short: 'Versions, Issues, Scope limitations etc', mustSupport: false, isSummary: false, index: 24}
    required: [identity]
    isSummary: false
  copyrightLabel: {isModifier: false, short: Copyright holder and year(s), mustSupport: false, isSummary: false, index: 17}
  useContext: {isModifier: false, short: The context that the content is intended to support, mustSupport: false, array: true, isSummary: true, index: 13}
  abstract: {isModifier: false, short: Whether the structure is abstract, mustSupport: false, isSummary: true, index: 26}
  copyright: {isModifier: false, short: Use and/or publishing restrictions, mustSupport: false, isSummary: false, index: 16}
  versionAlgorithm:
    isModifier: false
    short: How to compare versions
    mustSupport: false
    choices: []
    isSummary: true
    index: 4
  type:
    isModifier: false
    short: Type defined or constrained by this structure
    mustSupport: false
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/fhir-types'}
    isSummary: true
    index: 31
  experimental: {isModifier: false, short: 'For testing purposes, not real usage', mustSupport: false, meaningWhenMissing: 'If absent, this resource is treated as though it is not experimental.', isSummary: true, index: 8}
  title: {isModifier: false, short: Name for this structure definition (human friendly), mustSupport: false, isSummary: true, index: 6}
  snapshot:
    constraint:
      sdf-26:
        human: The root element of a profile should not have mustSupport = true
        source: http://hl7.org/fhir/StructureDefinition/StructureDefinition
        severity: warning
        extension:
        - {url: 'http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice', valueBoolean: true}
        - {url: 'http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation', valueMarkdown: It is bad practice to set the root element of a profile to 'mustSupport' as mustSupport should always be determined by the element referencing a type.  The designer of a StructureDefinition cannot know all circumstances in which a type or profile might be used}
        expression: $this.where(element[0].mustSupport='true').exists().not()
      sdf-8: {human: 'All snapshot elements must start with the StructureDefinition''s specified type for non-logical models, or with the same type name for logical models', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: (%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.'))}
      sdf-25: {human: 'For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: 'element.where(type.where(code=''CodeableConcept'').exists() and path.endsWith(''.concept'') and binding.exists() and (path.substring(0,$this.path.length()-8) in %context.element.where(type.where(code=''CodeableReference'').exists()).path)).exists().not()'}
      sdf-24: {human: 'For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: 'element.where(type.where(code=''Reference'').exists() and path.endsWith(''.reference'') and type.targetProfile.exists() and (path.substring(0,$this.path.length()-10) in %context.element.where(type.where(code=''CodeableReference'').exists()).path)).exists().not()'}
      sdf-3: {human: 'Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: '%resource.kind = ''logical'' or element.all(definition.exists() and min.exists() and max.exists())'}
      sdf-8b: {human: All snapshot elements must have a base definition, source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: element.all(base.exists())}
    isModifier: false
    short: Snapshot view of the structure
    mustSupport: false
    isSummary: false
    index: 34
    elements:
      element:
        constraint:
          sdf-28: {human: 'If there are no discriminators, there must be a definition', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: slicing.exists().not() or (slicing.discriminator.exists() or slicing.description.exists())}
          sdf-10: {human: provide either a binding reference or a description (or both), source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: binding.empty() or binding.valueSet.exists() or binding.description.exists(), requirements: binding is required}
        min: 1
        isModifier: false
        short: Definition of elements in the resource (if no StructureDefinition)
        index: 35
        mustSupport: false
        array: true
        isSummary: false
    required: [element]
  keyword:
    isModifier: false
    short: Assist with indexing and finding
    mustSupport: false
    array: true
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/definition-use'}
    isSummary: true
    index: 18
  status:
    isModifier: true
    short: draft | active | retired | unknown
    mustSupport: false
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/publication-status|5.0.0'}
    isModifierReason: This is labeled as \"Is Modifier\" because applications should not use a retired {{title}} without due consideration
    isSummary: true
    index: 7
  kind:
    isModifier: false
    short: primitive-type | complex-type | resource | logical
    mustSupport: false
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/structure-definition-kind|5.0.0'}
    isSummary: true
    index: 25
  url:
    constraint:
      cnl-1: {human: 'URL should not contain | or # - these characters make processing canonical references problematic', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: warning, expression: 'exists() implies matches(''^[^|# ]+$'')'}
    isModifier: false
    short: Canonical identifier for this structure definition, represented as a URI (globally unique)
    mustSupport: false
    isSummary: true
    index: 0
  identifier: {isModifier: false, short: Additional identifier for the structure definition, mustSupport: false, array: true, isSummary: true, index: 1}
  context:
    isModifier: false
    short: If an extension, where it can be used in instances
    mustSupport: false
    array: true
    isSummary: true
    index: 27
    elements:
      type:
        isModifier: false
        short: fhirpath | element | extension
        mustSupport: false
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/extension-context-type|5.0.0'}
        isSummary: true
        index: 28
      expression: {isModifier: false, short: Where the extension can be used in instances, mustSupport: false, isSummary: true, index: 29}
    required: [expression, type]
  version: {isModifier: false, short: Business version of the structure definition, mustSupport: false, isSummary: true, index: 2}
  differential:
    constraint:
      sdf-20: {human: No slicing on the root element, source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: element.where(path.contains('.').not()).slicing.empty(), requirements: no slicing on root}
      sdf-8a: {human: 'In any differential, all the elements must start with the StructureDefinition''s specified type for non-logical models, or with the same type name for logical models', source: 'http://hl7.org/fhir/StructureDefinition/StructureDefinition', severity: error, expression: '(%resource.kind = ''logical'' or element.first().path.startsWith(%resource.type)) and (element.tail().empty() or  element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches(''\\..*'','''')&''.'')))'}
    isModifier: false
    short: Differential view of the structure
    mustSupport: false
    isSummary: false
    index: 36
    elements:
      element: {min: 1, isModifier: false, short: Definition of elements in the resource (if no StructureDefinition), mustSupport: false, array: true, isSummary: false, index: 37}
    required: [element]
  contact: {isModifier: false, short: Contact details for the publisher, mustSupport: false, array: true, isSummary: true, index: 11}
  baseDefinition: {isModifier: false, short: Definition that this type is constrained/specialized from, mustSupport: false, isSummary: true, index: 32}
class: resource
kind: resource
url: http://hl7.org/fhir/StructureDefinition/StructureDefinition
base: http://hl7.org/fhir/StructureDefinition/DomainResource
version: 5.0.0
required: [abstract, url, name, status, kind, type]