FHIR CI-Build

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

12.32 Resource ExampleScenario - Content

FHIR Infrastructure icon Work GroupMaturity Level: 1 Trial UseSecurity Category: Anonymous Compartments: No defined compartments

A computable description of the actors, interactions between those actors that would occur, and concrete examples of the data that would be exchanged in a specific hypothetical exchange, typically used to help demonstrate the interoperability expectations of a specification. This resource is used to illustrate a specific time-based exchange, not to define in general terms how exchanges can/should occur.

This resource is used in implementation guides or other specifications to provide examples for how certain workflows would manifest. It can be used to show how instances would evolve over time as well as the interplay of systems over time to accomplish a particular end-state. It will frequently be used to generate sequence diagrams, but also provides further information about all of the entities within the sequence diagrams, including the instances shared as part of the exchange.

This resource is most useful when documenting more complex flows rather than simple RESTful invocations or other request-response pairs.

PlanDefinitions also describe actors and sequences of interactions between them, including alternatives. However, PlanDefinition defines what's allowed, while ExampleScenario represents a potential pathway through what's allowed. While an ExampleScenario can define alternatives, it doesn't necessarily call out all of them. Instead, it highlights the path(s) of interest to help a reader understand what's possible or how a particular scenario might work. Any resource can be an 'example' in a specification. This resource is specifically about highlighting how those examples come together in a workflow - who exchanges them and under what circumstances.

  • Resource References: itself

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. ExampleScenario TU DomainResource A computable description of a set of actors and the interactions between those actors
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
+ Rule: Must have actors if status is active or required
+ Rule: Must have processes if status is active or required
+ Rule: Actor keys must be unique
+ Rule: Actor titles must be unique
+ Rule: Instance keys must be unique
+ Rule: Instance titles must be unique
+ Rule: Process titles must be unique

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource
... url ΣC 0..1 uri Canonical identifier for this example scenario, represented as a URI (globally unique)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ 0..* Identifier Additional identifier for the example scenario

... version Σ 0..1 string Business version of the example scenario
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 0..1 string Name for this example scenario (computer friendly)
... title ΣT 0..1 string Name for this example scenario (human friendly)
... status ?!ΣC 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (Required)
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher ΣT 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher

... description ΣT 0..1 markdown Natural language description of the ExampleScenario
... useContext Σ 0..* UsageContext The context that the content is intended to support

... jurisdiction ΣXD 0..* CodeableConcept Intended jurisdiction for example scenario (if applicable)
Binding: Jurisdiction ValueSet (Extensible)

... purpose T 0..1 markdown The purpose of the example, e.g. to illustrate a scenario
... copyright 0..1 markdown Use and/or publishing restrictions
... copyrightLabel T 0..1 string Copyright holder and year(s)
... actor C 0..* BackboneElement Individual involved in exchange
+ Warning: Actor should be referenced in at least one operation
+ Rule: actor.key canot be 'OTHER'
+ Rule: actor SHALL have either a type or a definition but not both

.... key C 1..1 string ID or acronym of the actor
.... type C 0..1 code system | non-system | individual | patient | practitioner | related-person | device | collective | care-team | group | healthcare-service | organization
Binding: Actor Definition Actor Type (Required)
.... title TC 1..1 string Label for actor when rendering
.... description T 0..1 markdown Details about actor
.... definition C 0..1 canonical(ActorDefinition) Formal definition of actor
... instance C 0..* BackboneElement Data used in the scenario
+ Rule: StructureVersion is required if structureType is not FHIR (but may still be present even if FHIR)
+ Rule: instance.content is only allowed if there are no instance.versions
+ Rule: Version keys must be unique within an instance
+ Rule: Version titles must be unique within an instance
+ Warning: Instance should be referenced in at least one location
+ Warning: Instance version should be referenced in at least one operation

.... key C 1..1 string ID or acronym of the instance
.... structureType C 1..1 Coding Data structure for example
Binding: Example Scenario Resource Type (Extensible)
.... structureVersion C 0..1 string E.g. 4.0.1
.... structureProfile[x] 0..1 Rules instance adheres to
..... structureProfileCanonical canonical()
..... structureProfileUri uri
.... title TC 1..1 string Label for instance
.... description T 0..1 markdown Human-friendly description of the instance
.... content C 0..1 Reference() Example instance data
.... version C 0..* BackboneElement Snapshot of instance that changes

