MEDRPT — EDIFACT Medical Service Report Message (D.21B)
The MEDRPT message is the medical service report sent by a healthcare provider (laboratory, imaging facility, specialist) to the prescriber or to another clinical actor: it carries the clinical context, the performed acts, the results, the conclusions and the recommendations. It is the structured back-channel of an exam or consultation in inter-facility healthcare exchanges. This page summarises the segment structure as published by UN/CEFACT for directory D.21B.
Purpose
The MEDRPT message is the medical service report sent by a healthcare provider (laboratory, imaging facility, specialist) to the prescriber or to another clinical actor: it carries the clinical context, the performed acts, the results, the conclusions and the recommendations. It is the structured back-channel of an exam or consultation in inter-facility healthcare exchanges.
This page focuses on the structure published by UN/CEFACT for directory D.21B. The segments listed, their status (M / C), position and repetition factor are extracted from the official file medrpt_c.htm hosted on service.unece.org.
Segment structure
The MEDRPT D.21B message has 137 header entries, 0 detail entries and 0 summary entries (segments and groups combined). Groups are shown in bold and their members are indented by actual nesting depth.
Header
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
00010 | UNH | Message header | M | 1 |
00020 | BGM | Beginning of message | M | 1 |
00030 | DTM | Date/time/period | C | ×9 |
00040 | FTX | Free text | C | ×9 |
00050 | SG1 | Group (×99) | M | ×99 |
00060 | PNA | Party identification | M | 1 |
00070 | ADR | Address | C | ×9 |
00080 | COM | Communication contact | C | ×9 |
00090 | FTX | Free text | C | ×9 |
00100 | RFF | Reference | C | ×9 |
00110 | SEQ | Sequence details | C | 1 |
00120 | LAN | Language | C | ×9 |
00130 | SPR | Organisation classification details | C | 1 |
00140 | QUA | Qualification | C | ×9 |
00150 | EMP | Employment details | C | ×9 |
00160 | SG2 | Group (×99) | M | ×99 |
00170 | IRQ | Information required | M | 1 |
00180 | GEI | Processing information | M | 1 |
00190 | RFF | Reference | M | ×9 |
00200 | DTM | Date/time/period | M | 1 |
00210 | STS | Status | C | 1 |
00220 | PTY | Priority | C | 1 |
00230 | LAN | Language | C | 1 |
00240 | FTX | Free text | C | ×99 |
00250 | TEM | Test method | C | 1 |
00260 | SG3 | Group (×99) | C | ×99 |
00270 | RFF | Reference | M | 1 |
00280 | DTM | Date/time/period | C | 1 |
00290 | SG4 | Group (×99) | C | ×99 |
00300 | FCA | Financial charges allocation | M | 1 |
00310 | RFF | Reference | M | ×9 |
00320 | GEI | Processing information | C | 1 |
00330 | DTM | Date/time/period | C | ×9 |
00340 | PTY | Priority | C | 1 |
00350 | CIN | Clinical information | C | ×9 |
00360 | FTX | Free text | C | ×9 |
00370 | TEM | Test method | C | ×9 |
00380 | SG5 | Group (×99) | C | ×99 |
00390 | DOC | Document/message details | M | 1 |
00400 | RFF | Reference | M | ×9 |
00410 | DTM | Date/time/period | C | 1 |
00420 | SG6 | Group (×99) | C | ×99 |
00430 | ATT | Attribute | M | 1 |
00440 | RFF | Reference | C | ×9 |
00450 | ADR | Address | C | ×9 |
00460 | COM | Communication contact | C | ×9 |
00470 | REL | Relationship | C | 1 |
00480 | IMD | Item description | C | ×9 |
00490 | FTX | Free text | C | ×9 |
00500 | PNA | Party identification | C | ×9 |
00510 | DTM | Date/time/period | C | ×9 |
00520 | PDI | Person demographic information | C | 1 |
00530 | NAT | Nationality | C | ×9 |
00540 | LAN | Language | C | ×9 |
00550 | HAN | Handling instructions | C | ×9 |
00560 | CCI | Characteristic/class id | C | ×9 |
00570 | SG7 | Group (×9) | C | ×9 |
00580 | PAS | Attendance | M | 1 |
00590 | LOC | Place/location identification | C | ×9 |
00600 | DTM | Date/time/period | C | ×9 |
00610 | RFF | Reference | C | 1 |
00620 | SG8 | Group (×999) | C | ×999 |
00630 | CAV | Characteristic value | M | 1 |
00640 | CIN | Clinical information | C | ×9 |
00650 | LAN | Language | C | ×9 |
00660 | DTM | Date/time/period | C | ×9 |
00670 | FTX | Free text | C | ×99 |
00680 | RFF | Reference | C | ×9 |
00690 | SG9 | Group (×99) | C | ×99 |
00700 | STS | Status | M | 1 |
00710 | SEQ | Sequence details | C | 1 |
00720 | GEI | Processing information | C | 1 |
00730 | RSL | Result | C | 1 |
00740 | CCI | Characteristic/class id | M | ×9 |
00750 | CIN | Clinical information | C | ×9 |
00760 | DTM | Date/time/period | C | ×99 |
00770 | FTX | Free text | C | ×99 |
00780 | RFF | Reference | C | ×99 |
00790 | SG10 | Group (×99) | C | ×99 |
00800 | RSL | Result | M | 1 |
00810 | FTX | Free text | C | ×9 |
00820 | CCI | Characteristic/class id | C | ×9 |
00830 | SG11 | Group (×99) | C | ×99 |
00840 | REL | Relationship | M | 1 |
00850 | RFF | Reference | C | ×99 |
00860 | SG12 | Group (×99) | C | ×99 |
00870 | CLI | Clinical intervention | M | 1 |
00880 | SG13 | Group (×99) | C | ×99 |
00890 | IMD | Item description | M | 1 |
00900 | DSG | Dosage administration | C | ×9 |
00910 | FTX | Free text | C | ×9 |
00920 | INP | Parties and instruction | C | ×9 |
00930 | SG14 | Group (×99) | C | ×99 |
00940 | SEQ | Sequence details | M | 1 |
00950 | IMD | Item description | M | ×9 |
00960 | PRC | Process identification | C | ×9 |
00970 | RFF | Reference | C | ×9 |
00980 | QTY | Quantity | C | 1 |
00990 | DTM | Date/time/period | C | ×99 |
01000 | PAC | Package | C | 1 |
01010 | FTX | Free text | C | ×9 |
01020 | TDT | Transport information | C | ×9 |
01030 | HAN | Handling instructions | C | ×9 |
01040 | LOC | Place/location identification | C | ×9 |
01050 | ADR | Address | C | ×9 |
01060 | SG15 | Group (×99) | C | ×99 |
01070 | CLI | Clinical intervention | M | 1 |
01080 | IMD | Item description | C | 1 |
01090 | DSG | Dosage administration | C | 1 |
01100 | DTM | Date/time/period | C | ×9 |
01110 | FTX | Free text | C | ×9 |
01120 | QTY | Quantity | C | 1 |
01130 | INP | Parties and instruction | C | ×9 |
01140 | SG16 | Group (×99) | M | ×99 |
01150 | LIN | Line item | M | 1 |
01160 | GEI | Processing information | M | 1 |
01170 | RSL | Result | C | 1 |
01180 | CCI | Characteristic/class id | M | ×99 |
01190 | CIN | Clinical information | C | ×9 |
01200 | SEQ | Sequence details | C | 1 |
01210 | STS | Status | C | 1 |
01220 | DTM | Date/time/period | C | ×9 |
01230 | FTX | Free text | C | ×99 |
01240 | MOA | Monetary amount | C | ×9 |
01250 | RFF | Reference | C | ×99 |
01260 | EQD | Equipment details | C | ×9 |
01270 | SG17 | Group (×99) | C | ×99 |
01280 | REL | Relationship | M | 1 |
01290 | RFF | Reference | C | ×99 |
01300 | SG18 | Group (×99) | C | ×99 |
01310 | RSL | Result | M | 1 |
01320 | FTX | Free text | C | ×9 |
01330 | CCI | Characteristic/class id | C | ×9 |
01340 | SG19 | Group (×99) | C | ×99 |
01350 | AUT | Authentication result | M | 1 |
01360 | DTM | Date/time/period | C | ×9 |
01370 | UNT | Message trailer | M | 1 |
Detail
No segment in this section.
Summary
No segment in this section.
Changes vs D.96A
The MEDRPT message is not published in directory D.96A. No "D.96A → D.21B" comparison line can therefore be produced — see the block below for details.
This message is not published in directory D.96A: it was introduced into the standard after that release and therefore has no historical baseline for comparison. The first directory indexed on ediverse.io sets the reference; later changes are then documented from one release to the next in subsequent directories.
Structural example
Minimal example of an MEDRPT D.21B message with mandatory segments only. The goal is to show the exact version declared in UNH (MEDRPT:D:21B:UN) — not to replicate a full business case.
UNB+UNOC:3+5410000000123:14+5410000000456:14+260514:1430+CTRL021001'
UNH+1+MEDRPT:D:21B:UN'
BGM+380+MEDRPT-2026-R-0512+9'
DTM+137:20260514:102'
PNA+PAT+1820000007654::ZZZ+++SU:DUPONT+FN:JEAN'
ADR+CD+++75001:PARIS:::FR'
DTM+329:19720312:102'
IRQ+1'
EVE+1'
RSL+TXT++++HEMOGRAM normal — no clinically significant abnormality'
CIN+1'
UNT+10+1'
UNZ+1+CTRL021001' Common errors
- Misaligned UNH tokens — The
UNH+...+MEDRPT:D:21B:UNtoken must reflect exactly the directory in use — a mismatch between the UNH release and the release agreed with the partner is rejected by every strict validator. - Wrong UNT segment count — The value after
UNT+must include UNH and UNT themselves. By far the most common sender-side error, regardless of the directory in use. - Stale code lists — Between D.96A and D.21B, several code lists received new qualifiers (DTM status, RFF qualifier, NAD codes…). Reusing an older directory’s code tables triggers warnings or even rejections depending on the partner’s strict-conformance mode.
Related messages
Other versions of this message available on ediverse.io: MEDRPT D.10A, MEDRPT D.16B, MEDRPT D.24A.