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:
@@ -7,7 +7,7 @@ use erp_core::module::{ErpModule, PermissionDescriptor};
|
||||
|
||||
use crate::handler::{
|
||||
alert_handler, alert_rule_handler,
|
||||
appointment_handler, article_category_handler, article_handler, article_tag_handler, consultation_handler, consent_handler, critical_value_threshold_handler, daily_monitoring_handler, device_reading_handler, diagnosis_handler, dialysis_handler, dialysis_prescription_handler, doctor_handler, follow_up_handler,
|
||||
appointment_handler, article_category_handler, article_handler, article_tag_handler, consultation_handler, consent_handler, critical_value_threshold_handler, daily_monitoring_handler, device_reading_handler, diagnosis_handler, dialysis_handler, dialysis_prescription_handler, doctor_handler, follow_up_handler, follow_up_template_handler,
|
||||
health_data_handler, medication_record_handler, patient_handler, points_handler, stats_handler,
|
||||
};
|
||||
|
||||
@@ -234,6 +234,18 @@ impl HealthModule {
|
||||
.put(dialysis_prescription_handler::update_prescription)
|
||||
.delete(dialysis_prescription_handler::delete_prescription),
|
||||
)
|
||||
// 随访模板
|
||||
.route(
|
||||
"/health/follow-up-templates",
|
||||
axum::routing::get(follow_up_template_handler::list_templates)
|
||||
.post(follow_up_template_handler::create_template),
|
||||
)
|
||||
.route(
|
||||
"/health/follow-up-templates/{id}",
|
||||
axum::routing::get(follow_up_template_handler::get_template)
|
||||
.put(follow_up_template_handler::update_template)
|
||||
.delete(follow_up_template_handler::delete_template),
|
||||
)
|
||||
// 日常监测
|
||||
.route(
|
||||
"/health/patients/{id}/daily-monitoring",
|
||||
|
||||
Reference in New Issue
Block a user