面向场景:ED triage + handoff(急诊分诊与交接)。
stpa_tool/
__init__.py
cli.py
schema.py
extract.py
analyze.py
render.py
utils.py
examples/
process_ed_triage.md
case1_delay_ecg.md
case2_wrong_patient_id.md
case3_handoff_missing_allergy.md
tests/
test_extract.py
test_cli_smoke.py
README.md
pyproject.toml
.gitignore
python3.11 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .python -m stpa_tool --helppython -m stpa_tool analyze examples/case1_delay_ecg.md --out outputs/当前初始版本可运行并导出以下文件:
- actors.csv
- steps.csv
- artifacts.csv
- handoff_points.csv
- hazards.csv
- ucas.csv
- control_defects.csv
- constraints_mitigations.csv
- summary.md
pytest -q- 当前为骨架版本,
extract.py为占位实现(返回空列表)。 - 后续可逐步补充实现半自动抽取与风险分析。