You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
31 lines
1.2 KiB
import asyncio
|
|
import sys
|
|
import os
|
|
|
|
sys.path.append(os.path.dirname(__file__))
|
|
from qc_engine import qc_manager
|
|
|
|
async def debug_checks():
|
|
report_text = "超声所见:肝内见多发点片状冥想异常高灶。"
|
|
patient_info = {"sex": "男", "age": "36"}
|
|
examine_part = "肝胆"
|
|
|
|
print("--- Testing Rule Engine ---")
|
|
findings = qc_manager.rule_engine.run_checks(report_text, patient_info, examine_part)
|
|
print("Rule Findings:", findings)
|
|
# Test 3: Lateral Mismatch (User Case)
|
|
report_text_side = """超声所见:
|
|
两侧肺野内肺纹理走行、分布大致如常,胸膜无明显增厚与粘连。
|
|
右膝关节髌骨、设骨外侧胫骨平台外侧缘、膝关节诸骨未见明显错位性骨折征象。
|
|
|
|
超声提示:
|
|
胸部平扫未见明显异常,随诊;
|
|
左膝关节髌骨、骨外侧错位;
|
|
左膝关节髌上囊积脂血症。"""
|
|
examine_part_side = "胸部平扫 右膝平扫"
|
|
print("\n--- Testing Lateral Mismatch (User Case) ---")
|
|
findings_side = qc_manager.rule_engine.run_checks(report_text_side, patient_info, examine_part_side)
|
|
print("Lateral Findings:", findings_side)
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(debug_checks())
|
|
|