package entity import "gopkg.in/guregu/null.v3" /** * @Author: qz * @Date: 2021/12/13 18:46 * @Description: */ type CustomInfoLabelsDto struct { CustomFileId int `json:"custom_file_id"` List []CustomInfoLabel `json:"custom_file_info"` } //custom_file 标签字段(酗酒,睡眠) type CustomInfoLabel struct { Key string `json:"key"` Value string `json:"value"` Other string `json:"other"` } type CustomFileInfoDB struct { Id int `db:"id" json:"id"` Name null.String `db:"name" json:"name"` Mobile null.String `db:"mobile" json:"mobile"` Birthday null.String `db:"birthday" json:"birthday"` //生日 CustomId int `db:"custom_id" json:"custom_id"` RelId int `db:"rel_id" json:"rel_id"` RelStr string `json:"rel_str"` IdType null.Int `db:"id_type" json:"id_type"` Gender int `db:"gender" json:"gender"` IdNum null.String `db:"id_num" json:"id_num"` Height null.Int `db:"height" json:"height"` //身高 Weight null.Int `db:"weight" json:"weight"` //体重 BloodType null.String `db:"blood_type" json:"blood_type"` //血型 SmokeLevel null.Int `db:"smoke_level" json:"smoke_level"` //吸烟程度 SmokeLevelStr string `json:"smoke_level_str"` //吸烟程度文字 AlcoholLevel null.Int `db:"alcohol_level" json:"alcohol_level"` //饮酒程度 AlcoholLevelStr string `json:"alcohol_level_str"` //饮酒程度文字 ExerciseLevel null.Int `db:"exercise_level" json:"exercise_level"` //锻炼程度 ExerciseLevelStr string `json:"exercise_level_str"` //锻炼程度文字 SleepLevel null.Int `db:"sleep_level" json:"sleep_level"` //睡眠质量 SleepLevelStr string `json:"sleep_level_str"` //睡眠质量文字 SelfMedicalHistory null.String `db:"self_medical_history" json:"self_medical_history"` //既往病史 SelfMedicalHistoryStr string `json:"self_medical_history_str"` //既往病史文字 FamilyMedicalHistory null.String `db:"family_medical_history" json:"family_medical_history"` //家族病史 FamilyMedicalHistoryStr string `json:"family_medical_history_str"` //家族病史文字 DrugAllergy null.String `db:"drug_allergy" json:"drug_allergy"` //过敏用药 DrugAllergyStr string `json:"drug_allergy_str"` //过敏用药文字 DietaryHabit null.String `db:"dietary_habit" json:"dietary_habit"` //饮食习惯 DietaryHabitStr string `json:"dietary_habit_str"` //饮食习惯文字 HealthNeeds null.String `db:"health_needs" json:"health_needs"` //健康需求 HealthNeedsStr string `json:"health_needs_str"` //健康需求文字 SmokeLevelOther null.String `db:"smoke_level_other" json:"smoke_level_other"` AlcoholLevelOther null.String `db:"alcohol_level_other" json:"alcohol_level_other"` ExerciseLevelOther null.String `db:"exercise_level_other" json:"exercise_level_other"` SleepLevelOther null.String `db:"sleep_level_other" json:"sleep_level_other"` SelfMedicalHistoryOther null.String `db:"self_medical_history_other" json:"self_medical_history_other"` FamilyMedicalHistoryOther null.String `db:"family_medical_history_other" json:"family_medical_history_other"` DrugAllergyOther null.String `db:"drug_allergy_other" json:"drug_allergy_other"` DietaryHabitOther null.String `db:"dietary_habit_other" json:"dietary_habit_other"` HealthNeedsOther null.String `db:"health_needs_other" json:"health_needs_other"` } type CustomFile struct { Id int `db:"id" json:"id"` Name string `db:"name" json:"name"` Mobile string `db:"mobile" json:"mobile"` Birthday string `db:"birthday" json:"birthday"` //生日 CustomId int `db:"custom_id" json:"custom_id"` RelId int `db:"rel_id" json:"rel_id"` IdNum string `db:"id_num" json:"id_num"` IdType int `db:"id_type" json:"id_type"` Gender int `db:"gender" json:"gender"` Height int `db:"height" json:"height"` //身高 Weight int `db:"weight" json:"weight"` //体重 BloodType string `db:"blood_type" json:"blood_type"` //血型 SmokeLevel int `db:"smoke_level" json:"smoke_level"` //吸烟程度 AlcoholLevel int `db:"alcohol_level" json:"alcohol_level"` //饮酒程度 ExerciseLevel int `db:"exercise_level" json:"exercise_level"` //锻炼程度 SleepLevel int `db:"sleep_level" json:"sleep_level"` //睡眠质量 SelfMedicalHistory string `db:"self_medical_history" json:"self_medical_history"` //既往病史 FamilyMedicalHistory string `db:"family_medical_history" json:"family_medical_history"` //家族病史 DrugAllergy string `db:"drug_allergy" json:"drug_allergy"` //过敏用药 DietaryHabit string `db:"dietary_habit" json:"dietary_habit"` //饮食习惯 HealthNeeds string `db:"health_needs" json:"health_needs"` //健康需求 SmokeLevelOther string `db:"smoke_level_other" json:"smoke_level_other"` AlcoholLevelOther string `db:"alcohol_level_other" json:"alcohol_level_other"` ExerciseLevelOther string `db:"exercise_level_other" json:"exercise_level_other"` SleepLevelOther string `db:"sleep_level_other" json:"sleep_level_other"` SelfMedicalHistoryOther string `db:"self_medical_history_other" json:"self_medical_history_other"` FamilyMedicalHistoryOther string `db:"family_medical_history_other" json:"family_medical_history_other"` DrugAllergyOther string `db:"drug_allergy_other" json:"drug_allergy_other"` DietaryHabitOther string `db:"dietary_habit_other" json:"dietary_habit_other"` HealthNeedsOther string `db:"health_needs_other" json:"health_needs_other"` VCode string `json:"vcode"` } type CustomAttachment struct { Id int `json:"id"` CustomId int `json:"custom_id" db:"custom_id"` CustomFileId int `json:"custom_file_id" db:"custom_file_id"` Path string `json:"path" db:"path"` UpLoadType string `json:"upload_type" db:"upload_type"` //JZ 就诊 JYD 检验单 CF 处方 CustomRemark string `json:"custom_remark" db:"custom_remark"` DoctorRemark string `json:"doctor_remark" db:"doctor_remark"` UploadAt string `json:"upload_at" db:"upload_at"` CheckDate string `json:"check_date" db:"check_date"` Title string `json:"title" db:"title"` } type CustomAttachmentDB struct { Id int `db:"id" json:"id"` CustomId int `db:"custom_id" json:"custom_id"` CustomFileId int `db:"custom_file_id" json:"custom_file_id"` Path string `db:"path" json:"path"` UpLoadType string `db:"upload_type" json:"upload_type"` CustomRemark null.String `db:"custom_remark" json:"custom_remark"` DoctorRemark null.String `db:"doctor_remark" json:"doctor_remark"` UploadAt null.String `db:"upload_at" json:"upload_at"` CheckDate null.String `db:"check_date" json:"check_date"` Title null.String `db:"title" json:"title"` } type CustomFileParam struct { CustomFileId int `json:"custom_file_id"` Mobile string `json:"mobile"` CustomMobile string `json:"custom_mobile"` } func (c *CustomFileParam) IsCustomSelf() bool { flag := c.CustomMobile == c.Mobile return flag }