Skip to main content
POST
Open an encounter

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.

Minimum string length: 1

Path Parameters

clinic_id
string<uuid>
required

Body

application/json

A visit to open for a patient. It opens a DRAFT note for a clinician to complete: nothing is ordered, prescribed, signed, locked or billed, and no note text can be sent (there is no field for it). The draft appears in the clinic's consultation list for the clinician to finish. clinician_id must be a clinician the clinic lists (see GET …/note-clinicians). The Idempotency-Key header is REQUIRED. Send JSON; a FHIR Encounter body is not accepted.

patient_id
string<uuid>
required
clinician_id
string<uuid>
required
class
enum<string>
Available options:
ambulatory,
emergency,
inpatient,
virtual,
home_health
started_at
string<date-time>
ended_at
string<date-time>

Must not be before started_at.

reason
string

The administrative reason for the visit — not clinical note text.

Required string length: 1 - 500
origin_assistant_name
string

Name of the assistant or connected app that opened the visit.

Maximum string length: 200

Response

Created — a draft visit note awaiting a clinician.

data
object
required

A visit as documented in the clinic: a clinical note seen as a visit — the exposed-field allow-list, field by field. The id is the note's id, so the same visit reads under Notes. It carries the visit's status, dates, administrative reason and clinician only: no note text, title, diagnosis, plan, service, signature or billing is ever exposed here (clinical text is read through Notes). Every encounter is a consultation; triage, ward and appointment records are not encounters in this API. A visit opened through the API is a draft with review_status: pending until a clinician has reviewed it.

idempotent_replay
boolean

Present and true when this Idempotency-Key was already used and the original encounter is returned.