This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions
FHIR Infrastructure Work Group | Maturity Level: 0 | Trial 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
This profile was published on Thu, Jan 1, 1970 00:00+1000 as a draft by HL7.
Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.
This indicates the differences between this profile and the base TestScript structure.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestScript | 1..1 | TestScript | Describes a set of tests | |
url | 1..1 | uri | Canonical identifier for this test script, represented as a URI (globally unique) | |
version | 1..1 | string | Business version of the test script | |
experimental | 1..1 | boolean | For testing purposes, not real usage | |
publisher | 1..1 | string | Name of the publisher/steward (organization or individual) | |
description | 1..1 | markdown | Natural language description of the test script | |
Documentation for this format |
This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestScript | C | 1..1 | TestScript | Describes a set of tests |
id | Σ | 0..1 | id | Logical id of this artifact |
meta | Σ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: All Languages (required): IETF language tag for a human language | |
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |
contained | 0..* | Resource | Contained, inline Resources | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored |
url | ΣC | 1..1 | uri | Canonical identifier for this test script, represented as a URI (globally unique) |
identifier | Σ | 0..* | Identifier | Additional identifier for the test script |
version | Σ | 1..1 | string | Business version of the test script |
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: Version Algorithm (extensible) | |
versionAlgorithmString | string | |||
versionAlgorithmCoding | Coding | |||
name | ΣC | 1..1 | string | Name for this test script (computer friendly) |
title | Σ | 0..1 | string | Name for this test script (human friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
experimental | Σ | 1..1 | boolean | For testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date last changed |
publisher | Σ | 1..1 | string | Name of the publisher/steward (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | 1..1 | markdown | Natural language description of the test script | |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for test script (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use. |
purpose | 0..1 | markdown | Why this test script is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
copyrightLabel | 0..1 | string | Copyright holder and year(s) | |
origin | 0..* | BackboneElement | An abstract server representing a client or sender in a message exchange | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
index | 1..1 | integer | The index of the abstract origin server starting at 1 | |
profile | 1..1 | Coding | FHIR-Client | FHIR-SDC-FormFiller Binding: Test Script Profile Origin Type (extensible): The type of origin profile the test system supports. | |
url | 0..1 | url | The url path of the origin server | |
destination | 0..* | BackboneElement | An abstract server representing a destination or receiver in a message exchange | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
index | 1..1 | integer | The index of the abstract destination server starting at 1 | |
profile | 1..1 | Coding | FHIR-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..1 | url | The url path of the destination server | |
metadata | C | 0..1 | BackboneElement | Required capability that is assumed to function correctly on the FHIR server being tested |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
link | 0..* | BackboneElement | Links to the FHIR specification | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
url | 1..1 | uri | URL to the specification | |
description | 0..1 | string | Short description | |
capability | C | 1..* | BackboneElement | Capabilities that are assumed to function correctly on the FHIR server being tested |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
required | C | 1..1 | boolean | Are the capabilities required? |
validated | C | 1..1 | boolean | Are the capabilities validated? |
description | 0..1 | string | The expected capabilities of the server | |
origin | 0..* | integer | Which origin server these requirements apply to | |
destination | 0..1 | integer | Which server these requirements apply to | |
link | 0..* | uri | Links to the FHIR specification | |
capabilities | 1..1 | canonical(CapabilityStatement) | Required Capability Statement | |
scope | 0..* | BackboneElement | Indication of the artifact(s) that are tested by this test case | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
artifact | 1..1 | canonical(Resource) | The specific conformance artifact being tested | |
conformance | 0..1 | CodeableConcept | required | 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..1 | CodeableConcept | unit | integration | production Binding: Test Script Scope Phase Type (extensible): The phase of testing for this artifact. | |
fixture | 0..* | BackboneElement | Fixture in the test script - by reference (uri) | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
autocreate | 1..1 | boolean | Whether or not to implicitly create the fixture during setup | |
autodelete | 1..1 | boolean | Whether or not to implicitly delete the fixture during teardown | |
resource | 0..1 | Reference(Resource) | Reference of the resource | |
profile | 0..* | canonical(StructureDefinition) | Reference of the validation profile | |
variable | C | 0..* | BackboneElement | Placeholder for evaluated elements |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
name | 1..1 | string | Descriptive name for this variable | |
defaultValue | 0..1 | string | Default, hard-coded, or user-defined value for this variable | |
description | 0..1 | string | Natural language description of the variable | |
expression | C | 0..1 | string | The FHIRPath expression against the fixture body |
headerField | C | 0..1 | string | HTTP header field name for source |
hint | 0..1 | string | Hint help text for default value to enter | |
path | C | 0..1 | string | XPath or JSONPath against the fixture body |
sourceId | 0..1 | id | Fixture Id of source expression or headerField within this variable | |
setup | 0..1 | BackboneElement | A series of required setup operations before tests are executed | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
action | C | 1..* | BackboneElement | A setup operation or assert to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 0..1 | BackboneElement | The setup operation to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
type | C | 0..1 | Coding | The operation code type that will be executed Binding: Test Script Operation Code (extensible): FHIR Operation Code Types |
resource | 0..1 | uri | Resource 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..1 | string | Tracking/logging operation label | |
description | 0..1 | string | Tracking/reporting operation description | |
accept | 0..1 | code | Mime 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..1 | code | Mime 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..1 | integer | Server responding to the request | |
encodeRequestUrl | 1..1 | boolean | Whether or not to send the request url in encoded format | |
method | 0..1 | code | delete | get | options | patch | post | put | head Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes. | |
origin | 0..1 | integer | Server initiating the request | |
params | C | 0..1 | string | Explicitly defined path parameters |
requestHeader | 0..* | BackboneElement | Each operation can have one or more header elements | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
field | 1..1 | string | HTTP header field name | |
value | 1..1 | string | HTTP headerfield value | |
requestId | 0..1 | id | Fixture Id of mapped request | |
responseId | 0..1 | id | Fixture Id of mapped response | |
sourceId | C | 0..1 | id | Fixture Id of body for PUT and POST requests |
targetId | C | 0..1 | id | Id of fixture used for extracting the [id], [type], and [vid] for GET requests |
url | C | 0..1 | string | Request URL |
assert | C | 0..1 | BackboneElement | The assertion to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
label | 0..1 | string | Tracking/logging assertion label | |
description | 0..1 | string | Tracking/reporting assertion description | |
direction | C | 0..1 | code | response | request Binding: Assertion Direction Type (required): The direction to use for assertions. |
compareToSourceId | C | 0..1 | string | Id of the source fixture to be evaluated |
compareToSourceExpression | C | 0..1 | string | The FHIRPath expression to evaluate against the source fixture |
compareToSourcePath | C | 0..1 | string | XPath or JSONPath expression to evaluate against the source fixture |
contentType | C | 0..1 | code | Mime 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..1 | code | fail | pass | skip | stop Binding: Assertion Manual Completion Type (required): The default type of manual completion to use for assertion. | |
expression | C | 0..1 | string | The FHIRPath expression to be evaluated |
headerField | C | 0..1 | string | HTTP header field name |
minimumId | C | 0..1 | string | Fixture Id of minimum content resource |
navigationLinks | C | 0..1 | boolean | Perform validation on navigation links? |
operator | 0..1 | code | equals | 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 | 0..1 | string | XPath or JSONPath expression |
requestMethod | C | 0..1 | code | delete | get | options | patch | post | put | head Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes. |
requestURL | 0..1 | string | Request URL comparison value | |
resource | C | 0..1 | uri | Resource 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 | 0..1 | code | 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 Binding: Assertion Response Types (required): The response code to expect in the response. |
responseCode | C | 0..1 | string | HTTP response code to test |
sourceId | 0..1 | id | Fixture Id of source expression or headerField | |
stopTestOnFail | 1..1 | boolean | If this assert fails, will the current test execution stop? | |
validateProfileId | C | 0..1 | id | Profile Id of validation profile reference |
value | 0..1 | string | The value to compare to | |
warningOnly | 1..1 | boolean | Will this assert produce a warning only on error? | |
requirement | 0..* | BackboneElement | Links or references to the testing requirements | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
link[x] | 0..1 | Link or reference to the testing requirement | ||
linkUri | uri | |||
linkCanonical | canonical(Requirements) | |||
test | 0..* | BackboneElement | A test in this script | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
name | 0..1 | string | Tracking/logging name of this test | |
description | 0..1 | string | Tracking/reporting short description of the test | |
action | C | 1..* | BackboneElement | A test operation or assert to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 0..1 | See operation (TestScript) | The setup operation to perform |
assert | C | 0..1 | See assert (TestScript) | The setup assertion to perform |
teardown | 0..1 | BackboneElement | A series of required clean up steps | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
action | 1..* | BackboneElement | One or more teardown operations to perform | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 1..1 | See operation (TestScript) | The teardown operation to perform |
Documentation for this format |
<!-- ShareableTestScript --> <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.
Differential View
This indicates the differences between this profile and the base TestScript structure.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestScript | 1..1 | TestScript | Describes a set of tests | |
url | 1..1 | uri | Canonical identifier for this test script, represented as a URI (globally unique) | |
version | 1..1 | string | Business version of the test script | |
experimental | 1..1 | boolean | For testing purposes, not real usage | |
publisher | 1..1 | string | Name of the publisher/steward (organization or individual) | |
description | 1..1 | markdown | Natural language description of the test script | |
Documentation for this format |
Snapshot View
This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestScript | C | 1..1 | TestScript | Describes a set of tests |
id | Σ | 0..1 | id | Logical id of this artifact |
meta | Σ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: All Languages (required): IETF language tag for a human language | |
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |
contained | 0..* | Resource | Contained, inline Resources | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored |
url | ΣC | 1..1 | uri | Canonical identifier for this test script, represented as a URI (globally unique) |
identifier | Σ | 0..* | Identifier | Additional identifier for the test script |
version | Σ | 1..1 | string | Business version of the test script |
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: Version Algorithm (extensible) | |
versionAlgorithmString | string | |||
versionAlgorithmCoding | Coding | |||
name | ΣC | 1..1 | string | Name for this test script (computer friendly) |
title | Σ | 0..1 | string | Name for this test script (human friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
experimental | Σ | 1..1 | boolean | For testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date last changed |
publisher | Σ | 1..1 | string | Name of the publisher/steward (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | 1..1 | markdown | Natural language description of the test script | |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for test script (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use. |
purpose | 0..1 | markdown | Why this test script is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
copyrightLabel | 0..1 | string | Copyright holder and year(s) | |
origin | 0..* | BackboneElement | An abstract server representing a client or sender in a message exchange | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
index | 1..1 | integer | The index of the abstract origin server starting at 1 | |
profile | 1..1 | Coding | FHIR-Client | FHIR-SDC-FormFiller Binding: Test Script Profile Origin Type (extensible): The type of origin profile the test system supports. | |
url | 0..1 | url | The url path of the origin server | |
destination | 0..* | BackboneElement | An abstract server representing a destination or receiver in a message exchange | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
index | 1..1 | integer | The index of the abstract destination server starting at 1 | |
profile | 1..1 | Coding | FHIR-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..1 | url | The url path of the destination server | |
metadata | C | 0..1 | BackboneElement | Required capability that is assumed to function correctly on the FHIR server being tested |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
link | 0..* | BackboneElement | Links to the FHIR specification | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
url | 1..1 | uri | URL to the specification | |
description | 0..1 | string | Short description | |
capability | C | 1..* | BackboneElement | Capabilities that are assumed to function correctly on the FHIR server being tested |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
required | C | 1..1 | boolean | Are the capabilities required? |
validated | C | 1..1 | boolean | Are the capabilities validated? |
description | 0..1 | string | The expected capabilities of the server | |
origin | 0..* | integer | Which origin server these requirements apply to | |
destination | 0..1 | integer | Which server these requirements apply to | |
link | 0..* | uri | Links to the FHIR specification | |
capabilities | 1..1 | canonical(CapabilityStatement) | Required Capability Statement | |
scope | 0..* | BackboneElement | Indication of the artifact(s) that are tested by this test case | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
artifact | 1..1 | canonical(Resource) | The specific conformance artifact being tested | |
conformance | 0..1 | CodeableConcept | required | 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..1 | CodeableConcept | unit | integration | production Binding: Test Script Scope Phase Type (extensible): The phase of testing for this artifact. | |
fixture | 0..* | BackboneElement | Fixture in the test script - by reference (uri) | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
autocreate | 1..1 | boolean | Whether or not to implicitly create the fixture during setup | |
autodelete | 1..1 | boolean | Whether or not to implicitly delete the fixture during teardown | |
resource | 0..1 | Reference(Resource) | Reference of the resource | |
profile | 0..* | canonical(StructureDefinition) | Reference of the validation profile | |
variable | C | 0..* | BackboneElement | Placeholder for evaluated elements |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
name | 1..1 | string | Descriptive name for this variable | |
defaultValue | 0..1 | string | Default, hard-coded, or user-defined value for this variable | |
description | 0..1 | string | Natural language description of the variable | |
expression | C | 0..1 | string | The FHIRPath expression against the fixture body |
headerField | C | 0..1 | string | HTTP header field name for source |
hint | 0..1 | string | Hint help text for default value to enter | |
path | C | 0..1 | string | XPath or JSONPath against the fixture body |
sourceId | 0..1 | id | Fixture Id of source expression or headerField within this variable | |
setup | 0..1 | BackboneElement | A series of required setup operations before tests are executed | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
action | C | 1..* | BackboneElement | A setup operation or assert to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 0..1 | BackboneElement | The setup operation to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
type | C | 0..1 | Coding | The operation code type that will be executed Binding: Test Script Operation Code (extensible): FHIR Operation Code Types |
resource | 0..1 | uri | Resource 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..1 | string | Tracking/logging operation label | |
description | 0..1 | string | Tracking/reporting operation description | |
accept | 0..1 | code | Mime 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..1 | code | Mime 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..1 | integer | Server responding to the request | |
encodeRequestUrl | 1..1 | boolean | Whether or not to send the request url in encoded format | |
method | 0..1 | code | delete | get | options | patch | post | put | head Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes. | |
origin | 0..1 | integer | Server initiating the request | |
params | C | 0..1 | string | Explicitly defined path parameters |
requestHeader | 0..* | BackboneElement | Each operation can have one or more header elements | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
field | 1..1 | string | HTTP header field name | |
value | 1..1 | string | HTTP headerfield value | |
requestId | 0..1 | id | Fixture Id of mapped request | |
responseId | 0..1 | id | Fixture Id of mapped response | |
sourceId | C | 0..1 | id | Fixture Id of body for PUT and POST requests |
targetId | C | 0..1 | id | Id of fixture used for extracting the [id], [type], and [vid] for GET requests |
url | C | 0..1 | string | Request URL |
assert | C | 0..1 | BackboneElement | The assertion to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
label | 0..1 | string | Tracking/logging assertion label | |
description | 0..1 | string | Tracking/reporting assertion description | |
direction | C | 0..1 | code | response | request Binding: Assertion Direction Type (required): The direction to use for assertions. |
compareToSourceId | C | 0..1 | string | Id of the source fixture to be evaluated |
compareToSourceExpression | C | 0..1 | string | The FHIRPath expression to evaluate against the source fixture |
compareToSourcePath | C | 0..1 | string | XPath or JSONPath expression to evaluate against the source fixture |
contentType | C | 0..1 | code | Mime 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..1 | code | fail | pass | skip | stop Binding: Assertion Manual Completion Type (required): The default type of manual completion to use for assertion. | |
expression | C | 0..1 | string | The FHIRPath expression to be evaluated |
headerField | C | 0..1 | string | HTTP header field name |
minimumId | C | 0..1 | string | Fixture Id of minimum content resource |
navigationLinks | C | 0..1 | boolean | Perform validation on navigation links? |
operator | 0..1 | code | equals | 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 | 0..1 | string | XPath or JSONPath expression |
requestMethod | C | 0..1 | code | delete | get | options | patch | post | put | head Binding: Test Script Request Method Code (required): The allowable request method or HTTP operation codes. |
requestURL | 0..1 | string | Request URL comparison value | |
resource | C | 0..1 | uri | Resource 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 | 0..1 | code | 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 Binding: Assertion Response Types (required): The response code to expect in the response. |
responseCode | C | 0..1 | string | HTTP response code to test |
sourceId | 0..1 | id | Fixture Id of source expression or headerField | |
stopTestOnFail | 1..1 | boolean | If this assert fails, will the current test execution stop? | |
validateProfileId | C | 0..1 | id | Profile Id of validation profile reference |
value | 0..1 | string | The value to compare to | |
warningOnly | 1..1 | boolean | Will this assert produce a warning only on error? | |
requirement | 0..* | BackboneElement | Links or references to the testing requirements | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
link[x] | 0..1 | Link or reference to the testing requirement | ||
linkUri | uri | |||
linkCanonical | canonical(Requirements) | |||
test | 0..* | BackboneElement | A test in this script | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
name | 0..1 | string | Tracking/logging name of this test | |
description | 0..1 | string | Tracking/reporting short description of the test | |
action | C | 1..* | BackboneElement | A test operation or assert to perform |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 0..1 | See operation (TestScript) | The setup operation to perform |
assert | C | 0..1 | See assert (TestScript) | The setup assertion to perform |
teardown | 0..1 | BackboneElement | A series of required clean up steps | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
action | 1..* | BackboneElement | One or more teardown operations to perform | |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
operation | C | 1..1 | See operation (TestScript) | The teardown operation to perform |
Documentation for this format |
XML Template
<!-- ShareableTestScript --> <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
Path | Name | Conformance | ValueSet |
TestScript.language | All Languages | required | All Languages |
TestScript.versionAlgorithm[x] | Version Algorithm | extensible | Version Algorithm |
TestScript.status | PublicationStatus | required | PublicationStatus |
TestScript.jurisdiction | Jurisdiction ValueSet | extensible | Jurisdiction ValueSet |
TestScript.origin.profile | Test Script Profile Origin Type | extensible | Test Script Profile Origin Type |
TestScript.destination.profile | Test Script Profile Destination Type | extensible | Test Script Profile Destination Type |
TestScript.scope.conformance | Test Script Scope Conformance Type | extensible | Test Script Scope Conformance Type |
TestScript.scope.phase | Test Script Scope Phase Type | extensible | Test Script Scope Phase Type |
TestScript.setup.action.operation.type | Test Script Operation Code | extensible | Test Script Operation Code |
TestScript.setup.action.operation.resource | Concrete FHIR Types | extensible | Concrete FHIR Types |
TestScript.setup.action.operation.accept | Mime Types | required | Mime Types |
TestScript.setup.action.operation.contentType | Mime Types | required | Mime Types |
TestScript.setup.action.operation.method | Test Script Request Method Code | required | Test Script Request Method Code |
TestScript.setup.action.assert.direction | Assertion Direction Type | required | Assertion Direction Type |
TestScript.setup.action.assert.contentType | Mime Types | required | Mime Types |
TestScript.setup.action.assert.defaultManualCompletion | Assertion Manual Completion Type | required | Assertion Manual Completion Type |
TestScript.setup.action.assert.operator | Assertion Operator Type | required | Assertion Operator Type |
TestScript.setup.action.assert.requestMethod | Test Script Request Method Code | required | Test Script Request Method Code |
TestScript.setup.action.assert.resource | Concrete FHIR Types | extensible | Concrete FHIR Types |
TestScript.setup.action.assert.response | Assertion Response Types | required | Assertion Response Types |