Files
AIclinicalresearch/redcap-docker-dev/scripts/start-redcap.ps1
HaHafeng b47079b387 feat(iit): Phase 1.5 AI对话集成REDCap真实数据完成
- feat: ChatService集成DeepSeek-V3实现AI对话(390行)
- feat: SessionMemory实现上下文记忆(最近3轮对话,170行)
- feat: 意图识别支持REDCap数据查询(关键词匹配)
- feat: REDCap数据注入LLM(queryRedcapRecord, countRedcapRecords, getProjectInfo)
- feat: 解决LLM幻觉问题(基于真实数据回答,明确system prompt)
- feat: 即时反馈(正在查询...提示)
- test: REDCap查询测试通过(test0102项目,10条记录,ID 7患者详情)
- docs: 创建Phase1.5开发完成记录(313行)
- docs: 更新Phase1.5开发计划(标记完成)
- docs: 更新MVP开发任务清单(Phase 1.5完成)
- docs: 更新模块当前状态(60%完成度)
- docs: 更新系统总体设计文档(v2.6)
- chore: 删除测试脚本(test-redcap-query-for-ai.ts, check-env-config.ts)
- chore: 移除REDCap测试环境变量(REDCAP_TEST_*)

技术亮点:
- AI基于REDCap真实数据对话,不编造信息
- 从数据库读取项目配置,不使用环境变量
- 企业微信端测试通过,用户体验良好

测试通过:
-  查询项目记录总数(10条)
-  查询特定患者详情(ID 7)
-  项目信息查询
-  上下文记忆(3轮对话)
-  即时反馈提示

影响范围:IIT Manager Agent模块
2026-01-03 22:48:10 +08:00

48 lines
1.3 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env pwsh
# REDCap Docker环境启动脚本
# 版本v1.0
# 日期2026-01-01
Write-Host "🚀 启动REDCap Docker环境..." -ForegroundColor Cyan
Write-Host ""
# 切换到项目目录
$ScriptDir = Split-Path -Parent $PSCommandPath
$ProjectDir = Split-Path -Parent $ScriptDir
Set-Location $ProjectDir
# 检查Docker是否运行
$dockerRunning = docker info 2>&1 | Select-String "Server Version"
if (-not $dockerRunning) {
Write-Host "❌ Docker未运行。请先启动Docker Desktop。" -ForegroundColor Red
exit 1
}
# 启动容器
docker-compose up -d
if ($LASTEXITCODE -eq 0) {
Write-Host ""
Write-Host "⏳ 等待服务就绪10秒..." -ForegroundColor Yellow
Start-Sleep -Seconds 10
Write-Host ""
Write-Host "✅ REDCap环境已启动" -ForegroundColor Green
Write-Host ""
Write-Host "📋 服务访问地址:" -ForegroundColor Cyan
Write-Host " • REDCap http://localhost:8080" -ForegroundColor White
Write-Host " • phpMyAdmin http://localhost:8081" -ForegroundColor White
Write-Host ""
Write-Host "📊 容器状态:" -ForegroundColor Cyan
docker-compose ps
Write-Host ""
} else {
Write-Host "❌ 启动失败!" -ForegroundColor Red
Write-Host "请检查日志:.\scripts\logs-redcap.ps1" -ForegroundColor Yellow
exit 1
}