74cf346453
feat(dc/tool-c): Add missing value imputation feature with 6 methods and MICE
...
Major features:
1. Missing value imputation (6 simple methods + MICE):
- Mean/Median/Mode/Constant imputation
- Forward fill (ffill) and Backward fill (bfill) for time series
- MICE multivariate imputation (in progress, shape issue to fix)
2. Auto precision detection:
- Automatically match decimal places of original data
- Prevent false precision (e.g. 13.57 instead of 13.566716417910449)
3. Categorical variable detection:
- Auto-detect and skip categorical columns in MICE
- Show warnings for unsuitable columns
- Suggest mode imputation for categorical data
4. UI improvements:
- Rename button: "Delete Missing" to "Missing Value Handling"
- Remove standalone "Dedup" and "MICE" buttons
- 3-tab dialog: Delete / Fill / Advanced Fill
- Display column statistics and recommended methods
- Extended warning messages (8 seconds for skipped columns)
5. Bug fixes:
- Fix sessionService.updateSessionData -> saveProcessedData
- Fix OperationResult interface (add message and stats)
- Fix Toolbar button labels and removal
Modified files:
Python: operations/fillna.py (new, 556 lines), main.py (3 new endpoints)
Backend: QuickActionService.ts, QuickActionController.ts, routes/index.ts
Frontend: MissingValueDialog.tsx (new, 437 lines), Toolbar.tsx, index.tsx
Tests: test_fillna_operations.py (774 lines), test scripts and docs
Docs: 5 documentation files updated
Known issues:
- MICE imputation has DataFrame shape mismatch issue (under debugging)
- Workaround: Use 6 simple imputation methods first
Status: Development complete, MICE debugging in progress
Lines added: ~2000 lines across 3 tiers
2025-12-10 13:06:00 +08:00
f4f1d09837
feat(dc/tool-c): Add pivot column ordering and NA handling features
...
Major features:
1. Pivot transformation enhancements:
- Add option to keep unselected columns with 3 aggregation methods
- Maintain original column order after pivot (aligned with source file)
- Preserve pivot value order (first appearance order)
2. NA handling across 4 core functions:
- Recode: Support keep/map/drop for NA values
- Filter: Already supports is_null/not_null operators
- Binning: Support keep/label/assign for NA values (fix nan display)
- Conditional: Add is_null/not_null operators
3. UI improvements:
- Enable column header tooltips with custom header component
- Add closeable alert for 50-row preview
- Fix page scrollbar issues
Modified files:
Python: pivot.py, recode.py, binning.py, conditional.py, main.py
Backend: SessionController, QuickActionController, QuickActionService
Frontend: PivotDialog, RecodeDialog, BinningDialog, ConditionalDialog, DataGrid, index
Status: Ready for testing
2025-12-09 14:40:14 +08:00
75ceeb0653
hotfix(dc/tool-c): Fix compute formula validation and binning NaN serialization
...
Critical fixes:
1. Compute column: Add Chinese comma support in formula validation
- Problem: Formula with Chinese comma failed validation
- Fix: Add Chinese comma character to allowed_chars regex
- Example: Support formulas like 'col1(kg)+ col2,col3'
2. Binning operation: Fix NaN serialization error
- Problem: 'Out of range float values are not JSON compliant: nan'
- Fix: Enhanced NaN/inf handling in binning endpoint
- Added np.inf/-np.inf replacement before JSON serialization
- Added manual JSON serialization with NaN->null conversion
3. Enhanced all operation endpoints for consistency
- Updated conditional, dropna endpoints with same NaN/inf handling
- Ensures all operations return JSON-compliant data
Modified files:
- extraction_service/operations/compute.py: Add Chinese comma to regex
- extraction_service/main.py: Enhanced NaN handling in binning/conditional/dropna
Status: Hotfix complete, ready for testing
2025-12-09 08:45:27 +08:00
91cab452d1
fix(dc/tool-c): Fix special character handling and improve UX
...
Major fixes:
- Fix pivot transformation with special characters in column names
- Fix compute column validation for Chinese punctuation
- Fix recode dialog to fetch unique values from full dataset via new API
- Add column mapping mechanism to handle special characters
Database migration:
- Add column_mapping field to dc_tool_c_sessions table
- Migration file: 20251208_add_column_mapping
UX improvements:
- Darken table grid lines for better visibility
- Reduce column width by 40% with tooltip support
- Insert new columns next to source columns
- Preserve original row order after operations
- Add notice about 50-row preview limit
Modified files:
- Backend: SessionService, SessionController, QuickActionService, routes
- Python: pivot.py, compute.py, recode.py, binning.py, conditional.py
- Frontend: DataGrid, RecodeDialog, index.tsx, ag-grid-custom.css
- Database: schema.prisma, migration SQL
Status: Code complete, database migrated, ready for testing
2025-12-08 23:20:55 +08:00
f729699510
feat(dc): Complete Tool C quick action buttons Phase 1-2 - 7 functions
...
Summary:
- Implement 7 quick action functions (filter, recode, binning, conditional, dropna, compute, pivot)
- Refactor to pre-written Python functions architecture (stable and secure)
- Add 7 Python operations modules with full type hints
- Add 7 frontend Dialog components with user-friendly UI
- Fix NaN serialization issues and auto type conversion
- Update all related documentation
Technical Details:
- Python: operations/ module (filter.py, recode.py, binning.py, conditional.py, dropna.py, compute.py, pivot.py)
- Backend: QuickActionService.ts with 7 execute methods
- Frontend: 7 Dialog components with complete validation
- Toolbar: Enable 7 quick action buttons
Status: Phase 1-2 completed, basic testing passed, ready for further testing
2025-12-08 17:38:08 +08:00
af325348b8
feat(dc): Complete Tool C Day 5 - AI Chat + Ant Design X Integration
...
Summary:
- Upgrade to Ant Design 6.0.1 + install Ant Design X (2.1.0) + X SDK (2.1.0)
- Develop frontend common capability layer: Chat component library (~968 lines)
* ChatContainer.tsx - Core container component
* MessageRenderer.tsx - Message renderer
* CodeBlockRenderer.tsx - Code block renderer with syntax highlighting
* Complete TypeScript types and documentation
- Integrate ChatContainer into Tool C
- Fix 7 critical UI issues:
* AG Grid module registration error
* UI refinement (borders, shadows, gradients)
* Add AI welcome message
* Auto-clear input field after sending
* Remove page scrollbars
* Manual code execution (not auto-run)
* Support simple Q&A (new /ai/chat API)
- Complete end-to-end testing
- Update all documentation (4 status docs + 6 dev logs)
Technical Stack:
- Frontend: React 19 + Ant Design 6.0 + Ant Design X 2.1
- Components: Bubble, Sender from @ant-design/x
- Total code: ~5418 lines
Status: Tool C MVP completed, production ready
2025-12-07 22:02:14 +08:00
2c7ed94161
feat(dc/tool-c): 完成前端基础框架(Day 4 MVP)
...
核心功能:
- 新增Tool C主入口(index.tsx, 258行):状态管理+布局
- 新增Header组件(91行):顶栏+返回按钮+导出
- 新增Toolbar组件(104行):7个快捷按钮+搜索框
- 新增DataGrid组件(111行):AG Grid Community集成
- 新增Sidebar组件(149行):右侧栏骨架版
- 新增API封装(toolC.ts, 218行):8个API方法
- 新增类型定义(types/index.ts, 62行)
AG Grid集成:
- 安装ag-grid-community + ag-grid-react
- Excel风格表格渲染
- 列排序、过滤、调整宽度
- 缺失值高亮显示(红色斜体)
- 数值右对齐
- 自定义Emerald绿色主题(ag-grid-custom.css, 113行)
- 虚拟滚动支持大数据
路由配置:
- 更新dc/index.tsx:新增ToolCModule懒加载
- 更新Portal.tsx:Tool C状态改为ready
- 路径:/data-cleaning/tool-c
API封装(8个方法):
- uploadFile(上传CSV/Excel)
- getSession(获取Session元数据)
- getPreviewData(获取预览数据)
- updateHeartbeat(延长10分钟)
- generateCode(生成代码,不执行)
- executeCode(执行代码)
- processMessage(生成+执行,一步到位)核心API
- getChatHistory(对话历史)
文档更新:
- 新增Day 4前端基础完成总结(213行)
- 更新工具C当前状态文档
- 更新TODO清单(Day 1-4标记完成)
- 更新系统总体设计文档
测试数据准备:
- cqol-demo.csv(21列x313行真实医疗数据)
- G鼓膜穿孔数据.xlsx(备用)
Day 5待完成:
- MessageItem组件(消息渲染)
- CodeBlock组件(Prism.js代码高亮)
- InputArea组件(输入框交互)
- InsightsPanel组件(数据洞察)
- 完善Sidebar(完整Chat交互)
- 端到端测试
影响范围:
- frontend-v2/src/modules/dc/pages/tool-c/*(新增11个文件)
- frontend-v2/src/modules/dc/api/toolC.ts(新增)
- frontend-v2/src/modules/dc/index.tsx(更新路由)
- frontend-v2/src/modules/dc/pages/Portal.tsx(启用Tool C)
- docs/03-业务模块/DC-数据清洗整理/*(文档更新)
- package.json(新增依赖)
Breaking Changes: 无
总代码行数:+1106行(前端基础框架)
Refs: #Tool-C-Day4
2025-12-07 17:40:07 +08:00
f01981bf78
feat(dc/tool-c): 完成AI代码生成服务(Day 3 MVP)
...
核心功能:
- 新增AICodeService(550行):AI代码生成核心服务
- 新增AIController(257行):4个API端点
- 新增dc_tool_c_ai_history表:存储对话历史
- 实现自我修正机制:最多3次智能重试
- 集成LLMFactory:复用通用能力层
- 10个Few-shot示例:覆盖Level 1-4场景
技术优化:
- 修复NaN序列化问题(Python端转None)
- 修复数据传递问题(从Session获取真实数据)
- 优化System Prompt(明确环境信息)
- 调整Few-shot示例(移除import语句)
测试结果:
- 通过率:9/11(81.8%) 达到MVP标准
- 成功场景:缺失值处理、编码、分箱、BMI、筛选、填补、统计、分类
- 待优化:数值清洗、智能去重(已记录技术债务TD-C-006)
API端点:
- POST /api/v1/dc/tool-c/ai/generate(生成代码)
- POST /api/v1/dc/tool-c/ai/execute(执行代码)
- POST /api/v1/dc/tool-c/ai/process(生成并执行,一步到位)
- GET /api/v1/dc/tool-c/ai/history/:sessionId(对话历史)
文档更新:
- 新增Day 3开发完成总结(770行)
- 新增复杂场景优化技术债务(TD-C-006)
- 更新工具C当前状态文档
- 更新技术债务清单
影响范围:
- backend/src/modules/dc/tool-c/*(新增2个文件,更新1个文件)
- backend/scripts/create-tool-c-ai-history-table.mjs(新增)
- backend/prisma/schema.prisma(新增DcToolCAiHistory模型)
- extraction_service/services/dc_executor.py(NaN序列化修复)
- docs/03-业务模块/DC-数据清洗整理/*(5份文档更新)
Breaking Changes: 无
总代码行数:+950行
Refs: #Tool-C-Day3
2025-12-07 16:21:32 +08:00
2348234013
feat(dc/tool-c): Day 2 - Session管理与数据处理完成
...
核心功能:
- 数据库: 创建dc_tool_c_sessions表 (12字段, 3索引)
- 服务层: SessionService (383行), DataProcessService (303行)
- 控制器: SessionController (300行, 6个API端点)
- 路由: 新增6个Session管理路由
- 测试: 7个API测试全部通过 (100%)
技术亮点:
- 零落盘架构: Excel内存解析, OSS存储
- Session管理: 10分钟过期, 心跳延长机制
- 云原生规范: storage/logger/prisma全平台复用
- 完整测试: 上传/预览/完整数据/删除/心跳
文件清单:
- backend/prisma/schema.prisma (新增DcToolCSession模型)
- backend/prisma/migrations/create_tool_c_session.sql
- backend/scripts/create-tool-c-table.mjs
- backend/src/modules/dc/tool-c/services/ (SessionService, DataProcessService)
- backend/src/modules/dc/tool-c/controllers/SessionController.ts
- backend/src/modules/dc/tool-c/routes/index.ts
- backend/test-tool-c-day2.mjs
- docs/03-业务模块/DC-数据清洗整理/00-工具C当前状态与开发指南.md
- docs/03-业务模块/DC-数据清洗整理/06-开发记录/2025-12-06_工具C_Day2开发完成总结.md
代码统计: ~1900行
测试结果: 7/7 通过 (100%)
云原生规范: 完全符合
2025-12-06 22:12:47 +08:00
8be741cd52
docs(dc/tool-c): Complete Tool C MVP planning and TODO list
...
Summary:
- Update Tool C MVP Development Plan (V1.3)
* Clarify Python execution as core feature
* Add 15 real medical data cleaning scenarios (basic/medium/advanced)
* Enhance System Prompt with 10 Few-shot examples
* Discover existing Python service (extraction_service)
* Update to extend existing service instead of rebuilding
- Create Tool C MVP Development TODO List
* 3-week plan with 30 tasks (Day 1-15)
* 4 core milestones with clear acceptance criteria
* Daily checklist and risk management
* Detailed task breakdown for each day
Key Changes:
- Python service: Extend existing extraction_service instead of new setup
- Test scenarios: 15 scenarios (5 basic + 5 medium + 5 advanced)
- Success criteria: Basic >90%, Medium >80%, Advanced >60%, Total >80%
- Development time: Reduced from 3 weeks to 2 weeks (reuse infrastructure)
Status: Planning complete, ready to start Day 1 development
2025-12-06 11:00:44 +08:00
8a17369138
feat(dc): Complete Tool B MVP with full API integration and bug fixes
...
Phase 5: Export Feature
- Add Excel export API endpoint (GET /tasks/:id/export)
- Fix Content-Disposition header encoding for Chinese filenames
- Fix export field order to match template definition
- Export finalResult or resultA as fallback
API Integration Fixes (Phase 1-5):
- Fix API response parsing (return result.data consistently)
- Fix field name mismatch (fileKey -> sourceFileKey)
- Fix Excel parsing bug (range:99 -> slice(0,100))
- Add file upload with Excel parsing (columns, totalRows)
- Add detailed error logging for debugging
LLM Integration Fixes:
- Fix LLM call method: LLMFactory.createLLM -> getAdapter
- Fix adapter interface: generateText -> chat([messages])
- Fix response fields: text -> content, tokensUsed -> usage.totalTokens
- Fix model names: qwen-max -> qwen3-72b
React Infinite Loop Fixes:
- Step2: Remove updateState from useEffect deps
- Step3: Add useRef to prevent Strict Mode double execution
- Step3: Clear interval on API failure (max 3 retries)
- Step4: Add useRef to prevent infinite data loading
- Add cleanup functions to all useEffect hooks
Frontend Enhancements:
- Add comprehensive error handling with user-friendly messages
- Remove debug console.logs (production ready)
- Fix TypeScript type definitions (TaskProgress, ExtractionItem)
- Improve Step4Verify data transformation logic
Backend Enhancements:
- Add detailed logging at each step for debugging
- Add parameter validation in controllers
- Improve error messages with stack traces (dev mode)
- Add export field ordering by template definition
Documentation Updates:
- Update module status: Tool B MVP completed
- Create MVP completion summary (06-开发记录)
- Create technical debt document (07-技术债务)
- Update API documentation with test status
- Update database documentation with verified status
- Update system overview with DC module status
- Document 4 known issues (Excel preprocessing, progress display, etc.)
Testing Results:
- File upload: 9 rows parsed successfully
- Health check: Column validation working
- Dual model extraction: DeepSeek-V3 + Qwen-Max both working
- Processing time: ~49s for 9 records (~5s per record)
- Token usage: ~10k tokens total (~1.1k per record)
- Conflict detection: 1 clean, 8 conflicts (88.9% conflict rate)
- Excel export: Working with proper encoding
Files Changed:
Backend (~500 lines):
- ExtractionController.ts: Add upload endpoint, improve logging
- DualModelExtractionService.ts: Fix LLM call methods, add detailed logs
- HealthCheckService.ts: Fix Excel range parsing
- routes/index.ts: Add upload route
Frontend (~200 lines):
- toolB.ts: Fix API response parsing, add error handling
- Step1Upload.tsx: Integrate upload and health check APIs
- Step2Schema.tsx: Fix infinite loop, load templates from API
- Step3Processing.tsx: Fix infinite loop, integrate progress polling
- Step4Verify.tsx: Fix infinite loop, transform backend data correctly
- Step5Result.tsx: Integrate export API
- index.tsx: Add file metadata to state
Scripts:
- check-task-progress.mjs: Database inspection utility
Docs (~8 files):
- 00-模块当前状态与开发指南.md: Update to v2.0
- API设计文档.md: Mark all endpoints as tested
- 数据库设计文档.md: Update verification status
- DC模块Tool-B开发计划.md: Add MVP completion notice
- DC模块Tool-B开发任务清单.md: Update progress to 100%
- Tool-B-MVP完成总结.md: New completion summary
- Tool-B技术债务清单.md: New technical debt document
- 00-系统当前状态与开发指南.md: Update DC module status
Status: Tool B MVP complete and production ready
2025-12-03 15:07:39 +08:00
5f1e7af92c
feat(dc): Complete Tool B frontend development with UI optimization
...
- Implement Tool B 5-step workflow (upload, schema, processing, verify, result)
- Add back navigation button to Portal
- Optimize Step 2 field list styling to match prototype
- Fix step 3 label: 'dual-blind' to 'dual-model'
- Create API service layer with 7 endpoints
- Integrate Tool B route into DC module
- Add comprehensive TypeScript types
Components (~1100 lines):
- index.tsx: Main Tool B entry with state management
- Step1Upload.tsx: File upload and health check
- Step2Schema.tsx: Smart template configuration
- Step3Processing.tsx: Dual-model extraction progress
- Step4Verify.tsx: Conflict verification workbench
- Step5Result.tsx: Result display
- StepIndicator.tsx: Step progress component
- api/toolB.ts: API service layer
Status: Frontend complete, ready for API integration
2025-12-03 09:36:35 +08:00
33db2687b9
docs(dc): Add 2025-12-02 daily work summary
2025-12-02 21:54:53 +08:00
d4d33528c7
feat(dc): Complete Phase 1 - Portal workbench page development
...
Summary:
- Implement DC module Portal page with 3 tool cards
- Create ToolCard component with decorative background and hover animations
- Implement TaskList component with table layout and progress bars
- Implement AssetLibrary component with tab switching and file cards
- Complete database verification (4 tables confirmed)
- Complete backend API verification (6 endpoints ready)
- Optimize UI to match prototype design (V2.html)
Frontend Components (~715 lines):
- components/ToolCard.tsx - Tool cards with animations
- components/TaskList.tsx - Recent tasks table view
- components/AssetLibrary.tsx - Data asset library with tabs
- hooks/useRecentTasks.ts - Task state management
- hooks/useAssets.ts - Asset state management
- pages/Portal.tsx - Main portal page
- types/portal.ts - TypeScript type definitions
Backend Verification:
- Backend API: 1495 lines code verified
- Database: dc_schema with 4 tables verified
- API endpoints: 6 endpoints tested (templates API works)
Documentation:
- Database verification report
- Backend API test report
- Phase 1 completion summary
- UI optimization report
- Development task checklist
- Development plan for Tool B
Status: Phase 1 completed (100%), ready for browser testing
Next: Phase 2 - Tool B Step 1 and 2 development
2025-12-02 21:53:24 +08:00
f240aa9236
docs(asl): Update module and system status documentation
...
ASL Module Status Update (v1.2 -> v1.3):
- Update development stage: backend completed (Day 2-5)
- Add fulltext-screening backend structure (controllers, services, routes, tests)
- Add 5 new API endpoints for fulltext screening
- Update milestone: Day 4-5 completed (database + batch service + API)
- Mark Day 6-8 as pending (frontend development)
System Status Update (v2.4.0 -> v2.5.0):
- Update ASL module progress across all sections
- Update database schema: 4 tables -> 6 tables (add fulltext screening tables)
- Update API endpoints: 10 -> 15 (add 5 fulltext screening APIs)
- Update backend structure to include fulltext-screening module
- Reflect 2500+ lines of code added in Day 2-5
2025-11-23 11:36:30 +08:00
e28617ab89
docs(asl): Add fulltext screening frontend development plan and technical debt
...
- Create comprehensive frontend development plan (05-全文复筛前端开发计划.md)
- 4 core pages design (Settings, Progress, Workbench, Results)
- 10 feature components and 3 reused components
- Detailed UI/UX specifications with wireframes
- 2.5-day development schedule (Day 6-8)
- Technical implementation guide (PDF upload, progress polling, PDF preview)
- Testing plan (functional, performance, compatibility)
- Update technical debt list (v1.1 -> v1.2)
- Add 10 frontend-related technical debts (debt 11-20)
- PDF annotation feature (medium priority)
- Literature note-taking (medium priority)
- Knowledge base integration (low priority)
- Auto-fetch PDF by PMID/DOI (low priority)
- Highlight AI-cited text in PDF (medium priority)
- WebSocket real-time push (low priority)
- Virtual scrolling optimization (low priority)
- Batch operations (low priority)
- Offline PDF preview (low priority)
- Mobile responsive design (lowest priority)
2025-11-23 11:17:33 +08:00
88cc049fb3
feat(asl): Complete Day 5 - Fulltext Screening Backend API Development
...
- Implement 5 core API endpoints (create task, get progress, get results, update decision, export Excel)
- Add FulltextScreeningController with Zod validation (652 lines)
- Implement ExcelExporter service with 4-sheet report generation (352 lines)
- Register routes under /api/v1/asl/fulltext-screening
- Create 31 REST Client test cases
- Add automated integration test script
- Fix PDF extraction fallback mechanism in LLM12FieldsService
- Update API design documentation to v3.0
- Update development plan to v1.2
- Create Day 5 development record
- Clean up temporary test files
2025-11-23 10:52:07 +08:00
08aa3f6c28
docs: Enforce English-only commit messages to prevent encoding issues
...
Changes:
- Add prominent warning at the beginning of Commit Message section
- Update all commit message examples to English
- Change 'recommended' to 'mandatory' for English usage
- Update best practices section with stronger requirement
- Update all scenario examples (feature/bugfix/architecture)
- Update version history to v1.1
Reason:
- Chinese characters in commit messages cause garbled text in Windows PowerShell
- No encoding configuration can fully resolve this issue
- English commit messages are standard practice in open source projects
Reference: Fixed commit beb7f7f which had garbled Chinese text
2025-11-22 22:27:27 +08:00
beb7f7f559
feat(asl): Implement full-text screening core LLM service and validation system (Day 1-3)
...
Core Components:
- PDFStorageService with Dify/OSS adapters
- LLM12FieldsService with Nougat-first + dual-model + 3-layer JSON parsing
- PromptBuilder for dynamic prompt assembly
- MedicalLogicValidator with 5 rules + fault tolerance
- EvidenceChainValidator for citation integrity
- ConflictDetectionService for dual-model comparison
Prompt Engineering:
- System Prompt (6601 chars, Section-Aware strategy)
- User Prompt template (PICOS context injection)
- JSON Schema (12 fields constraints)
- Cochrane standards (not loaded in MVP)
Key Innovations:
- 3-layer JSON parsing (JSON.parse + json-repair + code block extraction)
- Promise.allSettled for dual-model fault tolerance
- safeGetFieldValue for robust field extraction
- Mixed CN/EN token calculation
Integration Tests:
- integration-test.ts (full test)
- quick-test.ts (quick test)
- cached-result-test.ts (fault tolerance test)
Documentation Updates:
- Development record (Day 2-3 summary)
- Quality assurance strategy (full-text screening)
- Development plan (progress update)
- Module status (v1.1 update)
- Technical debt (10 new items)
Test Results:
- JSON parsing success rate: 100%
- Medical logic validation: 5/5 passed
- Dual-model parallel processing: OK
- Cost per PDF: CNY 0.10
Files: 238 changed, 14383 insertions(+), 32 deletions(-)
Docs: docs/03-涓氬姟妯″潡/ASL-AI鏅鸿兘鏂囩尞/05-寮€鍙戣褰?2025-11-22_Day2-Day3_LLM鏈嶅姟涓庨獙璇佺郴缁熷紑鍙?md
2025-11-22 22:21:12 +08:00
8eef9e0544
feat(asl): Complete Week 4 - Results display and Excel export with hybrid solution
...
Features:
- Backend statistics API (cloud-native Prisma aggregation)
- Results page with hybrid solution (AI consensus + human final decision)
- Excel export (frontend generation, zero disk write, cloud-native)
- PRISMA-style exclusion reason analysis with bar chart
- Batch selection and export (3 export methods)
- Fixed logic contradiction (inclusion does not show exclusion reason)
- Optimized table width (870px, no horizontal scroll)
Components:
- Backend: screeningController.ts - add getProjectStatistics API
- Frontend: ScreeningResults.tsx - complete results page (hybrid solution)
- Frontend: excelExport.ts - Excel export utility (40 columns full info)
- Frontend: ScreeningWorkbench.tsx - add navigation button
- Utils: get-test-projects.mjs - quick test tool
Architecture:
- Cloud-native: backend aggregation reduces network transfer
- Cloud-native: frontend Excel generation (zero file persistence)
- Reuse platform: global prisma instance, logger
- Performance: statistics API < 500ms, Excel export < 3s (1000 records)
Documentation:
- Update module status guide (add Week 4 features)
- Update task breakdown (mark Week 4 completed)
- Update API design spec (add statistics API)
- Update database design (add field usage notes)
- Create Week 4 development plan
- Create Week 4 completion report
- Create technical debt list
Test:
- End-to-end flow test passed
- All features verified
- Performance test passed
- Cloud-native compliance verified
Ref: Week 4 Development Plan
Scope: ASL Module MVP - Title Abstract Screening Results
Cloud-Native: Backend aggregation + Frontend Excel generation
2025-11-21 20:12:38 +08:00
2e8699c217
feat(asl): Week 2 Day 2 - Excel import with template download and intelligent dedup
...
Features:
- feat: Excel template generation and download (with examples)
- feat: Excel file parsing in memory (cloud-native, no disk write)
- feat: Field validation (title + abstract required)
- feat: Smart deduplication (DOI priority + Title fallback)
- feat: Literature preview table with statistics
- feat: Complete submission flow (create project + import literatures)
Components:
- feat: Create excelUtils.ts with full Excel processing toolkit
- feat: Enhance TitleScreeningSettings page with upload/preview/submit
- feat: Update API interface signatures and export unified aslApi object
Dependencies:
- chore: Add xlsx library for Excel file processing
Ref: Week 2 Frontend Development - Day 2
Scope: ASL Module MVP - Title Abstract Screening
Cloud-Native: Memory parsing, no file persistence
2025-11-19 10:24:47 +08:00
3634933ece
refactor(asl): ASL frontend architecture refactoring with left navigation
...
- feat: Create ASLLayout component with 7-module left navigation
- feat: Implement Title Screening Settings page with optimized PICOS layout
- feat: Add placeholder pages for Workbench and Results
- fix: Fix nested routing structure for React Router v6
- fix: Resolve Spin component warning in MainLayout
- fix: Add QueryClientProvider to App.tsx
- style: Optimize PICOS form layout (P+I left, C+O+S right)
- style: Align Inclusion/Exclusion criteria side-by-side
- docs: Add architecture refactoring and routing fix reports
Ref: Week 2 Frontend Development
Scope: ASL module MVP - Title Abstract Screening
2025-11-18 21:51:51 +08:00
e3e7e028e8
feat(platform): Complete platform infrastructure implementation and verification
...
Platform Infrastructure - 8 Core Modules Completed:
- Storage Service (LocalAdapter + OSSAdapter stub)
- Logging System (Winston + JSON format)
- Cache Service (MemoryCache + Redis stub)
- Async Job Queue (MemoryQueue + DatabaseQueue stub)
- Health Check Endpoints (liveness/readiness/detailed)
- Database Connection Pool (with Serverless optimization)
- Environment Configuration Management
- Monitoring Metrics (DB connections/memory/API)
Key Features:
- Adapter Pattern for zero-code environment switching
- Full backward compatibility with legacy modules
- 100% test coverage (all 8 modules verified)
- Complete documentation (11 docs updated)
Technical Improvements:
- Fixed duplicate /health route registration issue
- Fixed TypeScript interface export (export type)
- Installed winston dependency
- Added structured logging with context support
- Implemented graceful shutdown for Serverless
- Added connection pool optimization for SAE
Documentation Updates:
- Platform infrastructure planning (04-骞冲彴鍩虹璁炬柦瑙勫垝.md)
- Implementation report (2025-11-17-骞冲彴鍩虹璁炬柦瀹炴柦瀹屾垚鎶ュ憡.md)
- Verification report (2025-11-17-骞冲彴鍩虹璁炬柦楠岃瘉鎶ュ憡.md)
- Git commit guidelines (06-Git鎻愪氦瑙勮寖.md) - Added commit frequency rules
- Updated 3 core architecture documents
Code Statistics:
- New code: 2,532 lines
- New files: 22
- Updated files: 130+
- Test pass rate: 100% (8/8 modules)
Deployment Readiness:
- Local environment: 鉁?Ready
- Cloud environment: 馃攧 Needs OSS/Redis dependencies
Next Steps:
- Ready to start ASL module development
- Can directly use storage/logger/cache/jobQueue
Tested: Local verification 100% passed
Related: #Platform-Infrastructure
2025-11-18 08:00:41 +08:00
31d555f7bb
docs: Update architecture docs with platform infrastructure details
...
- Add platform infrastructure chapter to frontend-backend architecture design
- Update system architecture document with 6 new infrastructure modules
- Update AI onboarding guide with infrastructure overview
- Link to backend/src/common/README.md for detailed usage guide
Key Updates:
- Storage service (LocalAdapter + OSSAdapter)
- Logging system (Winston + JSON format)
- Cache service (Memory + Redis)
- Async job queue (Memory + Database)
- Health check endpoints
- Monitoring metrics
- Database connection pool
- Environment config management
All modules support zero-code switching between local and cloud environments.
Related: #Platform-Infrastructure
2025-11-17 08:36:10 +08:00
8bba33ac89
feat(platform): Implement platform infrastructure with cloud-native support
...
- Add storage service (LocalAdapter + OSSAdapter stub)
- Add database connection pool with graceful shutdown
- Add logging system with winston (JSON format)
- Add environment config management
- Add async job queue (MemoryQueue + DatabaseQueue stub)
- Add cache service (MemoryCache + RedisCache stub)
- Add health check endpoints for SAE
- Add monitoring metrics for DB, memory, API
Key Features:
- Zero-code switching between local and cloud environments
- Adapter pattern for multi-environment support
- Backward compatible with legacy modules
- Ready for Aliyun Serverless deployment
Related: Platform Infrastructure Planning (docs/09-鏋舵瀯瀹炴柦/04-骞冲彴鍩虹璁炬柦瑙勫垝.md)
2025-11-17 08:31:23 +08:00
a79abf88db
docs(platform): Complete platform infrastructure planning
...
- Create platform infrastructure planning core document (766 lines)
- Update architecture design to support cloud-native deployment
- Update development specs and operations documentation
- Simplify ASL module docs by removing duplicate implementations
New Documents:
- Platform Infrastructure Planning (04-骞冲彴鍩虹璁炬柦瑙勫垝.md)
- Cloud-Native Development Standards (08-浜戝師鐢熷紑鍙戣鑼?md)
- Git Commit Standards (06-Git鎻愪氦瑙勮寖.md)
- Cloud-Native Deployment Guide (03-浜戝師鐢熼儴缃叉灦鏋勬寚鍗?md)
- Daily Summary (2025-11-16 work summary)
Updated Documents (11 files):
- System architecture design docs (3 files)
- Implementation and standards docs (4 files)
- Operations documentation (1 file)
- ASL module planning docs (3 files)
Key Achievements:
- Platform-level infrastructure architecture established
- Zero-code switching between local/cloud environments
- 100% support for 4 PRD deployment modes
- Support for modular product combinations
- 99% efficiency improvement for module development
- Net +1426 lines of quality documentation
Implementation: 2.5 days (20 hours) for 8 infrastructure modules
2025-11-16 21:36:57 +08:00
e52020409c
docs: complete documentation system (250+ files)
...
- System architecture and design documentation
- Business module docs (ASL/AIA/PKB/RVW/DC/SSA/ST)
- ASL module complete design (quality assurance, tech selection)
- Platform layer and common capabilities docs
- Development standards and API specifications
- Deployment and operations guides
- Project management and milestone tracking
- Architecture implementation reports
- Documentation templates and guides
2025-11-16 15:43:55 +08:00
AI Clinical Dev Team
2a4f59b08b
docs: update design docs for general chat
2025-10-12 10:08:27 +08:00
AI Clinical Dev Team
4ea14dc66d
docs: milestone1 completion summary
2025-10-12 10:03:32 +08:00
AI Clinical Dev Team
35bb9d1a16
docs: update progress for Day23-25
2025-10-12 10:01:10 +08:00
AI Clinical Dev Team
35b0c396c3
fix: AgentChatPage dependencies and Spin component warning
2025-10-11 17:30:57 +08:00
AI Clinical Dev Team
74d7e5eff1
docs: add Day 23-24 work summary
2025-10-11 17:11:06 +08:00
AI Clinical Dev Team
239c7ea85e
feat: Day 21-22 - knowledge base frontend completed, fix CORS and file upload issues
...
- Complete knowledge base list and detail pages
- Complete document upload component
- Fix CORS config (add PUT/DELETE method support)
- Fix file upload issues (disabled state and beforeUpload return value)
- Add detailed debug logs (cleaned up)
- Create Day 21-22 completion summary document
2025-10-11 15:40:12 +08:00
AI Clinical Dev Team
1613e4e517
docs: Day 21 completed summary
2025-10-11 13:00:36 +08:00
AI Clinical Dev Team
5bacdc1768
docs: Day 20 completed summary and milestone update
2025-10-11 11:35:12 +08:00
AI Clinical Dev Team
8a4c703128
feat: complete Dify client implementation (Day 19)
...
## Dify 瀹㈡埛绔皝瑁呭畬鎴?鉁?
### 瀹屾垚鐨勫伐浣?
1. 绫诲瀷瀹氫箟 (backend/src/clients/types.ts)
- Dataset, Document, Retrieval 鐩稿叧绫诲瀷
- 瀹屾暣鐨?TypeScript 绫诲瀷瀹氫箟
- 鑷畾涔?DifyError 閿欒绫?
2. DifyClient 鏍稿績绫?(backend/src/clients/DifyClient.ts)
- 鐭ヨ瘑搴撶鐞? createDataset, getDatasets, getDataset, deleteDataset
- 鏂囨。绠$悊: uploadDocumentDirectly, getDocuments, getDocument, deleteDocument
- 鐭ヨ瘑搴撴绱? retrieveKnowledge (鏀寔璇箟鎼滅储銆乼op_k銆佺浉浼煎害闃堝€?
- 杈呭姪鏂规硶: waitForDocumentProcessing, uploadAndProcessDocument
3. 娴嬭瘯鑴氭湰 (backend/src/scripts/test-dify-client.ts)
- 8椤瑰畬鏁存祴璇曞叏閮ㄩ€氳繃
- 娴嬭瘯鑰楁椂绾?5绉? - 楠岃瘉鎵€鏈堿PI鍔熻兘姝e父
### 娴嬭瘯缁撴灉
鉁?娴嬭瘯1: 鍒涘缓鐭ヨ瘑搴?鉁?娴嬭瘯2: 鑾峰彇鐭ヨ瘑搴撳垪琛?(鎵惧埌3涓?
鉁?娴嬭瘯3: 鑾峰彇鐭ヨ瘑搴撹鎯?鉁?娴嬭瘯4: 涓婁紶鏂囨。 (247 tokens)
鉁?娴嬭瘯5: 鑾峰彇鏂囨。鍒楄〃
鉁?娴嬭瘯6: 鐭ヨ瘑搴撴绱?(鐩镐技搴?.4420)
鉁?娴嬭瘯7: 鍒犻櫎鏂囨。
鉁?娴嬭瘯8: 鍒犻櫎鐭ヨ瘑搴?
### 鎶€鏈寒鐐?
- 瀹屽杽鐨勯敊璇鐞嗘満鍒?(axios 鎷︽埅鍣?
- 鏅鸿兘杞绛夊緟鏂囨。澶勭悊瀹屾垚
- FormData 鏂囦欢涓婁紶鏀寔
- 鍗曚緥妯″紡瀵煎嚭
- 鏀寔鑷畾涔夐厤缃?
### 渚濊禆鏇存柊
- form-data: ^4.0.0
- @types/form-data: ^2.5.0
### 閰嶇疆鏇存柊
- DIFY_API_KEY 鏇存柊涓烘湇鍔PI瀵嗛挜
- DIFY_API_URL=http://localhost/v1
### 鏂囨。鏇存柊
- 鏂板: docs/05-姣忔棩杩涘害/Day19-Dify瀹㈡埛绔皝瑁呭畬鎴?md
- 鏇存柊: docs/04-寮€鍙戣鍒?寮€鍙戦噷绋嬬.md (Day 19 鏍囪涓哄畬鎴?
### 涓嬩竴姝?
Day 20-22: 鐭ヨ瘑搴撶鐞嗗姛鑳?- 鏁版嵁搴撹〃璁捐 (KnowledgeBase, Document)
- 鍚庣 CRUD API
- 鍓嶇鐭ヨ瘑搴撶鐞嗛〉闈?- 鏂囨。涓婁紶缁勪欢
---
Progress: 閲岀▼纰?1 (MVP) 90% -> 鐭ヨ瘑搴撶鐞嗗紑鍙戜腑
2025-10-11 10:25:30 +08:00
AI Clinical Dev Team
9acbb0ae2b
feat: complete Dify platform deployment (Day 18)
...
## Dify 閮ㄧ讲瀹屾垚 鉁?
### 瀹屾垚鐨勫伐浣?1. Docker 闀滃儚鍔犻€熷櫒閰嶇疆
- 閰嶇疆 5 涓浗鍐呴暅鍍忔簮
- 澶у箙鎻愬崌涓嬭浇閫熷害鍜屾垚鍔熺巼
2. Dify 闀滃儚鎷夊彇 (鍏?11 涓湇鍔?
- langgenius/dify-api:1.9.1
- langgenius/dify-web:1.9.1
- postgres, redis, weaviate, nginx 绛? - 鎬诲ぇ灏忕害 2GB锛岃€楁椂绾?15 鍒嗛挓
3. Dify 鏈嶅姟鍚姩
- 鉁?nginx (80/443)
- 鉁?api, worker, worker_beat
- 鉁?web (3000)
- 鉁?db (PostgreSQL), redis
- 鉁?weaviate (鍚戦噺鏁版嵁搴?
- 鉁?sandbox, plugin_daemon, ssrf_proxy
4. Dify 鍒濆鍖栭厤缃? - 鍒涘缓绠$悊鍛樿处鍙? - 鍒涘缓搴旂敤: AI Clinical Research
- 鑾峰彇 API Key: app-VZRn0vMXdmltEJkvatHVGv5j
5. 鍚庣鐜閰嶇疆
- DIFY_API_URL=http://localhost/v1
- DIFY_API_KEY 宸查厤缃?
### 鏂囨。鏇存柊
- 鏂板: docs/05-姣忔棩杩涘害/Day18-Dify閮ㄧ讲瀹屾垚.md
- 鏇存柊: docs/04-寮€鍙戣鍒?寮€鍙戦噷绋嬬.md (Day 18 鏍囪涓哄畬鎴?
### 涓嬩竴姝?Day 19-24: 鐭ヨ瘑搴撶郴缁熷紑鍙?- Dify 瀹㈡埛绔皝瑁?- 鐭ヨ瘑搴撶鐞?CRUD
- 鏂囨。涓婁紶涓庡鐞?- @鐭ヨ瘑搴撻泦鎴?- RAG 闂瓟楠岃瘉
---
Progress: 閲岀▼纰?1 (MVP) 85% -> 鐭ヨ瘑搴撶郴缁熷紑鍙戜腑
2025-10-11 08:58:41 +08:00
AI Clinical Dev Team
e11bb3fb5e
docs: Day 14-17 completion summary and milestone 1 completed
2025-10-10 20:54:38 +08:00
AI Clinical Dev Team
8afff23995
docs: Day 12-13 completion summary and milestone update
2025-10-10 20:33:18 +08:00
AI Clinical Dev Team
702e42febb
docs: Day 10-11 completion summary and milestone update
...
- Create Day10-11-Agent Configuration System completion document
- Update development milestone, mark Day 10-11 as completed
- Update overall progress: Milestone 1 reached 80%
- Document detailed agent config features and API endpoints
2025-10-10 20:17:44 +08:00
AI Clinical Dev Team
59522eaab7
docs: Day 8-9 completion summary and milestone update
2025-10-10 19:41:16 +08:00
AI Clinical Dev Team
e9e19064e2
docs: update Day 7 summary and milestone progress
2025-10-10 17:57:10 +08:00
AI Clinical Dev Team
df20300190
docs: add README navigation optimization summary
2025-10-10 17:45:47 +08:00
AI Clinical Dev Team
6f451757f2
docs: optimize README navigation links
2025-10-10 17:44:15 +08:00
AI Clinical Dev Team
63e2b79b7a
docs: Day 6 complete summary and update milestone
2025-10-10 17:24:17 +08:00
AI Clinical Dev Team
0db54b2d31
docs: Day 4-5 complete summary and ready for Day 6
2025-10-10 17:09:43 +08:00
AI Clinical Dev Team
10e33a1c2d
docs: update Dify deployment status - postpone to later, start Day 6
2025-10-10 17:08:09 +08:00
AI Clinical Dev Team
5184269c91
docs: add Dify deployment status report and update milestone
2025-10-10 16:28:57 +08:00
AI Clinical Dev Team
92b0096588
docs: update Day 5 completion status to development milestone
2025-10-10 15:57:18 +08:00
AI Clinical Dev Team
39e14cfb97
feat(backend): Day 5 - backend basic architecture setup completed
2025-10-10 15:56:45 +08:00