新增了用户病例处理

This commit is contained in:
2024-08-20 14:57:07 +08:00
parent bc13339355
commit 702e482659
14 changed files with 545 additions and 77 deletions
+1
View File
@@ -18,6 +18,7 @@ type UserCase struct {
IsAllergyHistory *int `gorm:"column:is_allergy_history;type:tinyint(1);comment:过敏史(0:否 1:是)" json:"is_allergy_history"`
AllergyHistory string `gorm:"column:allergy_history;type:varchar(100);comment:过敏史描述" json:"allergy_history"`
Model
UserCaseDiseaseItem []*UserCaseDiseaseItem `gorm:"foreignKey:UserCaseId;references:user_case_id" json:"user_case_disease_item"`
}
func (m *UserCase) TableName() string {
+1
View File
@@ -15,6 +15,7 @@ type UserCaseDiseaseItem struct {
Duration *int `gorm:"column:duration;type:int(5);comment:患病时长(年)" json:"duration"`
Genotype string `gorm:"column:genotype;type:varchar(20);comment:基因型(仅丙肝存在)" json:"genotype"`
Model
BaseDiseaseClass *BaseDiseaseClass `gorm:"foreignKey:DiseaseClassId;references:disease_class_id" json:"disease_class"`
}
func (m *UserCaseDiseaseItem) TableName() string {