EvidenceGate
Documents
/
DOC-004
Saved, v0.9
Export
Save version
Engineering
Draft
In review
Approved
Hemnaath
Sai
Both
Versioned case, document, evidence, fact, finding, rule-result, review-action, and run contracts.
Markdown
H2
List
Use # headings, - lists, and plain text. Every save creates a revision.
# Canonical Data and Evidence Contracts ## Contract rules - Identifiers are stable, opaque, and tenant-scoped. - Original observations are immutable. - Corrections create a superseding record. - Unknown is explicit and is not represented as an empty pass value. - Every material fact carries evidence or is marked unsupported. - Every contract includes schema version and creation timestamp. ## Core entities ### Case caseId, tenantId, externalCaseId, workflowType, insurerId, productId, procedureFamily, status, createdAt, createdBy. ### DocumentVersion documentId, versionId, caseId, sourceChannel, filename, mediaType, sha256, pageCount, documentType, classificationConfidence, storageUri, createdAt. ### EvidenceReference evidenceId, versionId, pageNumber, boundingBox, snippet, ocrEngine, ocrConfidence, pageImageHash. ### CandidateFact candidateFactId, caseId, fieldName, typedValue, unit, evidenceId, extractionMethod, modelId, promptVersion, confidence, createdAt. ### NormalizedFact factId, candidateFactId, canonicalValue, codingSystem, normalizationVersion, status, supersedesFactId. ### Finding findingId, caseId, findingType, severity, status, messageKey, factIds, evidenceIds, ruleResultIds, createdAt. ### RuleResult ruleResultId, ruleId, ruleBundleVersion, outcome, inputFactIds, clauseIds, explanationCode, executedAt. ### ReviewAction actionId, packetId, actorId, actionType, targetId, rationale, evidenceIds, createdAt. ## Outcome enums - Pass: all required inputs are present and the deterministic condition evaluates true. - Fail: all required inputs are present and the deterministic condition evaluates false. - Unknown: an input is absent, unsupported, or below the approved confidence threshold. - Not applicable: the published rule explicitly excludes the case. - Error: execution failed and requires retry or manual handling. ## Evidence requirements Material facts include at least one evidence reference. Cross-document contradictions include evidence for every compared value. Rule results include the exact fact IDs, clause IDs, rule version, and execution timestamp. Human overrides include actor, rationale, previous state, new state, and supporting evidence. ## Version pinning Each processing run pins document versions, schema versions, normalization version, model and prompt versions, knowledge snapshot, rule bundle, and packet-template version. A rerun creates a new run and does not overwrite the earlier result.