Searching for Data - Smile CDR Documentation
Searching For Data
This section contains information about methods for searching for data in the CDR.
FHIR Search Extensions
In addition to implementing most of the FHIR Search specification, Smile CDR implements the following extensions:
_source
An additional search parameter called _source can be used to search for resources based on information about the system or request that created the resource. See Storing Source Information.
%now
Date searches can be performed relative to "now" using the %now parameter value. For example, to search for Procedures with a date later than now, you can search for /Procedure?date=ge%now.
Note the '%' would need to be URL escaped so the actual URL will be /Procedure?date=ge%25now
The way this works is Smile substitutes %now with the current date and time in the standard FHIR format yyyy-MM-ddTHH:mm:ss before submitting it to the FHIR Storage module.
%today
Similarly date searches can be performed relative to 'today' using the '%today' parameter value. '%today' works the same as '%now' except that it searches as a 'date' type as opposed to a 'dateTime' type.
Unsupported Search Parameters
Smile CDR does not currently support the _containedType FHIR Search parameter, or the _contained=both directive. See Index Contained for information on indexing contained resources.
Limitations
Type modifier restriction for contained resources
Smile CDR searches may not correctly process :[type] modifiers if the resource indicated by the modified search parameter is a contained resource. For example, consider the following search.
http://localhost:8000/Observation?subject:Patient.organization.name=HealthOrg
Suppose Observation/A has a reference to Device/B, which in turn has a reference to Organization/C, and Organization/C has the name "HealthOrg". In this case, Observation/A will not be included in the search result, because the subject search parameter is restricted to Patient resources. However, if Observation/D has a reference to #contained-device, which also refers to Organization/C, then Observation/D will be included in the search result, because we can not apply the type restriction to contained resources.
Searching for Data
FHIR Storage
FHIR Storage Modules FHIR Endpoint Module FHIRWeb Console OpenAPI / Swagger Support FHIR Endpoint Customization Resource IDs Search Parameters Search Parameter Features Phonetic Search Parameters Search Parameter Tuning Search Parameter Reindexing Searching for Data Creating Data Reading Data Updating Data Deleting Data Binary Data External Object Storage Externalized Resource Body Storage Request Tracing and Provenance Resource Versions and Versioned References Tags, Profiles, and Security Labels Partitioning and Multitenancy Patient ID Partitioning Modes Custom Resource Types Batch and Scheduled Jobs Tokenization Bulk Resource Modification