Touchstone FHIR Testing
2.0.0 - current International flag

Touchstone FHIR Testing v2.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

Resource Profile: AEGISTouchstoneTestingTestScriptProfile - JSON Profile

Active as of 2023-06-29

JSON representation of the testscript resource profile.

Raw json | Download


{
  "resourceType" : "StructureDefinition",
  "id" : "testscript",
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">Placeholder</div>"
  },
  "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript",
  "version" : "2.0.0",
  "name" : "AEGISTouchstoneTestingTestScriptProfile",
  "title" : "AEGIS Touchstone Testing TestScript Profile",
  "status" : "active",
  "date" : "2023-06-29",
  "publisher" : "AEGIS.net, Inc.",
  "contact" : [
    {
      "name" : "AEGIS.net, Inc.",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.aegis.net"
        }
      ]
    },
    {
      "name" : "Richard Ettema",
      "telecom" : [
        {
          "system" : "email",
          "value" : "mailto:richard.ettema@aegis.net"
        }
      ]
    }
  ],
  "description" : "Defines constraints and extensions on the TestScript resource for use in the Touchstone Testing Platform.",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001",
          "display" : "World"
        }
      ]
    }
  ],
  "fhirVersion" : "4.0.1",
  "mapping" : [
    {
      "identity" : "rim",
      "uri" : "http://hl7.org/v3",
      "name" : "RIM Mapping"
    },
    {
      "identity" : "workflow",
      "uri" : "http://hl7.org/fhir/workflow",
      "name" : "Workflow Pattern"
    },
    {
      "identity" : "w5",
      "uri" : "http://hl7.org/fhir/fivews",
      "name" : "FiveWs Pattern Mapping"
    },
    {
      "identity" : "objimpl",
      "uri" : "http://hl7.org/fhir/object-implementation",
      "name" : "Object Implementation Information"
    }
  ],
  "kind" : "resource",
  "abstract" : false,
  "type" : "TestScript",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/TestScript",
  "derivation" : "constraint",
  "snapshot" : {
    "element" : [
      {
        "id" : "TestScript",
        "path" : "TestScript",
        "short" : "Touchstone Testing TestScript Profile",
        "definition" : "Defines constraints and extensions on the TestScript resource for use in the Touchstone Testing Platform.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript",
          "min" : 0,
          "max" : "*"
        },
        "constraint" : [
          {
            "key" : "dom-2",
            "severity" : "error",
            "human" : "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
            "expression" : "contained.contained.empty()",
            "xpath" : "not(parent::f:contained and f:contained)",
            "source" : "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key" : "dom-3",
            "severity" : "error",
            "human" : "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
            "expression" : "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()",
            "xpath" : "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
            "source" : "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key" : "dom-4",
            "severity" : "error",
            "human" : "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
            "expression" : "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
            "xpath" : "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
            "source" : "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key" : "dom-5",
            "severity" : "error",
            "human" : "If a resource is contained in another resource, it SHALL NOT have a security label",
            "expression" : "contained.meta.security.empty()",
            "xpath" : "not(exists(f:contained/*/f:meta/f:security))",
            "source" : "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "extension" : [
              {
                "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
                "valueBoolean" : true
              },
              {
                "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
                "valueMarkdown" : "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
              }
            ],
            "key" : "dom-6",
            "severity" : "warning",
            "human" : "A resource should have narrative for robust management",
            "expression" : "text.`div`.exists()",
            "xpath" : "exists(f:text/h:div)",
            "source" : "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key" : "tst-0",
            "severity" : "warning",
            "human" : "Name should be usable as an identifier for the module by machine processing applications such as code generation",
            "expression" : "name.matches('[A-Z]([A-Za-z0-9_]){0,254}')",
            "xpath" : "not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "mustSupport" : false,
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "Entity. Role, or Act"
          },
          {
            "identity" : "rim",
            "map" : "n/a"
          }
        ]
      },
      {
        "id" : "TestScript.id",
        "path" : "TestScript.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" : "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true
      },
      {
        "id" : "TestScript.meta",
        "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true
      },
      {
        "id" : "TestScript.implicitRules",
        "path" : "TestScript.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"
          }
        ],
        "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" : "TestScript.language",
        "path" : "TestScript.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"
          }
        ],
        "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" : "A human language.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      {
        "id" : "TestScript.text",
        "path" : "TestScript.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 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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "Act.text?"
          }
        ]
      },
      {
        "id" : "TestScript.contained",
        "path" : "TestScript.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, and nor can they have their own independent transaction scope.",
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "rim",
            "map" : "N/A"
          }
        ]
      },
      {
        "id" : "TestScript.extension",
        "path" : "TestScript.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "ordered" : false,
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.extension:testscript-dynamic-fixture",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-dynamic-fixture",
        "short" : "Dynamic fixture used within the test script",
        "definition" : "TestScript dynamic-fixture definition used by the Test Engine to dynamically prompt for a fixture' contents.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "DomainResource.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-dynamic-fixture"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.extension:testscript-rule",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-rule",
        "short" : "Assert rule used within the test script",
        "definition" : "TestScript rule definition used as asserts within the TestScript. The rule must define the external reference to the executable rule script file.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "DomainResource.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.extension:testscript-ruleset",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-ruleset",
        "short" : "Assert ruleset used within the test script",
        "definition" : "TestScript ruleset definition used as asserts within the TestScript. The rule must define the external reference to the ruleset structure file.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "DomainResource.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-ruleset"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.modifierExtension",
        "path" : "TestScript.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](http://hl7.org/fhir/R4/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"
          }
        ],
        "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" : "TestScript.url",
        "path" : "TestScript.url",
        "short" : "Canonical identifier for this test script, represented as a URI (globally unique)",
        "definition" : "An absolute URI that is used to identify this test script 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 test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script 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](http://hl7.org/fhir/R4/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](http://hl7.org/fhir/R4/resource.html#meta) element to indicate where the current master source of the resource can be found.",
        "requirements" : "Allows the test script to be referenced by a single globally unique identifier.",
        "alias" : [
          "url",
          "authoritative-url",
          "destination",
          "identity"
        ],
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.url",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.url"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.identifier"
          }
        ]
      },
      {
        "id" : "TestScript.identifier",
        "path" : "TestScript.identifier",
        "short" : "Additional identifier for the test script",
        "definition" : "A formal identifier that is used to identify this test script 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 test script 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" : "1",
        "base" : {
          "path" : "TestScript.identifier",
          "min" : 0,
          "max" : "1"
        },
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.identifier"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.identifier"
          },
          {
            "identity" : "objimpl",
            "map" : "no-gen-base"
          }
        ]
      },
      {
        "id" : "TestScript.version",
        "path" : "TestScript.version",
        "short" : "Business version of the test script",
        "definition" : "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script 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 test script 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 test script with the format [url]|[version].",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.version"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.version"
          }
        ]
      },
      {
        "id" : "TestScript.name",
        "path" : "TestScript.name",
        "short" : "Name for this test script (computer friendly)",
        "definition" : "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
        "comment" : "The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.",
        "requirements" : "Support human navigation and code generation.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.name",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "string"
          }
        ],
        "condition" : [
          "inv-0"
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true
      },
      {
        "id" : "TestScript.title",
        "path" : "TestScript.title",
        "short" : "Name for this test script (human friendly)",
        "definition" : "A short, descriptive, user-friendly title for the test script.",
        "comment" : "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.title"
          }
        ]
      },
      {
        "id" : "TestScript.status",
        "path" : "TestScript.status",
        "short" : "draft | active | retired | unknown",
        "definition" : "The status of this test script. Enables tracking the life-cycle of the content.",
        "comment" : "Allows filtering of test scripts that are appropriate for use versus not.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "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|4.0.1"
        },
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.status"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.status"
          }
        ]
      },
      {
        "id" : "TestScript.experimental",
        "path" : "TestScript.experimental",
        "short" : "For testing purposes, not real usage",
        "definition" : "A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
        "comment" : "Allows filtering of test scripts 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 test script.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.experimental"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.class"
          }
        ]
      },
      {
        "id" : "TestScript.date",
        "path" : "TestScript.date",
        "short" : "Date last changed",
        "definition" : "The date  (and optionally time) when the test script 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 test script changes.",
        "comment" : "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the test script. 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" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.date"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.recorded"
          }
        ]
      },
      {
        "id" : "TestScript.publisher",
        "path" : "TestScript.publisher",
        "short" : "Name of the publisher (organization or individual)",
        "definition" : "The name of the organization or individual that published the test script.",
        "comment" : "Usually an organization but may be an individual. The publisher (or steward) of the test script is the organization or individual primarily responsible for the maintenance and upkeep of the test script. 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 test script. This item SHOULD be populated unless the information is available from context.",
        "requirements" : "Helps establish the \"authority/credibility\" of the test script.  May also allow for contact.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.publisher"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.witness"
          }
        ]
      },
      {
        "id" : "TestScript.contact",
        "path" : "TestScript.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" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.contact"
          }
        ]
      },
      {
        "id" : "TestScript.description",
        "path" : "TestScript.description",
        "short" : "Natural language description of the test script",
        "definition" : "A free text natural language description of the test script from a consumer's perspective.",
        "comment" : "This description can be used to capture details such as why the test script was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the test script as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the test script is presumed to be the predominant language in the place the test script was created).",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.description"
          }
        ]
      },
      {
        "id" : "TestScript.useContext",
        "path" : "TestScript.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 test script 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" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : true,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.useContext"
          }
        ]
      },
      {
        "id" : "TestScript.jurisdiction",
        "path" : "TestScript.jurisdiction",
        "short" : "Intended jurisdiction for test script (if applicable)",
        "definition" : "A legal or geographic region in which the test script is intended to be used.",
        "comment" : "It may be possible for the test script to be used in jurisdictions other than those for which it was originally designed or intended.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "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" : "TestScript.purpose",
        "path" : "TestScript.purpose",
        "short" : "Why this test script is defined",
        "definition" : "Explanation of why this test script is needed and why it has been designed as it has.",
        "comment" : "This element does not describe the usage of the test script. 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 test script.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.purpose"
          },
          {
            "identity" : "w5",
            "map" : "FiveWs.why[x]"
          },
          {
            "identity" : "objimpl",
            "map" : "no-gen-base"
          }
        ]
      },
      {
        "id" : "TestScript.copyright",
        "path" : "TestScript.copyright",
        "short" : "Use and/or publishing restrictions",
        "definition" : "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.",
        "requirements" : "Consumers must be able to determine any legal restrictions on the use of the test script and/or its content.",
        "alias" : [
          "License",
          "Restrictions"
        ],
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "mapping" : [
          {
            "identity" : "workflow",
            "map" : "Definition.copyright"
          },
          {
            "identity" : "objimpl",
            "map" : "no-gen-base"
          }
        ]
      },
      {
        "id" : "TestScript.origin",
        "path" : "TestScript.origin",
        "short" : "An abstract server representing a client or sender in a message exchange",
        "definition" : "An abstract server used in operations within this test script in the origin element.",
        "comment" : "The purpose of this element is to define the profile of an origin element used elsewhere in the script.  Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.origin",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.origin.id",
        "path" : "TestScript.origin.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" : "TestScript.origin.extension",
        "path" : "TestScript.origin.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" : "TestScript.origin.modifierExtension",
        "path" : "TestScript.origin.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](http://hl7.org/fhir/R4/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" : "TestScript.origin.index",
        "path" : "TestScript.origin.index",
        "short" : "The index of the abstract origin server starting at 1",
        "definition" : "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.",
        "comment" : "A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and again as FormProcessor within the same script as that could get confusing during test configuration). \n\nDifferent origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler).\n\nThe origin indices provided elsewhere in the test script must be one of these origin indices.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.origin.index",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.origin.profile",
        "path" : "TestScript.origin.profile",
        "short" : "FHIR-Client | FHIR-SDC-FormFiller | CDSH-Client | HL7V2-Client | HL7V3-Client",
        "definition" : "The type of origin profile the test system supports.",
        "comment" : "Must be a \"sender\"/\"client\" profile.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.origin.profile",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "meaningWhenMissing" : "FHIR-Client",
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptProfileOriginType"
            }
          ],
          "strength" : "extensible",
          "description" : "The type of origin profile the test system supports.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-profile-origin-types"
        }
      },
      {
        "id" : "TestScript.destination",
        "path" : "TestScript.destination",
        "short" : "An abstract server representing a destination or receiver in a message exchange",
        "definition" : "An abstract server used in operations within this test script in the destination element.",
        "comment" : "The purpose of this element is to define the profile of a destination element used elsewhere in the script.  Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.destination",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.destination.id",
        "path" : "TestScript.destination.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" : "TestScript.destination.extension",
        "path" : "TestScript.destination.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" : "TestScript.destination.modifierExtension",
        "path" : "TestScript.destination.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](http://hl7.org/fhir/R4/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" : "TestScript.destination.index",
        "path" : "TestScript.destination.index",
        "short" : "The index of the abstract destination server starting at 1",
        "definition" : "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.",
        "comment" : "A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and again as Form-Processor within the same script as that could get confusing during test configuration). \n\nDifferent destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager).\n\nThe destination indices provided elsewhere in the test script must be one of these destination indices.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.destination.index",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.destination.profile",
        "path" : "TestScript.destination.profile",
        "short" : "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor | CDSH-Server | HL7V2-Server | HL7V3-Server",
        "definition" : "The type of destination profile the test system supports.",
        "comment" : "Must be a \"receiver\"/\"server\" profile.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.destination.profile",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "meaningWhenMissing" : "FHIR-Server",
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptProfileDestinationType"
            }
          ],
          "strength" : "extensible",
          "description" : "The type of destination profile the test system supports.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-profile-destination-types"
        }
      },
      {
        "id" : "TestScript.metadata",
        "path" : "TestScript.metadata",
        "short" : "Required capability that is assumed to function correctly on the FHIR server being tested",
        "definition" : "The required capability must exist and are assumed to function correctly on the FHIR server being tested.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata",
          "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" : "tst-4",
            "severity" : "error",
            "human" : "TestScript metadata capability SHALL contain required or validated or both.",
            "expression" : "capability.required.exists() or capability.validated.exists()",
            "xpath" : "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.id",
        "path" : "TestScript.metadata.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" : "TestScript.metadata.extension",
        "path" : "TestScript.metadata.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" : "TestScript.metadata.modifierExtension",
        "path" : "TestScript.metadata.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](http://hl7.org/fhir/R4/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" : "TestScript.metadata.link",
        "path" : "TestScript.metadata.link",
        "short" : "Links to the FHIR specification",
        "definition" : "A link to the FHIR specification that this test is covering.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.metadata.link",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.link.id",
        "path" : "TestScript.metadata.link.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" : "TestScript.metadata.link.extension",
        "path" : "TestScript.metadata.link.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" : "TestScript.metadata.link.modifierExtension",
        "path" : "TestScript.metadata.link.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](http://hl7.org/fhir/R4/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" : "TestScript.metadata.link.url",
        "path" : "TestScript.metadata.link.url",
        "short" : "URL to the specification",
        "definition" : "URL to a particular requirement or feature within the FHIR specification.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.link.url",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.link.description",
        "path" : "TestScript.metadata.link.description",
        "short" : "Short description",
        "definition" : "Short description of the link.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.link.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability",
        "path" : "TestScript.metadata.capability",
        "short" : "Capabilities  that are assumed to function correctly on the FHIR server being tested",
        "definition" : "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.",
        "comment" : "When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped.  When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped.  The \"metadata.capabilities.required\" and \"metadata.capabilities.validated\" elements only indicate whether the capabilities are the primary focus of the test script or not.  They do not impact the skipping logic.  Capabilities whose \"metadata.capabilities.validated\" flag is true are the primary focus of the test script.",
        "min" : 1,
        "max" : "*",
        "base" : {
          "path" : "TestScript.metadata.capability",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.id",
        "path" : "TestScript.metadata.capability.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" : "TestScript.metadata.capability.extension",
        "path" : "TestScript.metadata.capability.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" : "TestScript.metadata.capability.modifierExtension",
        "path" : "TestScript.metadata.capability.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](http://hl7.org/fhir/R4/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" : "TestScript.metadata.capability.required",
        "path" : "TestScript.metadata.capability.required",
        "short" : "Are the capabilities required?",
        "definition" : "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.capability.required",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.validated",
        "path" : "TestScript.metadata.capability.validated",
        "short" : "Are the capabilities validated?",
        "definition" : "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.capability.validated",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.description",
        "path" : "TestScript.metadata.capability.description",
        "short" : "The expected capabilities of the server",
        "definition" : "Description of the capabilities that this test script is requiring the server to support.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.capability.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.origin",
        "path" : "TestScript.metadata.capability.origin",
        "short" : "Which origin server these requirements apply to",
        "definition" : "Which origin server these requirements apply to.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.metadata.capability.origin",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.destination",
        "path" : "TestScript.metadata.capability.destination",
        "short" : "Which server these requirements apply to",
        "definition" : "Which server these requirements apply to.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.capability.destination",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.link",
        "path" : "TestScript.metadata.capability.link",
        "short" : "Links to the FHIR specification",
        "definition" : "Links to the FHIR specification that describes this interaction and the resources involved in more detail.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.metadata.capability.link",
          "min" : 0,
          "max" : "*"
        },
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.metadata.capability.capabilities",
        "path" : "TestScript.metadata.capability.capabilities",
        "short" : "Required Capability Statement",
        "definition" : "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.",
        "comment" : "The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.metadata.capability.capabilities",
          "min" : 1,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "canonical",
            "targetProfile" : [
              "http://hl7.org/fhir/StructureDefinition/CapabilityStatement"
            ]
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.fixture",
        "path" : "TestScript.fixture",
        "short" : "Fixture in the test script - by reference (uri)",
        "definition" : "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.fixture",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.fixture.id",
        "path" : "TestScript.fixture.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" : "TestScript.fixture.extension",
        "path" : "TestScript.fixture.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" : "TestScript.fixture.modifierExtension",
        "path" : "TestScript.fixture.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](http://hl7.org/fhir/R4/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" : "TestScript.fixture.autocreate",
        "path" : "TestScript.fixture.autocreate",
        "short" : "Whether or not to implicitly create the fixture during setup",
        "definition" : "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.fixture.autocreate",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.fixture.autodelete",
        "path" : "TestScript.fixture.autodelete",
        "short" : "Whether or not to implicitly delete the fixture during teardown",
        "definition" : "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.fixture.autodelete",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.fixture.resource",
        "path" : "TestScript.fixture.resource",
        "short" : "Reference of the resource",
        "definition" : "Reference to the resource (containing the contents of the resource needed for operations).",
        "comment" : "See http://build.fhir.org/resourcelist.html for complete list of resource types.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.fixture.resource",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.profile",
        "path" : "TestScript.profile",
        "short" : "Reference of the validation profile",
        "definition" : "Reference to the profile to be used for validation.",
        "comment" : "See http://build.fhir.org/resourcelist.html for complete list of resource types.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.profile",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable",
        "path" : "TestScript.variable",
        "short" : "Placeholder for evaluated elements",
        "definition" : "Variable is set based either on element value in response body or on header field value in the response headers.",
        "comment" : "Variables would be set based either on XPath/JSONPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report an error.  Variables would be used to perform clean replacements in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. This limits the places that test engines would need to look for placeholders \"${}\".  Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations.  See example testscript-search.xml.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.variable",
          "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" : "tst-3",
            "severity" : "error",
            "human" : "Variable can only contain one of expression, headerField or path.",
            "expression" : "expression.empty() or headerField.empty() or path.empty()",
            "xpath" : "not(f:expression and f:headerField and f:path)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.id",
        "path" : "TestScript.variable.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" : "TestScript.variable.extension",
        "path" : "TestScript.variable.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "ordered" : false,
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "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
      },
      {
        "id" : "TestScript.variable.extension:testscript-variable-paramField",
        "path" : "TestScript.variable.extension",
        "sliceName" : "testscript-variable-paramField",
        "short" : "Fixture firstUsage used within the test script",
        "definition" : "TestScript fixture firstUsage definition used as asserts within the TestScript. The firstUsage boolean defines whether this is the first time the referenced fixture is used.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-variable-paramField"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.variable.modifierExtension",
        "path" : "TestScript.variable.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](http://hl7.org/fhir/R4/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" : "TestScript.variable.name",
        "path" : "TestScript.variable.name",
        "short" : "Descriptive name for this variable",
        "definition" : "Descriptive name for this variable.",
        "comment" : "Placeholders would contain the variable name wrapped in ${} in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" elements.  These placeholders would need to be replaced by the variable value before the operation is executed.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.name",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.defaultValue",
        "path" : "TestScript.variable.defaultValue",
        "short" : "Default, hard-coded, or user-defined value for this variable",
        "definition" : "A default, hard-coded, or user-defined value for this variable.",
        "comment" : "The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.defaultValue",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.description",
        "path" : "TestScript.variable.description",
        "short" : "Natural language description of the variable",
        "definition" : "A free text natural language description of the variable and its purpose.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.expression",
        "path" : "TestScript.variable.expression",
        "short" : "The FHIRPath expression against the fixture body",
        "definition" : "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.",
        "comment" : "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define any combination of expression, headerField and path.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.expression",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.headerField",
        "path" : "TestScript.variable.headerField",
        "short" : "HTTP header field name for source",
        "definition" : "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.",
        "comment" : "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define both headerField and path.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.headerField",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.hint",
        "path" : "TestScript.variable.hint",
        "short" : "Hint help text for default value to enter",
        "definition" : "Displayable text string with hint help information to the user when entering a default value.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.hint",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.path",
        "path" : "TestScript.variable.path",
        "short" : "XPath or JSONPath against the fixture body",
        "definition" : "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.",
        "comment" : "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define any combination of expression, headerField and path.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.path",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.variable.sourceId",
        "path" : "TestScript.variable.sourceId",
        "short" : "Fixture Id of source expression or headerField within this variable",
        "definition" : "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.",
        "comment" : "This can be a statically defined fixture (at the top of the TestScript) or a dynamically set fixture created by responseId of the `action.operation` element.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.variable.sourceId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup",
        "path" : "TestScript.setup",
        "short" : "A series of required setup operations before tests are executed",
        "definition" : "A series of required setup operations before tests are executed.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.id",
        "path" : "TestScript.setup.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" : "TestScript.setup.extension",
        "path" : "TestScript.setup.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "ordered" : false,
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "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
      },
      {
        "id" : "TestScript.setup.extension:testscript-test-manualCompletion",
        "path" : "TestScript.setup.extension",
        "sliceName" : "testscript-test-manualCompletion",
        "short" : "Override the default behavior of the TestScript.test execution",
        "definition" : "TestScript test manualCompletion definition used within the TestScript. The manualCompletion defines an override of the default behavior of the TestScript.test execution.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-test-manualCompletion"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.modifierExtension",
        "path" : "TestScript.setup.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](http://hl7.org/fhir/R4/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" : "TestScript.setup.action",
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString" : "SetupAction"
          }
        ],
        "path" : "TestScript.setup.action",
        "short" : "A setup operation or assert to perform",
        "definition" : "Action would contain either an operation or an assertion.",
        "comment" : "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min" : 1,
        "max" : "*",
        "base" : {
          "path" : "TestScript.setup.action",
          "min" : 1,
          "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" : "tst-1",
            "severity" : "error",
            "human" : "Setup action SHALL contain either an operation or assert but not both.",
            "expression" : "operation.exists() xor assert.exists()",
            "xpath" : "(f:operation or f:assert) and not(f:operation and f:assert)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.id",
        "path" : "TestScript.setup.action.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" : "TestScript.setup.action.extension",
        "path" : "TestScript.setup.action.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" : "TestScript.setup.action.modifierExtension",
        "path" : "TestScript.setup.action.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](http://hl7.org/fhir/R4/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" : "TestScript.setup.action.operation",
        "path" : "TestScript.setup.action.operation",
        "short" : "The setup operation to perform",
        "definition" : "The operation to perform.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.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" : "tst-7",
            "severity" : "error",
            "human" : "Setup operation SHALL contain either sourceId or targetId or params or url.",
            "expression" : "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history'))",
            "xpath" : "f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "ttt-0",
            "severity" : "error",
            "human" : "HL7 V2 setup operation SHALL NOT contain resource or accept or contentType or method or params or requestHeader or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v2' or (resource.count() + accept.count() + contentType.count() + method.count() + params.count() + requestHeader.field.count() + requestHeader.value.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v2' or ((f:resource or f:accept or f:contentType or f:method or f:params or f:requestHeader or f:targetId) and (count(f:resource) + count(f:accept) + count(f:contentType) + count(f:method) + count(f:params) + count(f:requestHeader) + count(f:targetId) = 0))"
          },
          {
            "key" : "ttt-1",
            "severity" : "error",
            "human" : "HL7 V3 setup operation SHALL NOT contain resource or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v3' or (resource.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v3' or ((f:resource or f:targetId) and (count(f:resource) + count(f:targetId) = 0))"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.id",
        "path" : "TestScript.setup.action.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" : "TestScript.setup.action.operation.extension",
        "path" : "TestScript.setup.action.operation.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "ordered" : false,
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "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
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-authorizeInNewTab",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-authorizeInNewTab",
        "short" : "Authorize in new tab for specific oauth2-authorize operation",
        "definition" : "TestScript operation authorizeInNewTab definition used within the TestScript. The authorizeInNewTab defines additional behavior of the oauth2-authorization operation. If true, then OAuth2 Authorization will be done in a new tab.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-authorizeInNewTab"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-oauth2AuthzRedirectId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-oauth2AuthzRedirectId",
        "short" : "Request id for specific oauth2-authorize operation",
        "definition" : "TestScript operation oauth2AuthzRedirectId definition used within the TestScript. The oauth2AuthzRedirectId defines the reference id of the oauth2-authorization operation redirect context to be used in subsequent sourceId elements.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-oauth2AuthzRedirectId"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-oauth2AuthzRequestId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-oauth2AuthzRequestId",
        "short" : "Request id for specific oauth2-authorize operation",
        "definition" : "TestScript operation oauth2AuthzRequestId definition used within the TestScript. The oauth2AuthzRequestId defines the reference id of the oauth2-authorization operation request context to be used in subsequent sourceId elements.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-oauth2AuthzRequestId"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-pagesNext",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-pagesNext",
        "short" : "The maximum number of search pages to auto retrieve and process. Only valid when used with the 'history' or 'search' operation code values.",
        "definition" : "Touchstone TestScript operation testscript-operation-pagesNext extension for use within the TestScript.setup.action.operation and TestScript.test.action.operation elements. The testscript-operation-pagesNext extension defines additional behavior of the 'history' and 'search' operations. If present, the positive integer value defines the maximum number of search pages to auto retrieve and process. This extension is only valid when used with the 'history' and 'search' operations.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-pagesNext"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-protocol",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-protocol",
        "short" : "The testscript-operation-protocol extension defines the message protocol to be used in sending or evaluating the sent operation request.",
        "definition" : "Touchstone TestScript operation testscript-operation-protocol extension for use within the TestScript.setup.action.operation and TestScript.test.action.operation elements. The testscript-operation-protocol extension defines the message protocol to be used in sending or evaluating the sent operation request. If present, this protocol overrides the default protocol for the given operation.type code value. This extension is valid for all operations.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-protocol"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-smartLaunchRequestId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-smartLaunchRequestId",
        "short" : "Request id for specific oauth2-authorize operation",
        "definition" : "TestScript operation smartLaunchRequestId definition used within the TestScript. The smartLaunchRequestId defines the reference id of the SMART-on-FHIR launch operation request context to be used in subsequent sourceId elements.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-smartLaunchRequestId"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.modifierExtension",
        "path" : "TestScript.setup.action.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](http://hl7.org/fhir/R4/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" : "TestScript.setup.action.operation.type",
        "path" : "TestScript.setup.action.operation.type",
        "short" : "The operation code type that will be executed",
        "definition" : "Server interaction or operation type.",
        "comment" : "See http://build.fhir.org/http.html for list of server interactions.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptOperationCode"
            }
          ],
          "strength" : "extensible",
          "description" : "The allowable operation code types.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-operation-codes"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.resource",
        "path" : "TestScript.setup.action.operation.resource",
        "short" : "Resource type",
        "definition" : "The type of the resource.  See http://build.fhir.org/resourcelist.html.",
        "comment" : "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url.  If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified.  If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.resource",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "FHIRDefinedType"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "description" : "A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/defined-types|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.label",
        "path" : "TestScript.setup.action.operation.label",
        "short" : "Tracking/logging operation label",
        "definition" : "The label would be used for tracking/logging purposes by test engines.",
        "comment" : "This has no impact on the verification itself.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.label",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.description",
        "path" : "TestScript.setup.action.operation.description",
        "short" : "Tracking/reporting operation description",
        "definition" : "The description would be used by test engines for tracking and reporting purposes.",
        "comment" : "This has no impact on the verification itself.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.accept",
        "path" : "TestScript.setup.action.operation.accept",
        "short" : "Mime type to accept in the payload of the response, with charset etc.",
        "definition" : "The mime-type to use for RESTful operation in the 'Accept' header.",
        "comment" : "If this is specified, then test engine shall set the 'Accept' header to the corresponding value.  If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.accept",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "code"
          }
        ],
        "example" : [
          {
            "label" : "General",
            "valueCode" : "application/fhir+xml"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "MimeType"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "description" : "The mime type of an attachment. Any valid mime type is allowed.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.contentType",
        "path" : "TestScript.setup.action.operation.contentType",
        "short" : "Mime type of the request payload contents, with charset etc.",
        "definition" : "The mime-type to use for RESTful operation in the 'Content-Type' header.",
        "comment" : "If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value.  If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.contentType",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "code"
          }
        ],
        "example" : [
          {
            "label" : "General",
            "valueCode" : "application/fhir+xml"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "MimeType"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "description" : "The mime type of an attachment. Any valid mime type is allowed.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.destination",
        "path" : "TestScript.setup.action.operation.destination",
        "short" : "Server responding to the request",
        "definition" : "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.",
        "comment" : "If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will report an error as it cannot determine what destination to use for the exchange.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.destination",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.encodeRequestUrl",
        "path" : "TestScript.setup.action.operation.encodeRequestUrl",
        "short" : "Whether or not to send the request url in encoded format",
        "definition" : "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.encodeRequestUrl",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.method",
        "path" : "TestScript.setup.action.operation.method",
        "short" : "delete | get | options | patch | post | put | head",
        "definition" : "The HTTP method the test engine MUST use for this operation regardless of any other operation details.",
        "comment" : "The primary purpose of the explicit HTTP method is support of  HTTP POST method invocation of the FHIR search. Other uses will include support of negative testing.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.method",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptRequestMethodCode"
            }
          ],
          "strength" : "required",
          "description" : "The allowable request method or HTTP operation codes.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/http-operations|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.origin",
        "path" : "TestScript.setup.action.operation.origin",
        "short" : "Server initiating the request",
        "definition" : "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.",
        "comment" : "If absent, test engine will send the message.  When present, test engine will not send the request message but will wait for the request message to be sent from this origin server.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.origin",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "integer"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.params",
        "path" : "TestScript.setup.action.operation.params",
        "short" : "Explicitly defined path parameters",
        "definition" : "Path plus parameters after [type].  Used to set parts of the request URL explicitly.",
        "comment" : "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url.  If \"params\" element is specified, then \"targetId\" element is ignored.  For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified.  If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present.  For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url.  For \"vread\" and \"history\" operations, the versionId value will also be used.   Test engines would append whatever is specified for \"params\" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP).  The \"params\" element does not correspond exactly to \"search parameters\".  Nor is it the \"path\".  It corresponds to the part of the URL that comes after the [type] (when \"resource\" element is specified); e.g. It corresponds to \"/[id]/_history/[vid] {?_format=[mime-type]}\" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]}  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.params",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.requestHeader",
        "path" : "TestScript.setup.action.operation.requestHeader",
        "short" : "Each operation can have one or more header elements",
        "definition" : "Header elements would be used to set HTTP headers.",
        "comment" : "This gives control to test-script writers to set headers explicitly based on test requirements.  It will allow for testing using:  - \"If-Modified-Since\" and \"If-None-Match\" headers.  See http://build.fhir.org/http.html#2.1.0.5.1 - \"If-Match\" header.  See http://build.fhir.org/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\".  See http://build.fhir.org/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.setup.action.operation.requestHeader",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.requestHeader.id",
        "path" : "TestScript.setup.action.operation.requestHeader.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" : "TestScript.setup.action.operation.requestHeader.extension",
        "path" : "TestScript.setup.action.operation.requestHeader.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" : "TestScript.setup.action.operation.requestHeader.modifierExtension",
        "path" : "TestScript.setup.action.operation.requestHeader.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](http://hl7.org/fhir/R4/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" : "TestScript.setup.action.operation.requestHeader.field",
        "path" : "TestScript.setup.action.operation.requestHeader.field",
        "short" : "HTTP header field name",
        "definition" : "The HTTP header field e.g. \"Accept\".",
        "comment" : "If header element is specified, then field is required.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.requestHeader.field",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.requestHeader.value",
        "path" : "TestScript.setup.action.operation.requestHeader.value",
        "short" : "HTTP headerfield value",
        "definition" : "The value of the header e.g. \"application/fhir+xml\".",
        "comment" : "If header element is specified, then value is required.  No conversions will be done by the test engine e.g. \"xml\" to \"application/fhir+xml\".  The values will be set in HTTP headers \"as-is\".  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.requestHeader.value",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.requestId",
        "path" : "TestScript.setup.action.operation.requestId",
        "short" : "Fixture Id of mapped request",
        "definition" : "The fixture id (maybe new) to map to the request.",
        "comment" : "If a requestId is supplied, then the resulting request (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"requestId\".  If requestId is not specified, it is the test engine's responsibility to store the request and use it as the requestId in subsequent assertions when assertion path and/or headerField is specified, direction is equal to request, and the requestId in not specified.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.requestId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.responseId",
        "path" : "TestScript.setup.action.operation.responseId",
        "short" : "Fixture Id of mapped response",
        "definition" : "The fixture id (maybe new) to map to the response.",
        "comment" : "If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"responseId\".  If responseId is not specified, it is the test engine's responsibility to store the response and use it as the responseId in subsequent assertions when assertion path and/or headerField is specified and the responseId is not specified.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.responseId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.sourceId",
        "path" : "TestScript.setup.action.operation.sourceId",
        "short" : "Fixture Id of body for PUT and POST requests",
        "definition" : "The id of the fixture used as the body of a PUT or POST request.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.sourceId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.targetId",
        "path" : "TestScript.setup.action.operation.targetId",
        "short" : "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests",
        "definition" : "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.",
        "comment" : "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url.  If \"params\" element is specified, then \"targetId\" element is ignored.  For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified.  If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present.  For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url.  For \"vread\" and \"history\" operations, the versionId value will also be used.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.targetId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.operation.url",
        "path" : "TestScript.setup.action.operation.url",
        "short" : "Request URL",
        "definition" : "Complete request URL.",
        "comment" : "Used to set the request URL explicitly.  If \"url\" element is defined, then \"targetId\", \"resource\", and \"params\" elements will be ignored.  Test engines would use whatever is specified in \"url\" without tampering with the string (beyond encoding the URL for HTTP).  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.url",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert",
        "path" : "TestScript.setup.action.assert",
        "short" : "The assertion to perform",
        "definition" : "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
        "comment" : "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert",
          "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" : "tst-5",
            "severity" : "error",
            "human" : "Only a single assertion SHALL be present within setup action assert element.",
            "expression" : "extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count()  + validateProfileId.count() <=1)",
            "xpath" : "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId)  <=1",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "tst-10",
            "severity" : "error",
            "human" : "Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.",
            "expression" : "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())",
            "xpath" : "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "tst-12",
            "severity" : "error",
            "human" : "Setup action assert response and responseCode SHALL be empty when direction equals request",
            "expression" : "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'",
            "xpath" : "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.id",
        "path" : "TestScript.setup.action.assert.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" : "TestScript.setup.action.assert.extension",
        "path" : "TestScript.setup.action.assert.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "ordered" : false,
          "rules" : "open"
        },
        "short" : "Extension",
        "definition" : "An Extension",
        "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
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-rule",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-rule",
        "short" : "Rule used within the test script assert",
        "definition" : "TestScript assert rule definition used within TestScript asserts. The rule must reference the id of the TestScript rule extension.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-ruleset",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-ruleset",
        "short" : "Ruleset used within the test script assert",
        "definition" : "TestScript assert ruleset definition used within TestScript asserts. The ruleset must reference the id of the TestScript ruleset extension.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-stopTestOnFail",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-stopTestOnFail",
        "short" : "Stop Test On Error boolean used within the test script assert",
        "definition" : "TestScript assert stopTestOnFail definition used within TestScript asserts. The stopTestOnFail is a boolean where true forces the current TestScript.test execution to stop and false allows subsequent actions to be evaluated if this assert produces an error.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-variable",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-variable",
        "short" : "Comparison value used within the test script assert",
        "definition" : "TestScript assert variable definition used within the TestScript. The variable defines a direct comparison value to use against the value element value.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.extension",
          "min" : 0,
          "max" : "*"
        },
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-variable"
            ]
          }
        ],
        "condition" : [
          "ele-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"
          },
          {
            "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" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.modifierExtension",
        "path" : "TestScript.setup.action.assert.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](http://hl7.org/fhir/R4/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" : "TestScript.setup.action.assert.label",
        "path" : "TestScript.setup.action.assert.label",
        "short" : "Tracking/logging assertion label",
        "definition" : "The label would be used for tracking/logging purposes by test engines.",
        "comment" : "This has no impact on the verification itself.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.label",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.description",
        "path" : "TestScript.setup.action.assert.description",
        "short" : "Tracking/reporting assertion description",
        "definition" : "The description would be used by test engines for tracking and reporting purposes.",
        "comment" : "This has no impact on the verification itself.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.direction",
        "path" : "TestScript.setup.action.assert.direction",
        "short" : "response | request",
        "definition" : "The direction to use for the assertion.",
        "comment" : "If the direction is specified as \"response\" (the default), then the processing of this assert is against the received response message. If the direction is specified as \"request\", then the processing of this assert is against the sent request message.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.direction",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "AssertionDirectionType"
            }
          ],
          "strength" : "required",
          "description" : "The type of direction to use for assertion.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/assert-direction-codes|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.compareToSourceId",
        "path" : "TestScript.setup.action.assert.compareToSourceId",
        "short" : "Id of the source fixture to be evaluated",
        "definition" : "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.compareToSourceId",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.compareToSourceExpression",
        "path" : "TestScript.setup.action.assert.compareToSourceExpression",
        "short" : "The FHIRPath expression to evaluate against the source fixture",
        "definition" : "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
        "comment" : "Thefhirpath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.compareToSourceExpression",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.compareToSourcePath",
        "path" : "TestScript.setup.action.assert.compareToSourcePath",
        "short" : "XPath or JSONPath expression to evaluate against the source fixture",
        "definition" : "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
        "comment" : "The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.compareToSourcePath",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.contentType",
        "path" : "TestScript.setup.action.assert.contentType",
        "short" : "Mime type to compare against the 'Content-Type' header",
        "definition" : "The mime-type contents to compare against the request or response message 'Content-Type' header.",
        "comment" : "If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value.  If \"assert.sourceId\" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers).  If you'd like to have more control over the string, then use 'assert.headerField' instead.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.contentType",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "code"
          }
        ],
        "example" : [
          {
            "label" : "General",
            "valueCode" : "application/fhir+xml"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "MimeType"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "description" : "The mime type of an attachment. Any valid mime type is allowed.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.expression",
        "path" : "TestScript.setup.action.assert.expression",
        "short" : "The FHIRPath expression to be evaluated",
        "definition" : "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.",
        "comment" : "If both \"expression\" and a \"fixtureId\" are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId.  If \"expression\" is specified and a \"fixtureId\" is not, then the expression will be evaluated against the response body of the last operation.  Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.expression",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.headerField",
        "path" : "TestScript.setup.action.assert.headerField",
        "short" : "HTTP header field name",
        "definition" : "The HTTP header field name e.g. 'Location'.",
        "comment" : "If \"headerField\" is specified then \"value\" must be specified.  If \"sourceId\" is not specified, then \"headerField\" will be evaluated against the last operation's response headers.  Test engines are to keep track of the last operation's response body and response headers.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.headerField",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.minimumId",
        "path" : "TestScript.setup.action.assert.minimumId",
        "short" : "Fixture Id of minimum content resource",
        "definition" : "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.",
        "comment" : "Asserts that the response contains all the element/content in another fixture pointed to by minimumId.  This can be a statically defined fixture or one that is dynamically set via responseId.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.minimumId",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.navigationLinks",
        "path" : "TestScript.setup.action.assert.navigationLinks",
        "short" : "Perform validation on navigation links?",
        "definition" : "Whether or not the test execution performs validation on the bundle navigation links.",
        "comment" : "Asserts that the Bundle contains first, last, and next links.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.navigationLinks",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.operator",
        "path" : "TestScript.setup.action.assert.operator",
        "short" : "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval",
        "definition" : "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.",
        "comment" : "Operators are useful especially for negative testing.  If operator is not specified, then the \"equals\" operator is assumed; e.g. ```<code>   <assert>  <operator value=\"in\" />  <responseCode value=\"200,201,204\" />    </assert>    <assert>  <operator value=\"notEquals\" />  <response value=\"okay\"/>   </assert>    <assert>  <operator value=\"greaterThan\" />    <responseHeader>     <field value=\"Content-Length\" />     <value value=\"0\" />    </responseHeader/>   </assert> </code> ```.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.operator",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "AssertionOperatorType"
            }
          ],
          "strength" : "required",
          "description" : "The type of operator to use for assertion.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/assert-operator-codes|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.path",
        "path" : "TestScript.setup.action.assert.path",
        "short" : "XPath or JSONPath expression",
        "definition" : "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.",
        "comment" : "If both \"path\" and a \"fixtureId\" are specified, then the path will be evaluated against the request or response body mapped to the fixtureId.  If \"path\" is specified and a \"fixtureId\" is not, then the path will be evaluated against the response body of the last operation.  Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.path",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.requestMethod",
        "path" : "TestScript.setup.action.assert.requestMethod",
        "short" : "delete | get | options | patch | post | put | head",
        "definition" : "The request method or HTTP operation code to compare against that used by the client system under test.",
        "comment" : "If \"requestMethod\" is specified then it will be used in place of \"value\". The \"requestMethod\" will evaluate against the last operation's request HTTP operation.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.requestMethod",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptRequestMethodCode"
            }
          ],
          "strength" : "required",
          "description" : "The allowable request method or HTTP operation codes.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/http-operations|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.requestURL",
        "path" : "TestScript.setup.action.assert.requestURL",
        "short" : "Request URL comparison value",
        "definition" : "The value to use in a comparison against the request URL path string.",
        "comment" : "If \"requestURL\" is specified then it will be used in place of \"value\". The \"requestURL\" will evaluate against the last operation's full request URL path string.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.requestURL",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.resource",
        "path" : "TestScript.setup.action.assert.resource",
        "short" : "Resource type",
        "definition" : "The type of the resource.  See http://build.fhir.org/resourcelist.html.",
        "comment" : "This will be expected resource type in response body e.g. in read, vread, search, etc.  See http://build.fhir.org/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value=\"Patient\" </assert>.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.resource",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "FHIRDefinedType"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "description" : "A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/defined-types|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.response",
        "path" : "TestScript.setup.action.assert.response",
        "short" : "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable",
        "definition" : "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.",
        "comment" : "This is a shorter way of achieving similar verifications via \"assert.responseCode\".  If you need more control, then use \"assert.responseCode\"  e.g. <assert>  <contentType value=\"json\" />  <response value=\"okay\"/> </assert>.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.response",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "AssertionResponseTypes"
            }
          ],
          "strength" : "required",
          "description" : "The type of response code to use for assertion.",
          "valueSet" : "http://hl7.org/fhir/ValueSet/assert-response-code-types|4.0.1"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.responseCode",
        "path" : "TestScript.setup.action.assert.responseCode",
        "short" : "HTTP response code to test",
        "definition" : "The value of the HTTP response code to be tested.",
        "comment" : "To be used with \"operator\" attribute value. Asserts that the response code equals this value if \"operator\" is not specified.   If the operator is \"in\" or \"notIn\" then the responseCode would be a comma-separated list of values e.g. \"200,201\". Otherwise, it's expected to be a numeric value.   If \"fixture\" is not specified, then the \"responseBodyId\" value of the last operation is assumed.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.responseCode",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.sourceId",
        "path" : "TestScript.setup.action.assert.sourceId",
        "short" : "Fixture Id of source expression or headerField",
        "definition" : "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.",
        "comment" : "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.sourceId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.validateProfileId",
        "path" : "TestScript.setup.action.assert.validateProfileId",
        "short" : "Profile Id of validation profile reference",
        "definition" : "The ID of the Profile to validate against.",
        "comment" : "The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.validateProfileId",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "id"
          }
        ],
        "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.value",
        "path" : "TestScript.setup.action.assert.value",
        "short" : "The value to compare to",
        "definition" : "The value to compare to.",
        "comment" : "The string-representation of a number, string, or boolean that is expected.  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.value",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.setup.action.assert.warningOnly",
        "path" : "TestScript.setup.action.assert.warningOnly",
        "short" : "Will this assert produce a warning only on error?",
        "definition" : "Whether or not the test execution will produce a warning only on error for this assert.",
        "comment" : "If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding.  There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.assert.warningOnly",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test",
        "path" : "TestScript.test",
        "short" : "A test in this script",
        "definition" : "A test in this script.",
        "min" : 0,
        "max" : "*",
        "base" : {
          "path" : "TestScript.test",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test.id",
        "path" : "TestScript.test.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" : "TestScript.test.extension",
        "path" : "TestScript.test.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" : "TestScript.test.modifierExtension",
        "path" : "TestScript.test.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](http://hl7.org/fhir/R4/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" : "TestScript.test.name",
        "path" : "TestScript.test.name",
        "short" : "Tracking/logging name of this test",
        "definition" : "The name of this test used for tracking/logging purposes by test engines.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.test.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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test.description",
        "path" : "TestScript.test.description",
        "short" : "Tracking/reporting short description of the test",
        "definition" : "A short description of the test used by test engines for tracking and reporting purposes.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.test.description",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test.action",
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString" : "TestAction"
          }
        ],
        "path" : "TestScript.test.action",
        "short" : "A test operation or assert to perform",
        "definition" : "Action would contain either an operation or an assertion.",
        "comment" : "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min" : 1,
        "max" : "*",
        "base" : {
          "path" : "TestScript.test.action",
          "min" : 1,
          "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" : "tst-2",
            "severity" : "error",
            "human" : "Test action SHALL contain either an operation or assert but not both.",
            "expression" : "operation.exists() xor assert.exists()",
            "xpath" : "(f:operation or f:assert) and not(f:operation and f:assert)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test.action.id",
        "path" : "TestScript.test.action.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" : "TestScript.test.action.extension",
        "path" : "TestScript.test.action.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" : "TestScript.test.action.modifierExtension",
        "path" : "TestScript.test.action.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](http://hl7.org/fhir/R4/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" : "TestScript.test.action.operation",
        "path" : "TestScript.test.action.operation",
        "short" : "The setup operation to perform",
        "definition" : "An operation would involve a REST request to a server.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.test.action.operation",
          "min" : 0,
          "max" : "1"
        },
        "contentReference" : "http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation",
        "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" : "tst-8",
            "severity" : "error",
            "human" : "Test operation SHALL contain either sourceId or targetId or params or url.",
            "expression" : "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))",
            "xpath" : "f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "ttt-2",
            "severity" : "error",
            "human" : "HL7 V2 test operation SHALL NOT contain resource or accept or contentType or method or params or requestHeader or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v2' or (resource.count() + accept.count() + contentType.count() + method.count() + params.count() + requestHeader.field.count() + requestHeader.value.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v2' or ((f:resource or f:accept or f:contentType or f:method or f:params or f:requestHeader or f:targetId) and (count(f:resource) + count(f:accept) + count(f:contentType) + count(f:method) + count(f:params) + count(f:requestHeader) + count(f:targetId) = 0))"
          },
          {
            "key" : "ttt-3",
            "severity" : "error",
            "human" : "HL7 V3 test operation SHALL NOT contain resource or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v3' or (resource.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v3' or ((f:resource or f:targetId) and (count(f:resource) + count(f:targetId) = 0))"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.test.action.assert",
        "path" : "TestScript.test.action.assert",
        "short" : "The setup assertion to perform",
        "definition" : "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
        "comment" : "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.test.action.assert",
          "min" : 0,
          "max" : "1"
        },
        "contentReference" : "http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.assert",
        "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" : "tst-6",
            "severity" : "error",
            "human" : "Only a single assertion SHALL be present within test action assert element.",
            "expression" : "extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1)",
            "xpath" : "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId)  <=1",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "tst-11",
            "severity" : "error",
            "human" : "Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.",
            "expression" : "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())",
            "xpath" : "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          },
          {
            "key" : "tst-13",
            "severity" : "error",
            "human" : "Test action assert response and response and responseCode SHALL be empty when direction equals request",
            "expression" : "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'",
            "xpath" : "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.teardown",
        "path" : "TestScript.teardown",
        "short" : "A series of required clean up steps",
        "definition" : "A series of operations required to clean up after all the tests are executed (successfully or otherwise).",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.teardown",
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.teardown.id",
        "path" : "TestScript.teardown.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" : "TestScript.teardown.extension",
        "path" : "TestScript.teardown.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" : "TestScript.teardown.modifierExtension",
        "path" : "TestScript.teardown.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](http://hl7.org/fhir/R4/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" : "TestScript.teardown.action",
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString" : "TeardownAction"
          }
        ],
        "path" : "TestScript.teardown.action",
        "short" : "One or more teardown operations to perform",
        "definition" : "The teardown action will only contain an operation.",
        "comment" : "An action should contain either an operation or an assertion but not both.  It can contain any number of variables.",
        "min" : 1,
        "max" : "*",
        "base" : {
          "path" : "TestScript.teardown.action",
          "min" : 1,
          "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"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      },
      {
        "id" : "TestScript.teardown.action.id",
        "path" : "TestScript.teardown.action.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" : "TestScript.teardown.action.extension",
        "path" : "TestScript.teardown.action.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" : "TestScript.teardown.action.modifierExtension",
        "path" : "TestScript.teardown.action.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](http://hl7.org/fhir/R4/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" : "TestScript.teardown.action.operation",
        "path" : "TestScript.teardown.action.operation",
        "short" : "The teardown operation to perform",
        "definition" : "An operation would involve a REST request to a server.",
        "min" : 1,
        "max" : "1",
        "base" : {
          "path" : "TestScript.teardown.action.operation",
          "min" : 1,
          "max" : "1"
        },
        "contentReference" : "http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation",
        "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" : "tst-9",
            "severity" : "error",
            "human" : "Teardown operation SHALL contain either sourceId or targetId or params or url.",
            "expression" : "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))",
            "xpath" : "f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
            "source" : "http://hl7.org/fhir/StructureDefinition/TestScript"
          }
        ],
        "isModifier" : false,
        "isSummary" : false
      }
    ]
  },
  "differential" : {
    "element" : [
      {
        "id" : "TestScript",
        "path" : "TestScript",
        "short" : "Touchstone Testing TestScript Profile",
        "definition" : "Defines constraints and extensions on the TestScript resource for use in the Touchstone Testing Platform.",
        "mustSupport" : false,
        "isModifier" : false
      },
      {
        "id" : "TestScript.extension:testscript-dynamic-fixture",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-dynamic-fixture",
        "min" : 0,
        "max" : "*",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-dynamic-fixture"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.extension:testscript-rule",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-rule",
        "min" : 0,
        "max" : "*",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.extension:testscript-ruleset",
        "path" : "TestScript.extension",
        "sliceName" : "testscript-ruleset",
        "min" : 0,
        "max" : "*",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-ruleset"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.origin",
        "path" : "TestScript.origin",
        "min" : 0,
        "max" : "*",
        "type" : [
          {
            "code" : "BackboneElement"
          }
        ]
      },
      {
        "id" : "TestScript.origin.profile",
        "path" : "TestScript.origin.profile",
        "short" : "FHIR-Client | FHIR-SDC-FormFiller | CDSH-Client | HL7V2-Client | HL7V3-Client",
        "definition" : "The type of origin profile the test system supports.",
        "comment" : "Must be a \"sender\"/\"client\" profile.",
        "min" : 1,
        "max" : "1",
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptProfileOriginType"
            }
          ],
          "strength" : "extensible",
          "description" : "The type of origin profile the test system supports.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-profile-origin-types"
        }
      },
      {
        "id" : "TestScript.destination",
        "path" : "TestScript.destination",
        "min" : 0,
        "max" : "*",
        "type" : [
          {
            "code" : "BackboneElement"
          }
        ]
      },
      {
        "id" : "TestScript.destination.profile",
        "path" : "TestScript.destination.profile",
        "short" : "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor | CDSH-Server | HL7V2-Server | HL7V3-Server",
        "definition" : "The type of destination profile the test system supports.",
        "comment" : "Must be a \"receiver\"/\"server\" profile.",
        "min" : 1,
        "max" : "1",
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptProfileDestinationType"
            }
          ],
          "strength" : "extensible",
          "description" : "The type of destination profile the test system supports.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-profile-destination-types"
        }
      },
      {
        "id" : "TestScript.variable.extension:testscript-variable-paramField",
        "path" : "TestScript.variable.extension",
        "sliceName" : "testscript-variable-paramField",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-variable-paramField"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.extension:testscript-test-manualCompletion",
        "path" : "TestScript.setup.extension",
        "sliceName" : "testscript-test-manualCompletion",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-test-manualCompletion"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation",
        "path" : "TestScript.setup.action.operation",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "BackboneElement"
          }
        ],
        "constraint" : [
          {
            "key" : "ttt-0",
            "severity" : "error",
            "human" : "HL7 V2 setup operation SHALL NOT contain resource or accept or contentType or method or params or requestHeader or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v2' or (resource.count() + accept.count() + contentType.count() + method.count() + params.count() + requestHeader.field.count() + requestHeader.value.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v2' or ((f:resource or f:accept or f:contentType or f:method or f:params or f:requestHeader or f:targetId) and (count(f:resource) + count(f:accept) + count(f:contentType) + count(f:method) + count(f:params) + count(f:requestHeader) + count(f:targetId) = 0))"
          },
          {
            "key" : "ttt-1",
            "severity" : "error",
            "human" : "HL7 V3 setup operation SHALL NOT contain resource or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v3' or (resource.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v3' or ((f:resource or f:targetId) and (count(f:resource) + count(f:targetId) = 0))"
          }
        ]
      },
      {
        "id" : "TestScript.setup.action.operation.id",
        "path" : "TestScript.setup.action.operation.id",
        "representation" : [
          "xmlAttr"
        ],
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "Element.id",
          "min" : 0,
          "max" : "1"
        }
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-authorizeInNewTab",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-authorizeInNewTab",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-authorizeInNewTab"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-oauth2AuthzRedirectId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-oauth2AuthzRedirectId",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-oauth2AuthzRedirectId"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-oauth2AuthzRequestId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-oauth2AuthzRequestId",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-oauth2AuthzRequestId"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-pagesNext",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-pagesNext",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-pagesNext"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-protocol",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-protocol",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-protocol"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.extension:testscript-operation-smartLaunchRequestId",
        "path" : "TestScript.setup.action.operation.extension",
        "sliceName" : "testscript-operation-smartLaunchRequestId",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-operation-smartLaunchRequestId"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.operation.type",
        "path" : "TestScript.setup.action.operation.type",
        "min" : 0,
        "max" : "1",
        "base" : {
          "path" : "TestScript.setup.action.operation.type",
          "min" : 0,
          "max" : "1"
        },
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "TestScriptOperationCode"
            }
          ],
          "strength" : "extensible",
          "description" : "The allowable operation code types.",
          "valueSet" : "http://touchstone.aegis.net/touchstone/fhir/testing/ValueSet/valueset-testscript-operation-codes"
        }
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-rule",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-rule",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-ruleset",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-ruleset",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-ruleset"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-stopTestOnFail",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-stopTestOnFail",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.setup.action.assert.extension:testscript-assert-variable",
        "path" : "TestScript.setup.action.assert.extension",
        "sliceName" : "testscript-assert-variable",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-variable"
            ]
          }
        ],
        "mustSupport" : true,
        "isModifier" : false
      },
      {
        "id" : "TestScript.test.action.operation",
        "path" : "TestScript.test.action.operation",
        "constraint" : [
          {
            "key" : "ttt-2",
            "severity" : "error",
            "human" : "HL7 V2 test operation SHALL NOT contain resource or accept or contentType or method or params or requestHeader or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v2' or (resource.count() + accept.count() + contentType.count() + method.count() + params.count() + requestHeader.field.count() + requestHeader.value.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v2' or ((f:resource or f:accept or f:contentType or f:method or f:params or f:requestHeader or f:targetId) and (count(f:resource) + count(f:accept) + count(f:contentType) + count(f:method) + count(f:params) + count(f:requestHeader) + count(f:targetId) = 0))"
          },
          {
            "key" : "ttt-3",
            "severity" : "error",
            "human" : "HL7 V3 test operation SHALL NOT contain resource or targetId.",
            "expression" : "type.code.empty() or type.code != 'hl7v3' or (resource.count() + targetId.count() = 0)",
            "xpath" : "f:type/f:code/@value!='hl7v3' or ((f:resource or f:targetId) and (count(f:resource) + count(f:targetId) = 0))"
          }
        ]
      }
    ]
  }
}