Send a GET request to {base}/Patient with query parameters such as family, given, birthdate, or identifier to filter results.
Add _include=Patient:general-practitioner or similar to pull related resources into the same Bundle response.
Parse the returned Bundle (type: searchset) and iterate over entry[].resource for each matched Patient.
Check Bundle.link[] for a rel='next' URL and follow it to retrieve subsequent pages; repeat until no next link is present.
Use _count to control page size and _total=accurate if you need the total match count (note: may be expensive on large servers).
Prefer POST to {base}/Patient/_search if query strings are long or contain sensitive data, sending parameters as application/x-www-form-urlencoded.
Known gotchas
Servers are not required to support all search parameters; check the server's CapabilityStatement (GET {base}/metadata) to see which parameters are advertised before relying on them.
The next-page link is an opaque server-generated URL; do not construct pagination URLs manually as token formats vary by implementation.
Patient matching across systems is not guaranteed—a search by name and birthdate may return multiple candidates; always confirm identity through a unique identifier (MRN, national ID) before acting on results.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp