FHIR CI-Build

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

FHIR Infrastructure icon Work Group Maturity Level: 0Trial Use Use Context: Any

The canonical URL for this profile is:

http://hl7.org/fhir/StructureDefinition/shareabletestscript

Enforces the minimum information set for the test script metadata required by HL7 and other organizations that share and publish test scripts

Note to Implementers: All of the shareable, publishable, computable, and executable profiles will be migrating to the new Canonical Resource Management icon implementation guide as part of the next FHIR release. Implementers are encouraged to look there for updates, corrections and clarifications.

This profile was published on Thu, Jan 1, 1970 00:00+0000 as a draft by HL7.

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from TestScript.

Summary

Mandatory: 5 elements

This indicates the differences between this profile and the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript 1..1TestScriptDescribes a set of tests
... url 1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... version 1..1stringBusiness version of the test script
... experimental 1..1booleanFor testing purposes, not real usage
... description 1..1markdownNatural language description of the test script

doco Documentation for this format icon

This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C icon1..1TestScriptDescribes a set of tests
cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: All Languages (required): IETF language tag for a human language

Additional BindingsPurpose
Common LanguagesStarter Set
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
... url ΣC icon1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
cnl-1: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ0..*IdentifierAdditional identifier for the test script
... version Σ1..1stringBusiness version of the test script
... versionAlgorithm[x] Σ0..1How to compare versions
Binding: Version Algorithm (extensible)
.... versionAlgorithmStringstring
.... versionAlgorithmCodingCoding
... name ΣC icon1..1stringName for this test script (computer friendly)
... title Σ0..1stringName for this test script (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... experimental Σ1..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ1..1stringName of the publisher/steward (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 1..1markdownNatural language description of the test script
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.


... purpose 0..1markdownWhy this test script is defined
... copyright 0..1markdownUse and/or publishing restrictions
... copyrightLabel 0..1stringCopyright holder and year(s)
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract origin server starting at 1
.... profile 1..1CodingFHIR-Client | FHIR-SDC-FormFiller
Binding: Test Script Profile Origin Type (extensible): The type of origin profile the test system supports.

.... url 0..1urlThe url path of the origin server
... destination 0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract destination server starting at 1
.... profile 1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: Test Script Profile Destination Type (extensible): The type of destination profile the test system supports.

.... url 0..1urlThe url path of the destination server
... metadata C icon0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
tst-4: TestScript metadata capability SHALL contain required or validated or both.
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... link 0..*BackboneElementLinks to the FHIR specification
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... url 1..1uriURL to the specification
..... description 0..1stringShort description
.... capability C icon1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... required C icon1..1booleanAre the capabilities required?
..... validated C icon1..1booleanAre the capabilities validated?
..... description 0..1stringThe expected capabilities of the server
..... origin 0..*integerWhich origin server these requirements apply to
..... destination 0..1integerWhich server these requirements apply to
..... link 0..*uriLinks to the FHIR specification
..... capabilities 1..1canonical(CapabilityStatement)Required Capability Statement
... scope 0..*BackboneElementIndication of the artifact(s) that are tested by this test case
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... artifact 1..1canonical(Resource)The specific conformance artifact being tested
.... conformance 0..1CodeableConceptrequired | optional | strict
Binding: Test Script Scope Conformance Type (extensible): The expectation of whether the test must pass for the system to be considered conformant with the artifact.

.... phase 0..1CodeableConceptunit | integration | production
Binding: Test Script Scope Phase Type (extensible): The phase of testing for this artifact.

... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... autocreate 1..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 1..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Resource)Reference of the resource
... profile 0..*canonical(StructureDefinition)Reference of the validation profile
... variable C icon0..*BackboneElementPlaceholder for evaluated elements
tst-3: Variable can only contain one of expression, headerField or path.
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 1..1stringDescriptive name for this variable
.... defaultValue 0..1stringDefault, hard-coded, or user-defined value for this variable
.... description 0..1stringNatural language description of the variable
.... expression C icon0..1stringThe FHIRPath expression against the fixture body
.... headerField C icon0..1stringHTTP header field name for source
.... hint 0..1stringHint help text for default value to enter
.... path C icon0..1stringXPath or JSONPath against the fixture body
.... sourceId 0..1idFixture Id of source expression or headerField within this variable
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action C icon1..*BackboneElementA setup operation or assert to perform
tst-1: Setup action SHALL contain either an operation or assert but not both.
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1BackboneElementThe setup operation to perform
tst-7: Setup operation SHALL contain either sourceId or targetId or params or url.
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... type C icon0..1CodingThe operation code type that will be executed
Binding: Test Script Operation Code (extensible): FHIR Operation Code Types

...... resource 0..1uriResource type
Binding: Concrete FHIR Types (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... label 0..1stringTracking/logging operation label
...... description 0..1stringTracking/reporting operation description
...... accept 0..1codeMime type to accept in the payload of the response, with charset etc
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 1..1booleanWhether or not to send the request url in encoded format
...... method 0..1codedelete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes.

...... origin 0..1integerServer initiating the request
...... params C icon0..1stringExplicitly defined path parameters
...... requestHeader 0..*BackboneElementEach operation can have one or more header elements
....... id 0..1stringUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... field 1..1stringHTTP header field name
....... value 1..1stringHTTP headerfield value
...... requestId 0..1idFixture Id of mapped request
...... responseId 0..1idFixture Id of mapped response
...... sourceId C icon0..1idFixture Id of body for PUT and POST requests
...... targetId C icon0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url C icon0..1stringRequest URL
..... assert C icon0..1BackboneElementThe assertion to perform
tst-5: Only a single assertion SHALL be present within setup action assert element.
tst-10: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
tst-12: Setup action assert response and responseCode SHALL be empty when direction equals request
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... label 0..1stringTracking/logging assertion label
...... description 0..1stringTracking/reporting assertion description
...... direction C icon0..1coderesponse | request
Binding: Assertion Direction Type (required): The direction to use for assertions.

...... compareToSourceId C icon0..1stringId of the source fixture to be evaluated
...... compareToSourceExpression C icon0..1stringThe FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath C icon0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType C icon0..1codeMime type to compare against the 'Content-Type' header
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... defaultManualCompletion 0..1codefail | pass | skip | stop
Binding: Assertion Manual Completion Type (required): The default type of manual completion to use for assertion.

...... expression C icon0..1stringThe FHIRPath expression to be evaluated
...... headerField C icon0..1stringHTTP header field name
...... minimumId C icon0..1stringFixture Id of minimum content resource
...... navigationLinks C icon0..1booleanPerform validation on navigation links?
...... operator 0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
Binding: Assertion Operator Type (required): The type of operator to use for assertions.

...... path C icon0..1stringXPath or JSONPath expression
...... requestMethod C icon0..1codedelete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes.

...... requestURL 0..1stringRequest URL comparison value
...... resource C icon0..1uriResource type
Binding: Concrete FHIR Types (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... response C icon0..1codecontinue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported
Binding: Assertion Response Types (required): The response code to expect in the response.

...... responseCode C icon0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... stopTestOnFail 1..1booleanIf this assert fails, will the current test execution stop?
...... validateProfileId C icon0..1idProfile Id of validation profile reference
...... value 0..1stringThe value to compare to
...... warningOnly 1..1booleanWill this assert produce a warning only on error?
...... requirement 0..*BackboneElementLinks or references to the testing requirements
....... id 0..1stringUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... link[x] 0..1Link or reference to the testing requirement
........ linkUriuri
........ linkCanonicalcanonical(Requirements)
... test 0..*BackboneElementA test in this script
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 0..1stringTracking/logging name of this test
.... description 0..1stringTracking/reporting short description of the test
.... action C icon1..*BackboneElementA test operation or assert to perform
tst-2: Test action SHALL contain either an operation or assert but not both.
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1See operation (TestScript)The setup operation to perform
tst-8: Test operation SHALL contain either sourceId or targetId or params or url.
..... assert C icon0..1See assert (TestScript)The setup assertion to perform
tst-6: Only a single assertion SHALL be present within test action assert element.
tst-11: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
tst-13: Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action 1..*BackboneElementOne or more teardown operations to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon1..1See operation (TestScript)The teardown operation to perform
tst-9: Teardown operation SHALL contain either sourceId or targetId or params or url.

doco Documentation for this format icon
<!-- ShareableTestScript -->doco

<TestScript xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[id]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- I 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- I 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- I 0..1 Language of the resource content   -->
 <text><!-- I 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- I 1..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- I 0..* Identifier 
     Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- I 1..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- I 0..1 string|Coding How to compare versions   --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- I 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- I 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- I 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- I 0..1 Date last changed -->
 <publisher value="[string]"/><!-- I 1..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- I 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- I 1..1 Natural language description of the test script -->
 <useContext><!-- I 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- I 0..* CodeableConcept Intended jurisdiction for test script (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- I 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- I 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- I 0..1 Copyright holder and year(s) -->
 <origin> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller   --></profile>
  <url value="[url]"/><!-- I 0..1 The url path of the origin server -->
 </origin>
 <destination> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor   --></profile>
  <url value="[url]"/><!-- I 0..1 The url path of the destination server -->
 </destination>
 <metadata> I 0..1 BackboneElement  <!-- I 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> I 0..* BackboneElement  <!-- I 0..* Links to the FHIR specification -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- I 1..1 URL to the specification -->
   <description value="[string]"/><!-- I 0..1 Short description -->
  </link>
  <capability> I 1..* BackboneElement  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- I 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- I 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- I 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- I 0..* Links to the FHIR specification -->
   <capabilities value="[canonical]"/><!-- I 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> I 0..* BackboneElement  <!-- I 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- I 1..1 The specific conformance artifact being tested -->
  <conformance><!-- I 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- I 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> I 0..* BackboneElement  <!-- I 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <autocreate value="[boolean]"/><!-- I 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- I 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- I 0..1 Reference(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile value="[canonical]"/><!-- I 0..* Reference of the validation profile -->
 <variable> I 0..* BackboneElement  <!-- I 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- I 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- I 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- I 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- I 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- I 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- I 0..1 XPath or JSONPath against the fixture body -->
  <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup> I 0..1 BackboneElement  <!-- I 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> I 0..1 BackboneElement  <!-- I 0..1 The setup operation to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- I 0..1 Coding The operation code type that will be executed   --></type>
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <label value="[string]"/><!-- I 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- I 0..1 Mime type to accept in the payload of the response, with charset etc   -->
    <contentType value="[code]"/><!-- I 0..1 Mime type of the request payload contents, with charset etc   -->
    <destination value="[integer]"/><!-- I 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- I 1..1 
        Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <origin value="[integer]"/><!-- I 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader> I 0..* BackboneElement  <!-- I 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <field value="[string]"/><!-- I 1..1 HTTP header field name -->
     <value value="[string]"/><!-- I 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- I 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- I 0..1 Fixture Id of mapped response -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- I 0..1 
        Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- I 0..1 Request URL -->
   </operation>
   <assert> I 0..1 BackboneElement  <!-- I 0..1 The assertion to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- I 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- I 0..1 response | request   -->
    <compareToSourceId value="[string]"/><!-- I 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- I 0..1 
        The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- I 0..1 
        XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- I 0..1 Mime type to compare against the 'Content-Type' header   -->
    <defaultManualCompletion value="[code]"/><!-- I 0..1 fail | pass | skip | stop   -->
    <expression value="[string]"/><!-- I 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- I 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- I 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- I 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- I 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval   -->
    <path value="[string]"/><!-- I 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <requestURL value="[string]"/><!-- I 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <response value="[code]"/><!-- I 0..1 continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported   -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- I 1..1 
        If this assert fails, will the current test execution stop? -->
    <validateProfileId value="[id]"/><!-- I 0..1 Profile Id of validation profile reference -->
    <value value="[string]"/><!-- I 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- I 1..1 Will this assert produce a warning only on error? -->
    <requirement> I 0..* BackboneElement  <!-- I 0..* Links or references to the testing requirements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <link[x]><!-- I 0..1 uri|canonical 
         Link or reference to the testing requirement --></link[x]>
    </requirement>
   </assert>
  </action>
 </setup>
 <test> I 0..* BackboneElement  <!-- I 0..* A test in this script -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- I 0..1 Tracking/reporting short description of the test -->
  <action> I 1..* BackboneElement  <!-- I 1..* A test operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The setup operation to perform --></operation>
   <assert><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.assert  The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown> I 0..1 BackboneElement  <!-- I 0..1 A series of required clean up steps -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>
{ // ShareableTestScript
  // from Element: extension
    "meta" : { Meta }, // IMetadata about the resource
    "implicitRules" : "<uri>", // IA set of rules under which this content was created
    "language" : "<code>", // ILanguage of the resource content
    "text" : { Narrative }, // IText summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // IExtensions that cannot be ignored
    "url" : "<uri>", // I R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // IAdditional identifier for the test script
    "version" : "<string>", // I R! Business version of the test script
  // value[x]: How to compare versions. One of these 2:
    "versionAlgorithmString" : "<string>", // IHow to compare versions
    "versionAlgorithmCoding" : { Coding }, // IHow to compare versions
    "name" : "<string>", // I R! Name for this test script (computer friendly)
    "title" : "<string>", // IName for this test script (human friendly)
    "status" : "<code>", // I R! draft | active | retired | unknown
    "experimental" : <boolean>, // I R! For testing purposes, not real usage
    "date" : "<dateTime>", // IDate last changed
    "publisher" : "<string>", // I R! Name of the publisher/steward (organization or individual)
    "contact" : [{ ContactDetail }], // IContact details for the publisher
    "description" : "<markdown>", // I R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // IThe context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // IIntended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // IWhy this test script is defined
    "copyright" : "<markdown>", // IUse and/or publishing restrictions
    "copyrightLabel" : "<string>", // ICopyright holder and year(s)
    "origin" : [{ BackboneElement }], // IAn abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // IAn abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // IRequired capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // IIndication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // IFixture in the test script - by reference (uri)
    "profile" : ["<canonical>"], // IReference of the validation profile
    "variable" : [{ BackboneElement }], // IPlaceholder for evaluated elements
    "setup" : { BackboneElement }, // IA series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // IA test in this script
    "teardown" : { BackboneElement } // IA series of required clean up steps
  }

This structure is derived from TestScript.

Summary

Mandatory: 5 elements

Differential View

This indicates the differences between this profile and the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript 1..1TestScriptDescribes a set of tests
... url 1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... version 1..1stringBusiness version of the test script
... experimental 1..1booleanFor testing purposes, not real usage
... description 1..1markdownNatural language description of the test script

doco Documentation for this format icon

Snapshot View

This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C icon1..1TestScriptDescribes a set of tests
cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: All Languages (required): IETF language tag for a human language

Additional BindingsPurpose
Common LanguagesStarter Set
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored
... url ΣC icon1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
cnl-1: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ0..*IdentifierAdditional identifier for the test script
... version Σ1..1stringBusiness version of the test script
... versionAlgorithm[x] Σ0..1How to compare versions
Binding: Version Algorithm (extensible)
.... versionAlgorithmStringstring
.... versionAlgorithmCodingCoding
... name ΣC icon1..1stringName for this test script (computer friendly)
... title Σ0..1stringName for this test script (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... experimental Σ1..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ1..1stringName of the publisher/steward (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 1..1markdownNatural language description of the test script
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.


... purpose 0..1markdownWhy this test script is defined
... copyright 0..1markdownUse and/or publishing restrictions
... copyrightLabel 0..1stringCopyright holder and year(s)
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract origin server starting at 1
.... profile 1..1CodingFHIR-Client | FHIR-SDC-FormFiller
Binding: Test Script Profile Origin Type (extensible): The type of origin profile the test system supports.

.... url 0..1urlThe url path of the origin server
... destination 0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract destination server starting at 1
.... profile 1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: Test Script Profile Destination Type (extensible): The type of destination profile the test system supports.

.... url 0..1urlThe url path of the destination server
... metadata C icon0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
tst-4: TestScript metadata capability SHALL contain required or validated or both.
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... link 0..*BackboneElementLinks to the FHIR specification
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... url 1..1uriURL to the specification
..... description 0..1stringShort description
.... capability C icon1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... required C icon1..1booleanAre the capabilities required?
..... validated C icon1..1booleanAre the capabilities validated?
..... description 0..1stringThe expected capabilities of the server
..... origin 0..*integerWhich origin server these requirements apply to
..... destination 0..1integerWhich server these requirements apply to
..... link 0..*uriLinks to the FHIR specification
..... capabilities 1..1canonical(CapabilityStatement)Required Capability Statement
... scope 0..*BackboneElementIndication of the artifact(s) that are tested by this test case
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... artifact 1..1canonical(Resource)The specific conformance artifact being tested
.... conformance 0..1CodeableConceptrequired | optional | strict
Binding: Test Script Scope Conformance Type (extensible): The expectation of whether the test must pass for the system to be considered conformant with the artifact.

.... phase 0..1CodeableConceptunit | integration | production
Binding: Test Script Scope Phase Type (extensible): The phase of testing for this artifact.

... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... autocreate 1..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 1..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Resource)Reference of the resource
... profile 0..*canonical(StructureDefinition)Reference of the validation profile
... variable C icon0..*BackboneElementPlaceholder for evaluated elements
tst-3: Variable can only contain one of expression, headerField or path.
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 1..1stringDescriptive name for this variable
.... defaultValue 0..1stringDefault, hard-coded, or user-defined value for this variable
.... description 0..1stringNatural language description of the variable
.... expression C icon0..1stringThe FHIRPath expression against the fixture body
.... headerField C icon0..1stringHTTP header field name for source
.... hint 0..1stringHint help text for default value to enter
.... path C icon0..1stringXPath or JSONPath against the fixture body
.... sourceId 0..1idFixture Id of source expression or headerField within this variable
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action C icon1..*BackboneElementA setup operation or assert to perform
tst-1: Setup action SHALL contain either an operation or assert but not both.
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1BackboneElementThe setup operation to perform
tst-7: Setup operation SHALL contain either sourceId or targetId or params or url.
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... type C icon0..1CodingThe operation code type that will be executed
Binding: Test Script Operation Code (extensible): FHIR Operation Code Types

...... resource 0..1uriResource type
Binding: Concrete FHIR Types (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... label 0..1stringTracking/logging operation label
...... description 0..1stringTracking/reporting operation description
...... accept 0..1codeMime type to accept in the payload of the response, with charset etc
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 1..1booleanWhether or not to send the request url in encoded format
...... method 0..1codedelete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes.

...... origin 0..1integerServer initiating the request
...... params C icon0..1stringExplicitly defined path parameters
...... requestHeader 0..*BackboneElementEach operation can have one or more header elements
....... id 0..1stringUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... field 1..1stringHTTP header field name
....... value 1..1stringHTTP headerfield value
...... requestId 0..1idFixture Id of mapped request
...... responseId 0..1idFixture Id of mapped response
...... sourceId C icon0..1idFixture Id of body for PUT and POST requests
...... targetId C icon0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url C icon0..1stringRequest URL
..... assert C icon0..1BackboneElementThe assertion to perform
tst-5: Only a single assertion SHALL be present within setup action assert element.
tst-10: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
tst-12: Setup action assert response and responseCode SHALL be empty when direction equals request
...... id 0..1stringUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... label 0..1stringTracking/logging assertion label
...... description 0..1stringTracking/reporting assertion description
...... direction C icon0..1coderesponse | request
Binding: Assertion Direction Type (required): The direction to use for assertions.

...... compareToSourceId C icon0..1stringId of the source fixture to be evaluated
...... compareToSourceExpression C icon0..1stringThe FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath C icon0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType C icon0..1codeMime type to compare against the 'Content-Type' header
Binding: Mime Types (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... defaultManualCompletion 0..1codefail | pass | skip | stop
Binding: Assertion Manual Completion Type (required): The default type of manual completion to use for assertion.

...... expression C icon0..1stringThe FHIRPath expression to be evaluated
...... headerField C icon0..1stringHTTP header field name
...... minimumId C icon0..1stringFixture Id of minimum content resource
...... navigationLinks C icon0..1booleanPerform validation on navigation links?
...... operator 0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
Binding: Assertion Operator Type (required): The type of operator to use for assertions.

...... path C icon0..1stringXPath or JSONPath expression
...... requestMethod C icon0..1codedelete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes.

...... requestURL 0..1stringRequest URL comparison value
...... resource C icon0..1uriResource type
Binding: Concrete FHIR Types (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... response C icon0..1codecontinue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported
Binding: Assertion Response Types (required): The response code to expect in the response.

...... responseCode C icon0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... stopTestOnFail 1..1booleanIf this assert fails, will the current test execution stop?
...... validateProfileId C icon0..1idProfile Id of validation profile reference
...... value 0..1stringThe value to compare to
...... warningOnly 1..1booleanWill this assert produce a warning only on error?
...... requirement 0..*BackboneElementLinks or references to the testing requirements
....... id 0..1stringUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... link[x] 0..1Link or reference to the testing requirement
........ linkUriuri
........ linkCanonicalcanonical(Requirements)
... test 0..*BackboneElementA test in this script
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 0..1stringTracking/logging name of this test
.... description 0..1stringTracking/reporting short description of the test
.... action C icon1..*BackboneElementA test operation or assert to perform
tst-2: Test action SHALL contain either an operation or assert but not both.
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1See operation (TestScript)The setup operation to perform
tst-8: Test operation SHALL contain either sourceId or targetId or params or url.
..... assert C icon0..1See assert (TestScript)The setup assertion to perform
tst-6: Only a single assertion SHALL be present within test action assert element.
tst-11: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
tst-13: Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action 1..*BackboneElementOne or more teardown operations to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon1..1See operation (TestScript)The teardown operation to perform
tst-9: Teardown operation SHALL contain either sourceId or targetId or params or url.

doco Documentation for this format icon

XML Template

<!-- ShareableTestScript -->doco

<TestScript xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[id]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- I 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- I 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- I 0..1 Language of the resource content   -->
 <text><!-- I 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- I 1..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- I 0..* Identifier 
     Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- I 1..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- I 0..1 string|Coding How to compare versions   --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- I 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- I 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- I 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- I 0..1 Date last changed -->
 <publisher value="[string]"/><!-- I 1..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- I 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- I 1..1 Natural language description of the test script -->
 <useContext><!-- I 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- I 0..* CodeableConcept Intended jurisdiction for test script (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- I 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- I 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- I 0..1 Copyright holder and year(s) -->
 <origin> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller   --></profile>
  <url value="[url]"/><!-- I 0..1 The url path of the origin server -->
 </origin>
 <destination> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor   --></profile>
  <url value="[url]"/><!-- I 0..1 The url path of the destination server -->
 </destination>
 <metadata> I 0..1 BackboneElement  <!-- I 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> I 0..* BackboneElement  <!-- I 0..* Links to the FHIR specification -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- I 1..1 URL to the specification -->
   <description value="[string]"/><!-- I 0..1 Short description -->
  </link>
  <capability> I 1..* BackboneElement  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- I 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- I 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- I 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- I 0..* Links to the FHIR specification -->
   <capabilities value="[canonical]"/><!-- I 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> I 0..* BackboneElement  <!-- I 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- I 1..1 The specific conformance artifact being tested -->
  <conformance><!-- I 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- I 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> I 0..* BackboneElement  <!-- I 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <autocreate value="[boolean]"/><!-- I 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- I 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- I 0..1 Reference(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile value="[canonical]"/><!-- I 0..* Reference of the validation profile -->
 <variable> I 0..* BackboneElement  <!-- I 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- I 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- I 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- I 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- I 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- I 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- I 0..1 XPath or JSONPath against the fixture body -->
  <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup> I 0..1 BackboneElement  <!-- I 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> I 0..1 BackboneElement  <!-- I 0..1 The setup operation to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- I 0..1 Coding The operation code type that will be executed   --></type>
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <label value="[string]"/><!-- I 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- I 0..1 Mime type to accept in the payload of the response, with charset etc   -->
    <contentType value="[code]"/><!-- I 0..1 Mime type of the request payload contents, with charset etc   -->
    <destination value="[integer]"/><!-- I 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- I 1..1 
        Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <origin value="[integer]"/><!-- I 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader> I 0..* BackboneElement  <!-- I 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <field value="[string]"/><!-- I 1..1 HTTP header field name -->
     <value value="[string]"/><!-- I 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- I 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- I 0..1 Fixture Id of mapped response -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- I 0..1 
        Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- I 0..1 Request URL -->
   </operation>
   <assert> I 0..1 BackboneElement  <!-- I 0..1 The assertion to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- I 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- I 0..1 response | request   -->
    <compareToSourceId value="[string]"/><!-- I 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- I 0..1 
        The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- I 0..1 
        XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- I 0..1 Mime type to compare against the 'Content-Type' header   -->
    <defaultManualCompletion value="[code]"/><!-- I 0..1 fail | pass | skip | stop   -->
    <expression value="[string]"/><!-- I 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- I 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- I 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- I 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- I 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval   -->
    <path value="[string]"/><!-- I 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <requestURL value="[string]"/><!-- I 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <response value="[code]"/><!-- I 0..1 continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported   -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- I 1..1 
        If this assert fails, will the current test execution stop? -->
    <validateProfileId value="[id]"/><!-- I 0..1 Profile Id of validation profile reference -->
    <value value="[string]"/><!-- I 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- I 1..1 Will this assert produce a warning only on error? -->
    <requirement> I 0..* BackboneElement  <!-- I 0..* Links or references to the testing requirements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <link[x]><!-- I 0..1 uri|canonical 
         Link or reference to the testing requirement --></link[x]>
    </requirement>
   </assert>
  </action>
 </setup>
 <test> I 0..* BackboneElement  <!-- I 0..* A test in this script -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- I 0..1 Tracking/reporting short description of the test -->
  <action> I 1..* BackboneElement  <!-- I 1..* A test operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The setup operation to perform --></operation>
   <assert><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.assert  The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown> I 0..1 BackboneElement  <!-- I 0..1 A series of required clean up steps -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>

JSON Template

{ // ShareableTestScript
  // from Element: extension
    "meta" : { Meta }, // IMetadata about the resource
    "implicitRules" : "<uri>", // IA set of rules under which this content was created
    "language" : "<code>", // ILanguage of the resource content
    "text" : { Narrative }, // IText summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // IExtensions that cannot be ignored
    "url" : "<uri>", // I R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // IAdditional identifier for the test script
    "version" : "<string>", // I R! Business version of the test script
  // value[x]: How to compare versions. One of these 2:
    "versionAlgorithmString" : "<string>", // IHow to compare versions
    "versionAlgorithmCoding" : { Coding }, // IHow to compare versions
    "name" : "<string>", // I R! Name for this test script (computer friendly)
    "title" : "<string>", // IName for this test script (human friendly)
    "status" : "<code>", // I R! draft | active | retired | unknown
    "experimental" : <boolean>, // I R! For testing purposes, not real usage
    "date" : "<dateTime>", // IDate last changed
    "publisher" : "<string>", // I R! Name of the publisher/steward (organization or individual)
    "contact" : [{ ContactDetail }], // IContact details for the publisher
    "description" : "<markdown>", // I R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // IThe context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // IIntended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // IWhy this test script is defined
    "copyright" : "<markdown>", // IUse and/or publishing restrictions
    "copyrightLabel" : "<string>", // ICopyright holder and year(s)
    "origin" : [{ BackboneElement }], // IAn abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // IAn abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // IRequired capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // IIndication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // IFixture in the test script - by reference (uri)
    "profile" : ["<canonical>"], // IReference of the validation profile
    "variable" : [{ BackboneElement }], // IPlaceholder for evaluated elements
    "setup" : { BackboneElement }, // IA series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // IA test in this script
    "teardown" : { BackboneElement } // IA series of required clean up steps
  }

 

Alternate definitions: Master Definition (XML, JSON), Schematron

PathNameConformanceValueSet
TestScript.languageAll LanguagesrequiredAll Languages
TestScript.versionAlgorithm[x]Version AlgorithmextensibleVersion Algorithm
TestScript.statusPublicationStatusrequiredPublicationStatus
TestScript.jurisdictionJurisdiction ValueSetextensibleJurisdiction ValueSet
TestScript.origin.profileTest Script Profile Origin TypeextensibleTest Script Profile Origin Type
TestScript.destination.profileTest Script Profile Destination TypeextensibleTest Script Profile Destination Type
TestScript.scope.conformanceTest Script Scope Conformance TypeextensibleTest Script Scope Conformance Type
TestScript.scope.phaseTest Script Scope Phase TypeextensibleTest Script Scope Phase Type
TestScript.setup.action.operation.typeTest Script Operation CodeextensibleTest Script Operation Code
TestScript.setup.action.operation.resourceConcrete FHIR TypesextensibleConcrete FHIR Types
TestScript.setup.action.operation.acceptMime TypesrequiredMime Types
TestScript.setup.action.operation.contentTypeMime TypesrequiredMime Types
TestScript.setup.action.operation.methodTest Script Request Method CoderequiredTest Script Request Method Code
TestScript.setup.action.assert.directionAssertion Direction TyperequiredAssertion Direction Type
TestScript.setup.action.assert.contentTypeMime TypesrequiredMime Types
TestScript.setup.action.assert.defaultManualCompletionAssertion Manual Completion TyperequiredAssertion Manual Completion Type
TestScript.setup.action.assert.operatorAssertion Operator TyperequiredAssertion Operator Type
TestScript.setup.action.assert.requestMethodTest Script Request Method CoderequiredTest Script Request Method Code
TestScript.setup.action.assert.resourceConcrete FHIR TypesextensibleConcrete FHIR Types
TestScript.setup.action.assert.responseAssertion Response TypesrequiredAssertion Response Types
. .