Skip to main content

Module clinical

Module clinical 

Source
Expand description

Clinical documents / pathology — Restricted, records-first clinical entries.

Implements the master plan’s clinical-document rules (audit CLI-01..13, plan §5):

  • Records-first, manual entry. A ClinicalReport captures what the owner (or a labelled author) actually typed. There is NO parsing of pathology/imaging PDFs here — a mock extractor must never be presented as real parsing. Structured extraction, when it exists, is a separate audited stage that raises its own records; this module only stores hand-entered documents and their attachment metadata.
  • Content-addressed attachments (plan §5). The attachment content is a content-addressed blob stored elsewhere. AttachmentMeta holds only metadata plus the content hash — never the bytes.
  • Honest epistemics. An unconfirmed report is asserted by its author, not observed by a clinician. Only a ClinicianConfirmed report maps to EvidenceType::ClinicianObserved; a Disputed report is surfaced as EpistemicStatus::Disputed. The envelope never launders a self-reported claim into clinician-grade evidence.

Structs§

AttachmentMeta
Metadata for a content-addressed attachment blob (plan §5).
ClinicalReport
A manually-entered clinical document (pathology / imaging / discharge / referral).

Enums§

ClaimEvent
Events that can move a ClaimStatus along its lifecycle.
ClaimStatus
Claim-approval lifecycle for a clinical document.
ClinicalReportType
Category of a manually-entered clinical document.

Functions§

advance_claim
Advance the claim lifecycle for a given event, returning the resulting status.
build_clinical_attachment_envelope
Build the record envelope for an attachment’s metadata. The blob hash is carried both as the content anchor and (redundantly for the graph) as the envelope blob_hash.
build_clinical_report_envelope
Build the record envelope for a clinical report, deriving epistemic/evidence honesty from its claim status. Always Restricted.
clinical_attachment_record_id
record ID.
clinical_attachment_summary
summary.
clinical_report_record_id
record ID.
clinical_report_summary
summary.