healthapp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.3 KiB

04-健康调查模块

目标

实现新用户健康调查功能,包括基础信息、生活习惯、病史、过敏史等信息的提交和管理。


前置要求

  • 用户认证模块已完成
  • 数据模型已定义

实施步骤

详细代码请参考原文档 02-后端开发/04-健康调查模块.md

主要任务

  1. 创建健康档案 Repository internal/repository/impl/health.go
  2. 创建健康调查 Service internal/service/survey.go
  3. 创建健康调查 Handler internal/api/handler/survey.go
  4. 更新路由配置

API 接口

方法 路径 说明
GET /api/survey/status 获取调查完成状态
POST /api/survey/basic-info 提交基础信息
POST /api/survey/lifestyle 提交生活习惯
POST /api/survey/medical-history 提交病史
POST /api/survey/family-history 提交家族病史
POST /api/survey/allergy 提交过敏信息

验收标准

  • 获取调查状态接口正常
  • 基础信息提交成功,BMI 自动计算
  • 生活习惯提交成功
  • 病史、家族史、过敏信息可多次添加
  • 所有接口需要认证

预计耗时

30-40 分钟


下一步

完成后进入 04-后端开发/05-体质辨识模块.md