Release 4B Snapshot 3: Connectathon 32 Base

This page is part of the FHIR Specification (v4.3.0: R4B - STU (v5.0.0-snapshot3: R5 Snapshot #3, to support Connectathon 32 ). 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

5.5 5.6 Resource SearchParameter - Content

FHIR Infrastructure icon Work Group Maturity Level : 3   Trial Use Security Category : Anonymous Compartments : Not linked to any defined compartments

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

A SearchParameter resource specifies a search parameter that may be used on the RESTful API to search or filter on a resource. The SearchParameter resource declares:

  • how to typically refer to the search parameter from a client ( SearchParameter.code )
  • how the search parameter is to be understood by the server
  • where in the source resource the parameter matches

Implementers should be familiar with the background and concepts described in Search on the RESTful API before working with this resource.

There is a registry of all Search Parameters .

This resource is referenced by
  • Resource References: CapabilityStatement and itself. This resource does not implement any patterns. itself

Structure

I
Name icon Flags icon Card. icon Type icon Description & Constraints icon doco icon
. . SearchParameter TU DomainResource Search parameter for a resource
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
+ Rule: If an xpath expression is present, there SHALL be an xpathUsage a processingMode
+ Rule: Search parameters can only have chain names when the search parameter type is 'reference'
+ Rule: Search parameters comparator can only be used on type 'number', 'date', 'quantity' or 'special'.

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: CanonicalResource
. . . url Σ C 1..1 uri Canonical identifier for this search parameter, represented as a URI (globally unique)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
. . . version Σ 0..1 string Business version of the search parameter
. . . versionAlgorithm[x] Σ 0..1 How to compare versions
Version Algorithm ( Extensible )
.. . . versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name Σ C 1..1 string Name for this search parameter (computer friendly)
... title Σ T 1..1 0..1 string Name for this search parameter (computer (human friendly)
. . . derivedFrom 0..1 canonical ( SearchParameter ) Original definition for the search parameter
. . . status ?! Σ 1..1 code draft | active | retired | unknown
PublicationStatus ( Required )
. . . experimental Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date last changed
. . . publisher Σ T 0..1 string Name of the publisher publisher/steward (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description Σ T 1..1 markdown Natural language description of the search parameter
. . . useContext Σ 0..* UsageContext The context that the content is intended to support

. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for search parameter (if applicable)
Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this search parameter is defined
. . . code Σ 1..1 code Code used Recommended name for parameter in URL search url
. . . base Σ 1..* code The resource type(s) this search parameter applies to
ResourceType All Resource Types ( Required )

. . . type Σ 1..1 code number | date | string | token | reference | composite | quantity | uri | special
SearchParamType ( Required )
. . . expression I C 0..1 string FHIRPath expression that extracts the values
. . . xpath processingMode I C 0..1 string code XPath that extracts the values normal | phonetic | other
SearchProcessingModeType ( Required )
. . . xpathUsage constraint 0..1 code string normal | phonetic | nearby | distance | other FHIRPath expression that constraints the usage of this SearchParamete
XPathUsageType ( Required )
. . . target 0..* code Types of resource (if a resource reference)
ResourceType Resource Types ( Required )

. . . multipleOr 0..1 boolean Allow multiple values per parameter (or)
. . . multipleAnd 0..1 boolean Allow multiple parameters (and)
. . . comparator 0..* code eq | ne | gt | lt | ge | le | sa | eb | ap
SearchComparator ( Required )

. . . modifier 0..* code missing | exact | contains | not | text | in | not-in | below | above | type | identifier | ofType of-type | code-text | text-advanced | iterate
SearchModifierCode ( Required )

. . . chain 0..* string Chained names supported

. . . component 0..* BackboneElement For Composite resources to define the parts

. . . . definition 1..1 canonical ( SearchParameter ) Defines how the part works
. . . . expression 1..1 string Subexpression relative to main expression

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

SearchParameter ( DomainResource ) + CanonicalResource An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers url : uri [1..1] The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] Indicates the mechanism used to compare versions to determine which is more current versionAlgorithm[x] : DataType [0..1] « string | Coding ; null (Strength=Extensible) VersionAlgorithm + » A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] « This element has or is affected by some invariants C » A short, descriptive, user-friendly title for the search parameter title : string [0..1] Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter derivedFrom : canonical [0..1] « SearchParameter » The status of this search parameter. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « null (Strength=Required) PublicationStatus ! » A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage experimental : boolean [0..1] The date (and optionally time) when the search parameter was published. last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes date : dateTime [0..1] The name of the organization or individual that published tresponsible for the release and ongoing maintenance of the search parameter publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] And how it used description : markdown [1..1] The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances useContext : UsageContext [0..*] A legal or geographic region in which the search parameter is intended to be used jurisdiction : CodeableConcept [0..*] « null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explanation of why this search parameter is needed and why it has been designed as it has purpose : markdown [0..1] The code label that is recommended to be used in the URL or the parameter name in a parameters resource for this search parameter parameter. In some cases, servers may need to use a different CapabilityStatement searchParam.name to differentiate between multiple SearchParameters that happen to have the same code code : code [1..1] The base resource type(s) that this search parameter can be used against base : code [1..*] « null (Strength=Required) ResourceType AllResourceTypes ! » The type of value that a search parameter may contain, and how the content is interpreted type : code [1..1] « null (Strength=Required) SearchParamType ! » A FHIRPath expression that returns a set of elements for the search parameter expression : string [0..1] « An XPath expression that returns a set of elements for the search parameter This element has or is affected by some invariants xpath : string C [0..1] » How the search parameter relates to the set of elements returned by evaluating the xpath expression query xpathUsage processingMode : code [0..1] « null (Strength=Required) XPathUsageType SearchProcessingModeType ! » « This element has or is affected by some invariants C » FHIRPath expression that defines/sets a complex constraint for when this SearchParameter is applicable constraint : string [0..1] Types of resource (if a resource is referenced) target : code [0..*] « null (Strength=Required) ResourceType ! » Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match multipleOr : boolean [0..1] Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match multipleAnd : boolean [0..1] Comparators supported for the search parameter comparator : code [0..*] « null (Strength=Required) SearchComparator ! » A modifier supported for the search parameter modifier : code [0..*] « null (Strength=Required) SearchModifierCode ! » Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type chain : string [0..*] Component The definition of the search parameter that describes this part definition : canonical [1..1] « SearchParameter » A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression expression : string [1..1] Used to define the parts of a composite search parameter component [0..*]

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 Canonical identifier for this search parameter, represented as a URI (globally unique) -->

 <version value="[string]"/><!-- 0..1 Business version of the search parameter -->
 <

 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this search parameter (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this search parameter (human friendly) -->

 <derivedFrom><!-- 0..1 canonical(SearchParameter) Original definition for the search parameter --></derivedFrom>
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <
 <

 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 1..1 Natural language description of the search parameter -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for search parameter (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this search parameter is defined -->
 <
 <

 <code value="[code]"/><!-- 1..1 Recommended name for parameter in search url -->
 <base value="[code]"/><!-- 1..* The resource type(s) this search parameter applies to -->

 <type value="[code]"/><!-- 1..1 number | date | string | token | reference | composite | quantity | uri | special -->
 <
 <
 <

 <expression value="[string]"/><!-- I 0..1 FHIRPath expression that extracts the values -->
 <processingMode value="[code]"/><!-- I 0..1 normal | phonetic | other -->
 <constraint value="[string]"/><!-- 0..1 FHIRPath expression that constraints the usage of this SearchParamete -->

 <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) -->
 <multipleOr value="[boolean]"/><!-- 0..1 Allow multiple values per parameter (or) -->
 <multipleAnd value="[boolean]"/><!-- 0..1 Allow multiple parameters (and) -->
 <comparator value="[code]"/><!-- 0..* eq | ne | gt | lt | ge | le | sa | eb | ap -->
 <

 <modifier value="[code]"/><!-- 0..* missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate -->

 <chain value="[string]"/><!-- 0..* Chained names supported -->
 <component>  <!-- 0..* For Composite resources to define the parts -->
  <definition><!-- 1..1 canonical(SearchParameter) Defines how the part works --></definition>
  <expression value="[string]"/><!-- 1..1 Subexpression relative to main expression -->
 </component>
</SearchParameter>

JSON Template

{doco
  "resourceType" : "SearchParameter",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "

  "url" : "<uri>", // R!  Canonical identifier for this search parameter, represented as a URI (globally unique)

  "version" : "<string>", // Business version of the search parameter
  "
  "

  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I R!  Name for this search parameter (computer friendly)
  "title" : "<string>", // Name for this search parameter (human friendly)
  "derivedFrom" : "<canonical(SearchParameter)>", // Original definition for the search parameter

  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "
  "

  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher/steward (organization or individual)

  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // R!  Natural language description of the search parameter
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for search parameter (if applicable)
  "purpose" : "<markdown>", // Why this search parameter is defined
  "
  "

  "code" : "<code>", // R!  Recommended name for parameter in search url
  "base" : ["<code>"], // R!  The resource type(s) this search parameter applies to

  "type" : "<code>", // R!  number | date | string | token | reference | composite | quantity | uri | special
  "
  "
  "

  "expression" : "<string>", // I FHIRPath expression that extracts the values
  "processingMode" : "<code>", // I normal | phonetic | other
  "constraint" : "<string>", // FHIRPath expression that constraints the usage of this SearchParamete

  "target" : ["<code>"], // Types of resource (if a resource reference)
  "multipleOr" : <boolean>, // Allow multiple values per parameter (or)
  "multipleAnd" : <boolean>, // Allow multiple parameters (and)
  "comparator" : ["<code>"], // eq | ne | gt | lt | ge | le | sa | eb | ap
  "

  "modifier" : ["<code>"], // missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate

  "chain" : ["<string>"], // Chained names supported
  "component" : [{ // For Composite resources to define the parts
    "

    "definition" : "<canonical(SearchParameter)>", // R!  Defines how the part works

    "expression" : "<string>" // R!  Subexpression relative to main expression
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:SearchParameter;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:

  fhir:SearchParameter.url [ uri ]; # 1..1 Canonical identifier for this search parameter, represented as a URI (globally unique)

  fhir:SearchParameter.version [ string ]; # 0..1 Business version of the search parameter
  fhir:

  # SearchParameter.versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:SearchParameter.versionAlgorithmString [ string ]
    fhir:SearchParameter.versionAlgorithmCoding [ Coding ]
  fhir:SearchParameter.name [ string ]; # 1..1 I Name for this search parameter (computer friendly)
  fhir:SearchParameter.title [ string ]; # 0..1 Name for this search parameter (human friendly)

  fhir:SearchParameter.derivedFrom [ canonical(SearchParameter) ]; # 0..1 Original definition for the search parameter
  fhir:SearchParameter.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:SearchParameter.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:
  fhir:

  fhir:SearchParameter.date [ dateTime ]; # 0..1 Date last changed
  fhir:SearchParameter.publisher [ string ]; # 0..1 Name of the publisher/steward (organization or individual)

  fhir:SearchParameter.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:SearchParameter.description [ markdown ]; # 1..1 Natural language description of the search parameter
  fhir:SearchParameter.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  fhir:SearchParameter.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for search parameter (if applicable)
  fhir:SearchParameter.purpose [ markdown ]; # 0..1 Why this search parameter is defined
  fhir:

  fhir:SearchParameter.code [ code ]; # 1..1 Recommended name for parameter in search url

  fhir:SearchParameter.base [ code ], ... ; # 1..* The resource type(s) this search parameter applies to
  fhir:SearchParameter.type [ code ]; # 1..1 number | date | string | token | reference | composite | quantity | uri | special
  fhir:
  fhir:
  fhir:

  fhir:SearchParameter.expression [ string ]; # 0..1 I FHIRPath expression that extracts the values
  fhir:SearchParameter.processingMode [ code ]; # 0..1 I normal | phonetic | other
  fhir:SearchParameter.constraint [ string ]; # 0..1 FHIRPath expression that constraints the usage of this SearchParamete

  fhir:SearchParameter.target [ code ], ... ; # 0..* Types of resource (if a resource reference)
  fhir:SearchParameter.multipleOr [ boolean ]; # 0..1 Allow multiple values per parameter (or)
  fhir:SearchParameter.multipleAnd [ boolean ]; # 0..1 Allow multiple parameters (and)
  fhir:SearchParameter.comparator [ code ], ... ; # 0..* eq | ne | gt | lt | ge | le | sa | eb | ap
  fhir:

  fhir:SearchParameter.modifier [ code ], ... ; # 0..* missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate

  fhir:SearchParameter.chain [ string ], ... ; # 0..* Chained names supported
  fhir:SearchParameter.component [ # 0..* For Composite resources to define the parts
    fhir:SearchParameter.component.definition [ canonical(SearchParameter) ]; # 1..1 Defines how the part works
    fhir:SearchParameter.component.expression [ string ]; # 1..1 Subexpression relative to main expression
  ], ...;
]

Changes since R4

SearchParameter
SearchParameter.versionAlgorithm[x]
  • No Changes Added Element
SearchParameter.title
  • Added Element
SearchParameter.base
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/all-resource-types|5.0.0-snapshot3
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/all-resource-types|5.0.0-snapshot3
SearchParameter.processingMode
  • Added Element
SearchParameter.constraint
  • Added Element
SearchParameter.xpath
  • deleted
SearchParameter.xpathUsage
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

Conversions between R3 and R4 See R3 <--> R4 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and 3 r3 resources are invalid (0 errors). )

Structure

I
Name icon Flags icon Card. icon Type icon Description & Constraints icon doco icon
. . SearchParameter TU DomainResource Search parameter for a resource
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
+ Rule: If an xpath expression is present, there SHALL be an xpathUsage a processingMode
+ Rule: Search parameters can only have chain names when the search parameter type is 'reference'
+ Rule: Search parameters comparator can only be used on type 'number', 'date', 'quantity' or 'special'.

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: CanonicalResource
. . . url Σ C 1..1 uri Canonical identifier for this search parameter, represented as a URI (globally unique)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
. . . version Σ 0..1 string Business version of the search parameter
. . . versionAlgorithm[x] Σ 0..1 How to compare versions
Version Algorithm ( Extensible )
. . . . versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name Σ C 1..1 string Name for this search parameter (computer friendly)
... title Σ T 1..1 0..1 string Name for this search parameter (computer (human friendly)
. . . derivedFrom 0..1 canonical ( SearchParameter ) Original definition for the search parameter
. . . status ?! Σ 1..1 code draft | active | retired | unknown
PublicationStatus ( Required )
. . . experimental Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date last changed
. . . publisher Σ T 0..1 string Name of the publisher publisher/steward (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description Σ T 1..1 markdown Natural language description of the search parameter
. . . useContext Σ 0..* UsageContext The context that the content is intended to support

. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for search parameter (if applicable)
Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this search parameter is defined
. . . code Σ 1..1 code Code used Recommended name for parameter in URL search url
. . . base Σ 1..* code The resource type(s) this search parameter applies to
ResourceType All Resource Types ( Required )

. . . type Σ 1..1 code number | date | string | token | reference | composite | quantity | uri | special
SearchParamType ( Required )
. . . expression I C 0..1 string FHIRPath expression that extracts the values
. . . xpath processingMode I C 0..1 string code XPath that extracts the values normal | phonetic | other
SearchProcessingModeType ( Required )
. . . xpathUsage constraint 0..1 code string normal | phonetic | nearby | distance | other FHIRPath expression that constraints the usage of this SearchParamete
XPathUsageType ( Required )
. . . target 0..* code Types of resource (if a resource reference)
ResourceType Resource Types ( Required )

. . . multipleOr 0..1 boolean Allow multiple values per parameter (or)
. . . multipleAnd 0..1 boolean Allow multiple parameters (and)
. . . comparator 0..* code eq | ne | gt | lt | ge | le | sa | eb | ap
SearchComparator ( Required )

. . . modifier 0..* code missing | exact | contains | not | text | in | not-in | below | above | type | identifier | ofType of-type | code-text | text-advanced | iterate
SearchModifierCode ( Required )

. . . chain 0..* string Chained names supported

. . . component 0..* BackboneElement For Composite resources to define the parts

. . . . definition 1..1 canonical ( SearchParameter ) Defines how the part works
. . . . expression 1..1 string Subexpression relative to main expression

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

SearchParameter ( DomainResource ) + CanonicalResource An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers url : uri [1..1] The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] Indicates the mechanism used to compare versions to determine which is more current versionAlgorithm[x] : DataType [0..1] « string | Coding ; null (Strength=Extensible) VersionAlgorithm + » A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] « This element has or is affected by some invariants C » A short, descriptive, user-friendly title for the search parameter title : string [0..1] Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter derivedFrom : canonical [0..1] « SearchParameter » The status of this search parameter. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « null (Strength=Required) PublicationStatus ! » A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage experimental : boolean [0..1] The date (and optionally time) when the search parameter was published. last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes date : dateTime [0..1] The name of the organization or individual that published tresponsible for the release and ongoing maintenance of the search parameter publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] And how it used description : markdown [1..1] The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances useContext : UsageContext [0..*] A legal or geographic region in which the search parameter is intended to be used jurisdiction : CodeableConcept [0..*] « null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explanation of why this search parameter is needed and why it has been designed as it has purpose : markdown [0..1] The code label that is recommended to be used in the URL or the parameter name in a parameters resource for this search parameter parameter. In some cases, servers may need to use a different CapabilityStatement searchParam.name to differentiate between multiple SearchParameters that happen to have the same code code : code [1..1] The base resource type(s) that this search parameter can be used against base : code [1..*] « null (Strength=Required) ResourceType AllResourceTypes ! » The type of value that a search parameter may contain, and how the content is interpreted type : code [1..1] « null (Strength=Required) SearchParamType ! » A FHIRPath expression that returns a set of elements for the search parameter expression : string [0..1] « An XPath expression that returns a set of elements for the search parameter This element has or is affected by some invariants xpath : string C [0..1] » How the search parameter relates to the set of elements returned by evaluating the xpath expression query xpathUsage processingMode : code [0..1] « null (Strength=Required) XPathUsageType SearchProcessingModeType ! » « This element has or is affected by some invariants C » FHIRPath expression that defines/sets a complex constraint for when this SearchParameter is applicable constraint : string [0..1] Types of resource (if a resource is referenced) target : code [0..*] « null (Strength=Required) ResourceType ! » Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match multipleOr : boolean [0..1] Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match multipleAnd : boolean [0..1] Comparators supported for the search parameter comparator : code [0..*] « null (Strength=Required) SearchComparator ! » A modifier supported for the search parameter modifier : code [0..*] « null (Strength=Required) SearchModifierCode ! » Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type chain : string [0..*] Component The definition of the search parameter that describes this part definition : canonical [1..1] « SearchParameter » A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression expression : string [1..1] Used to define the parts of a composite search parameter component [0..*]

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 Canonical identifier for this search parameter, represented as a URI (globally unique) -->

 <version value="[string]"/><!-- 0..1 Business version of the search parameter -->
 <

 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this search parameter (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this search parameter (human friendly) -->

 <derivedFrom><!-- 0..1 canonical(SearchParameter) Original definition for the search parameter --></derivedFrom>
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <
 <

 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 1..1 Natural language description of the search parameter -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for search parameter (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this search parameter is defined -->
 <
 <

 <code value="[code]"/><!-- 1..1 Recommended name for parameter in search url -->
 <base value="[code]"/><!-- 1..* The resource type(s) this search parameter applies to -->

 <type value="[code]"/><!-- 1..1 number | date | string | token | reference | composite | quantity | uri | special -->
 <
 <
 <

 <expression value="[string]"/><!-- I 0..1 FHIRPath expression that extracts the values -->
 <processingMode value="[code]"/><!-- I 0..1 normal | phonetic | other -->
 <constraint value="[string]"/><!-- 0..1 FHIRPath expression that constraints the usage of this SearchParamete -->

 <target value="[code]"/><!-- 0..* Types of resource (if a resource reference) -->
 <multipleOr value="[boolean]"/><!-- 0..1 Allow multiple values per parameter (or) -->
 <multipleAnd value="[boolean]"/><!-- 0..1 Allow multiple parameters (and) -->
 <comparator value="[code]"/><!-- 0..* eq | ne | gt | lt | ge | le | sa | eb | ap -->
 <

 <modifier value="[code]"/><!-- 0..* missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate -->

 <chain value="[string]"/><!-- 0..* Chained names supported -->
 <component>  <!-- 0..* For Composite resources to define the parts -->
  <definition><!-- 1..1 canonical(SearchParameter) Defines how the part works --></definition>
  <expression value="[string]"/><!-- 1..1 Subexpression relative to main expression -->
 </component>
</SearchParameter>

JSON Template

{doco
  "resourceType" : "SearchParameter",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "

  "url" : "<uri>", // R!  Canonical identifier for this search parameter, represented as a URI (globally unique)

  "version" : "<string>", // Business version of the search parameter
  "
  "

  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I R!  Name for this search parameter (computer friendly)
  "title" : "<string>", // Name for this search parameter (human friendly)
  "derivedFrom" : "<canonical(SearchParameter)>", // Original definition for the search parameter

  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "
  "

  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher/steward (organization or individual)

  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // R!  Natural language description of the search parameter
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for search parameter (if applicable)
  "purpose" : "<markdown>", // Why this search parameter is defined
  "
  "

  "code" : "<code>", // R!  Recommended name for parameter in search url
  "base" : ["<code>"], // R!  The resource type(s) this search parameter applies to

  "type" : "<code>", // R!  number | date | string | token | reference | composite | quantity | uri | special
  "
  "
  "

  "expression" : "<string>", // I FHIRPath expression that extracts the values
  "processingMode" : "<code>", // I normal | phonetic | other
  "constraint" : "<string>", // FHIRPath expression that constraints the usage of this SearchParamete

  "target" : ["<code>"], // Types of resource (if a resource reference)
  "multipleOr" : <boolean>, // Allow multiple values per parameter (or)
  "multipleAnd" : <boolean>, // Allow multiple parameters (and)
  "comparator" : ["<code>"], // eq | ne | gt | lt | ge | le | sa | eb | ap
  "

  "modifier" : ["<code>"], // missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate

  "chain" : ["<string>"], // Chained names supported
  "component" : [{ // For Composite resources to define the parts
    "

    "definition" : "<canonical(SearchParameter)>", // R!  Defines how the part works

    "expression" : "<string>" // R!  Subexpression relative to main expression
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:SearchParameter;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:

  fhir:SearchParameter.url [ uri ]; # 1..1 Canonical identifier for this search parameter, represented as a URI (globally unique)

  fhir:SearchParameter.version [ string ]; # 0..1 Business version of the search parameter
  fhir:

  # SearchParameter.versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:SearchParameter.versionAlgorithmString [ string ]
    fhir:SearchParameter.versionAlgorithmCoding [ Coding ]
  fhir:SearchParameter.name [ string ]; # 1..1 I Name for this search parameter (computer friendly)
  fhir:SearchParameter.title [ string ]; # 0..1 Name for this search parameter (human friendly)

  fhir:SearchParameter.derivedFrom [ canonical(SearchParameter) ]; # 0..1 Original definition for the search parameter
  fhir:SearchParameter.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:SearchParameter.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:
  fhir:

  fhir:SearchParameter.date [ dateTime ]; # 0..1 Date last changed
  fhir:SearchParameter.publisher [ string ]; # 0..1 Name of the publisher/steward (organization or individual)

  fhir:SearchParameter.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:SearchParameter.description [ markdown ]; # 1..1 Natural language description of the search parameter
  fhir:SearchParameter.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  fhir:SearchParameter.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for search parameter (if applicable)
  fhir:SearchParameter.purpose [ markdown ]; # 0..1 Why this search parameter is defined
  fhir:

  fhir:SearchParameter.code [ code ]; # 1..1 Recommended name for parameter in search url

  fhir:SearchParameter.base [ code ], ... ; # 1..* The resource type(s) this search parameter applies to
  fhir:SearchParameter.type [ code ]; # 1..1 number | date | string | token | reference | composite | quantity | uri | special
  fhir:
  fhir:
  fhir:

  fhir:SearchParameter.expression [ string ]; # 0..1 I FHIRPath expression that extracts the values
  fhir:SearchParameter.processingMode [ code ]; # 0..1 I normal | phonetic | other
  fhir:SearchParameter.constraint [ string ]; # 0..1 FHIRPath expression that constraints the usage of this SearchParamete

  fhir:SearchParameter.target [ code ], ... ; # 0..* Types of resource (if a resource reference)
  fhir:SearchParameter.multipleOr [ boolean ]; # 0..1 Allow multiple values per parameter (or)
  fhir:SearchParameter.multipleAnd [ boolean ]; # 0..1 Allow multiple parameters (and)
  fhir:SearchParameter.comparator [ code ], ... ; # 0..* eq | ne | gt | lt | ge | le | sa | eb | ap
  fhir:

  fhir:SearchParameter.modifier [ code ], ... ; # 0..* missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate

  fhir:SearchParameter.chain [ string ], ... ; # 0..* Chained names supported
  fhir:SearchParameter.component [ # 0..* For Composite resources to define the parts
    fhir:SearchParameter.component.definition [ canonical(SearchParameter) ]; # 1..1 Defines how the part works
    fhir:SearchParameter.component.expression [ string ]; # 1..1 Subexpression relative to main expression
  ], ...;
]

Changes since Release 4

SearchParameter
SearchParameter.versionAlgorithm[x]
  • No Changes Added Element
SearchParameter.title
  • Added Element
SearchParameter.base
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/all-resource-types|5.0.0-snapshot3
  • Change value set from http://hl7.org/fhir/ValueSet/resource-types|4.0.0 to http://hl7.org/fhir/ValueSet/all-resource-types|5.0.0-snapshot3
SearchParameter.processingMode
  • Added Element
SearchParameter.constraint
  • Added Element
SearchParameter.xpath
  • deleted
SearchParameter.xpathUsage
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

Conversions between R3 and R4 See R3 <--> R4 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and 3 r3 resources are invalid (0 errors). )

 

See the Profiles & Extensions and the alternate Additional definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see , the extensions spreadsheet version & the dependency analysis

SearchParameter.xpathUsage
Path Definition Type Reference
SearchParameter.versionAlgorithm[x]

Indicates the mechanism used to compare versions to determine which is more current.

Extensible VersionAlgorithm
SearchParameter.status

The lifecycle status of an artifact.

Required PublicationStatus
SearchParameter.jurisdiction

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

Extensible Jurisdiction ValueSet JurisdictionValueSet
SearchParameter.base

All fhir data types (including abstract resources)

Required ResourceType AllResourceTypes
SearchParameter.type

Data types allowed to be used for search parameters.

Required SearchParamType
SearchParameter.processingMode

How a search parameter relates to the set of elements returned by evaluating its expression query.

Required XPathUsageType SearchProcessingModeType
SearchParameter.target

All fhir data types

Required ResourceType
SearchParameter.comparator

What Search Comparator Codes are supported in search.

Required SearchComparator
SearchParameter.modifier

A supported modifier for a search parameter.

Required SearchModifierCode

id UniqueKey Level Location Description Expression
spd-0 img  cnl-0 Warning (base) Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('[A-Z]([A-Za-z0-9_]){0,254}') name.matches('[A-Z]([A-Za-z0-9_]){1,254}')
spd-1 img  spd-1 Rule (base) If an xpath expression is present, there SHALL be an xpathUsage a processingMode xpath.empty() expression.empty() or xpathUsage.exists() processingMode.exists()
spd-2 img  cnl-1 Warning SearchParameter.url URL should not contain | or # - these characters make processing canonical references problematic url.matches('([^|#])*')
img  spd-2 Rule (base) Search parameters can only have chain names when the search parameter type is 'reference' chain.empty() or type = 'reference'
img  spd-3 Rule (base) Search parameters comparator can only be used on type 'number', 'date', 'quantity' or 'special'. comparator.empty() or (type in ('number' | 'date' | 'quantity' | 'special'))

The SearchParameter resource may be used to define searches on extensions. Depending on A simple definition defines the context of code, the extension (as defined in base resource the StructureDefinition ), this may require multiple instances of extension can be found in, and a type, and an expression. Assume that the extension is SearchParameter.xpath http://example.org/fhir/StructureDefinition/extension-thumb-length element like so: If the extension's context which has a value that is scoped by a single resource, SearchParameter.base must be set quantity, and that is used on patient, then an appropriate SearchParameter would be:


   "code" : "thumb-length",
   "base" : ["Patient"],
   "type" : "quantity",
   "expression" : "Patient.extension('http://example.org/fhir/StructureDefinition/extension-thumb-length').value"

Servers MAY attempt to process expressions that resource, just select the extension without the .value, but this is not required and there may be one discouraged or more deprecated in the future.

Extensions may have multiple types with different search behaviours, so the type can be specifically selected:


   "code" : "thumb-length-code",
   "base" : ["Patient"],
   "type" : "token",
   "expression" : "Patient.extension('http://example.org/fhir/StructureDefinition/extension-thumb-length').value.ofType(CodeableConcept)"

This example would select coded thumb lengths and index them only for the xpath thumb-length-code elements corresponding search parameter. When an extension can have multiple types with incompatible search behaviour, the search parameters have to do this. Note that is type casting the elements specified extension directly (e.g. Patient.extension('...').ofType(CodeableConcept) ) will lead to an empty index, since the extension is not a CodeableConcept itself.

When extensions can be used in multiple places, these places are enumerated in the extension's context, e.g. "f:Patient/f:name/f:extension[@url='extension url']" expression:


Patient.extension('http://example.org/fhir/StructureDefinition/extension-thumb-length').value
 | Patient.contact.extension('http://example.org/fhir/StructureDefinition/extension-thumb-length').value
 | Practitioner.extension('http://example.org/fhir/StructureDefinition/extension-thumb-length').value

Notes:

  • If the extension's context specifies multiple resources, they are represented with multiple elements in the SearchParameter.base must be set to "DomainResource". array
  • You may use a single An expression like xpath Resource.descendents.extension('extension-url').value element with the full URL of the Extension is possible, but this is a low performance option for a server to indicate that the SearchParameter would evaluate, and search in all elements of the given SearchParameter.base resource for the given extension. parameter expressions are performance sensitive

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

Name Type Description Expression In Common
base token The resource type(s) this search parameter applies to SearchParameter.base
code token Code used in URL SearchParameter.code
component reference Defines how the part works SearchParameter.component.definition
( SearchParameter )
context token A use context assigned to the search parameter (SearchParameter.useContext.value as CodeableConcept) 30 Resources
context-quantity quantity A quantity- or range-valued use context assigned to the search parameter (SearchParameter.useContext.value as Quantity) | (SearchParameter.useContext.value as Range) 30 Resources
context-type token A type of use context assigned to the search parameter SearchParameter.useContext.code 30 Resources
context-type-quantity composite A use context type and quantity- or range-based value assigned to the search parameter On SearchParameter.useContext:
  context-type: code
  context-quantity: value.as(Quantity) value.ofType(Quantity) | value.as(Range) value.ofType(Range)
30 Resources
context-type-value composite A use context type and value assigned to the search parameter On SearchParameter.useContext:
  context-type: code
  context: value.as(CodeableConcept) value.ofType(CodeableConcept)
30 Resources
date date The search parameter publication date SearchParameter.date 30 Resources
derived-from reference Original definition for the search parameter SearchParameter.derivedFrom
( SearchParameter )
description string The description of the search parameter SearchParameter.description 28 Resources
jurisdiction token Intended jurisdiction for the search parameter SearchParameter.jurisdiction 26 Resources
name string Computationally friendly name of the search parameter SearchParameter.name 26 Resources
publisher string Name of the publisher of the search parameter SearchParameter.publisher 30 Resources
status token The current status of the search parameter SearchParameter.status 34 Resources
target token Types of resource (if a resource reference) SearchParameter.target
type token number | date | string | token | reference | composite | quantity | uri | special SearchParameter.type
url uri The uri that identifies the search parameter SearchParameter.url 33 Resources
version token The business version of the search parameter SearchParameter.version 30 Resources