feat(health): 随访模板系统 — follow_up_template + template_field 全栈
新增随访模板和模板字段两张表及完整 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:
@@ -77,6 +77,9 @@ pub enum HealthError {
|
||||
#[error("透析方案不存在")]
|
||||
DialysisPrescriptionNotFound,
|
||||
|
||||
#[error("随访模板不存在")]
|
||||
FollowUpTemplateNotFound,
|
||||
|
||||
#[error("状态转换无效: {0}")]
|
||||
InvalidStatusTransition(String),
|
||||
|
||||
@@ -113,7 +116,8 @@ impl From<HealthError> for AppError {
|
||||
| HealthError::ConsentNotFound
|
||||
| HealthError::AlertRuleNotFound
|
||||
| HealthError::AlertNotFound
|
||||
| HealthError::DialysisPrescriptionNotFound => AppError::NotFound(err.to_string()),
|
||||
| HealthError::DialysisPrescriptionNotFound
|
||||
| HealthError::FollowUpTemplateNotFound => AppError::NotFound(err.to_string()),
|
||||
HealthError::ScheduleFull => AppError::Validation(err.to_string()),
|
||||
HealthError::InvalidStatusTransition(s) => AppError::Validation(s),
|
||||
HealthError::VersionMismatch => AppError::VersionMismatch,
|
||||
|
||||
Reference in New Issue
Block a user