Patients

View patients

GET
/patients

This endpoint returns the patients for the specified location. Every filter is optional.

Authorization

Authorization
Authorization<token>

In: header

Query Parameters

subdomain*string

Used to scope the request to the specified institution

location_id*integer

Used to scope the request to the specified location

Formatint32
sort?string

Optional comma-separated string of fields to sort on. Include a leading dash for descending order.

Available fields:

  • id
  • -id
  • updated_at
  • -updated_at
Default"id"
name?string

Filter by patient name

email?string

Filter by patient email

phone_number?string

Filter by patient phone number

date_of_birth?string

Filter by patient date of birth. Must be a parseable date string, recommended format is YYYY-MM-DD

Formatdate
inactive?boolean

Filter by inactive status. When true, returns only inactive patients. When false, returns only active patients. When not specified, does not filter

foreign_id?string

Filter by the unique patient ID from the EHR

updated_since?string

Only return patients updated at or after the specified date/time. Must be a parseable Date, recommended formats are YYYY-MM-DD or YYYY-MM-DDThh:mm:ss+0000

Formatdate-time
new_patient?boolean

Filter by new-patient status. A new patient is a placeholder record read from the EHR for a person the practice booked without a full patient chart (its foreign_id ends in _np); it cannot be used to book. Once the EHR has the real patient record and NexHealth reads it, the placeholder is merged into it. true returns only new patients with an upcoming appointment, false only regular patients, unset returns regular patients plus new patients with an upcoming appointment.

non_patient?boolean

Filter by non-patient status. A non-patient is a person the EHR stores without treating, such as a guarantor who is not a patient. true returns only non-patients, false leaves them out, unset returns both.

forms_syncable?boolean

true returns only patients a completed form can be written to in the EHR. false or unset does not filter.

location_strict?boolean

Only returns patients belonging to the specified location, rather than searching across the EHR system

Defaultfalse
start_cursor?string

First item of the current page. Starts empty

end_cursor?string

Last item of the current page. Starts empty

per_page?integer

Number of results to return per page. Maximum allowed amount is 1000.

Formatint32
Default5

Header Parameters

Nex-Api-Version*string

The NexHealth API version

Default"v3.0.0"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/patients?subdomain=string&location_id=0&name=John+Smith&email=john.smith%40example.com&phone_number=5163042196&date_of_birth=1964-05-03&inactive=false&foreign_id=100437&updated_since=2024-04-12T10%3A30%3A00Z&new_patient=false&non_patient=false&forms_syncable=true&location_strict=false" \  -H "Nex-Api-Version: v3.0.0"
{  "code": false,  "description": "Description",  "error": [    "Error message"  ],  "data": [    {      "id": 415,      "email": "Amy.Ramos@nexhealth.com",      "first_name": "John",      "middle_name": "Anthony",      "last_name": "Smith",      "name": "John Smith",      "created_at": "2020-06-05T20:16:57.007Z",      "updated_at": "2020-06-05T20:16:57.007Z",      "institution_id": 105,      "foreign_id": "100437",      "foreign_id_type": "--DataSource-",      "bio": {        "city": "New York",        "state": "NY",        "gender": "Female",        "zip_code": "20814",        "new_patient": false,        "non_patient": true,        "phone_number": "5163042196",        "date_of_birth": "1964-05-03",        "address_line_1": "",        "address_line_2": "",        "street_address": "",        "cell_phone_number": "",        "home_phone_number": "",        "work_phone_number": ""      },      "inactive": false,      "last_sync_time": "2024-04-12T10:30:00Z",      "guarantor_id": 472,      "billing_type": "Standard Billing - finance charges",      "chart_id": "017407",      "preferred_language": "es",      "provider_id": 23,      "hipaa": {        "authorization": true,        "authorization_date": "2023-03-22",        "privacy": true,        "privacy_date": "2023-03-22",        "consent": true,        "consent_date": "2023-03-22"      }    }  ],  "page_info": {    "has_previous_page": false,    "has_next_page": false,    "start_cursor": "AAAAA",    "end_cursor": "BBBBBB"  }}