FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

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 <uri.shex>
IMPORT <url.shex>
IMPORT <code.shex>
IMPORT <Coding.shex>
IMPORT <string.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <Endpoint.shex>
IMPORT <Resource.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <ContactPoint.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <EventDefinition.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <OperationOutcome.shex>
IMPORT <SubscriptionTopic.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 
    			@<uri>  OR 
    			(@<canonical>  AND {fhir:link @<EventDefinition> OR 
    			 @<SubscriptionTopic> })  ;  # The real world event that 
                                            # triggered this messsage 
    fhir:destination @<OneOrMore_MessageHeader.destination>?;  # Message destination application(s)
    fhir:source @<MessageHeader.source>;    # Message source application
    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 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
    fhir:sender @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Real world sender of the message
}  

# 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 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:receiver @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Intended "real-world" recipient 
                                            # for the data 
}  

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