This page is part of the FHIR Specification (v0.0.82: DSTU 1). 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
Example Index:
| General example for searching on an extension | XML | JSON |
| Search parameter for an extension example | XML | JSON |
XML
General example for searching on an extension (id = "example")
<SearchParameter xmlns="http://hl7.org/fhir"> <id value="example"/> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div> </text> <url value="http://hl7.org/fhir/SearchParameter/example"/> <name value="Example Search Parameter"/> <publisher value="HL7 FHIR Project"/> <contact> <telecom> <system value="url"/> <value value="http://hl7.org/fhir"/> </telecom> </contact><!-- this is the canonical definition for the _id search parameter --> <base value="Resource"/> <type value="token"/> <description value="Search by resource identifier - e.g. same as the read interaction, but can return included resources"/> <xpath value="f:id"/> </SearchParameter>
JSON
General example for searching on an extension
{
"resourceType": "SearchParameter",
"id": "example",
"text": {
"status": "generated",
"div": "<div>!-- Snipped for Brevity --></div>"
},
"url": "http://hl7.org/fhir/SearchParameter/example",
"name": "Example Search Parameter",
"publisher": "HL7 FHIR Project",
"contact": [
{
"telecom": [
{
"system": "url",
"value": "http://hl7.org/fhir"
}
]
}
],
"base": "Resource",
"type": "token",
"description": "Search by resource identifier - e.g. same as the read interaction, but can return included resources",
"xpath": "f:id"
}
XML
Search parameter for an extension example (id = "example-extension")
<SearchParameter xmlns="http://hl7.org/fhir"> <id value="example-extension"/> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"><!-- Snipped for brevity --></div> </text> <url value="http://hl7.org/fhir/SearchParameter/example-extension"/> <name value="Example Search Parameter on an extension"/> <publisher value="HL7 FHIR Project"/> <contact> <telecom> <system value="url"/> <value value="http://hl7.org/fhir"/> </telecom> </contact><!-- this is the canonical definition for the _id search parameter --> <base value="Patient"/> <type value="token"/> <description value="Search by url for a participation agreement"/> <xpath value="http://example.org/fhir/StructureDefinition/participation-agreement"/> </SearchParameter>
JSON
Search parameter for an extension example
{
"resourceType": "SearchParameter",
"id": "example-extension",
"text": {
"status": "generated",
"div": "<div>!-- Snipped for Brevity --></div>"
},
"url": "http://hl7.org/fhir/SearchParameter/example-extension",
"name": "Example Search Parameter on an extension",
"publisher": "HL7 FHIR Project",
"contact": [
{
"telecom": [
{
"system": "url",
"value": "http://hl7.org/fhir"
}
]
}
],
"base": "Patient",
"type": "token",
"description": "Search by url for a participation agreement",
"xpath": "http://example.org/fhir/StructureDefinition/participation-agreement"
}
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.