Implement FHIR patient matching using the $match operation to find the best matching Patient record in a server when integrating data from an external system

domain: hl7.org/fhir · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. POST a Parameters resource to [base]/Patient/$match containing a resource parameter with a Patient resource populated with known identifiers, demographics, and contact information
  2. Include the onlyCertainMatches parameter set to false to receive candidate matches with confidence scores, or set to true to return only high-confidence definite matches
  3. Evaluate the returned Bundle entries, each containing a Patient resource and a search.score between 0 and 1 indicating match confidence, along with an extension for match grade (certain, probable, possible)
  4. Implement a matching threshold policy: treat certain and high-score probable matches as auto-linkable, queue possible matches for manual review, and create new records only when no candidates exceed the threshold
  5. Log all $match requests and outcomes for audit purposes, including the input demographics, candidate IDs returned, scores, and the final linking decision

Known gotchas

Related routes

Implement FHIR Bulk Data system-level $export to extract all patient data from a FHIR server with _since for incremental sync
hl7.org · 5 steps · unrated
Implement FHIR NamingSystem resources to manage identifier namespaces and resolve patient identifiers across health systems using the $translate operation
hl7.org/fhir/R4 · 5 steps · unrated
search patient resources on a FHIR R4 server using search parameters, _include, and bundle pagination
fhir · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans