# Organization QueryResponse

This data model allows you to retrieve information about organizations from a clinical network (e.g., Carequality Interoperability Framework) or an EHR-maintained list. The most common use case is to see a list of available organizations to query via the Carequality Framework.

This data model has event types that allow you to:

- create a new organization record;
- update or delete an existing organization record; or
- query for and receive organization records. 

> **For external organizations**
>
> Keep in mind this doesn't relate to Redox organizations, sources, or destinations. It's used to synchronize your system with externally maintained lists of organizations.  

Receive organization details, along with its OID, based on the query parameters defined in `Organization.Query`. 

Status: Beta

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Meta` | object | Yes |  |
| `Meta.DataModel` | string | Yes | Organization |
| `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.* |
| `Directory` | string | Yes | Directory this organization belongs to. *one of: Carequality, TEFCA-CommonWell, CommonWell* |
| `Organizations` | Array of object | Yes |  |
| `Organizations[].Active` | boolean | Yes | If this organization is considered active |
| `Organizations[].Name` | string | Yes | The name of the organization |
| `Organizations[].Aliases` | Array of string | No | Name aliases for this organization |
| `Organizations[].Identifiers` | Array of object | No | An array of IDs and IDTypes to identify this organization |
| `Organizations[].Identifiers[].ID` | string or null | No | The ID for the organization |
| `Organizations[].Identifiers[].IDType` | string or null | No | The IDType associated with the ID |
| `Organizations[].Type` | object | No | The type of organization |
| `Organizations[].Type.System` | string or null | No | The system used to define the type |
| `Organizations[].Type.Value` | string or null | No | The value of the type of organization. *Value set is for TEFCA-CommonWell integrations.* Value set 33f8a819-cc51-4050-9b8b-f4b40f6c5af1: PHARMACY, ACUTE CARE, AMBULATORY, HOSPITAL, LAB SYSTEMS, POST ACUTE CARE |
| `Organizations[].PartOf` | object | No | Information/identifiers of the owning/maintaining organization |
| `Organizations[].PartOf.Identifier` | object | No | Identifying information for the owning organization |
| `Organizations[].PartOf.Identifier.Type` | string or null | No | ID Type |
| `Organizations[].PartOf.Identifier.System` | string or null | No | The ID Type system used |
| `Organizations[].PartOf.Identifier.Value` | string or null | No | The ID |
| `Organizations[].Contacts` | Array of object | No | Any specified contact information for the organization |
| `Organizations[].Contacts[].Purpose` | string or null | No | The contact's role at this organization |
| `Organizations[].Contacts[].Name` | string or null | No | The contact's full name |
| `Organizations[].Contacts[].EmailAddresses` | Array of string | No | The contact's emails |
| `Organizations[].Contacts[].PhoneNumber` | object | No | The contact's phone numbers |
| `Organizations[].Contacts[].PhoneNumber.Home` | string or null | No | The contact's home number |
| `Organizations[].Contacts[].PhoneNumber.Work` | string or null | No | The contact's work number |
| `Organizations[].Contacts[].PhoneNumber.Mobile` | string or null | No | The contact's mobile number |
| `Organizations[].Address` | object | No | The address information for the organization |
| `Organizations[].Address.StreetAddress` | string or null | No | Street address |
| `Organizations[].Address.City` | string or null | No | City |
| `Organizations[].Address.State` | string or null | No | State |
| `Organizations[].Address.ZIP` | string or null | No | ZIP |
| `Organizations[].Address.County` | string or null | No | County |
| `Organizations[].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 |
| `Organizations[].ManagingOrg` | string or null | No | The managing organization |
| `Paging` | object | No | information related to a paged response |
| `Paging.Count` | number or null | No | The count of responses returned in this response |
| `Paging.Index` | number or null | No | The index used to return the above array of responses |

## Example

```json
{
  "Meta": {
    "DataModel": "Organization",
    "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
  },
  "Directory": "Carequality",
  "Organizations": [
    {
      "Active": true,
      "Name": "Test Org",
      "Aliases": [],
      "Identifiers": [
        {
          "ID": "0000000001",
          "IDType": "FACID"
        },
        {
          "ID": "1.2.3.4.5",
          "IDType": "OID"
        },
        {
          "ID": "2.16.840.1.113883.3.9999.123.456",
          "IDType": "PIAA"
        }
      ],
      "Type": {
        "System": "http://hl7.org/fhir/organization-type",
        "Value": "Implementer"
      },
      "PartOf": {
        "Identifier": {
          "Type": "HCID",
          "System": "http://www.hl7.org/oid/",
          "Value": "1.2.3.4"
        }
      },
      "Contacts": [
        {
          "Purpose": null,
          "Name": "Bixby, Barbara",
          "EmailAddresses": [
            "barb.bixby@test.net"
          ],
          "PhoneNumber": {
            "Home": "+18088675303",
            "Work": null,
            "Mobile": "+19189368865"
          }
        }
      ],
      "Address": {
        "StreetAddress": "123 Main St.",
        "City": "ATown",
        "State": "AL",
        "ZIP": "86754",
        "County": "Madison",
        "Country": "USA"
      },
      "ManagingOrg": "Redox Health System"
    }
  ],
  "Paging": {
    "Count": 1,
    "Index": 0
  }
}
```
