mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Store an uploaded doctor report / discharge letter and stage extracted structured facts for review. Two models: - InboundDocument: the uploaded document, raw bytes encrypted at rest via the shared AES-256-GCM Bytes codec (content_encrypted), with queryable metadata (kind, mime, size, status, report date). - ExtractedFact: the review-then-confirm staging row — fact type, status, per-field provenance, a confidence score, and a needs-review gate, plus the FHIR-staged payload (stated codes/status only) as JSONB. Wire content_encrypted into the encryption-key rotation registry and the rotation script so a key drop never strands a stored document.