Authenticate to the Document Responder actor's FHIR endpoint using the appropriate mechanism (OAuth2/SMART or a configured trust relationship per the deployment's security model).
Execute ITI-67 by issuing a FHIR search on DocumentReference with required query parameters: at minimum, patient (or patient.identifier), and optionally status, type, category, period, or setting — verify supported parameters against the Document Responder's CapabilityStatement.
Evaluate the returned searchset Bundle of DocumentReference resources; each entry describes a document including metadata (type, date, author, content type) and a URL in content.attachment.url pointing to the retrievable document.
Execute ITI-68 by issuing an HTTP GET to the URL provided in DocumentReference.content.attachment.url to retrieve the actual document content; the content may be a Binary resource, a CDA XML document, PDF, or FHIR document Bundle depending on the content type.
Handle content.attachment.hash and content.attachment.size values if provided to verify document integrity after retrieval.
Page through ITI-67 search results using Bundle pagination links if the patient has many documents.
Known gotchas
The URL in DocumentReference.content.attachment.url may be an absolute URL to a Binary resource on the same server or an external document store — do not assume it is always a relative FHIR Binary endpoint.
ITI-67 search parameters may be constrained or extended by the specific MHD version deployed; confirm supported parameters via CapabilityStatement to avoid unsupported-parameter errors.
Document content returned via ITI-68 may be base64-encoded within a Binary resource rather than raw content — check the Binary.contentType and decode accordingly.
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