visit_note: one row per visit note, holding the note’s metadata (patient, practice, author, sign-off, and timing).visit_note_bullet: one row per line of content within a note, joined to its note byvisit_note_bullet.visit_note_id = visit_note.id.
Note content
A note’s content is stored as bullets invisit_note_bullet. Each bullet has:
- a
categorynaming the section it belongs to (Reason, HPI, Assessment, Plan, Orders, and so on), - a
sequencegiving its order within that section, and - an optional
parent_bullet_id, since bullets can be nested under a parent.
text: the narrative a clinician writes in sections like Reason, HPI, Assessment, and Plan. Other bullets instead reference a separate record (a placed order, an attached or referenced document, or a problem-list item); their text is empty because the content lives in that linked record rather than on the bullet.
How visit notes relate to other data
Visit notes connect to the wider data model through these relationships:Orders placed from a note
Each order table carries two columns naming the note the order was placed from:visit_note_idjoins tovisit_note.id.non_visit_note_idjoins tonon_visit_note.id, for orders placed from a non-visit note such as a phone note.
lab_order, med_order, discontinue_med_order, referral_order, and misc_orders (imaging, cardiac, sleep, and pulmonary orders).
This returns the lab orders placed from each visit note:
- Filter
med_order.origin = 'rx'to count prescriptions. Rows withorigin = 'surescripts'are imported medication history and never carry a note. - Count orders in
misc_orderswithcount(distinct id). The table has one row per order for each test and diagnosis code on it.
Confidential notes
visit_note.confidential and non_visit_note.confidential are true when the note is marked confidential in the chart, and confidential_marked_by_user_id names the user who marked it. This lists confidential visit notes signed in a month:
Reading a note’s content
This returns every content line for a single note, in display order:text; retrieve that content from the related tables described in How visit notes relate to other data.
If you have any questions about this topic please reach out to Elation Support Portal with the subject line HDB - <your_question>