fix: 全面修复 - 实时通讯、报告AI流程、健康概览、用药运动提醒

- SignalR Hub消息持久化+防重复+跨端广播
- 报告VLM+LLM真实AI流程(验证→提取→解读)
- 医生审核页重构(严重程度/建议模板/综合评语)
- 健康概览五合一趋势图(fl_chart+指标切换)
- 用药提醒时区修复+跨午夜+过期提醒
- 运动打卡DayOfWeek映射修复+计划覆盖查询
- 体重与其他四指标同级(Abnormal检查/确认卡牌)
- AI Agent支持多种类多时段批量录入
- 删除硬编码假数据(张三/假医生/假AI解读)
- 随访/报告审核数据链路全部打通
This commit is contained in:
MingNian
2026-06-07 23:04:23 +08:00
parent d0d7d8428d
commit 287eab80a9
67 changed files with 1765 additions and 680 deletions

View File

@@ -67,6 +67,7 @@ public static class HealthDataAgentHandler
record.MetricType = HealthMetricType.Weight;
record.Value = args.TryGetProperty("weight", out var w) ? w.GetDecimal() : null;
record.Unit = "kg";
record.IsAbnormal = false;
break;
default:
return new { success = false, message = $"未知指标类型: {type}" };

View File

@@ -55,11 +55,13 @@ public sealed class PromptManager
1. ////
2. +
3. "120""收缩压还是血糖?"
4.
5.
6.
2. + record_health_data
3. "血压120/80血糖6.2血氧97" record_health_data
4. "早上血压120下午血压130"recorded_at
5. "120""收缩压还是血糖?"
6.
7.
8. record_health_data
- 90-139 mmHg 60-89 mmHg

View File

@@ -7,13 +7,13 @@ public static class DataSeeder
{
public static async Task SeedAsync(AppDbContext db)
{
// 种子医生数据
// 种子医生数据(固定 ID与客户端 fallback 保持一致)
if (!db.Doctors.Any())
{
db.Doctors.AddRange(
new Doctor
{
Id = Guid.NewGuid(),
Id = Guid.Parse("ef0953c9-eb63-4d03-b6d7-050a1897d4a3"),
Name = "王建国",
Title = "主任医师",
Department = "心血管内科",
@@ -22,7 +22,7 @@ public static class DataSeeder
},
new Doctor
{
Id = Guid.NewGuid(),
Id = Guid.Parse("d4148733-b538-4398-af17-0c7592fc0c2d"),
Name = "李芳",
Title = "副主任医师",
Department = "营养科",
@@ -31,7 +31,7 @@ public static class DataSeeder
},
new Doctor
{
Id = Guid.NewGuid(),
Id = Guid.Parse("468b82e2-d95a-4436-bff6-a50eecf99a66"),
Name = "张明",
Title = "主任医师",
Department = "心脏康复科",

View File

@@ -14,6 +14,9 @@ public static class DevDataSeeder
var enabled = config["DEVDATA_ENABLED"]?.ToLowerInvariant();
if (enabled != "true") return;
// 已有任何真实用户时跳过(避免污染真实数据)
if (db.Users.Any(u => u.Phone != "13800000001")) return;
// 检查是否已有测试用户(避免重复填充)
if (db.Users.Any(u => u.Phone == "13800000001")) return;