..... key C 1..1 string ID or acronym of the version
..... title C 1..1 string Label for instance version
..... description T 0..1 markdown Details about version
..... content 0..1 Reference() Example instance version data
.... containedInstance C 0..* BackboneElement Resources contained in the instance
+ Rule: InstanceReference must be a key of an instance defined in the ExampleScenario
+ Rule: versionReference must be specified if the referenced instance defines versions
+ Rule: versionReference must be a key of a version within the instance pointed to by instanceReference

..... instanceReference C 1..1 string Key of contained instance
..... versionReference C 0..1 string Key of contained instance version
... process C 0..* BackboneElement Major process within scenario
+ Rule: Processes must have steps if ExampleScenario status is active or required

.... title ΣTC 1..1 string Label for procss
.... description T 0..1 markdown Human-friendly description of the process
.... preConditions T 0..1 markdown Status before process starts
.... postConditions T 0..1 markdown Status after successful completion
.... step C 0..* BackboneElement Event within of the process
+ Rule: Alternative titles must be unique within a step
+ Rule: Can have a process, a workflow, one or more operations or none of these, but cannot have a combination

..... number 0..1 string Sequential number of the step
..... process 0..1 see process Step is nested process
..... workflow C 0..1 canonical(ExampleScenario) Step is nested workflow
..... operation C 0..1 BackboneElement Step is simple action
+ Rule: If specified, initiator must be a key of an actor within the ExampleScenario
+ Rule: If specified, receiver must be a key of an actor within the ExampleScenario
...... type 0..1 Coding Kind of action
Binding: Test Script Operation Code (Extensible)
...... title 1..1 string Label for step
...... initiator C 0..1 string Who starts the operation
...... receiver C 0..1 string Who receives the operation
...... description T 0..1 markdown Human-friendly description of the operation
...... initiatorActive 0..1 boolean Initiator stays active?
...... receiverActive 0..1 boolean Receiver stays active?
...... request 0..1 see containedInstance Instance transmitted on invocation
...... response 0..1 see containedInstance Instance transmitted on invocation response
..... alternative C 0..* BackboneElement Alternate non-typical step action

...... title TC 1..1 string Label for alternative
...... description T 0..1 markdown Human-readable description of option
...... step 0..* see step Alternative action(s)

..... pause 0..1 boolean Pause in the flow?

doco Documentation for this format icon

See the Extensions for this resource

 

Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) , the spreadsheet version & the dependency analysis

Path ValueSet Type Documentation
ExampleScenario.versionAlgorithm[x] VersionAlgorithm Extensible

Indicates the mechanism used to compare versions to determine which is more current.

ExampleScenario.status PublicationStatus Required

The lifecycle status of an artifact.

ExampleScenario.jurisdiction JurisdictionValueSet Extensible

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

ExampleScenario.actor.type ActorDefinitionActorType Required

The type of actor - system or human.

ExampleScenario.instance.structureType ExampleScenarioResourceType Extensible

Types of resource structures that can be passed in or out of exchange operations. Not necessarily FHIR.

ExampleScenario.process.step.operation.type TestScriptOperationCode (a valid code from FHIR Restful Interactions) Extensible

This value set defines a set of codes that are used to indicate the supported operations of a testing engine or tool.

