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
  • The fields
  • How to use them when calling NEHR putComposition
  • Implementation notes
Concepts

NEHR Integration

Was this page helpful?
Previous

List referrals

Next
Built with

RefX exposes the following fields on referrals that are designed to be forwarded to the National Electronic Health Record (NEHR) putComposition API.

The fields

FieldLocation in Get referral details responseDescription
nehrCodeoffering.nehrCodeThe NEHR coded value that identifies referral destination.
specialtyoffering.specialtyThe specialty name that identifies referral destination.
nehrFormtop-level nehrForm (only when additionalField=nehrForm)A self-contained HTML document that renders the full referral form.
nehrFormTypetop-level nehrFormType (only when additionalField=nehrForm)Human-readable description of the NEHR forms attached in the referral. Multiple templates are joined with |.

How to use them when calling NEHR putComposition

When constructing the putComposition request to NEHR, plug the RefX fields into the payload as follows.

RefX fieldNEHR putComposition mappingNotes
nehrCodecomposition > section > content > referralRequest > specialty > codeCoded value identifying the referral destination.
specialtycomposition > section > content > referralRequest > specialty > textDescriptionFree-text specialty name describing the referral destination.
nehrFormTypecomposition > section > content > referralRequest > type > textDescriptionFree-text description of the form type(s) used by the referral.
nehrFormcomposition > section > content > other > extension > notesItem > textPass the raw HTML string as the text value.

The remaining fields are not provided by RefX and should be populated by your integration from your own system context, per the NEHR specification.

Implementation notes

  • Fetch just-in-time. nehrForm reflects the referral’s current state. Re-fetch it immediately before submitting to NEHR rather than caching it.
  • HTML safety. The nehrForm HTML is already escaped and uses inline styles only. Forward it as-is; do not modify, reflow, or strip styles, otherwise it may not render correctly in NEHR.