Most hospital integrations move structured data: admissions, orders, lab results. But a large part of the clinical record is narrative: progress notes, operative reports, discharge summaries, radiology transcriptions and scanned referral letters.
In HL7 v2, those documents travel as MDM (Medical Document Management) messages. As the source puts it, ADT tells you where a patient went, ORU tells you what their labs showed, and MDM tells you what the clinician actually wrote.
If you are buying or building an interface that moves clinical documents, for a portal, an AI tool or a document system, this is the part that quietly goes wrong.
What MDM messages carry
HL7 defines 11 MDM events. Most production channels handle four or five of them:
- T01 says a document exists, without its content. The receiving system fetches it separately. Useful for large files or when receivers have different access rights.
- T02 announces a new document and carries its content, as plain text, formatted text or an encoded PDF. This is the most common event in production.
- T04 adds an addendum to an existing document, such as a progress note amended after sign-off.
- T10 fully replaces an earlier document.
- T11 cancels one, most often because the wrong patient was used during transcription.
One document, many events
A single clinical note can generate several of these events over its life. What ties them together is a unique document number carried in every message.
This is where most basic setups break. The source calls T10 replacement the point where most basic implementations fail. The naive approach treats a replacement like a new document, which leaves two active versions with no link between them. Done correctly, the original is kept with status "obsolete", available for audit but not shown as the current version.
Cancellation works the same way. A cancelled document must disappear from general clinical use, but it still has to be kept for historical reference, with a cancellation reason recorded.
For a buyer, the question to ask any vendor or team is simple: how do you handle replacements and cancellations, and can you show me?
What should reach the patient portal, and when
Under the 21st Century Cures Act, most clinical notes must be available to patients without unnecessary delay. But unauthenticated or preliminary documents are a recognized exception.
Each MDM message carries a completion status, from dictated, to transcribed but not signed, to signed by the physician. The source recommends routing a document to the patient portal only when three conditions are met:
- Document type, applying any delay policy your organization has for that type.
- Status: only signed (authenticated or legally authenticated) documents go to patient-facing destinations.
- The facility takes part in the portal.
Document type also drives other routing. Operative notes and discharge summaries often go to different downstream systems, and may need different sign-off before portal release.
When downstream systems speak FHIR
Many newer systems consume FHIR rather than HL7 v2. An MDM document maps to a FHIR DocumentReference: the document type, its status (current or superseded), its unique ID and its author all carry across. The original guide includes the field-by-field mapping and a sample message with each part explained.
Four tests to run before go-live
The source notes MDM channels fail in predictable ways. Test these in a non-production environment:
- Document chain. Send a notice, a new document and a replacement for the same note. You should see one active document and one obsolete, linked. Two active documents means replacement handling is broken.
- Cancellation. After a cancellation, the document should no longer show as active, but should still exist for audit.
- Large PDFs under load. Send ten documents with embedded PDFs at once, and watch the integration engine's memory.
- Portal gate. Send an unsigned document: it should not reach the portal. Send the signed version: it should. If both get through, the gate is broken.
The full guide shows how to build each step in Mirth Connect, including replacement and cancellation logic.
Nirmitee.io builds and supports Mirth Connect interfaces, including clinical document routing to portals, EHRs and FHIR systems. For the sample message and channel code, read the original: HL7 MDM Messages Explained on Nirmitee.io.
Dinesh Thorat is Healthtech Growth Partner at Nirmitee.io.
Originally published at nirmitee.io.
Top comments (0)