FHIR CI-Build

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

Requestorchestration.shex

Clinical Decision Support Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Device, Encounter, Patient, Practitioner, RelatedPerson

Raw ShEx

ShEx statement for requestorchestration

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 <id.shex>
IMPORT <uri.shex>
IMPORT <Age.shex>
IMPORT <code.shex>
IMPORT <Goal.shex>
IMPORT <Group.shex>
IMPORT <Range.shex>
IMPORT <Device.shex>
IMPORT <string.shex>
IMPORT <Period.shex>
IMPORT <Timing.shex>
IMPORT <Patient.shex>
IMPORT <CareTeam.shex>
IMPORT <Location.shex>
IMPORT <dateTime.shex>
IMPORT <Duration.shex>
IMPORT <Endpoint.shex>
IMPORT <markdown.shex>
IMPORT <Resource.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Expression.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <Questionnaire.shex>
IMPORT <DomainResource.shex>
IMPORT <PlanDefinition.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <DataRequirement.shex>
IMPORT <RelatedArtifact.shex>
IMPORT <PractitionerRole.shex>
IMPORT <DeviceDefinition.shex>
IMPORT <HealthcareService.shex>
IMPORT <CodeableReference.shex>
IMPORT <ActivityDefinition.shex>
IMPORT <SpecimenDefinition.shex>
IMPORT <CapabilityStatement.shex>
IMPORT <ObservationDefinition.shex>


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

# A set of related requests
<RequestOrchestration> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business identifier
    fhir:instantiatesCanonical @<OneOrMore_canonical>?;  # Instantiates FHIR protocol or 
                                            # definition 
    fhir:instantiatesUri @<OneOrMore_uri>?;  # Instantiates external protocol or 
                                            # definition 
    fhir:basedOn @<OneOrMore_Reference_Resource>?;  # Fulfills plan, proposal, or order
    fhir:replaces @<OneOrMore_Reference_Resource>?;  # Request(s) replaced by this request
    fhir:groupIdentifier @<Identifier>?;    # Composite request this is part of
    fhir:status @<code> AND
    	{fhir:v @fhirvs:request-status};  # draft | active | on-hold | revoked 
                                            # | completed | entered-in-error | 
                                            # unknown 
    fhir:intent @<code> AND
    	{fhir:v @fhirvs:request-intent};  # proposal | plan | directive | 
                                            # order | original-order | 
                                            # reflex-order | filler-order | 
                                            # instance-order | option 
    fhir:priority @<code> AND
    	{fhir:v @fhirvs:request-priority}?;  # routine | urgent | asap | stat
    fhir:code @<CodeableConcept>?;          # What's being requested/ordered
    fhir:subject @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Group> OR 
    			@<HealthcareService> OR 
    			@<Location> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who the request orchestration is 
                                            # about 
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # Created as part of
    fhir:authoredOn @<dateTime>?;           # When the request orchestration was 
                                            # authored 
    fhir:author @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Device or practitioner that 
                                            # authored the request orchestration 
    fhir:reason @<OneOrMore_CodeableReference>?;  # Why the request orchestration is 
                                            # needed 
    fhir:goal @<OneOrMore_Reference_Goal>?;  # What goals
    fhir:note @<OneOrMore_Annotation>?;     # Additional notes about the response
    fhir:action @<OneOrMore_RequestOrchestration.action>?;  # Proposed actions, if any
}  

# Whether or not the action is applicable
<RequestOrchestration.action.condition> EXTENDS @<BackboneElement> CLOSED {   
    fhir:kind @<code> AND
    	{fhir:v @fhirvs:action-condition-kind};  # applicability | start | stop
    fhir:expression @<Expression>?;         # Boolean-valued expression
}  

# Output data definition
<RequestOrchestration.action.output> EXTENDS @<BackboneElement> CLOSED {   
    fhir:title @<string>?;                  # User-visible title
    fhir:requirement @<DataRequirement>?;   # What data is provided
    fhir:relatedData @<string>?;            # What data is provided
}  

# Relationship to another action
<RequestOrchestration.action.relatedAction> EXTENDS @<BackboneElement> CLOSED {   
    fhir:targetId @<id>;                    # What action this is related to
    fhir:relationship @<code> AND
    	{fhir:v @fhirvs:action-relationship-type};  # before | before-start | before-end 
                                            # | concurrent | 
                                            # concurrent-with-start | 
                                            # concurrent-with-end | after | 
                                            # after-start | after-end 
    fhir:endRelationship @<code> AND
    	{fhir:v @fhirvs:action-relationship-type}?;  # before | before-start | before-end 
                                            # | concurrent | 
                                            # concurrent-with-start | 
                                            # concurrent-with-end | after | 
                                            # after-start | after-end 
    fhir:offset @<Duration>  OR 
    			@<Range>  ?;  # Time offset for the relationship
}  

