custom_file.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. package entity
  2. import "gopkg.in/guregu/null.v3"
  3. /**
  4. * @Author: qz
  5. * @Date: 2021/12/13 18:46
  6. * @Description:
  7. */
  8. type CustomInfoLabelsDto struct {
  9. CustomFileId int `json:"custom_file_id"`
  10. List []CustomInfoLabel `json:"custom_file_info"`
  11. }
  12. //custom_file 标签字段(酗酒,睡眠)
  13. type CustomInfoLabel struct {
  14. Key string `json:"key"`
  15. Value string `json:"value"`
  16. Other string `json:"other"`
  17. }
  18. type CustomFileInfoDB struct {
  19. Id int `db:"id" json:"id"`
  20. Name null.String `db:"name" json:"name"`
  21. Mobile null.String `db:"mobile" json:"mobile"`
  22. Birthday null.String `db:"birthday" json:"birthday"` //生日
  23. CustomId int `db:"custom_id" json:"custom_id"`
  24. RelId int `db:"rel_id" json:"rel_id"`
  25. RelStr string `json:"rel_str"`
  26. IdType null.Int `db:"id_type" json:"id_type"`
  27. Gender int `db:"gender" json:"gender"`
  28. IdNum null.String `db:"id_num" json:"id_num"`
  29. Height null.Int `db:"height" json:"height"` //身高
  30. Weight null.Int `db:"weight" json:"weight"` //体重
  31. BloodType null.String `db:"blood_type" json:"blood_type"` //血型
  32. SmokeLevel null.Int `db:"smoke_level" json:"smoke_level"` //吸烟程度
  33. SmokeLevelStr string `json:"smoke_level_str"` //吸烟程度文字
  34. AlcoholLevel null.Int `db:"alcohol_level" json:"alcohol_level"` //饮酒程度
  35. AlcoholLevelStr string `json:"alcohol_level_str"` //饮酒程度文字
  36. ExerciseLevel null.Int `db:"exercise_level" json:"exercise_level"` //锻炼程度
  37. ExerciseLevelStr string `json:"exercise_level_str"` //锻炼程度文字
  38. SleepLevel null.Int `db:"sleep_level" json:"sleep_level"` //睡眠质量
  39. SleepLevelStr string `json:"sleep_level_str"` //睡眠质量文字
  40. SelfMedicalHistory null.String `db:"self_medical_history" json:"self_medical_history"` //既往病史
  41. SelfMedicalHistoryStr string `json:"self_medical_history_str"` //既往病史文字
  42. FamilyMedicalHistory null.String `db:"family_medical_history" json:"family_medical_history"` //家族病史
  43. FamilyMedicalHistoryStr string `json:"family_medical_history_str"` //家族病史文字
  44. DrugAllergy null.String `db:"drug_allergy" json:"drug_allergy"` //过敏用药
  45. DrugAllergyStr string `json:"drug_allergy_str"` //过敏用药文字
  46. DietaryHabit null.String `db:"dietary_habit" json:"dietary_habit"` //饮食习惯
  47. DietaryHabitStr string `json:"dietary_habit_str"` //饮食习惯文字
  48. HealthNeeds null.String `db:"health_needs" json:"health_needs"` //健康需求
  49. HealthNeedsStr string `json:"health_needs_str"` //健康需求文字
  50. SmokeLevelOther null.String `db:"smoke_level_other" json:"smoke_level_other"`
  51. AlcoholLevelOther null.String `db:"alcohol_level_other" json:"alcohol_level_other"`
  52. ExerciseLevelOther null.String `db:"exercise_level_other" json:"exercise_level_other"`
  53. SleepLevelOther null.String `db:"sleep_level_other" json:"sleep_level_other"`
  54. SelfMedicalHistoryOther null.String `db:"self_medical_history_other" json:"self_medical_history_other"`
  55. FamilyMedicalHistoryOther null.String `db:"family_medical_history_other" json:"family_medical_history_other"`
  56. DrugAllergyOther null.String `db:"drug_allergy_other" json:"drug_allergy_other"`
  57. DietaryHabitOther null.String `db:"dietary_habit_other" json:"dietary_habit_other"`
  58. HealthNeedsOther null.String `db:"health_needs_other" json:"health_needs_other"`
  59. }
  60. type CustomFile struct {
  61. Id int `db:"id" json:"id"`
  62. Name string `db:"name" json:"name"`
  63. Mobile string `db:"mobile" json:"mobile"`
  64. Birthday string `db:"birthday" json:"birthday"` //生日
  65. CustomId int `db:"custom_id" json:"custom_id"`
  66. RelId int `db:"rel_id" json:"rel_id"`
  67. IdNum string `db:"id_num" json:"id_num"`
  68. IdType int `db:"id_type" json:"id_type"`
  69. Gender int `db:"gender" json:"gender"`
  70. Height int `db:"height" json:"height"` //身高
  71. Weight int `db:"weight" json:"weight"` //体重
  72. BloodType string `db:"blood_type" json:"blood_type"` //血型
  73. SmokeLevel int `db:"smoke_level" json:"smoke_level"` //吸烟程度
  74. AlcoholLevel int `db:"alcohol_level" json:"alcohol_level"` //饮酒程度
  75. ExerciseLevel int `db:"exercise_level" json:"exercise_level"` //锻炼程度
  76. SleepLevel int `db:"sleep_level" json:"sleep_level"` //睡眠质量
  77. SelfMedicalHistory string `db:"self_medical_history" json:"self_medical_history"` //既往病史
  78. FamilyMedicalHistory string `db:"family_medical_history" json:"family_medical_history"` //家族病史
  79. DrugAllergy string `db:"drug_allergy" json:"drug_allergy"` //过敏用药
  80. DietaryHabit string `db:"dietary_habit" json:"dietary_habit"` //饮食习惯
  81. HealthNeeds string `db:"health_needs" json:"health_needs"` //健康需求
  82. SmokeLevelOther string `db:"smoke_level_other" json:"smoke_level_other"`
  83. AlcoholLevelOther string `db:"alcohol_level_other" json:"alcohol_level_other"`
  84. ExerciseLevelOther string `db:"exercise_level_other" json:"exercise_level_other"`
  85. SleepLevelOther string `db:"sleep_level_other" json:"sleep_level_other"`
  86. SelfMedicalHistoryOther string `db:"self_medical_history_other" json:"self_medical_history_other"`
  87. FamilyMedicalHistoryOther string `db:"family_medical_history_other" json:"family_medical_history_other"`
  88. DrugAllergyOther string `db:"drug_allergy_other" json:"drug_allergy_other"`
  89. DietaryHabitOther string `db:"dietary_habit_other" json:"dietary_habit_other"`
  90. HealthNeedsOther string `db:"health_needs_other" json:"health_needs_other"`
  91. VCode string `json:"vcode"`
  92. }
  93. type CustomAttachment struct {
  94. Id int `json:"id"`
  95. CustomId int `json:"custom_id" db:"custom_id"`
  96. CustomFileId int `json:"custom_file_id" db:"custom_file_id"`
  97. Path string `json:"path" db:"path"`
  98. UpLoadType string `json:"upload_type" db:"upload_type"` //JZ 就诊 JYD 检验单 CF 处方
  99. CustomRemark string `json:"custom_remark" db:"custom_remark"`
  100. DoctorRemark string `json:"doctor_remark" db:"doctor_remark"`
  101. UploadAt string `json:"upload_at" db:"upload_at"`
  102. CheckDate string `json:"check_date" db:"check_date"`
  103. Title string `json:"title" db:"title"`
  104. }
  105. type CustomAttachmentDB struct {
  106. Id int `db:"id" json:"id"`
  107. CustomId int `db:"custom_id" json:"custom_id"`
  108. CustomFileId int `db:"custom_file_id" json:"custom_file_id"`
  109. Path string `db:"path" json:"path"`
  110. UpLoadType string `db:"upload_type" json:"upload_type"`
  111. CustomRemark null.String `db:"custom_remark" json:"custom_remark"`
  112. DoctorRemark null.String `db:"doctor_remark" json:"doctor_remark"`
  113. UploadAt null.String `db:"upload_at" json:"upload_at"`
  114. CheckDate null.String `db:"check_date" json:"check_date"`
  115. Title null.String `db:"title" json:"title"`
  116. }
  117. type CustomFileParam struct {
  118. CustomFileId int `json:"custom_file_id"`
  119. Mobile string `json:"mobile"`
  120. CustomMobile string `json:"custom_mobile"`
  121. }
  122. func (c *CustomFileParam) IsCustomSelf() bool {
  123. flag := c.CustomMobile == c.Mobile
  124. return flag
  125. }