Name Flags Card. Type Description & Constraints doco
. . TestScript I TU DomainResource Describes a set of tests
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
. . . url Σ 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
. . . name Σ I 1..1 string Name for this test script (computer friendly)
. . . title Σ 0..1 string Name for this test script (human friendly)
. . . status ?! Σ 1..1 code draft | active | retired | unknown
PublicationStatus ( Required)
. . . 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)
Jurisdiction ( Extensible)
. . . 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
. . . . index 1..1 integer The index of the abstract origin server starting at 1
. . . . profile 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller
Test script profile origin type ( Extensible)
. . . destination 0..* BackboneElement An abstract server representing a destination or receiver in a message exchange
. . . . index 1..1 integer The index of the abstract destination server starting at 1
. . . . profile 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Test script profile destination type ( Extensible)
. . . metadata I 0..1 BackboneElement Required capability that is assumed to function correctly on the FHIR server being tested
+ Rule: TestScript metadata capability SHALL contain required or validated or both.
. . . . link 0..* BackboneElement Links to the FHIR specification
. . . . . url 1..1 uri URL to the specification
. . . . . description 0..1 string Short description
. . . . capability 1..* BackboneElement Capabilities that are assumed to function correctly on the FHIR server being tested
. . . . . required 1..1 boolean Are the capabilities required?
. . . . . validated 1..1 boolean Are the capabilities validated?
. . . . . description 0..1 string The expected capabilities of the server
. . . . . origin 0..* integer Which origin server these requirements apply to
. . . . . destination 0..1 integer Which server these requirements apply to
. . . . . link 0..* uri Links to the FHIR specification
. . . . . capabilities 1..1 canonical( CapabilityStatement) Required Capability Statement
. . . fixture 0..* BackboneElement Fixture in the test script - by reference (uri)
. . . . autocreate 1..1 boolean Whether or not to implicitly create the fixture during setup
. . . . autodelete 1..1 boolean Whether or not to implicitly delete the fixture during teardown
. . . . resource 0..1 Reference( Any) Reference of the resource
. . . profile 0..* Reference( Any) Reference of the validation profile
. . . variable I 0..* BackboneElement Placeholder for evaluated elements
+ Rule: Variable can only contain one of expression, headerField or path.
. . . . name 1..1 string Descriptive name for this variable
. . . . defaultValue 0..1 string Default, hard-coded, or user-defined value for this variable
. . . . description 0..1 string Natural language description of the variable
. . . . expression 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
. . . rule 0..* BackboneElement Assert rule used within the test script
. . . . resource 1..1 Reference( Any) Assert rule resource reference
. . . . param 0..* BackboneElement Rule parameter template
. . . . . name 1..1 string Parameter name matching external assert rule parameter
. . . . . value 0..1 string Parameter value defined either explicitly or dynamically
. . . ruleset 0..* BackboneElement Assert ruleset used within the test script
. . . . resource 1..1 Reference( Any) Assert ruleset resource reference
. . . . rule 1..* BackboneElement The referenced rule within the ruleset
. . . . . ruleId 1..1 id Id of referenced rule within the ruleset
. . . . . param 0..* BackboneElement Ruleset rule parameter template
. . . . . . name 1..1 string Parameter name matching external assert ruleset rule parameter
. . . . . . value 0..1 string Parameter value defined either explicitly or dynamically
. . . setup 0..1 BackboneElement A series of required setup operations before tests are executed
. . . . action I 1..* BackboneElement A setup operation or assert to perform
+ Rule: Setup action SHALL contain either an operation or assert but not both.
. . . . . operation I 0..1 BackboneElement The setup operation to perform
+ Rule: Setup operation SHALL contain either sourceId or targetId or params or url.
. . . . . . type 0..1 Coding The operation code type that will be executed
Test script operation code ( Extensible)
. . . . . . resource 0..1 code Resource type
FHIRDefinedType ( Required)
. . . . . . 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.
MimeType ( Required)
. . . . . . contentType 0..1 code Mime type of the request payload contents, with charset etc.
MimeType ( Required)
. . . . . . destination 0..1 integer Server responding to the request
. . . . . . encodeRequestUrl 1..1 boolean Whether or not to send the request url in encoded format
. . . . . . 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
. . . . . . . field 1..1 string HTTP header field name
. . . . . . . value 1..1 string HTTP headerfield value
. . . . . . requestId 0..1 id Fixture Id of mapped request
. . . . . . responseId 0..1 id Fixture Id of mapped response
. . . . . . sourceId 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 I 0..1 BackboneElement The assertion to perform
+ Rule: Only a single assertion SHALL be present within setup action assert element.
+ Rule: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Setup action assert response and responseCode SHALL be empty when direction equals request
. . . . . . label 0..1 string Tracking/logging assertion label
. . . . . . description 0..1 string Tracking/reporting assertion description
. . . . . . direction 0..1 code response | request
AssertionDirectionType ( Required)
. . . . . . 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' header
MimeType ( Required)
. . . . . . 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 | eval
AssertionOperatorType ( Required)
. . . . . . path 0..1 string XPath or JSONPath expression
. . . . . . requestMethod 0..1 code delete | get | options | patch | post | put
TestScriptRequestMethodCode ( Required)
. . . . . . requestURL 0..1 string Request URL comparison value
. . . . . . resource 0..1 code Resource type
FHIRDefinedType ( Required)
. . . . . . response 0..1 code okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
AssertionResponseTypes ( Required)
. . . . . . responseCode 0..1 string HTTP response code to test
. . . . . . rule 0..1 BackboneElement The reference to a TestScript.rule
. . . . . . . ruleId 1..1 id Id of the TestScript.rule
. . . . . . . param 0..* BackboneElement Rule parameter template
. . . . . . . . name 1..1 string Parameter name matching external assert rule parameter
. . . . . . . . value 1..1 string Parameter value defined either explicitly or dynamically
. . . . . . ruleset 0..1 BackboneElement The reference to a TestScript.ruleset
. . . . . . . rulesetId 1..1 id Id of the TestScript.ruleset
. . . . . . . rule 0..* BackboneElement The referenced rule within the ruleset
. . . . . . . . ruleId 1..1 id Id of referenced rule within the ruleset
. . . . . . . . param 0..* BackboneElement Rule parameter template
. . . . . . . . . name 1..1 string Parameter name matching external assert ruleset rule parameter
. . . . . . . . . value 1..1 string Parameter value defined either explicitly or dynamically
. . . . . . 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
. . . . . . warningOnly 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
. . . . action I 1..* BackboneElement A test operation or assert to perform
+ Rule: Test action SHALL contain either an operation or assert but not both.
. . . . . operation I 0..1 see operation The setup operation to perform
+ Rule: Test operation SHALL contain either sourceId or targetId or params or url.
. . . . . assert I 0..1 see assert The setup assertion to perform
+ Rule: Only a single assertion SHALL be present within test action assert element.
+ Rule: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Test action assert response and response and responseCode SHALL be empty when direction equals request
. . . teardown 0..1 BackboneElement A series of required clean up steps
. . . . action 1..* BackboneElement One or more teardown operations to perform
. . . . . operation I 1..1 see operation The teardown operation to perform
+ Rule: Teardown operation SHALL contain either sourceId or targetId or params or url.

doco Documentation for this format