FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

7.3 Resource TestScript - Content

FHIR Infrastructure Work GroupMaturity Level: 2 Trial UseCompartments: Not linked to any defined compartments

A structured set 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

  • a list of fixtures (required resources used in the tests)
  • setup procedures
  • a suite of thematically related tests
  • teardown procedures

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

  1. determine whether a given FHIR server adheres to the FHIR specification and
  2. determine whether two or more FHIR servers implement capabilities in a compatible or interoperable manner.
It may not be possible to fully automate the latter goal (especially with regards to business rules that might ride on top of different implementations), however the tests should be able to determine whether two servers support the operations, value sets, profiles, and extensions to exchange Bundles of Resources (such as returned from the Patient $everything operation).

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.

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, CapabilityStatement 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.

This resource is referenced by testreport

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript DomainResourceDescribes a set of tests
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriLogical URI to reference this test script (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 this was 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..*UsageContextContext the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Jurisdiction ValueSet (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 I0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
+ TestScript metadata capability SHALL contain required or validated or both.
.... 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 0..1booleanAre the capabilities required?
..... validated 0..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..1Reference(CapabilityStatement)Required Capability Statement
... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... autocreate 0..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 0..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Any)Reference of the resource
... profile 0..*Reference(Any)Reference of the validation profile
... variable I0..*BackboneElementPlaceholder for evaluated elements
+ Variable can only contain one of expression, headerField or path.
.... 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 fluentpath 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
... rule 0..*BackboneElementAssert rule used within the test script
.... resource 1..1Reference(Any)Assert rule resource reference
.... param 0..*BackboneElementRule parameter template
..... name 1..1stringParameter name matching external assert rule parameter
..... value 0..1stringParameter value defined either explicitly or dynamically
... ruleset 0..*BackboneElementAssert ruleset used within the test script
.... resource 1..1Reference(Any)Assert ruleset resource reference
.... rule 1..*BackboneElementThe referenced rule within the ruleset
..... ruleId 1..1idId of referenced rule within the ruleset
..... param 0..*BackboneElementRuleset rule parameter template
...... name 1..1stringParameter name matching external assert ruleset rule parameter
...... value 0..1stringParameter value defined either explicitly or dynamically
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... action I1..*BackboneElementA setup operation or assert to perform
+ Setup action SHALL contain either an operation or assert but not both.
..... operation I0..1BackboneElementThe setup operation to perform
+ Setup operation SHALL contain either sourceId or targetId or params or url.
...... 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..1codexml | json | ttl | none
ContentType (Required)
...... contentType 0..1codexml | json | ttl | none
ContentType (Required)
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 0..1booleanWhether or not to send the request url in encoded format
...... 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 I0..1BackboneElementThe assertion to perform
+ Only a single assertion SHALL be present within setup action assert element.
+ Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Setup action assert response and responseCode SHALL be empty when direction equals request
...... 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 fluentpath expression to evaluate against the source fixture
...... compareToSourcePath 0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType 0..1codexml | json | ttl | none
ContentType (Required)
...... expression 0..1stringThe fluentpath 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
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
...... rule 0..1BackboneElementThe reference to a TestScript.rule
....... ruleId 1..1idId of the TestScript.rule
....... param 0..*BackboneElementRule parameter template
........ name 1..1stringParameter name matching external assert rule parameter
........ value 1..1stringParameter value defined either explicitly or dynamically
...... ruleset 0..1BackboneElementThe reference to a TestScript.ruleset
....... rulesetId 1..1idId of the TestScript.ruleset
....... rule 0..*BackboneElementThe referenced rule within the ruleset
........ ruleId 1..1idId of referenced rule within the ruleset
........ param 0..*BackboneElementRule parameter template
......... name 1..1stringParameter name matching external assert ruleset rule parameter
......... value 1..1stringParameter value defined either explicitly or dynamically
...... 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 0..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 I1..*BackboneElementA test operation or assert to perform
+ Test action SHALL contain either an operation or assert but not both.
..... operation I0..1see operationThe setup operation to perform
+ Test operation SHALL contain either sourceId or targetId or params or url.
..... assert I0..1see assertThe setup assertion to perform
+ Only a single assertion SHALL be present within test action assert element.
+ Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1BackboneElementA series of required clean up steps
.... action 1..*BackboneElementOne or more teardown operations to perform
..... operation I1..1see operationThe teardown operation to perform
+ Teardown operation SHALL contain either sourceId or targetId or params or url.

doco Documentation for this format

UML Diagram (Legend)

TestScript (DomainResource)💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : uri [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดidentifier : Identifier [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดversion : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtitle : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดstatus : code [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดPublicationStatus! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexperimental : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdate : dateTime [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpublisher : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontact : ContactDetail [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดuseContext : UsageContext [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดjurisdiction : CodeableConcept [0..*] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดJurisdiction ValueSet+ 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpurpose : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcopyright : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Reference [0..*] Any Origin💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดindex : integer [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Coding [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptProfileOriginType+ Destination💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดindex : integer [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Coding [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptProfileDestinationT...+ MetadataLink💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : uri [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]Capability💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequired : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalidated : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin : integer [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlink : uri [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcapabilities : Reference [1..1] CapabilityStatement Fixture💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดautocreate : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดautodelete : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [0..1] Any Variable💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdefaultValue : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดheaderField : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดhint : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]Rule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [1..1] Any RuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]Ruleset💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [1..1] Any RulesetRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]RulesetRuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]SetupSetupActionOperation💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtype : Coding [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptOperationCode+ 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดFHIRDefinedType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlabel : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaccept : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontentType : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดencodeRequestUrl : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparams : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponseId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtargetId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : string [0..1]RequestHeader💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดfield : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]Assert💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlabel : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdirection : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionDirectionType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourceId : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourceExpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourcePath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontentType : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดheaderField : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดminimumId : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดnavigationLinks : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperator : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionOperatorType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestMethod : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptRequestMethodCode! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestURL : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดFHIRDefinedType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponse : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionResponseTypes! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponseCode : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalidateProfileId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดwarningOnly : boolean [0..1]ActionAssertRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]ActionAssertRuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]ActionAssertRuleset💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrulesetId : id [1..1]ActionAssertRulesetRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]Param💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]Test💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]TestActionTeardownTeardownAction💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlink[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcapability[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดmetadata[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดfixture[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvariable[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleset[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestHeader[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleset[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดassert[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsetup[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดassert[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtest[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดteardown[0..1]

XML Template

<TestScript xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Logical URI to reference this test script (globally unique) -->
 <identifier><!-- 0..1 Identifier Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the test script -->
 <name value="[string]"/><!-- 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the test script -->
 <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- 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>
  <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 -->
   <capabilities><!-- 1..1 Reference(CapabilityStatement) Required Capability Statement --></capabilities>
  </capability>
 </metadata>
 <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><!-- 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 -->
  <description value="[string]"/><!-- 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- 0..1 The fluentpath expression against the fixture body -->
  <headerField value="[string]"/><!-- 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter -->
  <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>
 <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 or more header elements -->
     <field value="[string]"/><!-- 1..1 HTTP header field name -->
     <value value="[string]"/><!-- 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request -->
    <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 the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- 0..1 The fluentpath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none -->
    <expression value="[string]"/><!-- 0..1 The fluentpath expression to be evaluated -->
    <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 | eval -->
    <path value="[string]"/><!-- 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- 0..1 delete | get | options | patch | post | put -->
    <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>
 <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>
 <teardown>  <!-- 0..1 A series of required clean up steps -->
  <action>  <!-- 1..* One or more teardown operations to perform -->
   <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>

JSON Template

{doco
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Logical URI to reference this test script (globally unique)
  "identifier" : { Identifier }, // Additional identifier for the test script
  "version" : "<string>", // Business version of the test script
  "name" : "<string>", // R!  Name for this test script (computer friendly)
  "title" : "<string>", // Name for this test script (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the test script
  "useContext" : [{ UsageContext }], // Context the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable)
  "purpose" : "<markdown>", // Why this test script is defined
  "copyright" : "<markdown>", // 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
      "capabilities" : { Reference(CapabilityStatement) } // R!  Required Capability Statement
    }]
  },
  "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
    "description" : "<string>", // Natural language description of the variable
    "expression" : "<string>", // The fluentpath expression against the fixture body
    "headerField" : "<string>", // HTTP header field name for source
    "hint" : "<string>", // Hint help text for default value to enter
    "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 or more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "requestId" : "<id>", // Fixture Id of mapped request
        "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 the source fixture to be evaluated
        "compareToSourceExpression" : "<string>", // The fluentpath expression to evaluate against the source fixture
        "compareToSourcePath" : "<string>", // XPath or JSONPath expression to evaluate against the source fixture
        "contentType" : "<code>", // xml | json | ttl | none
        "expression" : "<string>", // The fluentpath expression to be evaluated
        "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 | eval
        "path" : "<string>", // XPath or JSONPath expression
        "requestMethod" : "<code>", // delete | get | options | patch | post | put
        "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 } // R!  The teardown operation to perform
    }]
  }
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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 Logical URI to reference this test script (globally unique)
  fhir:TestScript.identifier [ Identifier ]; # 0..1 Additional identifier for the test script
  fhir:TestScript.version [ string ]; # 0..1 Business version of the test script
  fhir:TestScript.name [ string ]; # 1..1 Name for this test script (computer friendly)
  fhir:TestScript.title [ string ]; # 0..1 Name for this test script (human friendly)
  fhir:TestScript.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:TestScript.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:TestScript.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:TestScript.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the test script
  fhir:TestScript.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support
  fhir:TestScript.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for test script (if applicable)
  fhir:TestScript.purpose [ markdown ]; # 0..1 Why this test script is defined
  fhir:TestScript.copyright [ markdown ]; # 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.capabilities [ Reference(CapabilityStatement) ]; # 1..1 Required Capability Statement
    ], ...;
  ];
  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.description [ string ]; # 0..1 Natural language description of the variable
    fhir:TestScript.variable.expression [ string ]; # 0..1 The fluentpath expression against the fixture body
    fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source
    fhir:TestScript.variable.hint [ string ]; # 0..1 Hint help text for default value to enter
    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 or 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.requestId [ id ]; # 0..1 Fixture Id of mapped request
        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 the source fixture to be evaluated
        fhir:TestScript.setup.action.assert.compareToSourceExpression [ string ]; # 0..1 The fluentpath expression to evaluate against the source fixture
        fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression to evaluate against the source fixture
        fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none
        fhir:TestScript.setup.action.assert.expression [ string ]; # 0..1 The fluentpath expression to be evaluated
        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 | eval
        fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression
        fhir:TestScript.setup.action.assert.requestMethod [ code ]; # 0..1 delete | get | options | patch | post | put
        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 ]; # 1..1 The teardown operation to perform
    ], ...;
  ];
]

Changes since DSTU2

TestScript
TestScript.title
  • Added Element
TestScript.status
  • Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status
TestScript.experimental
  • Now marked as Modifier
TestScript.contact
  • Type changed from BackboneElement to ContactDetail
TestScript.description
  • Type changed from string to markdown
TestScript.useContext
  • Type changed from CodeableConcept to UsageContext
  • Remove Binding http://hl7.org/fhir/ValueSet/use-context (extensible)
TestScript.jurisdiction
  • Added Element
TestScript.purpose
  • Added Element
TestScript.copyright
  • Type changed from string to markdown
TestScript.origin
  • Added Element
TestScript.origin.index
  • Added Element
TestScript.origin.profile
  • Added Element
TestScript.destination
  • Added Element
TestScript.destination.index
  • Added Element
TestScript.destination.profile
  • Added Element
TestScript.metadata.capability.origin
  • Added Element
TestScript.metadata.capability.capabilities
  • Added Element
TestScript.fixture.autocreate
  • Default Value "false" added
TestScript.fixture.autodelete
  • Default Value "false" added
TestScript.variable.defaultValue
  • Added Element
TestScript.variable.description
  • Added Element
TestScript.variable.expression
  • Added Element
TestScript.variable.hint
  • Added Element
TestScript.rule
  • Added Element
TestScript.rule.resource
  • Added Element
TestScript.rule.param
  • Added Element
TestScript.rule.param.name
  • Added Element
TestScript.rule.param.value
  • Added Element
TestScript.ruleset
  • Added Element
TestScript.ruleset.resource
  • Added Element
TestScript.ruleset.rule
  • Added Element
TestScript.ruleset.rule.ruleId
  • Added Element
TestScript.ruleset.rule.param
  • Added Element
TestScript.ruleset.rule.param.name
  • Added Element
TestScript.ruleset.rule.param.value
  • Added Element
TestScript.setup.action.operation.destination
  • Default Value "0" removed
TestScript.setup.action.operation.origin
  • Added Element
TestScript.setup.action.operation.requestId
  • Added Element
TestScript.setup.action.assert.compareToSourceExpression
  • Added Element
TestScript.setup.action.assert.expression
  • Added Element
TestScript.setup.action.assert.requestMethod
  • Added Element
TestScript.setup.action.assert.requestURL
  • Added Element
TestScript.setup.action.assert.rule
  • Added Element
TestScript.setup.action.assert.rule.ruleId
  • Added Element
TestScript.setup.action.assert.rule.param
  • Added Element
TestScript.setup.action.assert.rule.param.name
  • Added Element
TestScript.setup.action.assert.rule.param.value
  • Added Element
TestScript.setup.action.assert.ruleset
  • Added Element
TestScript.setup.action.assert.ruleset.rulesetId
  • Added Element
TestScript.setup.action.assert.ruleset.rule
  • Added Element
TestScript.setup.action.assert.ruleset.rule.ruleId
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param.name
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param.value
  • Added Element
TestScript.teardown.action.operation
  • Min Cardinality changed from 0 to 1
TestScript.contact.name
  • deleted
TestScript.contact.telecom
  • deleted
TestScript.requirements
  • deleted
TestScript.metadata.capability.conformance
  • deleted
TestScript.multiserver
  • deleted
TestScript.setup.metadata
  • deleted
TestScript.test.metadata
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 6 fail round-trip testing and 6 r3 resources are invalid (11 errors).).

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript DomainResourceDescribes a set of tests
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriLogical URI to reference this test script (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 this was 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..*UsageContextContext the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Jurisdiction ValueSet (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 I0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
+ TestScript metadata capability SHALL contain required or validated or both.
.... 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 0..1booleanAre the capabilities required?
..... validated 0..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..1Reference(CapabilityStatement)Required Capability Statement
... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... autocreate 0..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 0..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Any)Reference of the resource
... profile 0..*Reference(Any)Reference of the validation profile
... variable I0..*BackboneElementPlaceholder for evaluated elements
+ Variable can only contain one of expression, headerField or path.
.... 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 fluentpath 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
... rule 0..*BackboneElementAssert rule used within the test script
.... resource 1..1Reference(Any)Assert rule resource reference
.... param 0..*BackboneElementRule parameter template
..... name 1..1stringParameter name matching external assert rule parameter
..... value 0..1stringParameter value defined either explicitly or dynamically
... ruleset 0..*BackboneElementAssert ruleset used within the test script
.... resource 1..1Reference(Any)Assert ruleset resource reference
.... rule 1..*BackboneElementThe referenced rule within the ruleset
..... ruleId 1..1idId of referenced rule within the ruleset
..... param 0..*BackboneElementRuleset rule parameter template
...... name 1..1stringParameter name matching external assert ruleset rule parameter
...... value 0..1stringParameter value defined either explicitly or dynamically
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... action I1..*BackboneElementA setup operation or assert to perform
+ Setup action SHALL contain either an operation or assert but not both.
..... operation I0..1BackboneElementThe setup operation to perform
+ Setup operation SHALL contain either sourceId or targetId or params or url.
...... 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..1codexml | json | ttl | none
ContentType (Required)
...... contentType 0..1codexml | json | ttl | none
ContentType (Required)
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 0..1booleanWhether or not to send the request url in encoded format
...... 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 I0..1BackboneElementThe assertion to perform
+ Only a single assertion SHALL be present within setup action assert element.
+ Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Setup action assert response and responseCode SHALL be empty when direction equals request
...... 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 fluentpath expression to evaluate against the source fixture
...... compareToSourcePath 0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType 0..1codexml | json | ttl | none
ContentType (Required)
...... expression 0..1stringThe fluentpath 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
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
...... rule 0..1BackboneElementThe reference to a TestScript.rule
....... ruleId 1..1idId of the TestScript.rule
....... param 0..*BackboneElementRule parameter template
........ name 1..1stringParameter name matching external assert rule parameter
........ value 1..1stringParameter value defined either explicitly or dynamically
...... ruleset 0..1BackboneElementThe reference to a TestScript.ruleset
....... rulesetId 1..1idId of the TestScript.ruleset
....... rule 0..*BackboneElementThe referenced rule within the ruleset
........ ruleId 1..1idId of referenced rule within the ruleset
........ param 0..*BackboneElementRule parameter template
......... name 1..1stringParameter name matching external assert ruleset rule parameter
......... value 1..1stringParameter value defined either explicitly or dynamically
...... 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 0..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 I1..*BackboneElementA test operation or assert to perform
+ Test action SHALL contain either an operation or assert but not both.
..... operation I0..1see operationThe setup operation to perform
+ Test operation SHALL contain either sourceId or targetId or params or url.
..... assert I0..1see assertThe setup assertion to perform
+ Only a single assertion SHALL be present within test action assert element.
+ Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1BackboneElementA series of required clean up steps
.... action 1..*BackboneElementOne or more teardown operations to perform
..... operation I1..1see operationThe teardown operation to perform
+ Teardown operation SHALL contain either sourceId or targetId or params or url.

doco Documentation for this format

UML Diagram (Legend)

TestScript (DomainResource)💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : uri [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดidentifier : Identifier [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดversion : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtitle : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดstatus : code [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดPublicationStatus! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexperimental : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdate : dateTime [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpublisher : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontact : ContactDetail [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดuseContext : UsageContext [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดjurisdiction : CodeableConcept [0..*] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดJurisdiction ValueSet+ 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpurpose : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcopyright : markdown [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Reference [0..*] Any Origin💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดindex : integer [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Coding [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptProfileOriginType+ Destination💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดindex : integer [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดprofile : Coding [1..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptProfileDestinationT...+ MetadataLink💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : uri [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]Capability💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequired : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalidated : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin : integer [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlink : uri [0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcapabilities : Reference [1..1] CapabilityStatement Fixture💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดautocreate : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดautodelete : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [0..1] Any Variable💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdefaultValue : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดheaderField : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดhint : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]Rule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [1..1] Any RuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]Ruleset💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : Reference [1..1] Any RulesetRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]RulesetRuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]SetupSetupActionOperation💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtype : Coding [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptOperationCode+ 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดFHIRDefinedType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlabel : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaccept : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontentType : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดencodeRequestUrl : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin : integer [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparams : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponseId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtargetId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดurl : string [0..1]RequestHeader💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดfield : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]Assert💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlabel : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdirection : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionDirectionType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourceId : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourceExpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcompareToSourcePath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcontentType : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดContentType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดexpression : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดheaderField : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดminimumId : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดnavigationLinks : boolean [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperator : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionOperatorType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดpath : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestMethod : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดTestScriptRequestMethodCode! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestURL : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresource : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดFHIRDefinedType! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponse : code [0..1] 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดAssertionResponseTypes! 💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดresponseCode : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsourceId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalidateProfileId : id [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดwarningOnly : boolean [0..1]ActionAssertRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]ActionAssertRuleParam💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]ActionAssertRuleset💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrulesetId : id [1..1]ActionAssertRulesetRule💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleId : id [1..1]Param💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvalue : string [1..1]Test💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดname : string [0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdescription : string [0..1]TestActionTeardownTeardownAction💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดorigin[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดdestination[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดlink[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดcapability[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดmetadata[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดfixture[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดvariable[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleset[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrequestHeader[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดparam[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดrule[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดruleset[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดassert[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดsetup[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดassert[0..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดtest[0..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดoperation[1..1]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดaction[1..*]💬 ชาวเน็ตแห่แชร์: fhir/STU/testscript.html - สรุปดราม่าล่าสุดteardown[0..1]

XML Template

<TestScript xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Logical URI to reference this test script (globally unique) -->
 <identifier><!-- 0..1 Identifier Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the test script -->
 <name value="[string]"/><!-- 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the test script -->
 <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- 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>
  <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 -->
   <capabilities><!-- 1..1 Reference(CapabilityStatement) Required Capability Statement --></capabilities>
  </capability>
 </metadata>
 <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><!-- 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 -->
  <description value="[string]"/><!-- 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- 0..1 The fluentpath expression against the fixture body -->
  <headerField value="[string]"/><!-- 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter -->
  <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>
 <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 or more header elements -->
     <field value="[string]"/><!-- 1..1 HTTP header field name -->
     <value value="[string]"/><!-- 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request -->
    <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 the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- 0..1 The fluentpath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none -->
    <expression value="[string]"/><!-- 0..1 The fluentpath expression to be evaluated -->
    <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 | eval -->
    <path value="[string]"/><!-- 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- 0..1 delete | get | options | patch | post | put -->
    <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>
 <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>
 <teardown>  <!-- 0..1 A series of required clean up steps -->
  <action>  <!-- 1..* One or more teardown operations to perform -->
   <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>

JSON Template

{doco
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Logical URI to reference this test script (globally unique)
  "identifier" : { Identifier }, // Additional identifier for the test script
  "version" : "<string>", // Business version of the test script
  "name" : "<string>", // R!  Name for this test script (computer friendly)
  "title" : "<string>", // Name for this test script (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the test script
  "useContext" : [{ UsageContext }], // Context the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable)
  "purpose" : "<markdown>", // Why this test script is defined
  "copyright" : "<markdown>", // 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
      "capabilities" : { Reference(CapabilityStatement) } // R!  Required Capability Statement
    }]
  },
  "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
    "description" : "<string>", // Natural language description of the variable
    "expression" : "<string>", // The fluentpath expression against the fixture body
    "headerField" : "<string>", // HTTP header field name for source
    "hint" : "<string>", // Hint help text for default value to enter
    "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 or more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "requestId" : "<id>", // Fixture Id of mapped request
        "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 the source fixture to be evaluated
        "compareToSourceExpression" : "<string>", // The fluentpath expression to evaluate against the source fixture
        "compareToSourcePath" : "<string>", // XPath or JSONPath expression to evaluate against the source fixture
        "contentType" : "<code>", // xml | json | ttl | none
        "expression" : "<string>", // The fluentpath expression to be evaluated
        "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 | eval
        "path" : "<string>", // XPath or JSONPath expression
        "requestMethod" : "<code>", // delete | get | options | patch | post | put
        "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 } // R!  The teardown operation to perform
    }]
  }
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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 Logical URI to reference this test script (globally unique)
  fhir:TestScript.identifier [ Identifier ]; # 0..1 Additional identifier for the test script
  fhir:TestScript.version [ string ]; # 0..1 Business version of the test script
  fhir:TestScript.name [ string ]; # 1..1 Name for this test script (computer friendly)
  fhir:TestScript.title [ string ]; # 0..1 Name for this test script (human friendly)
  fhir:TestScript.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:TestScript.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:TestScript.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:TestScript.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the test script
  fhir:TestScript.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support
  fhir:TestScript.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for test script (if applicable)
  fhir:TestScript.purpose [ markdown ]; # 0..1 Why this test script is defined
  fhir:TestScript.copyright [ markdown ]; # 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.capabilities [ Reference(CapabilityStatement) ]; # 1..1 Required Capability Statement
    ], ...;
  ];
  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.description [ string ]; # 0..1 Natural language description of the variable
    fhir:TestScript.variable.expression [ string ]; # 0..1 The fluentpath expression against the fixture body
    fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source
    fhir:TestScript.variable.hint [ string ]; # 0..1 Hint help text for default value to enter
    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 or 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.requestId [ id ]; # 0..1 Fixture Id of mapped request
        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 the source fixture to be evaluated
        fhir:TestScript.setup.action.assert.compareToSourceExpression [ string ]; # 0..1 The fluentpath expression to evaluate against the source fixture
        fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression to evaluate against the source fixture
        fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none
        fhir:TestScript.setup.action.assert.expression [ string ]; # 0..1 The fluentpath expression to be evaluated
        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 | eval
        fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression
        fhir:TestScript.setup.action.assert.requestMethod [ code ]; # 0..1 delete | get | options | patch | post | put
        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 ]; # 1..1 The teardown operation to perform
    ], ...;
  ];
]

Changes since DSTU2

TestScript
TestScript.title
  • Added Element
TestScript.status
  • Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status
TestScript.experimental
  • Now marked as Modifier
TestScript.contact
  • Type changed from BackboneElement to ContactDetail
TestScript.description
  • Type changed from string to markdown
TestScript.useContext
  • Type changed from CodeableConcept to UsageContext
  • Remove Binding http://hl7.org/fhir/ValueSet/use-context (extensible)
TestScript.jurisdiction
  • Added Element
TestScript.purpose
  • Added Element
TestScript.copyright
  • Type changed from string to markdown
TestScript.origin
  • Added Element
TestScript.origin.index
  • Added Element
TestScript.origin.profile
  • Added Element
TestScript.destination
  • Added Element
TestScript.destination.index
  • Added Element
TestScript.destination.profile
  • Added Element
TestScript.metadata.capability.origin
  • Added Element
TestScript.metadata.capability.capabilities
  • Added Element
TestScript.fixture.autocreate
  • Default Value "false" added
TestScript.fixture.autodelete
  • Default Value "false" added
TestScript.variable.defaultValue
  • Added Element
TestScript.variable.description
  • Added Element
TestScript.variable.expression
  • Added Element
TestScript.variable.hint
  • Added Element
TestScript.rule
  • Added Element
TestScript.rule.resource
  • Added Element
TestScript.rule.param
  • Added Element
TestScript.rule.param.name
  • Added Element
TestScript.rule.param.value
  • Added Element
TestScript.ruleset
  • Added Element
TestScript.ruleset.resource
  • Added Element
TestScript.ruleset.rule
  • Added Element
TestScript.ruleset.rule.ruleId
  • Added Element
TestScript.ruleset.rule.param
  • Added Element
TestScript.ruleset.rule.param.name
  • Added Element
TestScript.ruleset.rule.param.value
  • Added Element
TestScript.setup.action.operation.destination
  • Default Value "0" removed
TestScript.setup.action.operation.origin
  • Added Element
TestScript.setup.action.operation.requestId
  • Added Element
TestScript.setup.action.assert.compareToSourceExpression
  • Added Element
TestScript.setup.action.assert.expression
  • Added Element
TestScript.setup.action.assert.requestMethod
  • Added Element
TestScript.setup.action.assert.requestURL
  • Added Element
TestScript.setup.action.assert.rule
  • Added Element
TestScript.setup.action.assert.rule.ruleId
  • Added Element
TestScript.setup.action.assert.rule.param
  • Added Element
TestScript.setup.action.assert.rule.param.name
  • Added Element
TestScript.setup.action.assert.rule.param.value
  • Added Element
TestScript.setup.action.assert.ruleset
  • Added Element
TestScript.setup.action.assert.ruleset.rulesetId
  • Added Element
TestScript.setup.action.assert.ruleset.rule
  • Added Element
TestScript.setup.action.assert.ruleset.rule.ruleId
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param.name
  • Added Element
TestScript.setup.action.assert.ruleset.rule.param.value
  • Added Element
TestScript.teardown.action.operation
  • Min Cardinality changed from 0 to 1
TestScript.contact.name
  • deleted
TestScript.contact.telecom
  • deleted
TestScript.requirements
  • deleted
TestScript.metadata.capability.conformance
  • deleted
TestScript.multiserver
  • deleted
TestScript.setup.metadata
  • deleted
TestScript.test.metadata
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON.

See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 6 fail round-trip testing and 6 r3 resources are invalid (11 errors).).

 

Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle)

PathDefinitionTypeReference
TestScript.status The lifecycle status of a Value Set or Concept Map.RequiredPublicationStatus
TestScript.jurisdiction Countries and regions within which this artifact is targeted for useExtensibleJurisdiction ValueSet
TestScript.origin.profile The type of origin profile the test system supports.ExtensibleTestScriptProfileOriginType
TestScript.destination.profile The type of destination profile the test system supports.ExtensibleTestScriptProfileDestinationType
TestScript.setup.action.operation.type The allowable operation code types.ExtensibleTestScriptOperationCode
TestScript.setup.action.operation.resource
TestScript.setup.action.assert.resource
Either a resource or a data type.RequiredDefined Types
TestScript.setup.action.operation.accept
TestScript.setup.action.operation.contentType
TestScript.setup.action.assert.contentType
The content or mime type.RequiredContentType
TestScript.setup.action.assert.direction The type of direction to use for assertion.RequiredAssertionDirectionType
TestScript.setup.action.assert.operator The type of operator to use for assertion.RequiredAssertionOperatorType
TestScript.setup.action.assert.requestMethod The allowable request method or HTTP operation codes.RequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.response The type of response code to use for assertion.RequiredAssertionResponseTypes

  • inv-1: On TestScript.setup.action: Setup action SHALL contain either an operation or assert but not both. (expression on TestScript.setup.action: operation.exists() xor assert.exists())
  • inv-10: On TestScript.setup.action.assert: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither. (expression on TestScript.setup.action.assert: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists()))
  • inv-11: On TestScript.test.action.assert: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither. (expression on TestScript.test.action.assert: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists()))
  • inv-12: On TestScript.setup.action.assert: Setup action assert response and responseCode SHALL be empty when direction equals request (expression on TestScript.setup.action.assert: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response')
  • inv-13: On TestScript.test.action.assert: Test action assert response and response and responseCode SHALL be empty when direction equals request (expression on TestScript.test.action.assert: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response')
  • inv-2: On TestScript.test.action: Test action SHALL contain either an operation or assert but not both. (expression on TestScript.test.action: operation.exists() xor assert.exists())
  • inv-3: On TestScript.variable: Variable can only contain one of expression, headerField or path. (expression on TestScript.variable: expression.empty() or headerField.empty() or path.empty())
  • inv-4: On TestScript.metadata: TestScript metadata capability SHALL contain required or validated or both. (expression on TestScript.metadata: capability.required.exists() or capability.validated.exists())
  • inv-5: On TestScript.setup.action.assert: Only a single assertion SHALL be present within setup action assert element. (expression on TestScript.setup.action.assert: contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1)
  • inv-6: On TestScript.test.action.assert: Only a single assertion SHALL be present within test action assert element. (expression on TestScript.test.action.assert: contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1)
  • inv-7: On TestScript.setup.action.operation: Setup operation SHALL contain either sourceId or targetId or params or url. (expression on TestScript.setup.action.operation: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history')))
  • inv-8: On TestScript.test.action.operation: Test operation SHALL contain either sourceId or targetId or params or url. (expression on TestScript.test.action.operation: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history')))
  • inv-9: On TestScript.teardown.action.operation: Teardown operation SHALL contain either sourceId or targetId or params or url. (expression on TestScript.teardown.action.operation: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | '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.

NameTypeDescriptionExpressionIn Common
datedateThe test script publication dateTestScript.date
descriptionstringThe description of the test scriptTestScript.description
identifiertokenExternal identifier for the test scriptTestScript.identifier
jurisdictiontokenIntended jurisdiction for the test scriptTestScript.jurisdiction
namestringComputationally friendly name of the test scriptTestScript.name
publisherstringName of the publisher of the test scriptTestScript.publisher
statustokenThe current status of the test scriptTestScript.status
testscript-capabilitystringTestScript required and validated capabilityTestScript.metadata.capability.description
titlestringThe human-friendly name of the test scriptTestScript.title
urluriThe uri that identifies the test scriptTestScript.url
versiontokenThe business version of the test scriptTestScript.version