Files
AIclinicalresearch/r-statistics-service/tests/test_baseline_table.json
HaHafeng 3446909ff7 feat(ssa): Complete Phase I-IV intelligent dialogue and tool system development
Phase I - Session Blackboard + READ Layer:
- SessionBlackboardService with Postgres-Only cache
- DataProfileService for data overview generation
- PicoInferenceService for LLM-driven PICO extraction
- Frontend DataContextCard and VariableDictionaryPanel
- E2E tests: 31/31 passed

Phase II - Conversation Layer LLM + Intent Router:
- ConversationService with SSE streaming
- IntentRouterService (rule-first + LLM fallback, 6 intents)
- SystemPromptService with 6-segment dynamic assembly
- TokenTruncationService for context management
- ChatHandlerService as unified chat entry
- Frontend SSAChatPane and useSSAChat hook
- E2E tests: 38/38 passed

Phase III - Method Consultation + AskUser Standardization:
- ToolRegistryService with Repository Pattern
- MethodConsultService with DecisionTable + LLM enhancement
- AskUserService with global interrupt handling
- Frontend AskUserCard component
- E2E tests: 13/13 passed

Phase IV - Dialogue-Driven Analysis + QPER Integration:
- ToolOrchestratorService (plan/execute/report)
- analysis_plan SSE event for WorkflowPlan transmission
- Dual-channel confirmation (ask_user card + workspace button)
- PICO as optional hint for LLM parsing
- E2E tests: 25/25 passed

R Statistics Service:
- 5 new R tools: anova_one, baseline_table, fisher, linear_reg, wilcoxon
- Enhanced guardrails and block helpers
- Comprehensive test suite (run_all_tools_test.js)

Documentation:
- Updated system status document (v5.9)
- Updated SSA module status and development plan (v1.8)

Total E2E: 107/107 passed (Phase I: 31, Phase II: 38, Phase III: 13, Phase IV: 25)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 18:53:39 +08:00

37 lines
1.6 KiB
JSON

{
"data_source": {
"type": "inline",
"data": {
"group": ["Drug", "Drug", "Drug", "Drug", "Drug", "Drug", "Drug", "Drug", "Drug", "Drug",
"Drug", "Drug", "Drug", "Drug", "Drug",
"Placebo", "Placebo", "Placebo", "Placebo", "Placebo",
"Placebo", "Placebo", "Placebo", "Placebo", "Placebo",
"Placebo", "Placebo", "Placebo", "Placebo", "Placebo"],
"age": [45, 52, 38, 61, 44, 55, 49, 57, 42, 50,
48, 53, 41, 59, 46,
47, 51, 39, 58, 43, 54, 50, 56, 41, 49,
46, 52, 40, 60, 44],
"sex": ["M", "F", "M", "F", "M", "F", "M", "F", "M", "F",
"M", "M", "F", "F", "M",
"F", "M", "F", "M", "F", "M", "F", "M", "F", "M",
"F", "F", "M", "M", "F"],
"sbp": [130, 142, 125, 155, 128, 148, 135, 152, 127, 140,
132, 145, 126, 150, 133,
128, 138, 122, 150, 126, 142, 135, 148, 124, 136,
130, 140, 120, 153, 127],
"bmi": [24.5, 28.1, 22.3, 30.5, 23.8, 29.2, 25.6, 31.0, 22.0, 27.5,
24.8, 29.5, 21.8, 30.2, 25.1,
23.8, 27.2, 21.5, 29.8, 22.9, 28.5, 26.0, 30.1, 21.2, 26.8,
24.0, 28.8, 20.8, 31.2, 23.5],
"smoking": ["Yes", "No", "Yes", "No", "Yes", "No", "Yes", "No", "Yes", "No",
"Yes", "Yes", "No", "No", "Yes",
"No", "Yes", "No", "Yes", "No", "Yes", "No", "Yes", "No", "Yes",
"No", "No", "Yes", "Yes", "No"]
}
},
"params": {
"group_var": "group",
"analyze_vars": ["age", "sex", "sbp", "bmi", "smoking"]
}
}