Message Linkage
Message Linkage Overview
Message linkage requirements and best practices are described in the table below. There are four key fields that are used to link messages together, and this linkage allows a software system to connect related messages to each other. For example, on an RxRenewalRequest the prescribing system needs to find the original NewRx to which the pharmacy is referring. This linkage should be done in an automated manner.
S.210: Customers shall support the scenarios in the Message Linkage section of this guide.
Note: NCPDP refers to message linkage as trace number.
✅ Quality Check: Ensure electronic transactions are populated with the correct traceable elements for message linking when available. When this information is not included, human intervention is introduced which brings an additional risk of transcription/matching errors.
MessageID – The unique number assigned to each message. This ID initiates the electronic linking of subsequent message types.
RelatesToMessageID – The MessageID of the most recent and relevant message in the workflow.
RxReferenceNumber – The prescription number assigned by pharmacy system. This number should be populated on pharmacy-initiated messages. RxReferenceNumber must be populated on RxRenewalRequest, RxRenewalResponse, RxChangeRequest, and RxChangeResponse.
PrescriberOrderNumber – The prescription number created by the prescribing system. PrescriberOrderNumber must be populated on all fillable messages. For other message types if PrescriberOrderNumber is available, it should be sent.
The PrescriberOrderNumber or the RxReferenceNumber should be used as the primary criteria for matching messages. If it cannot be used, the following data in the message should be used:
- RelatesToMessageID
- Patient demographics
- Medication information
- Prescriber information
- Pharmacy information
Message Linkage Example
Note: The following table is an example of message linking. This example is not all inclusive and the same methodology applies to other message types.
| NewRx | RxRenewal Request | RxRenewal Request FollowUp Request | RxRenewal Response | (2nd RxRenewal Request) |
|---|---|---|---|---|---|
MessageID | 12345 | 444333 | 555222 | 888333 | 89999 |
RelatesTo MessageID | N/A* | 12345** | 444333 | 555222 | 888333 |
Prescriber Order Number | RX123 | RX123 | RX123 | RX897 | RX897 |
| Status/ Error/ Verify | Status/ Error/ Verify | Status/ Error/ Verify | Status/ Error/ Verify | Status/ Error/ Verify |
MessageID | 888 | 77777 | 999999 | 555555 | 111111 |
RelatesTo MessageID | 12345 | 444333 | 555222 | 888333 | 89999 |
Notes:
* For customers sending a NewRx following a BenefitResponse (either On-Demand Formulary or Real-Time Prescription Benefit, whichever is later in the workflow), populate the RelatesToMessageID with the MessageID from the BenefitResponse. The only exceptions for this are for NewRx that is following:
- a NewRxRequest
- a NewRx following a CancelRxResponse in the LTPAC environment
** Surescripts encourages the use of electronic prescribing messages but also acknowledges situations where alternative means of communication are necessary. Messages sent electronically will contain a MessageID which is later used in the RelatesToMessageID field of subsequent/related messages. However, in instances where there is no MessageID (e.g., original message sent by fax), the RelatesToMessageID will not be available to send in electronic messages that follow. In these instances, additional matching logic is needed to support subsequent workflows such as RxFill, RxRenewal, Resupply, RxChange, and CancelRx.
Long Term and Post Acute Care Message Linkage Example
Note: The following table is an example of Prescribing System Initiated Change Process message linking.
| NewRx | CancelRx | NewRx |
|---|---|---|---|
MessageID | 12345 | 444333 | 888333 |
RelatesToMessageID | N/A | 12345 | 12345 |
PrescriberOrderNumber | RX123 | RX123 | RX123A |
| Status/Error/Verify | Status/Error/Verify | Status/Error/Verify |
MessageID | 888 | 77777 | 555555 |
RelatesToMessageID | 12345 | 444333 | 888333 |