正文
获取原文件references/source-manifest-contract.md
SourceManifest is the output contract for haonan-d001-clinical-data-intake.
It is a local restricted artifact and may contain operational path metadata such as filenames. It must not be treated as de-identified data.
Purpose
The manifest describes the package without interpreting clinical meaning. It supports later skills that need to know:
- what files exist;
- which formats are present;
- which files appear structured;
- what columns exist;
- which fields may link patients, encounters, specimens, or orders;
- which surfaces may contain PHI;
- what unsafe or ambiguous content was found;
- what remains unresolved.
Core fields
package_id
Stable identifier derived from the package fingerprint for the current intake snapshot. It is not a patient identifier.
input_root
Contains a local package name and fingerprint. Absolute paths are omitted by design.
files[]
One entry per inventoried file. relative_path is local operational metadata and can itself contain identifiers if a source system used patient names in filenames. Keep the manifest local until PHI review.
structured_tables[]
A header-only/shape-only profile. D001 must not place row samples or patient values here.
candidate_linkage
Suggests possible linkage fields based on names and structural co-occurrence. It does not assert PK/FK validity. D002 must verify uniqueness, cardinality, orphans, and join behavior.
phi_risk_surfaces
Lists column names likely to contain direct identifiers, quasi-identifiers, or narrative text. It does not claim that PHI is present in every listed column.
risks[]
Operational/security findings such as scripts, macro documents, credential files, archives, external symlinks, or a truncated inventory.
unresolved_items[]
Anything D001 could not safely establish.
intake_status
ready_for_schema_profiling: structured sources exist and should proceed to D002.ready_for_phi_gate: no meaningful structured table was found; document/text processing should proceed through D003 first.needs_manual_review: readable package, but intake ambiguity or safety risk requires review.blocked: D001 could not establish a safe/reliable inventory.
Privacy rule
SourceManifest is intentionally value-minimized, not de-identified.
Never add:
- patient-row samples;
- note excerpts;
- names;
- MRNs;
- phone numbers;
- addresses;
- free-text previews;
- credentials.
Versioning
Breaking changes require a new schema_version.
Downstream skills must reject unsupported schema versions rather than guessing.