MEDREQ — EDIFACT Medical Service Request Message (D.21B)
The MEDREQ message is the medical service request sent by a prescriber to a healthcare provider (laboratory, imaging facility, specialist): it identifies the patient, the prescriber, the requested acts or exams, the relevant clinical information and the administrative constraints. The structured response is carried by MEDRPT. This page summarises the segment structure as published by UN/CEFACT for directory D.21B.
Purpose
The MEDREQ message is the medical service request sent by a prescriber to a healthcare provider (laboratory, imaging facility, specialist): it identifies the patient, the prescriber, the requested acts or exams, the relevant clinical information and the administrative constraints. The structured response is carried by MEDRPT.
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 medreq_c.htm hosted on service.unece.org.
Segment structure
The MEDREQ D.21B message has 131 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 | FCA | Financial charges allocation | M | 1 |
00180 | GEI | Processing information | M | 1 |
00190 | RFF | Reference | M | ×9 |
00200 | DTM | Date/time/period | M | ×9 |
00210 | PTY | Priority | C | 1 |
00220 | CIN | Clinical information | C | ×9 |
00230 | FTX | Free text | C | ×9 |
00240 | LAN | Language | C | ×9 |
00250 | PAC | Package | C | 1 |
00260 | IRQ | Information required | C | 1 |
00270 | TEM | Test method | C | ×9 |
00280 | HAN | Handling instructions | C | 1 |
00290 | SG3 | Group (×99) | C | ×99 |
00300 | SCC | Scheduling conditions | M | 1 |
00310 | QTY | Quantity | C | 1 |
00320 | DTM | Date/time/period | C | ×9 |
00330 | FTX | Free text | C | ×9 |
00340 | SG4 | Group (×99) | C | ×99 |
00350 | DOC | Document/message details | M | 1 |
00360 | RFF | Reference | M | ×9 |
00370 | DTM | Date/time/period | C | 1 |
00380 | SG5 | Group (×99) | C | ×99 |
00390 | ATT | Attribute | M | 1 |
00400 | RFF | Reference | C | ×9 |
00410 | ADR | Address | C | ×9 |
00420 | COM | Communication contact | C | ×9 |
00430 | HAN | Handling instructions | C | ×9 |
00440 | REL | Relationship | C | 1 |
00450 | IMD | Item description | C | ×9 |
00460 | FTX | Free text | C | ×9 |
00470 | PNA | Party identification | C | ×9 |
00480 | DTM | Date/time/period | C | ×9 |
00490 | PDI | Person demographic information | C | 1 |
00500 | NAT | Nationality | C | ×9 |
00510 | LAN | Language | C | ×9 |
00520 | CCI | Characteristic/class id | C | ×9 |
00530 | SG6 | Group (×9) | C | ×9 |
00540 | PAS | Attendance | M | 1 |
00550 | LOC | Place/location identification | C | ×9 |
00560 | DTM | Date/time/period | C | ×9 |
00570 | RFF | Reference | C | 1 |
00580 | SG7 | Group (×999) | C | ×999 |
00590 | CAV | Characteristic value | M | 1 |
00600 | CIN | Clinical information | C | ×9 |
00610 | LAN | Language | C | ×9 |
00620 | DTM | Date/time/period | C | ×9 |
00630 | FTX | Free text | C | ×99 |
00640 | RFF | Reference | C | ×9 |
00650 | SG8 | Group (×99) | C | ×99 |
00660 | STS | Status | M | 1 |
00670 | SEQ | Sequence details | C | 1 |
00680 | GEI | Processing information | C | 1 |
00690 | RSL | Result | C | 1 |
00700 | CCI | Characteristic/class id | M | ×9 |
00710 | CIN | Clinical information | C | ×9 |
00720 | DTM | Date/time/period | C | ×99 |
00730 | FTX | Free text | C | ×99 |
00740 | RFF | Reference | C | ×99 |
00750 | SG9 | Group (×99) | C | ×99 |
00760 | RSL | Result | M | 1 |
00770 | FTX | Free text | C | ×9 |
00780 | CCI | Characteristic/class id | C | ×9 |
00790 | SG10 | Group (×99) | C | ×99 |
00800 | REL | Relationship | M | 1 |
00810 | RFF | Reference | C | ×99 |
00820 | SG11 | Group (×99) | C | ×99 |
00830 | CLI | Clinical intervention | M | 1 |
00840 | SG12 | Group (×99) | C | ×99 |
00850 | IMD | Item description | M | 1 |
00860 | DSG | Dosage administration | C | ×9 |
00870 | FTX | Free text | C | ×9 |
00880 | INP | Parties and instruction | C | ×9 |
00890 | SG13 | Group (×99) | C | ×99 |
00900 | SEQ | Sequence details | M | 1 |
00910 | IMD | Item description | M | ×9 |
00920 | PRC | Process identification | C | ×9 |
00930 | RFF | Reference | C | ×9 |
00940 | QTY | Quantity | C | 1 |
00950 | DTM | Date/time/period | C | ×99 |
00960 | PAC | Package | C | 1 |
00970 | PTY | Priority | C | 1 |
00980 | FTX | Free text | C | ×9 |
00990 | TDT | Transport information | C | ×9 |
01000 | HAN | Handling instructions | C | ×9 |
01010 | LOC | Place/location identification | C | ×9 |
01020 | ADR | Address | C | ×9 |
01030 | SG14 | Group (×99) | C | ×99 |
01040 | CLI | Clinical intervention | M | 1 |
01050 | IMD | Item description | C | 1 |
01060 | DSG | Dosage administration | C | 1 |
01070 | DTM | Date/time/period | C | ×9 |
01080 | FTX | Free text | C | ×9 |
01090 | QTY | Quantity | C | 1 |
01100 | INP | Parties and instruction | C | ×9 |
01110 | SG15 | Group (×99) | C | ×99 |
01120 | GEI | Processing information | M | 1 |
01130 | CCI | Characteristic/class id | M | ×99 |
01140 | PTY | Priority | C | ×9 |
01150 | QTY | Quantity | C | 1 |
01160 | CIN | Clinical information | C | ×9 |
01170 | DTM | Date/time/period | C | ×9 |
01180 | FTX | Free text | C | ×9 |
01190 | TEM | Test method | C | ×9 |
01200 | MOA | Monetary amount | C | ×9 |
01210 | RFF | Reference | C | ×99 |
01220 | HAN | Handling instructions | C | 1 |
01230 | SG16 | Group (×99) | C | ×99 |
01240 | SCC | Scheduling conditions | M | 1 |
01250 | QTY | Quantity | C | 1 |
01260 | DTM | Date/time/period | C | ×9 |
01270 | FTX | Free text | C | ×9 |
01280 | SG17 | Group (×99) | C | ×99 |
01290 | AUT | Authentication result | M | 1 |
01300 | DTM | Date/time/period | C | ×9 |
01310 | UNT | Message trailer | M | 1 |
Detail
No segment in this section.
Summary
No segment in this section.
Changes vs D.96A
The MEDREQ 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 MEDREQ D.21B message with mandatory segments only. The goal is to show the exact version declared in UNH (MEDREQ:D:21B:UN) — not to replicate a full business case.
UNB+UNOC:3+5410000000123:14+5410000000456:14+260514:1430+CTRL021001'
UNH+1+MEDREQ:D:21B:UN'
BGM+700+MEDREQ-2026-Q-0341+9'
DTM+137:20260514:102'
PNA+PAT+1820000007654::ZZZ+++SU:DUPONT+FN:JEAN'
ADR+CD+++75001:PARIS:::FR'
DTM+329:19720312:102'
FCA+1'
SPR+ZZZ'
IRQ+1+::ZZZ:::Hemogram — full blood count'
EVE+1'
UNT+10+1'
UNZ+1+CTRL021001' Common errors
- Misaligned UNH tokens — The
UNH+...+MEDREQ: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: MEDREQ D.10A, MEDREQ D.16B, MEDREQ D.24A.