This
page
is
part
of
the
FHIR
Specification
(v4.0.1:
R4
(v4.3.0:
R4B
-
Mixed
Normative
and
STU
)
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
).
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
R4B
R4
R3
| FHIR Infrastructure Work Group | Maturity Level : N/A | Standards Status : Informative | Compartments : Not linked to any defined compartments |
This is the narrative for the resource. See also the XML , JSON or Turtle format. This example conforms to the profile TestScript .
Generated
Narrative
with
Details
Resource "testscript-example-search"
url
:
http://hl7.org/fhir/TestScript/testscript-example-search
identifier : id: urn:oid:1.3.6.1.4.1.21367.2005.3.7.9881
version : 1.0
name : TestScript Example Search
status : draft
experimental : true
date
:
18/01/2017
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
(the)
(Details
:
{urn:iso:std:iso:3166
code
'US'
=
'United
States
of
America',
given
as
'United
States
of
America
(the)'})
(unknown#US)
purpose : Patient Search Operation
copyright : © HL7.org 2011+
metadata
Links
- Url Description * http://hl7.org/fhir/patient.html Demographics and other administrative information about an individual or animal receiving care or other health-related services. Capabilities
- Required Validated Description Link Capabilities * true false Patient Search Operation http://hl7.org/fhir/http.html#search CapabilityStatement/examplehttp://hl7.org/fhir/CapabilityStatement/example
| - | Autocreate | Autodelete | Resource |
| * | false | false | Patient/example: Peter Chalmers "Peter CHALMERS" |
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
expression : Bundle.total.toInteger()
setup
action
Operations
- Type Resource Description Accept EncodeRequestUrl Params * Search (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code search = 'Search', stated as 'null') Patient Test simple search to verify server support. xml true ?family=DONTEXPECTAMATCH&given=DONTEXPECTAMATCH action
Asserts
- Description Direction Operator RequestURL WarningOnly * Confirm that the request url contains the family search parameter. request contains family false action
Asserts
- Description Direction ResponseCode WarningOnly * Confirm that the returned HTTP status is 200(OK). response 200 false action
Asserts
- Description Resource WarningOnly * Confirm that the returned resource type is Bundle. Bundle false action
Asserts
- Description NavigationLinks WarningOnly * Confirm that the returned Bundle correctly defines the navigation links. true false
test
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
Operations
- Type Resource Description Accept ContentType EncodeRequestUrl ResponseId SourceId * Create (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code create = 'Create', stated as 'null') Patient Create a Patient resource and capture the returned HTTP Header Location. xml xml true PatientCreateResponse fixture-patient-create action
Asserts
- Description Response WarningOnly * Confirm that the returned HTTP status is 201(Created). created false action
Asserts
- Description Direction HeaderField Operator WarningOnly * Confirm that the returned HTTP Header Location is present. response Location notEmpty false action
Operations
- Type Description Accept EncodeRequestUrl Url * Read (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code read = 'Read', stated as 'null') Read the created Patient using the captured Location URL value. xml true ${PatientCreateLocation} action
Asserts
- Description Response WarningOnly * Confirm that the returned HTTP status is 200(OK). okay false action
Asserts
- Description Resource WarningOnly * Confirm that the returned resource type is Patient. Patient false
test
name : Patient Search Dynamic
description : Search for Patient resources using the user defined dynamic variables ${PatientSearchFamilyName} and ${PatientSearchGivenName} and validate response.
action
Operations
- Type Resource Description Accept EncodeRequestUrl Params * Search (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code search = 'Search', stated as 'null') Patient Search for Patient resources on the destination test system. xml true ?family=${PatientSearchFamilyName}&given=${PatientSearchGivenName} action
Asserts
- Description Response WarningOnly * Confirm that the returned HTTP status is 200(OK). okay false action
Asserts
- Description ContentType WarningOnly * Confirm that the returned format is XML. xml false action
Asserts
- Description Resource WarningOnly * Confirm that the returned resource type is Bundle. Bundle false action
Asserts
- Description ValidateProfileId WarningOnly * Confirm that the returned Bundle conforms to the base FHIR specification. bundle-profile false action
Asserts
- Description Operator Path Value WarningOnly * Confirm that the returned Bundle type equals 'searchset'. equals fhir:Bundle/fhir:type/@value searchset false action
Asserts
- Description Expression WarningOnly * Confirm that the returned Bundle total is greater than or equal to the number of returned entries. Bundle.total.toInteger() >= entry.count() false
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.