On this page:

6.2Searching for Codes

 

When building applications that capture data using coded values, a common requirement is to search for codes. This might be done in order to present a user with a pick-list, or to provide a type-ahead display with codes matching the characters that a user has entered so far in a text box.

The standard mechanism for performing searches is to use the ValueSet $expand operation. A simple example is shown below, searching for all codes in the http://acme.org CodeSystem (i.e. the CodeSystem in the repository where CodeSystem.url = http://acme.org) having a display name starting with the string "Systolic".

POST /ValueSet/$expand
Content-Type: application/fhir+json

{
  "resourceType": "ValueSet",
  "compose": {
    "include": [ {
      "system": "http://acme.org",
      "filter": [ {
        "property": "display",
        "op": "=",
        "value": "Systolic"
      } ]
    } ]
  }
}