Aidbox provides a Search API for all stored resources. Aidbox Search API is a superset of the FHIR Search API.
A base search request is composed of the list of pairs param = value:
Where param can be one of:
Underscored parameter started with underscore, like
Name of search parameter
Chained parameter expression
Dotted expression - started with
Simple search by patient name:
GET /fhir/Patient?name=Max&_elements=id, birthDAte
GET /Patient?name=Max&_elements=id, birthDAte
Search and sort by resource id
Search and sort by resource last modification date
Full text search by resource narrative
Full text search by resource content
Include or exclude specific resource elements
Include only summary elements
Search resources included into specific List
Sort search results
Turn on/off total count
Include referenced resources into result
Include into result resources, which reference searched resources
See query execution plan
Change result format
Search defined in terms of "search parameters". SearchParameter is a meta-resource, which describes which part of the resource it is and how you can make it searchable.
Search parameter can be one of the following types:
Search parameter SHALL be a number (a whole number, or a decimal).
Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.
Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used.
A reference to another resource.
A composite search parameter that combines a search on two values together.
A search parameter that searches on a quantity.
A search parameter that searches on a URI (RFC 3986).
Depending on the value type, different modifiers can be applied.
:text — case insensitive, partial match of text & data associated with search parameter.
GET /fhir/Entity?description:missing=true// For gender:missing=true,// server will return all resources that// don't have a value for the gender parameter.
GET /Entity?description:missing=true// For gender:missing=true,// server will return all resources that// don't have a value for the gender parameter.
// Search for any patient with [email protected] emailGET /fhir/Patient?email:text=[email protected].com// Search for any patient with gmail or icloud emailGET /fhir/Patient?email:text=GMail.com,ICloud.com// Search for any patient which have "fhir" in any of their contact infoGET /fhir/Patient?telecom:text=fhir
:exact — no partial matches, case sensitive;
:contains — case insensitive, partial match at start or end.
Default behavior is case insensitive, partial match at start.
:not — reverses the code matching: returns all resources that do not have a matching item.
:i — case insensitive, exact match of text associated with token or token itself.
:in — the search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set.
//Search for any patient with a gender that does not have the code "male"//Note that for :not, the search does not return any resources that have a genGET /fhir/Patient?gender:not=male
//Search for any patient with a gender that does not have the code "male"//Note that for :not, the search does not return any resources that have a genGET /Patient?gender:not=male
//Search for any condition that is in the institutions list of cardiac conditions//Note: you must have Concept with valueset definedGET /fhir/Condition?code:in=/ValueSet/cardiac-conditions
//Search for any condition that is in the institutions list of cardiac conditions//Note: you must have Concept with valueset definedGET /Condition?code:in=/ValueSet/cardiac-conditions
Reference describes the relationship between resources. Following options are available for filtering by reference:
Сoded element or identifier
For example, let's find all encounters related to a specified patient:
For Numbers, Dates, and Quantities (will be supported), we can use the following conditionals in a search:
eq - equal (default)
ne - non-equal
lt - less than
le - less or equal
gt - greater than
ge - greater or equal