Release 5 Draft Ballot

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

Examplescenario.profile.json

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Not linked to any defined compartments

Raw JSON (canonical form + also see JSON Format Specification)

StructureDefinition for examplescenario

{
  "resourceType" : "StructureDefinition",
  "id" : "ExampleScenario",
  "meta" : {
    "lastUpdated" : "2022-08-15T14:35:43.418+00:00"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div>!-- Snipped for Brevity --></div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-implements",
    "valueUri" : "http://hl7.org/fhir/StructureDefinition/CanonicalResource"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode" : "trial-use"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
    "valueInteger" : 0
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
    "valueCode" : "anonymous"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode" : "fhir"
  }],
  "url" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario",
  "version" : "5.0.0-cibuild",
  "name" : "ExampleScenario",
  "status" : "draft",
  "experimental" : false,
  "date" : "2022-08-15T14:35:43+00:00",
  "publisher" : "Health Level Seven International (FHIR Infrastructure)",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "http://hl7.org/fhir"
    }]
  },
  {
    "telecom" : [{
      "system" : "url",
      "value" : "http://www.hl7.org/Special/committees/fiwg/index.cfm"
    }]
  }],
  "description" : "Example of workflow instance.",
  "fhirVersion" : "5.0.0-cibuild",
  "mapping" : [{
    "identity" : "w5",
    "uri" : "http://hl7.org/fhir/fivews",
    "name" : "FiveWs Pattern Mapping"
  },
  {
    "identity" : "workflow",
    "uri" : "http://hl7.org/fhir/workflow",
    "name" : "Workflow Pattern"
  },
  {
    "identity" : "objimpl",
    "uri" : "http://hl7.org/fhir/object-implementation",
    "name" : "Object Implementation Information"
  },
  {
    "identity" : "rim",
    "uri" : "http://hl7.org/v3",
    "name" : "RIM Mapping"
  }],
  "kind" : "resource",
  "abstract" : false,
  "type" : "ExampleScenario",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation" : "specialization",
  "snapshot" : {
    "element" : [{
      "id" : "ExampleScenario",
      "path" : "ExampleScenario",
      "short" : "Example of workflow instance",
      "definition" : "Example of workflow instance.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario",
        "min" : 0,
        "max" : "*"
      },
      "constraint" : [{
        "key" : "exs-3",
        "severity" : "error",
        "human" : "Must have actors if status is active or required",
        "expression" : "status='active' or status='retired' implies actor.exists()",
        "xpath" : "not(f:status/@value = ('active','retired')) or exists(f:actor)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-4",
        "severity" : "error",
        "human" : "Must have processes if status is active or required",
        "expression" : "status='active' or status='retired' implies process.exists()",
        "xpath" : "not(f:status/@value = ('active','retired')) or exists(f:process)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-6",
        "severity" : "error",
        "human" : "Actor keys must be unique",
        "expression" : "actor.key.count() = actor.key.distinct().count()",
        "xpath" : "count(f:actor/f:key/@value) = count(distinct-values(f:actor/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-7",
        "severity" : "error",
        "human" : "Actor titles must be unique",
        "expression" : "actor.title.count() = actor.title.distinct().count()",
        "xpath" : "count(f:actor/f:title/@value) = count(distinct-values(f:actor/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-8",
        "severity" : "error",
        "human" : "Instance keys must be unique",
        "expression" : "instance.key.count() = instance.key.distinct().count()",
        "xpath" : "count(f:instance/f:key/@value) = count(distinct-values(f:instance/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-9",
        "severity" : "error",
        "human" : "Instance titles must be unique",
        "expression" : "instance.title.count() = instance.title.distinct().count()",
        "xpath" : "count(f:instance/f:title/@value) = count(distinct-values(f:instance/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-12",
        "severity" : "error",
        "human" : "Process titles must be unique",
        "expression" : "process.title.count() = process.title.distinct().count()",
        "xpath" : "count(f:process/f:title/@value) = count(distinct-values(f:process/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition"
      },
      {
        "identity" : "w5",
        "map" : "infrastructure.information"
      }]
    },
    {
      "id" : "ExampleScenario.id",
      "path" : "ExampleScenario.id",
      "short" : "Logical id of this artifact",
      "definition" : "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "comment" : "Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Resource.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "id"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "ExampleScenario.meta",
      "path" : "ExampleScenario.meta",
      "short" : "Metadata about the resource",
      "definition" : "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Resource.meta",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Meta"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "ExampleScenario.implicitRules",
      "path" : "ExampleScenario.implicitRules",
      "short" : "A set of rules under which this content was created",
      "definition" : "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
      "comment" : "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Resource.implicitRules",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "uri"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : true,
      "isModifierReason" : "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
      "isSummary" : true
    },
    {
      "id" : "ExampleScenario.language",
      "path" : "ExampleScenario.language",
      "short" : "Language of the resource content",
      "definition" : "The base language in which the resource is written.",
      "comment" : "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Resource.language",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical" : "http://hl7.org/fhir/ValueSet/all-languages"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Language"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "preferred",
        "description" : "IETF language tag",
        "valueSet" : "http://hl7.org/fhir/ValueSet/languages"
      }
    },
    {
      "id" : "ExampleScenario.text",
      "path" : "ExampleScenario.text",
      "short" : "Text summary of the resource, for human interpretation",
      "definition" : "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "comment" : "Contained resources do not have a narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
      "alias" : ["narrative",
      "html",
      "xhtml",
      "display"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "DomainResource.text",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Narrative"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "Act.text?"
      }]
    },
    {
      "id" : "ExampleScenario.contained",
      "path" : "ExampleScenario.contained",
      "short" : "Contained, inline Resources",
      "definition" : "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.",
      "comment" : "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
      "alias" : ["inline resources",
      "anonymous resources",
      "contained resources"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.contained",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Resource"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.extension",
      "path" : "ExampleScenario.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.modifierExtension",
      "path" : "ExampleScenario.modifierExtension",
      "short" : "Extensions that cannot be ignored",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DomainResource.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "mustSupport" : false,
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.url",
      "path" : "ExampleScenario.url",
      "short" : "Canonical identifier for this example scenario, represented as a URI (globally unique)",
      "definition" : "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.",
      "comment" : "Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.\n\nThe determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). \n\nIn some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found.",
      "requirements" : "Allows the example scenario to be referenced by a single globally unique identifier.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.url",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "uri"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.url"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      }]
    },
    {
      "id" : "ExampleScenario.identifier",
      "path" : "ExampleScenario.identifier",
      "short" : "Additional identifier for the example scenario",
      "definition" : "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.",
      "comment" : "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this example scenario outside of FHIR, where it is not possible to use the logical URI.",
      "requirements" : "Allows externally provided and/or usable business identifiers to be easily associated with the module.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.identifier",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Identifier"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.identifier"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.version",
      "path" : "ExampleScenario.version",
      "short" : "Business version of the example scenario",
      "definition" : "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
      "comment" : "There may be different example scenario instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the example scenario with the format [url]|[version].",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.version",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.version"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.version"
      }]
    },
    {
      "id" : "ExampleScenario.name",
      "path" : "ExampleScenario.name",
      "short" : "To be removed?",
      "definition" : "Temporarily retained for tooling purposes.",
      "comment" : "Not needed as code will never be generated from one of these",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.name",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.name"
      }]
    },
    {
      "id" : "ExampleScenario.title",
      "path" : "ExampleScenario.title",
      "short" : "Name for this example scenario (human friendly)",
      "definition" : "A short, descriptive, user-friendly title for the ExampleScenario.",
      "comment" : "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.title",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.title"
      }]
    },
    {
      "id" : "ExampleScenario.status",
      "path" : "ExampleScenario.status",
      "short" : "draft | active | retired | unknown",
      "definition" : "The status of this example scenario. Enables tracking the life-cycle of the content.",
      "comment" : "Allows filtering of example scenarios that are appropriate for use versus not.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.status",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : true,
      "isModifierReason" : "This is labeled as \"Is Modifier\" because applications should not use a retired {{title}} without due consideration",
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "PublicationStatus"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "The lifecycle status of an artifact.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/publication-status|5.0.0-cibuild"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.status"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.status"
      }]
    },
    {
      "id" : "ExampleScenario.experimental",
      "path" : "ExampleScenario.experimental",
      "short" : "For testing purposes, not real usage",
      "definition" : "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
      "comment" : "Allows filtering of example scenarios that are appropriate for use versus not.",
      "requirements" : "Enables experimental content to be developed following the same lifecycle that would be used for a production-level example scenario.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.experimental",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "boolean"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.experimental"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.class"
      }]
    },
    {
      "id" : "ExampleScenario.date",
      "path" : "ExampleScenario.date",
      "short" : "Date last changed",
      "definition" : "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').",
      "comment" : "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the example scenario. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
      "alias" : ["Revision Date"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.date",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "dateTime"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.date"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.recorded"
      }]
    },
    {
      "id" : "ExampleScenario.publisher",
      "path" : "ExampleScenario.publisher",
      "short" : "Name of the publisher (organization or individual)",
      "definition" : "The name of the organization or individual that published the example scenario.",
      "comment" : "Usually an organization but may be an individual. The publisher (or steward) of the example scenario is the organization or individual primarily responsible for the maintenance and upkeep of the example scenario. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the example scenario. This item SHOULD be populated unless the information is available from context.",
      "requirements" : "Helps establish the \"authority/credibility\" of the example scenario.  May also allow for contact.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.publisher",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.publisher"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.witness"
      }]
    },
    {
      "id" : "ExampleScenario.contact",
      "path" : "ExampleScenario.contact",
      "short" : "Contact details for the publisher",
      "definition" : "Contact details to assist a user in finding and communicating with the publisher.",
      "comment" : "May be a web site, an email address, a telephone number, etc.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.contact",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "ContactDetail"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.contact"
      }]
    },
    {
      "id" : "ExampleScenario.description",
      "path" : "ExampleScenario.description",
      "short" : "Natural language description of the ExampleScenario",
      "definition" : "A free text natural language description of the ExampleScenario from a consumer's perspective.",
      "comment" : "This description can be used to capture details such as why the ExampleScenario was built. It is not a rendering of the ExampleScenario as conveyed in the 'text' field of the resource itself.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.description"
      }]
    },
    {
      "id" : "ExampleScenario.useContext",
      "path" : "ExampleScenario.useContext",
      "short" : "The context that the content is intended to support",
      "definition" : "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.",
      "comment" : "When multiple useContexts are specified, there is no expectation that all or any of the contexts apply.",
      "requirements" : "Assist in searching for appropriate content.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.useContext",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "UsageContext"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.useContext"
      }]
    },
    {
      "id" : "ExampleScenario.jurisdiction",
      "path" : "ExampleScenario.jurisdiction",
      "short" : "Intended jurisdiction for example scenario (if applicable)",
      "definition" : "A legal or geographic region in which the example scenario is intended to be used.",
      "comment" : "It may be possible for the example scenario to be used in jurisdictions other than those for which it was originally designed or intended.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.jurisdiction",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Jurisdiction"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "extensible",
        "description" : "Countries and regions within which this artifact is targeted for use.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/jurisdiction"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.jurisdiction"
      }]
    },
    {
      "id" : "ExampleScenario.purpose",
      "path" : "ExampleScenario.purpose",
      "short" : "The purpose of the example, e.g. to illustrate a scenario",
      "definition" : "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.",
      "comment" : "This element does not describe the usage of the example scenario. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this example scenario.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.purpose",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.purpose"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.copyright",
      "path" : "ExampleScenario.copyright",
      "short" : "Use and/or publishing restrictions",
      "definition" : "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.",
      "comment" : "nullFrequently, the copyright differs between the value set and the codes that are included. The copyright statement should clearly differentiate between these when required.",
      "requirements" : "Consumers must be able to determine any legal restrictions on the use of the example scenario and/or its content.",
      "alias" : ["License",
      "Restrictions"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.copyright",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.copyright"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.actor",
      "path" : "ExampleScenario.actor",
      "short" : "Individual involved in exchange",
      "definition" : "A system or person who shares or receives an instance within the scenario.",
      "requirements" : "This is optional to allow for ExampleScenarios that are still draft",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.actor",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-3"],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-19",
        "severity" : "warning",
        "human" : "Actor should be referenced in at least one operation",
        "expression" : "%resource.process.descendants().select(operation).where(initiator=%context.key or receiver=%context.key).exists()",
        "xpath" : "exists(parent::f:ExampleScenario/f:process//f:operation[f:initiator/@value=current()/f:key/@value or f:receiver/@value=current()/f:key/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.id",
      "path" : "ExampleScenario.actor.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.actor.extension",
      "path" : "ExampleScenario.actor.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.actor.modifierExtension",
      "path" : "ExampleScenario.actor.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.actor.key",
      "path" : "ExampleScenario.actor.key",
      "short" : "ID or acronym of the actor",
      "definition" : "A unique string within the scenario that is used to reference the actor.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.actor.key",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.type",
      "path" : "ExampleScenario.actor.type",
      "short" : "person | system",
      "definition" : "The category of actor - person or system.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.actor.type",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ExampleScenarioActorType"
        }],
        "strength" : "required",
        "description" : "The type of actor - system or human.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/examplescenario-actor-type|5.0.0-cibuild"
      }
    },
    {
      "id" : "ExampleScenario.actor.title",
      "path" : "ExampleScenario.actor.title",
      "short" : "Label for actor when rendering",
      "definition" : "The human-readable name for the actor used when rendering the scenario.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.actor.title",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.description",
      "path" : "ExampleScenario.actor.description",
      "short" : "Details about actor",
      "definition" : "An explanation of who/what the actor is and its role in the scenario.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.actor.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance",
      "path" : "ExampleScenario.instance",
      "short" : "Data used in the scenario",
      "definition" : "A single data collection that is shared as part of the scenario.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.instance",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-1",
        "severity" : "error",
        "human" : "StructureVersion is required if structureType is not FHIR (but may still be present even if FHIR)",
        "expression" : "structureType.exists() and structureType.memberOf('http://hl7.org/fhir/ValueSet/resource-types').not() implies structureVersion.exists()",
        "xpath" : "true()",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-2",
        "severity" : "error",
        "human" : "instance.content is only allowed if there are no instance.versions",
        "expression" : "instance.content.exists() implies instance.version.empty()",
        "xpath" : "not(exists(f:content)) or not(exists(f:version))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-10",
        "severity" : "error",
        "human" : "Version keys must be unique within an instance",
        "expression" : "version.key.count() = version.key.distinct().count()",
        "xpath" : "count(f:version/f:key/@value) = count(distinct-values(f:version/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-11",
        "severity" : "error",
        "human" : "Version titles must be unique within an instance",
        "expression" : "version.title.count() = version.title.distinct().count()",
        "xpath" : "count(f:version/f:title/@value) = count(distinct-values(f:version/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-20",
        "severity" : "warning",
        "human" : "Instance should be referenced in at least one location",
        "expression" : "%resource.process.descendants().select(instanceReference).where($this=%context.key).exists()",
        "xpath" : "exists(parent::f:ExampleScenario/f:process//f:instanceReference[@value=current()/f:key/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-21",
        "severity" : "warning",
        "human" : "Instance version should be referenced in at least one operation",
        "expression" : "version.exists() implies version.key.intersect(%resource.process.descendants().where(instanceReference = %context.key).versionReference).exists()",
        "xpath" : "not(f:version) or not(exists(f:version/f:key/@value parent::f:ExampleScenario/f:process//*[f:instanceReference/@value=current()/f:key/@value]/f:versionReference/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.id",
      "path" : "ExampleScenario.instance.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.extension",
      "path" : "ExampleScenario.instance.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.modifierExtension",
      "path" : "ExampleScenario.instance.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.instance.key",
      "path" : "ExampleScenario.instance.key",
      "short" : "ID or acronym of the instance",
      "definition" : "A unique string within the scenario that is used to reference the instance.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.key",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.structureType",
      "path" : "ExampleScenario.instance.structureType",
      "short" : "Data structure for example",
      "definition" : "A code indicating the kind of data structure (FHIR resource or some other standard) this is an instance of.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.structureType",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Coding"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "InstanceType"
        }],
        "strength" : "extensible",
        "description" : "The structure that defines the instance",
        "valueSet" : "http://hl7.org/fhir/ValueSet/examplescenario-instance-type"
      }
    },
    {
      "id" : "ExampleScenario.instance.structureVersion",
      "path" : "ExampleScenario.instance.structureVersion",
      "short" : "E.g. 4.0.1",
      "definition" : "Conveys the version of the data structure instantiated.  I.e. what release of FHIR, X12, OpenEHR, etc. is instance compliant with.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.structureVersion",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "condition" : ["exs-1"],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.structureProfile[x]",
      "path" : "ExampleScenario.instance.structureProfile[x]",
      "short" : "Rules instance adheres to",
      "definition" : "Refers to a profile, template or other ruleset the instance adheres to.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.structureProfile[x]",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "canonical"
      },
      {
        "code" : "uri"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.title",
      "path" : "ExampleScenario.instance.title",
      "short" : "Label for instance",
      "definition" : "A short descriptive label the instance to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.title",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.description",
      "path" : "ExampleScenario.instance.description",
      "short" : "Human-friendly description of the instance",
      "definition" : "An explanation of what the instance contains and what it's for.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.content",
      "path" : "ExampleScenario.instance.content",
      "short" : "Example instance data",
      "definition" : "Points to an instance (typically an example) that shows the data that would corespond to this instance.",
      "comment" : "If not conveying FHIR data or not using the same version of FHIR as this ExampleScenario instance, the reference must be to a Binary.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.content",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version",
      "path" : "ExampleScenario.instance.version",
      "short" : "Snapshot of instance that changes",
      "definition" : "Represents the instance as it was at a specific time-point.",
      "comment" : "Not used if an instance doesn't change",
      "requirements" : "Allows representing the 'same' instance as it evolves throughout the scenario.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.instance.version",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.id",
      "path" : "ExampleScenario.instance.version.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.version.extension",
      "path" : "ExampleScenario.instance.version.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.version.modifierExtension",
      "path" : "ExampleScenario.instance.version.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.instance.version.key",
      "path" : "ExampleScenario.instance.version.key",
      "short" : "ID or acronym of the version",
      "definition" : "A unique string within the instance that is used to reference the version of the instance.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.version.key",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.description",
      "path" : "ExampleScenario.instance.version.description",
      "short" : "Details about version",
      "definition" : "An explanation of what this specific version of the instance contains and represents.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.version.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.content",
      "path" : "ExampleScenario.instance.version.content",
      "short" : "Example instance version data",
      "definition" : "Points to an instance (typically an example) that shows the data that would flow at this point in the scenario.",
      "comment" : "If not conveying FHIR data or not using the same version of FHIR as this ExampleScenario instance, the reference must be to a Binary.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.version.content",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance",
      "path" : "ExampleScenario.instance.containedInstance",
      "short" : "Resources contained in the instance",
      "definition" : "References to other instances that can be found within this instance (e.g. the observations contained in a bundle).",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.instance.containedInstance",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-14",
        "severity" : "error",
        "human" : "InstanceReference must be a key of an instance defined in the ExampleScenario",
        "expression" : "%resource.instance.where(key=%context.instanceReference).exists()",
        "xpath" : "exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-15",
        "severity" : "error",
        "human" : "versionReference must be specified if the referenced instance defines versions",
        "expression" : "versionReference.empty() implies %resource.instance.where(key=%context.instanceReference).version.empty()",
        "xpath" : "exists(f:versionReference) or not(exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value]/f:version))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-16",
        "severity" : "error",
        "human" : "versionReference must be a key of a version within the instance pointed to by instanceReference",
        "expression" : "versionReference.exists() implies %resource.instance.where(key=%context.instanceReference).version.where(key=%context.versionReference).exists()",
        "xpath" : "not(exists(f:versionReference)) or exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value]/f:version[f:key/@value=current()/f:versionReference/@value]))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.id",
      "path" : "ExampleScenario.instance.containedInstance.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.extension",
      "path" : "ExampleScenario.instance.containedInstance.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.modifierExtension",
      "path" : "ExampleScenario.instance.containedInstance.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.instanceReference",
      "path" : "ExampleScenario.instance.containedInstance.instanceReference",
      "short" : "Key of contained instance",
      "definition" : "A reference to the key of an instance found within this one.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.containedInstance.instanceReference",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.versionReference",
      "path" : "ExampleScenario.instance.containedInstance.versionReference",
      "short" : "Key of contained instance version",
      "definition" : "A reference to the key of a specific version of an instance in this instance.",
      "comment" : "Required if the referenced instance has versions",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.instance.containedInstance.versionReference",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process",
      "path" : "ExampleScenario.process",
      "short" : "Major process within scenario",
      "definition" : "A group of operations that represents a significant step within a scenario.",
      "comment" : "Some scenarios might describe only one process.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.process",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-4"],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-5",
        "severity" : "error",
        "human" : "Processes must have steps if ExampleScenario status is active or required",
        "expression" : "%resource.status='active' or %resource.status='retired' implies step.exists()",
        "xpath" : "not(parent::*/f:status/@value = ('active','retired')) or exists(f:step)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.id",
      "path" : "ExampleScenario.process.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.extension",
      "path" : "ExampleScenario.process.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.modifierExtension",
      "path" : "ExampleScenario.process.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.process.title",
      "path" : "ExampleScenario.process.title",
      "short" : "Label for procss",
      "definition" : "A short descriptive label the process to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.title",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "ExampleScenario.process.description",
      "path" : "ExampleScenario.process.description",
      "short" : "Human-friendly description of the process",
      "definition" : "An explanation of what the process represents and what it does.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.preConditions",
      "path" : "ExampleScenario.process.preConditions",
      "short" : "Status before process starts",
      "definition" : "Description of the initial state of the actors, environment and data before the process starts.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.preConditions",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.postConditions",
      "path" : "ExampleScenario.process.postConditions",
      "short" : "Status after successful completion",
      "definition" : "Description of the final state of the actors, environment and data after the process has been successfully completed.",
      "comment" : "Alternate steps might not result in all post conditions holding",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.postConditions",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step",
      "path" : "ExampleScenario.process.step",
      "short" : "Event within of the process",
      "definition" : "A significant action that occurs as part of the process.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.process.step",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-5"],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-13",
        "severity" : "error",
        "human" : "Alternative titles must be unique within a step",
        "expression" : "alternative.title.count() = alternative.title.distinct().count()",
        "xpath" : "count(f:alternative/f:title/@value) = count(distinct-values(f:alternative/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-16",
        "severity" : "error",
        "human" : "Can have a process, a workflow, one or more operations or none of these, but cannot have a combination",
        "expression" : "(process.exists() implies workflow.empty() and operation.empty()) and (workflow.exists() implies operation.empty())",
        "xpath" : "(not(exists(f:process)) or not(exists(f:workflow) or exists(f:operation))) and (not(exists(f:workflow) or not(exists(f:operation)))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.id",
      "path" : "ExampleScenario.process.step.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.extension",
      "path" : "ExampleScenario.process.step.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.modifierExtension",
      "path" : "ExampleScenario.process.step.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.number",
      "path" : "ExampleScenario.process.step.number",
      "short" : "Sequential number of the step",
      "definition" : "The sequential number of the step, e.g. 1.2.5.",
      "comment" : "If step numbers are simultaneous, they will be the same.  Numbers don't have to be numeric.  E.g. '2c)' is a valid step number",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.number",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.process",
      "path" : "ExampleScenario.process.step.process",
      "short" : "Step is nested process",
      "definition" : "Indicates that the step is a complex sub-process with its own steps.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.process",
        "min" : 0,
        "max" : "1"
      },
      "contentReference" : "#ExampleScenario.process",
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.workflow",
      "path" : "ExampleScenario.process.step.workflow",
      "short" : "Step is nested workflow",
      "definition" : "Indicates that the step is defined by a seaparate scenario instance.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.workflow",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/ExampleScenario"]
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation",
      "path" : "ExampleScenario.process.step.operation",
      "short" : "Step is simple action",
      "definition" : "The step represents a single operation invoked on receiver by sender.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "exs-17",
        "severity" : "error",
        "human" : "If specified, initiator must be a key of an actor within the ExampleScenario",
        "expression" : "initiator.exists() implies %resource.actor.where(key=%context.initiator).exists()",
        "xpath" : "not(exists(f:initiator)) or exists(ancestor::f:ExampleScenario/f:actor[f:key/@value=current()/f:initiator/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-18",
        "severity" : "error",
        "human" : "If specified, receiver must be a key of an actor within the ExampleScenario",
        "expression" : "receiver.exists() implies %resource.actor.where(key=%context.receiver).exists()",
        "xpath" : "not(exists(f:receiver)) or exists(ancestor::f:ExampleScenario/f:actor[f:key/@value=current()/f:receiver/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.id",
      "path" : "ExampleScenario.process.step.operation.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.operation.extension",
      "path" : "ExampleScenario.process.step.operation.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.operation.modifierExtension",
      "path" : "ExampleScenario.process.step.operation.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.operation.type",
      "path" : "ExampleScenario.process.step.operation.type",
      "short" : "Kind of action",
      "definition" : "The standardized type of action (FHIR or otherwise).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.type",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Coding"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"
        }],
        "strength" : "extensible",
        "valueSet" : "http://hl7.org/fhir/ValueSet/testscript-operation-codes"
      }
    },
    {
      "id" : "ExampleScenario.process.step.operation.title",
      "path" : "ExampleScenario.process.step.operation.title",
      "short" : "Label for step",
      "definition" : "A short descriptive label the step to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.title",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.initiator",
      "path" : "ExampleScenario.process.step.operation.initiator",
      "short" : "Who starts the operation",
      "definition" : "The system that invokes the action/transmits the data.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.initiator",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.receiver",
      "path" : "ExampleScenario.process.step.operation.receiver",
      "short" : "Who receives the operation",
      "definition" : "The system on which the action is invoked/receives the data.",
      "comment" : "In some cases, receiver could be same as sender if representing a local operation",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.receiver",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.description",
      "path" : "ExampleScenario.process.step.operation.description",
      "short" : "Human-friendly description of the operation",
      "definition" : "An explanation of what the operation represents and what it does.",
      "comment" : "This should contain information not already present in the process step.  It's more of a description of what the operation in general does - if not already evident from the operation.type",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.initiatorActive",
      "path" : "ExampleScenario.process.step.operation.initiatorActive",
      "short" : "Initiator stays active?",
      "definition" : "If false, the initiator is deactivated right after the operation.",
      "comment" : "De-activation of an actor means they have no further role until such time as they are the recipient of an operation.",
      "requirements" : "The notion of 'activation' in a flow diagram is used to indicate 'who has responsibility/is still doing work'.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.initiatorActive",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "boolean"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.receiverActive",
      "path" : "ExampleScenario.process.step.operation.receiverActive",
      "short" : "Receiver stays active?",
      "definition" : "If false, the receiver is deactivated right after the operation.",
      "comment" : "De-activation of an actor means they have no further role until such time as they are the recipient of an operation.",
      "requirements" : "The notion of 'activation' in a flow diagram is used to indicate 'who has responsibility/is still doing work'.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.receiverActive",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "boolean"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.request",
      "path" : "ExampleScenario.process.step.operation.request",
      "short" : "Instance transmitted on invocation",
      "definition" : "A reference to the instance that is transmitted from requester to receiver as part of the invocation of the operation.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.request",
        "min" : 0,
        "max" : "1"
      },
      "contentReference" : "#ExampleScenario.instance.containedInstance",
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.response",
      "path" : "ExampleScenario.process.step.operation.response",
      "short" : "Instance transmitted on invocation response",
      "definition" : "A reference to the instance that is transmitted from receiver to requester as part of the operation's synchronous response (if any).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.operation.response",
        "min" : 0,
        "max" : "1"
      },
      "contentReference" : "#ExampleScenario.instance.containedInstance",
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative",
      "path" : "ExampleScenario.process.step.alternative",
      "short" : "Alternate non-typical step action",
      "definition" : "Indicates an alternative step that can be taken instead of the sub-process, scenario or operation.  E.g. to represent non-happy-path/exceptional/atypical circumstances.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.process.step.alternative",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.id",
      "path" : "ExampleScenario.process.step.alternative.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl" : "string"
        }],
        "code" : "http://hl7.org/fhirpath/System.String"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.alternative.extension",
      "path" : "ExampleScenario.process.step.alternative.extension",
      "short" : "Additional content defined by implementations",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "alias" : ["extensions",
      "user content"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.alternative.modifierExtension",
      "path" : "ExampleScenario.process.step.alternative.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "definition" : "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      },
      {
        "key" : "ext-1",
        "severity" : "error",
        "human" : "Must have either extensions or value[x], not both",
        "expression" : "extension.exists() != value.exists()",
        "xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source" : "http://hl7.org/fhir/StructureDefinition/Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "ExampleScenario.process.step.alternative.title",
      "path" : "ExampleScenario.process.step.alternative.title",
      "short" : "Label for alternative",
      "definition" : "The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.alternative.title",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.description",
      "path" : "ExampleScenario.process.step.alternative.description",
      "short" : "Human-readable description of option",
      "definition" : "A human-readable description of the alternative explaining when the alternative should occur rather than the base step.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.alternative.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "markdown"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.step",
      "path" : "ExampleScenario.process.step.alternative.step",
      "short" : "Alternative action(s)",
      "definition" : "Indicates the operation, sub-process or scenario that happens if the alternative option is selected.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "ExampleScenario.process.step.alternative.step",
        "min" : 0,
        "max" : "*"
      },
      "contentReference" : "#ExampleScenario.process.step",
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.pause",
      "path" : "ExampleScenario.process.step.pause",
      "short" : "Pause in the flow?",
      "definition" : "If true, indicates that, following this step, there is a pause in the flow and the subsequent step will occur at some later time (triggered by some event).",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "ExampleScenario.process.step.pause",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "boolean"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "ExampleScenario",
      "path" : "ExampleScenario",
      "short" : "Example of workflow instance",
      "definition" : "Example of workflow instance.",
      "min" : 0,
      "max" : "*",
      "constraint" : [{
        "key" : "exs-4",
        "severity" : "error",
        "human" : "Must have processes if status is active or required",
        "expression" : "status='active' or status='retired' implies process.exists()",
        "xpath" : "not(f:status/@value = ('active','retired')) or exists(f:process)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-3",
        "severity" : "error",
        "human" : "Must have actors if status is active or required",
        "expression" : "status='active' or status='retired' implies actor.exists()",
        "xpath" : "not(f:status/@value = ('active','retired')) or exists(f:actor)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-12",
        "severity" : "error",
        "human" : "Process titles must be unique",
        "expression" : "process.title.count() = process.title.distinct().count()",
        "xpath" : "count(f:process/f:title/@value) = count(distinct-values(f:process/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-9",
        "severity" : "error",
        "human" : "Instance titles must be unique",
        "expression" : "instance.title.count() = instance.title.distinct().count()",
        "xpath" : "count(f:instance/f:title/@value) = count(distinct-values(f:instance/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-8",
        "severity" : "error",
        "human" : "Instance keys must be unique",
        "expression" : "instance.key.count() = instance.key.distinct().count()",
        "xpath" : "count(f:instance/f:key/@value) = count(distinct-values(f:instance/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-7",
        "severity" : "error",
        "human" : "Actor titles must be unique",
        "expression" : "actor.title.count() = actor.title.distinct().count()",
        "xpath" : "count(f:actor/f:title/@value) = count(distinct-values(f:actor/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-6",
        "severity" : "error",
        "human" : "Actor keys must be unique",
        "expression" : "actor.key.count() = actor.key.distinct().count()",
        "xpath" : "count(f:actor/f:key/@value) = count(distinct-values(f:actor/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "mapping" : [{
        "identity" : "w5",
        "map" : "infrastructure.information"
      }]
    },
    {
      "id" : "ExampleScenario.url",
      "path" : "ExampleScenario.url",
      "short" : "Canonical identifier for this example scenario, represented as a URI (globally unique)",
      "definition" : "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.",
      "comment" : "Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.\n\nThe determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). \n\nIn some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found.",
      "requirements" : "Allows the example scenario to be referenced by a single globally unique identifier.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "uri"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.url"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      }]
    },
    {
      "id" : "ExampleScenario.identifier",
      "path" : "ExampleScenario.identifier",
      "short" : "Additional identifier for the example scenario",
      "definition" : "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.",
      "comment" : "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this example scenario outside of FHIR, where it is not possible to use the logical URI.",
      "requirements" : "Allows externally provided and/or usable business identifiers to be easily associated with the module.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "Identifier"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.identifier"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.identifier"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.version",
      "path" : "ExampleScenario.version",
      "short" : "Business version of the example scenario",
      "definition" : "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
      "comment" : "There may be different example scenario instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the example scenario with the format [url]|[version].",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.version"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.version"
      }]
    },
    {
      "id" : "ExampleScenario.name",
      "path" : "ExampleScenario.name",
      "short" : "To be removed?",
      "definition" : "Temporarily retained for tooling purposes.",
      "comment" : "Not needed as code will never be generated from one of these",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.name"
      }]
    },
    {
      "id" : "ExampleScenario.title",
      "path" : "ExampleScenario.title",
      "short" : "Name for this example scenario (human friendly)",
      "definition" : "A short, descriptive, user-friendly title for the ExampleScenario.",
      "comment" : "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.title"
      }]
    },
    {
      "id" : "ExampleScenario.status",
      "path" : "ExampleScenario.status",
      "short" : "draft | active | retired | unknown",
      "definition" : "The status of this example scenario. Enables tracking the life-cycle of the content.",
      "comment" : "Allows filtering of example scenarios that are appropriate for use versus not.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "mustSupport" : false,
      "isModifier" : true,
      "isModifierReason" : "This is labeled as \"Is Modifier\" because applications should not use a retired {{title}} without due consideration",
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "PublicationStatus"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "required",
        "description" : "The lifecycle status of an artifact.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/publication-status|5.0.0-cibuild"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.status"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.status"
      }]
    },
    {
      "id" : "ExampleScenario.experimental",
      "path" : "ExampleScenario.experimental",
      "short" : "For testing purposes, not real usage",
      "definition" : "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
      "comment" : "Allows filtering of example scenarios that are appropriate for use versus not.",
      "requirements" : "Enables experimental content to be developed following the same lifecycle that would be used for a production-level example scenario.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.experimental"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.class"
      }]
    },
    {
      "id" : "ExampleScenario.date",
      "path" : "ExampleScenario.date",
      "short" : "Date last changed",
      "definition" : "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').",
      "comment" : "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the example scenario. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
      "alias" : ["Revision Date"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.date"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.recorded"
      }]
    },
    {
      "id" : "ExampleScenario.publisher",
      "path" : "ExampleScenario.publisher",
      "short" : "Name of the publisher (organization or individual)",
      "definition" : "The name of the organization or individual that published the example scenario.",
      "comment" : "Usually an organization but may be an individual. The publisher (or steward) of the example scenario is the organization or individual primarily responsible for the maintenance and upkeep of the example scenario. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the example scenario. This item SHOULD be populated unless the information is available from context.",
      "requirements" : "Helps establish the \"authority/credibility\" of the example scenario.  May also allow for contact.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.publisher"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.witness"
      }]
    },
    {
      "id" : "ExampleScenario.contact",
      "path" : "ExampleScenario.contact",
      "short" : "Contact details for the publisher",
      "definition" : "Contact details to assist a user in finding and communicating with the publisher.",
      "comment" : "May be a web site, an email address, a telephone number, etc.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "ContactDetail"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.contact"
      }]
    },
    {
      "id" : "ExampleScenario.description",
      "path" : "ExampleScenario.description",
      "short" : "Natural language description of the ExampleScenario",
      "definition" : "A free text natural language description of the ExampleScenario from a consumer's perspective.",
      "comment" : "This description can be used to capture details such as why the ExampleScenario was built. It is not a rendering of the ExampleScenario as conveyed in the 'text' field of the resource itself.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.description"
      }]
    },
    {
      "id" : "ExampleScenario.useContext",
      "path" : "ExampleScenario.useContext",
      "short" : "The context that the content is intended to support",
      "definition" : "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.",
      "comment" : "When multiple useContexts are specified, there is no expectation that all or any of the contexts apply.",
      "requirements" : "Assist in searching for appropriate content.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "UsageContext"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.useContext"
      }]
    },
    {
      "id" : "ExampleScenario.jurisdiction",
      "path" : "ExampleScenario.jurisdiction",
      "short" : "Intended jurisdiction for example scenario (if applicable)",
      "definition" : "A legal or geographic region in which the example scenario is intended to be used.",
      "comment" : "It may be possible for the example scenario to be used in jurisdictions other than those for which it was originally designed or intended.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "Jurisdiction"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "extensible",
        "description" : "Countries and regions within which this artifact is targeted for use.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/jurisdiction"
      },
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.jurisdiction"
      }]
    },
    {
      "id" : "ExampleScenario.purpose",
      "path" : "ExampleScenario.purpose",
      "short" : "The purpose of the example, e.g. to illustrate a scenario",
      "definition" : "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.",
      "comment" : "This element does not describe the usage of the example scenario. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this example scenario.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.purpose"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.why[x]"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.copyright",
      "path" : "ExampleScenario.copyright",
      "short" : "Use and/or publishing restrictions",
      "definition" : "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.",
      "comment" : "nullFrequently, the copyright differs between the value set and the codes that are included. The copyright statement should clearly differentiate between these when required.",
      "requirements" : "Consumers must be able to determine any legal restrictions on the use of the example scenario and/or its content.",
      "alias" : ["License",
      "Restrictions"],
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Definition.copyright"
      },
      {
        "identity" : "objimpl",
        "map" : "no-gen-base"
      }]
    },
    {
      "id" : "ExampleScenario.actor",
      "path" : "ExampleScenario.actor",
      "short" : "Individual involved in exchange",
      "definition" : "A system or person who shares or receives an instance within the scenario.",
      "requirements" : "This is optional to allow for ExampleScenarios that are still draft",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-3"],
      "constraint" : [{
        "key" : "exs-19",
        "severity" : "warning",
        "human" : "Actor should be referenced in at least one operation",
        "expression" : "%resource.process.descendants().select(operation).where(initiator=%context.key or receiver=%context.key).exists()",
        "xpath" : "exists(parent::f:ExampleScenario/f:process//f:operation[f:initiator/@value=current()/f:key/@value or f:receiver/@value=current()/f:key/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.key",
      "path" : "ExampleScenario.actor.key",
      "short" : "ID or acronym of the actor",
      "definition" : "A unique string within the scenario that is used to reference the actor.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.type",
      "path" : "ExampleScenario.actor.type",
      "short" : "person | system",
      "definition" : "The category of actor - person or system.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ExampleScenarioActorType"
        }],
        "strength" : "required",
        "description" : "The type of actor - system or human.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/examplescenario-actor-type|5.0.0-cibuild"
      }
    },
    {
      "id" : "ExampleScenario.actor.title",
      "path" : "ExampleScenario.actor.title",
      "short" : "Label for actor when rendering",
      "definition" : "The human-readable name for the actor used when rendering the scenario.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.actor.description",
      "path" : "ExampleScenario.actor.description",
      "short" : "Details about actor",
      "definition" : "An explanation of who/what the actor is and its role in the scenario.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance",
      "path" : "ExampleScenario.instance",
      "short" : "Data used in the scenario",
      "definition" : "A single data collection that is shared as part of the scenario.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "exs-2",
        "severity" : "error",
        "human" : "instance.content is only allowed if there are no instance.versions",
        "expression" : "instance.content.exists() implies instance.version.empty()",
        "xpath" : "not(exists(f:content)) or not(exists(f:version))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-20",
        "severity" : "warning",
        "human" : "Instance should be referenced in at least one location",
        "expression" : "%resource.process.descendants().select(instanceReference).where($this=%context.key).exists()",
        "xpath" : "exists(parent::f:ExampleScenario/f:process//f:instanceReference[@value=current()/f:key/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-1",
        "severity" : "error",
        "human" : "StructureVersion is required if structureType is not FHIR (but may still be present even if FHIR)",
        "expression" : "structureType.exists() and structureType.memberOf('http://hl7.org/fhir/ValueSet/resource-types').not() implies structureVersion.exists()",
        "xpath" : "true()",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-11",
        "severity" : "error",
        "human" : "Version titles must be unique within an instance",
        "expression" : "version.title.count() = version.title.distinct().count()",
        "xpath" : "count(f:version/f:title/@value) = count(distinct-values(f:version/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-10",
        "severity" : "error",
        "human" : "Version keys must be unique within an instance",
        "expression" : "version.key.count() = version.key.distinct().count()",
        "xpath" : "count(f:version/f:key/@value) = count(distinct-values(f:version/f:key/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-21",
        "severity" : "warning",
        "human" : "Instance version should be referenced in at least one operation",
        "expression" : "version.exists() implies version.key.intersect(%resource.process.descendants().where(instanceReference = %context.key).versionReference).exists()",
        "xpath" : "not(f:version) or not(exists(f:version/f:key/@value parent::f:ExampleScenario/f:process//*[f:instanceReference/@value=current()/f:key/@value]/f:versionReference/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.key",
      "path" : "ExampleScenario.instance.key",
      "short" : "ID or acronym of the instance",
      "definition" : "A unique string within the scenario that is used to reference the instance.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.structureType",
      "path" : "ExampleScenario.instance.structureType",
      "short" : "Data structure for example",
      "definition" : "A code indicating the kind of data structure (FHIR resource or some other standard) this is an instance of.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "Coding"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "InstanceType"
        }],
        "strength" : "extensible",
        "description" : "The structure that defines the instance",
        "valueSet" : "http://hl7.org/fhir/ValueSet/examplescenario-instance-type"
      }
    },
    {
      "id" : "ExampleScenario.instance.structureVersion",
      "path" : "ExampleScenario.instance.structureVersion",
      "short" : "E.g. 4.0.1",
      "definition" : "Conveys the version of the data structure instantiated.  I.e. what release of FHIR, X12, OpenEHR, etc. is instance compliant with.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "condition" : ["exs-1"],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.structureProfile[x]",
      "path" : "ExampleScenario.instance.structureProfile[x]",
      "short" : "Rules instance adheres to",
      "definition" : "Refers to a profile, template or other ruleset the instance adheres to.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "canonical"
      },
      {
        "code" : "uri"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.title",
      "path" : "ExampleScenario.instance.title",
      "short" : "Label for instance",
      "definition" : "A short descriptive label the instance to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.description",
      "path" : "ExampleScenario.instance.description",
      "short" : "Human-friendly description of the instance",
      "definition" : "An explanation of what the instance contains and what it's for.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.content",
      "path" : "ExampleScenario.instance.content",
      "short" : "Example instance data",
      "definition" : "Points to an instance (typically an example) that shows the data that would corespond to this instance.",
      "comment" : "If not conveying FHIR data or not using the same version of FHIR as this ExampleScenario instance, the reference must be to a Binary.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version",
      "path" : "ExampleScenario.instance.version",
      "short" : "Snapshot of instance that changes",
      "definition" : "Represents the instance as it was at a specific time-point.",
      "comment" : "Not used if an instance doesn't change",
      "requirements" : "Allows representing the 'same' instance as it evolves throughout the scenario.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.key",
      "path" : "ExampleScenario.instance.version.key",
      "short" : "ID or acronym of the version",
      "definition" : "A unique string within the instance that is used to reference the version of the instance.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.description",
      "path" : "ExampleScenario.instance.version.description",
      "short" : "Details about version",
      "definition" : "An explanation of what this specific version of the instance contains and represents.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.version.content",
      "path" : "ExampleScenario.instance.version.content",
      "short" : "Example instance version data",
      "definition" : "Points to an instance (typically an example) that shows the data that would flow at this point in the scenario.",
      "comment" : "If not conveying FHIR data or not using the same version of FHIR as this ExampleScenario instance, the reference must be to a Binary.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Reference"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance",
      "path" : "ExampleScenario.instance.containedInstance",
      "short" : "Resources contained in the instance",
      "definition" : "References to other instances that can be found within this instance (e.g. the observations contained in a bundle).",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "exs-15",
        "severity" : "error",
        "human" : "versionReference must be specified if the referenced instance defines versions",
        "expression" : "versionReference.empty() implies %resource.instance.where(key=%context.instanceReference).version.empty()",
        "xpath" : "exists(f:versionReference) or not(exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value]/f:version))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-14",
        "severity" : "error",
        "human" : "InstanceReference must be a key of an instance defined in the ExampleScenario",
        "expression" : "%resource.instance.where(key=%context.instanceReference).exists()",
        "xpath" : "exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-16",
        "severity" : "error",
        "human" : "versionReference must be a key of a version within the instance pointed to by instanceReference",
        "expression" : "versionReference.exists() implies %resource.instance.where(key=%context.instanceReference).version.where(key=%context.versionReference).exists()",
        "xpath" : "not(exists(f:versionReference)) or exists(ancestor::f:ExampleScenario/f:instance[f:key/@value=current()/f:instanceReference/@value]/f:version[f:key/@value=current()/f:versionReference/@value]))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.instanceReference",
      "path" : "ExampleScenario.instance.containedInstance.instanceReference",
      "short" : "Key of contained instance",
      "definition" : "A reference to the key of an instance found within this one.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.instance.containedInstance.versionReference",
      "path" : "ExampleScenario.instance.containedInstance.versionReference",
      "short" : "Key of contained instance version",
      "definition" : "A reference to the key of a specific version of an instance in this instance.",
      "comment" : "Required if the referenced instance has versions",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process",
      "path" : "ExampleScenario.process",
      "short" : "Major process within scenario",
      "definition" : "A group of operations that represents a significant step within a scenario.",
      "comment" : "Some scenarios might describe only one process.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-4"],
      "constraint" : [{
        "key" : "exs-5",
        "severity" : "error",
        "human" : "Processes must have steps if ExampleScenario status is active or required",
        "expression" : "%resource.status='active' or %resource.status='retired' implies step.exists()",
        "xpath" : "not(parent::*/f:status/@value = ('active','retired')) or exists(f:step)",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.title",
      "path" : "ExampleScenario.process.title",
      "short" : "Label for procss",
      "definition" : "A short descriptive label the process to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : true
    },
    {
      "id" : "ExampleScenario.process.description",
      "path" : "ExampleScenario.process.description",
      "short" : "Human-friendly description of the process",
      "definition" : "An explanation of what the process represents and what it does.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.preConditions",
      "path" : "ExampleScenario.process.preConditions",
      "short" : "Status before process starts",
      "definition" : "Description of the initial state of the actors, environment and data before the process starts.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.postConditions",
      "path" : "ExampleScenario.process.postConditions",
      "short" : "Status after successful completion",
      "definition" : "Description of the final state of the actors, environment and data after the process has been successfully completed.",
      "comment" : "Alternate steps might not result in all post conditions holding",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step",
      "path" : "ExampleScenario.process.step",
      "short" : "Event within of the process",
      "definition" : "A significant action that occurs as part of the process.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "condition" : ["exs-5"],
      "constraint" : [{
        "key" : "exs-13",
        "severity" : "error",
        "human" : "Alternative titles must be unique within a step",
        "expression" : "alternative.title.count() = alternative.title.distinct().count()",
        "xpath" : "count(f:alternative/f:title/@value) = count(distinct-values(f:alternative/f:title/@value))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-16",
        "severity" : "error",
        "human" : "Can have a process, a workflow, one or more operations or none of these, but cannot have a combination",
        "expression" : "(process.exists() implies workflow.empty() and operation.empty()) and (workflow.exists() implies operation.empty())",
        "xpath" : "(not(exists(f:process)) or not(exists(f:workflow) or exists(f:operation))) and (not(exists(f:workflow) or not(exists(f:operation)))",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.number",
      "path" : "ExampleScenario.process.step.number",
      "short" : "Sequential number of the step",
      "definition" : "The sequential number of the step, e.g. 1.2.5.",
      "comment" : "If step numbers are simultaneous, they will be the same.  Numbers don't have to be numeric.  E.g. '2c)' is a valid step number",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.process",
      "path" : "ExampleScenario.process.step.process",
      "short" : "Step is nested process",
      "definition" : "Indicates that the step is a complex sub-process with its own steps.",
      "min" : 0,
      "max" : "1",
      "contentReference" : "#ExampleScenario.process",
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.workflow",
      "path" : "ExampleScenario.process.step.workflow",
      "short" : "Step is nested workflow",
      "definition" : "Indicates that the step is defined by a seaparate scenario instance.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "canonical",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/ExampleScenario"]
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation",
      "path" : "ExampleScenario.process.step.operation",
      "short" : "Step is simple action",
      "definition" : "The step represents a single operation invoked on receiver by sender.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "exs-17",
        "severity" : "error",
        "human" : "If specified, initiator must be a key of an actor within the ExampleScenario",
        "expression" : "initiator.exists() implies %resource.actor.where(key=%context.initiator).exists()",
        "xpath" : "not(exists(f:initiator)) or exists(ancestor::f:ExampleScenario/f:actor[f:key/@value=current()/f:initiator/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      },
      {
        "key" : "exs-18",
        "severity" : "error",
        "human" : "If specified, receiver must be a key of an actor within the ExampleScenario",
        "expression" : "receiver.exists() implies %resource.actor.where(key=%context.receiver).exists()",
        "xpath" : "not(exists(f:receiver)) or exists(ancestor::f:ExampleScenario/f:actor[f:key/@value=current()/f:receiver/@value])",
        "source" : "http://hl7.org/fhir/StructureDefinition/ExampleScenario"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.type",
      "path" : "ExampleScenario.process.step.operation.type",
      "short" : "Kind of action",
      "definition" : "The standardized type of action (FHIR or otherwise).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "Coding"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"
        }],
        "strength" : "extensible",
        "valueSet" : "http://hl7.org/fhir/ValueSet/testscript-operation-codes"
      }
    },
    {
      "id" : "ExampleScenario.process.step.operation.title",
      "path" : "ExampleScenario.process.step.operation.title",
      "short" : "Label for step",
      "definition" : "A short descriptive label the step to be used in tables or diagrams.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.initiator",
      "path" : "ExampleScenario.process.step.operation.initiator",
      "short" : "Who starts the operation",
      "definition" : "The system that invokes the action/transmits the data.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.receiver",
      "path" : "ExampleScenario.process.step.operation.receiver",
      "short" : "Who receives the operation",
      "definition" : "The system on which the action is invoked/receives the data.",
      "comment" : "In some cases, receiver could be same as sender if representing a local operation",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.description",
      "path" : "ExampleScenario.process.step.operation.description",
      "short" : "Human-friendly description of the operation",
      "definition" : "An explanation of what the operation represents and what it does.",
      "comment" : "This should contain information not already present in the process step.  It's more of a description of what the operation in general does - if not already evident from the operation.type",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.initiatorActive",
      "path" : "ExampleScenario.process.step.operation.initiatorActive",
      "short" : "Initiator stays active?",
      "definition" : "If false, the initiator is deactivated right after the operation.",
      "comment" : "De-activation of an actor means they have no further role until such time as they are the recipient of an operation.",
      "requirements" : "The notion of 'activation' in a flow diagram is used to indicate 'who has responsibility/is still doing work'.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.receiverActive",
      "path" : "ExampleScenario.process.step.operation.receiverActive",
      "short" : "Receiver stays active?",
      "definition" : "If false, the receiver is deactivated right after the operation.",
      "comment" : "De-activation of an actor means they have no further role until such time as they are the recipient of an operation.",
      "requirements" : "The notion of 'activation' in a flow diagram is used to indicate 'who has responsibility/is still doing work'.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.request",
      "path" : "ExampleScenario.process.step.operation.request",
      "short" : "Instance transmitted on invocation",
      "definition" : "A reference to the instance that is transmitted from requester to receiver as part of the invocation of the operation.",
      "min" : 0,
      "max" : "1",
      "contentReference" : "#ExampleScenario.instance.containedInstance",
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.operation.response",
      "path" : "ExampleScenario.process.step.operation.response",
      "short" : "Instance transmitted on invocation response",
      "definition" : "A reference to the instance that is transmitted from receiver to requester as part of the operation's synchronous response (if any).",
      "min" : 0,
      "max" : "1",
      "contentReference" : "#ExampleScenario.instance.containedInstance",
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative",
      "path" : "ExampleScenario.process.step.alternative",
      "short" : "Alternate non-typical step action",
      "definition" : "Indicates an alternative step that can be taken instead of the sub-process, scenario or operation.  E.g. to represent non-happy-path/exceptional/atypical circumstances.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.title",
      "path" : "ExampleScenario.process.step.alternative.title",
      "short" : "Label for alternative",
      "definition" : "The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.description",
      "path" : "ExampleScenario.process.step.alternative.description",
      "short" : "Human-readable description of option",
      "definition" : "A human-readable description of the alternative explaining when the alternative should occur rather than the base step.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "markdown"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.alternative.step",
      "path" : "ExampleScenario.process.step.alternative.step",
      "short" : "Alternative action(s)",
      "definition" : "Indicates the operation, sub-process or scenario that happens if the alternative option is selected.",
      "min" : 0,
      "max" : "*",
      "contentReference" : "#ExampleScenario.process.step",
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "ExampleScenario.process.step.pause",
      "path" : "ExampleScenario.process.step.pause",
      "short" : "Pause in the flow?",
      "definition" : "If true, indicates that, following this step, there is a pause in the flow and the subsequent step will occur at some later time (triggered by some event).",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "mustSupport" : false,
      "isModifier" : false,
      "isSummary" : false
    }]
  }
}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.