Commit Graph

659 Commits

Author SHA1 Message Date
iven
e3177f262c feat(config): 菜单动态化改造 — 侧边栏从后端 API 加载
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 seed 迁移插入完整菜单树(4 directory + 23 menu = 27 条)
- 新增 GET /api/v1/menus/user 端点(仅需登录,无需 menu.list 权限)
- MainLayout 从 API 动态获取菜单树替换硬编码数组
- 扩展图标映射表覆盖 22 个 Ant Design 图标
- Header 标题从动态菜单数据查找,保留 fallback
2026-04-26 01:55:01 +08:00
iven
2539e5fc44 fix(web): 系统设置 CRUD 修复 — version 乐观锁 + 语言字段映射 + JSON 显示
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- API 层所有 Info/Request 接口添加 version 字段,update 函数传递 version
- delete 函数改为 client.delete(url, { data: { version } }) 发送 JSON body
- LanguageInfo.enabled → is_active,匹配后端 LanguageResp 字段名
- LanguageManager 编辑弹窗简化为只读详情(后端仅支持 is_active 切换)
- SystemSettings 设置值显示改用 JSON.stringify 而非 String()
- SystemSettings updateSetting 发送解析后的 JSON 对象而非字符串
2026-04-26 01:28:13 +08:00
iven
b4735213c5 feat(health): Phase 1 业务改进 — 诊断编码/统计API/体征表合并/积分修复
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
1.1 Dashboard 统计: 新增 3 个统计端点 (patient/consultation/follow-up)
1.2 事件发布: follow_up.overdue + health_data.critical_alert 事件
1.3 体征表合并: vital_signs 添加 source 列, daily_monitoring 委托写入
1.4 实时预警: 创建体征时检测血压/心率/血糖异常并发布事件
1.5 诊断编码: 新建 diagnosis entity/service/handler + ICD-10 支持
1.6 积分过期: expire_points 定时任务 + 修复 r#type 列名问题

