Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4

Example StructureDefinition/Extension (Turtle)

Modeling and Methodology Work GroupMaturity Level: N/AStandards Status: Informative

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for Extension

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "Extension"] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "normative" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
     fhir:value [ fhir:v "4.0.0" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "can-bind" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"] ;
  fhir:version [ fhir:v "5.0.0"], [ fhir:v "5.0.0"] ;
  fhir:name [ fhir:v "Extension"], [ fhir:v "Extension"] ;
  fhir:status [ fhir:v "active"], [ fhir:v "active"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2023-03-26T15:21:02+11:00"], [ fhir:v "2023-03-26T15:21:02+11:00"] ;
  fhir:publisher [ fhir:v "HL7 FHIR Standard"], [ fhir:v "HL7 FHIR Standard"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "Extension Type: Optional Extension Element - found in all resources."], [ fhir:v "Extension Type: Optional Extension Element - found in all resources."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:purpose [ fhir:v "The ability to add extensions in a structured way is what keeps FHIR resources simple."], [ fhir:v "The ability to add extensions in a structured way is what keeps FHIR resources simple."] ;
  fhir:fhirVersion [ fhir:v "5.0.0"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "complex-type"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "Extension"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/DataType"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "Extension" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "normative" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
         fhir:value [ fhir:v "4.0.0" ]
       ] ) ;
       fhir:path [ fhir:v "Extension" ] ;
       fhir:short [ fhir:v "Optional Extensions Element" ] ;
       fhir:definition [ fhir:v "Optional Extension Element - found in all resources." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a,N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.id" ] ;
       fhir:path [ fhir:v "Extension.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.extension" ] ;
       fhir:path [ fhir:v "Extension.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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 managable, 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." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.url" ] ;
       fhir:path [ fhir:v "Extension.url" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "identifies the meaning of the extension" ] ;
       fhir:definition [ fhir:v "Source of the definition for the extension code - a logical name or a URL." ] ;
       fhir:comment [ fhir:v "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Extension.url" ] ;
         fhir:min [ fhir:v "1" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "uri" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.value[x]" ] ;
       fhir:path [ fhir:v "Extension.value[x]" ] ;
       fhir:short [ fhir:v "Value of extension" ] ;
       fhir:definition [ fhir:v "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Extension.value[x]" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "base64Binary" ]
       ] [
         fhir:code [ fhir:v "boolean" ]
       ] [
         fhir:code [ fhir:v "canonical" ]
       ] [
         fhir:code [ fhir:v "code" ]
       ] [
         fhir:code [ fhir:v "date" ]
       ] [
         fhir:code [ fhir:v "dateTime" ]
       ] [
         fhir:code [ fhir:v "decimal" ]
       ] [
         fhir:code [ fhir:v "id" ]
       ] [
         fhir:code [ fhir:v "instant" ]
       ] [
         fhir:code [ fhir:v "integer" ]
       ] [
         fhir:code [ fhir:v "integer64" ]
       ] [
         fhir:code [ fhir:v "markdown" ]
       ] [
         fhir:code [ fhir:v "oid" ]
       ] [
         fhir:code [ fhir:v "positiveInt" ]
       ] [
         fhir:code [ fhir:v "string" ]
       ] [
         fhir:code [ fhir:v "time" ]
       ] [
         fhir:code [ fhir:v "unsignedInt" ]
       ] [
         fhir:code [ fhir:v "uri" ]
       ] [
         fhir:code [ fhir:v "url" ]
       ] [
         fhir:code [ fhir:v "uuid" ]
       ] [
         fhir:code [ fhir:v "Address" ]
       ] [
         fhir:code [ fhir:v "Age" ]
       ] [
         fhir:code [ fhir:v "Annotation" ]
       ] [
         fhir:code [ fhir:v "Attachment" ]
       ] [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] [
         fhir:code [ fhir:v "CodeableReference" ]
       ] [
         fhir:code [ fhir:v "Coding" ]
       ] [
         fhir:code [ fhir:v "ContactPoint" ]
       ] [
         fhir:code [ fhir:v "Count" ]
       ] [
         fhir:code [ fhir:v "Distance" ]
       ] [
         fhir:code [ fhir:v "Duration" ]
       ] [
         fhir:code [ fhir:v "HumanName" ]
       ] [
         fhir:code [ fhir:v "Identifier" ]
       ] [
         fhir:code [ fhir:v "Money" ]
       ] [
         fhir:code [ fhir:v "Period" ]
       ] [
         fhir:code [ fhir:v "Quantity" ]
       ] [
         fhir:code [ fhir:v "Range" ]
       ] [
         fhir:code [ fhir:v "Ratio" ]
       ] [
         fhir:code [ fhir:v "RatioRange" ]
       ] [
         fhir:code [ fhir:v "Reference" ]
       ] [
         fhir:code [ fhir:v "SampledData" ]
       ] [
         fhir:code [ fhir:v "Signature" ]
       ] [
         fhir:code [ fhir:v "Timing" ]
       ] [
         fhir:code [ fhir:v "ContactDetail" ]
       ] [
         fhir:code [ fhir:v "DataRequirement" ]
       ] [
         fhir:code [ fhir:v "Expression" ]
       ] [
         fhir:code [ fhir:v "ParameterDefinition" ]
       ] [
         fhir:code [ fhir:v "RelatedArtifact" ]
       ] [
         fhir:code [ fhir:v "TriggerDefinition" ]
       ] [
         fhir:code [ fhir:v "UsageContext" ]
       ] [
         fhir:code [ fhir:v "Availability" ]
       ] [
         fhir:code [ fhir:v "ExtendedContactDetail" ]
       ] [
         fhir:code [ fhir:v "Dosage" ]
       ] [
         fhir:code [ fhir:v "Meta" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ext-1" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "Extension" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "normative" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
         fhir:value [ fhir:v "4.0.0" ]
       ] ) ;
       fhir:path [ fhir:v "Extension" ] ;
       fhir:short [ fhir:v "Optional Extensions Element" ] ;
       fhir:definition [ fhir:v "Optional Extension Element - found in all resources." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension" ]
       ] ) ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.url" ] ;
       fhir:path [ fhir:v "Extension.url" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "identifies the meaning of the extension" ] ;
       fhir:definition [ fhir:v "Source of the definition for the extension code - a logical name or a URL." ] ;
       fhir:comment [ fhir:v "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension." ] ;
       fhir:min [ fhir:v "1" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "uri" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] [
       fhir:id [ fhir:v "Extension.value[x]" ] ;
       fhir:path [ fhir:v "Extension.value[x]" ] ;
       fhir:short [ fhir:v "Value of extension" ] ;
       fhir:definition [ fhir:v "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "base64Binary" ]
       ] [
         fhir:code [ fhir:v "boolean" ]
       ] [
         fhir:code [ fhir:v "canonical" ]
       ] [
         fhir:code [ fhir:v "code" ]
       ] [
         fhir:code [ fhir:v "date" ]
       ] [
         fhir:code [ fhir:v "dateTime" ]
       ] [
         fhir:code [ fhir:v "decimal" ]
       ] [
         fhir:code [ fhir:v "id" ]
       ] [
         fhir:code [ fhir:v "instant" ]
       ] [
         fhir:code [ fhir:v "integer" ]
       ] [
         fhir:code [ fhir:v "integer64" ]
       ] [
         fhir:code [ fhir:v "markdown" ]
       ] [
         fhir:code [ fhir:v "oid" ]
       ] [
         fhir:code [ fhir:v "positiveInt" ]
       ] [
         fhir:code [ fhir:v "string" ]
       ] [
         fhir:code [ fhir:v "time" ]
       ] [
         fhir:code [ fhir:v "unsignedInt" ]
       ] [
         fhir:code [ fhir:v "uri" ]
       ] [
         fhir:code [ fhir:v "url" ]
       ] [
         fhir:code [ fhir:v "uuid" ]
       ] [
         fhir:code [ fhir:v "Address" ]
       ] [
         fhir:code [ fhir:v "Age" ]
       ] [
         fhir:code [ fhir:v "Annotation" ]
       ] [
         fhir:code [ fhir:v "Attachment" ]
       ] [
         fhir:code [ fhir:v "CodeableConcept" ]
       ] [
         fhir:code [ fhir:v "CodeableReference" ]
       ] [
         fhir:code [ fhir:v "Coding" ]
       ] [
         fhir:code [ fhir:v "ContactPoint" ]
       ] [
         fhir:code [ fhir:v "Count" ]
       ] [
         fhir:code [ fhir:v "Distance" ]
       ] [
         fhir:code [ fhir:v "Duration" ]
       ] [
         fhir:code [ fhir:v "HumanName" ]
       ] [
         fhir:code [ fhir:v "Identifier" ]
       ] [
         fhir:code [ fhir:v "Money" ]
       ] [
         fhir:code [ fhir:v "Period" ]
       ] [
         fhir:code [ fhir:v "Quantity" ]
       ] [
         fhir:code [ fhir:v "Range" ]
       ] [
         fhir:code [ fhir:v "Ratio" ]
       ] [
         fhir:code [ fhir:v "RatioRange" ]
       ] [
         fhir:code [ fhir:v "Reference" ]
       ] [
         fhir:code [ fhir:v "SampledData" ]
       ] [
         fhir:code [ fhir:v "Signature" ]
       ] [
         fhir:code [ fhir:v "Timing" ]
       ] [
         fhir:code [ fhir:v "ContactDetail" ]
       ] [
         fhir:code [ fhir:v "DataRequirement" ]
       ] [
         fhir:code [ fhir:v "Expression" ]
       ] [
         fhir:code [ fhir:v "ParameterDefinition" ]
       ] [
         fhir:code [ fhir:v "RelatedArtifact" ]
       ] [
         fhir:code [ fhir:v "TriggerDefinition" ]
       ] [
         fhir:code [ fhir:v "UsageContext" ]
       ] [
         fhir:code [ fhir:v "Availability" ]
       ] [
         fhir:code [ fhir:v "ExtendedContactDetail" ]
       ] [
         fhir:code [ fhir:v "Dosage" ]
       ] [
         fhir:code [ fhir:v "Meta" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ext-1" ] ) ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "N/A" ]
       ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.