> ## 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.

# Implantable Device

## Overview

Implantable Device Information addresses:

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

Unique Device Identifier(s) for a Patient's Implantable Device(s) are recorded in the system using the FHIR Device resource. This profile meets the U.S. Core Data for Interoperability (USCDI) v3 requirements for Unique Device Identifiers.

Device is a type of manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. This profile specifically focuses on implantable devices that have been placed in a patient's body.

**Each Device has next elements:**

* a code identifying the type of device
* a patient

**Each Implantable Device Must Support:**

* A Unique Device Identifier (UDI) numeric or alphanumeric code as the Human Readable Form (HRF) string representation of the barcode
* The Device Identifier (UDI-DI)
* the manufacture date
* the expiration date
* the lot number
* the serial number
* the distinct identifier (i.e., the distinct identification code)

**Profile specific implementation guidance:**

* This profile supports the requirement to retrieve an 170.315(a)(14) [Implantable device list](https://www.healthit.gov/test-method/implantable-device-list) and follows the [HL7 Cross Paradigm Implementation Guide: UDI Pattern](http://www.hl7.org/documentcenter/private/standards/HL7_IG_UDI_R2_2020JUN.pdf) guidelines for exchanging information about the use of and/or implantation of medical devices in patients.:
  * The [AccessGUDID API](https://www.fda.gov/medical-devices/global-unique-device-identification-database-gudid/accessgudid-public) provides access to device records in GUDID including safety information and UDI. It includes APIs to query and download a complete list of implantable devices registered in GUDID.
  * The Parse UDI API allows users to pass a UDI and return each part of the UDI in a structured format (specifically the serialNumber, lotNumber, expirationDate, distinctIdentifier (returned as donation\_id) or manufactureDate).
* Implantable medical devices that have UDI information SHALL represent this information in either carrierAIDC or carrierHRF. (Note that the UDI may not be present in all scenarios such as historical implantable devices, patient reported implant information, payer reported devices, or improperly documented implants.)
* For Implantable medical devices that have UDI information, at least one of the Production Identifiers (UDI-PI) SHALL be present.
* Servers SHOULD support query by Device.type to allow clients to request the patient’s devices by a specific type. Note: The Device.type is too granular to differentiate implantable vs. non-implantable devices.
* Records of implanted devices MAY be queried against UDI data including:
  * UDI HRF string (udi-carrier)
  * UDI Device Identifier (udi-di)
  * Manufacturer (manufacturer)
  * Model number (model)

Implementers MAY also adopt custom SearchParameters for searching by:

* lot numbers
* serial number
* expiration date
* manufacture date
* distinct identifier

This resource conforms to [USCDI v3](https://www.healthit.gov/isp/uscdi-data-class/unique-device-identifiers-a-patients-implantable-devices#uscdi-v3) for Unique Device Identifiers - refers to [US Core Implantable Device Profile 6.1.0](http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-implantable-device.html). Device response will be provided in JSON (refers to Capability Statement) format as per [FHIR](https://hl7.org/fhir) standard R4 version.

| USCore Data Element        | FHIR Resource Field                |
| -------------------------- | ---------------------------------- |
| code                       | Device.type                        |
| patient                    | Device.patient                     |
| UDI (optional)             | Device.udiCarrier.deviceIdentifier |
| manufacture date(optional) | Device.manufactureDate             |
| expiration date (optional) | Device.expirationDate              |
| lot number (optional)      | Device.lotNumber                   |
| serial number (optional)   | Device.serialNumber                |

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

*Device**must support** these elements:*

* `udiCarrier`
  * `deviceIdentifier`
  * `carrierHRF`
* `distinctIdentifier`
* `manufactureDate`
* `expirationDate`
* `lotNumber`
* `serialNumber`
* `type`
* `patient`

*Each CareTeam Must Have (Mandatory):*

* `type`
* `patient`

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

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

**SHALL** support searching for all Devices for a patient using the `patient` search parameter:
`GET [base url]/Device?patient={Type/}[id]`

*The following search parameter combinations SHOULD be supported (**optional**):*

**SHOULD** support searching using the combination of the `patient` and `type` search parameters:
`GET [base url]/Device?patient={Type/}[id]&type={system|}[code]`

**SHOULD** support searching using the combination of the `patient` and `status` search parameters:

* including support for OR search on status (e.g.status=\{system|}\[code],\{system|}\[code],...)

`GET [base url]/Device?patient={Type/}[id]&status={system|}[code]{,{system|}[code],...}`

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

## Device By Patient Id

Search for Device by patient.

**METHOD** *GET*

```
GET [base url]/Device?patient={Type/}[id]
```

**PARAMS**
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\{Type/} - Reference type for the patient resource. *Example:* `Patient/`
\[id] - Id for the Patient

**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                                                                            |

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

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Device?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Device By Id

Fetch a single Device by ID.

**METHOD** *GET*

```
GET [base url]/Device/{id}
```

or

```
GET [base url]/Device?_id={id}
```

**PARAMS**

\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\{id} - Id for Device resource

**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                                                                            |

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

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Device/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Device by Patient and Type

Search for Devices using combination of patient and type search parameters.

**METHOD** *GET*

```
GET [base url]/Device?patient={Type/}[id]&type={system|}[code]
```

**PARAMS**

\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\{Type/} - Reference type for the patient resource. *Example:* `Patient/`
\[id] - Patient id
\{system|} - Terminology system for device type. FHIR search token parameter. See [Search specification](https://www.hl7.org/fhir/search.html#token) for more information. *Example:* `http://snomed.info/sct|`
\[code] - Device type code. *Example:* `468063009` (Implantable cardioverter defibrillator)

**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                                                                            |

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

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Device?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&type=http://snomed.info/sct|468063009' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'
```

## Device by Patient and Status

Search for Devices using combination of patient and status search parameters.

**METHOD** *GET*

```
GET [base url]/Device?patient={Type/}[id]&status={system|}[code]{,{system|}[code],...}
```

**PARAMS**

\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\{Type/} - Reference type for the patient resource. *Example:* `Patient/`
\[id] - Patient id
\{system|} - Status system. FHIR search token parameter. See [Search specification](https://www.hl7.org/fhir/search.html#token) for more information.
\[code] - Device status code. *Example:* `active`, `inactive`, `entered-in-error`

**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                                                                            |

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

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Device?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&status=active' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'
```
