2nd DSTU Draft For Comment

This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). 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 R3 R2

6.21 Resource SearchParameter - Content

A Search Parameter that defines a named search item that can be used to search/filter on a resource.

6.21.1 Scope and Usage

todo

6.21.2 Boundaries and Relationships

  • Profiles are used by Conformance instances for specifying how resources are used
  • Profiles use Value Sets to specify the content of coded elements
  • Profiles can use Extension Definitions when specifying how a resource is used

6.21.3 Background and Context

Implementers should be familiar with with the background and concepts described in Profiling FHIR before working with this resource.

6.21.4 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SearchParameter DomainResourceSearch Parameter for a resource
... url 1..1uriLiteral URL used to reference this search parameter
... name Σ1..1stringName of search parameter
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*ElementContact details of the publisher
.... name Σ0..1stringName of a individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... requirements 0..1stringWhy this search parameter is defined
... status M Σ0..1codedraft | active | retired
ConformanceStatementStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... date Σ0..1dateTimePublication Date(/time)
... base 1..1codeThe resource type this search parameter applies to
ResourceType (Required)
... type 1..1codenumber | date | string | token | reference | composite | quantity
SearchParamType (Required)
... description 1..1stringDocumentation for search parameter
... xpath 0..1stringXPath that extracts the values
... target 0..*codeTypes of resource (if a resource reference)
ResourceType (Required)

UML Diagram

SearchParameter (DomainResource)The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statementsurl : uri 1..1The name of the standard or custom search parametername : string 1..1The name of the individual or organization that published the search parameterpublisher : string 0..1The Scope and Usage that this search parameter was created to meetrequirements : string 0..1The status of this search parameter definition (this element modifies the meaning of other elements)status : code 0..1 « The status of this conformance statementConformanceStatementStatus »A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean 0..1The date (and optionally time) when the search parameter definition was publisheddate : dateTime 0..1The base resource type that this search parameter refers tobase : code 1..1 « One of the resource types defined as part of FHIRResourceType »The type of value a search parameter refers to, and how the content is interpretedtype : code 1..1 « Data types allowed to be used for search parametersSearchParamType »A description of the search parameters and how it useddescription : string 1..1An XPath expression that returns a set of elements for the search parameterxpath : string 0..1Types of resource (if a resource is referenced)target : code 0..* « One of the resource types defined as part of FHIRResourceType »ContactThe name of an individual to contact regarding the search parametername : string 0..1Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint 0..*Contacts to assist a user in finding and communicating with the publishercontact0..*

XML Template

<SearchParameter xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Literal URL used to reference this search parameter -->
 <name value="[string]"/><!-- 1..1 Name of search parameter -->
 <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 a individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <requirements value="[string]"/><!-- 0..1 Why this search parameter is defined -->
 <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) -->
 <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 -->
 <description value="[string]"/><!-- 1..1 Documentation for  search parameter -->
 <xpath value="[string]"/><!-- 0..1 XPath that extracts the values -->
 <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) -->
</SearchParameter>

JSON Template

