feat(health): 透析方案管理 CRUD — dialysis_prescription 全栈
新增透析方案实体和完整 CRUD: - Entity: 20 字段含抗凝/血管通路/透析参数 - DTO: f64 类型适配 utoipa ToSchema - Service: 抗凝类型 + 血管通路类型校验 - Handler: 5 端点 + RBAC 权限控制 - 路由: /api/v1/health/dialysis-prescriptions
This commit is contained in:
@@ -74,6 +74,9 @@ pub enum HealthError {
|
||||
#[error("告警记录不存在")]
|
||||
AlertNotFound,
|
||||
|
||||
#[error("透析方案不存在")]
|
||||
DialysisPrescriptionNotFound,
|
||||
|
||||
#[error("状态转换无效: {0}")]
|
||||
InvalidStatusTransition(String),
|
||||
|
||||
@@ -109,7 +112,8 @@ impl From<HealthError> for AppError {
|
||||
| HealthError::ThresholdNotFound
|
||||
| HealthError::ConsentNotFound
|
||||
| HealthError::AlertRuleNotFound
|
||||
| HealthError::AlertNotFound => AppError::NotFound(err.to_string()),
|
||||
| HealthError::AlertNotFound
|
||||
| HealthError::DialysisPrescriptionNotFound => 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