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

# Elation Billing User

> Identify the billers, administrators, and staff who work claims in Elation Billing.

One row per Elation Billing user, per warehouse. These are the people who work claims in Elation Billing - billers, administrators, and practice staff.

Elation Billing users are separate from the Elation EHR users in the `user` table. To connect the two, join through [elation\_sso\_user](/articles/hdb/elation-sso-user). The practices a user works in are in [user\_practice](/articles/hdb/user-practice) - there is no `practice_id` on this table, because one user can work across several practices.

This table's columns and relationships are shown in the [Hosted Database schema](/articles/hdb/schema).

<Note>
  `is_active` and `is_deleted` mean different things. `is_active = false` is a user whose access was withdrawn but whose record remains. `is_deleted = true` is a user whose record was removed in Elation Billing. Filter on both when you want only current, usable accounts.
</Note>

<Note>
  `role_id` points at [user\_role](/articles/hdb/user-role), but a small number of users carry a role that no longer exists there, so it does not always resolve. Use a left join rather than an inner join if you need every user in the result.
</Note>

**For reporting on but not limited to:**

* Who works claims at each practice, and in what role
* Active compared with deactivated Elation Billing accounts
* When a user last logged in, to find dormant accounts
* Attributing queued claims, payments, and eligibility checks to a named person
* Accounts created and deactivated over time

## Active users with their role

<CodeGroup>
  ```sql sql theme={null}
  select
      u.id as elation_billing_user_id
    , u.first_name
    , u.last_name
    , u.email
    , r.role as role_name
    , u.last_login_at
  from elation_billing_user u
    left join user_role r on r.id = u.role_id
  where u.is_active
    and not u.is_deleted
  order by u.last_name, u.first_name;
  ```
</CodeGroup>

## Users by practice

<CodeGroup>
  ```sql sql theme={null}
  select
      p.name as practice_name
    , u.first_name
    , u.last_name
    , u.email
    , r.role as role_name
  from user_practice up
    inner join elation_billing_user u on u.id = up.elation_billing_user_id
    left join practice p on p.id = up.practice_id
    left join user_role r on r.id = u.role_id
  where not up.is_deleted
    and not u.is_deleted
  order by p.name, u.last_name, u.first_name;
  ```
</CodeGroup>

## Dormant accounts that can still log in

<CodeGroup>
  ```sql sql theme={null}
  select
      u.first_name
    , u.last_name
    , u.email
    , u.last_login_at
  from elation_billing_user u
  where u.is_active
    and not u.is_deleted
    and (u.last_login_at is null
         or u.last_login_at < dateadd(month, -6, current_date))
  order by u.last_login_at nulls first;
  ```
</CodeGroup>

*If you have any questions about this topic please reach out to [Elation Support Portal](/articles/support-portal-introduction) with the subject line HDB - \<your\_question>*
