v1

latestOpenAPI 3.0.0NexHealth License 1.02026-07-2688180386.6 KB
Patients

Create patient

This endpoint creates a new patient or returns an existing patient if return_existing_if_match is true. Responds with 201 when a new patient is created, or with 200 and the existing patient when return_existing_if_match is true and a patient with matching information already exists.

post/patients

Query parameters

subdomainstring required

Used to scope the request to the specified institution

location_idinteger required

Used to scope the request to the specified location

Headers

Nex-Api-Versionstring required

The NexHealth API version

Request body

return_existing_if_matchboolean

If true, return existing patient with matching information (200 OK) instead of raising an error. If false, raise an error when a patient with matching information already exists (400 Bad Request). Matching is based on date of birth, name, and phone number.

Example request

{
  "provider": {
    "provider_id": 12
  },
  "patient": {
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com",
    "bio": {
      "date_of_birth": "1964-05-03",
      "phone_number": "5163042196",
      "home_phone_number": "5163042197",
      "cell_phone_number": "5163042198",
      "work_phone_number": "5163042199",
      "custom_contact_number": "5163042200",
      "gender": "Female",
      "weight": 70,
      "height": 175,
      "street_address": "333 Bush Street",
      "address_line_1": "333 Bush Street",
      "address_line_2": "Apt 4B",
      "city": "New York",
      "state": "NY",
      "zip_code": "20814",
      "insurance_name": "Delta Dental of California",
      "ssn": "123-45-6789",
      "race": "White"
    }
  }
}

Response

Successful

codeboolean

Indicates the success or failure of the request

descriptionstring

Additional context on the request to help with debugging.

errorstring[]

Any errors that occur during the execution of the request.

countinteger

Number of total objects, in case of collection.

Example response

{
  "description": "Description",
  "error": [
    "Error message"
  ],
  "data": {
    "user": {
      "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": ""
      },
      "last_sync_time": "2024-04-12T10:30:00Z",
      "guarantor_id": 472,
      "billing_type": "Standard Billing - finance charges",
      "chart_id": "017407",
      "preferred_language": "es",
      "preferred_locale": "es",
      "location_ids": [
        101,
        102,
        103
      ]
    }
  },
  "count": 2
}