FHIR © HL7.org  |  Server Home  |  Health Intersections FHIR Server v1.9.374  |  FHIR Version 3.0.2  | User: ANONYMOUS (Unknown)  

Resource "TestScript" Version "1" (StructureDefinition)

Tags:

XML or JSON representation. Try out the Profile as a questionnaire based web form . Edit this as XML or JSON. provenance for this resource

Generated Narrative with Details

id: TestScript

meta:

url: http://hl7.org/fhir/StructureDefinition/TestScript

name: TestScript

status: draft

date: 10/24/2019 11:53:00 AM

publisher: Health Level Seven International (FHIR Infrastructure)

contact: ,

description: Base StructureDefinition for TestScript Resource

fhirVersion: 3.0.2

kind: resource

abstract: false

type: TestScript

baseDefinition: http://hl7.org/fhir/StructureDefinition/DomainResource

derivation: specialization


<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="TestScript"/>
  <meta>
    <versionId value="1"/>
    <lastUpdated value="2020-11-06T21:32:32.204Z"/>
  </meta>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>Generated Narrative with Details</b>
      </p>
      <p>
        <b>id</b>: TestScript</p>
      <p>
        <b>meta</b>: </p>
      <p>
        <b>url</b>:
        <a href="http://hl7.org/fhir/StructureDefinition/TestScript">http://hl7.org/fhir/StructureDefinition/TestScript</a>
      </p>
      <p>
        <b>name</b>: TestScript</p>
      <p>
        <b>status</b>: draft</p>
      <p>
        <b>date</b>: 10/24/2019 11:53:00 AM</p>
      <p>
        <b>publisher</b>: Health Level Seven International (FHIR Infrastructure)</p>
      <p>
        <b>contact</b>: , </p>
      <p>
        <b>description</b>: Base StructureDefinition for TestScript Resource</p>
      <p>
        <b>fhirVersion</b>: 3.0.2</p>
      <p>
        <b>kind</b>: resource</p>
      <p>
        <b>abstract</b>: false</p>
      <p>
        <b>type</b>: TestScript</p>
      <p>
        <b>baseDefinition</b>:
        <a href="http://hl7.org/fhir/StructureDefinition/DomainResource">http://hl7.org/fhir/StructureDefinition/DomainResource</a>
      </p>
      <p>
        <b>derivation</b>: specialization</p>
    </div>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="2"/>
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir"/>
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/TestScript"/>
  <name value="TestScript"/>
  <status value="draft"/>
  <date value="2019-10-24T11:53:00+11:00"/>
  <publisher value="Health Level Seven International (FHIR Infrastructure)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://hl7.org/fhir"/>
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg/index.cfm"/>
    </telecom>
  </contact>
  <description value="Base StructureDefinition for TestScript Resource"/>
  <fhirVersion value="3.0.2"/>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <mapping>
    <identity value="w5"/>
    <uri value="http://hl7.org/fhir/w5"/>
    <name value="W5 Mapping"/>
  </mapping>
  <mapping>
    <identity value="objimpl"/>
    <uri value="http://hl7.org/fhir/object-implementation"/>
    <name value="Object Implementation Information"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="TestScript"/>
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource">
    <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super">
      <valueString value="MetadataResource"/>
    </extension>
  </baseDefinition>
  <derivation value="specialization"/>
  <snapshot>
    <element id="TestScript">
      <path value="TestScript"/>
      <short value="Describes a set of tests"/>
      <definition value="A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification."/>
      <min value="0"/>
      <max value="*"/>
      <constraint>
        <key value="dom-2"/>
        <severity value="error"/>
        <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
        <expression value="contained.contained.empty()"/>
        <xpath value="not(parent::f:contained and f:contained)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-1"/>
        <severity value="error"/>
        <human value="If the resource is contained in another resource, it SHALL NOT contain any narrative"/>
        <expression value="contained.text.empty()"/>
        <xpath value="not(parent::f:contained and f:text)"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-4"/>
        <severity value="error"/>
        <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
        <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
        <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
        <source value="DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-3"/>
        <severity value="error"/>
        <human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource"/>
        <expression value="contained.where((&apos;#&apos;+id in %resource.descendants().reference).not()).empty()"/>
        <xpath value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat(&apos;#&apos;, $id))]))"/>
        <source value="DomainResource"/>
      </constraint>
      <mapping>
        <identity value="rim"/>
        <map value="Entity. Role, or Act"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="conformance.misc"/>
      </mapping>
    </element>
    <element id="TestScript.id">
      <path value="TestScript.id"/>
      <short value="Logical id of this artifact"/>
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.meta">
      <path value="TestScript.meta"/>
      <short value="Metadata about the resource"/>
      <definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.implicitRules">
      <path value="TestScript.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
      <comment value="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. &#10;&#10;This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&apos;s meaning or interpretation."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.language">
      <path value="TestScript.language"/>
      <short value="Language of the resource content"/>
      <definition value="The base language in which the resource is written."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueReference>
            <reference value="http://hl7.org/fhir/ValueSet/all-languages"/>
          </valueReference>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description value="A human language."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/languages"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.text">
      <path value="TestScript.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition value="A human-readable narrative that contains a summary of the resource, and may 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 &quot;clinically safe&quot; 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 value="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 &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded in formation is added later."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element id="TestScript.contained">
      <path value="TestScript.contained"/>
      <short value="Contained, inline Resources"/>
      <definition value="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 value="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."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.extension">
      <path value="TestScript.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the resource. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.modifierExtension">
      <path value="TestScript.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.url">
      <path value="TestScript.url"/>
      <short value="Logical URI to reference this test script (globally unique)"/>
      <definition value="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions)."/>
      <comment value="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."/>
      <requirements value="Allows the test script to be referenced by a single globally unique identifier."/>
      <alias value="url"/>
      <alias value="authoritative-url"/>
      <alias value="destination"/>
      <alias value="identity"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="uri"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element id="TestScript.identifier">
      <path value="TestScript.identifier"/>
      <short value="Additional identifier for the test script"/>
      <definition value="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 value="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this test script outside of FHIR, where it is not possible to use the logical URI."/>
      <requirements value="Allows externally provided and/or usable business identifiers to be easily associated with the module."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element id="TestScript.version">
      <path value="TestScript.version"/>
      <short value="Business version of the test script"/>
      <definition value="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 value="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 refrence to a particular business version of the test script with the format [url]|[version]."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="id.version"/>
      </mapping>
    </element>
    <element id="TestScript.name">
      <path value="TestScript.name"/>
      <short value="Name for this test script (computer friendly)"/>
      <definition value="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 value="The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly."/>
      <requirements value="Support human navigation and code generation."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.title">
      <path value="TestScript.title"/>
      <short value="Name for this test script (human friendly)"/>
      <definition value="A short, descriptive, user-friendly title for the test script."/>
      <comment value="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.status">
      <path value="TestScript.status"/>
      <short value="draft | active | retired | unknown"/>
      <definition value="The status of this test script. Enables tracking the life-cycle of the content."/>
      <comment value="Allows filtering of test scripts that are appropriate for use vs. not. &#10;This is labeled as &quot;Is Modifier&quot; because applications should not use a retired test script without due consideration."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="PublicationStatus"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="required"/>
        <description value="The lifecycle status of a Value Set or Concept Map."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/publication-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element id="TestScript.experimental">
      <path value="TestScript.experimental"/>
      <short value="For testing purposes, not real usage"/>
      <definition value="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 value="Allows filtering of test script that are appropriate for use vs. not. This is labeled as &quot;Is Modifier&quot; because applications should not use an experimental test script in production."/>
      <requirements value="Enables experimental content to be developed following the same lifecycle that would be used for a production-level test script."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="TestScript.date">
      <path value="TestScript.date"/>
      <short value="Date this was last changed"/>
      <definition value="The date (and optionally time) when the test script was published. The date must change if and 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 value="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 value="Revision Date"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="dateTime"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="when.recorded"/>
      </mapping>
    </element>
    <element id="TestScript.publisher">
      <path value="TestScript.publisher"/>
      <short value="Name of the publisher (organization or individual)"/>
      <definition value="The name of the individual or organization that published the test script."/>
      <comment value="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 value="Helps establish the &quot;authority/credibility&quot; of the test script. May also allow for contact."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="who.witness"/>
      </mapping>
    </element>
    <element id="TestScript.contact">
      <path value="TestScript.contact"/>
      <short value="Contact details for the publisher"/>
      <definition value="Contact details to assist a user in finding and communicating with the publisher."/>
      <comment value="May be a web site, an email address, a telephone number, etc."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="ContactDetail"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.description">
      <path value="TestScript.description"/>
      <short value="Natural language description of the test script"/>
      <definition value="A free text natural language description of the test script from a consumer&apos;s perspective."/>
      <comment value="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 &apos;text&apos; field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created)."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
    </element>
    <element id="TestScript.useContext">
      <path value="TestScript.useContext"/>
      <short value="Context the content is intended to support"/>
      <definition value="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances."/>
      <comment value="When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply."/>
      <requirements value="Assist in searching for appropriate content."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="UsageContext"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.jurisdiction">
      <path value="TestScript.jurisdiction"/>
      <short value="Intended jurisdiction for test script (if applicable)"/>
      <definition value="A legal or geographic region in which the test script is intended to be used."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Jurisdiction"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description value="Countries and regions within which this artifact is targeted for use"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/jurisdiction"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.purpose">
      <path value="TestScript.purpose"/>
      <short value="Why this test script is defined"/>
      <definition value="Explaination of why this test script is needed and why it has been designed as it has."/>
      <comment value="This element does not describe the usage of the test script Instead it provides traceability of &apos;&apos;why&apos;&apos; the resource is either needed or &apos;&apos;why&apos;&apos; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="why"/>
      </mapping>
    </element>
    <element id="TestScript.copyright">
      <path value="TestScript.copyright"/>
      <short value="Use and/or publishing restrictions"/>
      <definition value="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 value="Consumers must be able to determine any legal restrictions on the use of the test script and/or its content."/>
      <alias value="License"/>
      <alias value="Restrictions"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
    </element>
    <element id="TestScript.origin">
      <path value="TestScript.origin"/>
      <short value="An abstract server representing a client or sender in a message exchange"/>
      <definition value="An abstract server used in operations within this test script in the origin element."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.origin.id">
      <path value="TestScript.origin.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.origin.extension">
      <path value="TestScript.origin.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.origin.modifierExtension">
      <path value="TestScript.origin.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.origin.index">
      <path value="TestScript.origin.index"/>
      <short value="The index of the abstract origin server starting at 1"/>
      <definition value="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1."/>
      <comment value="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 and again as FormProcessor within the same script as that could get confusing during test configuration). &#10;&#10;Different 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).&#10;&#10;The origin indices provided elsewhere in the test script must be one of these origin indices."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.origin.profile">
      <path value="TestScript.origin.profile"/>
      <short value="FHIR-Client | FHIR-SDC-FormFiller"/>
      <definition value="The type of origin profile the test system supports."/>
      <comment value="Must be a &quot;sender&quot;/&quot;client&quot; profile."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <meaningWhenMissing value="FHIR-Client"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptProfileOriginType"/>
        </extension>
        <strength value="extensible"/>
        <description value="The type of origin profile the test system supports."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.destination">
      <path value="TestScript.destination"/>
      <short value="An abstract server representing a destination or receiver in a message exchange"/>
      <definition value="An abstract server used in operations within this test script in the destination element."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.destination.id">
      <path value="TestScript.destination.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.destination.extension">
      <path value="TestScript.destination.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.destination.modifierExtension">
      <path value="TestScript.destination.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.destination.index">
      <path value="TestScript.destination.index"/>
      <short value="The index of the abstract destination server starting at 1"/>
      <definition value="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1."/>
      <comment value="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). &#10;&#10;Different 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).&#10;&#10;The destination indices provided elsewhere in the test script must be one of these destination indices."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.destination.profile">
      <path value="TestScript.destination.profile"/>
      <short value="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor"/>
      <definition value="The type of destination profile the test system supports."/>
      <comment value="Must be a &quot;receiver&quot;/&quot;server&quot; profile."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <meaningWhenMissing value="FHIR-Server"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptProfileDestinationType"/>
        </extension>
        <strength value="extensible"/>
        <description value="The type of destination profile the test system supports."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.metadata">
      <path value="TestScript.metadata"/>
      <short value="Required capability that is assumed to function correctly on the FHIR server being tested"/>
      <definition value="The required capability must exist and are assumed to function correctly on the FHIR server being tested."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-4"/>
        <severity value="error"/>
        <human value="TestScript metadata capability SHALL contain required or validated or both."/>
        <expression value="capability.required.exists() or capability.validated.exists()"/>
        <xpath value="f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)"/>
      </constraint>
    </element>
    <element id="TestScript.metadata.id">
      <path value="TestScript.metadata.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.extension">
      <path value="TestScript.metadata.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.modifierExtension">
      <path value="TestScript.metadata.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.link">
      <path value="TestScript.metadata.link"/>
      <short value="Links to the FHIR specification"/>
      <definition value="A link to the FHIR specification that this test is covering."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.metadata.link.id">
      <path value="TestScript.metadata.link.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.link.extension">
      <path value="TestScript.metadata.link.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.link.modifierExtension">
      <path value="TestScript.metadata.link.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.link.url">
      <path value="TestScript.metadata.link.url"/>
      <short value="URL to the specification"/>
      <definition value="URL to a particular requirement or feature within the FHIR specification."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="uri"/>
      </type>
    </element>
    <element id="TestScript.metadata.link.description">
      <path value="TestScript.metadata.link.description"/>
      <short value="Short description"/>
      <definition value="Short description of the link."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability">
      <path value="TestScript.metadata.capability"/>
      <short value="Capabilities that are assumed to function correctly on the FHIR server being tested"/>
      <definition value="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."/>
      <comment value="When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server&apos;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&apos;s conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The &quot;metadata.capabilities.required&quot; and &quot;metadata.capabilities.validated&quot; 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 &quot;metadata.capabilities.validated&quot; flag is true are the primary focus of the test script."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.metadata.capability.id">
      <path value="TestScript.metadata.capability.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.capability.extension">
      <path value="TestScript.metadata.capability.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.capability.modifierExtension">
      <path value="TestScript.metadata.capability.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.metadata.capability.required">
      <path value="TestScript.metadata.capability.required"/>
      <short value="Are the capabilities required?"/>
      <definition value="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.metadata.capability.validated">
      <path value="TestScript.metadata.capability.validated"/>
      <short value="Are the capabilities validated?"/>
      <definition value="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.metadata.capability.description">
      <path value="TestScript.metadata.capability.description"/>
      <short value="The expected capabilities of the server"/>
      <definition value="Description of the capabilities that this test script is requiring the server to support."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.origin">
      <path value="TestScript.metadata.capability.origin"/>
      <short value="Which origin server these requirements apply to"/>
      <definition value="Which origin server these requirements apply to."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.destination">
      <path value="TestScript.metadata.capability.destination"/>
      <short value="Which server these requirements apply to"/>
      <definition value="Which server these requirements apply to."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.link">
      <path value="TestScript.metadata.capability.link"/>
      <short value="Links to the FHIR specification"/>
      <definition value="Links to the FHIR specification that describes this interaction and the resources involved in more detail."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="uri"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.capabilities">
      <path value="TestScript.metadata.capability.capabilities"/>
      <short value="Required Capability Statement"/>
      <definition value="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 value="The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
      </type>
    </element>
    <element id="TestScript.fixture">
      <path value="TestScript.fixture"/>
      <short value="Fixture in the test script - by reference (uri)"/>
      <definition value="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.fixture.id">
      <path value="TestScript.fixture.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.fixture.extension">
      <path value="TestScript.fixture.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.fixture.modifierExtension">
      <path value="TestScript.fixture.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.fixture.autocreate">
      <path value="TestScript.fixture.autocreate"/>
      <short value="Whether or not to implicitly create the fixture during setup"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.fixture.autodelete">
      <path value="TestScript.fixture.autodelete"/>
      <short value="Whether or not to implicitly delete the fixture during teardown"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.fixture.resource">
      <path value="TestScript.fixture.resource"/>
      <short value="Reference of the resource"/>
      <definition value="Reference to the resource (containing the contents of the resource needed for operations)."/>
      <comment value="See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.profile">
      <path value="TestScript.profile"/>
      <short value="Reference of the validation profile"/>
      <definition value="Reference to the profile to be used for validation."/>
      <comment value="See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.variable">
      <path value="TestScript.variable"/>
      <short value="Placeholder for evaluated elements"/>
      <definition value="Variable is set based either on element value in response body or on header field value in the response headers."/>
      <comment value="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 &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; element values during operation calls and in &quot;assert.value&quot; during assertion evaluations. This limits the places that test engines would need to look for placeholders &quot;${}&quot;. Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; element values during operation calls and in &quot;assert.value&quot; during assertion evaluations. See example testscript-search.xml."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-3"/>
        <severity value="error"/>
        <human value="Variable can only contain one of expression, headerField or path."/>
        <expression value="expression.empty() or headerField.empty() or path.empty()"/>
        <xpath value="not(f:expression and f:headerField and f:path)"/>
      </constraint>
    </element>
    <element id="TestScript.variable.id">
      <path value="TestScript.variable.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.variable.extension">
      <path value="TestScript.variable.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.variable.modifierExtension">
      <path value="TestScript.variable.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.variable.name">
      <path value="TestScript.variable.name"/>
      <short value="Descriptive name for this variable"/>
      <definition value="Descriptive name for this variable."/>
      <comment value="Placeholders would contain the variable name wrapped in ${} in &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; elements. These placeholders would need to be replaced by the variable value before the operation is executed."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.defaultValue">
      <path value="TestScript.variable.defaultValue"/>
      <short value="Default, hard-coded, or user-defined value for this variable"/>
      <definition value="A default, hard-coded, or user-defined value for this variable."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.description">
      <path value="TestScript.variable.description"/>
      <short value="Natural language description of the variable"/>
      <definition value="A free text natural language description of the variable and its purpose."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.expression">
      <path value="TestScript.variable.expression"/>
      <short value="The fluentpath expression against the fixture body"/>
      <definition value="The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.headerField">
      <path value="TestScript.variable.headerField"/>
      <short value="HTTP header field name for source"/>
      <definition value="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.hint">
      <path value="TestScript.variable.hint"/>
      <short value="Hint help text for default value to enter"/>
      <definition value="Displayable text string with hint help information to the user when entering a default value."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.path">
      <path value="TestScript.variable.path"/>
      <short value="XPath or JSONPath against the fixture body"/>
      <definition value="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 value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.sourceId">
      <path value="TestScript.variable.sourceId"/>
      <short value="Fixture Id of source expression or headerField within this variable"/>
      <definition value="Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.rule">
      <path value="TestScript.rule"/>
      <short value="Assert rule used within the test script"/>
      <definition value="Assert rule to be used in one or more asserts within the test script."/>
      <comment value="Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is described elsewhere in the TestScript resource."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.rule.id">
      <path value="TestScript.rule.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.rule.extension">
      <path value="TestScript.rule.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.rule.modifierExtension">
      <path value="TestScript.rule.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.rule.resource">
      <path value="TestScript.rule.resource"/>
      <short value="Assert rule resource reference"/>
      <definition value="Reference to the resource (containing the contents of the rule needed for assertions)."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.rule.param">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RuleParam"/>
      </extension>
      <path value="TestScript.rule.param"/>
      <short value="Rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.rule.param.id">
      <path value="TestScript.rule.param.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.rule.param.extension">
      <path value="TestScript.rule.param.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.rule.param.modifierExtension">
      <path value="TestScript.rule.param.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.rule.param.name">
      <path value="TestScript.rule.param.name"/>
      <short value="Parameter name matching external assert rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.rule.param.value">
      <path value="TestScript.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The explicit or dynamic value for the parameter that will be passed on to the external rule template."/>
      <comment value="This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.ruleset">
      <path value="TestScript.ruleset"/>
      <short value="Assert ruleset used within the test script"/>
      <definition value="Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied."/>
      <comment value="Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is described elsewhere in the TestScript resource."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.ruleset.id">
      <path value="TestScript.ruleset.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.extension">
      <path value="TestScript.ruleset.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.modifierExtension">
      <path value="TestScript.ruleset.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.resource">
      <path value="TestScript.ruleset.resource"/>
      <short value="Assert ruleset resource reference"/>
      <definition value="Reference to the resource (containing the contents of the ruleset needed for assertions)."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RulesetRule"/>
      </extension>
      <path value="TestScript.ruleset.rule"/>
      <short value="The referenced rule within the ruleset"/>
      <definition value="The referenced rule within the external ruleset template."/>
      <comment value="This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.ruleset.rule.id">
      <path value="TestScript.ruleset.rule.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.extension">
      <path value="TestScript.ruleset.rule.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.modifierExtension">
      <path value="TestScript.ruleset.rule.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.ruleId">
      <path value="TestScript.ruleset.rule.ruleId"/>
      <short value="Id of referenced rule within the ruleset"/>
      <definition value="Id of the referenced rule within the external ruleset template."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.param">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RulesetRuleParam"/>
      </extension>
      <path value="TestScript.ruleset.rule.param"/>
      <short value="Ruleset rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.ruleset.rule.param.id">
      <path value="TestScript.ruleset.rule.param.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.param.extension">
      <path value="TestScript.ruleset.rule.param.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.param.modifierExtension">
      <path value="TestScript.ruleset.rule.param.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.ruleset.rule.param.name">
      <path value="TestScript.ruleset.rule.param.name"/>
      <short value="Parameter name matching external assert ruleset rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert ruleset rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.param.value">
      <path value="TestScript.ruleset.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The value for the parameter that will be passed on to the external ruleset rule template."/>
      <comment value="This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup">
      <path value="TestScript.setup"/>
      <short value="A series of required setup operations before tests are executed"/>
      <definition value="A series of required setup operations before tests are executed."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.id">
      <path value="TestScript.setup.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.extension">
      <path value="TestScript.setup.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.modifierExtension">
      <path value="TestScript.setup.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="SetupAction"/>
      </extension>
      <path value="TestScript.setup.action"/>
      <short value="A setup operation or assert to perform"/>
      <definition value="Action would contain either an operation or an assertion."/>
      <comment value="An action should contain either an operation or an assertion but not both. It can contain any number of variables."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-1"/>
        <severity value="error"/>
        <human value="Setup action SHALL contain either an operation or assert but not both."/>
        <expression value="operation.exists() xor assert.exists()"/>
        <xpath value="(f:operation or f:assert) and not(f:operation and f:assert)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.id">
      <path value="TestScript.setup.action.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.extension">
      <path value="TestScript.setup.action.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.modifierExtension">
      <path value="TestScript.setup.action.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation">
      <path value="TestScript.setup.action.operation"/>
      <short value="The setup operation to perform"/>
      <definition value="The operation to perform."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-7"/>
        <severity value="error"/>
        <human value="Setup operation SHALL contain either sourceId or targetId or params or url."/>
        <expression value="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in (&apos;capabilities&apos; |&apos;search&apos; | &apos;transaction&apos; | &apos;history&apos;))"/>
        <xpath value="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=&apos;capabilities&apos; or f:type/f:code/@value=&apos;search&apos; or f:type/f:code/@value=&apos;transaction&apos; or f:type/f:code/@value=&apos;history&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.operation.id">
      <path value="TestScript.setup.action.operation.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.extension">
      <path value="TestScript.setup.action.operation.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.modifierExtension">
      <path value="TestScript.setup.action.operation.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.type">
      <path value="TestScript.setup.action.operation.type"/>
      <short value="The operation code type that will be executed"/>
      <definition value="Server interaction or operation type."/>
      <comment value="See http://hl7.org/fhir/STU3/http.html for list of server interactions."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptOperationCode"/>
        </extension>
        <strength value="extensible"/>
        <description value="The allowable operation code types."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-operation-codes"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.resource">
      <path value="TestScript.setup.action.operation.resource"/>
      <short value="Resource type"/>
      <definition value="The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FHIRDefinedType"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="required"/>
        <description value="Either a resource or a data type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/defined-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.label">
      <path value="TestScript.setup.action.operation.label"/>
      <short value="Tracking/logging operation label"/>
      <definition value="The label would be used for tracking/logging purposes by test engines."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.description">
      <path value="TestScript.setup.action.operation.description"/>
      <short value="Tracking/reporting operation description"/>
      <definition value="The description would be used by test engines for tracking and reporting purposes."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.accept">
      <path value="TestScript.setup.action.operation.accept"/>
      <short value="xml | json | ttl | none"/>
      <definition value="The content-type or mime-type to use for RESTful operation in the &apos;Accept&apos; header."/>
      <comment value="If this is specified, then test engine shall set the &apos;Accept&apos; header to the corresponding value. If &apos;xml&apos; is specified, then &apos;Accept&apos; header of &apos;application/fhir+xml&apos; will be set. If &apos;json&apos; is specified, then &apos;application/fhir+json&apos; will be used. If you&apos;d like to explicitly set the &apos;Accept&apos; to some other value then use the &apos;requestHeader&apos; element."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="xml"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContentType"/>
        </extension>
        <strength value="required"/>
        <description value="The content or mime type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/content-type"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.contentType">
      <path value="TestScript.setup.action.operation.contentType"/>
      <short value="xml | json | ttl | none"/>
      <definition value="The content-type or mime-type to use for RESTful operation in the &apos;Content-Type&apos; header."/>
      <comment value="If this is specified, then test engine shall set the &apos;Content-Type&apos; header to the corresponding value. If &apos;xml&apos; is specified, then &apos;Content-Type&apos; header of &apos;application/fhir+xml&apos; will be set. If &apos;json&apos; is specified, then &apos;application/fhir+json&apos; will be used. If you&apos;d like to explicitly set the &apos;Content-Type&apos; to some other value then use the &apos;requestHeader&apos; element."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="xml"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContentType"/>
        </extension>
        <strength value="required"/>
        <description value="The content or mime type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/content-type"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.destination">
      <path value="TestScript.setup.action.operation.destination"/>
      <short value="Server responding to the request"/>
      <definition value="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.encodeRequestUrl">
      <path value="TestScript.setup.action.operation.encodeRequestUrl"/>
      <short value="Whether or not to send the request url in encoded format"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="true"/>
    </element>
    <element id="TestScript.setup.action.operation.origin">
      <path value="TestScript.setup.action.operation.origin"/>
      <short value="Server initiating the request"/>
      <definition value="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.params">
      <path value="TestScript.setup.action.operation.params"/>
      <short value="Explicitly defined path parameters"/>
      <definition value="Path plus parameters after [type]. Used to set parts of the request URL explicitly."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used. Test engines would append whatever is specified for &quot;params&quot; to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The &quot;params&quot; element does not correspond exactly to &quot;search parameters&quot;. Nor is it the &quot;path&quot;. It corresponds to the part of the URL that comes after the [type] (when &quot;resource&quot; element is specified) e.g. It corresponds to &quot;/[id]/_history/[vid] {?_format=[mime-type]}&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader">
      <path value="TestScript.setup.action.operation.requestHeader"/>
      <short value="Each operation can have one or more header elements"/>
      <definition value="Header elements would be used to set HTTP headers."/>
      <comment value="This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - &quot;If-Modified-Since&quot; and &quot;If-None-Match&quot; headers. See http://hl7.org/fhir/STU3/http.html#2.1.0.5.1 - &quot;If-Match&quot; header. See http://hl7.org/fhir/STU3/http.html#2.1.0.11 - Conditional Create using &quot;If-None-Exist&quot;. See http://hl7.org/fhir/STU3/http.html#2.1.0.13.1 - Invalid &quot;Content-Type&quot; header for negative testing. - etc."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.id">
      <path value="TestScript.setup.action.operation.requestHeader.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.extension">
      <path value="TestScript.setup.action.operation.requestHeader.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.modifierExtension">
      <path value="TestScript.setup.action.operation.requestHeader.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.field">
      <path value="TestScript.setup.action.operation.requestHeader.field"/>
      <short value="HTTP header field name"/>
      <definition value="The HTTP header field e.g. &quot;Accept&quot;."/>
      <comment value="If header element is specified, then field is required."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.value">
      <path value="TestScript.setup.action.operation.requestHeader.value"/>
      <short value="HTTP headerfield value"/>
      <definition value="The value of the header e.g. &quot;application/fhir+xml&quot;."/>
      <comment value="If header element is specified, then value is required. No conversions will be done by the test engine e.g. &quot;xml&quot; to &quot;application/fhir+xml&quot;. The values will be set in HTTP headers &quot;as-is&quot;. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestId">
      <path value="TestScript.setup.action.operation.requestId"/>
      <short value="Fixture Id of mapped request"/>
      <definition value="The fixture id (maybe new) to map to the request."/>
      <comment value="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 &quot;requestId&quot;. If requestId is not specified, it is the test engine&apos;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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.responseId">
      <path value="TestScript.setup.action.operation.responseId"/>
      <short value="Fixture Id of mapped response"/>
      <definition value="The fixture id (maybe new) to map to the response."/>
      <comment value="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 &quot;responseId&quot;. If responseId is not specified, it is the test engine&apos;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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.sourceId">
      <path value="TestScript.setup.action.operation.sourceId"/>
      <short value="Fixture Id of body for PUT and POST requests"/>
      <definition value="The id of the fixture used as the body of a PUT or POST request."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.targetId">
      <path value="TestScript.setup.action.operation.targetId"/>
      <short value="Id of fixture used for extracting the [id], [type], and [vid] for GET requests"/>
      <definition value="Id of fixture used for extracting the [id], [type], and [vid] for GET requests."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.url">
      <path value="TestScript.setup.action.operation.url"/>
      <short value="Request URL"/>
      <definition value="Complete request URL."/>
      <comment value="Used to set the request URL explicitly. If &quot;url&quot; element is defined, then &quot;targetId&quot;, &quot;resource&quot;, and &quot;params&quot; elements will be ignored. Test engines would use whatever is specified in &quot;url&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert">
      <path value="TestScript.setup.action.assert"/>
      <short value="The assertion to perform"/>
      <definition value="Evaluates the results of previous operations to determine if the server under test behaves appropriately."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-5"/>
        <severity value="error"/>
        <human value="Only a single assertion SHALL be present within setup action assert element."/>
        <expression value="contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() &lt;=1"/>
        <xpath value="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) &lt;=1"/>
      </constraint>
      <constraint>
        <key value="inv-10"/>
        <severity value="error"/>
        <human value="Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither."/>
        <expression value="compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())"/>
        <xpath value="(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)"/>
      </constraint>
      <constraint>
        <key value="inv-12"/>
        <severity value="error"/>
        <human value="Setup action assert response and responseCode SHALL be empty when direction equals request"/>
        <expression value="(response.empty() and responseCode.empty() and direction = &apos;request&apos;) or direction.empty() or direction = &apos;response&apos;"/>
        <xpath value="((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value=&apos;request&apos;)) or (count(f:direction) = 0) or (f:direction/@value=&apos;response&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.id">
      <path value="TestScript.setup.action.assert.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.extension">
      <path value="TestScript.setup.action.assert.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.modifierExtension">
      <path value="TestScript.setup.action.assert.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.label">
      <path value="TestScript.setup.action.assert.label"/>
      <short value="Tracking/logging assertion label"/>
      <definition value="The label would be used for tracking/logging purposes by test engines."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.description">
      <path value="TestScript.setup.action.assert.description"/>
      <short value="Tracking/reporting assertion description"/>
      <definition value="The description would be used by test engines for tracking and reporting purposes."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.direction">
      <path value="TestScript.setup.action.assert.direction"/>
      <short value="response | request"/>
      <definition value="The direction to use for the assertion."/>
      <comment value="If the direction is specified as &quot;response&quot; (the default), then the processing of this assert is against the received response message. If the direction is specified as &quot;request&quot;, then the processing of this assert is against the sent request message."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AssertionDirectionType"/>
        </extension>
        <strength value="required"/>
        <description value="The type of direction to use for assertion."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/assert-direction-codes"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.compareToSourceId">
      <path value="TestScript.setup.action.assert.compareToSourceId"/>
      <short value="Id of the source fixture to be evaluated"/>
      <definition value="Id of the source fixture used as the contents to be evaluated by either the &quot;source/expression&quot; or &quot;sourceId/path&quot; definition."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.compareToSourceExpression">
      <path value="TestScript.setup.action.assert.compareToSourceExpression"/>
      <short value="The fluentpath expression to evaluate against the source fixture"/>
      <definition value="The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both."/>
      <comment value="Thefhirpath expression to be evaluated against the expected fixture to compare to. Ignored if &quot;assert.value&quot; is used. The evaluation will be done before the assertion is evaluated."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.compareToSourcePath">
      <path value="TestScript.setup.action.assert.compareToSourcePath"/>
      <short value="XPath or JSONPath expression to evaluate against the source fixture"/>
      <definition value="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 value="The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if &quot;assert.value&quot; is used. The evaluation will be done before the assertion is evaluated."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.contentType">
      <path value="TestScript.setup.action.assert.contentType"/>
      <short value="xml | json | ttl | none"/>
      <definition value="The content-type or mime-type to use for RESTful operation in the &apos;Content-Type&apos; header."/>
      <comment value="If this is specified, then test engine shall confirm that the content-type of the last operation&apos;s headers is set to this value. If &quot;assert.sourceId&quot; element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation&apos;s headers). If &apos;xml&apos; is specified, then &apos;Content-Type&apos; header of &apos;application/fhir+xml&apos; will be confirmed. If &apos;json&apos; is specified, then &apos;application/fhir+json&apos; will be used. If you&apos;d like to have more control over the string, then use &apos;assert.headerField&apos; instead."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="xml"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContentType"/>
        </extension>
        <strength value="required"/>
        <description value="The content or mime type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/content-type"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.expression">
      <path value="TestScript.setup.action.assert.expression"/>
      <short value="The fluentpath expression to be evaluated"/>
      <definition value="The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload."/>
      <comment value="If both &quot;expression&quot; and a &quot;fixtureId&quot; are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId. If &quot;expression&quot; is specified and a &quot;fixtureId&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.headerField">
      <path value="TestScript.setup.action.assert.headerField"/>
      <short value="HTTP header field name"/>
      <definition value="The HTTP header field name e.g. &apos;Location&apos;."/>
      <comment value="If &quot;headerField&quot; is specified then &quot;value&quot; must be specified. If &quot;sourceId&quot; is not specified, then &quot;headerField&quot; will be evaluated against the last operation&apos;s response headers. Test engines are to keep track of the last operation&apos;s response body and response headers."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.minimumId">
      <path value="TestScript.setup.action.assert.minimumId"/>
      <short value="Fixture Id of minimum content resource"/>
      <definition value="The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.navigationLinks">
      <path value="TestScript.setup.action.assert.navigationLinks"/>
      <short value="Perform validation on navigation links?"/>
      <definition value="Whether or not the test execution performs validation on the bundle navigation links."/>
      <comment value="Asserts that the Bundle contains first, last, and next links."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.operator">
      <path value="TestScript.setup.action.assert.operator"/>
      <short value="equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval"/>
      <definition value="The operator type defines the conditional behavior of the assert. If not defined, the default is equals."/>
      <comment value="Operators are useful especially for negative testing. If operator is not specified, then the &quot;equals&quot; operator is assumed e.g. &lt;code&gt; &lt;assert&gt; &lt;operator value=&quot;in&quot; /&gt; &lt;responseCode value=&quot;200,201,204&quot; /&gt; &lt;/assert&gt; &lt;assert&gt; &lt;operator value=&quot;notEquals&quot; /&gt; &lt;response value=&quot;okay&quot;/&gt; &lt;/assert&gt; &lt;assert&gt; &lt;operator value=&quot;greaterThan&quot; /&gt; &lt;responseHeader&gt; &lt;field value=&quot;Content-Length&quot; /&gt; &lt;value value=&quot;0&quot; /&gt; &lt;responseHeader/&gt; &lt;/assert&gt; &lt;/code&gt;."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AssertionOperatorType"/>
        </extension>
        <strength value="required"/>
        <description value="The type of operator to use for assertion."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/assert-operator-codes"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.path">
      <path value="TestScript.setup.action.assert.path"/>
      <short value="XPath or JSONPath expression"/>
      <definition value="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server."/>
      <comment value="If both &quot;path&quot; and a &quot;fixtureId&quot; are specified, then the path will be evaluated against the request or response body mapped to the fixtureId. If &quot;path&quot; is specified and a &quot;fixtureId&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.requestMethod">
      <path value="TestScript.setup.action.assert.requestMethod"/>
      <short value="delete | get | options | patch | post | put"/>
      <definition value="The request method or HTTP operation code to compare against that used by the client system under test."/>
      <comment value="If &quot;requestMethod&quot; is specified then it will be used in place of &quot;value&quot;. The &quot;requestMethod&quot; will evaluate against the last operation&apos;s request HTTP operation."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptRequestMethodCode"/>
        </extension>
        <strength value="required"/>
        <description value="The allowable request method or HTTP operation codes."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/http-operations"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.requestURL">
      <path value="TestScript.setup.action.assert.requestURL"/>
      <short value="Request URL comparison value"/>
      <definition value="The value to use in a comparison against the request URL path string."/>
      <comment value="If &quot;requestURL&quot; is specified then it will be used in place of &quot;value&quot;. The &quot;requestURL&quot; will evaluate against the last operation&apos;s full request URL path string."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.resource">
      <path value="TestScript.setup.action.assert.resource"/>
      <short value="Resource type"/>
      <definition value="The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html."/>
      <comment value="This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types e.g. &lt;assert &gt; &lt;resourceType value=&quot;Patient&quot; &lt;/assert&gt;."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FHIRDefinedType"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="required"/>
        <description value="Either a resource or a data type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/defined-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.response">
      <path value="TestScript.setup.action.assert.response"/>
      <short value="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable"/>
      <definition value="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable."/>
      <comment value="This is a shorter way of achieving similar verifications via &quot;assert.responseCode&quot;. If you need more control, then use &quot;assert.responseCode&quot; e.g. &lt;assert&gt; &lt;contentType value=&quot;json&quot; /&gt; &lt;response value=&quot;okay&quot;/&gt; &lt;/assert&gt;."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AssertionResponseTypes"/>
        </extension>
        <strength value="required"/>
        <description value="The type of response code to use for assertion."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/assert-response-code-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.assert.responseCode">
      <path value="TestScript.setup.action.assert.responseCode"/>
      <short value="HTTP response code to test"/>
      <definition value="The value of the HTTP response code to be tested."/>
      <comment value="To be used with &quot;operator&quot; attribute value. Asserts that the response code equals this value if &quot;operator&quot; is not specified. If the operator is &quot;in&quot; or &quot;notIn&quot; then the responseCode would be a comma-separated list of values e.g. &quot;200,201&quot;. Otherwise, it&apos;s expected to be a numeric value. If &quot;fixture&quot; is not specified, then the &quot;responseBodyId&quot; value of the last operation is assumed."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.rule">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="ActionAssertRule"/>
      </extension>
      <path value="TestScript.setup.action.assert.rule"/>
      <short value="The reference to a TestScript.rule"/>
      <definition value="The TestScript.rule this assert will evaluate."/>
      <comment value="Each rule should get evaluated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.rule.id">
      <path value="TestScript.setup.action.assert.rule.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.extension">
      <path value="TestScript.setup.action.assert.rule.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.modifierExtension">
      <path value="TestScript.setup.action.assert.rule.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.ruleId">
      <path value="TestScript.setup.action.assert.rule.ruleId"/>
      <short value="Id of the TestScript.rule"/>
      <definition value="The TestScript.rule id value this assert will evaluate."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.rule.param">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="ActionAssertRuleParam"/>
      </extension>
      <path value="TestScript.setup.action.assert.rule.param"/>
      <short value="Rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.rule.param.id">
      <path value="TestScript.setup.action.assert.rule.param.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.param.extension">
      <path value="TestScript.setup.action.assert.rule.param.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.param.modifierExtension">
      <path value="TestScript.setup.action.assert.rule.param.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.rule.param.name">
      <path value="TestScript.setup.action.assert.rule.param.name"/>
      <short value="Parameter name matching external assert rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.rule.param.value">
      <path value="TestScript.setup.action.assert.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The value for the parameter that will be passed on to the external rule template."/>
      <comment value="This value overwrites the value (if any) specified in TestScript.rule.param.value. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.ruleset">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="ActionAssertRuleset"/>
      </extension>
      <path value="TestScript.setup.action.assert.ruleset"/>
      <short value="The reference to a TestScript.ruleset"/>
      <definition value="The TestScript.ruleset this assert will evaluate."/>
      <comment value="Each rule within a ruleset should get evaluated by test engines as a separate assertion. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. If the first rule within the ruleset results in a failed assertion, then test engines do not have to evaluate the rest of the rules within the ruleset."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.id">
      <path value="TestScript.setup.action.assert.ruleset.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.extension">
      <path value="TestScript.setup.action.assert.ruleset.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.modifierExtension">
      <path value="TestScript.setup.action.assert.ruleset.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rulesetId">
      <path value="TestScript.setup.action.assert.ruleset.rulesetId"/>
      <short value="Id of the TestScript.ruleset"/>
      <definition value="The TestScript.ruleset id value this assert will evaluate."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="ActionAssertRulesetRule"/>
      </extension>
      <path value="TestScript.setup.action.assert.ruleset.rule"/>
      <short value="The referenced rule within the ruleset"/>
      <definition value="The referenced rule within the external ruleset template."/>
      <comment value="This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.id">
      <path value="TestScript.setup.action.assert.ruleset.rule.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.extension">
      <path value="TestScript.setup.action.assert.ruleset.rule.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.modifierExtension">
      <path value="TestScript.setup.action.assert.ruleset.rule.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.ruleId">
      <path value="TestScript.setup.action.assert.ruleset.rule.ruleId"/>
      <short value="Id of referenced rule within the ruleset"/>
      <definition value="Id of the referenced rule within the external ruleset template."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param">
      <path value="TestScript.setup.action.assert.ruleset.rule.param"/>
      <short value="Rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param.id">
      <path value="TestScript.setup.action.assert.ruleset.rule.param.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param.extension">
      <path value="TestScript.setup.action.assert.ruleset.rule.param.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param.modifierExtension">
      <path value="TestScript.setup.action.assert.ruleset.rule.param.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param.name">
      <path value="TestScript.setup.action.assert.ruleset.rule.param.name"/>
      <short value="Parameter name matching external assert ruleset rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert ruleset rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.ruleset.rule.param.value">
      <path value="TestScript.setup.action.assert.ruleset.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The value for the parameter that will be passed on to the external ruleset rule template."/>
      <comment value="This value overwrites the value (if any) specified in TestScript.ruleset.rule.param.value. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.sourceId">
      <path value="TestScript.setup.action.assert.sourceId"/>
      <short value="Fixture Id of source expression or headerField"/>
      <definition value="Fixture to evaluate the XPath/JSONPath expression or the headerField against."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.validateProfileId">
      <path value="TestScript.setup.action.assert.validateProfileId"/>
      <short value="Profile Id of validation profile reference"/>
      <definition value="The ID of the Profile to validate against."/>
      <comment value="The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.value">
      <path value="TestScript.setup.action.assert.value"/>
      <short value="The value to compare to"/>
      <definition value="The value to compare to."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.warningOnly">
      <path value="TestScript.setup.action.assert.warningOnly"/>
      <short value="Will this assert produce a warning only on error?"/>
      <definition value="Whether or not the test execution will produce a warning only on error for this assert."/>
      <comment value="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&#x2019;t do it, we could choose to issue a warning."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.test">
      <path value="TestScript.test"/>
      <short value="A test in this script"/>
      <definition value="A test in this script."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.test.id">
      <path value="TestScript.test.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.test.extension">
      <path value="TestScript.test.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.test.modifierExtension">
      <path value="TestScript.test.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.test.name">
      <path value="TestScript.test.name"/>
      <short value="Tracking/logging name of this test"/>
      <definition value="The name of this test used for tracking/logging purposes by test engines."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.test.description">
      <path value="TestScript.test.description"/>
      <short value="Tracking/reporting short description of the test"/>
      <definition value="A short description of the test used by test engines for tracking and reporting purposes."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.test.action">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="TestAction"/>
      </extension>
      <path value="TestScript.test.action"/>
      <short value="A test operation or assert to perform"/>
      <definition value="Action would contain either an operation or an assertion."/>
      <comment value="An action should contain either an operation or an assertion but not both. It can contain any number of variables."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
      <constraint>
        <key value="inv-2"/>
        <severity value="error"/>
        <human value="Test action SHALL contain either an operation or assert but not both."/>
        <expression value="operation.exists() xor assert.exists()"/>
        <xpath value="(f:operation or f:assert) and not(f:operation and f:assert)"/>
      </constraint>
    </element>
    <element id="TestScript.test.action.id">
      <path value="TestScript.test.action.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.test.action.extension">
      <path value="TestScript.test.action.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.test.action.modifierExtension">
      <path value="TestScript.test.action.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.test.action.operation">
      <path value="TestScript.test.action.operation"/>
      <short value="The setup operation to perform"/>
      <definition value="An operation would involve a REST request to a server."/>
      <min value="0"/>
      <max value="1"/>
      <contentReference value="#TestScript.setup.action.operation"/>
      <constraint>
        <key value="inv-8"/>
        <severity value="error"/>
        <human value="Test operation SHALL contain either sourceId or targetId or params or url."/>
        <expression value="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in (&apos;capabilities&apos; | &apos;search&apos; | &apos;transaction&apos; | &apos;history&apos;))"/>
        <xpath value="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=&apos;capabilities&apos; or f:type/f:code/@value=&apos;search&apos; or f:type/f:code/@value=&apos;transaction&apos; or f:type/f:code/@value=&apos;history&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.test.action.assert">
      <path value="TestScript.test.action.assert"/>
      <short value="The setup assertion to perform"/>
      <definition value="Evaluates the results of previous operations to determine if the server under test behaves appropriately."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <contentReference value="#TestScript.setup.action.assert"/>
      <constraint>
        <key value="inv-6"/>
        <severity value="error"/>
        <human value="Only a single assertion SHALL be present within test action assert element."/>
        <expression value="contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() &lt;=1"/>
        <xpath value="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) &lt;=1"/>
      </constraint>
      <constraint>
        <key value="inv-11"/>
        <severity value="error"/>
        <human value="Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither."/>
        <expression value="compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())"/>
        <xpath value="(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)"/>
      </constraint>
      <constraint>
        <key value="inv-13"/>
        <severity value="error"/>
        <human value="Test action assert response and response and responseCode SHALL be empty when direction equals request"/>
        <expression value="(response.empty() and responseCode.empty() and direction = &apos;request&apos;) or direction.empty() or direction = &apos;response&apos;"/>
        <xpath value="((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value=&apos;request&apos;)) or (count(f:direction) = 0) or (f:direction/@value=&apos;response&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.teardown">
      <path value="TestScript.teardown"/>
      <short value="A series of required clean up steps"/>
      <definition value="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.teardown.id">
      <path value="TestScript.teardown.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.extension">
      <path value="TestScript.teardown.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.modifierExtension">
      <path value="TestScript.teardown.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.action">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="TeardownAction"/>
      </extension>
      <path value="TestScript.teardown.action"/>
      <short value="One or more teardown operations to perform"/>
      <definition value="The teardown action will only contain an operation."/>
      <comment value="An action should contain either an operation or an assertion but not both. It can contain any number of variables."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression value="hasValue() | (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="Element"/>
      </constraint>
    </element>
    <element id="TestScript.teardown.action.id">
      <path value="TestScript.teardown.action.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.action.extension">
      <path value="TestScript.teardown.action.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.action.modifierExtension">
      <path value="TestScript.teardown.action.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="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 that contains it. Usually modifier elements provide negation or qualification. In order 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."/>
      <comment value="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 value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="TestScript.teardown.action.operation">
      <path value="TestScript.teardown.action.operation"/>
      <short value="The teardown operation to perform"/>
      <definition value="An operation would involve a REST request to a server."/>
      <min value="1"/>
      <max value="1"/>
      <contentReference value="#TestScript.setup.action.operation"/>
      <constraint>
        <key value="inv-9"/>
        <severity value="error"/>
        <human value="Teardown operation SHALL contain either sourceId or targetId or params or url."/>
        <expression value="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in (&apos;capabilities&apos; | &apos;search&apos; | &apos;transaction&apos; | &apos;history&apos;))"/>
        <xpath value="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=&apos;capabilities&apos; or f:type/f:code/@value=&apos;search&apos; or f:type/f:code/@value=&apos;transaction&apos; or f:type/f:code/@value=&apos;history&apos;)"/>
      </constraint>
    </element>
  </snapshot>
  <differential>
    <element id="TestScript">
      <path value="TestScript"/>
      <short value="Describes a set of tests"/>
      <definition value="A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification."/>
      <min value="0"/>
      <max value="*"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="conformance.misc"/>
      </mapping>
    </element>
    <element id="TestScript.url">
      <path value="TestScript.url"/>
      <short value="Logical URI to reference this test script (globally unique)"/>
      <definition value="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions)."/>
      <comment value="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."/>
      <requirements value="Allows the test script to be referenced by a single globally unique identifier."/>
      <alias value="url"/>
      <alias value="authoritative-url"/>
      <alias value="destination"/>
      <alias value="identity"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="uri"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element id="TestScript.identifier">
      <path value="TestScript.identifier"/>
      <short value="Additional identifier for the test script"/>
      <definition value="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 value="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this test script outside of FHIR, where it is not possible to use the logical URI."/>
      <requirements value="Allows externally provided and/or usable business identifiers to be easily associated with the module."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element id="TestScript.version">
      <path value="TestScript.version"/>
      <short value="Business version of the test script"/>
      <definition value="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 value="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 refrence to a particular business version of the test script with the format [url]|[version]."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="id.version"/>
      </mapping>
    </element>
    <element id="TestScript.name">
      <path value="TestScript.name"/>
      <short value="Name for this test script (computer friendly)"/>
      <definition value="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 value="The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly."/>
      <requirements value="Support human navigation and code generation."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.title">
      <path value="TestScript.title"/>
      <short value="Name for this test script (human friendly)"/>
      <definition value="A short, descriptive, user-friendly title for the test script."/>
      <comment value="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.status">
      <path value="TestScript.status"/>
      <short value="draft | active | retired | unknown"/>
      <definition value="The status of this test script. Enables tracking the life-cycle of the content."/>
      <comment value="Allows filtering of test scripts that are appropriate for use vs. not. &#10;This is labeled as &quot;Is Modifier&quot; because applications should not use a retired test script without due consideration."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="PublicationStatus"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="required"/>
        <description value="The lifecycle status of a Value Set or Concept Map."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/publication-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element id="TestScript.experimental">
      <path value="TestScript.experimental"/>
      <short value="For testing purposes, not real usage"/>
      <definition value="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 value="Allows filtering of test script that are appropriate for use vs. not. This is labeled as &quot;Is Modifier&quot; because applications should not use an experimental test script in production."/>
      <requirements value="Enables experimental content to be developed following the same lifecycle that would be used for a production-level test script."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="class"/>
      </mapping>
    </element>
    <element id="TestScript.date">
      <path value="TestScript.date"/>
      <short value="Date this was last changed"/>
      <definition value="The date (and optionally time) when the test script was published. The date must change if and 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 value="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 value="Revision Date"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="dateTime"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="when.recorded"/>
      </mapping>
    </element>
    <element id="TestScript.publisher">
      <path value="TestScript.publisher"/>
      <short value="Name of the publisher (organization or individual)"/>
      <definition value="The name of the individual or organization that published the test script."/>
      <comment value="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 value="Helps establish the &quot;authority/credibility&quot; of the test script. May also allow for contact."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="w5"/>
        <map value="who.witness"/>
      </mapping>
    </element>
    <element id="TestScript.contact">
      <path value="TestScript.contact"/>
      <short value="Contact details for the publisher"/>
      <definition value="Contact details to assist a user in finding and communicating with the publisher."/>
      <comment value="May be a web site, an email address, a telephone number, etc."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="ContactDetail"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.description">
      <path value="TestScript.description"/>
      <short value="Natural language description of the test script"/>
      <definition value="A free text natural language description of the test script from a consumer&apos;s perspective."/>
      <comment value="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 &apos;text&apos; field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created)."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
    </element>
    <element id="TestScript.useContext">
      <path value="TestScript.useContext"/>
      <short value="Context the content is intended to support"/>
      <definition value="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances."/>
      <comment value="When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply."/>
      <requirements value="Assist in searching for appropriate content."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="UsageContext"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element id="TestScript.jurisdiction">
      <path value="TestScript.jurisdiction"/>
      <short value="Intended jurisdiction for test script (if applicable)"/>
      <definition value="A legal or geographic region in which the test script is intended to be used."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Jurisdiction"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="extensible"/>
        <description value="Countries and regions within which this artifact is targeted for use"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/jurisdiction"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.purpose">
      <path value="TestScript.purpose"/>
      <short value="Why this test script is defined"/>
      <definition value="Explaination of why this test script is needed and why it has been designed as it has."/>
      <comment value="This element does not describe the usage of the test script Instead it provides traceability of &apos;&apos;why&apos;&apos; the resource is either needed or &apos;&apos;why&apos;&apos; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="why"/>
      </mapping>
    </element>
    <element id="TestScript.copyright">
      <path value="TestScript.copyright"/>
      <short value="Use and/or publishing restrictions"/>
      <definition value="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 value="Consumers must be able to determine any legal restrictions on the use of the test script and/or its content."/>
      <alias value="License"/>
      <alias value="Restrictions"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="markdown"/>
      </type>
      <mapping>
        <identity value="objimpl"/>
        <map value="no-gen-base"/>
      </mapping>
    </element>
    <element id="TestScript.origin">
      <path value="TestScript.origin"/>
      <short value="An abstract server representing a client or sender in a message exchange"/>
      <definition value="An abstract server used in operations within this test script in the origin element."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.origin.index">
      <path value="TestScript.origin.index"/>
      <short value="The index of the abstract origin server starting at 1"/>
      <definition value="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1."/>
      <comment value="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 and again as FormProcessor within the same script as that could get confusing during test configuration). &#10;&#10;Different 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).&#10;&#10;The origin indices provided elsewhere in the test script must be one of these origin indices."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.origin.profile">
      <path value="TestScript.origin.profile"/>
      <short value="FHIR-Client | FHIR-SDC-FormFiller"/>
      <definition value="The type of origin profile the test system supports."/>
      <comment value="Must be a &quot;sender&quot;/&quot;client&quot; profile."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <meaningWhenMissing value="FHIR-Client"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptProfileOriginType"/>
        </extension>
        <strength value="extensible"/>
        <description value="The type of origin profile the test system supports."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.destination">
      <path value="TestScript.destination"/>
      <short value="An abstract server representing a destination or receiver in a message exchange"/>
      <definition value="An abstract server used in operations within this test script in the destination element."/>
      <comment value="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 value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.destination.index">
      <path value="TestScript.destination.index"/>
      <short value="The index of the abstract destination server starting at 1"/>
      <definition value="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1."/>
      <comment value="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). &#10;&#10;Different 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).&#10;&#10;The destination indices provided elsewhere in the test script must be one of these destination indices."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.destination.profile">
      <path value="TestScript.destination.profile"/>
      <short value="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor"/>
      <definition value="The type of destination profile the test system supports."/>
      <comment value="Must be a &quot;receiver&quot;/&quot;server&quot; profile."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <meaningWhenMissing value="FHIR-Server"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptProfileDestinationType"/>
        </extension>
        <strength value="extensible"/>
        <description value="The type of destination profile the test system supports."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.metadata">
      <path value="TestScript.metadata"/>
      <short value="Required capability that is assumed to function correctly on the FHIR server being tested"/>
      <definition value="The required capability must exist and are assumed to function correctly on the FHIR server being tested."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="inv-4"/>
        <severity value="error"/>
        <human value="TestScript metadata capability SHALL contain required or validated or both."/>
        <expression value="capability.required.exists() or capability.validated.exists()"/>
        <xpath value="f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)"/>
      </constraint>
    </element>
    <element id="TestScript.metadata.link">
      <path value="TestScript.metadata.link"/>
      <short value="Links to the FHIR specification"/>
      <definition value="A link to the FHIR specification that this test is covering."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.metadata.link.url">
      <path value="TestScript.metadata.link.url"/>
      <short value="URL to the specification"/>
      <definition value="URL to a particular requirement or feature within the FHIR specification."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="uri"/>
      </type>
    </element>
    <element id="TestScript.metadata.link.description">
      <path value="TestScript.metadata.link.description"/>
      <short value="Short description"/>
      <definition value="Short description of the link."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability">
      <path value="TestScript.metadata.capability"/>
      <short value="Capabilities that are assumed to function correctly on the FHIR server being tested"/>
      <definition value="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."/>
      <comment value="When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server&apos;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&apos;s conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The &quot;metadata.capabilities.required&quot; and &quot;metadata.capabilities.validated&quot; 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 &quot;metadata.capabilities.validated&quot; flag is true are the primary focus of the test script."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.required">
      <path value="TestScript.metadata.capability.required"/>
      <short value="Are the capabilities required?"/>
      <definition value="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.metadata.capability.validated">
      <path value="TestScript.metadata.capability.validated"/>
      <short value="Are the capabilities validated?"/>
      <definition value="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.metadata.capability.description">
      <path value="TestScript.metadata.capability.description"/>
      <short value="The expected capabilities of the server"/>
      <definition value="Description of the capabilities that this test script is requiring the server to support."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.origin">
      <path value="TestScript.metadata.capability.origin"/>
      <short value="Which origin server these requirements apply to"/>
      <definition value="Which origin server these requirements apply to."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.destination">
      <path value="TestScript.metadata.capability.destination"/>
      <short value="Which server these requirements apply to"/>
      <definition value="Which server these requirements apply to."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.link">
      <path value="TestScript.metadata.capability.link"/>
      <short value="Links to the FHIR specification"/>
      <definition value="Links to the FHIR specification that describes this interaction and the resources involved in more detail."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="uri"/>
      </type>
    </element>
    <element id="TestScript.metadata.capability.capabilities">
      <path value="TestScript.metadata.capability.capabilities"/>
      <short value="Required Capability Statement"/>
      <definition value="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 value="The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
      </type>
    </element>
    <element id="TestScript.fixture">
      <path value="TestScript.fixture"/>
      <short value="Fixture in the test script - by reference (uri)"/>
      <definition value="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.fixture.autocreate">
      <path value="TestScript.fixture.autocreate"/>
      <short value="Whether or not to implicitly create the fixture during setup"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.fixture.autodelete">
      <path value="TestScript.fixture.autodelete"/>
      <short value="Whether or not to implicitly delete the fixture during teardown"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="false"/>
    </element>
    <element id="TestScript.fixture.resource">
      <path value="TestScript.fixture.resource"/>
      <short value="Reference of the resource"/>
      <definition value="Reference to the resource (containing the contents of the resource needed for operations)."/>
      <comment value="See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.profile">
      <path value="TestScript.profile"/>
      <short value="Reference of the validation profile"/>
      <definition value="Reference to the profile to be used for validation."/>
      <comment value="See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.variable">
      <path value="TestScript.variable"/>
      <short value="Placeholder for evaluated elements"/>
      <definition value="Variable is set based either on element value in response body or on header field value in the response headers."/>
      <comment value="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 &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; element values during operation calls and in &quot;assert.value&quot; during assertion evaluations. This limits the places that test engines would need to look for placeholders &quot;${}&quot;. Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; element values during operation calls and in &quot;assert.value&quot; during assertion evaluations. See example testscript-search.xml."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="inv-3"/>
        <severity value="error"/>
        <human value="Variable can only contain one of expression, headerField or path."/>
        <expression value="expression.empty() or headerField.empty() or path.empty()"/>
        <xpath value="not(f:expression and f:headerField and f:path)"/>
      </constraint>
    </element>
    <element id="TestScript.variable.name">
      <path value="TestScript.variable.name"/>
      <short value="Descriptive name for this variable"/>
      <definition value="Descriptive name for this variable."/>
      <comment value="Placeholders would contain the variable name wrapped in ${} in &quot;operation.params&quot;, &quot;operation.requestHeader.value&quot;, and &quot;operation.url&quot; elements. These placeholders would need to be replaced by the variable value before the operation is executed."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.defaultValue">
      <path value="TestScript.variable.defaultValue"/>
      <short value="Default, hard-coded, or user-defined value for this variable"/>
      <definition value="A default, hard-coded, or user-defined value for this variable."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.description">
      <path value="TestScript.variable.description"/>
      <short value="Natural language description of the variable"/>
      <definition value="A free text natural language description of the variable and its purpose."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.expression">
      <path value="TestScript.variable.expression"/>
      <short value="The fluentpath expression against the fixture body"/>
      <definition value="The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.headerField">
      <path value="TestScript.variable.headerField"/>
      <short value="HTTP header field name for source"/>
      <definition value="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.hint">
      <path value="TestScript.variable.hint"/>
      <short value="Hint help text for default value to enter"/>
      <definition value="Displayable text string with hint help information to the user when entering a default value."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.path">
      <path value="TestScript.variable.path"/>
      <short value="XPath or JSONPath against the fixture body"/>
      <definition value="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 value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.variable.sourceId">
      <path value="TestScript.variable.sourceId"/>
      <short value="Fixture Id of source expression or headerField within this variable"/>
      <definition value="Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.rule">
      <path value="TestScript.rule"/>
      <short value="Assert rule used within the test script"/>
      <definition value="Assert rule to be used in one or more asserts within the test script."/>
      <comment value="Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is described elsewhere in the TestScript resource."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.rule.resource">
      <path value="TestScript.rule.resource"/>
      <short value="Assert rule resource reference"/>
      <definition value="Reference to the resource (containing the contents of the rule needed for assertions)."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.rule.param">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RuleParam"/>
      </extension>
      <path value="TestScript.rule.param"/>
      <short value="Rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.rule.param.name">
      <path value="TestScript.rule.param.name"/>
      <short value="Parameter name matching external assert rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.rule.param.value">
      <path value="TestScript.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The explicit or dynamic value for the parameter that will be passed on to the external rule template."/>
      <comment value="This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.ruleset">
      <path value="TestScript.ruleset"/>
      <short value="Assert ruleset used within the test script"/>
      <definition value="Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied."/>
      <comment value="Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is described elsewhere in the TestScript resource."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.ruleset.resource">
      <path value="TestScript.ruleset.resource"/>
      <short value="Assert ruleset resource reference"/>
      <definition value="Reference to the resource (containing the contents of the ruleset needed for assertions)."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RulesetRule"/>
      </extension>
      <path value="TestScript.ruleset.rule"/>
      <short value="The referenced rule within the ruleset"/>
      <definition value="The referenced rule within the external ruleset template."/>
      <comment value="This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.ruleId">
      <path value="TestScript.ruleset.rule.ruleId"/>
      <short value="Id of referenced rule within the ruleset"/>
      <definition value="Id of the referenced rule within the external ruleset template."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.param">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="RulesetRuleParam"/>
      </extension>
      <path value="TestScript.ruleset.rule.param"/>
      <short value="Ruleset rule parameter template"/>
      <definition value="Each rule template can take one or more parameters for rule evaluation."/>
      <comment value="The parameter value can be dynamic at runtime."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.param.name">
      <path value="TestScript.ruleset.rule.param.name"/>
      <short value="Parameter name matching external assert ruleset rule parameter"/>
      <definition value="Descriptive name for this parameter that matches the external assert ruleset rule parameter name."/>
      <comment value="The external rule template would be looking for the parameter by this name."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.ruleset.rule.param.value">
      <path value="TestScript.ruleset.rule.param.value"/>
      <short value="Parameter value defined either explicitly or dynamically"/>
      <definition value="The value for the parameter that will be passed on to the external ruleset rule template."/>
      <comment value="This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a 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 supplying this value to the external rule template."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup">
      <path value="TestScript.setup"/>
      <short value="A series of required setup operations before tests are executed"/>
      <definition value="A series of required setup operations before tests are executed."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.setup.action">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
        <valueString value="SetupAction"/>
      </extension>
      <path value="TestScript.setup.action"/>
      <short value="A setup operation or assert to perform"/>
      <definition value="Action would contain either an operation or an assertion."/>
      <comment value="An action should contain either an operation or an assertion but not both. It can contain any number of variables."/>
      <min value="1"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="inv-1"/>
        <severity value="error"/>
        <human value="Setup action SHALL contain either an operation or assert but not both."/>
        <expression value="operation.exists() xor assert.exists()"/>
        <xpath value="(f:operation or f:assert) and not(f:operation and f:assert)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.operation">
      <path value="TestScript.setup.action.operation"/>
      <short value="The setup operation to perform"/>
      <definition value="The operation to perform."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="inv-7"/>
        <severity value="error"/>
        <human value="Setup operation SHALL contain either sourceId or targetId or params or url."/>
        <expression value="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in (&apos;capabilities&apos; |&apos;search&apos; | &apos;transaction&apos; | &apos;history&apos;))"/>
        <xpath value="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=&apos;capabilities&apos; or f:type/f:code/@value=&apos;search&apos; or f:type/f:code/@value=&apos;transaction&apos; or f:type/f:code/@value=&apos;history&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.operation.type">
      <path value="TestScript.setup.action.operation.type"/>
      <short value="The operation code type that will be executed"/>
      <definition value="Server interaction or operation type."/>
      <comment value="See http://hl7.org/fhir/STU3/http.html for list of server interactions."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Coding"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="TestScriptOperationCode"/>
        </extension>
        <strength value="extensible"/>
        <description value="The allowable operation code types."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/testscript-operation-codes"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.resource">
      <path value="TestScript.setup.action.operation.resource"/>
      <short value="Resource type"/>
      <definition value="The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FHIRDefinedType"/>
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true"/>
        </extension>
        <strength value="required"/>
        <description value="Either a resource or a data type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/defined-types"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.label">
      <path value="TestScript.setup.action.operation.label"/>
      <short value="Tracking/logging operation label"/>
      <definition value="The label would be used for tracking/logging purposes by test engines."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.description">
      <path value="TestScript.setup.action.operation.description"/>
      <short value="Tracking/reporting operation description"/>
      <definition value="The description would be used by test engines for tracking and reporting purposes."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.accept">
      <path value="TestScript.setup.action.operation.accept"/>
      <short value="xml | json | ttl | none"/>
      <definition value="The content-type or mime-type to use for RESTful operation in the &apos;Accept&apos; header."/>
      <comment value="If this is specified, then test engine shall set the &apos;Accept&apos; header to the corresponding value. If &apos;xml&apos; is specified, then &apos;Accept&apos; header of &apos;application/fhir+xml&apos; will be set. If &apos;json&apos; is specified, then &apos;application/fhir+json&apos; will be used. If you&apos;d like to explicitly set the &apos;Accept&apos; to some other value then use the &apos;requestHeader&apos; element."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="xml"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContentType"/>
        </extension>
        <strength value="required"/>
        <description value="The content or mime type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/content-type"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.contentType">
      <path value="TestScript.setup.action.operation.contentType"/>
      <short value="xml | json | ttl | none"/>
      <definition value="The content-type or mime-type to use for RESTful operation in the &apos;Content-Type&apos; header."/>
      <comment value="If this is specified, then test engine shall set the &apos;Content-Type&apos; header to the corresponding value. If &apos;xml&apos; is specified, then &apos;Content-Type&apos; header of &apos;application/fhir+xml&apos; will be set. If &apos;json&apos; is specified, then &apos;application/fhir+json&apos; will be used. If you&apos;d like to explicitly set the &apos;Content-Type&apos; to some other value then use the &apos;requestHeader&apos; element."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <meaningWhenMissing value="xml"/>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ContentType"/>
        </extension>
        <strength value="required"/>
        <description value="The content or mime type."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/content-type"/>
        </valueSetReference>
      </binding>
    </element>
    <element id="TestScript.setup.action.operation.destination">
      <path value="TestScript.setup.action.operation.destination"/>
      <short value="Server responding to the request"/>
      <definition value="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.encodeRequestUrl">
      <path value="TestScript.setup.action.operation.encodeRequestUrl"/>
      <short value="Whether or not to send the request url in encoded format"/>
      <definition value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="boolean"/>
      </type>
      <defaultValueBoolean value="true"/>
    </element>
    <element id="TestScript.setup.action.operation.origin">
      <path value="TestScript.setup.action.operation.origin"/>
      <short value="Server initiating the request"/>
      <definition value="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.params">
      <path value="TestScript.setup.action.operation.params"/>
      <short value="Explicitly defined path parameters"/>
      <definition value="Path plus parameters after [type]. Used to set parts of the request URL explicitly."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used. Test engines would append whatever is specified for &quot;params&quot; to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The &quot;params&quot; element does not correspond exactly to &quot;search parameters&quot;. Nor is it the &quot;path&quot;. It corresponds to the part of the URL that comes after the [type] (when &quot;resource&quot; element is specified) e.g. It corresponds to &quot;/[id]/_history/[vid] {?_format=[mime-type]}&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader">
      <path value="TestScript.setup.action.operation.requestHeader"/>
      <short value="Each operation can have one or more header elements"/>
      <definition value="Header elements would be used to set HTTP headers."/>
      <comment value="This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - &quot;If-Modified-Since&quot; and &quot;If-None-Match&quot; headers. See http://hl7.org/fhir/STU3/http.html#2.1.0.5.1 - &quot;If-Match&quot; header. See http://hl7.org/fhir/STU3/http.html#2.1.0.11 - Conditional Create using &quot;If-None-Exist&quot;. See http://hl7.org/fhir/STU3/http.html#2.1.0.13.1 - Invalid &quot;Content-Type&quot; header for negative testing. - etc."/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="BackboneElement"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.field">
      <path value="TestScript.setup.action.operation.requestHeader.field"/>
      <short value="HTTP header field name"/>
      <definition value="The HTTP header field e.g. &quot;Accept&quot;."/>
      <comment value="If header element is specified, then field is required."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestHeader.value">
      <path value="TestScript.setup.action.operation.requestHeader.value"/>
      <short value="HTTP headerfield value"/>
      <definition value="The value of the header e.g. &quot;application/fhir+xml&quot;."/>
      <comment value="If header element is specified, then value is required. No conversions will be done by the test engine e.g. &quot;xml&quot; to &quot;application/fhir+xml&quot;. The values will be set in HTTP headers &quot;as-is&quot;. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.requestId">
      <path value="TestScript.setup.action.operation.requestId"/>
      <short value="Fixture Id of mapped request"/>
      <definition value="The fixture id (maybe new) to map to the request."/>
      <comment value="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 &quot;requestId&quot;. If requestId is not specified, it is the test engine&apos;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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.responseId">
      <path value="TestScript.setup.action.operation.responseId"/>
      <short value="Fixture Id of mapped response"/>
      <definition value="The fixture id (maybe new) to map to the response."/>
      <comment value="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 &quot;responseId&quot;. If responseId is not specified, it is the test engine&apos;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 value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.sourceId">
      <path value="TestScript.setup.action.operation.sourceId"/>
      <short value="Fixture Id of body for PUT and POST requests"/>
      <definition value="The id of the fixture used as the body of a PUT or POST request."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.targetId">
      <path value="TestScript.setup.action.operation.targetId"/>
      <short value="Id of fixture used for extracting the [id], [type], and [vid] for GET requests"/>
      <definition value="Id of fixture used for extracting the [id], [type], and [vid] for GET requests."/>
      <comment value="If &quot;url&quot; element is specified, then &quot;targetId&quot;, &quot;params&quot;, and &quot;resource&quot; elements will be ignored as &quot;url&quot; element will have everything needed for constructing the request url. If &quot;params&quot; element is specified, then &quot;targetId&quot; element is ignored. For FHIR operations that require a resource (e.g. &quot;read&quot; and &quot;vread&quot; operations), the &quot;resource&quot; element must be specified when &quot;params&quot; element is specified. If &quot;url&quot; and &quot;params&quot; elements are absent, then the request url will be constructed from &quot;targetId&quot; fixture if present. For &quot;read&quot; operation, the resource and id values will be extracted from &quot;targetId&quot; fixture and used to construct the url. For &quot;vread&quot; and &quot;history&quot; operations, the versionId value will also be used."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="TestScript.setup.action.operation.url">
      <path value="TestScript.setup.action.operation.url"/>
      <short value="Request URL"/>
      <definition value="Complete request URL."/>
      <comment value="Used to set the request URL explicitly. If &quot;url&quot; element is defined, then &quot;targetId&quot;, &quot;resource&quot;, and &quot;params&quot; elements will be ignored. Test engines would use whatever is specified in &quot;url&quot; 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 value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert">
      <path value="TestScript.setup.action.assert"/>
      <short value="The assertion to perform"/>
      <definition value="Evaluates the results of previous operations to determine if the server under test behaves appropriately."/>
      <comment value="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 value="0"/>
      <max value="1"/>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="inv-5"/>
        <severity value="error"/>
        <human value="Only a single assertion SHALL be present within setup action assert element."/>
        <expression value="contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() &lt;=1"/>
        <xpath value="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) &lt;=1"/>
      </constraint>
      <constraint>
        <key value="inv-10"/>
        <severity value="error"/>
        <human value="Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither."/>
        <expression value="compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())"/>
        <xpath value="(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)"/>
      </constraint>
      <constraint>
        <key value="inv-12"/>
        <severity value="error"/>
        <human value="Setup action assert response and responseCode SHALL be empty when direction equals request"/>
        <expression value="(response.empty() and responseCode.empty() and direction = &apos;request&apos;) or direction.empty() or direction = &apos;response&apos;"/>
        <xpath value="((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value=&apos;request&apos;)) or (count(f:direction) = 0) or (f:direction/@value=&apos;response&apos;)"/>
      </constraint>
    </element>
    <element id="TestScript.setup.action.assert.label">
      <path value="TestScript.setup.action.assert.label"/>
      <short value="Tracking/logging assertion label"/>
      <definition value="The label would be used for tracking/logging purposes by test engines."/>
      <comment value="This has no impact on the verification itself."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="TestScript.setup.action.assert.description">
      <path value="TestScript.setup.action.assert.description"/>