STU3 Candidate

This page is part of the FHIR Specification (v1.8.0: STU 3 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

5.7 Resource SearchParameter - Content

FHIR Infrastructure Work GroupMaturity Level: 1Compartments: 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 refer to the search parameter from a client
  • 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.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SearchParameter IDomainResourceSearch Parameter for a resource
If an xpath is present, there SHALL be an xpathUsage
Search parameters can only have chain names when the search parameter type is 'reference'
... url Σ1..1uriLogical uri to reference this search parameter (globally unique)
... version Σ0..1stringBusiness version of the search parameter
... name Σ1..1stringName for this search parameter (Computer friendly)
... status ?!Σ1..1codedraft | active | retired
PublicationStatus (Required)
... experimental ?!Σ0..1booleanIf for testing purposes, not real usage
... date Σ0..1dateTimeDate this was last changed
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... useContext Σ0..*UsageContextContent intends to support these contexts
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for search parameter (if applicable)
Jurisdiction ValueSet (Extensible)
... purpose 0..1markdownWhy this search parameter is defined
... code Σ1..1codeCode used in URL
... base Σ1..*codeThe resource type(s) this search parameter applies to
ResourceType (Required)
... type Σ1..1codenumber | date | string | token | reference | composite | quantity | uri
SearchParamType (Required)
... derivedFrom 0..1uriOriginal Definition for the search parameter
... description Σ1..1markdownNatural language description of the search parameter
... expression I0..1stringFluentPath expression that extracts the values
... xpath I0..1stringXPath that extracts the values
... xpathUsage I0..1codenormal | phonetic | nearby | distance | other
XPathUsageType (Required)
... target 0..*codeTypes of resource (if a resource reference)
ResourceType (Required)
... comparator 0..*codeeq | ne | gt | lt | ge | le | sa | eb | ap
SearchComparator (Required)
... modifier 0..*codemissing | exact | contains | not | text | in | not-in | below | above | type
SearchModifierCode (Required)
... chain 0..*stringChained names supported
... component 0..*BackboneElementFor Composite resources to define the parts
.... definition 1..1Reference(SearchParameter)Defines how the part works
.... expression 1..1stringSubexpression relative to main expression

doco Documentation for this format

UML Diagram (Legend)

SearchParameter (DomainResource)An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions)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 are orderableversion : string [0..1]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 generationname : string [1..1]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] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)PublicationStatus! »A flag 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 (this element modifies the meaning of other elements)experimental : boolean [0..1]The date (and optionally time) when the search parameter was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changesdate : dateTime [0..1]The name of the individual or organization that published the search parameterpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitionsuseContext : UsageContext [0..*]A jurisdiction in which the search parameter is intended to be usedjurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible)Jurisdiction ValueSet+ »Explains why this search parameter is needed and why it has been designed as it haspurpose : markdown [0..1]The code used in the URL or the parameter name in a parameters resource for this search parametercode : code [1..1]The base resource type(s) that this search parameter can be used againstbase : code [1..*] « One of the resource types defined as part of FHIR. (Strength=Required)ResourceType! »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 parameters. (Strength=Required)SearchParamType! »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 parameterderivedFrom : uri [0..1]A free text natural language description of the search parameter from the consumer's perspective. and how it useddescription : markdown [1..1]A FluentPath expression that returns a set of elements for the search parameterexpression : string [0..1]An XPath expression that returns a set of elements for the search parameterxpath : string [0..1]How the search parameter relates to the set of elements returned by evaluating the xpath queryxpathUsage : code [0..1] « How a search parameter relates to the set of elements returned by evaluating its xpath query. (Strength=Required)XPathUsageType! »Types of resource (if a resource is referenced)target : code [0..*] « One of the resource types defined as part of FHIR. (Strength=Required)ResourceType! »Comparators supported for the search parametercomparator : code [0..*] « What Search Comparator Codes are supported in search (Strength=Required)SearchComparator! »A modifier supported for the search parametermodifier : code [0..*] « A supported modifier for a search parameter. (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 typechain : string [0..*]ComponentThe definition of the search parameter that describes this partdefinition : Reference [1..1] « SearchParameter »A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expressionexpression : string [1..1]Used to define the parts of a composite search parametercomponent[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 Logical uri to reference this search parameter (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the search parameter -->
 <name value="[string]"/><!-- 1..1 Name for this search parameter (Computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></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 Code used in 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 -->
 <derivedFrom value="[uri]"/><!-- 0..1 Original Definition for the search parameter -->
 <description value="[markdown]"/><!-- 1..1 Natural language description of the 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) -->
 <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 -->
 <chain value="[string]"/><!-- 0..* Chained names supported -->
 <component>  <!-- 0..* For Composite resources to define the parts -->
  <definition><!-- 1..1 Reference(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!  Logical uri to reference this search parameter (globally unique)
  "version" : "<string>", // Business version of the search parameter
  "name" : "<string>", // R!  Name for this search parameter (Computer friendly)
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for search parameter (if applicable)
  "purpose" : "<markdown>", // Why this search parameter is defined
  "code" : "<code>", // R!  Code used in URL
  "base" : ["<code>"], // R!  The resource type(s) this search parameter applies to
  "type" : "<code>", // R!  number | date | string | token | reference | composite | quantity | uri
  "derivedFrom" : "<uri>", // Original Definition for the search parameter
  "description" : "<markdown>", // R!  Natural language description of the 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)
  "comparator" : ["<code>"], // eq | ne | gt | lt | ge | le | sa | eb | ap
  "modifier" : ["<code>"], // missing | exact | contains | not | text | in | not-in | below | above | type
  "chain" : ["<string>"], // Chained names supported
  "component" : [{ // For Composite resources to define the parts
    "definition" : { Reference(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:SearchParameter.url [ uri ]; # 1..1 Logical uri to reference this search parameter (globally unique)
  fhir:SearchParameter.version [ string ]; # 0..1 Business version of the search parameter
  fhir:SearchParameter.name [ string ]; # 1..1 Name for this search parameter (Computer friendly)
  fhir:SearchParameter.status [ code ]; # 1..1 draft | active | retired
  fhir:SearchParameter.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:SearchParameter.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:SearchParameter.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:SearchParameter.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:SearchParameter.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  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:SearchParameter.code [ code ]; # 1..1 Code used in 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
  fhir:SearchParameter.derivedFrom [ uri ]; # 0..1 Original Definition for the search parameter
  fhir:SearchParameter.description [ markdown ]; # 1..1 Natural language description of the search parameter
  fhir:SearchParameter.expression [ string ]; # 0..1 FluentPath expression that extracts the values
  fhir:SearchParameter.xpath [ string ]; # 0..1 XPath that extracts the values
  fhir:SearchParameter.xpathUsage [ code ]; # 0..1 normal | phonetic | nearby | distance | other
  fhir:SearchParameter.target [ code ], ... ; # 0..* Types of resource (if a resource reference)
  fhir:SearchParameter.comparator [ code ], ... ; # 0..* eq | ne | gt | lt | ge | le | sa | eb | ap
  fhir:SearchParameter.modifier [ code ], ... ; # 0..* missing | exact | contains | not | text | in | not-in | below | above | type
  fhir:SearchParameter.chain [ string ], ... ; # 0..* Chained names supported
  fhir:SearchParameter.component [ # 0..* For Composite resources to define the parts
    fhir:SearchParameter.component.definition [ Reference(SearchParameter) ]; # 1..1 Defines how the part works
    fhir:SearchParameter.component.expression [ string ]; # 1..1 Subexpression relative to main expression
  ], ...;
]

Changes since DSTU2

SearchParameter
SearchParameter.version added Element
SearchParameter.status Min Cardinality changed from 0 to 1
Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status
SearchParameter.experimental Now marked as Modifier
SearchParameter.contact Type changed from BackboneElement to ContactDetail
SearchParameter.useContext added Element
SearchParameter.jurisdiction added Element
SearchParameter.purpose added Element
SearchParameter.base Max Cardinality changed from 1 to *
SearchParameter.derivedFrom added Element
SearchParameter.description Type changed from string to markdown
SearchParameter.expression added Element
SearchParameter.comparator added Element
SearchParameter.modifier added Element
SearchParameter.chain added Element
SearchParameter.component added Element
SearchParameter.component.definition added Element
SearchParameter.component.expression added Element
SearchParameter.contact.name deleted
SearchParameter.contact.telecom deleted
SearchParameter.requirements deleted

See the Full Difference for further information

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SearchParameter IDomainResourceSearch Parameter for a resource
If an xpath is present, there SHALL be an xpathUsage
Search parameters can only have chain names when the search parameter type is 'reference'
... url Σ1..1uriLogical uri to reference this search parameter (globally unique)
... version Σ0..1stringBusiness version of the search parameter
... name Σ1..1stringName for this search parameter (Computer friendly)
... status ?!Σ1..1codedraft | active | retired
PublicationStatus (Required)
... experimental ?!Σ0..1booleanIf for testing purposes, not real usage
... date Σ0..1dateTimeDate this was last changed
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... useContext Σ0..*UsageContextContent intends to support these contexts
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for search parameter (if applicable)
Jurisdiction ValueSet (Extensible)
... purpose 0..1markdownWhy this search parameter is defined
... code Σ1..1codeCode used in URL
... base Σ1..*codeThe resource type(s) this search parameter applies to
ResourceType (Required)
... type Σ1..1codenumber | date | string | token | reference | composite | quantity | uri
SearchParamType (Required)
... derivedFrom 0..1uriOriginal Definition for the search parameter
... description Σ1..1markdownNatural language description of the search parameter
... expression I0..1stringFluentPath expression that extracts the values
... xpath I0..1stringXPath that extracts the values
... xpathUsage I0..1codenormal | phonetic | nearby | distance | other
XPathUsageType (Required)
... target 0..*codeTypes of resource (if a resource reference)
ResourceType (Required)
... comparator 0..*codeeq | ne | gt | lt | ge | le | sa | eb | ap
SearchComparator (Required)
... modifier 0..*codemissing | exact | contains | not | text | in | not-in | below | above | type
SearchModifierCode (Required)
... chain 0..*stringChained names supported
... component 0..*BackboneElementFor Composite resources to define the parts
.... definition 1..1Reference(SearchParameter)Defines how the part works
.... expression 1..1stringSubexpression relative to main expression

doco Documentation for this format

UML Diagram (Legend)

SearchParameter (DomainResource)An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions)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 are orderableversion : string [0..1]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 generationname : string [1..1]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] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)PublicationStatus! »A flag 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 (this element modifies the meaning of other elements)experimental : boolean [0..1]The date (and optionally time) when the search parameter was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changesdate : dateTime [0..1]The name of the individual or organization that published the search parameterpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitionsuseContext : UsageContext [0..*]A jurisdiction in which the search parameter is intended to be usedjurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible)Jurisdiction ValueSet+ »Explains why this search parameter is needed and why it has been designed as it haspurpose : markdown [0..1]The code used in the URL or the parameter name in a parameters resource for this search parametercode : code [1..1]The base resource type(s) that this search parameter can be used againstbase : code [1..*] « One of the resource types defined as part of FHIR. (Strength=Required)ResourceType! »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 parameters. (Strength=Required)SearchParamType! »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 parameterderivedFrom : uri [0..1]A free text natural language description of the search parameter from the consumer's perspective. and how it useddescription : markdown [1..1]A FluentPath expression that returns a set of elements for the search parameterexpression : string [0..1]An XPath expression that returns a set of elements for the search parameterxpath : string [0..1]How the search parameter relates to the set of elements returned by evaluating the xpath queryxpathUsage : code [0..1] « How a search parameter relates to the set of elements returned by evaluating its xpath query. (Strength=Required)XPathUsageType! »Types of resource (if a resource is referenced)target : code [0..*] « One of the resource types defined as part of FHIR. (Strength=Required)ResourceType! »Comparators supported for the search parametercomparator : code [0..*] « What Search Comparator Codes are supported in search (Strength=Required)SearchComparator! »A modifier supported for the search parametermodifier : code [0..*] « A supported modifier for a search parameter. (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 typechain : string [0..*]ComponentThe definition of the search parameter that describes this partdefinition : Reference [1..1] « SearchParameter »A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expressionexpression : string [1..1]Used to define the parts of a composite search parametercomponent[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 Logical uri to reference this search parameter (globally unique) -->
 <version value="[string]"/><!-- 0..1 Business version of the search parameter -->
 <name value="[string]"/><!-- 1..1 Name for this search parameter (Computer friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></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 Code used in 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 -->
 <derivedFrom value="[uri]"/><!-- 0..1 Original Definition for the search parameter -->
 <description value="[markdown]"/><!-- 1..1 Natural language description of the 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) -->
 <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 -->
 <chain value="[string]"/><!-- 0..* Chained names supported -->
 <component>  <!-- 0..* For Composite resources to define the parts -->
  <definition><!-- 1..1 Reference(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!  Logical uri to reference this search parameter (globally unique)
  "version" : "<string>", // Business version of the search parameter
  "name" : "<string>", // R!  Name for this search parameter (Computer friendly)
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for search parameter (if applicable)
  "purpose" : "<markdown>", // Why this search parameter is defined
  "code" : "<code>", // R!  Code used in URL
  "base" : ["<code>"], // R!  The resource type(s) this search parameter applies to
  "type" : "<code>", // R!  number | date | string | token | reference | composite | quantity | uri
  "derivedFrom" : "<uri>", // Original Definition for the search parameter
  "description" : "<markdown>", // R!  Natural language description of the 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)
  "comparator" : ["<code>"], // eq | ne | gt | lt | ge | le | sa | eb | ap
  "modifier" : ["<code>"], // missing | exact | contains | not | text | in | not-in | below | above | type
  "chain" : ["<string>"], // Chained names supported
  "component" : [{ // For Composite resources to define the parts
    "definition" : { Reference(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:SearchParameter.url [ uri ]; # 1..1 Logical uri to reference this search parameter (globally unique)
  fhir:SearchParameter.version [ string ]; # 0..1 Business version of the search parameter
  fhir:SearchParameter.name [ string ]; # 1..1 Name for this search parameter (Computer friendly)
  fhir:SearchParameter.status [ code ]; # 1..1 draft | active | retired
  fhir:SearchParameter.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:SearchParameter.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:SearchParameter.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:SearchParameter.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:SearchParameter.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  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:SearchParameter.code [ code ]; # 1..1 Code used in 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
  fhir:SearchParameter.derivedFrom [ uri ]; # 0..1 Original Definition for the search parameter
  fhir:SearchParameter.description [ markdown ]; # 1..1 Natural language description of the search parameter
  fhir:SearchParameter.expression [ string ]; # 0..1 FluentPath expression that extracts the values
  fhir:SearchParameter.xpath [ string ]; # 0..1 XPath that extracts the values
  fhir:SearchParameter.xpathUsage [ code ]; # 0..1 normal | phonetic | nearby | distance | other
  fhir:SearchParameter.target [ code ], ... ; # 0..* Types of resource (if a resource reference)
  fhir:SearchParameter.comparator [ code ], ... ; # 0..* eq | ne | gt | lt | ge | le | sa | eb | ap
  fhir:SearchParameter.modifier [ code ], ... ; # 0..* missing | exact | contains | not | text | in | not-in | below | above | type
  fhir:SearchParameter.chain [ string ], ... ; # 0..* Chained names supported
  fhir:SearchParameter.component [ # 0..* For Composite resources to define the parts
    fhir:SearchParameter.component.definition [ Reference(SearchParameter) ]; # 1..1 Defines how the part works
    fhir:SearchParameter.component.expression [ string ]; # 1..1 Subexpression relative to main expression
  ], ...;
]

Changes since DSTU2

SearchParameter
SearchParameter.version added Element
SearchParameter.status Min Cardinality changed from 0 to 1
Change value set from http://hl7.org/fhir/ValueSet/conformance-resource-status to http://hl7.org/fhir/ValueSet/publication-status
SearchParameter.experimental Now marked as Modifier
SearchParameter.contact Type changed from BackboneElement to ContactDetail
SearchParameter.useContext added Element
SearchParameter.jurisdiction added Element
SearchParameter.purpose added Element
SearchParameter.base Max Cardinality changed from 1 to *
SearchParameter.derivedFrom added Element
SearchParameter.description Type changed from string to markdown
SearchParameter.expression added Element
SearchParameter.comparator added Element
SearchParameter.modifier added Element
SearchParameter.chain added Element
SearchParameter.component added Element
SearchParameter.component.definition added Element
SearchParameter.component.expression added Element
SearchParameter.contact.name deleted
SearchParameter.contact.telecom deleted
SearchParameter.requirements deleted

See the Full Difference for further information

 

Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle), JSON-LD (for RDF as JSON-LD),

PathDefinitionTypeReference
SearchParameter.status The lifecycle status of a Value Set or Concept Map.RequiredPublicationStatus
SearchParameter.jurisdiction Countries and regions within which this artifact is targeted for useExtensibleJurisdiction ValueSet
SearchParameter.base
SearchParameter.target
One of the resource types defined as part of FHIR.Requiredhttp://hl7.org/fhir/valueset/resource-typesResourceType
SearchParameter.type Data types allowed to be used for search parameters.RequiredSearchParamType
SearchParameter.xpathUsage How a search parameter relates to the set of elements returned by evaluating its xpath query.RequiredXPathUsageType
SearchParameter.comparator What Search Comparator Codes are supported in searchRequiredSearchComparator
SearchParameter.modifier A supported modifier for a search parameter.RequiredSearchModifierCode

  • spd-1: If an xpath is present, there SHALL be an xpathUsage (expression : xpath.empty() or xpathUsage.exists())
  • spd-2: Search parameters can only have chain names when the search parameter type is 'reference' (expression : chain.empty() or type = 'reference')

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.

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

NameTypeDescriptionPathsIn Common
basetokenThe resource type(s) this search parameter applies toSearchParameter.base
codetokenCode used in URLSearchParameter.code
componentreferenceDefines how the part worksSearchParameter.component.definition
(SearchParameter)
datedateThe search parameter publication dateSearchParameter.date
derived-fromuriOriginal Definition for the search parameterSearchParameter.derivedFrom
descriptionstringText search against the description of the search parameterSearchParameter.description
jurisdictiontokenIntended jurisdiction for search parameterSearchParameter.jurisdiction
namestringName of the search parameterSearchParameter.name
publisherstringName of the publisher of the search parameterSearchParameter.publisher
statustokenThe current status of the search parameterSearchParameter.status
targettokenTypes of resource (if a resource reference)SearchParameter.target
typetokennumber | date | string | token | reference | composite | quantity | uriSearchParameter.type
urluriThe uri that identifies the search parameterSearchParameter.url
versiontokenThe version identifier of the search parameterSearchParameter.version