|
@@ -217,4 +217,112 @@ Condition "1" -- "0..*" Nutrient : contains
|
|
- **VisitRecord 表**:存储用户的就诊记录,关联用户和病症。
|
|
- **VisitRecord 表**:存储用户的就诊记录,关联用户和病症。
|
|
- **HealthKnowledge 表**:存储健康知识,关联特定病症。
|
|
- **HealthKnowledge 表**:存储健康知识,关联特定病症。
|
|
|
|
|
|
-这种设计确保了数据的规范化,避免了冗余,同时通过外键关联保持了数据的一致性和完整性。
|
|
|
|
|
|
+这种设计确保了数据的规范化,避免了冗余,同时通过外键关联保持了数据的一致性和完整性。
|
|
|
|
+
|
|
|
|
+## 3、我的健康模块
|
|
|
|
+- 我的健康模块描述
|
|
|
|
+ - 我的健康模块的主要功能包括将用户个人信息整合生成一个病历表来记录用户有什么过敏史或者遗传病史,同时将用户自己以往的ai问诊记录整合起成一个可随时更新的表单来展现用户的健康历程,以及将用户关注过的健康科普知识整合在一个收藏夹中便于下次查找。
|
|
|
|
+
|
|
|
|
+### 表设计
|
|
|
|
+
|
|
|
|
+1. **UserProfile**
|
|
|
|
+ - objectId
|
|
|
|
+ - createdAt
|
|
|
|
+ - name: String
|
|
|
|
+ - age: Number
|
|
|
|
+ - gender: String
|
|
|
|
+ - allergyHistory: String
|
|
|
|
+ - geneticHistory: String
|
|
|
|
+
|
|
|
|
+2. **MedicalRecord**
|
|
|
|
+ - objectId
|
|
|
|
+ - createdAt
|
|
|
|
+ - userProfile: Pointer<UserProfile>
|
|
|
|
+ - recordDate: Date
|
|
|
|
+ - symptoms: String
|
|
|
|
+ - diagnosis: String
|
|
|
|
+ - treatment: String
|
|
|
|
+
|
|
|
|
+3. **ConsultationRecord**
|
|
|
|
+ - objectId
|
|
|
|
+ - createdAt
|
|
|
|
+ - userProfile: Pointer<UserProfile>
|
|
|
|
+ - consultationDate: Date
|
|
|
|
+ - questions: String
|
|
|
|
+ - answers: String
|
|
|
|
+
|
|
|
|
+4. **HealthKnowledge**
|
|
|
|
+ - objectId
|
|
|
|
+ - createdAt
|
|
|
|
+ - title: String
|
|
|
|
+ - content: String
|
|
|
|
+ - category: String
|
|
|
|
+ - userProfile: Pointer<UserProfile>
|
|
|
|
+
|
|
|
|
+5. **HealthKnowledgeCollection**
|
|
|
|
+ - objectId
|
|
|
|
+ - createdAt
|
|
|
|
+ - userProfile: Pointer<UserProfile>
|
|
|
|
+ - healthKnowledge: Pointer<HealthKnowledge>
|
|
|
|
+
|
|
|
|
+### PlantUML 类图
|
|
|
|
+
|
|
|
|
+以下是用PlantUML表示的类图:
|
|
|
|
+
|
|
|
|
+```plantuml
|
|
|
|
+@startuml
|
|
|
|
+class UserProfile {
|
|
|
|
+ +objectId: String
|
|
|
|
+ +createdAt: Date
|
|
|
|
+ +name: String
|
|
|
|
+ +age: Number
|
|
|
|
+ +gender: String
|
|
|
|
+ +allergyHistory: String
|
|
|
|
+ +geneticHistory: String
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class MedicalRecord {
|
|
|
|
+ +objectId: String
|
|
|
|
+ +createdAt: Date
|
|
|
|
+ +recordDate: Date
|
|
|
|
+ +symptoms: String
|
|
|
|
+ +diagnosis: String
|
|
|
|
+ +treatment: String
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class ConsultationRecord {
|
|
|
|
+ +objectId: String
|
|
|
|
+ +createdAt: Date
|
|
|
|
+ +consultationDate: Date
|
|
|
|
+ +questions: String
|
|
|
|
+ +answers: String
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class HealthKnowledge {
|
|
|
|
+ +objectId: String
|
|
|
|
+ +createdAt: Date
|
|
|
|
+ +title: String
|
|
|
|
+ +content: String
|
|
|
|
+ +category: String
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class HealthKnowledgeCollection {
|
|
|
|
+ +objectId: String
|
|
|
|
+ +createdAt: Date
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+UserProfile "1" -- "0..*" MedicalRecord : has
|
|
|
|
+UserProfile "1" -- "0..*" ConsultationRecord : has
|
|
|
|
+UserProfile "1" -- "0..*" HealthKnowledge : has
|
|
|
|
+UserProfile "1" -- "0..*" HealthKnowledgeCollection : has
|
|
|
|
+HealthKnowledgeCollection "1" -- "0..*" HealthKnowledge : contains
|
|
|
|
+@enduml
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+### 设计说明
|
|
|
|
+
|
|
|
|
+- **UserProfile** 表用于存储用户的基本信息,包括过敏史和遗传病史。
|
|
|
|
+- **MedicalRecord** 表用于记录用户的病历信息,关联到相应的用户。
|
|
|
|
+- **ConsultationRecord** 表用于存储用户的AI问诊记录,记录咨询日期、问题和答案。
|
|
|
|
+- **HealthKnowledge** 表用于存储健康科普知识的内容。
|
|
|
|
+- **HealthKnowledgeCollection** 表用于存储用户收藏的健康知识,使用指针关联到 HealthKnowledge 表。
|