修复: points_transaction.r#type → transaction_type 列重命名
修复: consultation_message.sender_type → sender_role SQL 列名
前端: 3 个统计 API 从伪实现改为真实调用
2026-04-26 00:54:56 +08:00
iven
7ab89f5e93 fix(health): 编译错误修复 — 类型不匹配/表名对齐/所有权修正
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- erp-ai entity 表名对齐数据库: ai_prompt/ai_analysis/ai_usage
- stats_service: count() u64 → i64 显式转换
- health_data_service: 危急值检测 i32 比较修正 + req 所有权修复
- points_service: check_version 参数修正
- diagnosis_service: 补充 ActiveModelTrait 导入
- module.rs: start_overdue_checker 参数改为 DatabaseConnection
- module.rs: register_handlers_with_state 避免 move
2026-04-26 00:28:31 +08:00
iven
44e15cd1d1 docs(health): 健康模块业务改进实施计划
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
4 Phase / 28 改进项 / 17+ 新增实体 / 19+ 迁移文件
Phase 1 P0 可信度修复: Dashboard统计/事件发布/体征合并/异常预警/ICD-10/积分过期
Phase 2 P1 核心能力: 随访模板/用药记录/透析方案/体征扩展/消息推送/批量操作/WebSocket
Phase 3 P2 运营增强: Health Score/会员/资源/阈值/LOINC/排班模板/埋点
Phase 4 P3 路线图: 血管通路/风险评分/AI/表单/影像/合规/FHIR
2026-04-25 23:55:11 +08:00
iven
98de5ad3b9 feat(miniprogram): AI 报告查看 — 列表页/详情页/首页入口
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- AI 分析 API service (ai-analysis.ts)
- 报告列表页: 滚动加载 + 状态标签 + 点击详情
- 报告详情页: Markdown 转 HTML + RichText 渲染
- app.config.ts 注册路由
- 首页添加 AI 报告快捷入口
2026-04-25 23:53:01 +08:00
iven
5621dbe273 feat(web): AI 管理端 3 页面 — Prompt/分析历史/用量统计
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- API 封装: prompts.ts / analysis.ts / usage.ts
- AiPromptList: CRUD + 激活/回滚 + AuthButton 权限
- AiAnalysisList: 历史列表 + 行展开查看结果
- AiUsageDashboard: 总次数/类型分布统计卡片
- 菜单注册 + 路由配置 (MainLayout + App.tsx)
2026-04-25 23:44:15 +08:00
iven
69313a177e feat(web): 健康模块 13 页面按钮级权限控制 — AuthButton 包装
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
使用 AuthButton 声明式组件包装健康模块全部操作按钮:
- health.patient.manage: PatientList/PatientDetail/PatientTagManage
- health.appointment.manage: AppointmentList
- health.doctor.manage: DoctorList/DoctorSchedule
- health.follow-up.manage: FollowUpTaskList
- health.consultation.manage: ConsultationList/ConsultationDetail
- health.points.manage: OfflineEventList/PointsProductList/PointsOrderList/PointsRuleList
2026-04-25 23:33:32 +08:00
iven
69dcb8fee7 docs(health): 修正业务分析报告中的数据不准确项
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 事件计数: 14 → 11 设计规格/9 实际发布
- 权限: 12 → 14 描述符 (7 组)
- Web 页面: 13 → 16
- vital_signs/daily_monitoring 重叠度: 80% → 91%
- 修正 message.sent 订阅评估(非功能缺失)
- 透析增加幽灵状态说明
- 修正附录引用路径
2026-04-25 23:28:31 +08:00
iven
d6420f4e27 feat(web): 添加 usePermission hook + AuthButton/AuthGuard 声明式权限组件 2026-04-25 23:24:02 +08:00
iven
9f25112861 feat(web): auth store 添加 permissions 状态,从 JWT 解码提取 2026-04-25 23:23:28 +08:00
iven
78647d6cc4 docs(health): 健康管理模块业务流程合理性分析报告
三专家组(临床业务 + 运营管理 + 产品架构)并行深度审查,
覆盖患者全生命周期、医疗数据管理、预约排班、随访管理、
透析管理、咨询管理、临床决策支持、积分激励、多租户适配、
竞品对比等维度,发现 P0 问题 6 个、P1 缺失 8 个。
2026-04-25 23:22:14 +08:00
iven
876308596a feat(ai): 补全 Prompt CRUD + 分析历史 + 用量统计 handler 和路由
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 替换 list_analysis/get_analysis 空壳为真实查询
- 新增 list_prompts/create_prompt/activate_prompt/rollback_prompt
- 新增 usage_overview/usage_by_type
- 注册 6 个新路由到 AiModule
2026-04-25 23:21:11 +08:00
iven
48d1a84c77 feat(ai): UsageService 补全 get_overview/get_by_type 聚合方法 2026-04-25 22:53:56 +08:00
iven
2a8c707f6d feat(ai): AnalysisService 补全 list/get 查询方法 2026-04-25 22:52:50 +08:00
iven
b2b64ec15d feat(ai): PromptService 补全 list/update/activate/rollback 方法 2026-04-25 22:51:47 +08:00
iven
eb79424305 docs(plan): 切片 3 小程序 AI 报告查看实施计划
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
6 个 Task,2 个 Chunk:
- Chunk 1: API service + 列表页 + 详情页(Taro/React)
- Chunk 2: 路由注册 + 首页入口 + 集成验证
2026-04-25 22:47:33 +08:00
iven
b27a2402fc docs(plan): 切片 2 AI 管理端 3 页面实施计划
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
10 个 Task,3 个 Chunk:
- Chunk 1: 后端 API 补全(PromptService/AnalysisService/UsageService/Handler)
- Chunk 2: 前端 API 封装(3 个 service 文件)
- Chunk 3: 前端 3 管理页面 + 菜单路由 + 集成验证
2026-04-25 22:42:29 +08:00
iven
72592d3d77 fix(web): 链路测试修复 — 健康记录枚举 + 预约名称解析
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- HealthRecordsTab: record_type 从自由文本 Input 改为 Select 枚举
  (checkup/outpatient/inpatient → 体检/门诊/住院),匹配后端校验规则
