Doctor-assistant templates with specialty workflows and clinical safety boundaries
Summary
Create a practical doctor-assistant template system for OpenHuman: specialty-specific personas, workflows, safety boundaries, document templates, and privacy defaults that help physicians with administrative, research, and educational work without replacing clinical judgment.
This was requested by an interventional cardiologist setting up a personal assistant for clinical practice, research, correspondence, projects, presentations, files, and hospital/program management.
Product intent
The assistant must not make autonomous clinical decisions or replace a doctor. It should reduce administrative burden, improve organization, and help physicians work with their own information safely.
Scope
- Doctor/professional setup template selectable during onboarding or persona setup.
- Specialty modules for cardiology first, with room for pediatrics, surgery, general practice, psychiatry, and other specialties.
- Configurable physician profile: specialty, working environment, local guidelines, writing preferences, procedure focus, research interests, and administrative responsibilities.
- Clinical workflow templates:
- case organization and differential diagnosis support;
- medical record review and summarization;
- lab/investigation result organization;
- literature and guideline research;
- missing-information, risk, and red-flag checklists;
- referral letters, reports, discharge summaries, and patient instructions;
- procedure planning and follow-up checklists;
- clinical audit, registry, and research assistance;
- presentations and lectures;
- appointments, correspondence, and project organization.
- Local processing and anonymisation defaults for patient-sensitive material.
- A verified library model for future specialty modules created with practicing physicians or professional societies.
Initial specialty example
Interventional cardiology, cardiac devices, structural heart disease, hospital development, research, and clinical programme management.
Acceptance criteria
- [ ] The app can create a doctor-assistant profile from a template without coding.
- [ ] The template includes explicit clinical safety boundaries: assistive only, no autonomous diagnosis/treatment decisions, user remains responsible clinician.
- [ ] The first template includes cardiology/interventional cardiology workflow examples and editable prompts/checklists.
- [ ] Patient-sensitive workflows default to local-first or explicit approval before external processing.
- [ ] Generated clinical documents include a review-required state before any external sending/export workflow.
- [ ] Specialty modules are represented as versioned, reviewable assets rather than hard-coded one-off prompts.
- [ ] The implementing PR includes tests for template loading and safety-policy defaults.
- [ ] Diff coverage >= 80% on changed lines.
Implementation Plan
Triage Assessment
Valid and well-specified feature from maintainer, grounded in direct user feedback from a practicing interventional cardiologist. The doctor-assistant template system is a clear product direction: specialty-specific personas, workflows, safety boundaries, document templates, and privacy defaults. The issue explicitly defines clinical safety boundaries (assistive only, no autonomous diagnosis). NOT a duplicate of #4259 (child companion) -- they address different user segments with different safety constraints.
Proposed Scope
- Doctor/professional setup template selectable during onboarding.
- Cardiology first, with room for additional specialties.
- Configurable physician profile (specialty, environment, guidelines, preferences).
- Clinical workflow templates as outlined in the issue body.
- Local-first and anonymisation defaults for patient-sensitive material.
Implementation Steps
- Template system (
src/openhuman/agent/prompts/profiles/): extend the profile template system from #4253 to support specialty templates. Cardiology template as the first specialty with structured sections. - Clinical safety boundaries: add
assistive_onlysecurity policy preset that blocks agent-to-external-world actions without explicit user approval. Config insrc/openhuman/config/schema/autonomy.rs. - Workflow templates: define structured workflow prompts for each clinical use case (case organization, record summarization, referral letters, etc.). Implemented as editable prompt templates stored in the profile store.
- Local-first defaults: when doctor-assistant template selected, default inference to local model (Ollama), require approval before any cloud inference for patient-related content.
- Document review-required: generated clinical documents get a
draftstate that requires explicit user review before any export/send workflow.
Verification
- Unit:
cargo test --lib config::schema::autonomy-- assistive-only policy. - Integration: create doctor profile from template, verify safety policy defaults.
- E2E: generate a clinical document, confirm it enters
draftstate.
Risks and Open Questions
- New: regulatory compliance considerations for clinical use. The issue correctly limits scope to assistive, non-clinical-decision support.
- Template versioning: specialty modules should be versioned and reviewable assets, not hard-coded prompts.
Acceptance Criteria
- [ ] Doctor-assistant profile created from template without coding.
- [ ] Explicit clinical safety boundaries (assistive only, no autonomous diagnosis).
- [ ] Cardiology workflows included with editable prompts.
- [ ] Patient-sensitive workflows default local-first or require approval.
- [ ] Clinical documents start in review-required state.
Partially shipped — a doctor persona template exists with clinical safety framing. The specialty/workflow system does not.
Verified on main (6be58a9ab).
What landed
app/src/components/settings/panels/persona/personaTemplates.ts ships a doctor template, selectable via PersonaTemplatePicker.tsx in persona setup, and it already encodes the product intent's central constraint — "must not make autonomous clinical decisions or replace a doctor":
personality:
- Careful and precise; accuracy always beats speed.
- Flags uncertainty openly and never guesses at clinical facts.
- Cites sources and reminds the user to verify anything clinical.
- Not a medical device: never presents output as diagnosis or treatment.
voice:
- Lead with the answer, then the reasoning and caveats.
- Use plain, respectful language; define jargon when it helps.
- State how confident you are and what would change the answer.
So the first scope bullet — "Doctor/professional setup template selectable during onboarding or persona setup" — is done, and the safety-boundary requirement is met at the prompt level, which is the right place for it.
What is not built
Everything structural. The shipped template is a prompt-text preset — two fields, personality and voice. It is not a module system:
- Specialty modules (cardiology first, then pediatrics, surgery, GP, psychiatry) — no specialty dimension exists; there is one flat
doctortemplate. - Configurable physician profile (specialty, working environment, local guidelines, writing preferences, procedure focus, research interests, administrative responsibilities) — no structured profile.
- The eleven clinical workflow templates (case organization, record review, lab organization, literature/guideline research, red-flag checklists, referral letters and discharge summaries, procedure planning, audit/registry, presentations, appointments, correspondence) — none exist.
- Local processing and anonymisation defaults for patient-sensitive material — nothing implements this.
- Verified library model for future specialty modules — no such concept.
The one item I would not defer
Anonymisation and local-processing defaults. Every other bullet is a productivity feature that can wait; that one is a safety property, and the gap has a specific shape worth naming: the doctor template changes how the assistant talks but nothing about where patient-identifiable material is processed. A physician who selects "doctor" may reasonably read that as the product having made an accommodation for clinical data. It has not.
If any part of this ships next, it should be that bullet — or, failing that, the template should say plainly that selecting it does not change data handling. Prompt-level caution and data-residency guarantees are different kinds of promise, and the current template only makes the first while being named in a way that implies the second.
Recommendation
Re-scope rather than leave this as one issue. As filed it is a programme of work (specialty modules + 11 workflow templates + profile schema + anonymisation + a library model) and will not be picked up whole. Suggested:
- Anonymisation / local-processing defaults for clinical use — safety, standalone, highest value.
- Structured physician profile (specialty + preferences) extending the persona sections that already exist — the prerequisite for anything specialty-aware.
- Cardiology workflow templates as a concrete first module, once 2 exists.
- Verified specialty-module library — last, and only if 3 proves the shape.
Also worth updating the body to note the doctor template already exists, so nobody rebuilds it.
Leaving open. The requesting physician's core ask — reduce administrative burden without touching clinical judgment — is well served by this direction; the current state just delivers the tone and none of the workflow.
Triage: needs opinion — “Doctor-assistant templates with specialty workflows and clinical safety boundaries” needs a maintainer decision on product scope/priority or fresh reproduction evidence before its status can be settled. Please advise whether to pursue, narrow, or close it.
Thanks. Part of this is in: the persona builder has a doctor template that states the core safety rule (it doesn't make clinical decisions and asks you to verify anything clinical). The specialty-specific workflows, document templates and privacy defaults in this issue aren't built.
That's a larger product area, and it needs a maintainer's decision on scope, especially the safety and privacy requirements, before anyone starts.