{"id":"288c95ce-c853-4d2c-a163-bfe68d3bb654","task":"Process an HL7v2 MDM^T02 medical document notification to ingest a clinical document","domain":"hl7.org","steps":["Receive the MDM^T02 message (Medical Document Management — Original Document Notification with Content) via your MLLP listener; T02 indicates the document content is embedded in the message as opposed to T01 which is a pointer-only notification","Parse the EVN segment for event date/time and TXA segment for document metadata: document type code in TXA-2, activity date/time in TXA-4, originating provider in TXA-9, document status in TXA-17 (AU for authenticated, DI for dictated), and unique document ID in TXA-12","Extract the OBX segments that follow the TXA segment; for embedded documents OBX-2 will typically be 'ED' (encapsulated data) or 'TX' (text); for ED type, OBX-5 contains the document encoded as base64 (or plain text for TX) along with the encoding type and MIME type","Decode the document content from base64 if applicable; the document may be a CDA (Clinical Document Architecture) XML document, plain text, or a PDF depending on the sending system","Correlate the document to the patient using the PID segment in the MDM message and the visit using PV1 if present; store the document with appropriate indexing by document type, date, and provider","Send an ACK and, if your system requires document management workflow, track authentication status using TXA-17 — documents in dictated or transcribed status may need to be updated via subsequent MDM messages as they move through the authentication workflow"],"gotchas":["MDM message handling is often overlooked in interface implementations but is a primary mechanism for delivering transcribed notes, operative reports, and discharge summaries from transcription systems and EHRs","TXA-2 document type codes vary by sending system and may be local codes rather than standard HL7 table values; maintain a mapping from the sender's local document type codes to your internal document categories","Large documents (lengthy operative reports, multi-page CDAs) embedded in OBX-5 as base64 can produce very large HL7v2 messages that exceed default MLLP buffer sizes on some interface engines; configure maximum message size settings appropriately"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/288c95ce-c853-4d2c-a163-bfe68d3bb654"}