EDIFACT message guide · Healthcare and social

MEDPRE Medical prescription

The UN/EDIFACT message a prescriber sends a dispensing agent, such as a pharmacy, so it can deliver the prescribed medicine.

Sent by
Prescriber (physician, dentist or veterinarian)
Received by
Dispensing agent, such as a pharmacy
Standard
UN/EDIFACT · Batch message
X12 equivalent
No direct equivalent

What is the EDIFACT MEDPRE message?

MEDPRE is the UN/EDIFACT medical prescription message. The directory defines it as a message sent from a prescriber, a healthcare professional such as a physician, dentist or veterinarian, to a dispensing agent such as a pharmacy, to allow the dispenser to deliver medicinal products.

Electronic prescriptions reduce transcription errors and fraud. The prescription identifies the patient, the prescriber, the medicine, dose and quantity, and any instructions, and the pharmacy dispenses against it. National e-prescription schemes set the rules. Prescriptions may also be repeated.

How the EDIFACT MEDPRE message worksDiagram of the UN/EDIFACT MEDPRE Medical prescription message. Prescriber (physician, dentist or veterinarian) sends it to dispensing agent, such as a pharmacy. It usually starts the exchange. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and body and segment groups: the required SG1 loop with SEQ (Sequence details) and the required SG9 loop with GEI (Processing information), IDE (Identity) and DTM (Date/time/period). 6 conditional segment groups are listed by their trigger segment.How the EDIFACT MEDPRE message worksMedical prescription: who sends it, where it fits and what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSStarts the exchangeMEDPRESENDERPrescriber (physician,dentist or veterinarian)RECEIVERDispensing agent, suchas a pharmacyCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDsUNB … UNZMessage MEDPREUNH … UNTSTART OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPSMandatory group SG1 · repeats up to 99SEQSequence detailsMandatory group SG9 · repeats up to 1GEIProcessing informationIDEIdentityDTMDate/time/period+ 6 conditional groups, starting with:DOCATTTODFCALINBlue box: mandatory segment group. Conditional groups are listed by the trigger segment that starts them; a group is sent only when its data applies.Conditional segments outside groups are not drawn.Structure: mandatory segments and groups in the UN/EDIFACT directory D.21A listing for MEDPRE. Your trading partner's implementation guide adds itsown requirements.
How the EDIFACT MEDPRE message worksDiagram of the UN/EDIFACT MEDPRE Medical prescription message. Prescriber (physician, dentist or veterinarian) sends it to dispensing agent, such as a pharmacy. It usually starts the exchange. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message) and body and segment groups: the required SG1 loop with SEQ (Sequence details) and the required SG9 loop with GEI (Processing information), IDE (Identity) and DTM (Date/time/period). 6 conditional segment groups are listed by their trigger segment.How the EDIFACT MEDPREmessage worksMedical prescription: who sends it, where it fitsand what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSStarts the exchangeMEDPRESENDERPrescriber(physician,dentist orveterinarian)RECEIVERDispensingagent, such as apharmacyCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDs(UNB … UNZ)Message MEDPRE (UNH … UNT)START OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPSMandatory group SG1 · repeats upto 99SEQSequence detailsMandatory group SG9 · repeats upto 1GEIProcessing informationIDEIdentityDTMDate/time/period+ 6 conditional groups, starting with:DOCATTTODFCALINBlue box: mandatory segment group. Conditionalgroups are listed by the trigger segment thatstarts them; a group is sent only when its dataapplies. Conditional segments outside groups arenot drawn.Structure: mandatory segments and groups in theUN/EDIFACT directory D.21A listing for MEDPRE.Your trading partner's implementation guide adds itsown requirements.

How to read this diagram: the top row shows who sends MEDPRE, to whom, and which messages usually come before and after it. The lower part shows what the directory D.21A itself requires: the envelopes around MEDPRE and the segments and segment groups it marks mandatory. Conditional groups are listed by their trigger segment rather than drawn in full. This is the directory's minimum, not a trading partner's requirement: a message implementation guide, such as an industry subset or a partner’s own guide, usually makes some conditional groups mandatory, restricts the codes and may use an older directory.

Expand diagram Download SVG

When it is used

  • Sending prescriptions to pharmacies
  • Issuing repeat prescriptions
  • Prescribing veterinary medicines

Where it fits in the message flow

This message MEDPRE Medical prescription

No other message routinely comes directly before or after MEDPRE; it is exchanged when the business event occurs. If the partners agree, the receiver confirms each interchange with a CONTRL syntax and service report.

Structure

Mandatory segments in MEDPRE (directory D.21A)

In UN/EDIFACT directory D.21A, the MEDPRE message has 127 segment positions arranged in 18 segment groups. These are the segments and segment groups marked mandatory at message level, in order; a mandatory group is shown with the segment that starts it. Segments inside conditional groups are needed only when the group is used. This is the directory’s requirement, not your trading partner’s: each partner’s message implementation guide names the directory it uses, often an older one such as D.96A or D.01B where the structure can differ, makes some conditional segments mandatory and restricts the codes.

  • UNH
  • BGM
  • SG1 (SEQ)
  • SG9 (GEI)
  • UNT

Practical example

MEDPRE in practice

A doctor prescribes an antibiotic. The practice system sends a MEDPRE to the patient's chosen pharmacy with the patient, the product, dose, quantity and instructions, signed by the prescriber. The pharmacy prepares the medicine before the patient arrives.

Implementation

Implementation considerations for MEDPRE

  • Comply with health data protection and prescribing laws.
  • Use national medicinal product codes for each item.
  • Secure prescriptions against alteration.
  • Check whether national e-prescription systems use other standards.

Need help with MEDPRE?

ECOM maps, tests and monitors EDIFACT messages for your trading partners and integrates them with your ERP.