- AppointmentList: 添加批量患者/医生名称解析,列表不再显示截断 UUID

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:38:46 +08:00
iven
a704ad7606 docs(plan): 切片 1 按钮级权限控制实施计划
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
18 个 Task,2 个 Chunk:
- Chunk 1: 权限基础设施(JWT 解码 + store + hook + 组件)
- Chunk 2: 健康模块 15 页面按钮改造 + 集成验证
2026-04-25 22:31:49 +08:00
iven
46089adbc6 docs(spec): 审查修正功能完善设计规格
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
修正审查发现的 CRITICAL/HIGH 问题:
- 后端 AI 端点空壳:标注需实现,新增 P0a-P0d 后端阶段
- 用户权限数据源缺失:新增 /auth/me/permissions 端点依赖
- 权限码映射修正:积分页面使用 health.points.*
- 组件路径修正:packages/ui-components → apps/web/src/components/
- 小程序路径调整:使用独立 ai-report/ 目录
- 菜单结构修正:扁平结构而非子菜单
- 补充版本回滚机制、安全降级、i18n 前缀约定
2026-04-25 20:30:22 +08:00
iven
d22ad6088a docs(wiki+spec): 项目全景分析 + 功能完善设计规格
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 wiki/erp-ai.md (AI 模块知识库页面)
- 修正 wiki/index.md 数据不一致 (crate 数 16、迁移 55、模块含 ai)
- 更新 wiki/erp-server.md (7 模块注册)
- 新增功能完善设计规格 (按钮权限 + AI 3 页面 + 小程序报告)
2026-04-25 20:22:24 +08:00
iven
d2baacae7e feat(health): Phase 4 跨模块集成与架构优化 — 通知/标签/待办/数据录入
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端:
- erp-message: 添加 appointment.created/confirmed/cancelled 事件监听,自动发送站内通知
- erp-health: 新增 GET /health/patient-tags 标签列表端点 + list_tags service
- wechat-templates: 添加 isTemplateConfigured 运行时校验

前端:
- 新增 Zustand useHealthStore 共享患者/医生名称缓存
- PatientTagManage: UUID 输入替换为 Checkbox 标签选择器
- VitalSignsTab: 添加体征数据录入 Modal (血压/心率/体重/血糖)
- LabReportsTab: 添加化验报告创建 Modal
- HealthRecordsTab: 添加健康记录创建 Modal
- patients API: 添加 TagItem 类型 + listTags 方法

小程序:
- 首页待办事项接入预约和随访 API,替换硬编码 EmptyState
2026-04-25 20:10:50 +08:00
iven
5b520a168c fix(web): Phase 3 前端 UX/i18n 修复 — 名称解析/确认对话框/日历切换/删除替换
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- ConsultationList: 批量解析患者/医生名称替代截断 UUID
- PointsOrderList: 使用 product_name + 批量解析患者/核销人名称
- AppointmentList: 破坏性状态变更添加 Modal.confirm + 取消原因收集
- CalendarView: 添加 onPanelChange 回调支持月份切换
- DoctorSchedule: 日历视图切换月份自动刷新数据
- PointsRuleList: 移除无效删除按钮,Switch 添加启用/停用文字
- PointsProductList: 删除按钮替换为上架/下架 Switch
- PatientSelect: 性别显示中文化 (male→男, female→女)
- VitalSignsChart: API 失败时显示 Alert 错误提示
- PointsOrder 类型: 添加 product_name 字段
2026-04-25 19:49:25 +08:00
iven
e8a794ff69 fix(health): 穷尽审计修复 — 3 CRITICAL + 3 HIGH + 2 MEDIUM
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CRITICAL:
- earn_points 日上限检查用 patient_id 比对 account_id 字段,上限永远不会触发
- verify_order 用 check_version(v, v) 旁路乐观锁,并发核销可能重复
- admin_checkin_event 同样的乐观锁旁路

HIGH:
- FIFO 消费循环改用数据库级 CAS 替代应用层 update_many
- 兑换流程账户余额/库存扣减全部改用 CAS 防并发超卖
- verify_order 改用 update_many + version filter 的原子操作

