Patient Visit Advocate architecture MVP-01
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
architecture · supabase_json

Patient Visit Advocate architecture MVP-01

architecture artifact · for Patient Visit Advocate · phase MVP-01 · status approved

Planning Surface

Use this to decide what happens next.

Status

approved

Phase

MVP-01

data model
users

Identity and consent settings; no health content in analytics identifiers.

visits

Appointment-level containers for prep, brief, questions, debrief, and memory writes.

qna items

Imported Pocket Advocate Q&A records with source file, sheet, source row id, wave, cluster, category, question, what_to_know, questions_to_ask_provider, what_to_watch_for, revised flag, lint status, review status, and timestamps.

qna clusters

Cluster metadata including wave, specialty/navigation domain, coverage_content flag, disclaimer policy, and recency caveat requirement.

visit briefs

Generated brief versions tied to confirmed intake.

question plans

Generated and user-edited clinician question list.

caregiver access

Explicit, scoped, revocable access grants for shared advocacy.

intake summaries

Editable structured extraction plus optional raw-input reference with short retention.

patient profiles

Self and family/caregiver profiles; supports paid caregiver plan later.

qna lint findings

Per-item compliance findings for directive language, clinical thresholds, drug recommendations, emergency triage specificity, diagnosis implication, comparative claim, and missing required UI tags.

qna import batches

Source ingestion audit metadata: filename, checksum if available, observed sheet row counts, importer version, discrepancy notes, and import timestamp.

post visit debriefs

Structured visit outcome and follow-up items from user notes.

patient memory items

User-confirmed longitudinal facts, unresolved questions, patterns, and context.

content review events

Human review decisions for imported or generated Q&A content before publishing.

legal acknowledgements

User acknowledgement timestamp/version for the exact onboarding disclaimer; accessible for Settings > Legal display.

open questions
idquestion
ARCH-OQ-QNA-001Is the Q&A library the MVP primary surface, or a seed layer for the AI visit-prep/question-generation workflow?
ARCH-OQ-QNA-002Are additional workbook rows hidden, external, or represented outside the extracted sheetData? Verify before estimating ingestion.
Agent Handoff
Start Here

architecture artifact · for Patient Visit Advocate · phase MVP-01 · status approved

Completion Evidence

No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.

Open Questions
  • ARCH-OQ-QNA-001: id: string, question: string
  • ARCH-OQ-QNA-002: id: string, question: string
Structured Payload

Machine-readable source fields

agents
idboundariesresponsibility
intake-agent- No diagnosis - No treatment recommendationsAsk adaptive pre-visit questions and extract structured intake fields from messy user input.
clinical-guardrail-layer- Does not produce diagnosis categories as factsClassify seriousness signals conservatively, enforce medical-safety language, and decide whether escalation copy is required.
question-generator- Questions are framed for clinician discussionGenerate a short prioritized question plan tied to intake fields and user concerns.
translator- Does not simplify away important qualifiersConvert medical language and visit notes into plain English with uncertainty preserved.
memory-writer- User can correct/delete; raw chat is not the primary memoryPersist structured visit history, unresolved questions, medications/context, and user-corrected facts.
data model
users

Identity and consent settings; no health content in analytics identifiers.

visits

Appointment-level containers for prep, brief, questions, debrief, and memory writes.

qna items

Imported Pocket Advocate Q&A records with source file, sheet, source row id, wave, cluster, category, question, what_to_know, questions_to_ask_provider, what_to_watch_for, revised flag, lint status, review status, and timestamps.

qna clusters

Cluster metadata including wave, specialty/navigation domain, coverage_content flag, disclaimer policy, and recency caveat requirement.

visit briefs

Generated brief versions tied to confirmed intake.

question plans

Generated and user-edited clinician question list.

caregiver access

Explicit, scoped, revocable access grants for shared advocacy.

intake summaries

Editable structured extraction plus optional raw-input reference with short retention.

patient profiles

Self and family/caregiver profiles; supports paid caregiver plan later.

qna lint findings

Per-item compliance findings for directive language, clinical thresholds, drug recommendations, emergency triage specificity, diagnosis implication, comparative claim, and missing required UI tags.

qna import batches

Source ingestion audit metadata: filename, checksum if available, observed sheet row counts, importer version, discrepancy notes, and import timestamp.

post visit debriefs

Structured visit outcome and follow-up items from user notes.

open questions
idquestion
ARCH-OQ-QNA-001Is the Q&A library the MVP primary surface, or a seed layer for the AI visit-prep/question-generation workflow?
ARCH-OQ-QNA-002Are additional workbook rows hidden, external, or represented outside the extracted sheetData? Verify before estimating ingestion.
schema version

1.0

launch blockers
idblocker
ARCH-BLOCK-QNA-001Do not implement public Q&A surfaces until data model includes provider-question field, disclaimer rendering, coverage tags, import provenance, lint status, and review status.
ARCH-BLOCK-QNA-002Resolve workbook 1,000+ summary vs 253 observed master rows before full corpus import planning.
agent boundaries
idboundary
qna-generator-boundaryAny generated advocacy question must be a question for a qualified provider or system navigation step, never a clinical directive.
qna-library-boundaryStatic Q&A seed content supports patient education and advocacy; it is not diagnosis, treatment planning, or emergency triage.
source artifacts
idroleartifact id
client-source-referenceclient Q&A and compliance sourcefb647c16-c6de-412b-a46f-56746971cf25
architecture style

AI-first orchestrated workflow with structured artifacts, not a single chatbot transcript.

generation pipeline
  • capture raw intake
  • extract structure
  • run guardrail review
  • user edits extracted structure
  • generate visit brief
  • generate question plan
  • post-visit debrief writes memory
implementation note

Do not start with realtime room mode. Build the prepared-visit loop and memory contract first.

required components
idresponsibility
qna-cardRender Q&A sections and exact persistent non-dismissible footer disclaimer on every expanded Q&A card.
onboarding-legal-gateRequire first-launch acknowledgement of exact client disclaimer text before content access.
coverage-caveat-bannerRender exact recency caveat for coverage-tagged clusters; collapsible only after reading.
qna-importerNormalize workbook rows into Q&A data model while preserving provenance and row-count evidence.
content-compliance-linterFlag risky content patterns before publishing or generated-use approval.
qna-review-queueExpose lint findings and review state so flagged rows cannot silently ship.
security privacy assumptions
  • Treat all health content as sensitive
  • Encrypt at rest where supported
  • Minimize raw transcript retention
  • Separate user-corrected facts from generated inferences
  • Require explicit user action before exporting/sharing
  • Generated memory is not used in future prompts until user-confirmed.
  • Caregiver access is explicit, scoped, revocable, and auditable.
  • Analytics events must never include health text, doctor/location names, question text, brief content, debrief content, or memory content.