# Referral QueryResponse

This data model communicates patient demographic and clinical information from a referring provider to send the patient's case to another provider. 

This typically differs from a consultation, where a provider may review a patient without assuming authority over the patient’s care. Referrals can be internal to an organization (e.g., from one department to another) or external between organizations.

A referral is useful to maintain the administrative aspects of a referral order. You can receive notifications when: 

- A new referral order is placed.
- An existing referral order is modified or canceled. 
- An authorization review is requested or responded to. 

Or, you can search for referral orders based on a patient's demographic and insurance information.

> **EHR support for Referral**
>
> EHR systems with advanced referral management capabilities and robust interfacing libraries typically support the `Referral` data model via an HL7v2 REF interface or their own proprietary API.
>
> Alternatively, some EHR systems may not support the `Referral` data model. However, since a referral can be a specific type of order when it pertains to a transfer of patient responsibility for specialty care, an EHR system may support creating a referral with the `Order` data model instead. Just note that you may not be able to update the referral details after it’s created. This customized type of workflow varies per EHR system. Work with your connection and your Technical Account Manager to determine which data model is best for your referral workflow.

> **Open beta feature**
>
> This is an open beta feature, which means you won’t see it available in your organization until you opt in.  If you’re interested in joining this beta, [talk to a Redoxer](https://redoxengine.com/forms/contact-us/) to find out if you’d be a good fit. 

Receive any matching referral order(s) based on the query parameters defined in `Referral.Query`. Any matches are listed in the `Referrals` array. 

Status: Beta

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Meta` | object | Yes |  |
| `Meta.DataModel` | string | Yes | Referral |
| `Meta.EventType` | string | Yes | QueryResponse |
| `Meta.EventDateTime` | string or null | No | Displays the UTC date and time that an outgoing request is delivered or an incoming request is received. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Meta.Test` | boolean or null | No | Indicates whether the request is a test or not. |
| `Meta.Source` | object | No | Contains the information for the system initiating the message, including the source ID and name. *Included in messages from Redox* |
| `Meta.Source.ID` | string or null | No | Identifies the system initiating the message. If you have multiple OAuth API keys per environment type, this value is required. If you have only one OAuth API key per environment type, or you're using legacy API keys, this value is optional. *UUID* |
| `Meta.Source.Name` | string or null | No | Displays the name of the system initiating the message. |
| `Meta.Destinations` | Array of object | No | Contains the information for the endpoint(s) receiving the request. A request must contain at least one destination, but asynchronous requests can have more than one destination. Synchronous requests like queries can only support one destination. *Required when sending data to Redox.* |
| `Meta.Destinations[].ID` | string or null | No | Identifies the endpoint that the request is directed to. *UUID* |
| `Meta.Destinations[].Name` | string or null | No | Displays the name of the endpoint that the request is directed to. |
| `Meta.Logs` | Array of object | No | Contains the log identifier(s) for the request. |
| `Meta.Logs[].ID` | string or null | No | Identifies the request log(s) that correspond to this request. You can use this value to locate the relevant log in the Redox dashboard for support and reference. *UUID* |
| `Meta.Logs[].AttemptID` | string or null | No | Identifies the request log attempt value, which is useful when retries are possible. *UUID* |
| `Meta.FacilityCode` | string or null | No | Code for the facility related to the message. *Only use this field if a health system indicates you should. The code is specific to the health system's EHR and might not be unique across health systems. In general, the facility fields within the data models (e.g. OrderingFacility) are more reliable and informative.* |
| `Referrals` | Array of object | No | The list of referrals |
| `Referrals[].ID` | string or null | No | The Health System ID of the referral |
| `Referrals[].IDType` | string or null | No | The ID type |
| `Referrals[].AlternateID` | string or null | No | The alternate ID of the referral, often used by external/3rd party systems |
| `Referrals[].Type` | string or null | No | The type of the referral. Value set b32cd624-09e6-407f-aec3-41dd579fb8b4: Other, Consultation, Laboratory, Radiology, Medical, Skilled Nursing, Home Care, Psychiatric |
| `Referrals[].Category` | string or null | No | The category of the referral. Value set 15610ad8-bc9f-4d61-86f7-f47405092379: Outpatient, Inpatient, Emergency, Ambulatory |
| `Referrals[].Priority` | string or null | No | The priority of the referral. Value set 5862051b-1d6f-48c2-a291-bc8452419e0a: STAT, ASAP, Routine |
| `Referrals[].Status` | string or null | No | The status of the referral. Value set 1ed16f2d-4bfe-49ba-8337-5d66f55d2e57: Accepted, Pending, Rejected, Expired, Closed |
| `Referrals[].DateTime` | string or null | No | The date and time the referral is considered active. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].ExpirationDateTime` | string or null | No | The date and time the referral expires. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].ProcessDateTime` | string or null | No | The date and time the referral was processed. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].Reason` | string or null | No | The reason for the referral. Value set fe0214ba-6111-4f16-9056-a828d753c510: Patient Preference, Second Opinion, Provider Ordered, Work Load |
| `Referrals[].ProviderSpecialty` | string or null | No | The provider specialty of the referral |
| `Referrals[].DepartmentSpecialty` | string or null | No | The department specialty of the referral |
| `Referrals[].Notes` | Array of string | No | Referral Notes |
| `Referrals[].Authorization` | object | No |  |
| `Referrals[].Authorization.Plan` | object | No |  |
| `Referrals[].Authorization.Plan.ID` | string or null | No | The ID of the plan |
| `Referrals[].Authorization.Plan.IDType` | string or null | No | The ID type |
| `Referrals[].Authorization.Plan.Name` | string or null | No | The name of the plan |
| `Referrals[].Authorization.Company` | object | No |  |
| `Referrals[].Authorization.Company.ID` | string or null | No | The ID of the payor |
| `Referrals[].Authorization.Company.IDType` | string or null | No | The ID type |
| `Referrals[].Authorization.Company.Name` | string or null | No | The name of the payor |
| `Referrals[].Authorization.DateTime` | string or null | No | The date and time the authorization is effective. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].Authorization.ExpirationDateTime` | string or null | No | The date and time the authorization expires. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].Authorization.Number` | string or null | No | The identifier for the authorization assigned by the payor |
| `Referrals[].Authorization.ReimbursementLimit` | string or null | No | The reimbursement limit for this referral |
| `Referrals[].Authorization.RequestedTreatmentCount` | string or null | No | The number of treatments requested |
| `Referrals[].Authorization.RequestedTreatmentUnits` | string or null | No | The units associated to the treatment count. *e.g. 'instances' or 'days'* |
| `Referrals[].Authorization.AuthorizedTreatmentCount` | string or null | No | The number of treatments authorized |
| `Referrals[].Authorization.Notes` | Array of string | No | Notes about the authorizations |
| `Referrals[].Diagnoses` | Array of object | No | List of diagnoses |
| `Referrals[].Diagnoses[].Code` | string or null | No | Code for the diagnoses |
| `Referrals[].Diagnoses[].Codeset` | string or null | No | Code set used to identify the diagnoses. *One of the following: ICD-9, ICD-10, HCPCS, CPT* Value set: 5730b002-4623-48de-8336-a38e57989cf5 |
| `Referrals[].Diagnoses[].Name` | string or null | No | Name of the diagnoses |
| `Referrals[].Diagnoses[].Type` | string or null | No | Type of the diagnosis. Value set 355dbdb5-f708-4f35-8fb2-85ba4bbe67b7: Unknown, Admitting, Final, Self, Working, Principal |
| `Referrals[].Diagnoses[].DocumentedDateTime` | string or null | No | DateTime the diagnoses was documented. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Referrals[].Diagnoses[].Notes` | Array of string | No | Notes about the diagnosis |
| `Referrals[].Procedures` | Array of object | No | Ordered procedure |
| `Referrals[].Procedures[].Code` | string or null | No | Code for the procedure |
| `Referrals[].Procedures[].Codeset` | string or null | No | Code set used to identify the procedure. *CPT, HCPCS, SNOMED, or LOINC. If no code set is specified, a health system specific identifier is being used.* |
| `Referrals[].Procedures[].Description` | string or null | No | Description of the procedure |
| `Referrals[].Procedures[].Notes` | Array of string | No | Notes about the procedure |
| `Referrals[].Procedures[].Quantity` | string or null | No | Number of instances for the procedure |
| `Referrals[].Procedures[].Units` | string or null | No | Related units associated to the procedure quantity |
| `Referrals[].Procedures[].Modifiers` | Array of string | No | Associated procedure modifiers |
| `Referrals[].Providers` | Array of object | No |  |
| `Referrals[].Providers[].ID` | string or null | No | ID of the provider. *This ID is often required for Inpatient Visits.* |
| `Referrals[].Providers[].IDType` | string or null | No | ID type of the ID for the provider |
| `Referrals[].Providers[].FirstName` | string or null | No | First name of the undefined |
| `Referrals[].Providers[].LastName` | string or null | No | Last name of the undefined |
| `Referrals[].Providers[].Credentials` | Array of string | No | List of credentials for the undefined. *e.g. MD, PhD* |
| `Referrals[].Providers[].Address` | object | No | Provider's address |
| `Referrals[].Providers[].Address.StreetAddress` | string or null | No | Street address |
| `Referrals[].Providers[].Address.City` | string or null | No | City |
| `Referrals[].Providers[].Address.State` | string or null | No | State |
| `Referrals[].Providers[].Address.ZIP` | string or null | No | ZIP |
| `Referrals[].Providers[].Address.County` | string or null | No | County |
| `Referrals[].Providers[].Address.Country` | string or null | No | Country. Value set 39791e31-0cee-4c58-a6c1-3d9e2c71d13b: AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, IO, CM, CL, CO, CI, DK, EC, ER, FK, TF, GM, GI, GW, VA, IS, IM, JP, KI, LS, LT, MK, MV, MX, MS, NA, NC, MP, PK, PG, PL, RU, PM, SA, SG, SB, SS, SE, TZ, TO, TV, US, VN, EH, ZW, BQ, BR, BF, CA, TD, KM, CK, CU, DO, EE, FI, GE, GL, GN, GY, IN, IE, JE, KW, LB, LY, MO, ML, MR, MN, MM, NZ, NU, OM, PY, PT, RO, KN, SN, RS, ZA, LK, SJ, SY, TK, TM, UG, UM, UZ, WF, BA, BG, CV, CX, CD, CW, DJ, GQ, FO, PF, DE, GD, GG, HT, HK, IR, IL, KE, KG, LU, MY, MT, MU, ME, MZ, NP, NF, PW, PH, QA, BL, MF, ST, SX, SI, GS, SR, TJ, TG, TN, UA, VU, VG, BW, BN, KH, KY, CC, CR, CY, EG, FJ, FR, GH, GP, GU, HN, IQ, JM, KZ, KP, LA, LR, MW, MH, YT, MD, MA, NI, NG, NO, PA, PN, RE, RW, LC, SM, SC, SK, ES, CH, TH, TT, TR, GB, VE, VI, ZM, BV, BI, CF, CN, CG, HR, CZ, DM, SV, ET, GF, GA, GR, GT, HM, HU, ID, IT, JO, KR, LV, LI, MG, MQ, FM, MC, NR, NL, NE, PS, PE, PR, SH, VC, WS, SL, SO, SD, SZ, TW, TL, TC, AE, UY, YE, DR |
| `Referrals[].Providers[].EmailAddresses` | Array of string | No | Provider's email address(es) |
| `Referrals[].Providers[].PhoneNumber` | object | No |  |
| `Referrals[].Providers[].PhoneNumber.Office` | string or null | No | Provider's office phone number. *In E. 164 Format. (e.g. +16085551234)* |
| `Referrals[].Providers[].Type` | string or null | No | The type of provider. Value set 34b5bdb4-1fed-4bdb-a26b-b21d58b0629e: Referred To Provider, Referring Provider, Patient PCP, Other |
| `Referrals[].Providers[].ContactInfo` | string or null | No | Additional contact information for this provider |
| `Referrals[].Providers[].Location` | object | No | Provider's location |
| `Referrals[].Providers[].Location.Type` | string or null | No | Type of location. *Examples: Clinic, Department, Home, Nursing Unit, Provider's Office, Phone* |
| `Referrals[].Providers[].Location.Facility` | string or null | No | Facility. *Example: Community Hospital* |
| `Referrals[].Providers[].Location.FacilityIdentifiers` | Array of object | No | List of IDs specific to this facility |
| `Referrals[].Providers[].Location.FacilityIdentifiers[].ID` | string or null | No | An ID specific to this facility |
| `Referrals[].Providers[].Location.FacilityIdentifiers[].IDType` | string or null | No | The source or system to which this ID pertains. *Could be an OID or a human-readable name* |
| `Referrals[].Providers[].Location.Department` | string or null | No | Department |
| `Referrals[].Providers[].Location.DepartmentIdentifiers` | Array of object | No | List of IDs specific to this department |
| `Referrals[].Providers[].Location.DepartmentIdentifiers[].ID` | string or null | No | An ID specific to this department |
| `Referrals[].Providers[].Location.DepartmentIdentifiers[].IDType` | string or null | No | The source or system to which this ID pertains. *Could be an OID or a human-readable name* |
| `Referrals[].Providers[].Location.Room` | string or null | No | Room. *Example: 136* |
| `Referrals[].Visit` | object | No |  |
| `Referrals[].Visit.VisitNumber` | string or null | No | Visit Number. *Unique ID of the visit associated to the referral* |