UniqueKeyLevelLocationDescriptionExpression
img cnl-0Warning (base)Name should be usable as an identifier for the module by machine processing applications such as code generationname.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
img exs-1Rule ExampleScenario.instanceStructureVersion is required if structureType is not FHIR (but may still be present even if FHIR)structureType.exists() and structureType.memberOf('http://hl7.org/fhir/ValueSet/resource-types').not() implies structureVersion.exists()
img cnl-1Warning ExampleScenario.urlURL should not contain | or # - these characters make processing canonical references problematicexists() implies matches('^[^|# ]+$')
img exs-2Rule ExampleScenario.instanceinstance.content is only allowed if there are no instance.versionscontent.exists() implies version.empty()
img exs-3Rule (base)Must have actors if status is active or requiredstatus='active' or status='retired' implies actor.exists()
img exs-4Rule (base)Must have processes if status is active or requiredstatus='active' or status='retired' implies process.exists()
img exs-5Rule ExampleScenario.processProcesses must have steps if ExampleScenario status is active or required%resource.status='active' or %resource.status='retired' implies step.exists()
img exs-6Rule (base)Actor keys must be uniqueactor.key.count() = actor.key.distinct().count()
img exs-7Rule (base)Actor titles must be uniqueactor.title.count() = actor.title.distinct().count()
img exs-8Rule (base)Instance keys must be uniqueinstance.key.count() = instance.key.distinct().count()
img exs-9Rule (base)Instance titles must be uniqueinstance.title.count() = instance.title.distinct().count()
img exs-10Rule ExampleScenario.instanceVersion keys must be unique within an instanceversion.key.count() = version.key.distinct().count()
img exs-11Rule ExampleScenario.instanceVersion titles must be unique within an instanceversion.title.count() = version.title.distinct().count()
img exs-12Rule (base)Process titles must be uniqueprocess.title.count() = process.title.distinct().count()
img exs-13Rule ExampleScenario.process.stepAlternative titles must be unique within a stepalternative.title.count() = alternative.title.distinct().count()
img exs-14Rule ExampleScenario.instance.containedInstanceInstanceReference must be a key of an instance defined in the ExampleScenario%resource.instance.where(key=%context.instanceReference).exists()
img exs-15Rule ExampleScenario.instance.containedInstanceversionReference must be specified if the referenced instance defines versionsversionReference.empty() implies %resource.instance.where(key=%context.instanceReference).version.empty()
img exs-16Rule ExampleScenario.instance.containedInstanceversionReference must be a key of a version within the instance pointed to by instanceReferenceversionReference.exists() implies %resource.instance.where(key=%context.instanceReference).version.where(key=%context.versionReference).exists()
img exs-17Rule ExampleScenario.process.step.operationIf specified, initiator must be a key of an actor within the ExampleScenarioinitiator.exists() implies initiator = 'OTHER' or %resource.actor.where(key=%context.initiator).exists()
img exs-18Rule ExampleScenario.process.step.operationIf specified, receiver must be a key of an actor within the ExampleScenarioreceiver.exists() implies receiver = 'OTHER' or %resource.actor.where(key=%context.receiver).exists()
img exs-19Warning ExampleScenario.actorActor should be referenced in at least one operation%resource.process.descendants().select(operation).where(initiator=%context.key or receiver=%context.key).exists()
img exs-20Warning ExampleScenario.instanceInstance should be referenced in at least one location%resource.process.descendants().select(instanceReference).where($this=%context.key).exists()
img exs-21Warning ExampleScenario.instanceInstance version should be referenced in at least one operationversion.exists() implies version.key.intersect(%resource.process.descendants().where(instanceReference = %context.key).versionReference).exists()
img exs-22Rule ExampleScenario.process.stepCan have a process, a workflow, one or more operations or none of these, but cannot have a combination(process.exists() implies workflow.empty() and operation.empty()) and (workflow.exists() implies operation.empty())
img exs-23Rule ExampleScenario.actoractor.key canot be 'OTHER'key != 'OTHER'
img exs-24Rule ExampleScenario.actoractor SHALL have either a type or a definition but not bothtype.exists() xor definition.exists()

Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
context token A use context assigned to the example scenario (ExampleScenario.useContext.value.ofType(CodeableConcept)) 30 Resources
context-quantity quantity A quantity- or range-valued use context assigned to the example scenario (ExampleScenario.useContext.value.ofType(Quantity)) | (ExampleScenario.useContext.value.ofType(Range)) 30 Resources
context-type token A type of use context assigned to the example scenario ExampleScenario.useContext.code 30 Resources
context-type-quantity composite A use context type and quantity- or range-based value assigned to the example scenario On ExampleScenario.useContext:
  context-type: code
  context-quantity: value.ofType(Quantity) | value.ofType(Range)
30 Resources
context-type-value composite A use context type and value assigned to the example scenario On ExampleScenario.useContext:
  context-type: code
  context: value.ofType(CodeableConcept)
30 Resources
date date The example scenario publication date ExampleScenario.date 31 Resources
identifier token External identifier for the example scenario ExampleScenario.identifier 35 Resources
jurisdiction token Intended jurisdiction for the example scenario ExampleScenario.jurisdiction 27 Resources
name string Computationally friendly name of the example scenario ExampleScenario.name 28 Resources
publisher string Name of the publisher of the example scenario ExampleScenario.publisher 31 Resources
status token The current status of the example scenario ExampleScenario.status 35 Resources
url uri The uri that identifies the example scenario ExampleScenario.url 34 Resources
version token The business version of the example scenario ExampleScenario.version 32 Resources