How it works · The data layer

Define the variables first. Write the note from them.

Most systems store a note and try to pull data out of it later. LastPatient’s own database structure defines the variables first, AI fills them from everything that happens in the visit, and the note is written from that record.

Fragments snapping into a structured grid

The structure

A defined structure, filled by AI, checked three ways.

LastPatient’s proprietary database structure defines every variable and the kind of value it holds. The AI is given that structure and has to place what happens in the visit into those variables, nowhere else. Each value is weighed against the structure itself, the patient’s history and the context of the visit.

  1. External rotation

    30°

    1. The database structure

      Consistent: A whole number of degrees, in range

    2. The patient’s history

      Consistent: Up from 20° at the last visit

    3. The visit context

      Consistent: Matches the exam macro and what was heard

    Saved to the record

  2. Laterality

    ?

    1. The database structure

      Consistent: Must be left or right

    2. The patient’s history

      Unclear: Both shoulders treated before

    3. The visit context

      Unclear: Not said, typed or dictated

    Ask at checkout

    Coming later

    Most important question first.

Illustrative values. Asking at checkout is coming later.

Coming laterAnything below the confidence threshold will go to the agentic checkout, where the agent asks for what it needs, most important question first.

Context

The visit is context, not a form.

A follow-up after rotator cuff repair needs different things from a follow-up after an injection. The visit, the procedure, the timing and the patient’s history tell LastPatient which variables matter. The variables themselves come from the database structure.

Context

  • VisitFollow-up
  • AfterInjection
  • Timing6 weeks
  • HistoryPrior MRI

One patient’s record

Defined variables

Illustrative

Diagnosis

primary
glenohumeral osteoarthritis
Source: Heard
laterality
right
Source: From history
severity
moderate
Source: Dictated

Exam

forward elevation
140°
Source: Macro (dot phrase)
external rotation
30°
Source: Macro (dot phrase)
strength
4/5
Source: Typed

Imaging

modality
X-ray
Source: Typed
classification
Walch B2
Source: Dictated
laterality
right
Source: From history

Plan

treatment
physical therapy
Source: Heard
follow-up
6 weeks
Source: Typed
procedure discussed
shoulder replacement
Source: Heard
Illustrative record. LastPatient’s database structure defines each variable; the visit, the patient’s history and what happened at the visit are context for filling it.

One record

Many sources, one record, many outputs.

Every output is a view of the same record, so the note, the codes and the research data can’t drift apart.

Sources

  • The conversation
  • Dictation
  • Typing and clicks
  • Dot phrases
  • The chart

One record

Defined variables

Each visit, stored as variables defined by the proprietary database structure.

Outputs

  • The note
  • The codes
  • Research data
  • Follow-ups

From the room to the record

Captured at the visit. Checked before the note is closed.

  1. 1

    Spoken, typed or dictated

    Capture can listen with the patient’s consent, or the clinician types, clicks, dictates and uses macros (dot phrases) and their own text.

  2. 2

    Placed into the defined structure

    AI places each detail into a variable from LastPatient’s database structure as you go, with the visit as context.

  3. 3

    Confirmed before the note closes

    Today the clinician confirms the variables before closing the note. Coming later: the checkout agent will ask about anything it wasn’t sure of, most important question first.

Provenance

Every value knows where it came from.

Each value keeps a record of its source and who confirmed it, so a value in a note, a code or a study can be traced back to the visit. That record gets richer as the platform grows.

Why structure at the visit

AI can read your notes. It can’t fill in what was never captured.

Can’t recover what was never captured

The details that go missing aren’t random. Pile on more records and you pile on more bias.

Confirmed beats inferred

A value confirmed by the physician is ground truth. One pulled out of a note later is a model’s guess.

Built once

A new study or a new question doesn’t mean reprocessing every record.

Add your own variables

Add your own variables with macros (dot phrases) and your own text, so the detail nobody planned a field for still gets saved.

Where it’s going

Shortcuts learned from how you work.

During onboarding, LastPatient will learn the patterns you repeat. When a visit matches one, the variables collapse to your own text.

Coming later

Your standard visit, in one line

A patient is 2 weeks after a left total knee replacement, and you say “standard 2-week post-op”. The variables collapse to your own text:

  • X-ray your 2-week post-op knee X-ray macro
  • Exam your standard 2-week exam
  • Billing code 99024

The agentic checkout

After the visit, the agent will ask only for what it still needs, most important question first. A question that’s still open, like “undetermined, awaiting CT”, will be saved as data, not treated as an error.

See it on a real visit.

We’ll walk through one of your own visits.