Construct a FHIR transaction Bundle of type transaction conforming to the IHE MHD Provide Document Bundle profile, containing a List resource (SubmissionSet), one or more DocumentReference resources, an optional List resource (Folder), and Binary or DocumentReference resources carrying the document content
Populate the SubmissionSet List resource with required elements: List.status=current, List.mode=working, List.code set to the SubmissionSet code, and List.subject referencing the patient
For each document, populate a DocumentReference with at minimum masterIdentifier, status, type, subject, content (with attachment and format), and context
Set Bundle.entry.request for each resource with method=POST and the appropriate relative URL, ensuring the SubmissionSet List is processed first using Bundle entry ordering or fullUrl references
POST the Bundle to [fhir-base] and parse the transaction-response Bundle to verify all entries returned 201 Created status codes
Known gotchas
MHD defines four document sharing options (Minimal Metadata, Comprehensive Metadata, UnContained References, Contained References) and the server must support the same option as the sender — submitting Comprehensive Metadata to a Minimal Metadata server will fail with unexpected element errors
DocumentReference.content.attachment.url must point to a retrievable endpoint; when using Contained References the Binary resource is embedded in the Bundle using a contained reference, while UnContained References requires the Binary to be pre-loaded at an accessible URL
The IHE MHD IG constrains the Bundle structure differently from a generic FHIR transaction Bundle — specifically the required profile tags on each entry and the List resource structure differ from standard FHIR and must match the MHD profile exactly
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