## Example

```json
{
  "Meta": {
    "DataModel": "Referral",
    "EventType": "QueryResponse",
    "EventDateTime": "2026-11-18T19:05:05.809Z",
    "Test": true,
    "Source": {
      "ID": "7ce6f387-c33c-417d-8682-81e83628cbd9",
      "Name": "Redox Dev Tools"
    },
    "Destinations": [
      {
        "ID": "af394f14-b34a-464f-8d24-895f370af4c9",
        "Name": "Redox EMR"
      }
    ],
    "Logs": [
      {
        "ID": "d9f5d293-7110-461e-a875-3beb089e79f3",
        "AttemptID": "925d1617-2fe0-468c-a14c-f8c04b572c54"
      }
    ],
    "FacilityCode": null
  },
  "Referrals": [
    {
      "ID": "4356789876",
      "IDType": null,
      "AlternateID": "2133311",
      "Type": "Medical",
      "Category": "Outpatient",
      "Priority": "Routine",
      "Status": "Pending",
      "DateTime": "2015-05-05T00:00:00.000Z",
      "ExpirationDateTime": "2015-06-05T00:00:00.000Z",
      "ProcessDateTime": null,
      "Reason": "Provider Ordered",
      "ProviderSpecialty": null,
      "DepartmentSpecialty": null,
      "Notes": [],
      "Authorization": {
        "Plan": {
          "ID": "31572",
          "IDType": null,
          "Name": "HMO Deductible Plan"
        },
        "Company": {
          "ID": "60054",
          "IDType": null,
          "Name": "aetna (60054 0131)"
        },
        "DateTime": "2015-05-05T00:00:00.000Z",
        "ExpirationDateTime": "2015-06-05T00:00:00.000Z",
        "Number": "9140860055",
        "ReimbursementLimit": null,
        "RequestedTreatmentCount": null,
        "RequestedTreatmentUnits": null,
        "AuthorizedTreatmentCount": null,
        "Notes": []
      },
      "Diagnoses": [],
      "Procedures": [
        {
          "Code": "400500400",
          "Codeset": "CPT4",
          "Description": "Anticoag Therapy Referral",
          "Notes": [],
          "Quantity": null,
          "Units": null,
          "Modifiers": []
        }
      ],
      "Providers": [
        {
          "ID": "4236464757",
          "IDType": "NPI",
          "FirstName": "John",
          "LastName": "Slate",
          "Credentials": [
            "DO"
          ],
          "Address": {
            "StreetAddress": "500 First St.",
            "City": "Clayton",
            "State": "MO",
            "ZIP": "63105",
            "County": "Saint Louis",
            "Country": "USA"
          },
          "EmailAddresses": [],
          "PhoneNumber": {
            "Office": null
          },
          "Type": "Referring Provider",
          "ContactInfo": null,
          "Location": {
            "Type": null,
            "Facility": null,
            "FacilityIdentifiers": [],
            "Department": null,
            "DepartmentIdentifiers": [],
            "Room": null
          }
        }
      ],
      "Visit": {
        "VisitNumber": null
      }
    }
  ]
}
```
