Files
AIclinicalresearch/docs/03-业务模块/Redcap/README.md
HaHafeng 96290d2f76 feat(aia): Implement Protocol Agent MVP with reusable Agent framework
Sprint 1-3 Completed (Backend + Frontend):

Backend (Sprint 1-2):
- Implement 5-layer Agent framework (Query->Planner->Executor->Tools->Reflection)
- Create agent_schema with 6 tables (agent_definitions, stages, prompts, sessions, traces, reflexion_rules)
- Create protocol_schema with 2 tables (protocol_contexts, protocol_generations)
- Implement Protocol Agent core services (Orchestrator, ContextService, PromptBuilder)
- Integrate LLM service adapter (DeepSeek/Qwen/GPT-5/Claude)
- 6 API endpoints with full authentication
- 10/10 API tests passed

Frontend (Sprint 3):
- Add Protocol Agent entry in AgentHub (indigo theme card)
- Implement ProtocolAgentPage with 3-column layout
- Collapsible sidebar (Gemini style, 48px <-> 280px)
- StatePanel with 5 stage cards (scientific_question, pico, study_design, sample_size, endpoints)
- ChatArea with sync button and action cards integration
- 100% prototype design restoration (608 lines CSS)
- Detailed endpoints structure: baseline, exposure, outcomes, confounders

Features:
- 5-stage dialogue flow for research protocol design
- Conversation-driven interaction with sync-to-protocol button
- Real-time context state management
- One-click protocol generation button (UI ready, backend pending)

Database:
- agent_schema: 6 tables for reusable Agent framework
- protocol_schema: 2 tables for Protocol Agent
- Seed data: 1 agent + 5 stages + 9 prompts + 4 reflexion rules

Code Stats:
- Backend: 13 files, 4338 lines
- Frontend: 14 files, 2071 lines
- Total: 27 files, 6409 lines

Status: MVP core functionality completed, pending frontend-backend integration testing

Next: Sprint 4 - One-click protocol generation + Word export
2026-01-24 17:29:24 +08:00

4.4 KiB
Raw Blame History

REDCap模块文档

版本: v1.0
最后更新: 2026-01-02
模块状态: 🟢 本地环境已部署API开发中


🚀 快速开始

我想部署REDCap

👉 10-REDCap_Docker部署操作手册.md

这是最核心的文档!包含:

  • 从0到1的完整部署流程
  • Docker文件复用说明
  • 常见问题与解决方案
  • 适用于本地/ECS/医院环境

30分钟完成部署


我遇到问题了

👉 13-部署问题排查手册.md 🔧

基于实际踩坑经验,包含:

  • ERR_CONTENT_DECODING_FAILED解决方案
  • 登录失败CRLF污染解决方案
  • Base URL配置错误修复
  • MySQL连接问题排查

📚 完整文档目录

00-模块概览

01-部署与配置

02-系统配置与运维

  • 🚧 20-REDCap系统配置手册.md规划中
  • 🚧 21-REDCap日常运维手册.md规划中
  • 🚧 22-REDCap升级指南.md规划中

03-API对接与开发

  • 33-REDCap二次开发深度指南.md - External Modules开发
  • 🚧 30-REDCap_API使用指南.md开发中
  • 🚧 31-IIT_Manager与REDCap对接设计.md开发中
  • 🚧 32-REDCap_API_Adapter开发指南.md开发中

04-参考资料

  • 旧版文档存档

📊 当前进度

阶段 状态 完成日期
技术调研 完成 2025-12
部署方案设计 完成 2026-01-01
本地环境部署 完成 2026-01-02
API Adapter开发 进行中 预计2026-01-03
生产环境部署 📅 计划中 待定

访问地址: http://localhost:8080/
管理员账户: Admin / Admin123!


🎯 REDCap在IIT Manager中的角色

IIT Manager Agent (企业微信)
         ↓
    REDCap API Adapter
         ↓
    REDCap系统 (EDC)
         ↓
    研究数据采集与管理

核心功能:

  • 📋 电子数据采集EDC
  • 📊 数据字典管理
  • 🔍 数据质量控制
  • 📈 报表与导出
  • 👥 用户权限管理

🛠️ Docker配置文件位置

所有Docker配置文件都在

AIclinicalresearch/redcap-docker-dev/
├── Dockerfile.redcap          ✅ 100%可复用
├── docker-compose.yml         ⚠️ 需微调
├── docker-compose.prod.yml    ⚠️ 需修改数据库配置
├── docker-entrypoint.sh       ✅ 100%可复用
├── config/
│   ├── apache/redcap.conf     ⚠️ 需修改域名
│   ├── php/php.ini            ✅ 100%可复用
│   └── database.php           ❌ 必须根据环境定制
├── scripts/                   可选辅助脚本
└── .gitattributes             ✅ 100%可复用

详见:10-REDCap_Docker部署操作手册.md


📞 获取帮助


🔄 最近更新

日期 更新内容
2026-01-02 完成本地Docker环境部署
2026-01-02 创建REDCap Docker部署操作手册
2026-01-02 创建部署问题排查手册
2026-01-02 重组文档体系

准备好开始了吗? 👉 开始部署