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 |
PatientHistory | Timeline of visits + appointments without a visit on the chart |
Lazy find_or_create on first open (not at check-in). Partial notes allowed. No draft or signed/locked state.
Structure
- S — CC, HPI, PMHx, social/environmental, dietary, meds/preventatives, ROS
- O — Vitals/triage, PE by system (WNL/abnormal + notes; blank until marked), diagnostics (free-text plus visit-linked order results)
- A — Problem list, differentials, working diagnosis, prognosis, progress (rechecks)
- P — Further Dx (visit-linked orders), in-clinic Tx, discharge meds, client education, red flags, follow-up
Patient history
On GET /app/patients/:id, newest first:
| Row | When |
|---|---|
| Visit | Every visit; linked appointment time as secondary meta (not duplicated) |
| Appointment | Materialized appointments with no visit (scheduled, canceled, no-show) |
Cross-location. Virtual series slots excluded. Visit rows link to SOAP.
Routes
| Route | Who |
|---|---|
GET /app/visits/:visit_id/soap_note | patients.read |
GET/PATCH …/soap_note/edit | soap.manage at visit Location |
RBAC
Manage: org admin, location admin, veterinarian. Read: anyone with patients.read. Receptionist reads only.
Out of scope
Voice-to-text, mobile API, note lock/sign, billing Rx fulfillment, photos, SMS.
Full contract: docs/functional/soap-notes.md.