http://hl7.org/fhir/StructureDefinition/TestScript|4.0.1

A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
NameFlagsCardTypeDescription & Constraints
TestScript
0..*Describes a set of tests
 
url *
Σ
1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
 
identifier
Σ
0..1IdentifierAdditional identifier for the test script
 
version
Σ
0..1stringBusiness version of the test script
 
name *
Σ
1..1stringName for this test script (computer friendly)
 
title
Σ
0..1stringName for this test script (human friendly)
 
status *
?!Σ
1..1codedraft | active | retired | unknown PublicationStatus (required)
 
experimental
Σ
0..1booleanFor testing purposes, not real usage
 
date
Σ
0..1dateTimeDate last changed
 
publisher
Σ
0..1stringName of the publisher (organization or individual)
 
contact
Σ
0..*ContactDetailContact details for the publisher
 
description
0..1markdownNatural language description of the test script
 
useContext
Σ
0..*UsageContextThe context that the content is intended to support
 
jurisdiction
Σ
0..*CodeableConceptIntended jurisdiction for test script (if applicable) Jurisdiction (extensible)
 
purpose
0..1markdownWhy this test script is defined
 
copyright
0..1markdownUse and/or publishing restrictions
 
origin
0..*BackboneElementAn abstract server representing a client or sender in a message exchange
 
 
index *
1..1integerThe index of the abstract origin server starting at 1
 
 
profile *
1..1CodingFHIR-Client | FHIR-SDC-FormFiller TestScriptProfileOriginType (extensible)
 
destination
0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
 
 
index *
1..1integerThe index of the abstract destination server starting at 1
 
 
profile *
1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor TestScriptProfileDestinationType (extensible)
 
metadata
0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
 
 
link
0..*BackboneElementLinks to the FHIR specification
 
 
 
url *
1..1uriURL to the specification
 
 
 
description
0..1stringShort description
 
 
capability *
1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
 
 
 
required *
1..1booleanAre the capabilities required?
 
 
 
validated *
1..1booleanAre the capabilities validated?
 
 
 
description
0..1stringThe expected capabilities of the server
 
 
 
origin
0..*integerWhich origin server these requirements apply to
 
 
 
destination
0..1integerWhich server these requirements apply to
 
 
 
link
0..*uriLinks to the FHIR specification
 
 
 
capabilities *
1..1canonicalRequired Capability Statement
 
fixture
0..*BackboneElementFixture in the test script - by reference (uri)
 
 
autocreate *
1..1booleanWhether or not to implicitly create the fixture during setup
 
 
autodelete *
1..1booleanWhether or not to implicitly delete the fixture during teardown
 
 
resource
0..1ReferenceReference of the resource
 
profile
0..*ReferenceReference of the validation profile
 
variable
0..*BackboneElementPlaceholder for evaluated elements
 
 
name *
1..1stringDescriptive name for this variable
 
 
defaultValue
0..1stringDefault, hard-coded, or user-defined value for this variable
 
 
description
0..1stringNatural language description of the variable
 
 
expression
0..1stringThe FHIRPath expression against the fixture body
 
 
headerField
0..1stringHTTP header field name for source
 
 
hint
0..1stringHint help text for default value to enter
 
 
path
0..1stringXPath or JSONPath against the fixture body
 
 
sourceId
0..1idFixture Id of source expression or headerField within this variable
 
setup
0..1BackboneElementA series of required setup operations before tests are executed
 
 
action *
1..*BackboneElementA setup operation or assert to perform
 
 
 
operation
0..1BackboneElementThe setup operation to perform
 
 
 
 
type
0..1CodingThe operation code type that will be executed TestScriptOperationCode (extensible)
 
 
 
 
resource
0..1codeResource type FHIRDefinedType (required)
 
 
 
 
label
0..1stringTracking/logging operation label
 
 
 
 
description
0..1stringTracking/reporting operation description
 
 
 
 
accept
0..1codeMime type to accept in the payload of the response, with charset etc. MimeType (required)
 
 
 
 
contentType
0..1codeMime type of the request payload contents, with charset etc. MimeType (required)
 
 
 
 
destination
0..1integerServer responding to the request
 
 
 
 
encodeRequestUrl *
1..1booleanWhether or not to send the request url in encoded format
 
 
 
 
method
0..1codedelete | get | options | patch | post | put | head TestScriptRequestMethodCode (required)
 
 
 
 
origin
0..1integerServer initiating the request
 
 
 
 
params
0..1stringExplicitly defined path parameters
 
 
 
 
requestHeader
0..*BackboneElementEach operation can have one or more header elements
 
 
 
 
 
field *
1..1stringHTTP header field name
 
 
 
 
 
value *
1..1stringHTTP headerfield value
 
 
 
 
requestId
0..1idFixture Id of mapped request
 
 
 
 
responseId
0..1idFixture Id of mapped response
 
 
 
 
sourceId
0..1idFixture Id of body for PUT and POST requests
 
 
 
 
targetId
0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
 
 
 
 
url
0..1stringRequest URL
 
 
 
assert
0..1BackboneElementThe assertion to perform
 
 
 
 
label
0..1stringTracking/logging assertion label
 
 
 
 
description
0..1stringTracking/reporting assertion description
 
 
 
 
direction
0..1coderesponse | request AssertionDirectionType (required)
 
 
 
 
compareToSourceId
0..1stringId of the source fixture to be evaluated
 
 
 
 
compareToSourceExpression
0..1stringThe FHIRPath expression to evaluate against the source fixture
 
 
 
 
compareToSourcePath
0..1stringXPath or JSONPath expression to evaluate against the source fixture
 
 
 
 
contentType
0..1codeMime type to compare against the 'Content-Type' header MimeType (required)
 
 
 
 
expression
0..1stringThe FHIRPath expression to be evaluated
 
 
 
 
headerField
0..1stringHTTP header field name
 
 
 
 
minimumId
0..1stringFixture Id of minimum content resource
 
 
 
 
navigationLinks
0..1booleanPerform validation on navigation links?
 
 
 
 
operator
0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval AssertionOperatorType (required)
 
 
 
 
path
0..1stringXPath or JSONPath expression
 
 
 
 
requestMethod
0..1codedelete | get | options | patch | post | put | head TestScriptRequestMethodCode (required)
 
 
 
 
requestURL
0..1stringRequest URL comparison value
 
 
 
 
resource
0..1codeResource type FHIRDefinedType (required)
 
 
 
 
response
0..1codeokay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable AssertionResponseTypes (required)
 
 
 
 
responseCode
0..1stringHTTP response code to test
 
 
 
 
sourceId
0..1idFixture Id of source expression or headerField
 
 
 
 
validateProfileId
0..1idProfile Id of validation profile reference
 
 
 
 
value
0..1stringThe value to compare to
 
 
 
 
warningOnly *
1..1booleanWill this assert produce a warning only on error?
 
test
0..*BackboneElementA test in this script
 
 
name
0..1stringTracking/logging name of this test
 
 
description
0..1stringTracking/reporting short description of the test
 
 
action *
1..*BackboneElementA test operation or assert to perform
 
 
 
operation
0..1The setup operation to perform
 
 
 
assert
0..1The setup assertion to perform
 
teardown
0..1BackboneElementA series of required clean up steps
 
 
action *
1..*BackboneElementOne or more teardown operations to perform
 
 
 
operation *
1..1The teardown operation to perform