# Organization Update

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.  

Update an existing organization record in an external network or system. 

> **Only one organization at a time**
>
> Even though there’s an array for `Organizations`, we only support creating or updating one organization record at a time. This applies to organization records for either Carequality, CommonWell, or TEFCA-CommonWell.

Status: Beta

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Meta` | object | Yes |  |
| `Meta.DataModel` | string | Yes | Organization |
| `Meta.EventType` | string | Yes | Update |
| `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.* |
| `Action` | string | Yes | Which update action is this for?. *Update or Delete* |
| `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 | ID and ID Type of the organization to query information for. *For TEFCA-CommonWell, CommonWell, a PIAA (Patient ID Assigning Authority) identifier is required.* |
| `Organizations[].Identifiers[].ID` | string,null or null | No | ID of organization to query information for. *For TEFCA-CommonWell, CommonWell, this field is required and is the OID representing the organization's primary ID* |
| `Organizations[].Identifiers[].IDType` | string,null or null | No | IDType of organization to query information for. *For TEFCA-CommonWell, CommonWell, this field is required and should be `PIAA`.* |
| `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[].Endpoints` | Array of object | No | The Endpoints associated with thisorganization |
| `Organizations[].Endpoints[].Identifiers` | Array of object | No | Array of identifiers for this endpoint resource |
| `Organizations[].Endpoints[].Identifiers[].Type` | string or null | No | This should be the type of identifier detailed here. Typically HCID or AAID for Carequality endpoints |
| `Organizations[].Endpoints[].Identifiers[].System` | string or null | No | The system the identifier belongs to. Typically http://www.hl7.org/oid/ |
| `Organizations[].Endpoints[].Identifiers[].Value` | string or null | No | The value of the ID |
| `Organizations[].Endpoints[].ConnectionType` | object | No | Defines the type of endpoint this is. |
| `Organizations[].Endpoints[].ConnectionType.System` | string or null | No | The system for the ID. Typically http://terminology.hl7.org/CodeSystem/subscription-channel-type |
| `Organizations[].Endpoints[].ConnectionType.Value` | string or null | No | The value for the connection, such as ihe-xcpd |
| `Organizations[].Endpoints[].Name` | string or null | No | A name for this endpoint. |
| `Organizations[].Endpoints[].Address` | string or null | No | This specifies the actual endpoint value, such as the URL |
| `Organizations[].Endpoints[].MIMEType` | string or null | No | Details the type of payload this endpoint is expecting. Text/XML is standard for IHE endpoints |
| `Organizations[].Endpoints[].Attributes` | object | No | Additional information pertaining to this endpoint |
| `Organizations[].Endpoints[].Attributes.Transaction` | string or null | No | Type of transaction for this endpoint, such as XCPD ITI-55 |
| `Organizations[].Endpoints[].Attributes.Actor` | object | No | Defines how the endpoint acts, such as "Responding Gateway" |
| `Organizations[].Endpoints[].Attributes.Actor.System` | string or null | No | Actor value system used. Typically `https://sequoiaproject.org/StructureDefinition/Endpoint/Actor/1.0.0` |
| `Organizations[].Endpoints[].Attributes.Actor.Value` | string or null | No | Value defining this endpoint Actor from the system specified |
| `Organizations[].Endpoints[].Attributes.Version` | object | No | The version of this endpoint in the containing directory |
| `Organizations[].Endpoints[].Attributes.Version.System` | string or null | No | The system that defines the list of permissable values for the version. Typically `https://sequoiaproject.org/StructureDefinition/Endpoint/Version/1.0.0` |
| `Organizations[].Endpoints[].Attributes.Version.Value` | string or null | No | The value of the version |
| `Organizations[].Endpoints[].Attributes.UseCases` | Array of object | No | Defines how this endpoint should be used |
| `Organizations[].Endpoints[].Attributes.UseCases[].System` | string or null | No | System used for the use case definition. Typically `https://sequoiaproject.org/StructureDefinition/Endpoint/UseCases/1.0.0` |
| `Organizations[].Endpoints[].Attributes.UseCases[].Value` | string or null | No | the value of the use case |
| `Organizations[].Endpoints[].Attributes.PurposeOfUse` | Array of object | No | Defines what purposes of use this endpoint is setup to support |
| `Organizations[].Endpoints[].Attributes.PurposeOfUse[].System` | string or null | No | The system used for the definition of the purpose of use |
| `Organizations[].Endpoints[].Attributes.PurposeOfUse[].Value` | string or null | No | the value for this purpose of use |
| `Organizations[].Endpoints[].Attributes.Roles` | Array of object | No | Defines what roles this endpoint serves |
| `Organizations[].Endpoints[].Attributes.Roles[].System` | string or null | No | The system used to defined the role. Typically `https://sequoiaproject.org/StructureDefinition/Endpoint/Roles/1.0.0` |
| `Organizations[].Endpoints[].Attributes.Roles[].Value` | string or null | No | The role value |
| `Organizations[].DestinationID` | string or null | No | The Redox Destination ID that is associated with this Carequality org for receiving query events over the network |

## Example

```json
{
  "Meta": {
    "DataModel": "Organization",
    "EventType": "Update",
    "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
  },
  "Action": "Update",
  "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"
      },
      "Endpoints": [
        {
          "Identifiers": [
            {
              "Type": "HCID",
              "System": "http://www.hl7.org/oid/",
              "Value": "2.8.1.2"
            }
          ],
          "ConnectionType": {
            "System": "http://terminology.hl7.org/CodeSystem/subscription-channel-type",
            "Value": "ihe-xcpd"
          },
          "Name": "Patient Discovery",
          "Address": "https://fake.fake.com/xcpd",
          "MIMEType": "Text/XML",
          "Attributes": {
            "Transaction": "XCPD ITI-55",
            "Actor": {
              "System": "https://sequoiaproject.org/StructureDefinition/Endpoint/Actor/1.0.0",
              "Value": "Responding Gateway"
            },
            "Version": {
              "System": "https://sequoiaproject.org/StructureDefinition/Endpoint/Version/1.0.0",
              "Value": "2.0"
            },
            "UseCases": [
              {
                "System": "https://sequoiaproject.org/StructureDefinition/Endpoint/UseCases/1.0.0",
                "Value": "QueryBasedDocumentExchange"
              }
            ],
            "PurposeOfUse": [
              {
                "System": "https://sequoiaproject.org/StructureDefinition/Endpoint/PurposesOfUse/1.0.0",
                "Value": "Treatment"
              }
            ],
            "Roles": [
              {
                "System": "https://sequoiaproject.org/StructureDefinition/Endpoint/Roles/1.0.0",
                "Value": "All"
              }
            ]
          }
        }
      ],
      "DestinationID": "5e3dc12b-3a04-438e-880d-a690639e629e"
    }
  ]
}
```
