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 Summary Rule With Param JSON Syntax Example

Active as of 2023-07-03

Generated Narrative: TestScript

Resource TestScript "patient-read-summary-rule-with-param-json"

Profile: AEGIS Touchstone Testing TestScript Profile

AEGIS Touchstone Testing TestScript Rule Extension

url

ruleId

value: RuleContentTypeIfBody

url

path

value: /FHIRCommon/_reference/rule/AssertHeaderIfBody.groovy

url

param

url

param

url

param

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

version: 2.0.0

name: PatientReadSummaryRuleWithParamJson

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 the AEGIS Touchstone Testing IG rule extensions (no params) with a Patient read. The actual test is a read operation for a Patient in JSON format with the _summary=true parameter where the rule allows a single assert to test for the existence of the Content-Type header if a payload is returned.

jurisdiction: World (m49.htm#001)

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

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

Variables

-NameHint
*patientResourceIdEnter a known Patient resource id

test

id

PatientReadSummaryRuleWithParam

name: PatientReadSummaryRuleWithParam

description: Read a known Patient in JSON format. The expected response code is 200 (OK). The expected response payload is the Patient resource with only the allowed summary elements in JSON format.

action

Operations

-TypeResourceDescriptionAcceptEncodeRequestUrlParams
*Read (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code read = 'Read', stated as 'null')PatientRead the created Patient. The destination server must support the _summary=true parameter.jsonfalse/${patientResourceId}?_summary=true

action

Asserts

-ExtensionDescriptionDirectionResponseWarningOnly
*Confirm that the returned HTTP status is 200(OK).responseokayfalse

action

Asserts

-ExtensionDescriptionDirectionWarningOnly
*, Complex rule assertion to evaluate if Content-Type header is present if a payload is returned.responsefalse

action

Asserts

-ExtensionDescriptionDirectionResourceWarningOnly
*Confirm that the returned resource type is Patient.responsePatientfalse

action

Asserts

-DescriptionDirectionValidateProfileIdWarningOnly
*Validate that the returned resource conforms to the base FHIR Patient profile.responsepatient-profilefalse