feat(ai): 定期自动分析定时任务 — 每 24 小时扫描高风险患者
新增 auto_analysis.rs 服务: - 启动后延迟 5 分钟,每 24 小时执行一次 - 查找所有活跃租户中高风险患者(异常体征指标) - 自动调用趋势分析并存储分析结果 - 每租户限制 50 名患者,防止过载 - erp-server main.rs 中注册后台任务
This commit is contained in:
@@ -480,6 +480,10 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
};
|
||||
|
||||
// Start auto trend analysis (every 24h, scans high-risk patients)
|
||||
erp_ai::service::auto_analysis::start_auto_analysis(ai_state.clone());
|
||||
tracing::info!("Auto trend analysis scheduler started");
|
||||
|
||||
// Build shared state
|
||||
let pii_crypto = if config.crypto.kek == "__MUST_SET_VIA_ENV__" {
|
||||
#[cfg(debug_assertions)]
|
||||
|
||||
Reference in New Issue
Block a user