feat(health): 随访模板系统 — follow_up_template + template_field 全栈
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

新增随访模板和模板字段两张表及完整 CRUD:
- 迁移 083: follow_up_template + follow_up_template_field
- Entity: 模板(名称/类型/适用范围/状态) + 字段(标签/键名/类型/选项/校验)
- DTO: 创建时内嵌字段列表、更新支持全量替换字段
- Service: 随访类型+字段类型校验、级联软删除
- Handler: 5 端点 + RBAC 权限
- 路由: /api/v1/health/follow-up-templates
This commit is contained in:
iven
2026-04-27 14:40:28 +08:00
parent ca96310a84
commit dc5879228e
13 changed files with 869 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ mod m20260427_000079_add_vital_signs_fields;
mod m20260427_000080_create_medication_record;
mod m20260427_000081_create_dialysis_prescription;
mod m20260427_000082_seed_ai_prompts;
mod m20260427_000083_create_follow_up_template;
pub struct Migrator;
@@ -171,6 +172,7 @@ impl MigratorTrait for Migrator {
Box::new(m20260427_000080_create_medication_record::Migration),
Box::new(m20260427_000081_create_dialysis_prescription::Migration),
Box::new(m20260427_000082_seed_ai_prompts::Migration),
Box::new(m20260427_000083_create_follow_up_template::Migration),
]
}
}