Jelajahi Sumber

feat(mind): add mental health screening entities and DTOs

Create MentalHealthScreen entity (PHQ-9/GAD-7), ScreenSubmitDTO (submission payload), and ScreenResultVO (severity/suggestions response).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Xiaogang Liao 2 bulan lalu
induk
melakukan
2baced3f1e

+ 19 - 0
cfc-backend/src/main/java/com/etotem/cfc/dto/ScreenResultVO.java

@@ -0,0 +1,19 @@
+package com.etotem.cfc.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ScreenResultVO implements Serializable {
+    private Long id;
+    private Long childId;
+    private String screenType;
+    private Integer totalScore;
+    private String severityLevel;
+    private List<String> riskFlags;
+    private String suggestions;
+    private Date completedAt;
+}

+ 13 - 0
cfc-backend/src/main/java/com/etotem/cfc/dto/ScreenSubmitDTO.java

@@ -0,0 +1,13 @@
+package com.etotem.cfc.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class ScreenSubmitDTO implements Serializable {
+    private Long childId;
+    private String screenType;   // PHQ9 / GAD7
+    private List<Integer> answers;
+}

+ 37 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/MentalHealthScreen.java

@@ -0,0 +1,37 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("mental_health_screen")
+public class MentalHealthScreen implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    private Long childId;
+
+    private String screenType;         // PHQ9 / GAD7
+
+    private String answers;            // JSON 数组: [2, 1, 0, ...]
+
+    private Integer totalScore;
+
+    private String severityLevel;      // none / mild / moderate / moderately_severe / severe
+
+    private String riskFlags;          // JSON: ["suicide_ideation", "self_harm"]
+
+    private String suggestions;        // 自动生成的建议文案
+
+    private Date completedAt;
+
+    private Date createdAt;
+
+    private Date updatedAt;
+}