FHIR Testing IG
0.1.0-SNAPSHOT - Draft International flag

FHIR Testing IG, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0-SNAPSHOT built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-testing-ig/ and changes regularly. See the Directory of published versions

TestScript: TestScript Example Search

Computable Name:

Language: en

url: http://hl7.org/fhir/TestScript/testscript-example-search

identifier: Uniform Resource Identifier (URI)/urn:oid:2.16.840.1.113883.4.642.12.3

version: 1.0

name: TestScriptExampleSearch

title: TestScript Example Search

status: Draft

experimental: true

date: 2017-01-18

publisher: HL7

contact: Support: support@HL7.org

description:

TestScript example resource with simple Patient search test. The read tests will utilize user defined dynamic variables that will hold the Patient search parameter values.

jurisdiction: United States of America

purpose:

Patient Search Operation

copyright:

© HL7.org 2011+

metadata

Links

-UrlDescription
*http://hl7.org/fhir/patient.htmlDemographics and other administrative information about an individual or animal receiving care or other health-related services.

Capabilities

-RequiredValidatedDescriptionLinkCapabilities
*truefalsePatient Search Operationhttp://hl7.org/fhir/http.html#searchhttp://hl7.org/fhir/CapabilityStatement/example

fixture

id

fixture-patient-create

autocreate: false

autodelete: false

resource: Peter Chalmers

profile: Bundle

variable

name: PatientCreateLocation

headerField: Location

sourceId: PatientCreateResponse

variable

name: PatientSearchFamilyName

description: Enter patient search criteria for a known family name on the target system

hint: [Family name]

variable

name: PatientSearchGivenName

description: Enter patient search criteria for a known given name on the target system

hint: [Given name]

variable

name: PatientSearchBundleTotal

description: Evaluate the returned Patient searchset Bundle.total value

Expressions

-LanguageExpression
*text/fhirpathBundle.total.toInteger()

setup

action

Operations

-TypeResourceDescriptionAcceptEncodeRequestUrlParams
*FHIR Restful Interactions: search (search)http://hl7.org/fhir/StructureDefinition/PatientTest simple search to verify server support.xmltrue?family=DONTEXPECTAMATCH&given=DONTEXPECTAMATCH

action

Asserts

-DescriptionDirectionOperatorRequestURLStopTestOnFailWarningOnly
*Confirm that the request url contains the family search parameter.requestcontainsfamilyfalsefalse

action

Asserts

-DescriptionDirectionResponseCodeStopTestOnFailWarningOnly
*Confirm that the returned HTTP status is 200(OK).response200falsefalse

action

Asserts

-DescriptionResourceStopTestOnFailWarningOnly
*Confirm that the returned resource type is Bundle.http://hl7.org/fhir/StructureDefinition/Bundlefalsefalse

action

Asserts

-DescriptionNavigationLinksStopTestOnFailWarningOnly
*Confirm that the returned Bundle correctly defines the navigation links.truefalsefalse

test

id

01-PatientCreateSearch

name: Patient Create Search

description: Create a Patient resource and capture the returned HTTP Header Location. Then search for (read) that Patient using the Location URL value and validate the response.

action

Exception Generating Narrative: Unable to resolve content reference http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation trying to resolve TestScript.test.action.operation