Case Study

Smart medical notes builder, a technical case study

Building a field-based clinical notes system that turns structured physician input into readable narrative prose, without free-text chaos.

Free-text clinical notes have a predictable problem. Every physician writes them differently. One is terse and skips context a reviewer needs. Another writes paragraphs that bury the actual finding three sentences in. Multiply that across a clinic with several physicians, and quality reporting and chart review become genuinely hard.

The alternative, rigid fixed templates, has the opposite problem, physicians hate them because real patients don't fit into fixed boxes. I built the Smart Notes Builder for Synectus Medico to sit between those two extremes.

The business problem

Physicians need to produce consistent clinical narrative notes, but free-text fields produce documentation that varies wildly in structure and completeness between providers, which makes chart review, audit, and quality reporting much harder than they need to be.

The solution

A field-based note system where physicians configure structured note fields, each with a type, style, and position, select from saved templates, and the system assembles those structured inputs into readable prose automatically.

Field-based note building

Instead of one large text box, a note is built from discrete fields: chief complaint, findings, assessment, plan, each configured independently. Fields can be reordered by drag-and-drop, and a physician building a note for a specific specialty configures the field set once and reuses it across patients.

This is the part that actually solves the consistency problem. Two physicians using the same field template will produce notes with the same underlying structure, even if their individual writing style differs.

Template import and reuse

Templates capture a field configuration once, saved at the clinic or physician level, and importable into a new patient's note in a single action. A pain management physician's standard exam template gets reused across every relevant patient, adjusted only where that specific case actually differs.

Auto-sync with dirty state detection

Physicians move between patients quickly, and losing a half-written note to an accidental navigation erodes trust in software fast. The notes builder tracks dirty state and auto-syncs changes in the background, without requiring an explicit save action for every keystroke.

This was implemented as a dedicated Redux slice, roughly 200 lines, specifically for the smart notes builder's state: current field values, dirty tracking, template association, and sync status.

Structured input, composed automatically

Chief complaint: cervical strainROM: reduced, cervicalPain level: 6/10

"Patient presents with cervical strain. Range of motion is reduced in the cervical spine. Reported pain level is 6 out of 10."

Smart narrative generation from structured input

The genuinely interesting part: once fields are filled, the system generates readable prose from them automatically. A checkbox selection for "reduced range of motion, cervical" doesn't just sit in the record as raw structured data, it composes into a sentence a reviewer or an attorney reading the final report would recognize as clinical narrative.

Real-time sync via Socket.io keeps a note consistent when a physician and a scribe are both working on the same record, or when a physician switches devices mid-encounter.

The narrative generation rules, in more technical detail

Each field type has its own composition rule. A checkbox field maps to a templated sentence fragment with selected options substituted in. A range-scale field (pain level, 1 to 10) maps to a sentence structure that reads naturally regardless of the number selected. A free-text field within the structured note gets inserted directly, since it's already prose.

The trickiest part was connective tissue between sentences generated from different fields. Simply concatenating them reads choppy, like a list rather than a narrative. Lightweight logic deciding when a new sentence starts a new paragraph, based on field grouping, made a noticeable difference in how natural the final report reads.

Master templates vs per-report instances

A master template defines the field structure and is owned by the clinic or physician, edited rarely. A per-patient report instance is a filled copy of that structure, tied to one specific patient encounter. Editing a master template doesn't retroactively change already-completed patient reports.

FAQ

Conclusion

The core insight behind the Smart Notes Builder is that consistency and physician flexibility aren't actually in conflict, if you separate the structure of a note from its content. Structured fields plus automatic narrative generation gets you documentation that's both fast to produce and consistent enough to actually be useful for review, audit, and external sharing.

Building something similar?

Book a free 30-minute discovery call. No pitch, just a conversation about what you are building and how to approach it right.

Start the Conversation