Organization Management
Organization Management
Section titled “Organization Management”The Organization Object
Section titled “The Organization Object” # Some Example Fields
"organization": { "id": "9900", "name": "Healthie", "phone_number": "555-444-2244", "tax_id": "123456789", "tax_id_type": "EIN", "npi": "1234567890", "location": { "city": "New York", "country": "US" } }Organizations are Organization objects.
You can view the full list of available fields here.
Retrieving an Organization
Section titled “Retrieving an Organization”query getOrganization($id: ID) { organization(id: $id) { id name location { city country } }}| Input | Info |
|---|---|
id | Organization ID, if none provided, will retutrn the current user’s Organization |
provider_id | Find Organization by Provider ID |
provider_ids | Find Organization by multiple Provider IDs |
email | Email address of the User associated with the Organization |
for_client | Use true to find the Organization for the currently logged-in end User (Patient) |
Adding an Organization Member
Section titled “Adding an Organization Member”In order to create a new Organization Member, you should use the createOrganizationMembership mutation.
mutation createOrganizationMembership( $first_name: String $last_name: String $email: String $password: String $title: String $org_role: String $send_invite_email: Boolean $phone_number: String $dont_send_welcome: Boolean $organization_id: ID $timezone: String) { createOrganizationMembership( input: { first_name: $first_name last_name: $last_name email: $email password: $password title: $title org_role: $org_role send_invite_email: $send_invite_email phone_number: $phone_number dont_send_welcome: $dont_send_welcome organization_id: $organization_id timezone: $timezone } ) { organizationMembership { user { id } org_role can_see_calendar can_edit_forms }
messages { field message } }}The createOrganizationMembership mutation is called from an authenticated Super Admin account or by an Organization Member with can_add_members permission.
You can view a full list of potential inputs here.
| Input | Info |
|---|---|
organization_id | Required. Specifies to which organization to invite the user. |
first_name | Required. |
last_name | Required. |
email | Required. |
title | Optional. Used for additional metadata about the membership. Not used in Healthie UI. |
org_role | Optional. Either "Standard" (default) or "Support". |
password | Optional. Sets the default password for the invited user. If provided, needs to be a minimum of 8 chars, and meet a calculated strength requirement. Healthie uses StrongPassword Ruby gem to calculate password strength |
send_invite_email | Optional. Whether to send an invite email. |
The createOrganizationMembership mutation returns an OrganizationMembership object, which describes a list of the new member’s permissions. You can view a full list of potential return properties here.
Listing Providers / Organization Members
Section titled “Listing Providers / Organization Members”You can retrieve a list of your organization’s providers and support members using the organizationMembers query.
You can view a full list of potential inputs in our API Explorer.
query getOrganizationMembers( $offset: Int $page_size: Int $keywords: String $sort_by: String $licensed_in_state: String $conversation_id: ID) { organizationMembers( offset: $offset page_size: $page_size keywords: $keywords sort_by: $sort_by licensed_in_state: $licensed_in_state conversation_id: $conversation_id ) { id first_name last_name email has_api_access }}| Input | Info |
|---|---|
sort_by | Default value is last_name. Other options are email, first_name_asc, first_name_desc, last_name_asc, last_name_desc, created_at_desc, created_at_asc, updated_at_desc, updated_at_asc, group_name_asc, group_name_desc, provider_name_asc, provider_name_desc, next_appt_asc, and next_appt_desc. |
licensed_in_state | Two letter state abbreviation (e.g. “CA”, “NY”) |
conversation_id | Can be used to filter org members by a Conversation ID |
offset | Optional. Offset for pagination |
page_size | Defaults to 10. The number of records to return |
Updating an Organization Membership
Section titled “Updating an Organization Membership”mutation updateOrganizationMembership( $first_name: String $last_name: String $email: String $password: String $title: String $org_role: String $send_invite_email: Boolean $phone_number: String $dont_send_welcome: Boolean $organization_id: ID $timezone: String) { updateOrganizationMembership( input: { first_name: $first_name last_name: $last_name email: $email password: $password title: $title org_role: $org_role send_invite_email: $send_invite_email phone_number: $phone_number dont_send_welcome: $dont_send_welcome organization_id: $organization_id timezone: $timezone } ) { organizationMembership { user { id } org_role can_see_calendar can_edit_forms }
messages { field message } }}The updateOrganizationMembership mutation shares many common inputs with createOrganizationMembership and those inputs (e.g org_role or title work the same in both places).
However, the updateOrganizationMembership provides more granular control over the membership object.
The updateOrganizationMembership mutation can be called by Super Admins or Organization Members with can_edit_members permission.
You can view a full list of potential inputs here.
| Input | Info |
|---|---|
id | Required. ID of the Organization Membership to update |
active | Optional. Boolean indicating whether the Organization Member should be active |
timezone | Optional. Allows to update the timezone of the Organization Member |
qualifications | Optional. Updates the qualifications of the Organization Member |
Additionally, the updateOrganizationMembership mutation accepts a set of Boolean input parameters that determine permissions of the Member.
Returns an updateOrganizationMembershipPayload object.
Removing an Organization Member
Section titled “Removing an Organization Member”mutation deleteOrganizationMembership($id: ID) { deleteOrganizationMembership(input: { id: $id }) { organizationMembership { id }
messages { field message } }}Organization Memberships can be deleted via the deleteOrganizationMembership mutation.
You can view a full list of potential inputs here.
The deleteOrganizationMembership mutation can be called by Super Admins only.
| Input | Info |
|---|---|
id | Required. ID of the Membership to delete. |
Returns a deleteOrganizationMembershipPayload object.