1.5 KiB
1.5 KiB
ED Encounters
The ED encounter workflow is a multi-stage clinical documentation flow for emergency visits.
Shape
- Frontend:
public/js/ed-encounters.js. - Backend:
src/routes/edEncounters.js. - Prompts: ED-specific entries in
src/utils/prompts.js. - Helpers: billing suggestions and don't-miss review can run after generated ED output.
Typical Flow
- Capture initial ED context and generate an initial note/stage output.
- Add interval updates as the encounter evolves.
- Consolidate relevant stages into the final ED note.
- Generate MDM/final documentation using the ED finalize prompt.
- Optionally run billing and don't-miss helpers.
- Save or reload the encounter through the shared encounter system.
Design Constraints
- Later stages should not silently overwrite earlier clinical text.
- Regeneration should make it clear which stage is being updated.
- MDM/finalization prompt changes should be conservative and coding-aware.
- Don't-miss output is clinician-facing safety support, not a replacement for clinical judgment.
User Templates
Templates saved under ED-relevant categories can be included through
/api/memories/context and passed as physicianMemories. Legacy
correction_* rows are filtered out.
Testing Checklist
When changing ED behavior:
- Run syntax checks for
public/js/ed-encounters.jsandsrc/routes/edEncounters.js. - Run
npm test. - Manually test stage generation, finalization, save/load, and helper panels in an authenticated session when possible.