For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Home
    • About the Referral Exchange (RefX)
  • Getting Started
    • API Overview
    • Accessing our APIs
    • Authentication
    • Content Types
    • Request and Response Limits
    • Create and Edit Referrals
    • Print Referrals
    • List Referrals
    • Cancel & Withdraw Referrals
    • Timeline Events
    • Implementation Reference
  • Concepts
    • Referral Lifecycle & Statuses
    • Referral Notes
    • Browser Tab Handling
    • Referral Link
    • NEHR Integration
  • API Reference
    • Changelog
LogoLogo
On this page
  • How it works
  • Implementation notes
Getting Started

Cancel & Withdraw Referrals

Was this page helpful?
Previous

Timeline Events

Next
Built with

Referrals can be cancelled when the referring doctor or institution needs to withdraw a referral for instance, if the patient no longer wishes to proceed, the wrong destination was selected, or duplicate referrals were made.

Cancelling a referral ensures that downstream systems (e.g. HAS or Epic) receive a proper cancellation event and can close the loop cleanly, avoiding administrative errors or unnecessary appointments.

Depending on the downstream system, you may or may not be able to invoke a cancellation. In all cases, you will only be able to cancel a pending referral.

How it works

  1. Identify the referral to cancel

    Retrieve the referral details from your list and confirm its current status is cancellable (e.g. pending, not yet confirmed).

  2. Submit the cancellation request

    Call the cancel endpoint and include optional fields such as:

    • cancelledByName or cancelledByUin (who performed the action)
    • cancelNote (reason for cancellation)
  3. RefX updates the record

    The referral will transition to the cancelled status, and a cancellation event will be recorded in the timeline.

Implementation notes

  • User permissions:

    Only the originating (sending) institution can cancel a referral.

    Attempts by receiving systems will be rejected.

  • UX considerations:

    Always show a confirmation dialog before proceeding with cancellation, since this action cannot be undone.

    Include a text box to capture the cancellation reason, and display a success message once completed.

  • Status propagation:

    Downstream systems are automatically notified. You do not need to call them directly.

  • Audit trail:

    The cancellation is recorded as a timeline event (referral.cancelled) with metadata about who initiated it and when.

    You can display this in your system’s activity log or “Referral History” section.