Functional contract
SOAP notes
Clinical record for one visit. Organization-visible on the patient chart; authored at the visit’s Location. Appointments without a visit have no SOAP.
Domain
| Model | What it is |
|---|---|
SoapNote | One per visit. jsonb columns: subjective, objective, assessment, plan |
SoapNoteTemplate | Named Organization template applied to a note |
PatientHistory | Chart timeline: visits, appointments without a visit, diagnostic orders and results |
Lazy find_or_create on first open (not at check-in). Partial notes allowed. No draft or signed/locked state. SOAP is never required for ready-to-bill or checkout.
Structure
- S — CC, HPI, PMHx, social/environmental, dietary, meds/preventatives, ROS
- O — Vitals, PE by system (WNL/abnormal + notes; blank until marked), diagnostics notes, plus visit-linked lab results
- A — Problem list, differentials, working diagnosis, prognosis, progress (rechecks)
- P — Further Dx (visit-linked orders), in-clinic Tx (visit-linked treatment plans), discharge meds, client education, red flags, follow-up
Patient history
GET /app/patients/:id?tab=history, newest first, cross-location. The SOAP tab lists the patient’s visits with their notes.
| Row | When |
|---|---|
| Visit | Every visit; linked appointment time/status as secondary meta (not duplicated) |
| Appointment | Materialized appointments with no visit (scheduled, canceled, no-show) |
| Diagnostic order | Every issued order, including visit-linked ones |
| Diagnostic result | Every reported lab work, linked to its order |
Virtual series slots excluded. Visit rows link to SOAP. The SOAP show page ends with a collapsed Change history (field-level jsonb diffs via SoapNote::AuditChanges).
Routes
| Route | Who | Behavior |
|---|---|---|
GET /app/visits/:visit_id/soap_note | patients.read | Show (creates empty if missing) |
GET …/soap_note/edit, PATCH …/soap_note | soap.manage at visit Location | Edit and save |
POST …/soap_note/apply_previous | soap.manage at visit Location | Copy S/O/A/P from the patient’s most recent other visit note |
POST …/soap_note/apply_template | soap.manage at visit Location | Apply an Organization SoapNoteTemplate |
POST …/soap_note/save_template | soap.manage at visit Location | Save the current note as a named Organization template |
The Visit 360 workspace (/app/visits/:id?tab=soap) embeds the same note with autosave — see Visits. Whiteboard cards open that workspace.
RBAC
Manage: org admin, location admin, veterinarian (at the visit Location). Read: anyone with patients.read. Receptionist reads only.
Out of scope
Voice-to-text, mobile API, note lock/sign, billing Rx fulfillment, SMS from the plan. Photos (captures) are planned on the shared hands-off upload flow.
Full contract: docs/functional/soap-notes.md.