feat(rvw): Complete Phase 4-5 - Bug fixes and Word export
Summary: - Fix methodology score display issue in task list (show score instead of 'warn') - Add methodology_score field to database schema - Fix report display when only methodology agent is selected - Implement Word document export using docx library - Update documentation to v3.0/v3.1 Backend changes: - Add methodologyScore to Prisma schema and TaskSummary type - Update reviewWorker to save methodologyScore - Update getTaskList to return methodologyScore Frontend changes: - Install docx and file-saver libraries - Implement handleExportReport with Word generation - Fix activeTab auto-selection based on available data - Add proper imports for docx components Documentation: - Update RVW module status to 90% (Phase 1-5 complete) - Update system status document to v3.0 Tested: All review workflows verified, Word export functional
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# AIclinicalresearch 系统当前状态与开发指南
|
||||
|
||||
> **文档版本:** v2.9
|
||||
> **文档版本:** v3.0
|
||||
> **创建日期:** 2025-11-28
|
||||
> **维护者:** 开发团队
|
||||
> **最后更新:** 2026-01-07
|
||||
> **重大进展:** 🎉 **RVW稿件审查模块开发完成(85%)!** - 后端迁移+数据库扩展+前端重构全部完成
|
||||
> **最后更新:** 2026-01-10
|
||||
> **重大进展:** 🎉 **RVW稿件审查模块开发完成(90%)!** - 后端迁移+数据库扩展+前端重构+Word导出全部完成
|
||||
> **部署状态:** ✅ 生产环境运行中 | 公网地址:http://8.140.53.236/
|
||||
> **文档目的:** 快速了解系统当前状态,为新AI助手提供上下文
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
| **IIT** | IIT Manager Agent | AI驱动IIT研究助手 - 智能质控+REDCap集成 | ⭐⭐⭐⭐⭐ | 🎉 **Phase 1.5完成(60%)- AI对话+REDCap数据集成** | **P0** |
|
||||
| **SSA** | 智能统计分析 | 队列/预测模型/RCT分析 | ⭐⭐⭐⭐⭐ | 📋 规划中 | P2 |
|
||||
| **ST** | 统计分析工具 | 100+轻量化统计工具 | ⭐⭐⭐⭐ | 📋 规划中 | P2 |
|
||||
| **RVW** | 稿件审查系统 | 方法学评估、审稿流程 | ⭐⭐⭐⭐ | ✅ **开发完成(85%)** | P3 |
|
||||
| **RVW** | 稿件审查系统 | 方法学评估、审稿流程、Word导出 | ⭐⭐⭐⭐ | ✅ **开发完成(90%)** | P3 |
|
||||
|
||||
---
|
||||
|
||||
@@ -815,7 +815,7 @@ npm run dev # http://localhost:3000
|
||||
- **总计**:约 85,000 行
|
||||
|
||||
### 模块完成度
|
||||
- ✅ **已完成**:AIA(100%)、平台基础层(100%)、RVW(85%,Phase 1-3完成)
|
||||
- ✅ **已完成**:AIA(100%)、平台基础层(100%)、RVW(90%,Phase 1-5完成,支持Word导出)
|
||||
- 🚧 **开发中**:PKB(90%,核心功能完成)、ASL(80%)、DC(Tool C 98%,Tool B后端100%,Tool B前端0%)、IIT(60%,Phase 1.5完成)
|
||||
- 📋 **未开始**:SSA、ST
|
||||
|
||||
@@ -953,8 +953,8 @@ if (items.length >= 50) {
|
||||
|
||||
---
|
||||
|
||||
**文档版本**:v2.9
|
||||
**最后更新**:2026-01-07
|
||||
**文档版本**:v3.0
|
||||
**最后更新**:2026-01-10
|
||||
**下次更新**:RVW生产环境部署 或 ASL智能文献筛选模块启动
|
||||
|
||||
---
|
||||
@@ -1020,7 +1020,7 @@ if (items.length >= 50) {
|
||||
|
||||
---
|
||||
|
||||
**RVW稿件审查模块开发完成(2026-01-07)**:
|
||||
**RVW稿件审查模块开发完成(2026-01-07 ~ 2026-01-10)**:
|
||||
|
||||
### Phase 1:后端模块迁移与扩展
|
||||
- ✅ 创建 `backend/src/modules/rvw/` 模块结构
|
||||
@@ -1029,24 +1029,36 @@ if (items.length >= 50) {
|
||||
- ✅ 实现批量运行API(batchRunReviewTasks)
|
||||
- ✅ 替换 console.log 为 logger 服务
|
||||
- ✅ 注册 v2 API路由(/api/v2/rvw)
|
||||
- ✅ 实现 pg-boss 异步任务处理(reviewWorker)
|
||||
|
||||
### Phase 2:数据库字段扩展
|
||||
- ✅ 添加 selectedAgents、editorialScore、methodologyStatus 字段
|
||||
- ✅ 添加 selectedAgents、editorialScore、methodologyScore、methodologyStatus 字段
|
||||
- ✅ 添加 picoExtract、isArchived、archivedAt 字段
|
||||
- ✅ 使用 prisma db push 同步到数据库
|
||||
|
||||
### Phase 3:前端重构(frontend-v2)
|
||||
- ✅ 创建 `frontend-v2/src/modules/rvw/index.tsx`(~503行)
|
||||
- ✅ 实现 Dashboard 组件(任务列表、筛选、批量操作)
|
||||
- ✅ 实现 ReportDetail 组件(双标签页切换)
|
||||
- ✅ 创建 `frontend-v2/src/modules/rvw/` 完整模块目录结构
|
||||
- ✅ 实现 Dashboard 页面(任务列表、筛选、批量操作)
|
||||
- ✅ 实现 TaskDetail 组件(审稿进度条、实时状态轮询)
|
||||
- ✅ 实现 EditorialReport/MethodologyReport 组件
|
||||
- ✅ 实现 AgentModal 组件(智能体选择弹窗)
|
||||
- ✅ 注册到 moduleRegistry.ts
|
||||
- ✅ 添加顶部导航"预审稿"入口
|
||||
|
||||
### Phase 4:集成测试与Bug修复(2026-01-10)
|
||||
- ✅ 修复方法学分数不显示问题
|
||||
- ✅ 修复只选方法学时详情页不显示报告问题
|
||||
- ✅ 完整测试单智能体和双智能体审稿流程
|
||||
|
||||
### Phase 5:报告导出(2026-01-10)
|
||||
- ✅ 安装 docx 和 file-saver 库
|
||||
- ✅ 实现 Word 文档导出功能
|
||||
- ✅ 支持结构化报告(标题、基本信息、稿约规范性、方法学评估)
|
||||
|
||||
**技术亮点**:
|
||||
- 🔥 **新旧API兼容**:v1 + v2 API同时运行
|
||||
- 🔥 **智能体可选**:用户可选择运行稿约规范性/方法学/两者
|
||||
- 🔥 **批量操作**:支持多选任务批量运行
|
||||
- 🔥 **异步任务处理**:使用 pg-boss 队列处理长时间审稿任务
|
||||
- 🔥 **Word导出**:使用 docx 库生成专业格式的审稿报告
|
||||
- 🔥 **云原生改造**:使用 logger 服务,遵循开发规范
|
||||
|
||||
**模块进度**:85%完成(Phase 1-3)
|
||||
**模块进度**:90%完成(Phase 1-5)
|
||||
|
||||
Reference in New Issue
Block a user