Touchstone FHIR Testing
2.0.0 - current International flag

Touchstone FHIR Testing v2.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

Example TestScript: TestScript Patient Read Not Found RuleSet With Param JSON Syntax Example

Active as of 2023-07-03

Generated Narrative: TestScript

Resource TestScript "patient-read-notfound-ruleset-with-param-json"

Profile: AEGIS Touchstone Testing TestScript Profile

AEGIS Touchstone Testing TestScript Ruleset Extension

url

rulesetId

value: RulesetPatientNotFound

url

path

value: ../_reference/ruleset/RuleSet-NotFound-Groovy.xml

url

rule

url

rule

url

rule

url

rule

url: http://touchstone.aegis.net/touchstone/fhir/testing/TestScript/patient-read-notfound-ruleset-with-param-json

version: 2.0.0

name: PatientReadNotFoundRulesetWithParamJson

status: active

date: 2023-07-03

publisher: AEGIS.net, Inc.

contact: AEGIS.net, Inc.: https://www.aegis.net, Richard Ettema: mailto:richard.ettema@aegis.net

description: Demonstrate the use of a ruleset with a Patient read. The actual test is a read operation for a Patient in JSON format where the patient is not found and a ruleset is used to conditionally check the system under test to either skip or apply checks for HTTP response headers the payload content.

jurisdiction: World (m49.htm#001)

copyright: (c) AEGIS.net, Inc. 2015+

profile: http://hl7.org/fhir/StructureDefinition/Patient "Patient"

Variables

-NameDescriptionHint
*NotFoundPatientResourceIdEnter a Patient resource id that does not exist on the destination system.[Not Found Resource Id]

test

id

01-ReadNotFoundJSON

name: ReadNotFoundJSON

description: Test the read operation for a known, not found (never existed) Patient resource instance. The expected HTTP response is 404 (Not Found) and optional content of an OperationOutcome resource in JSON format.

action

Operations

-TypeResourceDescriptionAcceptEncodeRequestUrlParams
*Read (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code read = 'Read', stated as 'null')PatientPatient read operation for a known, not found (never existed) resource instance.jsontrue/${NotFoundPatientResourceId}

action

Asserts

-ExtensionDescriptionDirectionResponseCodeWarningOnly
*Confirm that the returned HTTP status is 404(Not Found).response404false

action

Asserts

-ExtensionDescriptionDirectionWarningOnly
*Complex ruleset assertion to conditionally validate expected HTTP Headers and payload.responsefalse