On this page:

5.15Searching For Data

 

This section contains information about methods for searching for data in the CDR.

5.15.1FHIR 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.

5.15.2Unsupported 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.

5.15.3Limitations

 

Smile CDR searches will currently only traverse into contained resources at the tail of the search chain. For example, consider the following search. http://localhost:8000/Observation?subject.organization.name=HealthOrg

This search will find and return Observation resources for the case where both the subject reference and the organization reference link to discrete resources. It will also return Observation resources for the case where the subject reference links to a discrete resource and the organization reference links to a contained resource. However, this search will not find resources where the subject reference links to a contained resource.