StructureDefinition - FHIR Resource (r4)


This StructureDefinition Resource uses the FHIR API standard for access and structure.

Validate an StructureDefinition FHIR Resource (r4)



Resource Attributes

AttributeField is listTypeDescription
abstractfalseboolean# Whether the structure is abstract
baseDefinitionfalsecanonical(StructureDefinition)# C? Definition that this type is constrained/specialized from
contacttrueContactDetail# Contact details for the publisher
contexttrueData Type# C? If an extension, where it can be used in instances
contextInvarianttruestring# C? FHIRPath invariants - when the extension can be used
copyrightfalsemarkdown# Use and/or publishing restrictions
datefalsedateTime# Date last changed
derivationfalsecode# specialization | constraint - How relates to base definition
descriptionfalsemarkdown# Natural language description of the structure definition
differentialfalseData Type# C? Differential view of the structure
experimentalfalseboolean# For testing purposes, not real usage
fhirVersionfalsecode# FHIR Version this StructureDefinition targets
identifiertrueIdentifier# Additional identifier for the structure definition
jurisdictiontrueCodeableConcept# Intended jurisdiction for structure definition (if applicable)
keywordtrueCoding# Assist with indexing and finding
kindfalsecode# primitive-type | complex-type | resource | logical
mappingtrueData Type# External specification that the content is mapped to
namefalsestring# C? Name for this structure definition (computer friendly)
publisherfalsestring# Name of the publisher (organization or individual)
purposefalsemarkdown# Why this structure definition is defined
snapshotfalseData Type# C? Snapshot view of the structure
statusfalsecode# draft | active | retired | unknown
titlefalsestring# Name for this structure definition (human friendly)
typefalseuri# fhirpath | element | extension
urlfalseuri# Canonical identifier for this structure definition, represented as a URI (globally unique)
useContexttrueUsageContext# The context that the content is intended to support
versionfalsestring# Business version of the structure definition

StructureDefinition Example

{
  "resourceType": "StructureDefinition",
  "id": "Element",
  "meta": {
    "lastUpdated": "2019-11-01T09:29:23.356+11:00"
  },
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "normative"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
      "valueCode": "4.0.0"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Element",
  "version": "4.0.1",
  "name": "Element",
  "status": "active",
  "date": "2019-11-01T09:29:23+11:00",
  "publisher": "HL7 FHIR Standard",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    }
  ],
  "description": "Base StructureDefinition for Element Type: Base definition for all elements in a resource.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "complex-type",
  "abstract": true,
  "type": "Element",
  "snapshot": {
    "element": [
      {
        "id": "Element",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "Element",
        "short": "Base for all elements",
        "definition": "Base definition for all elements in a resource.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element",
          "min": 0,
          "max": "*"
        },
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div"
          }
        ],
        "isModifier": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Element.id",
        "path": "Element.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Element.extension",
        "path": "Element.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Element",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "Element",
        "short": "Base for all elements",
        "definition": "Base definition for all elements in a resource.",
        "min": 0,
        "max": "*",
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Element.id",
        "path": "Element.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Element.extension",
        "path": "Element.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      }
    ]
  }
}

StructureDefinition Structure

{
  "resourceType" : "StructureDefinition",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Canonical identifier for this structure definition, represented as a URI (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the structure definition
  "version" : "<string>", // Business version of the structure definition
  "name" : "<string>", // C? R!  Name for this structure definition (computer friendly)
  "title" : "<string>", // Name for this structure definition (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the structure definition
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for structure definition (if applicable)
  "purpose" : "<markdown>", // Why this structure definition is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "keyword" : [{ Coding }], // Assist with indexing and finding
  "fhirVersion" : "<code>", // FHIR Version this StructureDefinition targets
  "mapping" : [{ // External specification that the content is mapped to
    "identity" : "<id>", // R!  Internal id when this mapping is used
    "uri" : "<uri>", // C? Identifies what this mapping refers to
    "name" : "<string>", // C? Names what this mapping refers to
    "comment" : "<string>" // Versions, Issues, Scope limitations etc.
  }],
  "kind" : "<code>", // R!  primitive-type | complex-type | resource | logical
  "abstract" : <boolean>, // R!  Whether the structure is abstract
  "context" : [{ // C? If an extension, where it can be used in instances
    "type" : "<code>", // R!  fhirpath | element | extension
    "expression" : "<string>" // R!  Where the extension can be used in instances
  }],
  "contextInvariant" : ["<string>"], // C? FHIRPath invariants - when the extension can be used
  "type" : "<uri>", // C? R!  Type defined or constrained by this structure
  "baseDefinition" : { canonical(StructureDefinition) }, // C? Definition that this type is constrained/specialized from
  "derivation" : "<code>", // specialization | constraint - How relates to base definition
  "snapshot" : { // C? Snapshot view of the structure
    "element" : [{ ElementDefinition }] // C? R!  Definition of elements in the resource (if no StructureDefinition)
  },
  "differential" : { // C? Differential view of the structure
    "element" : [{ ElementDefinition }] // R!  Definition of elements in the resource (if no StructureDefinition)
  }
}

StructureDefinition Search Parameters

The following search parameters can be used to query StructureDefinition resources. Just submit them like so:

https://api.1up.health/fhir/r4/StructureDefinition?query-param=queryvalue
Search ParameterField TypeResource Fields Searched
abstract TUtextabstract
base TUreferencebaseDefinition
base-path TUtextsnapshot.element.base.path
context TUtextuseContext.value
context-quantity TUquantityuseContext.value
context-type TUtextuseContext.code
context-type-quantity TUcompositeuseContext
context-type-value TUcompositeuseContext
date TUdatedate
derivation TUtextderivation
description TUtextdescription
experimental TUtextexperimental
ext-context TUtextcontext.type
identifier TUtextidentifier
jurisdiction TUtextjurisdiction
keyword TUtextkeyword
kind TUtextkind
name TUtextname
path TUtextsnapshot.element.path
publisher TUtextpublisher
status TUtextstatus
title TUtexttitle
type TUuritype
url TUuriurl
valueset TUreferencesnapshot.element.binding.valueSet
version TUtextversion