# Order QueryResponse

This data model allows providers to request services with instructions for a patient's treatment. The order is generally triggered when the provider places an order or when the provider releases it (e.g., after ordering, a clinician takes action on a worklist of pending orders).

Orders commonly contain lab orders. If so, the EHR system sends a message with an expected date and time when a practitioner places an order (e.g., glucose test). When a nurse doing lab rounds (inpatient) or at a collection center (outpatient) collects the specimen, the EHR might send `Order.Update` with additional information about the collection (e.g., collection user, collection date/time).

This data model has event types that allow you to:

- receive a notification for new, updated, canceled, or grouped orders; or
- query for and receive orders. 

Receive order details based on the query parameters defined in `Order.Query`. 

> **Required query parameters and populated response**
>
> The required elements and populated response vary depending on the EHR system you're integrating with. Work with your connection to understand which query parameters they require and what to expect in the response during implementation testing.

Status: Beta, Data on demand

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Meta` | object | Yes |  |
| `Meta.DataModel` | string | Yes | Order |
| `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.* |
| `Orders` | Array of object | No |  |
| `Orders[].Patient` | object | No |  |
| `Orders[].Patient.Identifiers` | Array of object | No | List of IDs and ID types that identify the patient |
| `Orders[].Patient.Identifiers[].ID` | string or null | No | ID for the patient |
| `Orders[].Patient.Identifiers[].IDType` | string or null | No | Type of ID. *E.g. MRN, EPI* |
| `Orders[].Visit` | object | No |  |
| `Orders[].Visit.VisitNumber` | string or null | No | Visit Number. *Unique ID of the visit this order was placed within* |
| `Orders[].ID` | string or null | No | ID of the order assigned by the placing system |
| `Orders[].ApplicationOrderID` | string or null | No | ID assigned by the application fulfilling the order |
| `Orders[].Status` | string or null | No | The status of an order. Value set 84be122a-2112-4e69-a971-ca92e5c4a760: Resulted, New, Cancel, Update |
| `Orders[].TransactionDateTime` | string or null | No | DateTime the order was placed |
| `Orders[].CollectionDateTime` | string or null | No | DateTime the specimen was collected |
| `Orders[].Specimen` | object | No |  |
| `Orders[].Specimen.Source` | string or null | No | Source of the specimen |
| `Orders[].Specimen.BodySite` | string or null | No | Body site from which the specimen was collected |
| `Orders[].Specimen.ID` | string or null | No | ID of the collected specimen |
| `Orders[].Procedure` | object | No | Procedure that was ordered |
| `Orders[].Procedure.Code` | string or null | No | Code for the procedure |
| `Orders[].Procedure.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.* |
| `Orders[].Procedure.Description` | string or null | No | Description of the procedure |
| `Orders[].Provider` | object | No |  |
| `Orders[].Provider.NPI` | string or null | No | NPI of the ordering provider |
| `Orders[].Provider.ID` | string or null | No | ID of the ordering provider. *This ID is often required for Inpatient Visits.* |
| `Orders[].Provider.IDType` | string or null | No | ID type of the ID for the ordering provider |
| `Orders[].Provider.FirstName` | string or null | No | First name of the ordering provider |
| `Orders[].Provider.LastName` | string or null | No | Last name of the ordering provider |
| `Orders[].Provider.Credentials` | Array of string | No | List of credentials for the ordering provider. *e.g. MD, PhD* |
| `Orders[].Provider.Address` | object | No | Provider's address |
| `Orders[].Provider.Address.StreetAddress` | string or null | No | Street address |
| `Orders[].Provider.Address.City` | string or null | No | City |
| `Orders[].Provider.Address.State` | string or null | No | State |
| `Orders[].Provider.Address.ZIP` | string or null | No | ZIP |
| `Orders[].Provider.Address.County` | string or null | No | County |
| `Orders[].Provider.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 |
| `Orders[].Provider.EmailAddresses` | Array of string | No | Provider's email address(es) |
| `Orders[].Provider.PhoneNumber` | object | No |  |
| `Orders[].Provider.PhoneNumber.Office` | string or null | No | Provider's office phone number. *In E. 164 Format. (e.g. +16085551234)* |
| `Orders[].Provider.Location` | object | No | Provider's location |
| `Orders[].Provider.Location.Type` | string or null | No | Type of location. *Examples: Clinic, Department, Home, Nursing Unit, Provider's Office, Phone* |
| `Orders[].Provider.Location.Facility` | string or null | No | Facility. *Example: Community Hospital* |
| `Orders[].Provider.Location.FacilityIdentifiers` | Array of object | No | List of IDs specific to this facility |
| `Orders[].Provider.Location.FacilityIdentifiers[].ID` | string or null | No | An ID specific to this facility |
| `Orders[].Provider.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* |
| `Orders[].Provider.Location.Department` | string or null | No | Department |
| `Orders[].Provider.Location.DepartmentIdentifiers` | Array of object | No | List of IDs specific to this department |
| `Orders[].Provider.Location.DepartmentIdentifiers[].ID` | string or null | No | An ID specific to this department |
| `Orders[].Provider.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* |
| `Orders[].Provider.Location.Room` | string or null | No | Room. *Example: 136* |
| `Orders[].ResultCopyProviders` | Array of object | No | Array of providers to be copied on the results. |
| `Orders[].ResultCopyProviders[].NPI` | string or null | No | NPI of the copied provider |
| `Orders[].ResultCopyProviders[].ID` | string or null | No | ID of the copied provider. *This ID is often required for Inpatient Visits.* |
| `Orders[].ResultCopyProviders[].IDType` | string or null | No | ID type of the ID for the copied provider |
| `Orders[].ResultCopyProviders[].FirstName` | string or null | No | First name of the copied provider |
| `Orders[].ResultCopyProviders[].LastName` | string or null | No | Last name of the copied provider |
| `Orders[].ResultCopyProviders[].Credentials` | Array of string | No | List of credentials for the copied provider. *e.g. MD, PhD* |
| `Orders[].ResultCopyProviders[].Address` | object | No | Provider's address |
| `Orders[].ResultCopyProviders[].Address.StreetAddress` | string or null | No | Street address |
| `Orders[].ResultCopyProviders[].Address.City` | string or null | No | City |
| `Orders[].ResultCopyProviders[].Address.State` | string or null | No | State |
| `Orders[].ResultCopyProviders[].Address.ZIP` | string or null | No | ZIP |
| `Orders[].ResultCopyProviders[].Address.County` | string or null | No | County |
| `Orders[].ResultCopyProviders[].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 |
| `Orders[].ResultCopyProviders[].EmailAddresses` | Array of string | No | Provider's email address(es) |
| `Orders[].ResultCopyProviders[].PhoneNumber` | object | No |  |
| `Orders[].ResultCopyProviders[].PhoneNumber.Office` | string or null | No | Provider's office phone number. *In E. 164 Format. (e.g. +16085551234)* |
| `Orders[].ResultCopyProviders[].Location` | object | No | Provider's location |
| `Orders[].ResultCopyProviders[].Location.Type` | string or null | No | Type of location. *Examples: Clinic, Department, Home, Nursing Unit, Provider's Office, Phone* |
| `Orders[].ResultCopyProviders[].Location.Facility` | string or null | No | Facility. *Example: Community Hospital* |
| `Orders[].ResultCopyProviders[].Location.FacilityIdentifiers` | Array of object | No | List of IDs specific to this facility |
| `Orders[].ResultCopyProviders[].Location.FacilityIdentifiers[].ID` | string or null | No | An ID specific to this facility |
| `Orders[].ResultCopyProviders[].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* |
| `Orders[].ResultCopyProviders[].Location.Department` | string or null | No | Department |
| `Orders[].ResultCopyProviders[].Location.DepartmentIdentifiers` | Array of object | No | List of IDs specific to this department |
| `Orders[].ResultCopyProviders[].Location.DepartmentIdentifiers[].ID` | string or null | No | An ID specific to this department |
| `Orders[].ResultCopyProviders[].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* |
| `Orders[].ResultCopyProviders[].Location.Room` | string or null | No | Room. *Example: 136* |
| `Orders[].OrderingFacility` | object | No |  |
| `Orders[].OrderingFacility.Name` | string or null | No | Name of the facility this order was placed in |
| `Orders[].OrderingFacility.Address` | object | No | Ordering facility's address |
| `Orders[].OrderingFacility.Address.StreetAddress` | string or null | No | Street address |
| `Orders[].OrderingFacility.Address.City` | string or null | No | City |
| `Orders[].OrderingFacility.Address.State` | string or null | No | State |
| `Orders[].OrderingFacility.Address.ZIP` | string or null | No | ZIP |
| `Orders[].OrderingFacility.Address.County` | string or null | No | County |
| `Orders[].OrderingFacility.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 |
| `Orders[].OrderingFacility.PhoneNumber` | string or null | No | Ordering facility's phone number. *In E. 164 Format. (i.e. +16085551234)* |
| `Orders[].Priority` | string or null | No | Priority of the order. Value set a9bf43e8-1898-46e1-998d-24a1955cd380: Stat, ASAP, Routine, Preoperative, Timing Critical, STAT |
| `Orders[].Comments` | string or null | No | Clinically relevant comments regarding the order |
| `Orders[].Notes` | Array of string | No | Order-level notes |
| `Orders[].Diagnoses` | Array of object | No | List of diagnoses associated with this order |
| `Orders[].Diagnoses[].Code` | string or null | No | Code for the diagnosis |
| `Orders[].Diagnoses[].Codeset` | string or null | No | Code set used to identify the diagnosis. *One of the following: ICD-9, ICD-10, HCPCS, CPT* Value set: 5730b002-4623-48de-8336-a38e57989cf5 |
| `Orders[].Diagnoses[].Name` | string or null | No | Name of the diagnosis |
| `Orders[].Diagnoses[].Type` | string or null | No | Type of the diagnosis. Value set 355dbdb5-f708-4f35-8fb2-85ba4bbe67b7: Unknown, Admitting, Final, Self, Working, Principal |
| `Orders[].Diagnoses[].DocumentedDateTime` | string or null | No | DateTime the diagnosis was documented. *[ISO 8601 Format](http://en.wikipedia.org/wiki/ISO_8601)* |
| `Orders[].ClinicalInfo` | Array of object | No | List of supplementary clinical information associated with the order. Often these are answers to Ask at Order Entry (AOE) questions. |
| `Orders[].ClinicalInfo[].Code` | string or null | No | Code for the information element |
| `Orders[].ClinicalInfo[].Codeset` | string or null | No | Code set used to identify the information element. *Codeset will be blank for system-defined codes. LOINC is used for a subset of AOE questions.* |
| `Orders[].ClinicalInfo[].Description` | string or null | No | Description of the information element. *For AOEs, this is typically the text of the AOE question* |
| `Orders[].ClinicalInfo[].Value` | string or null | No | Value of the information element. *For AOEs, this is typically the full answer* |
| `Orders[].ClinicalInfo[].Units` | string or null | No | Units of the value. *If the Value is a time range, this may be "WK"* |
| `Orders[].ClinicalInfo[].Abbreviation` | string or null | No | Abbreviation of the value of the information element. *Typically only present for text answer AOEs* |
| `Orders[].ClinicalInfo[].Notes` | Array of string | No | Notes related to the clinical info |

## Example

```json
{
  "Meta": {
    "DataModel": "Order",
    "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
  },
  "Orders": [
    {
      "Patient": {
        "Identifiers": [
          {
            "ID": "0000000001",
            "IDType": "MR"
          },
          {
            "ID": "e167267c-16c9-4fe3-96ae-9cff5703e90a",
            "IDType": "EHRID"
          },
          {
            "ID": "a1d4ee8aba494ca",
            "IDType": "NIST"
          }
        ]
      },
      "Visit": {
        "VisitNumber": 1234
      },
      "ID": "157968300",
      "ApplicationOrderID": null,
      "Status": "New",
      "TransactionDateTime": "2015-05-06T06:00:58.872Z",
      "CollectionDateTime": "2015-05-06T06:00:58.872Z",
      "Specimen": {
        "Source": null,
        "BodySite": null,
        "ID": null
      },
      "Procedure": {
        "Code": "49086-2",
        "Codeset": null,
        "Description": "First trimester maternal screen with nuchal translucency panel"
      },
      "Provider": {
        "NPI": null,
        "ID": null,
        "IDType": null,
        "FirstName": null,
        "LastName": null,
        "Credentials": [],
        "Address": {
          "StreetAddress": null,
          "City": null,
          "State": null,
          "ZIP": null,
          "County": null,
          "Country": null
        },
        "EmailAddresses": [],
        "PhoneNumber": {
          "Office": null
        },
        "Location": {
          "Type": null,
          "Facility": null,
          "FacilityIdentifiers": [],
          "Department": null,
          "DepartmentIdentifiers": [],
          "Room": null
        }
      },
      "ResultCopyProviders": [],
      "OrderingFacility": {
        "Name": null,
        "Address": {
          "StreetAddress": null,
          "City": null,
          "State": null,
          "ZIP": null,
          "County": null,
          "Country": null
        },
        "PhoneNumber": null
      },
      "Priority": "Stat",
      "Comments": null,
      "Notes": [],
      "Diagnoses": [
        {
          "Code": "Z31.41",
          "Codeset": "ICD-10",
          "Name": "Encounter for fertility testing",
          "Type": null,
          "DocumentedDateTime": null
        }
      ],
      "ClinicalInfo": [
        {
          "Code": "QUESTION001",
          "Codeset": null,
          "Description": "Estimated Due Date",
          "Value": "2015-10-05",
          "Units": null,
          "Abbreviation": null,
          "Notes": []
        },
        {
          "Code": "QUESTION002",
          "Codeset": null,
          "Description": "Ethnicity",
          "Value": "White",
          "Units": null,
          "Abbreviation": "W",
          "Notes": []
        },
        {
          "Code": "QUESTION010",
          "Codeset": null,
          "Description": "Is this a twin pregnancy?",
          "Value": "Singleton",
          "Units": null,
          "Abbreviation": "sng",
          "Notes": []
        },
        {
          "Code": "QUESTION011",
          "Codeset": null,
          "Description": "Dating Method",
          "Value": "LMP",
          "Units": null,
          "Abbreviation": "lmp",
          "Notes": []
        }
      ]
    }
  ]
}
```
