This page is part of the FHIR Specification (v1.4.0:
STU
3 Ballot 3). The current version which supercedes this version is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
. For a full list of available versions, see the
Directory of published versions
.
Page
versions:
. Page versions:
R5
R4B
R4
R3
R2
|
|
Compartments
|
A search parameter that defines a named search item that can be used to search/filter on a resource.
Implementers should be familiar with the background and concepts described in Profiling FHIR before working with this resource.
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
I | DomainResource |
|
|
|
Σ | 1..1 | uri |
|
|
Σ | 1..1 | string |
|
|
|
0..1 | code |
ConformanceResourceStatus |
|
Σ | 0..1 | boolean |
|
|
Σ | 0..1 | dateTime | Publication Date(/time) |
![]() ![]() | Σ | 0..1 | string |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | ContactPoint |
|
|
Σ |
|
|
Context of Use ValueSet ( Extensible ) |
|
0..1 | string |
|
|
|
Σ | 1..1 | code |
|
|
Σ | 1..1 | code |
ResourceType |
|
Σ | 1..1 | code |
SearchParamType |
|
Σ | 1..1 | string |
|
|
I | 0..1 | string | FluentPath expression that extracts the values |
![]() ![]() |
I | 0..1 | string |
|
|
I | 0..1 | code |
XPathUsageType |
|
0..* | code |
ResourceType |
|
Documentation for this format
|
||||
UML
Diagram
UML Diagram
XML
Template
XML Template
<SearchParameter xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 1..1 Absolute URL used to reference this search parameter --> <name value="[string]"/><!-- 1..1 Informal name for this search parameter --> <status value="[code]"/><!-- 0..1 draft | active | retired --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Publication Date(/time) --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher -->
<<name value="[string]"/><!-- 0..1 Name of an individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact><<useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <requirements value="[string]"/><!-- 0..1 Why this search parameter is defined --> <code value="[code]"/><!-- 1..1 Code used in URL --> <base value="[code]"/><!-- 1..1 The resource type this search parameter applies to --> <type value="[code]"/><!-- 1..1 number | date | string | token | reference | composite | quantity | uri --> <description value="[string]"/><!-- 1..1 Documentation for search parameter --> <expression value="[string]"/><!--0..1 FluentPath expression that extracts the values --> <xpath value="[string]"/><!--
0..1 XPath that extracts the values --> <xpathUsage value="[code]"/><!--
0..1 normal | phonetic | nearby | distance | other --> <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) --> </SearchParameter>
JSON
Template
JSON Template
{
"resourceType" : "SearchParameter",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"url" : "<uri>", // R! Absolute URL used to reference this search parameter
"name" : "<string>", // R! Informal name for this search parameter
"status" : "<code>", // draft | active | retired
"experimental" : <boolean>, // If for testing purposes, not real usage
"date" : "<dateTime>", // Publication Date(/time)
"publisher" : "<string>", // Name of the publisher (Organization or individual)
"contact" : [{ // Contact details of the publisher
"
"name" : "<string>", // Name of an individual to contact
"telecom" : [{ ContactPoint }] // Contact details for individual or publisher
}],
"
"useContext" : [{ CodeableConcept }], // Content intends to support these contexts
"requirements" : "<string>", // Why this search parameter is defined
"code" : "<code>", // R! Code used in URL
"base" : "<code>", // R! The resource type this search parameter applies to
"type" : "<code>", // R! number | date | string | token | reference | composite | quantity | uri
"description" : "<string>", // R! Documentation for search parameter
"expression" : "<string>", // C? FluentPath expression that extracts the values
"xpath" : "<string>", // C? XPath that extracts the values
"xpathUsage" : "<code>", // C? normal | phonetic | nearby | distance | other
"target" : ["<code>"] // Types of resource (if a resource reference)
}
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
I | DomainResource |
|
|
|
Σ | 1..1 | uri |
|
|
Σ | 1..1 | string |
|
|
|
0..1 | code |
ConformanceResourceStatus |
|
Σ | 0..1 | boolean |
|
|
Σ | 0..1 | dateTime | Publication Date(/time) |
![]() ![]() | Σ | 0..1 | string |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | ContactPoint |
|
|
Σ |
|
|
Context of Use ValueSet ( Extensible ) |
|
0..1 | string |
|
|
|
Σ | 1..1 | code |
|
|
Σ | 1..1 | code |
ResourceType |
|
Σ | 1..1 | code |
SearchParamType |
|
Σ | 1..1 | string |
|
|
I | 0..1 | string | FluentPath expression that extracts the values |
![]() ![]() | I | 0..1 | string |
|
|
I | 0..1 | code |
XPathUsageType |
|
0..* | code |
ResourceType |
|
Documentation for this format
|
||||
XML
Template
XML Template
<SearchParameter xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 1..1 Absolute URL used to reference this search parameter --> <name value="[string]"/><!-- 1..1 Informal name for this search parameter --> <status value="[code]"/><!-- 0..1 draft | active | retired --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Publication Date(/time) --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher -->
<<name value="[string]"/><!-- 0..1 Name of an individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact><<useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <requirements value="[string]"/><!-- 0..1 Why this search parameter is defined --> <code value="[code]"/><!-- 1..1 Code used in URL --> <base value="[code]"/><!-- 1..1 The resource type this search parameter applies to --> <type value="[code]"/><!-- 1..1 number | date | string | token | reference | composite | quantity | uri --> <description value="[string]"/><!-- 1..1 Documentation for search parameter --> <expression value="[string]"/><!--0..1 FluentPath expression that extracts the values --> <xpath value="[string]"/><!--
0..1 XPath that extracts the values --> <xpathUsage value="[code]"/><!--
0..1 normal | phonetic | nearby | distance | other --> <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) --> </SearchParameter>
JSON
Template
JSON Template
{
"resourceType" : "SearchParameter",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"url" : "<uri>", // R! Absolute URL used to reference this search parameter
"name" : "<string>", // R! Informal name for this search parameter
"status" : "<code>", // draft | active | retired
"experimental" : <boolean>, // If for testing purposes, not real usage
"date" : "<dateTime>", // Publication Date(/time)
"publisher" : "<string>", // Name of the publisher (Organization or individual)
"contact" : [{ // Contact details of the publisher
"
"name" : "<string>", // Name of an individual to contact
"telecom" : [{ ContactPoint }] // Contact details for individual or publisher
}],
"
"useContext" : [{ CodeableConcept }], // Content intends to support these contexts
"requirements" : "<string>", // Why this search parameter is defined
"code" : "<code>", // R! Code used in URL
"base" : "<code>", // R! The resource type this search parameter applies to
"type" : "<code>", // R! number | date | string | token | reference | composite | quantity | uri
"description" : "<string>", // R! Documentation for search parameter
"expression" : "<string>", // C? FluentPath expression that extracts the values
"xpath" : "<string>", // C? XPath that extracts the values
"xpathUsage" : "<code>", // C? normal | phonetic | nearby | distance | other
"target" : ["<code>"] // Types of resource (if a resource reference)
}
Alternate
definitions:
Alternate definitions:
Schema
/
Schematron
,
Resource
Profile
(
, Resource Profile (
XML
,
,
JSON
),
),
Questionnaire
| Path | Definition | Type | Reference |
|---|---|---|---|
|
|
|
Required | ConformanceResourceStatus |
| SearchParameter.useContext | Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use. | Extensible | Context of Use ValueSet |
|
SearchParameter.base
|
|
Required | http://hl7.org/fhir/valueset/resource-types ResourceType |
|
|
|
Required | SearchParamType |
|
|
|
Required | XPathUsageType |
The SearchParameter resource may be used to define searches on extensions. Depending on the context of the extension (as defined in the
StructureDefinition
),
this
may
require
multiple
instances
of
the
SearchParameter.xpath
element
like
so:
If
the
extension's
context
is
scoped
by
a
single
resource,
SearchParameter.base
must
be
set
to
that
resource,
and
there
may
be
one
or
more
xpath
elements
corresponding
to
the
elements
specified
in
the
extension's
context,
e.g.
"f:Patient/f:name/f:extension[@url='extension
url']"
If
the
extension's
context
specifies
multiple
resources,
SearchParameter.base
must
be
set
to
"DomainResource".
You
may
use
a
single
xpath
element
with
the
full
url
of
the
Extension
to
indicate
that
the
SearchParameter
would
search
in
all
elements
of
the
given
SearchParameter.base
resource
for
the
given
extension.
), this may require multiple instances of the SearchParameter.xpath element like so:
Search parameters for this resource. The
common parameters
also apply. See
Searching
for
more
information
about
searching
in
REST,
messaging,
and
services.
for more information about searching in REST, messaging, and services.
| Name | Type | Description | Paths |
| base | token |
|
SearchParameter.base |
| code | token |
|
SearchParameter.code |
| context | token | A use context assigned to the search parameter | SearchParameter.useContext |
| description | string |
|
SearchParameter.description |
| name | string |
|
SearchParameter.name |
| target | token |
|
SearchParameter.target |
| type | token |
|
SearchParameter.type |
| url | uri |
|
SearchParameter.url |