# Dynamic aspects of the definition
<RequestOrchestration.action.dynamicValue> EXTENDS @<BackboneElement> CLOSED {   
    fhir:path @<string>?;                   # The path to the element to be set 
                                            # dynamically 
    fhir:expression @<Expression>?;         # An expression that provides the 
                                            # dynamic value for the 
                                            # customization 
}  

# Sub action
<RequestOrchestration.action.actionnull> CLOSED {   
}  

# Who should perform the action
<RequestOrchestration.action.participant> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<code> AND
    	{fhir:v @fhirvs:action-participant-type}?;  # careteam | device | group | 
                                            # healthcareservice | location | 
                                            # organization | patient | 
                                            # practitioner | practitionerrole | 
                                            # relatedperson 
    fhir:typeCanonical @<canonical>?;       # Who or what can participate
    fhir:typeReference @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<DeviceDefinition> OR 
    			@<Endpoint> OR 
    			@<Group> OR 
    			@<HealthcareService> OR 
    			@<Location> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who or what can participate
    fhir:role @<CodeableConcept>?;          # E.g. Nurse, Surgeon, Parent, etc
    fhir:function @<CodeableConcept>?;      # E.g. Author, Reviewer, Witness, etc
    fhir:actor (@<canonical>  AND {fhir:link @<CapabilityStatement> })  OR 
    			(@<Reference>  AND {fhir:link @<CareTeam> OR 
    			 @<Device> OR 
    			 @<DeviceDefinition> OR 
    			 @<Endpoint> OR 
    			 @<Group> OR 
    			 @<HealthcareService> OR 
    			 @<Location> OR 
    			 @<Organization> OR 
    			 @<Patient> OR 
    			 @<Practitioner> OR 
    			 @<PractitionerRole> OR 
    			 @<RelatedPerson> })  ?;  # Who/what is participating?
}  

# Input data requirements
<RequestOrchestration.action.input> EXTENDS @<BackboneElement> CLOSED {   
    fhir:title @<string>?;                  # User-visible title
    fhir:requirement @<DataRequirement>?;   # What data is provided
    fhir:relatedData @<id>?;                # What data is provided
}  

# Proposed actions, if any
<RequestOrchestration.action> EXTENDS @<BackboneElement> CLOSED {   
    fhir:linkId @<string>?;                 # Pointer to specific item from the 
                                            # PlanDefinition 
    fhir:prefix @<string>?;                 # User-visible prefix for the action 
                                            # (e.g. 1. or A.) 
    fhir:title @<string>?;                  # User-visible title
    fhir:description @<markdown>?;          # Short description of the action
    fhir:textEquivalent @<markdown>?;       # Static text equivalent of the 
                                            # action, used if the dynamic 
                                            # aspects cannot be interpreted by 
                                            # the receiving system 
    fhir:priority @<code> AND
    	{fhir:v @fhirvs:request-priority}?;  # routine | urgent | asap | stat
    fhir:code @<OneOrMore_CodeableConcept>?;  # Code representing the meaning of 
                                            # the action or sub-actions 
    fhir:documentation @<OneOrMore_RelatedArtifact>?;  # Supporting documentation for the 
                                            # intended performer of the action 
    fhir:goal @<OneOrMore_Reference_Goal>?;  # What goals
    fhir:condition @<OneOrMore_RequestOrchestration.action.condition>?;  # Whether or not the action is 
                                            # applicable 
    fhir:input @<OneOrMore_RequestOrchestration.action.input>?;  # Input data requirements
    fhir:output @<OneOrMore_RequestOrchestration.action.output>?;  # Output data definition
    fhir:relatedAction @<OneOrMore_RequestOrchestration.action.relatedAction>?;  # Relationship to another action
    fhir:timing @<dateTime>  OR 
    			@<Age>  OR 
    			@<Period>  OR 
    			@<Duration>  OR 
    			@<Range>  OR 
    			@<Timing>  ?;  # When the action should take place
    fhir:location @<CodeableReference>?;    # Where it should happen
    fhir:participant @<OneOrMore_RequestOrchestration.action.participant>?;  # Who should perform the action
    fhir:type @<CodeableConcept>?;          # create | update | remove | 
                                            # fire-event 
    fhir:groupingBehavior @<code> AND
    	{fhir:v @fhirvs:action-grouping-behavior}?;  # visual-group | logical-group | 
                                            # sentence-group 
    fhir:selectionBehavior @<code> AND
    	{fhir:v @fhirvs:action-selection-behavior}?;  # any | all | all-or-none | 
                                            # exactly-one | at-most-one | 
                                            # one-or-more 
    fhir:requiredBehavior @<code> AND
    	{fhir:v @fhirvs:action-required-behavior}?;  # must | could | 
                                            # must-unless-documented 
    fhir:precheckBehavior @<code> AND
    	{fhir:v @fhirvs:action-precheck-behavior}?;  # yes | no
    fhir:cardinalityBehavior @<code> AND
    	{fhir:v @fhirvs:action-cardinality-behavior}?;  # single | multiple
    fhir:resource @<Reference> AND {fhir:link 
    			@<Resource> ? }?;  # The target of the action
    fhir:definition (@<canonical>  AND {fhir:link @<ActivityDefinition> OR 
    			 @<ObservationDefinition> OR 
    			 @<PlanDefinition> OR 
    			 @<Questionnaire> OR 
    			 @<SpecimenDefinition> })  OR 
    			@<uri>  ?;  # Description of the activity to be 
                                            # performed 
    fhir:transform @<canonical>?;           # Transform to apply the template
    fhir:dynamicValue @<OneOrMore_RequestOrchestration.action.dynamicValue>?;  # Dynamic aspects of the definition
    fhir:action @<OneOrMore_RequestOrchestration.action>?;  # Sub action
}  

