PREFIX fhir:
PREFIX fhirvs:
PREFIX xsd:
BASE
start=@ AND {fhir:nodeRole [fhir:treeRoot]}
# Structural Definition
CLOSED {
a [fhir:StructureDefinition];
fhir:nodeRole [fhir:treeRoot]?;
fhir:Resource.id id?; # Logical id of this artifact
fhir:Resource.meta @?; # Metadata about the resource
fhir:Resource.implicitRules @?; # A set of rules under which this
# content was created
fhir:Resource.language @?; # Language of the resource content
fhir:DomainResource.text @?; # Text summary of the resource, for
# human interpretation
fhir:DomainResource.contained @*; # Contained, inline Resources
fhir:DomainResource.extension @*; # Additional content defined by
# implementations
fhir:DomainResource.modifierExtension @*; # Extensions that cannot be ignored
fhir:StructureDefinition.url @; # Canonical identifier for this
# structure definition, represented
# as a URI (globally unique)
fhir:StructureDefinition.identifier @*; # Additional identifier for the
# structure definition
fhir:StructureDefinition.version @?; # Business version of the structure
# definition
fhir:StructureDefinition.name @; # Name for this structure definition
# (computer friendly)
fhir:StructureDefinition.title @?; # Name for this structure definition
# (human friendly)
fhir:StructureDefinition.status @ AND
{fhir:value @fhirvs:publication-status}; # draft | active | retired | unknown
fhir:StructureDefinition.experimental @?; # For testing purposes, not real
# usage
fhir:StructureDefinition.date @?; # Date last changed
fhir:StructureDefinition.publisher @?; # Name of the publisher
# (organization or individual)
fhir:StructureDefinition.contact @*; # Contact details for the publisher
fhir:StructureDefinition.description @?; # Natural language description of
# the structure definition
fhir:StructureDefinition.useContext @*; # The context that the content is
# intended to support
fhir:StructureDefinition.jurisdiction @*; # Intended jurisdiction for
# structure definition (if
# applicable)
fhir:StructureDefinition.purpose @?; # Why this structure definition is
# defined
fhir:StructureDefinition.copyright @?; # Use and/or publishing restrictions
fhir:StructureDefinition.keyword @*; # Assist with indexing and finding
fhir:StructureDefinition.fhirVersion @ AND
{fhir:value @fhirvs:FHIR-version}?; # FHIR Version this
# StructureDefinition targets
fhir:StructureDefinition.mapping @*; # External specification that the
# content is mapped to
fhir:StructureDefinition.kind @ AND
{fhir:value @fhirvs:structure-definition-kind}; # primitive-type | complex-type |
# resource | logical
fhir:StructureDefinition.abstract @; # Whether the structure is abstract
fhir:StructureDefinition.context @*; # If an extension, where it can be
# used in instances
fhir:StructureDefinition.contextInvariant @*; # FHIRPath invariants - when the
# extension can be used
fhir:StructureDefinition.type @; # Type defined or constrained by
# this structure
fhir:StructureDefinition.baseDefinition @?; # Definition that this type is
# constrained/specialized from
fhir:StructureDefinition.derivation @ AND
{fhir:value @fhirvs:type-derivation-rule}?; # specialization | constraint - How
# relates to base definition
fhir:StructureDefinition.snapshot @?; # Snapshot view of the structure
fhir:StructureDefinition.differential @?; # Differential view of the structure
fhir:index xsd:integer? # Relative position in a list
}
# Snapshot view of the structure
CLOSED {
fhir:Element.id string?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:StructureDefinition.snapshot.element @+; # Definition of elements in the
# resource (if no
# StructureDefinition)
fhir:index xsd:integer? # Relative position in a list
}
# External specification that the content is mapped to
CLOSED {
fhir:Element.id string?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:StructureDefinition.mapping.identity @; # Internal id when this mapping is
# used
fhir:StructureDefinition.mapping.uri @?; # Identifies what this mapping
# refers to
fhir:StructureDefinition.mapping.name @?; # Names what this mapping refers to
fhir:StructureDefinition.mapping.comment @?; # Versions, Issues, Scope
# limitations etc.
fhir:index xsd:integer? # Relative position in a list
}
# Differential view of the structure
CLOSED {
fhir:Element.id string?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:StructureDefinition.differential.element @+; # Definition of elements in the
# resource (if no
# StructureDefinition)
fhir:index xsd:integer? # Relative position in a list
}
# If an extension, where it can be used in instances
CLOSED {
fhir:Element.id string?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:StructureDefinition.context.type @ AND
{fhir:value @fhirvs:extension-context-type}; # fhirpath | element | extension
fhir:StructureDefinition.context.expression @; # Where the extension can be used in
# instances
fhir:index xsd:integer? # Relative position in a list
}
#---------------------- Data Types -------------------
# Primitive Type dateTime
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value dateTime?; # Primitive value for dateTime
fhir:index xsd:integer? # Relative position in a list
}
# Metadata about a resource
CLOSED {
fhir:Element.id id?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:Meta.versionId @?; # Version specific identifier
fhir:Meta.lastUpdated @?; # When the resource version last
# changed
fhir:Meta.source @?; # Identifies where the resource
# comes from
fhir:Meta.profile @*; # Profiles this resource claims to
# conform to
fhir:Meta.security @*; # Security Labels applied to this
# resource
fhir:Meta.tag @*; # Tags applied to this resource
fhir:index xsd:integer? # Relative position in a list
}
# Primitive Type code
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value code?; # Primitive value for code
fhir:index xsd:integer? # Relative position in a list
}
# Primitive Type string
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value string MAXLENGTH 1048576?; # Primitive value for string
fhir:index xsd:integer? # Relative position in a list
}
# Base Resource
{a .+;
fhir:Resource.id id?; # Logical id of this artifact
fhir:Resource.meta @?; # Metadata about the resource
fhir:Resource.implicitRules @?; # A set of rules under which this
# content was created
fhir:Resource.language @?; # Language of the resource content
fhir:index xsd:integer?
}
# Primitive Type canonical
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value canonical?; # Primitive value for canonical
fhir:index xsd:integer? # Relative position in a list
}
# Primitive Type uri
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value uri?; # Primitive value for uri
fhir:index xsd:integer? # Relative position in a list
}
# Optional Extensions Element
CLOSED {
fhir:Element.id id?;
fhir:Element.extension @*;
fhir:Extension.url uri;
(
fhir:Extension.valueBase64Binary @ |
fhir:Extension.valueBoolean @ |
fhir:Extension.valueCanonical @ |
fhir:Extension.valueCode @ |
fhir:Extension.valueDate @ |
fhir:Extension.valueDateTime @ |
fhir:Extension.valueDecimal @ |
fhir:Extension.valueId @ |
fhir:Extension.valueInstant @ |
fhir:Extension.valueInteger @ |
fhir:Extension.valueMarkdown @ |
fhir:Extension.valueOid @ |
fhir:Extension.valuePositiveInt @ |
fhir:Extension.valueString @ |
fhir:Extension.valueTime @