# Referral Query

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.

Query for referral orders with a subset of patient demographic and insurance information. 

Status: Beta

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Meta` | object | Yes |  |
| `Meta.DataModel` | string | Yes | Referral |
| `Meta.EventType` | string | Yes | Query |
| `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.* |
| `Patient` | object | Yes |  |
| `Patient.Identifiers` | Array of object | Yes | List of IDs and ID types that identify the patient |
| `Patient.Identifiers[].ID` | string | Yes | ID for the patient |
| `Patient.Identifiers[].IDType` | string | Yes | Type of ID. *E.g. MRN, EPI* |
| `Patient.Insurances` | Array of object | No | List of insurance coverages for the patient |
| `Patient.Insurances[].Plan` | object | No |  |
| `Patient.Insurances[].Plan.ID` | string or null | No | Identifier of insurance plan |
| `Patient.Insurances[].Plan.IDType` | string or null | No | ID type of insurance plan |
| `Patient.Insurances[].Plan.Name` | string or null | No | Name of insurance plan |
| `Patient.Insurances[].Plan.Type` | string or null | No | Type of insurance plan |
| `Patient.Insurances[].MemberNumber` | string or null | No | Patient member number |
| `Patient.Insurances[].Company` | object | No |  |
| `Patient.Insurances[].Company.ID` | string or null | No | ID of insurance company (payor) |
| `Patient.Insurances[].Company.IDType` | string or null | No | ID type of insurance company (payor) |
| `Patient.Insurances[].Company.Name` | string or null | No | Name of insurance company (payor) |
| `Patient.Insurances[].Company.Address` | object | No | Insurance company's address |
| `Patient.Insurances[].Company.Address.StreetAddress` | string or null | No | Street address |
| `Patient.Insurances[].Company.Address.City` | string or null | No | City |
| `Patient.Insurances[].Company.Address.State` | string or null | No | State |
| `Patient.Insurances[].Company.Address.ZIP` | string or null | No | ZIP |
| `Patient.Insurances[].Company.Address.County` | string or null | No | County |
| `Patient.Insurances[].Company.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 |
| `Patient.Insurances[].Company.PhoneNumber` | string or null | No | Insurance companys phone number. *In E. 164 Format (i.e. +16085551234)* |
| `Patient.Insurances[].GroupNumber` | string or null | No | Insurance policy group number |
| `Patient.Insurances[].GroupName` | string or null | No | Insurance policy group name |
| `Patient.Insurances[].EffectiveDate` | string or null | No | Effect date of this insurance policy. *In [YYYY-MM-DD format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Patient.Insurances[].ExpirationDate` | string or null | No | Expiration date of this insurance policy. *In [YYYY-MM-DD format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Patient.Insurances[].PolicyNumber` | string or null | No | Insurance policy number |
| `Patient.Insurances[].Priority` | string or null | No | The insurance priority sequence. *If the insurance works in conjunction with other insurance plans, this field contains priority sequence.* Value set 39c37420-b45f-4ec0-b3af-15520b49c202: 1, 2, 3, 4 |
| `Patient.Insurances[].AgreementType` | string or null | No | Type of insurance agreement. Value set db651e3c-4a48-40e3-bc45-eddf613d0ff3: Standard, Unified, Maternity |
| `Patient.Insurances[].CoverageType` | string or null | No | Type of insurance agreement. *Indicates who will be receiving the bill for the service.* Value set aaa2e196-f275-48cd-80ab-6ccbbbdb6824: Patient, Clinic, Insurance, Other |
| `Patient.Insurances[].Insured` | object | No | Individual who has the agreement with the insurance company for the related policy |
| `Patient.Insurances[].Insured.Identifiers` | Array of object | No | List of IDs and ID types that identify the insured |
| `Patient.Insurances[].Insured.Identifiers[].ID` | string or null | No | ID for the insured |
| `Patient.Insurances[].Insured.Identifiers[].IDType` | string or null | No | Type of ID. *E.g. MRN, EPI* |
| `Patient.Insurances[].Insured.LastName` | string or null | No | Last name of the insured |
| `Patient.Insurances[].Insured.MiddleName` | string or null | No | Middle name of the insured |
| `Patient.Insurances[].Insured.FirstName` | string or null | No | First name of the insured |
| `Patient.Insurances[].Insured.SSN` | string or null | No | Insured's social security number |
| `Patient.Insurances[].Insured.Relationship` | string or null | No | Relationship of the insured to the patient. Value set: 17a07a93-1898-4d62-988f-6a2336aeb92e |
| `Patient.Insurances[].Insured.DOB` | string or null | No | Date of birth of the insured. *In [YYYY-MM-DD format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Patient.Insurances[].Insured.Sex` | string or null | No | Sex of the insured. Value set ca03256a-4fd3-4b3d-8e37-912cd22b5cda: Female, Male, Unknown, Other, Nonbinary, Prefer not to answer |
| `Patient.Insurances[].Insured.Address` | object | No | Address of the insured |
| `Patient.Insurances[].Insured.Address.StreetAddress` | string or null | No | Street address |
| `Patient.Insurances[].Insured.Address.City` | string or null | No | City |
| `Patient.Insurances[].Insured.Address.State` | string or null | No | State |
| `Patient.Insurances[].Insured.Address.ZIP` | string or null | No | ZIP |
| `Patient.Insurances[].Insured.Address.County` | string or null | No | County |
| `Patient.Insurances[].Insured.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 |

## Example

```json
{
  "Meta": {
    "DataModel": "Referral",
    "EventType": "Query",
    "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
  },
  "Patient": {
    "Identifiers": [
      {
        "ID": "0000000001",
        "IDType": "MR"
      },
      {
        "ID": "e167267c-16c9-4fe3-96ae-9cff5703e90a",
        "IDType": "EHRID"
      },
      {
        "ID": "a1d4ee8aba494ca",
        "IDType": "NIST"
      }
    ],
    "Insurances": [
      {
        "Plan": {
          "ID": "31572",
          "IDType": "Payor ID",
          "Name": "HMO Deductible Plan",
          "Type": null
        },
        "MemberNumber": null,
        "Company": {
          "ID": "60054",
          "IDType": null,
          "Name": "aetna (60054 0131)",
          "Address": {
            "StreetAddress": "PO Box 14080",
            "City": "Lexington",
            "State": "KY",
            "ZIP": "40512-4079",
            "County": "Fayette",
            "Country": "US"
          },
          "PhoneNumber": "+18089541123"
        },
        "GroupNumber": "847025-024-0009",
        "GroupName": "Accelerator Labs",
        "EffectiveDate": "2015-01-01",
        "ExpirationDate": "2020-12-31",
        "PolicyNumber": "9140860055",
        "Priority": null,
        "AgreementType": null,
        "CoverageType": null,
        "Insured": {
          "Identifiers": [],
          "LastName": null,
          "MiddleName": null,
          "FirstName": null,
          "SSN": null,
          "Relationship": null,
          "DOB": null,
          "Sex": null,
          "Address": {
            "StreetAddress": null,
            "City": null,
            "State": null,
            "ZIP": null,
            "County": null,
            "Country": null
          }
        }
      }
    ]
  }
}
```
