跳到正文

D004 临床文档结构整理

识别入院记录、病程、出院小结及其他临床文档,整理主诉、现病史、检查和诊疗经过等章节,保留原文位置与来源。

个人 Skill知识加工15 个文件浏览次数 2
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
Required: D003 deidentified_manifest.json Recommended: D003 phi_gate_report.json explicit privacy review decisions for any sanitized_review_required source that should become model-readable Preferred invocation:Privacy r… 阅读本节完整说明
交付内容
Always produce when any supported document surfaces are found: document_structure_manifest.json — text-free handoff manifest document_structure_report.md — aggregate report only document_section_inventory.csv — text-free… 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

README.md

v0.2.0 修复发布

本阶段核心结构化逻辑保持原样;仅纳入统一回归。真实数据集无病历全文,因此本轮没有验证中文全文章节准确率。

D004 is the document-structure layer of the Haonan D-series medical-data pipeline.

It reads only D003-sanitized surfaces and converts narrative clinical documents into auditable StructuredDocument JSON objects with:

  • conservative document type
  • canonical Chinese/English clinical sections
  • exact character offsets
  • source provenance
  • privacy/model-visibility state
  • structural review flags

It intentionally does not extract clinical facts. Diagnosis/symptom/medication/lab/procedure extraction begins in D005.

Quick start

python scripts/structure_documents.py \
  --deidentified-manifest /path/to/d003/deidentified_manifest.json \
  --phi-report /path/to/d003/phi_gate_report.json \
  --output-root ./runs/haonan-d004

If D003 marked free text sanitized_review_required, supply a local privacy review artifact before allowing Codex/D005 to read that text:

python scripts/structure_documents.py \
  --deidentified-manifest /path/to/d003/deidentified_manifest.json \
  --phi-report /path/to/d003/phi_gate_report.json \
  --privacy-review-decisions /path/to/privacy_review_decisions.json \
  --output-root ./runs/haonan-d004

Validate:

python scripts/validate_structure.py \
  ./runs/haonan-d004/<package-id>/document_structure_manifest.json

Self-test:

cd scripts
python self_test.py

Safety posture

D004 uses only the Python standard library, never accesses the network, never installs packages, never executes input code, and never opens the raw pre-D003 source package.

Instruction-like text inside a clinical document is treated as untrusted data and may only generate a security flag.

当前版本:v0.2.1

读取D003数据前校验包级downstream/model gate、清单与报告package一致性、声明的产物摘要和路径边界。blocked/报告缺失/文件篡改立即拒绝。model review_required不等同模型可见许可,仍执行逐文件审核。

以SKILL.md顶部发布合同和references/repair-v0.2.1.md为准,历史自测描述不代表全面临床验收。

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan