PREFIX fhir:
PREFIX fhirvs:
PREFIX xsd:
BASE
start=@ AND {fhir:nodeRole [fhir:treeRoot]}
# Definition of a graph of resources
CLOSED {
a [fhir:GraphDefinition];
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:GraphDefinition.url @?; # Canonical identifier for this
# graph definition, represented as a
# URI (globally unique)
fhir:GraphDefinition.version @?; # Business version of the graph
# definition
fhir:GraphDefinition.name @; # Name for this graph definition
# (computer friendly)
fhir:GraphDefinition.status @ AND
{fhir:value @fhirvs:publication-status}; # draft | active | retired | unknown
fhir:GraphDefinition.experimental @?; # For testing purposes, not real
# usage
fhir:GraphDefinition.date @?; # Date last changed
fhir:GraphDefinition.publisher @?; # Name of the publisher
# (organization or individual)
fhir:GraphDefinition.contact @*; # Contact details for the publisher
fhir:GraphDefinition.description @?; # Natural language description of
# the graph definition
fhir:GraphDefinition.useContext @*; # The context that the content is
# intended to support
fhir:GraphDefinition.jurisdiction @*; # Intended jurisdiction for graph
# definition (if applicable)
fhir:GraphDefinition.purpose @?; # Why this graph definition is
# defined
fhir:GraphDefinition.start @ AND
{fhir:value @fhirvs:resource-types}; # Type of resource at which the
# graph starts
fhir:GraphDefinition.profile @?; # Profile on base resource
fhir:GraphDefinition.link @*; # Links this graph makes rules about
fhir:index xsd:integer? # Relative position in a list
}
# Links this graph makes rules about
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:GraphDefinition.link.path @?; # Path in the resource that contains
# the link
fhir:GraphDefinition.link.sliceName @?; # Which slice (if profiled)
fhir:GraphDefinition.link.min @?; # Minimum occurrences for this link
fhir:GraphDefinition.link.max @?; # Maximum occurrences for this link
fhir:GraphDefinition.link.description @?; # Why this link is specified
fhir:GraphDefinition.link.target @*; # Potential target for the link
fhir:index xsd:integer? # Relative position in a list
}
# Potential target for the link
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:GraphDefinition.link.target.type @ AND
{fhir:value @fhirvs:resource-types}; # Type of resource this link refers
# to
fhir:GraphDefinition.link.target.params @?; # Criteria for reverse lookup
fhir:GraphDefinition.link.target.profile @?; # Profile for the target resource
fhir:GraphDefinition.link.target.compartment @*; # Compartment Consistency Rules
fhir:GraphDefinition.link.target.link @*; # Additional links from target
# resource
fhir:index xsd:integer? # Relative position in a list
}
# Additional links from target resource
CLOSED {
fhir:index xsd:integer? # Relative position in a list
}
# Compartment Consistency Rules
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:GraphDefinition.link.target.compartment.use @ AND
{fhir:value @fhirvs:graph-compartment-use}; # condition | requirement
fhir:GraphDefinition.link.target.compartment.code @ AND
{fhir:value @fhirvs:compartment-type}; # Patient | Encounter |
# RelatedPerson | Practitioner |
# Device
fhir:GraphDefinition.link.target.compartment.rule @ AND
{fhir:value @fhirvs:graph-compartment-rule}; # identical | matching | different |
# custom
fhir:GraphDefinition.link.target.compartment.expression @?; # Custom rule, as a FHIRPath
# expression
fhir:GraphDefinition.link.target.compartment.description @?; # Documentation for FHIRPath
# expression
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 integer
CLOSED {
fhir:Element.id string?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value integer MININCLUSIVE -2147483648 MAXINCLUSIVE 2147483647?; # Primitive value for integer
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 @