Skip to content

feat: Aortic Valve Area estimation from Arterial Line waveform#2

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/explore-aortic-valve-area-calculation
Draft

feat: Aortic Valve Area estimation from Arterial Line waveform#2
Copilot wants to merge 1 commit intomasterfrom
copilot/explore-aortic-valve-area-calculation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Summary

從手部橈動脈導管 (radial a-line) 波形特徵估算主動脈瓣面積 (AVA) 的完整實現。

背景

主動脈瓣狹窄 (Aortic Stenosis) 是常見的瓣膜性心臟病,金標準診斷為超聲心動圖或心導管。但在 ICU 或手術室中,a-line 常是唯一的連續血流動力學監測工具。A-line 波形中蘊含主動脈瓣狹窄的多個線索:

波形特徵 生理基礎
緩慢收縮上升 (pulsus tardus) 阻塞延遲射出
脈壓降低 (pulsus parvus) 跨狹窄瓣膜的每搏輸出量降低
延長射出時間 (LVET) 心臟須透過更小開口射出更久
收縮面積減少 前向流量積分降低

新增檔案

  1. formulas/derivations/hemodynamics/aortic_valve_area_from_aline.md — 完整數學推導

    • Gorlin 公式 → Hakki 簡化 → Wesseling 脈搏輪廓法 → 波形特徵指數 → 組合公式
  2. examples/aortic_valve_area_aline.py — 實現 5 種方法:

    • Gorlin 公式(血流動力學金標準)
    • Hakki 簡化公式(快速床邊估算)
    • Wesseling 脈搏輪廓分析(從 a-line 計算 SV → CO)
    • 波形特徵提取(upstroke ratio, PP ratio, systolic area fraction, dP/dt index)
    • 經驗回歸模型(結合多個波形指標)
    • 合成波形產生器(用於演示和測試)
  3. tests/test_aortic_valve_area.py — 44 個測試

    • 涵蓋所有類別、方法、邊界條件和合成波形產生器

核心公式

Gorlin 公式:
$$AVA = \frac{CO}{44.3 \times C \times HR \times SEP \times \sqrt{\Delta P_{mean}}}$$

A-line 結合公式:
$$AVA = \frac{k \times A_{sys} \times HR}{Z_{ao} \times 44.3 \times SEP \times \sqrt{\Delta P_{mean}}}$$

驗證結果

  • ruff check — 全部通過
  • pytest tests/ — 114/114 通過(44 新 + 70 既有)
  • Code Review — ✅ 無問題
  • CodeQL — ✅ (5 個 false positive,為 demo print() 語句)

- Add derivation markdown: formulas/derivations/hemodynamics/aortic_valve_area_from_aline.md
- Add example Python script: examples/aortic_valve_area_aline.py
- Add comprehensive tests: tests/test_aortic_valve_area.py (44 tests)

Implements Gorlin formula, Hakki simplification, pulse contour analysis,
waveform feature extraction, and empirical regression model for AVA
estimation from radial a-line waveform data.

Agent-Logs-Url: https://github.com/u9401066/nsforge-mcp/sessions/4ed2569d-5b06-4f80-b4f7-5acbb54f07e6

Co-authored-by: u9401066 <119499895+u9401066@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants