Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Messageheader.shex

Infrastructure And Messaging Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Device, Practitioner

Raw ShEx

ShEx statement for messageheader

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#> 

IMPORT <url.shex>
IMPORT <code.shex>
IMPORT <Coding.shex>
IMPORT <Device.shex>
IMPORT <string.shex>
IMPORT <Endpoint.shex>
IMPORT <Resource.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <ContactPoint.shex>
IMPORT <DomainResource.shex>
IMPORT <EventDefinition.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <OperationOutcome.shex>


start=@<MessageHeader> AND {fhir:nodeRole [fhir:treeRoot]}

# A resource that describes a message that is exchanged between systems
<MessageHeader> EXTENDS @<DomainResource> CLOSED {   

    a [fhir:MessageHeader]?;
    fhir:nodeRole [fhir:treeRoot]?;

    fhir:event @<Coding>  OR 
    			(@<canonical>  AND {fhir:link @<EventDefinition> })  ;  # Event code or link to 
                                            # EventDefinition 
    fhir:destination @<OneOrMore_MessageHeader.destination>?;  # Message destination application(s)
    fhir:sender @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Real world sender of the message
    fhir:author @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # The source of the decision
    fhir:source @<MessageHeader.source>;    # Message source application
    fhir:responsible @<Reference> AND {fhir:link 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Final responsibility for event
    fhir:reason @<CodeableConcept>?;        # Cause of event
    fhir:response @<MessageHeader.response>?;  # If this is a reply to prior message
    fhir:focus @<OneOrMore_Reference_Resource>?;  # The actual content of the message
    fhir:definition @<canonical>?;          # Link to the definition for this 
                                            # message 
}  

# Message destination application(s)
<MessageHeader.destination> EXTENDS @<BackboneElement> CLOSED {   
    fhir:endpoint @<url>  OR 
    			(@<Reference>  AND {fhir:link @<Endpoint> })  ?;  # Actual destination address or 
                                            # Endpoint resource 
    fhir:name @<string>?;                   # Name of system
    fhir:target @<Reference> AND {fhir:link 
    			@<Device> ? }?;  # Particular delivery destination 
                                            # within the destination 
    fhir:receiver @<Reference> AND {fhir:link 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Intended "real-world" recipient 
                                            # for the data 
}  

# If this is a reply to prior message
<MessageHeader.response> EXTENDS @<BackboneElement> CLOSED {   
    fhir:identifier @<Identifier>;          # Bundle.identifier of original 
                                            # message 
    fhir:code @<code> AND
    	{fhir:v @fhirvs:response-code};  # ok | transient-error | fatal-error
    fhir:details @<Reference> AND {fhir:link 
    			@<OperationOutcome> ? }?;  # Specific list of 
                                            # hints/warnings/errors 
}  

# Message source application
<MessageHeader.source> EXTENDS @<BackboneElement> CLOSED {   
    fhir:endpoint @<url>  OR 
    			(@<Reference>  AND {fhir:link @<Endpoint> })  ?;  # Actual source address or Endpoint 
                                            # resource 
    fhir:name @<string>?;                   # Name of system
    fhir:software @<string>?;               # Name of software running the system
    fhir:version @<string>?;                # Version of software running
    fhir:contact @<ContactPoint>?;          # Human contact for problems
}  

#---------------------- Cardinality Types (OneOrMore) -------------------

<OneOrMore_MessageHeader.destination> CLOSED {
    rdf:first @<MessageHeader.destination>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_MessageHeader.destination> 
}

<OneOrMore_Reference_Resource> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Resource> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource> 
}

#---------------------- Value Sets ------------------------

# The kind of response to a message.
fhirvs:response-code ["ok" "transient-error" "fatal-error"]


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.