feat(asl): Complete Tool 4 SR Chart Generator and Tool 5 Meta Analysis Engine
Tool 4 - SR Chart Generator: - PRISMA 2020 flow diagram with Chinese/English toggle (SVG) - Baseline characteristics table (Table 1) - Dual data source: project pipeline API + Excel upload - SVG/PNG export support - Backend: ChartingService with Prisma aggregation - Frontend: PrismaFlowDiagram, BaselineTable, DataSourceSelector Tool 5 - Meta Analysis Engine: - 3 data types: HR (metagen), dichotomous (metabin), continuous (metacont) - Random and fixed effects models - Multiple effect measures: HR / OR / RR - Forest plot + funnel plot (base64 PNG from R) - Heterogeneity statistics: I2, Q, p-value, Tau2 - Data input via Excel upload or project pipeline - R Docker image updated with meta package (13 tools total) - E2E test: 36/36 passed - Key fix: exp() back-transformation for log-scale ratio measures Also includes: - IIT CRA Agent V3.0 routing and AI chat page integration - Updated ASL module status guide (v2.3) - Updated system status guide (v6.3) - Updated R statistics engine guide (v1.4) Tested: Frontend renders correctly, backend APIs functional, E2E tests passed Made-with: Cursor
This commit is contained in:
@@ -619,6 +619,46 @@ export async function exportExtractionResults(
|
||||
return response.blob();
|
||||
}
|
||||
|
||||
// ==================== 工具 4:SR 图表生成器 API ====================
|
||||
|
||||
export async function getChartingPrismaData(
|
||||
projectId: string
|
||||
): Promise<ApiResponse<any>> {
|
||||
return request(`/charting/prisma-data/${projectId}`);
|
||||
}
|
||||
|
||||
export async function getChartingBaselineData(
|
||||
projectId: string
|
||||
): Promise<ApiResponse<any>> {
|
||||
return request(`/charting/baseline-data/${projectId}`);
|
||||
}
|
||||
|
||||
// ==================== 工具 5:Meta 分析引擎 API ====================
|
||||
|
||||
export async function runMetaAnalysis(body: {
|
||||
data: Record<string, unknown>[];
|
||||
params: {
|
||||
data_type: string;
|
||||
model?: string;
|
||||
effect_measure?: string;
|
||||
};
|
||||
}): Promise<any> {
|
||||
return request('/meta-analysis/run', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
}
|
||||
|
||||
export async function getMetaProjectData(
|
||||
projectId: string
|
||||
): Promise<{ rows: any[]; detectedType: string | null; count: number }> {
|
||||
return request(`/meta-analysis/project-data/${projectId}`);
|
||||
}
|
||||
|
||||
export async function getMetaHealthCheck(): Promise<{ rServiceAvailable: boolean }> {
|
||||
return request('/meta-analysis/health');
|
||||
}
|
||||
|
||||
// ==================== 统一导出API对象 ====================
|
||||
|
||||
/**
|
||||
@@ -688,4 +728,13 @@ export const aslApi = {
|
||||
getExtractionResultDetail,
|
||||
reviewExtractionResult,
|
||||
exportExtractionResults,
|
||||
|
||||
// 工具 4:SR 图表生成器
|
||||
getChartingPrismaData,
|
||||
getChartingBaselineData,
|
||||
|
||||
// 工具 5:Meta 分析引擎
|
||||
runMetaAnalysis,
|
||||
getMetaProjectData,
|
||||
getMetaHealthCheck,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user