fix(health+dialysis): S2 smoke test 修复 — Entity 表名 + 透析状态转换
- 修复 6 个 Entity table_name 与迁移不匹配: shift, handoff_log, patient_assignment, blind_index, critical_alert, critical_alert_response - 添加透析记录 draft→completed 状态转换 API (PUT /complete) - 修复 family_proxy_service 告警状态过滤 (active→pending/acknowledged) - dev.ps1 添加 RATE_LIMIT__FAIL_CLOSE=false 开发模式 - S2 透析日流程 smoke test 报告
This commit is contained in:
@@ -125,6 +125,24 @@ where
|
||||
Ok(Json(ApiResponse::ok(result)))
|
||||
}
|
||||
|
||||
pub async fn complete_dialysis_record<S>(
|
||||
State(state): State<DialysisState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
Path(record_id): Path<Uuid>,
|
||||
Json(req): Json<ReviewDialysisWithVersion>,
|
||||
) -> Result<Json<ApiResponse<DialysisRecordResp>>, AppError>
|
||||
where
|
||||
DialysisState: FromRef<S>,
|
||||
S: Clone + Send + Sync + 'static,
|
||||
{
|
||||
require_permission(&ctx, "health.dialysis.manage")?;
|
||||
let result = dialysis_service::complete_dialysis_record(
|
||||
&state, ctx.tenant_id, record_id, Some(ctx.user_id), req.version,
|
||||
)
|
||||
.await?;
|
||||
Ok(Json(ApiResponse::ok(result)))
|
||||
}
|
||||
|
||||
pub async fn delete_dialysis_record<S>(
|
||||
State(state): State<DialysisState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
|
||||
Reference in New Issue
Block a user