MEDIUM:
- points_checkin entity 补全 updated_at/updated_by/deleted_at/version 字段
- 新增迁移 m20260425_000055 添加列
- daily_checkin 打卡记录+积分获取+阶梯奖励合并为同一事务
- 删除废弃的 check_streak_bonus 独立函数(被 check_streak_bonus_in_txn 替代)
2026-04-25 19:44:46 +08:00
iven
17085a3e61 fix(health): P1 功能缺陷修复 — 8 项后端+小程序问题
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 管理员订单列表:新增 admin_list_orders 不按 patient_id 过滤
- 分配医生:添加 doctor_profile 存在性验证防止孤立关联
- 标签管理:将软删除+插入包裹在事务中防止标签丢失
- HealthDataProvider:标记为 experimental,改进错误消息
- 预约 CAS:添加注释说明匹配字段与唯一索引的关系
- 小程序 DTO:inputVitalSign 映射 indicator_type 到结构化字段
- 小程序数据隔离:listAppointments/listTasks 添加 patient_id 参数
- 小程序字段名:family-add 修复 birthday → birth_date
2026-04-25 19:37:35 +08:00
iven
b9e794d701 fix(health): P0 关键热修复 — 7 项数据完整性和安全问题
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 逾期随访检查器:on_startup 现在启动定时器 + 立即执行一次
- 积分并发:earn_points 使用数据库级 CAS 替代无效的 check_version
- 签到奖励:check_streak_bonus 包裹在事务中 + CAS 保护
- 活动报名:register_event 包裹在事务中 + CAS 防超员
- 咨询消息:强制 sender_id 为认证用户,防止冒充
- 逾期更新:check_overdue_tasks 现在递增 version 字段
- 趋势生成:添加 365 天范围上限,防止内存溢出
2026-04-25 19:30:02 +08:00
iven
d5950a5179 docs(spec): 全渠道通知与实时架构设计
QA 审查发现的事件消费断裂、无实时推送、微信模板为空等问题。
5 Phase 交付: 通知分发器 → SSE → 微信推送 → WebSocket → HealthDataProvider。
2026-04-25 19:24:37 +08:00
iven
280f65658a feat: 积分商城子页面 + 日常监测 + 统计报表 (Chunk 6)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
小程序 — 积分商城 (3 新页面):
- mall/exchange: 兑换确认 (余额校验/QR码生成)
- mall/orders: 我的订单 (状态筛选/分页/QR展示)
- mall/detail: 积分明细 (余额卡片/收入支出筛选/流水列表)

小程序 — 上报 Tab 改造:
- health/daily-monitoring: 日常监测表单 (血压/体重/血糖/出入量)
- health/index: 增加快捷操作/打卡状态/近期监测卡片
- consultation: 替换占位为咨询列表 (会话/状态/未读)
- profile: 新增积分余额/打卡天数/我的订单/积分明细入口

小程序 — 新增服务:
- services/consultation.ts: 咨询会话 API
- services/points.ts: 扩展兑换/订单/流水 API
- services/health.ts: 扩展日常监测 API

PC 管理端:
- StatisticsDashboard: 统计报表仪表盘 (患者/咨询/随访/积分卡片 + Top10排行 + 快速链接)
- 侧边栏新增统计报表入口 (健康模块首页)
2026-04-25 19:17:11 +08:00
iven
1507ec6036 feat(miniprogram): TabBar 重构 + 积分商城页面 (Chunk 5)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
TabBar: 首页|健康|预约|资讯|我的 → 首页|上报|咨询|商城|我的

新增页面:
- 商城(mall): 积分余额卡片 + 签到 + 商品网格(分类型筛选/分页)
- 咨询(consultation): 占位页(即将上线)

新增服务:
- services/points.ts: 积分账户/签到/商品列表 API

API: getAccount, dailyCheckin, getCheckinStatus, listProducts
2026-04-25 17:44:24 +08:00
iven
7b18a7398d feat(health): 线下活动管理端 CRUD + 积分统计 API + 前端页面 (Chunk 4)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端:
- 线下活动管理: create/update/delete/list/checkin 5 个管理端接口
- 活动签到自动发放积分 (事务内原子操作)
- 积分统计 API: 总发放/总消耗/总过期/活跃账户/Top10排行

前端:
- OfflineEventList: 活动管理页面 (创建/编辑/删除/状态筛选)
- points.ts 扩展: 线下活动 + 统计 API 方法
- 侧边栏新增线下活动入口
2026-04-25 17:34:54 +08:00
iven
eb937d3d02 feat(health): 日常监测后端 + 积分商城 PC 管理页面 (Chunk 3 V2 迭代)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端 - 日常监测:
- 新增 daily_monitoring 表 (血压/体重/血糖/出入量/备注)
- Entity/DTO/Service/Handler 完整 CRUD
- 唯一约束 (patient_id, record_date) 防重复上报

前端 - 积分商城管理 (3 页面):
- PointsRuleList: 积分规则增删改 + 启用禁用
- PointsProductList: 商品管理 + 库存 + 类型筛选
- PointsOrderList: 订单列表 + 扫码核销
- API 模块 points.ts 对接 6 个管理端接口
- 侧边栏新增积分规则/商品管理/订单管理入口
2026-04-25 17:24:32 +08:00
iven
9901d5ce49 fix(ai): 审计问题修复 — 错误映射/性能/SSE/依赖规范化
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- C3: handler 中 .map_err(AppError::Internal) 改为 ? 操作符,
  利用 From<AiError> for AppError 实现正确的 HTTP 状态码映射
- H1: AiState 预构建在 AppState 初始化时,避免每次请求重建
  ClaudeProvider/AnalysisService/PromptService/UsageService
