Overview
Expands an implicit ValueSet to return a paginated list of matching codes. This powers dropdown menus, autocomplete, and template validation in EHRbase, HAPI FHIR, and other FHIR clients. OMOPHub supports implicit ValueSets defined by code system URIs - no stored ValueSet definitions required.Supported Patterns
All codes from a code system
Descendants of a concept (is-a filter)
referenceSetUri:
With text filter (typeahead/autocomplete)
Parameters
Response
Pagination
Useoffset and count to page through large expansions. The response includes total for the total number of matching concepts.
Deterministic sort order. Concepts are sorted by OMOP
concept_id so successive calls return the same first-page results and paginate consistently. FHIR clients that cache one expansion per ValueSet (EHRbase’s composition validator, HAPI FHIR’s RemoteTerminologyServiceValidationSupport) can rely on this - a code observed in page 0 of one call will still be in page 0 of the next call.Double percent-encoding tolerance. Spring-based clients (HAPI FHIR, EHRbase via
UriComponentsBuilder) sometimes percent-encode the url parameter twice - once for the template referenceSetUri and again when building the outbound HTTP request. $expand detects the second encoding layer automatically and decodes it before parsing the implicit ValueSet URL, so both single- and double-encoded forms work. Malformed percent-encoding falls back to a clean 400 OperationOutcome instead of a 500.