TestScript
A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
- Backends
- PostgreSQLElasticsearch
- Interactions
- CreateReadUpdatePatchDelete
- Search
- 14 of 16 parameters tested
Structure
| Element | Card. | Type | Description |
|---|---|---|---|
urlRequiredΣ | 1..1 | uri | Canonical identifier for this test script, represented as a URI (globally unique) |
identifierΣ | 0..1 | Identifier | Additional identifier for the test script |
versionΣ | 0..1 | string | Business version of the test script |
nameRequiredΣ | 1..1 | string | Name for this test script (computer friendly) |
titleΣ | 0..1 | string | Name for this test script (human friendly) |
statusRequired?!Σ | 1..1 | code | draft | active | retired | unknownBinding (required): publication-status |
experimentalΣ | 0..1 | boolean | For testing purposes, not real usage |
dateΣ | 0..1 | dateTime | Date last changed |
publisherΣ | 0..1 | string | Name of the publisher (organization or individual) |
contactΣ | 0..* | ContactDetail | Contact details for the publisher |
description | 0..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 (extensible): jurisdiction |
purpose | 0..1 | markdown | Why this test script is defined |
copyright | 0..1 | markdown | Use and/or publishing restrictions |
origin | 0..* | BackboneElement | An abstract server representing a client or sender in a message exchange |
indexRequired | 1..1 | integer | The index of the abstract origin server starting at 1 |
profileRequired | 1..1 | Coding | FHIR-Client | FHIR-SDC-FormFillerBinding (extensible): testscript-profile-origin-types |
destination | 0..* | BackboneElement | An abstract server representing a destination or receiver in a message exchange |
indexRequired | 1..1 | integer | The index of the abstract destination server starting at 1 |
profileRequired | 1..1 | Coding | FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessorBinding (extensible): testscript-profile-destination-types |
metadata | 0..1 | BackboneElement | Required capability that is assumed to function correctly on the FHIR server being tested |
link | 0..* | BackboneElement | Links to the FHIR specification |
urlRequired | 1..1 | uri | URL to the specification |
description | 0..1 | string | Short description |
capabilityRequired | 1..* | BackboneElement | Capabilities that are assumed to function correctly on the FHIR server being tested |
requiredRequired | 1..1 | boolean | Are the capabilities required? |
validatedRequired | 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 |
capabilitiesRequired | 1..1 | canonical(CapabilityStatement) | Required Capability Statement |
fixture | 0..* | BackboneElement | Fixture in the test script - by reference (uri) |
autocreateRequired | 1..1 | boolean | Whether or not to implicitly create the fixture during setup |
autodeleteRequired | 1..1 | boolean | Whether or not to implicitly delete the fixture during teardown |
resource | 0..1 | Reference(Resource) | Reference of the resource |
profile | 0..* | Reference(Resource) | Reference of the validation profile |
variable | 0..* | BackboneElement | Placeholder for evaluated elements |
nameRequired | 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 | 0..1 | string | The FHIRPath expression against the fixture body |
headerField | 0..1 | string | HTTP header field name for source |
hint | 0..1 | string | Hint help text for default value to enter |
path | 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 |
actionRequired | 1..* | BackboneElement | A setup operation or assert to perform |
operation | 0..1 | BackboneElement | The setup operation to perform |
type | 0..1 | Coding | The operation code type that will be executedBinding (extensible): testscript-operation-codes |
resource | 0..1 | code | Resource typeBinding (required): defined-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 (required): mimetypes |
contentType | 0..1 | code | Mime type of the request payload contents, with charset etc.Binding (required): mimetypes |
destination | 0..1 | integer | Server responding to the request |
encodeRequestUrlRequired | 1..1 | boolean | Whether or not to send the request url in encoded format |
method | 0..1 | code | delete | get | options | patch | post | put | headBinding (required): http-operations |
origin | 0..1 | integer | Server initiating the request |
params | 0..1 | string | Explicitly defined path parameters |
requestHeader | 0..* | BackboneElement | Each operation can have one or more header elements |
fieldRequired | 1..1 | string | HTTP header field name |
valueRequired | 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 | 0..1 | id | Fixture Id of body for PUT and POST requests |
targetId | 0..1 | id | Id of fixture used for extracting the [id], [type], and [vid] for GET requests |
url | 0..1 | string | Request URL |
assert | 0..1 | BackboneElement | The assertion to perform |
label | 0..1 | string | Tracking/logging assertion label |
description | 0..1 | string | Tracking/reporting assertion description |
direction | 0..1 | code | response | requestBinding (required): assert-direction-codes |
compareToSourceId | 0..1 | string | Id of the source fixture to be evaluated |
compareToSourceExpression | 0..1 | string | The FHIRPath expression to evaluate against the source fixture |
compareToSourcePath | 0..1 | string | XPath or JSONPath expression to evaluate against the source fixture |
contentType | 0..1 | code | Mime type to compare against the 'Content-Type' headerBinding (required): mimetypes |
expression | 0..1 | string | The FHIRPath expression to be evaluated |
headerField | 0..1 | string | HTTP header field name |
minimumId | 0..1 | string | Fixture Id of minimum content resource |
navigationLinks | 0..1 | boolean | Perform validation on navigation links? |
operator | 0..1 | code | equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | evalBinding (required): assert-operator-codes |
path | 0..1 | string | XPath or JSONPath expression |
requestMethod | 0..1 | code | delete | get | options | patch | post | put | headBinding (required): http-operations |
requestURL | 0..1 | string | Request URL comparison value |
resource | 0..1 | code | Resource typeBinding (required): defined-types |
response | 0..1 | code | okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessableBinding (required): assert-response-code-types |
responseCode | 0..1 | string | HTTP response code to test |
sourceId | 0..1 | id | Fixture Id of source expression or headerField |
validateProfileId | 0..1 | id | Profile Id of validation profile reference |
value | 0..1 | string | The value to compare to |
warningOnlyRequired | 1..1 | boolean | Will this assert produce a warning only on error? |
test | 0..* | BackboneElement | A test in this script |
name | 0..1 | string | Tracking/logging name of this test |
description | 0..1 | string | Tracking/reporting short description of the test |
actionRequired | 1..* | BackboneElement | A test operation or assert to perform |
operation | 0..1 | Same as TestScript.setup.action.operation | The setup operation to perform |
assert | 0..1 | Same as TestScript.setup.action.assert | The setup assertion to perform |
teardown | 0..1 | BackboneElement | A series of required clean up steps |
actionRequired | 1..* | BackboneElement | One or more teardown operations to perform |
operationRequired | 1..1 | Same as TestScript.setup.action.operation | The teardown operation to perform |
Σ in _summary results · ?! modifier element · 1.. required · inherited elements in grey
Search parameters
Query with GET [base]/TestScript?[parameter]=[value]. Type decides which modifiers and prefixes apply, see search features.
| Parameter | Type | Description | PG | ES |
|---|---|---|---|---|
context | token | A use context assigned to the test script (TestScript.useContext.value.ofType(CodeableConcept)) | ||
context-quantity | quantity | A quantity- or range-valued use context assigned to the test script (TestScript.useContext.value.ofType(Quantity)) | (TestScript.useContext.value.ofType(Range)) | ||
context-type | token | A type of use context assigned to the test script TestScript.useContext.code | ||
context-type-quantity | composite | A use context type and quantity- or range-based value assigned to the test script TestScript.useContext | ||
context-type-value | composite | A use context type and value assigned to the test script TestScript.useContext | ||
date | date | The test script publication date TestScript.date | ||
description | string | The description of the test script TestScript.description | ||
identifier | token | External identifier for the test script TestScript.identifier | ||
jurisdiction | token | Intended jurisdiction for the test script TestScript.jurisdiction | ||
name | string | Computationally friendly name of the test script TestScript.name | ||
publisher | string | Name of the publisher of the test script TestScript.publisher | ||
status | token | The current status of the test script TestScript.status | ||
testscript-capability | string | TestScript required and validated capability TestScript.metadata.capability.description | ||
title | string | The human-friendly name of the test script TestScript.title | ||
url | uri | The uri that identifies the test script TestScript.url | ||
version | token | The business version of the test script TestScript.version |
PG: PostgreSQL, ES: Elasticsearch. passes its TestScript checks, fails, not tested yet. The author of the resource Logical id of this artifact When the resource version last changed Profiles this resource claims to conform to Security Labels applied to this resource Identifies where the resource comes from Tags applied to this resource Derived from the R4B DefinitionCommon parameters on every resource (8)
_haste-health-authorreference _idtoken _lastUpdateddate _profileuri _securitytoken _sourceuri _tagtoken _typetoken