Fetch Patients
Patients
Fetch Patients
Performs a live fetch of patient data from the connected EMR system based on search criteria.
POST
Fetch Patients
Documentation Index
Fetch the complete documentation index at: https://docs.usecobalt.com/llms.txt
Use this file to discover all available pages before exploring further.
This is an async operation that fetches up-to-date patient data directly from the EMR system. If the newest data is not critical, consider using the GET /patients endpoint instead for faster results from cached data.
Optional Includes
Useinclude to opt into additional live-fetch payloads. The API accepts either:
- a comma-delimited string, for example
include: "insurances" - an array of strings, for example
include: ["insurances"]
insurances
Example Request
Response Data
Patient data includes comprehensive information including active medications and associated pharmacies:Insurances Array
insurances is only returned when include contains insurances. It is currently supported for eClinicalWorks.
| Field | Type | Description |
|---|---|---|
emr_insurance_id | string | Stable EMR insurance record ID. Use this value when calling PATCH /v1/patients/:patient_mrn/insurances/:emr_insurance_id. |
priority | integer | EMR priority / sequence number for the insurance record |
insurance_ehr_id | string | EMR-native carrier/company ID |
insurance_name | string | Carrier name for this specific insurance record |
insurance_subscriber_number | string | Subscriber/member number for this specific insurance record |
group_id | string | Insurance group number |
plan_begin_date | string | Coverage start date |
copayment | string | null | Copayment value returned by the EMR |
relationship_to_subscriber | string | null | Relationship to the subscriber |
guarantor_id | string | null | EMR guarantor identifier associated with the insurance |
is_guarantor_patient | boolean | Whether the guarantor is the patient |
The top-level
insurance_name and insurance_subscriber_number fields remain convenience fields on the patient object. When present, prefer insurances[] for record-specific insurance details and update targeting.Guarantors Array
eClinicalWorks only. Each entry represents a guarantor on the patient’s account. Empty array if the lookup fails.| Field | Type | Description |
|---|---|---|
id | string | Guarantor’s EMR patient ID (if the guarantor is also a patient) |
name | string | Guarantor’s full name |
dob | string | Date of birth |
relationship | string | Relationship to the patient: self, spouse, child, or other |
is_guarantor_patient | boolean | Whether this guarantor is also the patient on the account |
patient_balance and account_balance fields (numbers, in dollars) are returned alongside the guarantors. Both are null if the lookup fails.
Alerts Object
eClinicalWorks only. Contains the patient’s billing and global alerts. May benull if the alerts lookup fails.
| Field | Type | Description |
|---|---|---|
billing_alert | boolean | Whether a billing alert is set on the patient |
billing_notes | string | null | Free-text notes attached to the billing alert |
global_alerts | array | Global alerts; each has name, alert_type, notes, priority, expiry_date |
Medications Array
Each patient includes an array of active medications with the following fields:| Field | Type | Description |
|---|---|---|
name | string | Medication name |
strength | string | Medication strength/dosage |
frequency | string | How often to take the medication |
start_date | string | Date medication was started (MM/DD/YYYY) |
refills | string | Number of refills remaining |
notes | string | Additional notes about the medication |
Pharmacies Array
Each patient includes an array of associated pharmacies with the following fields:| Field | Type | Description |
|---|---|---|
pharmacy_id | string | Pharmacy’s EMR ID |
is_primary | string | Whether this is the patient’s primary pharmacy (“0” or “1”) |
name | string | Pharmacy name |
address | string | Pharmacy street address |
city | string | Pharmacy city |
state | string | Pharmacy state code |
zip | string | Pharmacy ZIP code |
phone | string | Pharmacy phone number |
Encounters Array
Each patient includes an array of encounters (past and upcoming appointments) returned by the EMR. Field availability varies by EMR and visit type.| Field | Type | Description |
|---|---|---|
id | string | Encounter ID in the EMR |
date | string | Encounter date (YYYY-MM-DD) |
start_time | string | Scheduled start time (HH:MM, 24-hour) |
visit_type | string | EMR visit type code (e.g. OV for office visit, TEL for telephone encounter) |
status | string | Encounter status (e.g. Checked Out, Scheduled) |
provider_ehr_id | string | Rendering provider’s EMR ID |
provider_first_name | string | Rendering provider’s first name |
provider_last_name | string | Rendering provider’s last name |
reason | string | Reason for visit |
facility_name | string | Facility name |
facility_id | string | Facility EMR ID |
locked | string | Whether the encounter is locked ("true" / "false") |
visit_type: "TEL") are enriched with additional fields including caller, message, actions, notes, assigned_to, answered_by, priority, and has_attachment.
The top-level last_appointment_date field is derived from the encounters array and reflects the most recent appointment date for the patient.
Webhook Notifications
When the patient fetch is complete, we will send a webhook to your registered endpoint. Here is an example of what the webhook payload will look like:Authorizations
Body
application/json
Identifies the search method or criteria being used.
Available options:
dob, name, phone, mrn Date of birth in ISO 8601 format (YYYY-MM-DD).
Patient's first name.
Patient's last name.
Phone number in format XXX-XXX-XXXX (e.g., "555-123-4567").
Pattern:
^\d{3}-\d{3}-\d{4}$Medical Record Number (MRN) to search for a specific patient.
Optional related resources to include in the live-fetch payload. Currently supports only insurances. Accepts either a comma-delimited string or an array of strings.
Example:
"insurances"