{doco
  "resourceType" : "SearchParameter",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R! Literal URL used to reference this search parameter
  "name" : "<string>", // R! Name of search parameter
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of a individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "requirements" : "<string>", // Why this search parameter is defined
  "status" : "<code>", // draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "date" : "<dateTime>", // Publication Date(/time)
  "base" : "<code>", // R! The resource type this search parameter applies to
  "type" : "<code>", // R! number | date | string | token | reference | composite | quantity
  "description" : "<string>", // R! Documentation for  search parameter
  "xpath" : "<string>", // XPath that extracts the values
  "target" : ["<code>"] // Types of resource (if a resource reference)
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SearchParameter DomainResourceSearch Parameter for a resource
... url 1..1uriLiteral URL used to reference this search parameter
... name Σ1..1stringName of search parameter
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*ElementContact details of the publisher
.... name Σ0..1stringName of a individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... requirements 0..1stringWhy this search parameter is defined
... status M Σ0..1codedraft | active | retired
ConformanceStatementStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... date Σ0..1dateTimePublication Date(/time)
... base 1..1codeThe resource type this search parameter applies to
ResourceType (Required)
... type 1..1codenumber | date | string | token | reference | composite | quantity
SearchParamType (Required)
... description 1..1stringDocumentation for search parameter
... xpath 0..1stringXPath that extracts the values
... target 0..*codeTypes of resource (if a resource reference)
ResourceType (Required)

UML Diagram

SearchParameter (DomainResource)The URL at which this search parameter is (or will be) published, and which is used to reference this profile in conformance statementsurl : uri 1..1The name of the standard or custom search parametername : string 1..1The name of the individual or organization that published the search parameterpublisher : string 0..1The Scope and Usage that this search parameter was created to meetrequirements : string 0..1The status of this search parameter definition (this element modifies the meaning of other elements)status : code 0..1 « The status of this conformance statementConformanceStatementStatus »A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean 0..1The date (and optionally time) when the search parameter definition was publisheddate : dateTime 0..1The base resource type that this search parameter refers tobase : code 1..1 « One of the resource types defined as part of FHIRResourceType »The type of value a search parameter refers to, and how the content is interpretedtype : code 1..1 « Data types allowed to be used for search parametersSearchParamType »A description of the search parameters and how it useddescription : string 1..1An XPath expression that returns a set of elements for the search parameterxpath : string 0..1Types of resource (if a resource is referenced)target : code 0..* « One of the resource types defined as part of FHIRResourceType »ContactThe name of an individual to contact regarding the search parametername : string 0..1Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint 0..*Contacts to assist a user in finding and communicating with the publishercontact0..*

XML Template

<SearchParameter xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Literal URL used to reference this search parameter -->
 <name value="[string]"/><!-- 1..1 Name of search parameter -->
 <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 a individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <requirements value="[string]"/><!-- 0..1 Why this search parameter is defined -->
 <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) -->
 <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 -->
 <description value="[string]"/><!-- 1..1 Documentation for  search parameter -->
 <xpath value="[string]"/><!-- 0..1 XPath that extracts the values -->
 <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) -->
</SearchParameter>

JSON Template

{doco
  "resourceType" : "SearchParameter",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R! Literal URL used to reference this search parameter
  "name" : "<string>", // R! Name of search parameter
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of a individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "requirements" : "<string>", // Why this search parameter is defined
  "status" : "<code>", // draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "date" : "<dateTime>", // Publication Date(/time)
  "base" : "<code>", // R! The resource type this search parameter applies to
  "type" : "<code>", // R! number | date | string | token | reference | composite | quantity
  "description" : "<string>", // R! Documentation for  search parameter
  "xpath" : "<string>", // XPath that extracts the values
  "target" : ["<code>"] // Types of resource (if a resource reference)
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

6.21.4.1 Terminology Bindings

PathDefinitionTypeReference
SearchParameter.status The status of this conformance statementFixedhttp://hl7.org/fhir/conformance-statement-status
SearchParameter.base
SearchParameter.target
One of the resource types defined as part of FHIRFixedhttp://hl7.org/fhir/valueset/resource-types
SearchParameter.type Data types allowed to be used for search parametersFixedhttp://hl7.org/fhir/search-param-type

6.21.5 SearchParameters on Extensions

The SearchParameter resource may be used to define searches on extensions. Depending on the context of the extension (as defined in the ExtensionDefinition), 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.

6.21.6 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
basetokenThe resource type this search parameter applies toSearchParameter.base
descriptionstringDocumentation for search parameterSearchParameter.description
namestringName of search parameterSearchParameter.name
targettokenTypes of resource (if a resource reference)SearchParameter.target
typetokennumber | date | string | token | reference | composite | quantitySearchParameter.type
urltokenLiteral URL used to reference this search parameterSearchParameter.url