- H3: stream_analyze 的 user_id 参数传递到 created_by/updated_by
- H5: SSE 事件添加 .event("chunk"/"error"/"done") 类型字段
- L3: erp-ai Cargo.toml 依赖改用 workspace 引用
  (reqwest/handlebars/sha2/hex)
- 修复 erp-health 编译错误: points_handler 缺少 ColumnTrait 导入,
  points_service 版本字段部分移动问题
2026-04-25 16:53:01 +08:00
iven
4ab67ba559 feat(health): 积分商城后端完整实现 (Chunk 2 V2 迭代)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 8 张数据库表: points_account/rule/transaction/product/order/checkin + offline_event/registration
- SeaORM Entity: 8 个实体,含完整 Relation 定义
- DTO: 积分规则/商品/订单/签到/线下活动请求响应类型
- Service: FIFO 积分消费、每日打卡(连续奖励)、商品兑换(QR码核销)、线下活动报名
- Handler: 16 个 API 端点 (患者端10 + 管理端6)
- 权限: health.points.list / health.points.manage
- 12个月滚动过期机制
- 审计日志全量覆盖
2026-04-25 16:51:38 +08:00
iven
41dda568a5 feat(ai): SSE 流式分析 Handler 实现 (4 端点 + 历史)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 14:03:29 +08:00
iven
2e555ca72a feat(server): erp-ai 模块集成 — Config/State/路由注册
- 新增 AiConfig 到 AppConfig
- 新增 FromRef<AppState> for AiState
- 注册 AiModule 到 ModuleRegistry
- 合并 AI protected routes
- 修复 sync_module_permissions 只同步 health.% 的 bug

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 14:01:07 +08:00
iven
fada33101c feat(ai): AiState + AiModule (ErpModule impl + 权限 + 路由骨架)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:58:33 +08:00
iven
6d392ae2b5 feat(ai): AnalysisService 核心编排 + PromptService + UsageService
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:57:23 +08:00
iven
e0e4a7f9a1 feat(ai): 数据脱敏服务 + Prompt 模板渲染引擎
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:55:40 +08:00
iven
06f3d08c61 feat(ai): AiProvider trait + Claude SSE 流式实现 + DTO 定义
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:54:49 +08:00
iven
af338e0a70 feat(ai): 添加 SeaORM Entity (ai_prompt/ai_analysis/ai_usage)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:52:47 +08:00
iven
f0e7c4424a feat(db): 添加 ai_prompts / ai_analysis_results / ai_usage_logs 迁移
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:51:50 +08:00
iven
1cff3e526d feat(health): 添加 HealthDataProvider stub 实现
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:50:13 +08:00
iven
eebfaac0d8 feat(core): 新增 HealthDataProvider trait + DTO 定义
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:49:10 +08:00
iven
ec0483ffb1 feat(ai): 创建 erp-ai crate 骨架 + 错误类型
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 13:47:57 +08:00
iven
16c63925ce feat(health): V2 血透专科数据模型 — dialysis_record + lab_report 审阅流程
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 dialysis_record 表和完整 CRUD API(透析日期/体重/血压/超滤量/透析类型/症状)
- ALTER lab_report 增加 source/status/reviewed_by/reviewed_at 字段
- 重命名 lab_report: indicators→items, doctor_interpretation→doctor_notes
- 新增透析记录审阅端点 PUT /dialysis-records/{id}/review
- 新增化验报告审阅端点 PUT /patients/{id}/lab-reports/{rid}/review
- 化验报告 items JSON 支持 V2 结构(name/value/unit/reference/is_abnormal)
- 迁移 m000051 含完整 up/down 回滚
- 94 个后端测试全部通过,API 全链路验证通过
2026-04-25 13:45:11 +08:00
iven
2963e7ce63 docs(ai): 实施计划 Chunk 6 (SSE Handler + 端到端验证 + 后续任务)
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
2026-04-25 13:41:23 +08:00
iven
41b17eedad docs(ai): 实施计划 Chunk 5 (Handler/State/Module + erp-server 集成) 2026-04-25 13:40:21 +08:00
iven
6158e79b9c docs(ai): 实施计划 Chunk 4 (AnalysisService 核心编排) 2026-04-25 13:39:26 +08:00
iven
956089bcc8 docs(ai): 实施计划 Chunk 3 (AI Provider + Claude SSE + 脱敏 + Prompt 引擎) 2026-04-25 12:46:55 +08:00