SearchType

SearchType is implemented in Directory through GraphQL queries. All supported resources will include a search query that supports query parameters defined in this specification. In addition to the query parameters defined in each resource, the following common query parameters are supported.

Common Query Parameters
  • _id
  • _lastUpdated
  • _tag **
  • _profile **
  • _security **
  • _source

** These values for these parameters are system generated.

Search Modifiers

Parameters are defined per resource. Parameter names may specify a modifier as a suffix which are available dependent on the search parameter type. Modifiers will be implemented as additional parameters per resource. The modifiers are separated from the parameter name by an underscore in Directory. Modifiers can be used in paged queries. See Search Modifiers in Appendix: HL7 FHIR References for details.

An example modifier would be resourceMissing: true/false. Therefore, the modifier for practitioner gender would be a query parameter of genderMissing.

Not all modifiers are currently supported by the backing FHIR Server implementation. In general the following modifiers will be supported, but refer to Supported Resource Specification elements for parameters and modifiers supported by resource type.

All Query Parameter Types:

  • missing (e.g. identifierMissing: true)

String Query Parameter Types:

  • exact (e.g. givenExact: ["Bob"])
  • contains (e.g. familyContains: ["Mac"])

Reference Query Parameter Types:

  • type (e.g. subjectType: ["Patient"])
Searching Multiple Values (joining with AND or OR)

If a parameter repeats, such as identifier: ["0121", "0122"], then this matches a practitioner who is associated with both facility 0121 and 0122. This is known as an AND search parameter, since the server is expected to respond only with results which match both values.

If instead, the search is to find practitioner's that are associated with either facility, then this is a single parameter with multiple values separated by a comma. For example, identifier: ["0121, 0122"]. This is known as an OR query parameter, since the server is expected to respond with results which match either value. Every search parameter may be used with comma-separated values in this fashion; this includes the use of query parameters with modifiers.

AND parameters and OR parameters may also be combined, for example: identifier: ["0121, 0122", "0123"] would refer to any practitioner who is associated with facility 0123, as well as either 0121 or 0122.

Query Prefixes

For the ordered parameter types of number, date, and quantity, a prefix to the parameter value may be used to control the nature of the matching.

  • eq - Equals
  • ne - Not equals
  • gt - Greater than
  • lt - Less than
  • ge - Greater than equals
  • le - Less than equals
  • sa - Starts after the provided value
  • eb - Ends before the provided value
  • The following example would be used to find all patients born between June and September 1994

query { patients (birthdate: ["ge1994-06-01", "lt1994-10-01"]) }