PVA Patient Data and AI Contract
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
patient-data-ai-contract · supabase_json

PVA Patient Data and AI Contract

patient-data-ai-contract artifact · for Patient Visit Advocate · phase PVA-SLICE-02 · status approved

Planning Surface

Use this to decide what happens next.

Status

approved

Phase

PVA-SLICE-02

Agent Handoff
Start Here

patient-data-ai-contract artifact · for Patient Visit Advocate · phase PVA-SLICE-02 · status approved

Completion Evidence

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

Artifact Shape
  • phase: id: string, name: string, status: string
  • title: PVA Patient Data and AI Contract
  • source: Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.
  • product: Patient Visit Advocate
  • purpose: Define the minimum data and model boundary needed to move from local prototype to saved memory without rewriting approved M-01 work.
  • done when: 4 items
  • created at: 2026-05-08T14:02:37.874Z
  • created by: atlas-codex
  • project id: 31d7f681-bed2-44e9-9a55-b9fadcbba0da
  • ask model notes: 2 items
  • model io contract: server_mvp: string, local_prototype: string, required_outputs: object, prohibited_outputs: object
  • hard open questions: 5 items
Structured Payload

Machine-readable source fields

phase
id

PVA-SLICE-02

name

Patient Data + AI Contract

status

draft

title

PVA Patient Data and AI Contract

source

Atlas-Codex revised PVA decomp with ask_model critique from Claude and OpenAI; Gemini unavailable/high demand on retry.

product

Patient Visit Advocate

purpose

Define the minimum data and model boundary needed to move from local prototype to saved memory without rewriting approved M-01 work.

done when
  • Approved M-01 entities are not rewritten unnecessarily.
  • Local prototype data states are explicit.
  • Server/model PHI boundary is explicit before server work.
  • Paid memory boundary is implementable without surprising free users.
created at

2026-05-08T14:02:37.874Z

created by

atlas-codex

project id

31d7f681-bed2-44e9-9a55-b9fadcbba0da

ask model notes
  • Claude: this should be a delta from existing approved artifacts, not a rebuild.
  • OpenAI: missing objects include VisitLiveNote, QuestionStatus, QuickExport, and LocalEncryptionKey metadata.
model io contract
server mvp

Before any model call with health text: consent version, retention rule, provider/model, request fields, response schema, logging policy, deletion path, and fallback behavior must be documented.

local prototype

Prefer manual/stubbed/local processing. Real patient text must not leave device unless a controlled consent path exists.

required outputs
  • editable structure
  • uncertainty preserved
  • questions framed for clinician discussion
  • safety flags separated from normal summary fields
  • model/version provenance for generated artifacts
prohibited outputs
  • diagnosis as fact
  • treatment instruction
  • dosage recommendation
  • emergency triage specificity beyond approved escalation guidance
  • certainty that replaces clinician judgment
hard open questions
  • What exact local draft expiry is used in prototype and free app?
  • Will the first prototype use stubbed/manual extraction, browser-local model, or controlled cloud model with synthetic data?
  • Does free account include limited saved history or local-only export only?
  • What copy version owns escalation acknowledgement text?
  • What server-side model provider and data retention terms are acceptable for MVP?
required delta entities
namepurposekey fields
LocalVisitDraftAnonymous on-device visit prep draft before account/server sync.- local_id - state - created_at - expires_at - last_opened_at - deleted_at_optional
RawCaptureOriginal typed/voice-transcribed user input, local-first and short-retention by default.- capture_id - visit_ref - capture_type - text_or_blob_ref - created_at - retention_policy - local_only
StructuredCaptureFieldField-level extracted or user-entered structure with confidence and correction state.- field_id - section - value - source - model_confidence_optional - user_corrected - user_confirmed_at
EscalationEventRecord that serious-symptom copy was triggered and acknowledged without storing unnecessary health text in analytics.- event_id - visit_ref - trigger_category - copy_version - acknowledged_at - stored_locally_or_server
QuickVisitNoteIn-visit or immediate post-visit note tied to question status or debrief.- note_id - visit_ref - question_ref_optional - note_text_ref - created_at - local_only_until_saved
ExportArtifactLocal/generated export package metadata without third-party sharing by default.- export_id - visit_ref - format - sections_included - created_at - user_confirmed_sensitive_share
reuse existing artifacts
  • M-01 Visit Data Model remains the base for PatientProfile, Visit, IntakeSummary, VisitBrief, QuestionPlan, PostVisitDebrief, PatientMemoryItem, ConsentEvent/LegalAcknowledgement, and CaregiverAccess.
  • Architecture MVP-01 remains the base for AI-first workflow boundaries and no-diagnosis/no-treatment constraints.
  • This artifact is a delta contract for local draft state, field-level correction/confidence, escalation events, model I/O, and paid/free storage boundaries.
free paid storage boundary
free local

Local drafts, local exports, and immediate debrief capture. Time-boxed retention should be explicit, recommended 30 days for prototype/free local drafts.

paid memory

Persistent, searchable, reusable, cross-visit PatientMemoryItem and unresolved-question continuity. Generated memory requires user confirmation before reuse.

paid caregiver later

Multiple profiles, sharing, revocable caregiver access, audit log review, delegated prep/follow-up.

free account optional

Possible limited saved visit trial can be tested, but must be clear before implementation.