description: Base StructureDefinition for TestScript Resource package_name: hl7.fhir.r2b.core derivation: specialization name: TestScript type: null elements: description: isModifier: false short: Natural language description of the TestScript index: 11 comments: This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is *not* a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.description} isSummary: true requirements: isModifier: false short: Scope and Usage this Test Script is for index: 13 comments: This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.requirements} isSummary: false date: isModifier: false short: Date for this version of the TestScript index: 10 comments: Additional specific dates may be added as extensions. type: dateTime mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.date} isSummary: true variable: constraint: inv-4: {human: Variable cannot contain both headerField and path., severity: error, expression: headerField.empty() or path.empty()} isModifier: false short: Placeholder for evaluated elements index: 38 comments: Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in "operation.params", "operation.requestHeader.value", and "operation.url" element values during operation calls and in "assert.value" during assertion evaluations. This limits the places that test engines would need to look for placeholders "${}". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in "operation.params", "operation.requestHeader.value", and "operation.url" element values during operation calls and in "assert.value" during assertion evaluations. See example testscript-search.xml. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Descriptive name for this variable index: 39 comments: Placeholders would contain the variable name wrapped in ${} in "operation.params", "operation.requestHeader.value", and "operation.url" elements. These placeholders would need to be replaced by the variable value before the operation is executed. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.variable.name} isSummary: false defaultValue: isModifier: false short: Default, hard-coded, or user-defined value for this variable index: 40 comments: The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.variable.defaultValue} isSummary: false headerField: isModifier: false short: HTTP header field name for source index: 41 comments: If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.variable.headerField} isSummary: false path: isModifier: false short: XPath or JSONPath against the fixture body index: 42 comments: If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.variable.path} isSummary: false sourceId: isModifier: false short: Fixture Id of source expression or headerField within this variable index: 43 comments: This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element. type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.variable.sourceId} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.variable} required: [name] isSummary: false publisher: isModifier: false short: Name of the publisher (Organization or individual) index: 6 comments: Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.publisher} isSummary: true name: isModifier: false short: Informal name for this TestScript index: 2 comments: Not expected to be globally unique. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.name} isSummary: true rule: isModifier: false short: Assert rule used within the test script index: 44 comments: Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. type: BackboneElement mustSupport: false array: true elements: resource: isModifier: false short: Assert rule resource reference index: 45 type: Reference mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.rule.resource} isSummary: false param: isModifier: false short: Rule parameter template index: 46 comments: The parameter value can be dynamic at runtime. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Parameter name matching external assert rule parameter index: 47 comments: The external rule template would be looking for the parameter by this name. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.rule.param.name} isSummary: false value: isModifier: false short: Parameter value defined either explicitly or dynamically index: 48 comments: This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.rule.param.value} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.rule.param} required: [name] isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.rule} required: [resource] isSummary: false useContext: isModifier: false short: Content intends to support these contexts index: 12 type: CodeableConcept mustSupport: false array: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.useContext} isSummary: true copyright: isModifier: false short: Use and/or publishing restrictions type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.copyright} isSummary: false index: 14 experimental: isModifier: false short: If for testing purposes, not real usage type: boolean mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.experimental} isSummary: true index: 5 setup: isModifier: false short: A series of required setup operations before tests are executed index: 55 type: BackboneElement mustSupport: false elements: metadata: constraint: inv-6: {human: Setup metadata capability SHALL contain required or validated or both., severity: error, expression: capability.required = true or capability.validated = true} elementReference: ['http://hl7.org/fhir/StructureDefinition/TestScript'] isModifier: false short: Capabilities that are assumed to function correctly on the FHIR server being tested index: 56 mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.metadata} isSummary: false action: constraint: inv-1: {human: Setup action SHALL contain either an operation or assert but not both., severity: error, expression: operation.exists() xor assert.exists()} min: 1 isModifier: false short: A setup operation or assert to perform index: 57 comments: An action should contain either an operation or an assertion but not both. It can contain any number of variables. type: BackboneElement mustSupport: false array: true elements: operation: constraint: inv-10: {human: Setup operation SHALL contain either sourceId or targetId or params or url., severity: error, expression: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' |'search' | 'transaction' | 'history'))} isModifier: false short: The setup operation to perform index: 58 type: BackboneElement mustSupport: false elements: description: isModifier: false short: Tracking/reporting operation description index: 62 comments: This has no impact on the verification itself. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.description} isSummary: false targetId: isModifier: false short: Id of fixture used for extracting the [id], [type], and [vid] for GET requests index: 74 comments: If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used. type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.targetId} isSummary: false requestHeader: isModifier: false short: Each operation can have one ore more header elements index: 69 comments: 'This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - "If-Modified-Since" and "If-None-Match" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - "If-Match" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using "If-None-Exist". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid "Content-Type" header for negative testing. - etc.' type: BackboneElement mustSupport: false array: true elements: field: isModifier: false short: HTTP header field name index: 70 comments: If header element is specified, then field is required. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.requestHeader.field} isSummary: false value: isModifier: false short: HTTP headerfield value index: 71 comments: If header element is specified, then value is required. No conversions will be done by Test Engine e.g. "xml" to "application/xml+fhir". The values will be set in HTTP headers "as-is". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.requestHeader.value} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.setup.action.operation.requestHeader} required: [value, field] isSummary: false params: isModifier: false short: Explicitly defined path parameters index: 68 comments: 'If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used. Test engines would append whatever is specified for "params" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The "params" element does not correspond exactly to "search parameters". Nor is it the "path". It corresponds to the part of the URL that comes after the [type] (when "resource" element is specified); e.g. It corresponds to "/[id]/_history/[vid] {?_format=[mime-type]}" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.' type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.params} isSummary: false type: isModifier: false short: The operation code type that will be executed index: 59 comments: See http://hl7-fhir.github.io/http.html for list of server interactions. type: Coding mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.type} isSummary: false encodeRequestUrl: isModifier: false short: Whether or not to send the request url in encoded format index: 66 type: boolean defaultValueBoolean: true mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.encodeRequestUrl} isSummary: false label: isModifier: false short: Tracking/logging operation label index: 61 comments: This has no impact on the verification itself. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.label} isSummary: false resource: isModifier: false short: Resource type index: 60 comments: If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used. type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.resource} isSummary: false url: isModifier: false short: Request URL index: 75 comments: Used to set the request URL explicitly. If "url" element is defined, then "targetId", "resource", and "params" elements will be ignored. Test engines would use whatever is specified in "url" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.url} isSummary: false origin: isModifier: false short: Server initiating the request index: 67 comments: If absent, test engine will send the message. When present, test engine will not send the request message but will wait for the request message to be sent from this origin server. type: integer mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.origin} isSummary: false contentType: isModifier: false short: xml | json index: 64 comments: If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element. type: code mustSupport: false meaningWhenMissing: xml maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.contentType} isSummary: false sourceId: isModifier: false short: Fixture Id of body for PUT and POST requests type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.sourceId} isSummary: false index: 73 responseId: isModifier: false short: Fixture Id of mapped response index: 72 comments: If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by "responseId". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified. type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.responseId} isSummary: false destination: isModifier: false short: Server responding to the request index: 65 comments: If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will error as it cannot determine what destination to use for the exchange. type: integer mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.destination} isSummary: false accept: isModifier: false short: xml | json index: 63 comments: If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element. type: code mustSupport: false meaningWhenMissing: xml maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation.accept} isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.operation} isSummary: false assert: constraint: inv-13: {human: Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither., severity: error, expression: compareToSourceId.empty() xor compareToSourcePath.exists()} inv-8: {human: Only a single assertion SHALL be present within setup action assert element., severity: error, expression: contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1} isModifier: false short: The assertion to perform index: 76 comments: In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine. type: BackboneElement mustSupport: false elements: response: isModifier: false short: okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable index: 89 comments: This is a shorter way of achieving similar verifications via "assert.responseCode". If you need more control, then use "assert.responseCode" e.g.. type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.response} isSummary: false description: isModifier: false short: Tracking/reporting assertion description index: 78 comments: This has no impact on the verification itself. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.description} isSummary: false path: isModifier: false short: XPath or JSONPath expression index: 87 comments: If both "path" and "fixtureId" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If "path" is specified and "fixtureId" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.path} isSummary: false headerField: isModifier: false short: HTTP header field name index: 83 comments: If "headerField" is specified then "value" must be specified. If "sourceId" is not specified, then "headerField" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.headerField} isSummary: false compareToSourceId: isModifier: false short: Id of fixture used to compare the "sourceId/path" evaluations to index: 80 comments: The id of the fixture used to make comparisons to. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.compareToSourceId} isSummary: false rule: isModifier: false short: Id of the TestScript.rule index: 91 comments: Each rule should get evaluated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. type: BackboneElement mustSupport: false elements: param: isModifier: false short: Rule parameter template index: 92 comments: The parameter value can be dynamic at runtime. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Parameter name matching external assert rule parameter index: 93 comments: The external rule template would be looking for the parameter by this name. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.rule.param.name} isSummary: false value: isModifier: false short: Parameter value defined either explicitly or dynamically index: 94 comments: This value overwrites the value (if any) specified in TestScript.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.rule.param.value} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.setup.action.assert.rule.param} required: [name, value] isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.rule} isSummary: false value: isModifier: false short: The value to compare to index: 102 comments: The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.value} isSummary: false warningOnly: isModifier: false short: Will this assert produce a warning only on error? index: 103 comments: If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning. type: boolean defaultValueBoolean: false mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.warningOnly} isSummary: false label: isModifier: false short: Tracking/logging assertion label index: 77 comments: This has no impact on the verification itself. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.label} isSummary: false resource: isModifier: false short: Resource type index: 88 comments: This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. . type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.resource} isSummary: false responseCode: isModifier: false short: HTTP response code to test index: 90 comments: To be used with "operator" attribute value. Asserts that the response code equals this value if "operator" is not specified. If the operator is "in" or "notIn" then the responseCode would be a comma-separated list of values e.g. "200,201". Otherwise, it's expected to be a numeric value. If "fixture" is not specified, then the "responseBodyId" value of the last operation is assumed. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.responseCode} isSummary: false minimumId: isModifier: false short: Fixture Id of minimum content resource index: 84 comments: Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.minimumId} isSummary: false operator: isModifier: false short: equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains index: 86 comments: Operators are useful especially for negative testing. If operator is not specified, then the "equals" operator is assumed; e.g. . type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.operator} isSummary: false contentType: isModifier: false short: xml | json index: 82 comments: If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If "assert.sourceId" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be confirmed. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead. type: code mustSupport: false meaningWhenMissing: xml maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.contentType} isSummary: false compareToSourcePath: isModifier: false short: XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to index: 81 comments: The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if "assert.value" is used. The evaluation will be done before the assertion is evaluated. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.compareToSourcePath} isSummary: false validateProfileId: isModifier: false short: Profile Id of validation profile reference index: 101 comments: The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId. type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.validateProfileId} isSummary: false sourceId: isModifier: false short: Fixture Id of source expression or headerField index: 100 comments: This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element. type: id mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.sourceId} isSummary: false ruleset: isModifier: false short: Id of the TestScript.ruleset index: 95 comments: Each rule within a ruleset should get evaluated by test engines as a separate assertion. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. If the first rule within the ruleset results in a failed assertion, then test engines do not have to evaluate the rest of the rules within the ruleset. type: BackboneElement mustSupport: false elements: rule: min: 1 isModifier: false short: Id of referenced rule within the ruleset index: 96 comments: This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset. type: BackboneElement mustSupport: false array: true elements: param: isModifier: false short: Rule parameter template index: 97 comments: The parameter value can be dynamic at runtime. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Parameter name matching external assert ruleset rule parameter index: 98 comments: The external rule template would be looking for the parameter by this name. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.ruleset.rule.param.name} isSummary: false value: isModifier: false short: Parameter value defined either explicitly or dynamically index: 99 comments: This value overwrites the value (if any) specified in TestScript.ruleset.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.ruleset.rule.param.value} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.setup.action.assert.ruleset.rule.param} required: [name, value] isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.setup.action.assert.ruleset.rule} isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.ruleset} required: [rule] isSummary: false direction: isModifier: false short: response | request type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.direction} isSummary: false index: 79 navigationLinks: isModifier: false short: Perform validation on navigation links? index: 85 comments: Asserts that the Bundle contains first, last, and next links. type: boolean mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert.navigationLinks} isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup.action.assert} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.setup.action} isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.setup} required: [action] isSummary: false status: isModifier: true short: draft | active | retired index: 3 type: code mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.status} isSummary: true url: isModifier: false short: Absolute URL used to reference this TestScript index: 0 type: uri mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.url} isSummary: true identifier: isModifier: false short: External identifier type: Identifier mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.identifier} isSummary: true index: 4 origin: isModifier: false short: An abstract server representing a client or sender in a message exchange index: 15 comments: The purpose of this element is to define the profile of an origin element used elsewhere in the script. Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction. type: BackboneElement mustSupport: false array: true elements: index: isModifier: false short: The index of the abstract origin server starting at 1 index: 16 comments: A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and and again as FormProcessor within the same script as that could get confusing during test configuration). Different origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler). The origin indices provided elsewhere in the test script must be one of these origin indices. type: integer mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.origin.index} isSummary: false profile: isModifier: false short: FHIR-Client | FHIR-SDC-FormFiller index: 17 comments: Must be a "sender"/"client" profile. type: Coding mustSupport: false meaningWhenMissing: FHIR-Client maxLength: 0 base: {max: '1', min: 0, path: TestScript.origin.profile} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.origin} required: [index, profile] isSummary: false fixture: isModifier: false short: Fixture in the test script - by reference (uri) index: 33 type: BackboneElement mustSupport: false array: true elements: autocreate: isModifier: false short: Whether or not to implicitly create the fixture during setup index: 34 type: boolean defaultValueBoolean: false mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.fixture.autocreate} isSummary: false autodelete: isModifier: false short: Whether or not to implicitly delete the fixture during teardown index: 35 type: boolean defaultValueBoolean: false mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.fixture.autodelete} isSummary: false resource: isModifier: false short: Reference of the resource index: 36 comments: See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types. type: Reference mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.fixture.resource} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.fixture} isSummary: false version: isModifier: false short: Logical id for this version of the TestScript type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.version} isSummary: true index: 1 teardown: isModifier: false short: A series of required clean up steps index: 111 type: BackboneElement mustSupport: false elements: action: constraint: inv-3: {human: Teardown action SHALL contain an operation., severity: error, expression: operation.exists()} min: 1 isModifier: false short: One or more teardown operations to perform index: 112 comments: An action should contain either an operation or an assertion but not both. It can contain any number of variables. type: BackboneElement mustSupport: false array: true elements: operation: constraint: inv-12: {human: Teardown operation SHALL contain either sourceId or targetId or params or url., severity: error, expression: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))} elementReference: ['http://hl7.org/fhir/StructureDefinition/TestScript'] isModifier: false short: The teardown operation to perform index: 113 mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.teardown.action.operation} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.teardown.action} isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.teardown} required: [action] isSummary: false ruleset: isModifier: false short: Assert ruleset used within the test script index: 49 comments: Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. type: BackboneElement mustSupport: false array: true elements: resource: isModifier: false short: Assert ruleset resource reference index: 50 type: Reference mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.ruleset.resource} isSummary: false rule: min: 1 isModifier: false short: Id of referenced rule within the ruleset index: 51 comments: This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset. type: BackboneElement mustSupport: false array: true elements: param: isModifier: false short: Ruleset rule parameter template index: 52 comments: The parameter value can be dynamic at runtime. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Parameter name matching external assert ruleset rule parameter index: 53 comments: The external rule template would be looking for the parameter by this name. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.ruleset.rule.param.name} isSummary: false value: isModifier: false short: Parameter value defined either explicitly or dynamically index: 54 comments: This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.ruleset.rule.param.value} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.ruleset.rule.param} required: [name] isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.ruleset.rule} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.ruleset} required: [resource, rule] isSummary: false contact: isModifier: false short: Contact details of the publisher index: 7 comments: May be a web site, an email address, a telephone number (tel:), etc. type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Name of an individual to contact index: 8 comments: If there is no named individual, the telecom is for the organization as a whole. type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.contact.name} isSummary: true telecom: isModifier: false short: Contact details for individual or publisher index: 9 type: ContactPoint mustSupport: false array: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.contact.telecom} isSummary: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.contact} isSummary: true metadata: constraint: inv-5: {human: TestScript metadata capability SHALL contain required or validated or both., severity: error, expression: capability.required.exists() or capability.validated.exists()} isModifier: false short: Required capability that is assumed to function correctly on the FHIR server being tested index: 21 type: BackboneElement mustSupport: false elements: link: isModifier: false short: Links to the FHIR specification index: 22 type: BackboneElement mustSupport: false array: true elements: url: isModifier: false short: URL to the specification index: 23 type: uri mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.link.url} isSummary: false description: isModifier: false short: Short description type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.link.description} isSummary: false index: 24 maxLength: 0 base: {max: '*', min: 0, path: TestScript.metadata.link} required: [url] isSummary: false capability: min: 1 isModifier: false short: Capabilities that are assumed to function correctly on the FHIR server being tested index: 25 comments: When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped. When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The "metadata.capabilities.required" and "metadata.capabilities.validated" elements only indicate whether the capabilities are the primary focus of the test script or not. The do not impact the skipping logic. Capabilities whose "metadata.capabilities.validated" flag is true are the primary focus of the test script. type: BackboneElement mustSupport: false array: true elements: required: isModifier: false short: Are the capabilities required? index: 26 type: boolean defaultValueBoolean: false mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.capability.required} isSummary: false validated: isModifier: false short: Are the capabilities validated? index: 27 type: boolean defaultValueBoolean: false mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.capability.validated} isSummary: false description: isModifier: false short: The expected capabilities of the server type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.capability.description} isSummary: false index: 28 origin: isModifier: false short: Which origin server these requirements apply to index: 29 type: integer mustSupport: false array: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.metadata.capability.origin} isSummary: false destination: isModifier: false short: Which server these requirements apply to type: integer mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.capability.destination} isSummary: false index: 30 link: isModifier: false short: Links to the FHIR specification index: 31 type: uri mustSupport: false array: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.metadata.capability.link} isSummary: false conformance: isModifier: false short: Required Conformance index: 32 comments: The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element. type: Reference mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata.capability.conformance} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.metadata.capability} required: [conformance] isSummary: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.metadata} required: [capability] isSummary: false destination: isModifier: false short: An abstract server representing a destination or receiver in a message exchange index: 18 comments: The purpose of this element is to define the profile of an destination element used elsewhere in the script. Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction. type: BackboneElement mustSupport: false array: true elements: index: isModifier: false short: The index of the abstract destination server starting at 1 index: 19 comments: A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and and again as Form-Processor within the same script as that could get confusing during test configuration). Different destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager). The destination indices provided elsewhere in the test script must be one of these destination indices. type: integer mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.destination.index} isSummary: false profile: isModifier: false short: FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor index: 20 comments: Must be a "receiver"/"server" profile. type: Coding mustSupport: false meaningWhenMissing: FHIR-Server maxLength: 0 base: {max: '1', min: 0, path: TestScript.destination.profile} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.destination} required: [index, profile] isSummary: false test: isModifier: false short: A test in this script index: 104 type: BackboneElement mustSupport: false array: true elements: name: isModifier: false short: Tracking/logging name of this test type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.test.name} isSummary: false index: 105 description: isModifier: false short: Tracking/reporting short description of the test type: string mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.test.description} isSummary: false index: 106 metadata: constraint: inv-7: {human: Test metadata capability SHALL contain required or validated or both., severity: error, expression: capability.required = true or capability.validated = true} elementReference: ['http://hl7.org/fhir/StructureDefinition/TestScript'] isModifier: false short: Capabilities that are expected to function correctly on the FHIR server being tested index: 107 mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.test.metadata} isSummary: false action: constraint: inv-2: {human: Test action SHALL contain either an operation or assert but not both., severity: error, expression: operation.exists() xor assert.exists()} min: 1 isModifier: false short: A test operation or assert to perform index: 108 comments: An action should contain either an operation or an assertion but not both. It can contain any number of variables. type: BackboneElement mustSupport: false array: true elements: operation: constraint: inv-11: {human: Test operation SHALL contain either sourceId or targetId or params or url., severity: error, expression: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))} elementReference: ['http://hl7.org/fhir/StructureDefinition/TestScript'] isModifier: false short: The setup operation to perform index: 109 mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.test.action.operation} isSummary: false assert: constraint: inv-14: {human: Test action assert shall contain both compareToSourceId and compareToSourcePath or neither., severity: error, expression: compareToSourceId.empty() xor compareToSourcePath.exists()} inv-9: {human: Only a single assertion SHALL be present within test action assert element., severity: error, expression: contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1} elementReference: ['http://hl7.org/fhir/StructureDefinition/TestScript'] isModifier: false short: The setup assertion to perform index: 110 comments: In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine. mustSupport: false maxLength: 0 base: {max: '1', min: 0, path: TestScript.test.action.assert} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.test.action} isSummary: false maxLength: 0 base: {max: '*', min: 0, path: TestScript.test} required: [action] isSummary: false profile: isModifier: false short: Reference of the validation profile index: 37 comments: See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types. type: Reference mustSupport: false array: true maxLength: 0 base: {max: '*', min: 0, path: TestScript.profile} isSummary: false package_version: 1.4.0 class: resource kind: resource url: http://hl7.org/fhir/StructureDefinition/TestScript base: http://hl7.org/fhir/StructureDefinition/DomainResource version: null required: [url, name, status]