> ## Documentation Index
> Fetch the complete documentation index at: https://help.elationhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Organization

## Overview

Organization Information addresses:

* Organization HL7® FHIR® resource with [US Core Profile 6.1.0](http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-organization.html)

A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. This profile meets the U.S. Core Data for Interoperability (USCDI) v3 requirements for Organization Information.

Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.

**Example Usage Scenarios**:

The following are example usage scenarios for the this profile:

* Query by organization name or NPI

**Each Organization has next elements:**

* A status of the organization (i.e., whether is still active )
* A name

**Each Organization supports next elements:**

* An identifier
* A list of contact information
* An address

Organization response will be provided in JSON (refers to Capability Statement) format as per [FHIR](https://hl7.org/fhir) standard R4 version.

This resource refers to [US Core Organization Profile 6.1.0](http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-organization.html).

**Profile specific implementation guidance:**

Systems **SHALL** support National Provider Identifier (NPI) for organizations and **SHOULD** support Clinical Laboratory Improvement Amendments (CLIA) for laboratories.

### Must support elements, mandatory and optional search parameters

*Organization**must support** these elements:*

* `identifier`
  * `identifier:NPI`
  * `identifier:CLIA`
  * `identifier:NAIC`
  * `system`
  * `value`
* `active`
* `name`
* `telecom`
  * `system`
  * `value`
* `address`
  * `line`
  * `city`
  * `state`
  * `postalCode`
  * `country`

*Each Organization Must Have (Mandatory):*

* `active`
* `name`

*Identifier Validation Rules:*

* **NPI**: Must be 10 digits with valid Luhn algorithm check digit
* **CLIA**: Must be 10 digits with letter "D" in third position (format: ##D#######)
* **NAIC**: Must be exactly 5 digitsgi

Organization response will be provided in JSON (refers to Capability Statement) format as per [FHIR](https://hl7.org/fhir) standard R4 version.

*The following search parameters and search parameter combinations SHALL be supported (**mandatory**):*

The syntax used to describe the interactions is described [here](/articles/fhir/us-core-guidance).

**SHALL** support searching by organization `name` using the name search parameter:\
`GET [base url]/Organization?name=[string]`

**SHALL** support searching organization based on text `address` using the address search parameter:\
`GET [base url]/Organization?address=[string]`

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

## Organization By Name

Search for Organization by name.

**METHOD** *GET*

```
GET [base url]/Organization?name=[string]
```

**PARAMS**\
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)\
\[string] - Organization's name

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Organization?name=Health' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Organization By Address

Get Organizations by address string.

**METHOD** *GET*

```
GET [base url]/Organization?address=[string]
```

**PARAMS**

\[base url] - [FHIR base url](/articles/fhir/service-base-urls)\
\[string] - Address string

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process.   [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Organization?address=Arbor' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```
