This page is part of the FHIR Specification (v1.6.0:
STU
3 Ballot 4). The current version which supercedes this version is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
. For a full list of available versions, see the
Directory of published versions
.
Page
versions:
. Page versions:
R5
R4B
R4
R3
R2
|
|
Compartments
|
TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.
The TestScript resource is used to define tests that can be executed on one or more FHIR servers. The TestScript resource would typically contain
For example, one TestScript might feature a set of tests focusing on searching Patients and validating the Bundle responses. The fixtures for such a test would contain a list of Patient resources that are required for the test to complete successfully. The setup procedures create the fixtures on the FHIR server being tested. A series of tests execute various search parameters and search for the fixtures in the results. The teardown procedures would then clean up (delete) the fixtures on FHIR server that were created during the setup procedures.
The purpose of the TestScript is to encode in an executable representation tests that can be used to
The TestScript resource should
NOT
be
used
to
represent
Clinical
tests,
Prescriptions,
or
any
other
Healthcare
related
concept.
The
TestScript
resource
is
an
infrastructure
support
resource
used
to
represent
standardized
tests
to
determine
an
implementation's
level
of
adherence
to
the
FHIR
specification.
The
TestScript
resource
relies
is
a
part
of
the
conformance
framework;
its
purpose
is
to
test
whether
systems
conform
to
a
set
of
expectations.
The
expectations
are
expressed
using
a
combination
of
the
following
resources:
be used to represent Clinical tests, Prescriptions, or any other Healthcare related concept. The TestScript resource is an infrastructure support resource used to represent standardized tests to determine an implementation's level of adherence to the FHIR specification.
TestScript is a part of the conformance framework and is used to validate the behavior of FHIR systems, specifically their correct implementation of StructureDefinition, ValueSet, OperationDefinition, Conformance and other FHIR resources that govern system behavior. TestScript instances may be included as part of ImplementationGuides to help define and test the desired behavior of systems that choose to comply with the implementation guide.
The following resources represent the FHIR conformance framework that are used to express the expected behavior of a FHIR compliant system:
The TestScript resource is designed to establish testing as a first class artifact within the FHIR specification. This resource allows defining a suite of tests that can be executed on one or more FHIR servers and clients.
Implementers should be familiar with the testing concepts and descriptions found in Testing FHIR before working with this resource.
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
DomainResource |
|
||
|
Σ | 1..1 | uri |
|
|
Σ | 0..1 | string |
|
|
Σ | 1..1 | string |
|
|
?! Σ | 1..1 | code |
ConformanceResourceStatus |
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..1 | boolean |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | ContactPoint |
|
|
Σ | 0..1 | dateTime |
|
|
Σ | 0..1 |
|
|
|
Σ | 0..* | CodeableConcept |
|
|
0..1 |
|
|
|
|
0..1 | string |
|
|
|
0..* | BackboneElement | An abstract server representing a client or sender in a message exchange | |
| 1..1 | integer | The index of the abstract origin server starting at 1 | |
![]() ![]() ![]() | 1..1 | Coding |
FHIR-Client | FHIR-SDC-FormFiller
TestScriptProfileOriginType ( Extensible ) | |
![]() ![]() | 0..* | BackboneElement | An abstract server representing a destination or receiver in a message exchange | |
![]() ![]() ![]() | 1..1 | integer | The index of the abstract destination server starting at 1 | |
![]() ![]() ![]() | 1..1 | Coding |
FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
TestScriptProfileDestinationType ( Extensible ) | |
![]() ![]() | I | 0..1 | BackboneElement |
|
|
0..* | BackboneElement |
|
|
|
1..1 | uri |
|
|
|
0..1 | string |
|
|
|
1..* | BackboneElement |
|
|
|
0..1 | boolean |
|
|
|
0..1 | boolean |
|
|
|
0..1 | string |
|
|
|
|
integer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0..* | BackboneElement |
|
|
|
0..1 | boolean |
|
|
|
0..1 | boolean |
|
|
|
0..1 | Reference ( Any ) |
|
|
|
0..* | Reference ( Any ) |
|
|
|
I | 0..* | BackboneElement |
|
|
1..1 | string |
|
|
|
0..1 | string | Default, hard-coded, or user-defined value for this variable | |
![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | id |
|
|
|
0..* | BackboneElement | Assert rule used within the test script | |
![]() ![]() ![]() | 1..1 | Reference ( Any ) | Assert rule resource reference | |
![]() ![]() ![]() | 0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() |
0..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() | 0..* | BackboneElement |
|
|
|
1..1 | Reference ( Any ) | Assert ruleset resource reference | |
| 1..* | BackboneElement | The referenced rule within the ruleset | |
![]() ![]() ![]() ![]() | 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() |
0..* | BackboneElement | Ruleset rule parameter template | |
![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() | 0..1 |
|
|
|
|
0..1 | BackboneElement | A series of required setup operations before tests are executed | |
|
I | 1..* | BackboneElement |
|
|
I | 0..1 | BackboneElement |
|
|
0..1 | Coding |
|
|
|
0..1 | code |
FHIRDefinedType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
ContentType |
|
|
0..1 | code |
ContentType |
|
|
0..1 | integer |
|
|
|
0..1 | boolean |
|
|
|
0..1 | integer | Server initiating the request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..* | BackboneElement |
|
|
|
1..1 | string |
|
|
|
1..1 | string |
|
|
|
0..1 | id |
|
|
|
0..1 | id |
|
|
|
0..1 | id |
|
|
|
0..1 | string |
|
|
|
I | 0..1 | BackboneElement |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
AssertionDirectionType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
ContentType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | boolean |
|
|
|
0..1 | code |
AssertionOperatorType |
|
|
0..1 | string | XPath or JSONPath expression | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | code |
FHIRDefinedType |
|
|
0..1 | code |
AssertionResponseTypes |
|
|
0..1 | string |
|
|
|
0..1 |
|
|
|
|
|
id |
|
|
|
0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
string |
|
|
|
1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() |
0..1 |
|
|
|
|
1..1 | id | Id of the TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() |
0..* | BackboneElement |
|
|
| 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
string |
|
|
|
0..1 | id | Fixture Id of source expression or headerField | |
![]() ![]() ![]() ![]() ![]() | 0..1 | id | Profile Id of validation profile reference | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | boolean | Will this assert produce a warning only on error? | |
| 0..* | BackboneElement | A test in this script | |
![]() ![]() ![]() |
0..1 |
|
|
|
|
0..1 | string | Tracking/reporting short description of the test | |
|
I | 1..* | BackboneElement |
|
|
I | 0..1 |
|
|
|
I | 0..1 |
|
|
|
0..1 | BackboneElement |
|
|
|
I | 1..* | BackboneElement |
|
|
I | 0..1 |
|
|
Documentation for this format
|
||||
UML
Diagram
UML Diagram
(
Legend
)
XML
Template
XML Template
<
<TestScript xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < < <</identifier> < < < < <</telecom><url value="[uri]"/><!-- 1..1 Absolute URL used to reference this TestScript --> <version value="[string]"/><!-- 0..1 Logical id for this version of the TestScript --> <name value="[string]"/><!-- 1..1 Informal name for this TestScript --> <status value="[code]"/><!-- 1..1 draft | active | retired --> <identifier><!-- 0..1 Identifier External identifier --></identifier> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher --> <name value="[string]"/><!-- 0..1 Name of an individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact>< < <</useContext> < < < < < <<date value="[dateTime]"/><!-- 0..1 Date for this version of the TestScript --> <description value="[markdown]"/><!-- 0..1 Natural language description of the TestScript --> <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <requirements value="[markdown]"/><!-- 0..1 Scope and Usage this Test Script is for --> <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions --> <origin> <!-- 0..* An abstract server representing a client or sender in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile> </origin> <destination> <!-- 0..* An abstract server representing a destination or receiver in a message exchange --> <index value="[integer]"/><!-- 1..1 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 --></profile> </destination> <metadata> <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested --> <link> <!-- 0..* Links to the FHIR specification --> <url value="[uri]"/><!-- 1..1 URL to the specification --> <description value="[string]"/><!-- 0..1 Short description --> </link>< < < < < < <</conformance><capability> <!-- 1..* Capabilities that are assumed to function correctly on the FHIR server being tested --> <required value="[boolean]"/><!-- 0..1 Are the capabilities required? --> <validated value="[boolean]"/><!-- 0..1 Are the capabilities validated? --> <description value="[string]"/><!-- 0..1 The expected capabilities of the server --> <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to --> <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to --> <link value="[uri]"/><!-- 0..* Links to the FHIR specification --> <conformance><!-- 1..1 Reference(Conformance) Required Conformance --></conformance> </capability> </metadata>< < < < <</resource><fixture> <!-- 0..* Fixture in the test script - by reference (uri) --> <autocreate value="[boolean]"/><!-- 0..1 Whether or not to implicitly create the fixture during setup --> <autodelete value="[boolean]"/><!-- 0..1 Whether or not to implicitly delete the fixture during teardown --> <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource> </fixture><</profile> < < < < <<profile><!-- 0..* Reference(Any) Reference of the validation profile --></profile> <variable> <!-- 0..* Placeholder for evaluated elements --> <name value="[string]"/><!-- 1..1 Descriptive name for this variable --> <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable --> <headerField value="[string]"/><!-- 0..1 HTTP header field name for source --> <path value="[string]"/><!-- 0..1 XPath or JSONPath against the fixture body --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable --> </variable>< <</metadata> < < <</type> < < < < < < < < < < <<rule> <!-- 0..* Assert rule used within the test script --> <resource><!-- 1..1 Reference(Any) Assert rule resource reference --></resource> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..* Assert ruleset used within the test script --> <resource><!-- 1..1 Reference(Any) Assert ruleset resource reference --></resource> <rule> <!-- 1..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Ruleset rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <setup> <!-- 0..1 A series of required setup operations before tests are executed --> <action> <!-- 1..* A setup operation or assert to perform --> <operation> <!-- 0..1 The setup operation to perform --> <type><!-- 0..1 Coding The operation code type that will be executed --></type> <resource value="[code]"/><!-- 0..1 Resource type --> <label value="[string]"/><!-- 0..1 Tracking/logging operation label --> <description value="[string]"/><!-- 0..1 Tracking/reporting operation description --> <accept value="[code]"/><!-- 0..1 xml | json | ttl | none --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <destination value="[integer]"/><!-- 0..1 Server responding to the request --> <encodeRequestUrl value="[boolean]"/><!-- 0..1 Whether or not to send the request url in encoded format --> <origin value="[integer]"/><!-- 0..1 Server initiating the request --> <params value="[string]"/><!-- 0..1 Explicitly defined path parameters --> <requestHeader> <!-- 0..* Each operation can have one ore more header elements --> <field value="[string]"/><!-- 1..1 HTTP header field name --> <value value="[string]"/><!-- 1..1 HTTP headerfield value --> </requestHeader>< < < <<responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of body for PUT and POST requests --> <targetId value="[id]"/><!-- 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests --> <url value="[string]"/><!-- 0..1 Request URL --> </operation>< < < < < < < < < < < < < < < < < < <<assert> <!-- 0..1 The assertion to perform --> <label value="[string]"/><!-- 0..1 Tracking/logging assertion label --> <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description --> <direction value="[code]"/><!-- 0..1 response | request --> <compareToSourceId value="[string]"/><!-- 0..1 Id of fixture used to compare the "sourceId/path" evaluations to --> <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <headerField value="[string]"/><!-- 0..1 HTTP header field name --> <minimumId value="[string]"/><!-- 0..1 Fixture Id of minimum content resource --> <navigationLinks value="[boolean]"/><!-- 0..1 Perform validation on navigation links? --> <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains --> <path value="[string]"/><!-- 0..1 XPath or JSONPath expression --> <requestURL value="[string]"/><!-- 0..1 Request URL comparison value --> <resource value="[code]"/><!-- 0..1 Resource type --> <response value="[code]"/><!-- 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable --> <responseCode value="[string]"/><!-- 0..1 HTTP response code to test --> <rule> <!-- 0..1 The reference to a TestScript.rule --> <ruleId value="[id]"/><!-- 1..1 Id of the TestScript.rule --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..1 The reference to a TestScript.ruleset --> <rulesetId value="[id]"/><!-- 1..1 Id of the TestScript.ruleset --> <rule> <!-- 0..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField --> <validateProfileId value="[id]"/><!-- 0..1 Profile Id of validation profile reference --> <value value="[string]"/><!-- 0..1 The value to compare to --> <warningOnly value="[boolean]"/><!-- 0..1 Will this assert produce a warning only on error? --> </assert> </action> </setup>< < < <</metadata> < <</operation> <</assert><test> <!-- 0..* A test in this script --> <name value="[string]"/><!-- 0..1 Tracking/logging name of this test --> <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test --> <action> <!-- 1..* A test operation or assert to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation> <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert> </action> </test>< < <</operation><teardown> <!-- 0..1 A series of required clean up steps --> <action> <!-- 1..* One or more teardown operations to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation> </action> </teardown> </TestScript>
JSON
Template
JSON Template
{
"resourceType" : "",
{
"resourceType" : "TestScript",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"
"
"
"
"
"url" : "<uri>", // R! Absolute URL used to reference this TestScript
"version" : "<string>", // Logical id for this version of the TestScript
"name" : "<string>", // R! Informal name for this TestScript
"status" : "<code>", // R! draft | active | retired
"identifier" : { Identifier }, // External identifier
"experimental" : <boolean>, // If for testing purposes, not real usage
"publisher" : "<string>", // Name of the publisher (Organization or individual)
"contact" : [{ // Contact details of the publisher
"name" : "<string>", // Name of an individual to contact
"telecom" : [{ ContactPoint }] // Contact details for individual or publisher
}],
"
"
"
"
"
"
"
"
"
"date" : "<dateTime>", // Date for this version of the TestScript
"description" : "<markdown>", // Natural language description of the TestScript
"useContext" : [{ CodeableConcept }], // Content intends to support these contexts
"requirements" : "<markdown>", // Scope and Usage this Test Script is for
"copyright" : "<string>", // Use and/or publishing restrictions
"origin" : [{ // An abstract server representing a client or sender in a message exchange
"index" : <integer>, // R! The index of the abstract origin server starting at 1
"profile" : { Coding } // R! FHIR-Client | FHIR-SDC-FormFiller
}],
"destination" : [{ // An abstract server representing a destination or receiver in a message exchange
"index" : <integer>, // R! The index of the abstract destination server starting at 1
"profile" : { Coding } // R! FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
}],
"metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested
"link" : [{ // Links to the FHIR specification
"url" : "<uri>", // R! URL to the specification
"description" : "<string>" // Short description
}],
"
"
"
"
"
"
"
"capability" : [{ // R! Capabilities that are assumed to function correctly on the FHIR server being tested
"required" : <boolean>, // Are the capabilities required?
"validated" : <boolean>, // Are the capabilities validated?
"description" : "<string>", // The expected capabilities of the server
"origin" : [<integer>], // Which origin server these requirements apply to
"destination" : <integer>, // Which server these requirements apply to
"link" : ["<uri>"], // Links to the FHIR specification
"conformance" : { Reference(Conformance) } // R! Required Conformance
}]
},
"
"
"
"
"
"fixture" : [{ // Fixture in the test script - by reference (uri)
"autocreate" : <boolean>, // Whether or not to implicitly create the fixture during setup
"autodelete" : <boolean>, // Whether or not to implicitly delete the fixture during teardown
"resource" : { Reference(Any) } // Reference of the resource
}],
"
"
"
"
"
"
"profile" : [{ Reference(Any) }], // Reference of the validation profile
"variable" : [{ // Placeholder for evaluated elements
"name" : "<string>", // R! Descriptive name for this variable
"defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable
"headerField" : "<string>", // HTTP header field name for source
"path" : "<string>", // XPath or JSONPath against the fixture body
"sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
}],
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"rule" : [{ // Assert rule used within the test script
"resource" : { Reference(Any) }, // R! Assert rule resource reference
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert rule parameter
"value" : "<string>" // Parameter value defined either explicitly or dynamically
}]
}],
"ruleset" : [{ // Assert ruleset used within the test script
"resource" : { Reference(Any) }, // R! Assert ruleset resource reference
"rule" : [{ // R! The referenced rule within the ruleset
"ruleId" : "<id>", // R! Id of referenced rule within the ruleset
"param" : [{ // Ruleset rule parameter template
"name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter
"value" : "<string>" // Parameter value defined either explicitly or dynamically
}]
}]
}],
"setup" : { // A series of required setup operations before tests are executed
"action" : [{ // R! A setup operation or assert to perform
"operation" : { // The setup operation to perform
"type" : { Coding }, // The operation code type that will be executed
"resource" : "<code>", // Resource type
"label" : "<string>", // Tracking/logging operation label
"description" : "<string>", // Tracking/reporting operation description
"accept" : "<code>", // xml | json | ttl | none
"contentType" : "<code>", // xml | json | ttl | none
"destination" : <integer>, // Server responding to the request
"encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format
"origin" : <integer>, // Server initiating the request
"params" : "<string>", // Explicitly defined path parameters
"requestHeader" : [{ // Each operation can have one ore more header elements
"field" : "<string>", // R! HTTP header field name
"value" : "<string>" // R! HTTP headerfield value
}],
"
"
"
"
"responseId" : "<id>", // Fixture Id of mapped response
"sourceId" : "<id>", // Fixture Id of body for PUT and POST requests
"targetId" : "<id>", // Id of fixture used for extracting the [id], [type], and [vid] for GET requests
"url" : "<string>" // Request URL
},
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"assert" : { // The assertion to perform
"label" : "<string>", // Tracking/logging assertion label
"description" : "<string>", // Tracking/reporting assertion description
"direction" : "<code>", // response | request
"compareToSourceId" : "<string>", // Id of fixture used to compare the "sourceId/path" evaluations to
"compareToSourcePath" : "<string>", // XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to
"contentType" : "<code>", // xml | json | ttl | none
"headerField" : "<string>", // HTTP header field name
"minimumId" : "<string>", // Fixture Id of minimum content resource
"navigationLinks" : <boolean>, // Perform validation on navigation links?
"operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains
"path" : "<string>", // XPath or JSONPath expression
"requestURL" : "<string>", // Request URL comparison value
"resource" : "<code>", // Resource type
"response" : "<code>", // okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
"responseCode" : "<string>", // HTTP response code to test
"rule" : { // The reference to a TestScript.rule
"ruleId" : "<id>", // R! Id of the TestScript.rule
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert rule parameter
"value" : "<string>" // R! Parameter value defined either explicitly or dynamically
}]
},
"ruleset" : { // The reference to a TestScript.ruleset
"rulesetId" : "<id>", // R! Id of the TestScript.ruleset
"rule" : [{ // The referenced rule within the ruleset
"ruleId" : "<id>", // R! Id of referenced rule within the ruleset
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter
"value" : "<string>" // R! Parameter value defined either explicitly or dynamically
}]
}]
},
"sourceId" : "<id>", // Fixture Id of source expression or headerField
"validateProfileId" : "<id>", // Profile Id of validation profile reference
"value" : "<string>", // The value to compare to
"warningOnly" : <boolean> // Will this assert produce a warning only on error?
}
}]
},
"
"
"
"
"
"
"
"test" : [{ // A test in this script
"name" : "<string>", // Tracking/logging name of this test
"description" : "<string>", // Tracking/reporting short description of the test
"action" : [{ // R! A test operation or assert to perform
"operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform
"assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform
}]
}],
"
"
"
"teardown" : { // A series of required clean up steps
"action" : [{ // R! One or more teardown operations to perform
"operation" : { Content as for TestScript.setup.action.operation } // The teardown operation to perform
}]
}
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:TestScript; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:TestScript.url [ uri ]; # 1..1 Absolute URL used to reference this TestScript fhir:TestScript.version [ string ]; # 0..1 Logical id for this version of the TestScript fhir:TestScript.name [ string ]; # 1..1 Informal name for this TestScript fhir:TestScript.status [ code ]; # 1..1 draft | active | retired fhir:TestScript.identifier [ Identifier ]; # 0..1 External identifier fhir:TestScript.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual) fhir:TestScript.contact [ # 0..* Contact details of the publisher fhir:TestScript.contact.name [ string ]; # 0..1 Name of an individual to contact fhir:TestScript.contact.telecom [ ContactPoint ], ... ; # 0..* Contact details for individual or publisher ], ...; fhir:TestScript.date [ dateTime ]; # 0..1 Date for this version of the TestScript fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the TestScript fhir:TestScript.useContext [ CodeableConcept ], ... ; # 0..* Content intends to support these contexts fhir:TestScript.requirements [ markdown ]; # 0..1 Scope and Usage this Test Script is for fhir:TestScript.copyright [ string ]; # 0..1 Use and/or publishing restrictions fhir:TestScript.origin [ # 0..* An abstract server representing a client or sender in a message exchange fhir:TestScript.origin.index [ integer ]; # 1..1 The index of the abstract origin server starting at 1 fhir:TestScript.origin.profile [ Coding ]; # 1..1 FHIR-Client | FHIR-SDC-FormFiller ], ...; fhir:TestScript.destination [ # 0..* An abstract server representing a destination or receiver in a message exchange fhir:TestScript.destination.index [ integer ]; # 1..1 The index of the abstract destination server starting at 1 fhir:TestScript.destination.profile [ Coding ]; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor ], ...; fhir:TestScript.metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.link [ # 0..* Links to the FHIR specification fhir:TestScript.metadata.link.url [ uri ]; # 1..1 URL to the specification fhir:TestScript.metadata.link.description [ string ]; # 0..1 Short description ], ...; fhir:TestScript.metadata.capability [ # 1..* Capabilities that are assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.capability.required [ boolean ]; # 0..1 Are the capabilities required? fhir:TestScript.metadata.capability.validated [ boolean ]; # 0..1 Are the capabilities validated? fhir:TestScript.metadata.capability.description [ string ]; # 0..1 The expected capabilities of the server fhir:TestScript.metadata.capability.origin [ integer ], ... ; # 0..* Which origin server these requirements apply to fhir:TestScript.metadata.capability.destination [ integer ]; # 0..1 Which server these requirements apply to fhir:TestScript.metadata.capability.link [ uri ], ... ; # 0..* Links to the FHIR specification fhir:TestScript.metadata.capability.conformance [ Reference(Conformance) ]; # 1..1 Required Conformance ], ...; ]; fhir:TestScript.fixture [ # 0..* Fixture in the test script - by reference (uri) fhir:TestScript.fixture.autocreate [ boolean ]; # 0..1 Whether or not to implicitly create the fixture during setup fhir:TestScript.fixture.autodelete [ boolean ]; # 0..1 Whether or not to implicitly delete the fixture during teardown fhir:TestScript.fixture.resource [ Reference(Any) ]; # 0..1 Reference of the resource ], ...; fhir:TestScript.profile [ Reference(Any) ], ... ; # 0..* Reference of the validation profile fhir:TestScript.variable [ # 0..* Placeholder for evaluated elements fhir:TestScript.variable.name [ string ]; # 1..1 Descriptive name for this variable fhir:TestScript.variable.defaultValue [ string ]; # 0..1 Default, hard-coded, or user-defined value for this variable fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source fhir:TestScript.variable.path [ string ]; # 0..1 XPath or JSONPath against the fixture body fhir:TestScript.variable.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField within this variable ], ...; fhir:TestScript.rule [ # 0..* Assert rule used within the test script fhir:TestScript.rule.resource [ Reference(Any) ]; # 1..1 Assert rule resource reference fhir:TestScript.rule.param [ # 0..* Rule parameter template fhir:TestScript.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; fhir:TestScript.ruleset [ # 0..* Assert ruleset used within the test script fhir:TestScript.ruleset.resource [ Reference(Any) ]; # 1..1 Assert ruleset resource reference fhir:TestScript.ruleset.rule [ # 1..* The referenced rule within the ruleset fhir:TestScript.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.ruleset.rule.param [ # 0..* Ruleset rule parameter template fhir:TestScript.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.ruleset.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ], ...; fhir:TestScript.setup [ # 0..1 A series of required setup operations before tests are executed fhir:TestScript.setup.action [ # 1..* A setup operation or assert to perform fhir:TestScript.setup.action.operation [ # 0..1 The setup operation to perform fhir:TestScript.setup.action.operation.type [ Coding ]; # 0..1 The operation code type that will be executed fhir:TestScript.setup.action.operation.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.operation.label [ string ]; # 0..1 Tracking/logging operation label fhir:TestScript.setup.action.operation.description [ string ]; # 0..1 Tracking/reporting operation description fhir:TestScript.setup.action.operation.accept [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.destination [ integer ]; # 0..1 Server responding to the request fhir:TestScript.setup.action.operation.encodeRequestUrl [ boolean ]; # 0..1 Whether or not to send the request url in encoded format fhir:TestScript.setup.action.operation.origin [ integer ]; # 0..1 Server initiating the request fhir:TestScript.setup.action.operation.params [ string ]; # 0..1 Explicitly defined path parameters fhir:TestScript.setup.action.operation.requestHeader [ # 0..* Each operation can have one ore more header elements fhir:TestScript.setup.action.operation.requestHeader.field [ string ]; # 1..1 HTTP header field name fhir:TestScript.setup.action.operation.requestHeader.value [ string ]; # 1..1 HTTP headerfield value ], ...; fhir:TestScript.setup.action.operation.responseId [ id ]; # 0..1 Fixture Id of mapped response fhir:TestScript.setup.action.operation.sourceId [ id ]; # 0..1 Fixture Id of body for PUT and POST requests fhir:TestScript.setup.action.operation.targetId [ id ]; # 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests fhir:TestScript.setup.action.operation.url [ string ]; # 0..1 Request URL ]; fhir:TestScript.setup.action.assert [ # 0..1 The assertion to perform fhir:TestScript.setup.action.assert.label [ string ]; # 0..1 Tracking/logging assertion label fhir:TestScript.setup.action.assert.description [ string ]; # 0..1 Tracking/reporting assertion description fhir:TestScript.setup.action.assert.direction [ code ]; # 0..1 response | request fhir:TestScript.setup.action.assert.compareToSourceId [ string ]; # 0..1 Id of fixture used to compare the "sourceId/path" evaluations to fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.assert.headerField [ string ]; # 0..1 HTTP header field name fhir:TestScript.setup.action.assert.minimumId [ string ]; # 0..1 Fixture Id of minimum content resource fhir:TestScript.setup.action.assert.navigationLinks [ boolean ]; # 0..1 Perform validation on navigation links? fhir:TestScript.setup.action.assert.operator [ code ]; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression fhir:TestScript.setup.action.assert.requestURL [ string ]; # 0..1 Request URL comparison value fhir:TestScript.setup.action.assert.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.assert.response [ code ]; # 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable fhir:TestScript.setup.action.assert.responseCode [ string ]; # 0..1 HTTP response code to test fhir:TestScript.setup.action.assert.rule [ # 0..1 The reference to a TestScript.rule fhir:TestScript.setup.action.assert.rule.ruleId [ id ]; # 1..1 Id of the TestScript.rule fhir:TestScript.setup.action.assert.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.setup.action.assert.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ]; fhir:TestScript.setup.action.assert.ruleset [ # 0..1 The reference to a TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rulesetId [ id ]; # 1..1 Id of the TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rule [ # 0..* The referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.setup.action.assert.ruleset.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ]; fhir:TestScript.setup.action.assert.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField fhir:TestScript.setup.action.assert.validateProfileId [ id ]; # 0..1 Profile Id of validation profile reference fhir:TestScript.setup.action.assert.value [ string ]; # 0..1 The value to compare to fhir:TestScript.setup.action.assert.warningOnly [ boolean ]; # 0..1 Will this assert produce a warning only on error? ]; ], ...; ]; fhir:TestScript.test [ # 0..* A test in this script fhir:TestScript.test.name [ string ]; # 0..1 Tracking/logging name of this test fhir:TestScript.test.description [ string ]; # 0..1 Tracking/reporting short description of the test fhir:TestScript.test.action [ # 1..* A test operation or assert to perform fhir:TestScript.test.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The setup operation to perform fhir:TestScript.test.action.assert [ See TestScript.setup.action.assert ]; # 0..1 The setup assertion to perform ], ...; ], ...; fhir:TestScript.teardown [ # 0..1 A series of required clean up steps fhir:TestScript.teardown.action [ # 1..* One or more teardown operations to perform fhir:TestScript.teardown.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The teardown operation to perform ], ...; ]; ]
Changes since DSTU2
| TestScript | |
| TestScript.description | Type changed from string to markdown |
| TestScript.requirements | Type changed from string to markdown |
| TestScript.origin | added |
| TestScript.origin.index | added |
| TestScript.origin.profile | added |
| TestScript.destination | added |
| TestScript.destination.index | added |
| TestScript.destination.profile | added |
| TestScript.metadata.capability.origin | added |
| TestScript.fixture.autocreate | Default Value "false" added |
| TestScript.fixture.autodelete | Default Value "false" added |
| TestScript.variable.defaultValue | added |
| TestScript.rule | added |
| TestScript.rule.resource | added |
| TestScript.rule.param | added |
| TestScript.rule.param.name | added |
| TestScript.rule.param.value | added |
| TestScript.ruleset | added |
| TestScript.ruleset.resource | added |
| TestScript.ruleset.rule | added |
| TestScript.ruleset.rule.ruleId | added |
| TestScript.ruleset.rule.param | added |
| TestScript.ruleset.rule.param.name | added |
| TestScript.ruleset.rule.param.value | added |
| TestScript.setup.action.operation.destination | Default Value "0" removed |
| TestScript.setup.action.operation.origin | added |
| TestScript.setup.action.assert.requestURL | added |
| TestScript.setup.action.assert.rule | added |
| TestScript.setup.action.assert.rule.ruleId | added |
| TestScript.setup.action.assert.rule.param | added |
| TestScript.setup.action.assert.rule.param.name | added |
| TestScript.setup.action.assert.rule.param.value | added |
| TestScript.setup.action.assert.ruleset | added |
| TestScript.setup.action.assert.ruleset.rulesetId | added |
| TestScript.setup.action.assert.ruleset.rule | added |
| TestScript.setup.action.assert.ruleset.rule.ruleId | added |
| TestScript.setup.action.assert.ruleset.rule.param | added |
| TestScript.setup.action.assert.ruleset.rule.param.name | added |
| TestScript.setup.action.assert.ruleset.rule.param.value | added |
| TestScript.multiserver | deleted |
| TestScript.setup.metadata | deleted |
| TestScript.test.metadata | deleted |
See the Full Difference for further information
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
DomainResource |
|
||
|
Σ | 1..1 | uri |
|
|
Σ | 0..1 | string |
|
|
Σ | 1..1 | string |
|
|
?! Σ | 1..1 | code |
ConformanceResourceStatus |
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..1 | boolean |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | ContactPoint |
|
|
Σ | 0..1 | dateTime |
|
|
Σ | 0..1 |
|
|
|
Σ | 0..* | CodeableConcept |
|
|
0..1 |
|
|
|
|
0..1 | string |
|
|
|
0..* | BackboneElement | An abstract server representing a client or sender in a message exchange | |
| 1..1 | integer | The index of the abstract origin server starting at 1 | |
![]() ![]() ![]() | 1..1 | Coding |
FHIR-Client | FHIR-SDC-FormFiller
TestScriptProfileOriginType ( Extensible ) | |
![]() ![]() | 0..* | BackboneElement | An abstract server representing a destination or receiver in a message exchange | |
![]() ![]() ![]() | 1..1 | integer | The index of the abstract destination server starting at 1 | |
![]() ![]() ![]() | 1..1 | Coding |
FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
TestScriptProfileDestinationType ( Extensible ) | |
![]() ![]() | I | 0..1 | BackboneElement |
|
|
0..* | BackboneElement |
|
|
|
1..1 | uri |
|
|
|
0..1 | string |
|
|
|
1..* | BackboneElement |
|
|
|
0..1 | boolean |
|
|
|
0..1 | boolean |
|
|
|
0..1 | string |
|
|
|
|
integer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0..* | BackboneElement |
|
|
|
0..1 | boolean |
|
|
|
0..1 | boolean |
|
|
|
0..1 | Reference ( Any ) |
|
|
|
0..* | Reference ( Any ) |
|
|
|
I | 0..* | BackboneElement |
|
|
1..1 | string |
|
|
|
0..1 | string | Default, hard-coded, or user-defined value for this variable | |
![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | id |
|
|
|
0..* | BackboneElement | Assert rule used within the test script | |
![]() ![]() ![]() | 1..1 | Reference ( Any ) | Assert rule resource reference | |
![]() ![]() ![]() | 0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() |
0..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() | 0..* | BackboneElement |
|
|
|
1..1 | Reference ( Any ) | Assert ruleset resource reference | |
![]() ![]() ![]() | 1..* | BackboneElement | The referenced rule within the ruleset | |
| 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() | 0..* | BackboneElement | Ruleset rule parameter template | |
![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() |
0..1 |
|
|
|
|
0..1 | BackboneElement | A series of required setup operations before tests are executed | |
|
I | 1..* | BackboneElement |
|
|
I | 0..1 | BackboneElement |
|
|
0..1 | Coding |
|
|
|
0..1 | code |
FHIRDefinedType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
ContentType |
|
|
0..1 | code |
ContentType |
|
|
0..1 | integer |
|
|
|
0..1 | boolean |
|
|
|
0..1 | integer | Server initiating the request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..* | BackboneElement |
|
|
|
1..1 | string |
|
|
|
1..1 | string |
|
|
|
0..1 | id |
|
|
|
0..1 | id |
|
|
|
0..1 | id |
|
|
|
0..1 | string |
|
|
|
I | 0..1 | BackboneElement |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
AssertionDirectionType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | code |
ContentType |
|
|
0..1 | string |
|
|
|
0..1 | string |
|
|
|
0..1 | boolean |
|
|
|
0..1 | code |
AssertionOperatorType |
|
|
0..1 | string | XPath or JSONPath expression | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | code |
FHIRDefinedType |
|
|
0..1 | code |
AssertionResponseTypes |
|
|
0..1 | string |
|
|
|
0..1 |
|
|
|
|
|
id |
|
|
|
0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
string |
|
|
|
1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() |
0..1 |
|
|
|
|
1..1 | id | Id of the TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() |
0..* | BackboneElement |
|
|
| 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement | Rule parameter template | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
string |
|
|
|
0..1 | id | Fixture Id of source expression or headerField | |
![]() ![]() ![]() ![]() ![]() | 0..1 | id | Profile Id of validation profile reference | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string |
|
|
|
0..1 | boolean | Will this assert produce a warning only on error? | |
| 0..* | BackboneElement | A test in this script | |
![]() ![]() ![]() |
0..1 |
|
|
|
|
0..1 | string | Tracking/reporting short description of the test | |
|
I | 1..* | BackboneElement |
|
|
I | 0..1 |
|
|
|
I | 0..1 |
|
|
|
0..1 | BackboneElement |
|
|
|
I | 1..* | BackboneElement |
|
|
I | 0..1 |
|
|
Documentation for this format
|
||||
XML
Template
XML Template
<
<TestScript xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < < <</identifier> < < < < <</telecom><url value="[uri]"/><!-- 1..1 Absolute URL used to reference this TestScript --> <version value="[string]"/><!-- 0..1 Logical id for this version of the TestScript --> <name value="[string]"/><!-- 1..1 Informal name for this TestScript --> <status value="[code]"/><!-- 1..1 draft | active | retired --> <identifier><!-- 0..1 Identifier External identifier --></identifier> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher --> <name value="[string]"/><!-- 0..1 Name of an individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact>< < <</useContext> < < < < < <<date value="[dateTime]"/><!-- 0..1 Date for this version of the TestScript --> <description value="[markdown]"/><!-- 0..1 Natural language description of the TestScript --> <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <requirements value="[markdown]"/><!-- 0..1 Scope and Usage this Test Script is for --> <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions --> <origin> <!-- 0..* An abstract server representing a client or sender in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile> </origin> <destination> <!-- 0..* An abstract server representing a destination or receiver in a message exchange --> <index value="[integer]"/><!-- 1..1 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 --></profile> </destination> <metadata> <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested --> <link> <!-- 0..* Links to the FHIR specification --> <url value="[uri]"/><!-- 1..1 URL to the specification --> <description value="[string]"/><!-- 0..1 Short description --> </link>< < < < < < <</conformance><capability> <!-- 1..* Capabilities that are assumed to function correctly on the FHIR server being tested --> <required value="[boolean]"/><!-- 0..1 Are the capabilities required? --> <validated value="[boolean]"/><!-- 0..1 Are the capabilities validated? --> <description value="[string]"/><!-- 0..1 The expected capabilities of the server --> <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to --> <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to --> <link value="[uri]"/><!-- 0..* Links to the FHIR specification --> <conformance><!-- 1..1 Reference(Conformance) Required Conformance --></conformance> </capability> </metadata>< < < < <</resource><fixture> <!-- 0..* Fixture in the test script - by reference (uri) --> <autocreate value="[boolean]"/><!-- 0..1 Whether or not to implicitly create the fixture during setup --> <autodelete value="[boolean]"/><!-- 0..1 Whether or not to implicitly delete the fixture during teardown --> <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource> </fixture><</profile> < < < < <<profile><!-- 0..* Reference(Any) Reference of the validation profile --></profile> <variable> <!-- 0..* Placeholder for evaluated elements --> <name value="[string]"/><!-- 1..1 Descriptive name for this variable --> <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable --> <headerField value="[string]"/><!-- 0..1 HTTP header field name for source --> <path value="[string]"/><!-- 0..1 XPath or JSONPath against the fixture body --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable --> </variable>< <</metadata> < < <</type> < < < < < < < < < < <<rule> <!-- 0..* Assert rule used within the test script --> <resource><!-- 1..1 Reference(Any) Assert rule resource reference --></resource> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..* Assert ruleset used within the test script --> <resource><!-- 1..1 Reference(Any) Assert ruleset resource reference --></resource> <rule> <!-- 1..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Ruleset rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <setup> <!-- 0..1 A series of required setup operations before tests are executed --> <action> <!-- 1..* A setup operation or assert to perform --> <operation> <!-- 0..1 The setup operation to perform --> <type><!-- 0..1 Coding The operation code type that will be executed --></type> <resource value="[code]"/><!-- 0..1 Resource type --> <label value="[string]"/><!-- 0..1 Tracking/logging operation label --> <description value="[string]"/><!-- 0..1 Tracking/reporting operation description --> <accept value="[code]"/><!-- 0..1 xml | json | ttl | none --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <destination value="[integer]"/><!-- 0..1 Server responding to the request --> <encodeRequestUrl value="[boolean]"/><!-- 0..1 Whether or not to send the request url in encoded format --> <origin value="[integer]"/><!-- 0..1 Server initiating the request --> <params value="[string]"/><!-- 0..1 Explicitly defined path parameters --> <requestHeader> <!-- 0..* Each operation can have one ore more header elements --> <field value="[string]"/><!-- 1..1 HTTP header field name --> <value value="[string]"/><!-- 1..1 HTTP headerfield value --> </requestHeader>< < < <<responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of body for PUT and POST requests --> <targetId value="[id]"/><!-- 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests --> <url value="[string]"/><!-- 0..1 Request URL --> </operation>< < < < < < < < < < < < < < < < < < <<assert> <!-- 0..1 The assertion to perform --> <label value="[string]"/><!-- 0..1 Tracking/logging assertion label --> <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description --> <direction value="[code]"/><!-- 0..1 response | request --> <compareToSourceId value="[string]"/><!-- 0..1 Id of fixture used to compare the "sourceId/path" evaluations to --> <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <headerField value="[string]"/><!-- 0..1 HTTP header field name --> <minimumId value="[string]"/><!-- 0..1 Fixture Id of minimum content resource --> <navigationLinks value="[boolean]"/><!-- 0..1 Perform validation on navigation links? --> <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains --> <path value="[string]"/><!-- 0..1 XPath or JSONPath expression --> <requestURL value="[string]"/><!-- 0..1 Request URL comparison value --> <resource value="[code]"/><!-- 0..1 Resource type --> <response value="[code]"/><!-- 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable --> <responseCode value="[string]"/><!-- 0..1 HTTP response code to test --> <rule> <!-- 0..1 The reference to a TestScript.rule --> <ruleId value="[id]"/><!-- 1..1 Id of the TestScript.rule --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..1 The reference to a TestScript.ruleset --> <rulesetId value="[id]"/><!-- 1..1 Id of the TestScript.ruleset --> <rule> <!-- 0..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField --> <validateProfileId value="[id]"/><!-- 0..1 Profile Id of validation profile reference --> <value value="[string]"/><!-- 0..1 The value to compare to --> <warningOnly value="[boolean]"/><!-- 0..1 Will this assert produce a warning only on error? --> </assert> </action> </setup>< < < <</metadata> < <</operation> <</assert><test> <!-- 0..* A test in this script --> <name value="[string]"/><!-- 0..1 Tracking/logging name of this test --> <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test --> <action> <!-- 1..* A test operation or assert to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation> <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert> </action> </test>< < <</operation><teardown> <!-- 0..1 A series of required clean up steps --> <action> <!-- 1..* One or more teardown operations to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation> </action> </teardown> </TestScript>
JSON
Template
JSON Template
{
"resourceType" : "",
{
"resourceType" : "TestScript",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"
"
"
"
"
"
"
"
"
"
"url" : "<uri>", // R! Absolute URL used to reference this TestScript
"version" : "<string>", // Logical id for this version of the TestScript
"name" : "<string>", // R! Informal name for this TestScript
"status" : "<code>", // R! draft | active | retired
"identifier" : { Identifier }, // External identifier
"experimental" : <boolean>, // If for testing purposes, not real usage
"publisher" : "<string>", // Name of the publisher (Organization or individual)
"contact" : [{ // Contact details of the publisher
"name" : "<string>", // Name of an individual to contact
"telecom" : [{ ContactPoint }] // Contact details for individual or publisher
}],
"
"
"
"
"
"
"
"
"
"date" : "<dateTime>", // Date for this version of the TestScript
"description" : "<markdown>", // Natural language description of the TestScript
"useContext" : [{ CodeableConcept }], // Content intends to support these contexts
"requirements" : "<markdown>", // Scope and Usage this Test Script is for
"copyright" : "<string>", // Use and/or publishing restrictions
"origin" : [{ // An abstract server representing a client or sender in a message exchange
"index" : <integer>, // R! The index of the abstract origin server starting at 1
"profile" : { Coding } // R! FHIR-Client | FHIR-SDC-FormFiller
}],
"destination" : [{ // An abstract server representing a destination or receiver in a message exchange
"index" : <integer>, // R! The index of the abstract destination server starting at 1
"profile" : { Coding } // R! FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
}],
"metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested
"link" : [{ // Links to the FHIR specification
"url" : "<uri>", // R! URL to the specification
"description" : "<string>" // Short description
}],
"
"
"
"
"
"
"
"capability" : [{ // R! Capabilities that are assumed to function correctly on the FHIR server being tested
"required" : <boolean>, // Are the capabilities required?
"validated" : <boolean>, // Are the capabilities validated?
"description" : "<string>", // The expected capabilities of the server
"origin" : [<integer>], // Which origin server these requirements apply to
"destination" : <integer>, // Which server these requirements apply to
"link" : ["<uri>"], // Links to the FHIR specification
"conformance" : { Reference(Conformance) } // R! Required Conformance
}]
},
"
"
"
"
"
"fixture" : [{ // Fixture in the test script - by reference (uri)
"autocreate" : <boolean>, // Whether or not to implicitly create the fixture during setup
"autodelete" : <boolean>, // Whether or not to implicitly delete the fixture during teardown
"resource" : { Reference(Any) } // Reference of the resource
}],
"
"
"
"
"
"
"profile" : [{ Reference(Any) }], // Reference of the validation profile
"variable" : [{ // Placeholder for evaluated elements
"name" : "<string>", // R! Descriptive name for this variable
"defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable
"headerField" : "<string>", // HTTP header field name for source
"path" : "<string>", // XPath or JSONPath against the fixture body
"sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
}],
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"rule" : [{ // Assert rule used within the test script
"resource" : { Reference(Any) }, // R! Assert rule resource reference
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert rule parameter
"value" : "<string>" // Parameter value defined either explicitly or dynamically
}]
}],
"ruleset" : [{ // Assert ruleset used within the test script
"resource" : { Reference(Any) }, // R! Assert ruleset resource reference
"rule" : [{ // R! The referenced rule within the ruleset
"ruleId" : "<id>", // R! Id of referenced rule within the ruleset
"param" : [{ // Ruleset rule parameter template
"name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter
"value" : "<string>" // Parameter value defined either explicitly or dynamically
}]
}]
}],
"setup" : { // A series of required setup operations before tests are executed
"action" : [{ // R! A setup operation or assert to perform
"operation" : { // The setup operation to perform
"type" : { Coding }, // The operation code type that will be executed
"resource" : "<code>", // Resource type
"label" : "<string>", // Tracking/logging operation label
"description" : "<string>", // Tracking/reporting operation description
"accept" : "<code>", // xml | json | ttl | none
"contentType" : "<code>", // xml | json | ttl | none
"destination" : <integer>, // Server responding to the request
"encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format
"origin" : <integer>, // Server initiating the request
"params" : "<string>", // Explicitly defined path parameters
"requestHeader" : [{ // Each operation can have one ore more header elements
"field" : "<string>", // R! HTTP header field name
"value" : "<string>" // R! HTTP headerfield value
}],
"
"
"
"
"responseId" : "<id>", // Fixture Id of mapped response
"sourceId" : "<id>", // Fixture Id of body for PUT and POST requests
"targetId" : "<id>", // Id of fixture used for extracting the [id], [type], and [vid] for GET requests
"url" : "<string>" // Request URL
},
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"assert" : { // The assertion to perform
"label" : "<string>", // Tracking/logging assertion label
"description" : "<string>", // Tracking/reporting assertion description
"direction" : "<code>", // response | request
"compareToSourceId" : "<string>", // Id of fixture used to compare the "sourceId/path" evaluations to
"compareToSourcePath" : "<string>", // XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to
"contentType" : "<code>", // xml | json | ttl | none
"headerField" : "<string>", // HTTP header field name
"minimumId" : "<string>", // Fixture Id of minimum content resource
"navigationLinks" : <boolean>, // Perform validation on navigation links?
"operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains
"path" : "<string>", // XPath or JSONPath expression
"requestURL" : "<string>", // Request URL comparison value
"resource" : "<code>", // Resource type
"response" : "<code>", // okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
"responseCode" : "<string>", // HTTP response code to test
"rule" : { // The reference to a TestScript.rule
"ruleId" : "<id>", // R! Id of the TestScript.rule
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert rule parameter
"value" : "<string>" // R! Parameter value defined either explicitly or dynamically
}]
},
"ruleset" : { // The reference to a TestScript.ruleset
"rulesetId" : "<id>", // R! Id of the TestScript.ruleset
"rule" : [{ // The referenced rule within the ruleset
"ruleId" : "<id>", // R! Id of referenced rule within the ruleset
"param" : [{ // Rule parameter template
"name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter
"value" : "<string>" // R! Parameter value defined either explicitly or dynamically
}]
}]
},
"sourceId" : "<id>", // Fixture Id of source expression or headerField
"validateProfileId" : "<id>", // Profile Id of validation profile reference
"value" : "<string>", // The value to compare to
"warningOnly" : <boolean> // Will this assert produce a warning only on error?
}
}]
},
"
"
"
"
"
"
"
"test" : [{ // A test in this script
"name" : "<string>", // Tracking/logging name of this test
"description" : "<string>", // Tracking/reporting short description of the test
"action" : [{ // R! A test operation or assert to perform
"operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform
"assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform
}]
}],
"
"
"
"teardown" : { // A series of required clean up steps
"action" : [{ // R! One or more teardown operations to perform
"operation" : { Content as for TestScript.setup.action.operation } // The teardown operation to perform
}]
}
}
Alternate
definitions:
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:TestScript; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:TestScript.url [ uri ]; # 1..1 Absolute URL used to reference this TestScript fhir:TestScript.version [ string ]; # 0..1 Logical id for this version of the TestScript fhir:TestScript.name [ string ]; # 1..1 Informal name for this TestScript fhir:TestScript.status [ code ]; # 1..1 draft | active | retired fhir:TestScript.identifier [ Identifier ]; # 0..1 External identifier fhir:TestScript.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual) fhir:TestScript.contact [ # 0..* Contact details of the publisher fhir:TestScript.contact.name [ string ]; # 0..1 Name of an individual to contact fhir:TestScript.contact.telecom [ ContactPoint ], ... ; # 0..* Contact details for individual or publisher ], ...; fhir:TestScript.date [ dateTime ]; # 0..1 Date for this version of the TestScript fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the TestScript fhir:TestScript.useContext [ CodeableConcept ], ... ; # 0..* Content intends to support these contexts fhir:TestScript.requirements [ markdown ]; # 0..1 Scope and Usage this Test Script is for fhir:TestScript.copyright [ string ]; # 0..1 Use and/or publishing restrictions fhir:TestScript.origin [ # 0..* An abstract server representing a client or sender in a message exchange fhir:TestScript.origin.index [ integer ]; # 1..1 The index of the abstract origin server starting at 1 fhir:TestScript.origin.profile [ Coding ]; # 1..1 FHIR-Client | FHIR-SDC-FormFiller ], ...; fhir:TestScript.destination [ # 0..* An abstract server representing a destination or receiver in a message exchange fhir:TestScript.destination.index [ integer ]; # 1..1 The index of the abstract destination server starting at 1 fhir:TestScript.destination.profile [ Coding ]; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor ], ...; fhir:TestScript.metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.link [ # 0..* Links to the FHIR specification fhir:TestScript.metadata.link.url [ uri ]; # 1..1 URL to the specification fhir:TestScript.metadata.link.description [ string ]; # 0..1 Short description ], ...; fhir:TestScript.metadata.capability [ # 1..* Capabilities that are assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.capability.required [ boolean ]; # 0..1 Are the capabilities required? fhir:TestScript.metadata.capability.validated [ boolean ]; # 0..1 Are the capabilities validated? fhir:TestScript.metadata.capability.description [ string ]; # 0..1 The expected capabilities of the server fhir:TestScript.metadata.capability.origin [ integer ], ... ; # 0..* Which origin server these requirements apply to fhir:TestScript.metadata.capability.destination [ integer ]; # 0..1 Which server these requirements apply to fhir:TestScript.metadata.capability.link [ uri ], ... ; # 0..* Links to the FHIR specification fhir:TestScript.metadata.capability.conformance [ Reference(Conformance) ]; # 1..1 Required Conformance ], ...; ]; fhir:TestScript.fixture [ # 0..* Fixture in the test script - by reference (uri) fhir:TestScript.fixture.autocreate [ boolean ]; # 0..1 Whether or not to implicitly create the fixture during setup fhir:TestScript.fixture.autodelete [ boolean ]; # 0..1 Whether or not to implicitly delete the fixture during teardown fhir:TestScript.fixture.resource [ Reference(Any) ]; # 0..1 Reference of the resource ], ...; fhir:TestScript.profile [ Reference(Any) ], ... ; # 0..* Reference of the validation profile fhir:TestScript.variable [ # 0..* Placeholder for evaluated elements fhir:TestScript.variable.name [ string ]; # 1..1 Descriptive name for this variable fhir:TestScript.variable.defaultValue [ string ]; # 0..1 Default, hard-coded, or user-defined value for this variable fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source fhir:TestScript.variable.path [ string ]; # 0..1 XPath or JSONPath against the fixture body fhir:TestScript.variable.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField within this variable ], ...; fhir:TestScript.rule [ # 0..* Assert rule used within the test script fhir:TestScript.rule.resource [ Reference(Any) ]; # 1..1 Assert rule resource reference fhir:TestScript.rule.param [ # 0..* Rule parameter template fhir:TestScript.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; fhir:TestScript.ruleset [ # 0..* Assert ruleset used within the test script fhir:TestScript.ruleset.resource [ Reference(Any) ]; # 1..1 Assert ruleset resource reference fhir:TestScript.ruleset.rule [ # 1..* The referenced rule within the ruleset fhir:TestScript.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.ruleset.rule.param [ # 0..* Ruleset rule parameter template fhir:TestScript.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.ruleset.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ], ...; fhir:TestScript.setup [ # 0..1 A series of required setup operations before tests are executed fhir:TestScript.setup.action [ # 1..* A setup operation or assert to perform fhir:TestScript.setup.action.operation [ # 0..1 The setup operation to perform fhir:TestScript.setup.action.operation.type [ Coding ]; # 0..1 The operation code type that will be executed fhir:TestScript.setup.action.operation.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.operation.label [ string ]; # 0..1 Tracking/logging operation label fhir:TestScript.setup.action.operation.description [ string ]; # 0..1 Tracking/reporting operation description fhir:TestScript.setup.action.operation.accept [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.destination [ integer ]; # 0..1 Server responding to the request fhir:TestScript.setup.action.operation.encodeRequestUrl [ boolean ]; # 0..1 Whether or not to send the request url in encoded format fhir:TestScript.setup.action.operation.origin [ integer ]; # 0..1 Server initiating the request fhir:TestScript.setup.action.operation.params [ string ]; # 0..1 Explicitly defined path parameters fhir:TestScript.setup.action.operation.requestHeader [ # 0..* Each operation can have one ore more header elements fhir:TestScript.setup.action.operation.requestHeader.field [ string ]; # 1..1 HTTP header field name fhir:TestScript.setup.action.operation.requestHeader.value [ string ]; # 1..1 HTTP headerfield value ], ...; fhir:TestScript.setup.action.operation.responseId [ id ]; # 0..1 Fixture Id of mapped response fhir:TestScript.setup.action.operation.sourceId [ id ]; # 0..1 Fixture Id of body for PUT and POST requests fhir:TestScript.setup.action.operation.targetId [ id ]; # 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests fhir:TestScript.setup.action.operation.url [ string ]; # 0..1 Request URL ]; fhir:TestScript.setup.action.assert [ # 0..1 The assertion to perform fhir:TestScript.setup.action.assert.label [ string ]; # 0..1 Tracking/logging assertion label fhir:TestScript.setup.action.assert.description [ string ]; # 0..1 Tracking/reporting assertion description fhir:TestScript.setup.action.assert.direction [ code ]; # 0..1 response | request fhir:TestScript.setup.action.assert.compareToSourceId [ string ]; # 0..1 Id of fixture used to compare the "sourceId/path" evaluations to fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.assert.headerField [ string ]; # 0..1 HTTP header field name fhir:TestScript.setup.action.assert.minimumId [ string ]; # 0..1 Fixture Id of minimum content resource fhir:TestScript.setup.action.assert.navigationLinks [ boolean ]; # 0..1 Perform validation on navigation links? fhir:TestScript.setup.action.assert.operator [ code ]; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression fhir:TestScript.setup.action.assert.requestURL [ string ]; # 0..1 Request URL comparison value fhir:TestScript.setup.action.assert.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.assert.response [ code ]; # 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable fhir:TestScript.setup.action.assert.responseCode [ string ]; # 0..1 HTTP response code to test fhir:TestScript.setup.action.assert.rule [ # 0..1 The reference to a TestScript.rule fhir:TestScript.setup.action.assert.rule.ruleId [ id ]; # 1..1 Id of the TestScript.rule fhir:TestScript.setup.action.assert.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.setup.action.assert.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ]; fhir:TestScript.setup.action.assert.ruleset [ # 0..1 The reference to a TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rulesetId [ id ]; # 1..1 Id of the TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rule [ # 0..* The referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.setup.action.assert.ruleset.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ]; fhir:TestScript.setup.action.assert.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField fhir:TestScript.setup.action.assert.validateProfileId [ id ]; # 0..1 Profile Id of validation profile reference fhir:TestScript.setup.action.assert.value [ string ]; # 0..1 The value to compare to fhir:TestScript.setup.action.assert.warningOnly [ boolean ]; # 0..1 Will this assert produce a warning only on error? ]; ], ...; ]; fhir:TestScript.test [ # 0..* A test in this script fhir:TestScript.test.name [ string ]; # 0..1 Tracking/logging name of this test fhir:TestScript.test.description [ string ]; # 0..1 Tracking/reporting short description of the test fhir:TestScript.test.action [ # 1..* A test operation or assert to perform fhir:TestScript.test.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The setup operation to perform fhir:TestScript.test.action.assert [ See TestScript.setup.action.assert ]; # 0..1 The setup assertion to perform ], ...; ], ...; fhir:TestScript.teardown [ # 0..1 A series of required clean up steps fhir:TestScript.teardown.action [ # 1..* One or more teardown operations to perform fhir:TestScript.teardown.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The teardown operation to perform ], ...; ]; ]
Changes since DSTU2
| TestScript | |
| TestScript.description | Type changed from string to markdown |
| TestScript.requirements | Type changed from string to markdown |
| TestScript.origin | added |
| TestScript.origin.index | added |
| TestScript.origin.profile | added |
| TestScript.destination | added |
| TestScript.destination.index | added |
| TestScript.destination.profile | added |
| TestScript.metadata.capability.origin | added |
| TestScript.fixture.autocreate | Default Value "false" added |
| TestScript.fixture.autodelete | Default Value "false" added |
| TestScript.variable.defaultValue | added |
| TestScript.rule | added |
| TestScript.rule.resource | added |
| TestScript.rule.param | added |
| TestScript.rule.param.name | added |
| TestScript.rule.param.value | added |
| TestScript.ruleset | added |
| TestScript.ruleset.resource | added |
| TestScript.ruleset.rule | added |
| TestScript.ruleset.rule.ruleId | added |
| TestScript.ruleset.rule.param | added |
| TestScript.ruleset.rule.param.name | added |
| TestScript.ruleset.rule.param.value | added |
| TestScript.setup.action.operation.destination | Default Value "0" removed |
| TestScript.setup.action.operation.origin | added |
| TestScript.setup.action.assert.requestURL | added |
| TestScript.setup.action.assert.rule | added |
| TestScript.setup.action.assert.rule.ruleId | added |
| TestScript.setup.action.assert.rule.param | added |
| TestScript.setup.action.assert.rule.param.name | added |
| TestScript.setup.action.assert.rule.param.value | added |
| TestScript.setup.action.assert.ruleset | added |
| TestScript.setup.action.assert.ruleset.rulesetId | added |
| TestScript.setup.action.assert.ruleset.rule | added |
| TestScript.setup.action.assert.ruleset.rule.ruleId | added |
| TestScript.setup.action.assert.ruleset.rule.param | added |
| TestScript.setup.action.assert.ruleset.rule.param.name | added |
| TestScript.setup.action.assert.ruleset.rule.param.value | added |
| TestScript.multiserver | deleted |
| TestScript.setup.metadata | deleted |
| TestScript.test.metadata | deleted |
See the Full Difference for further information
Alternate definitions: Master Definition (
XML
,
JSON
),
XML
Schema
/
Schematron
,
Resource
Profile
(
XML
,
(for ) +
JSON
Schema
,
ShEx
(for
Turtle
),
Questionnaire
)
| Path | Definition | Type | Reference |
|---|---|---|---|
| TestScript.status |
|
Required | ConformanceResourceStatus |
| TestScript.useContext |
|
Extensible |
|
| TestScript.origin.profile | The type of origin profile the test system supports. | Extensible |
|
| TestScript.destination.profile | The type of destination profile the test system supports. | Extensible |
|
| TestScript.setup.action.operation.type | The allowable operation code types. | Extensible | TestScriptOperationCode |
|
TestScript.setup.action.operation.resource
|
|
Required | http://hl7.org/fhir/valueset/defined-types FHIRDefinedType |
|
TestScript.setup.action.operation.accept
TestScript.setup.action.operation.contentType |
|
Required | ContentType |
| TestScript.setup.action.assert.direction |
|
Required | AssertionDirectionType |
| TestScript.setup.action.assert.operator |
|
Required | AssertionOperatorType |
| TestScript.setup.action.assert.response |
|
Required | AssertionResponseTypes |
on TestScript.setup.action:
operation.exists() xor assert.exists()
)
on TestScript.teardown.action.operation:
sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))
)
on TestScript.test.action:
operation.exists() xor assert.exists()
)
on TestScript.teardown.action:
operation.exists()
)
on TestScript.variable:
headerField.empty() or path.empty()
)
on TestScript.metadata:
capability.required.exists() or capability.validated.exists()
)
on TestScript.setup.action.assert:
contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1
)
on TestScript.test.action.assert:
contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1
)
on TestScript.setup.action.operation:
sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' |'search' | 'transaction' | 'history'))
)
on TestScript.test.action.operation:
sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))
Please refer to the Testing FHIR - How Tos for examples on working with this resource.
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
|
|
|
|
|
|
|
|
|
|
| description | string |
|
TestScript.description |
| identifier | token |
|
TestScript.identifier |
| name | string |
|
TestScript.name |
|
|
string |
|
|
|
|
string |
|
|
|
|
|
|
|
|
|
|
|
|