正文
获取原文件references/decision_logic_traceability.md
Scope
“Decision logic” here means research and governance logic only:
- evidence inclusion/exclusion;
- data-quality gates;
- validation acceptance criteria;
- release holds;
- documentation completeness;
- change-control approval;
- human-review checkpoints.
Do not encode diagnostic, treatment, dosing, triage, alarm, urgency, bedside, or patient-facing logic.
Matrix Purpose
A traceability matrix links each rule to:
- its source and rationale;
- input/precondition;
- deterministic statement;
- bounded output kind;
- verification tests;
- owner and reviewer;
- version and status;
- known limitations and change history.
The matrix documents logic. It does not execute arbitrary expressions.
Allowed Node Types
input_checkdata_quality_gateevidence_rulevalidation_gatedocumentation_gatehuman_reviewrelease_gatemonitoring_gate
Allowed output kinds:
include_evidenceexclude_evidenceflag_for_reviewvalidation_statusdocumentation_statusrelease_holdmonitoring_status
There is deliberately no generic “action” node.
Required Fields
Matrix Metadata
- logic ID and title;
- version/status/owner;
- research-only intended use;
- prohibited uses;
- data level;
- source ledger;
- human-review requirement;
- change summary;
- monitoring and retirement criteria.
Per Node
- unique node ID;
- type;
- precondition/input;
- logic statement in plain language;
- output kind;
- output value;
- source IDs;
- rationale;
- validation tests;
- owner;
- reviewer role;
- status.
Rule-Writing Guidance
Write rules so an independent reviewer can reproduce the result without hidden knowledge.
Good:
If an evidence record lacks a stable citation and retrieval date, set output kind
flag_for_reviewwith valuemissing_source_provenance.
If external validation is absent, set
release_holdtotruefor claims of transportability.
Unsafe and prohibited:
If a person's score is high, trigger an urgent alert.
If a biomarker is positive, recommend a therapy.
Validation Tests
For each node include:
- positive case;
- negative case;
- boundary case;
- missing/invalid input;
- source/version regression;
- expected output;
- reviewer and date.
For the matrix as a whole include:
- unreachable or orphan nodes;
- conflicting outputs;
- cycles;
- missing sources;
- stale versions;
- bypass paths around human review;
- rollback and retirement behavior.
The bundled helper validates identifiers, allowed node/output types, citations, and required review fields, then emits CSV. It does not parse or execute the logic statement. Invalid matrices produce diagnostics without CSV export; --strict also withholds export when review warnings remain.
Change Control
For any change:
- state the reason;
- link new evidence or requirement;
- identify affected nodes and downstream artifacts;
- update tests;
- independently validate;
- record approval;
- define rollout/rollback when applicable;
- retain the previous version;
- update monitoring;
- retire superseded logic explicitly.
Script
python3 scripts/decision_logic_traceability.py \
assets/decision_logic_traceability_template.json
The output is a documentation matrix, not executable clinical logic.