#---------------------- 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_uri> CLOSED {
    rdf:first @<uri>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_uri> 
}

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

<OneOrMore_CodeableReference> CLOSED {
    rdf:first @<CodeableReference>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference> 
}

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

<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

<OneOrMore_RequestOrchestration.action> CLOSED {
    rdf:first @<RequestOrchestration.action>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action> 
}

<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

<OneOrMore_RelatedArtifact> CLOSED {
    rdf:first @<RelatedArtifact>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RelatedArtifact> 
}

<OneOrMore_RequestOrchestration.action.condition> CLOSED {
    rdf:first @<RequestOrchestration.action.condition>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.condition> 
}

<OneOrMore_RequestOrchestration.action.input> CLOSED {
    rdf:first @<RequestOrchestration.action.input>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.input> 
}

<OneOrMore_RequestOrchestration.action.output> CLOSED {
    rdf:first @<RequestOrchestration.action.output>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.output> 
}

<OneOrMore_RequestOrchestration.action.relatedAction> CLOSED {
    rdf:first @<RequestOrchestration.action.relatedAction>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.relatedAction> 
}

<OneOrMore_RequestOrchestration.action.participant> CLOSED {
    rdf:first @<RequestOrchestration.action.participant>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.participant> 
}

<OneOrMore_RequestOrchestration.action.dynamicValue> CLOSED {
    rdf:first @<RequestOrchestration.action.dynamicValue>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RequestOrchestration.action.dynamicValue> 
}

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

# Defines behavior for an action or a group for how many times that item may be repeated.
fhirvs:action-cardinality-behavior ["single" "multiple"]

# Defines the kinds of conditions that can appear on actions.
fhirvs:action-condition-kind ["applicability" "start" "stop"]

# Defines organization behavior of a group.
fhirvs:action-grouping-behavior ["visual-group" "logical-group" "sentence-group"]

# The type of participant for the action.
fhirvs:action-participant-type ["careteam" "device" "group" "healthcareservice" "location" "organization" "patient" "practitioner" "practitionerrole" "relatedperson"]

# Defines selection frequency behavior for an action or group.
fhirvs:action-precheck-behavior ["yes" "no"]

# Defines the types of relationships between actions.
fhirvs:action-relationship-type ["before" "before-start" "before-end" "concurrent" "concurrent-with-start" "concurrent-with-end" "after" "after-start" "after-end"]

# Defines expectations around whether an action or action group is required.
fhirvs:action-required-behavior ["must" "could" "must-unless-documented"]

# Defines selection behavior of a group.
fhirvs:action-selection-behavior ["any" "all" "all-or-none" "exactly-one" "at-most-one" "one-or-more"]

# Codes indicating the degree of authority/intentionality associated with a request.
fhirvs:request-intent ["proposal" "plan" "directive" "order" "original-order" "reflex-order" "filler-order" "instance-order" "option"]

# Identifies the level of importance to be assigned to actioning the request.
fhirvs:request-priority ["routine" "urgent" "asap" "stat"]

# Codes identifying the lifecycle stage of a request.
fhirvs:request-status ["draft" "active" "on-hold" "revoked" "completed" "entered-in-error" "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.