V3.1 QC Engine: - QcExecutor unified entry + D1-D7 dimension engines + three-level aggregation - HealthScoreEngine + CompletenessEngine + ProtocolDeviationEngine + QcAggregator - B4 flexible cron scheduling (project-level cronExpression + pg-boss dispatcher) - Prisma migrations for qc_field_status, event_status, project_stats GCP Business Reports (Phase A - 4 reports): - D1 Eligibility: record_summary full list + qc_field_status D1 overlay - D2 Completeness: data entry rate and missing rate aggregation - D3/D4 Query Tracking: severity distribution from qc_field_status - D6 Protocol Deviation: D6 dimension filtering - 4 frontend table components + ReportsPage 5-tab restructure AI Timeline Enhancement: - SkillRunner outputs totalRules (33 actual rules vs 1 skill) - iitQcCockpitController severity mapping fix (critical->red, warning->yellow) - AiStreamPage expandable issue detail table with Chinese labels - Event label localization (eventLabel from backend) Business-side One-click Batch QC: - DashboardPage batch QC button with SyncOutlined icon - Auto-refresh QcReport cache after batch execution Bug Fixes: - dimension_code -> rule_category in 4 SQL queries - D1 eligibility data source: record_summary full + qc_field_status overlay - Timezone UTC -> Asia/Shanghai (QcReportService toBeijingTime helper) - Pass rate calculation: passed/totalEvents instead of passed/totalRecords Docs: - Update IIT module status with GCP reports and bug fix milestones - Update system status doc v6.6 with IIT progress Tested: Backend compiles, frontend linter clean, batch QC verified Made-with: Cursor
AIA - AI智能问答模块
覆盖临床研究全生命周期的智能助手系统
📚 文档导航
核心文档
| 文档 | 说明 | 重要性 |
|---|---|---|
| 模块当前状态与开发指南 | ⭐⭐⭐⭐⭐ 必读 | 了解模块真实状态 |
| AIA模块PRD | ⭐⭐⭐⭐ | 产品需求文档 |
| 原型图V11 | ⭐⭐⭐⭐⭐ | AgentHub设计(精确还原) |
| 原型图V2 | ⭐⭐⭐⭐ | ChatWorkspace设计 |
开发文档
| 文档 | 说明 |
|---|---|
| 开发计划 | 实施路径 |
| 后端API设计 | 12个API端点 |
| 前端组件设计 | 组件架构 |
🎯 快速开始
访问模块
前端:http://localhost:5173/aia
后端:http://localhost:3000/api/v1/aia
测试账号
需要先登录系统获取token
✨ 核心特性
12个智能体
| 阶段 | 智能体 | ID |
|---|---|---|
| 选题优化 | 科学问题梳理 | TOPIC_01 |
| 选题优化 | PICO梳理 | TOPIC_02 |
| 选题优化 | 选题评价 | TOPIC_03 |
| 方案设计 | 观察指标设计 | DESIGN_04 |
| 方案设计 | 病例报告表设计 | DESIGN_05 |
| 方案设计 | 样本量计算 | DESIGN_06 |
| 方案设计 | 临床研究方案撰写 | DESIGN_07 |
| 方案预评审 | 方法学评审智能体 | REVIEW_08 |
| 数据与统计 | 数据评价与预处理 | TOOL_09(工具类) |
| 数据与统计 | 智能统计分析 | TOOL_10(工具类) |
| 写作助手 | 论文润色 | WRITING_11 |
| 写作助手 | 论文翻译 | WRITING_12 |
V2.0 新特性
- ✅ OpenAI Compatible - 标准流式格式
- ✅ 深度思考展示 - 可折叠展示AI推理过程
- ✅ 现代感UI - 100%还原原型图设计
- ✅ 通用能力复用 - Chat组件可供其他模块使用
- ✅ 流式响应 - 逐字显示,打字机效果
🏗️ 技术架构
前端(React 19)
├── AgentHub(智能体大厅)
│ └── 12个AgentCard
└── ChatWorkspace(对话工作台)
├── Sidebar(会话列表)
└── AIStreamChat(流式对话)
├── ThinkingBlock(深度思考)
└── 输入区(附件+深度思考开关)
后端(Fastify)
├── agentService(智能体配置)
├── conversationService(对话管理)
└── StreamingService(流式响应)
└── OpenAIStreamAdapter(SSE适配器)
📊 当前状态
- 版本: V2.0
- 完成度: 85%
- 测试状态: 核心功能测试通过 ✅
- 部署状态: 开发环境就绪
待完成功能
- 🔜 附件上传与处理
- 🔜 历史消息加载
- 🔜 知识库集成(RAG)
- 🔜 Prompt管理系统对接
🆘 获取帮助
最后更新: 2026-01-14