NEHR Integration

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.