feat(health): 护理计划实体与服务 — Phase 1 关怀引擎 MVP 第一步
新增护理计划(Care Plan)完整 CRUD:3 张表(care_plans / care_plan_items / care_plan_outcomes)、3 个 SeaORM Entity、15 个 API 端点、4 个事件常量、 2 个权限码。支持透析/慢性/预防/康复计划类型,条目分干预/监测/目标/教育四类, 预后测量含基线/目标/当前值追踪。
This commit is contained in:
@@ -8,7 +8,7 @@ use erp_core::module::{ErpModule, PermissionDescriptor};
|
||||
use crate::handler::{
|
||||
action_inbox_handler,
|
||||
alert_handler, alert_rule_handler,
|
||||
appointment_handler, article_category_handler, article_handler, article_tag_handler, consultation_handler, consent_handler, critical_alert_handler, critical_value_threshold_handler, daily_monitoring_handler, device_handler, device_reading_handler, diagnosis_handler, doctor_handler, follow_up_handler, follow_up_template_handler,
|
||||
appointment_handler, article_category_handler, article_handler, article_tag_handler, care_plan_handler, consultation_handler, consent_handler, critical_alert_handler, critical_value_threshold_handler, daily_monitoring_handler, device_handler, device_reading_handler, diagnosis_handler, doctor_handler, follow_up_handler, follow_up_template_handler,
|
||||
health_data_handler, medication_record_handler, medication_reminder_handler, patient_handler, points_handler, stats_handler,
|
||||
vital_signs_daily_handler,
|
||||
};
|
||||
@@ -820,6 +820,38 @@ impl HealthModule {
|
||||
"/health/oauth/clients/{id}/regenerate-secret",
|
||||
axum::routing::post(crate::oauth::handler::regenerate_secret),
|
||||
)
|
||||
// 护理计划
|
||||
.route(
|
||||
"/health/care-plans",
|
||||
axum::routing::get(care_plan_handler::list_care_plans)
|
||||
.post(care_plan_handler::create_care_plan),
|
||||
)
|
||||
.route(
|
||||
"/health/care-plans/{id}",
|
||||
axum::routing::get(care_plan_handler::get_care_plan)
|
||||
.put(care_plan_handler::update_care_plan)
|
||||
.delete(care_plan_handler::delete_care_plan),
|
||||
)
|
||||
.route(
|
||||
"/health/care-plans/{plan_id}/items",
|
||||
axum::routing::get(care_plan_handler::list_care_plan_items)
|
||||
.post(care_plan_handler::create_care_plan_item),
|
||||
)
|
||||
.route(
|
||||
"/health/care-plans/{plan_id}/items/{item_id}",
|
||||
axum::routing::put(care_plan_handler::update_care_plan_item)
|
||||
.delete(care_plan_handler::delete_care_plan_item),
|
||||
)
|
||||
.route(
|
||||
"/health/care-plans/{plan_id}/outcomes",
|
||||
axum::routing::get(care_plan_handler::list_care_plan_outcomes)
|
||||
.post(care_plan_handler::create_care_plan_outcome),
|
||||
)
|
||||
.route(
|
||||
"/health/care-plans/{plan_id}/outcomes/{outcome_id}",
|
||||
axum::routing::put(care_plan_handler::update_care_plan_outcome)
|
||||
.delete(care_plan_handler::delete_care_plan_outcome),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1240,6 +1272,19 @@ impl ErpModule for HealthModule {
|
||||
description: "创建/编辑/删除 FHIR API 合作方".into(),
|
||||
module: "health".into(),
|
||||
},
|
||||
// 护理计划
|
||||
PermissionDescriptor {
|
||||
code: "health.care-plan.list".into(),
|
||||
name: "查看护理计划".into(),
|
||||
description: "查看护理计划、条目和预后测量".into(),
|
||||
module: "health".into(),
|
||||
},
|
||||
PermissionDescriptor {
|
||||
code: "health.care-plan.manage".into(),
|
||||
name: "管理护理计划".into(),
|
||||
description: "创建/编辑/删除护理计划、条目和预后测量".into(),
|
||||
module: "health".into(),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user