FoundationThis is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
| Responsible Owner: Infrastructure And Messaging Work Group | Standards Status: Informative | Compartments: No defined compartments |
ShEx statement for messagedefinition
PREFIX fhir: <http://hl7.org/fhir/>
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Coding.shex>
IMPORT <String.shex>
IMPORT <Boolean.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <Canonical.shex>
IMPORT <Identifier.shex>
IMPORT <UnsignedInt.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>
start=@<MessageDefinition> AND {fhir:nodeRole [fhir:treeRoot]}
# A resource that defines a type of message that can be exchanged between systems
<MessageDefinition> EXTENDS @<DomainResource> CLOSED {
a [fhir:MessageDefinition]?;fhir:nodeRole [fhir:treeRoot]?;
fhir:url @<Uri>?; # The cannonical URL for a given
# MessageDefinition
fhir:identifier @<OneOrMore_Identifier>?; # Business Identifier for a given
# MessageDefinition
fhir:version @<String>?; # Business version of the message
# definition
fhir:versionAlgorithm @<String> OR
@<Coding> ?; # How to compare versions
fhir:name @<String>?; # Name for this message definition
# (computer friendly)
fhir:title @<String>?; # Name for this message definition
# (human friendly)
fhir:replaces @<OneOrMore_Canonical>?; # Takes the place of
fhir:status @<Code> AND
{fhir:v @fhirvs:publication-status}; # draft | active | retired | unknown
fhir:experimental @<Boolean>?; # For testing only - never for real
# usage
fhir:date @<DateTime>; # Date last changed
fhir:publisher @<String>?; # Name of the publisher/steward
# (organization or individual)
fhir:contact @<OneOrMore_ContactDetail>?; # Contact details for the publisher
fhir:description @<Markdown>?; # Natural language description of
# the message definition
fhir:useContext @<OneOrMore_UsageContext>?; # The context that the content is
# intended to support
fhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Jurisdiction of the authority that
# maintains the message definition
# (if applicable)
fhir:purpose @<Markdown>?; # Why this message definition is
# defined
fhir:copyright @<Markdown>?; # Notice about intellectual property
# ownership, can include
# restrictions on use
fhir:copyrightLabel @<String>?; # Copyright holder and year(s)
fhir:base @<Canonical>?; # Definition this one is based on
fhir:parent @<OneOrMore_Canonical>?; # Protocol/workflow this is part of
fhir:event @<Coding> OR
@<Uri> ; # Event code or link to the
# EventDefinition
fhir:category @<Code> AND
{fhir:v @fhirvs:message-significance-category}?; # consequence | currency |
# notification
fhir:focus @<OneOrMore_MessageDefinition.focus>?; # Resource(s) that are the subject
# of the event
fhir:responseRequired @<Code> AND
{fhir:v @fhirvs:messageheader-response-request}?; # always | on-error | never |
# on-success
fhir:allowedResponse @<OneOrMore_MessageDefinition.allowedResponse>?; # Responses to this message
}
# Resource(s) that are the subject of the event
<MessageDefinition.focus> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<Uri>; # Type of resource
fhir:profile @<Canonical>?; # Profile that must be adhered to by
# focus
fhir:min @<UnsignedInt>; # Minimum number of focuses of this
# type
fhir:max @<String>?; # Maximum number of focuses of this
# type
}
# Responses to this message
<MessageDefinition.allowedResponse> EXTENDS @<BackboneElement> CLOSED {
fhir:message @<Canonical>; # Reference to allowed message
# definition response
fhir:situation @<Markdown>?; # When should this response be used
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
rdf:first @<Identifier> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Identifier>
}
<OneOrMore_Canonical> CLOSED {
rdf:first @<Canonical> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Canonical>
}
<OneOrMore_ContactDetail> CLOSED {
rdf:first @<ContactDetail> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail>
}
<OneOrMore_UsageContext> CLOSED {
rdf:first @<UsageContext> ;
rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext>
}
<OneOrMore_CodeableConcept> CLOSED {
rdf:first @<CodeableConcept> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept>
}
<OneOrMore_MessageDefinition.focus> CLOSED {
rdf:first @<MessageDefinition.focus> ;
rdf:rest [rdf:nil] OR @<OneOrMore_MessageDefinition.focus>
}
<OneOrMore_MessageDefinition.allowedResponse> CLOSED {
rdf:first @<MessageDefinition.allowedResponse> ;
rdf:rest [rdf:nil] OR @<OneOrMore_MessageDefinition.allowedResponse>
}
#---------------------- Value Sets ------------------------
# The impact of the content of a message.
fhirvs:message-significance-category ["consequence" "currency" "notification"]
# HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.
fhirvs:messageheader-response-request ["always" "on-error" "never" "on-success"]
# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]
Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.
FHIR ®© HL7.org 2011+. FHIR R6 hl7.fhir.r6.core#6.0.0-ballot4 generated on Thu, Jun 25, 2026 00:26+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R4 |
Compare to R5 |
Compare to Last Ballot |
|
Propose a change