Skip to main content

Overview

FHIR operations are named procedures that go beyond basic REST interactions (CRUD, search, history). They’re identified by a $-prefixed code like $validate, $everything, or $expand. Operations can be invoked at three different levels:
LevelEndpoint patternExample
System[base]/$opGET /fhir/$install-package
Type[base]/{type}/$opPOST /fhir/ValueSet/$expand
Instance[base]/{type}/{id}/$opPOST /fhir/Patient/123/$everything

How parameters work

Operations use the Parameters resource for inputs and outputs. Many servers support both:
  • GET with query parameters
  • POST with a Parameters body
Example (POST):
POST /fhir/ValueSet/$expand
Content-Type: application/fhir+json
{
  "resourceType": "Parameters",
  "parameter": [
    { "name": "url", "valueUri": "http://hl7.org/fhir/ValueSet/administrative-gender" },
    { "name": "count", "valueInteger": 10 }
  ]
}

Discovering what a server supports

Two places to look:
  • CapabilityStatement (GET /fhir/metadata) lists supported operations
  • OperationDefinition resources describe inputs/outputs and invocation level

Next