inspection_models.go 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. package models
  2. type Inspection struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  5. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  6. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  7. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  8. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  9. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  10. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  11. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  12. InspectTips string `gorm:"column:inspect_tips" json:"inspect_tips" form:"inspect_tips"`
  13. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  14. Status int64 `gorm:"column:status" json:"status" form:"status"`
  15. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  16. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  17. InspectDesc string `gorm:"column:inspect_desc" json:"inspect_desc" form:"inspect_desc"`
  18. }
  19. func (Inspection) TableName() string {
  20. return "xt_inspection"
  21. }
  22. type Inspections struct {
  23. ID int64 `gorm:"column:id" json:"id" form:"id"`
  24. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  25. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  26. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  27. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  28. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  29. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  30. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  31. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  32. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  33. Status int64 `gorm:"column:status" json:"status" form:"status"`
  34. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  35. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  36. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  37. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  38. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  39. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  40. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  41. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  42. }
  43. type InspectionReference struct {
  44. ID int64 `gorm:"column:id" json:"id" form:"id"`
  45. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  46. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  47. Project string `gorm:"column:project" json:"project" form:"project"`
  48. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  49. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  50. ItemId string `gorm:"column:item_id" json:"item_id" form:"item_id"`
  51. SysItemId int64 `gorm:"column:sys_item_id" json:"sys_item_id" form:"sys_item_id"`
  52. ItemNameAddition string `gorm:"column:item_name_addition" json:"item_name_addition" form:"item_name_addition"`
  53. Item string `gorm:"column:item" json:"item" form:"item"`
  54. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  55. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  56. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  57. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  58. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  59. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  60. Status int64 `gorm:"column:status" json:"status" form:"status"`
  61. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  62. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  63. SystemProjectId int64 `gorm:"column:system_project_id" json:"system_project_id" form:"system_project_id"`
  64. SystemItemId int64 `gorm:"column:system_item_id" json:"system_item_id" form:"system_item_id"`
  65. //remind XtCheckRemind `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"good_info"`
  66. }
  67. func (InspectionReference) TableName() string {
  68. return "xt_inspection_reference"
  69. }
  70. type UserInspectionProjectCounts struct {
  71. PatientId int64
  72. Count int64
  73. ProjectId int64
  74. ProjectName string
  75. InspectionFrequency string
  76. Sort int64
  77. }
  78. type UserInspectionProjectCount struct {
  79. PatientId int64
  80. Count int64
  81. ProjectId int64
  82. }
  83. type UserDoctorAdvicesCount struct {
  84. PatientId int64
  85. Count int64
  86. }
  87. type InspectionReferenceMap struct {
  88. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  89. Project string `gorm:"-" json:"project" form:"project"`
  90. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  91. Count int64 `gorm:"-" json:"count" form:"count"`
  92. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  93. }
  94. type InepectionForm struct {
  95. Method string `json:"method"`
  96. ProjectId int64 `json:"project_id"`
  97. InspectDate string `json:"inspect_date"`
  98. OldInspectDate string `json:"old_inspect_date"`
  99. FormItem []struct {
  100. ID int64 `json:"id"`
  101. ProjectId int64 `json:"project_id"`
  102. ProjectName string `json:"project_name"`
  103. ItemId int64 `json:"item_id"`
  104. Item string `json:"item"`
  105. ItemName string `json:"item_name"`
  106. RangeType int64 `json:"range_type"`
  107. Value string `json:"value"`
  108. } `json:"formItem"`
  109. Imags []struct {
  110. ID int64 `json:"id"`
  111. ImgUrl string `json:"img_url"`
  112. Desc string `json:"desc"`
  113. } `json:"imgs"`
  114. }
  115. type InepectionPICForm struct {
  116. Method string `json:"method"`
  117. ProjectId int64 `json:"project_id"`
  118. InspectDate string `json:"inspect_date"`
  119. OldInspectDate string `json:"old_inspect_date"`
  120. Imags []struct {
  121. ID int64 `json:"id"`
  122. ImgUrl string `json:"img_url"`
  123. Desc string `json:"desc"`
  124. } `json:"imgs"`
  125. DeleteImg []struct {
  126. ID int64 `json:"id"`
  127. } `json:"delete_imgs"`
  128. }
  129. type InspectionDate struct {
  130. InspectDate int64
  131. }
  132. type AdviceDate struct {
  133. RecordDate int64
  134. }
  135. type XtPatientFeedback struct {
  136. ID int64 `gorm:"column:id" json:"id" form:"id"`
  137. ProblemType int64 `gorm:"column:problem_type" json:"problem_type" form:"problem_type"`
  138. Title string `gorm:"column:title" json:"title" form:"title"`
  139. Content string `gorm:"column:content" json:"content" form:"content"`
  140. Image string `gorm:"column:image" json:"image" form:"image"`
  141. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  142. TimeQuantum int64 `gorm:"column:time_quantum" json:"time_quantum" form:"time_quantum"`
  143. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  144. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  145. Status int64 `gorm:"column:status" json:"status" form:"status"`
  146. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  147. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  148. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  149. }
  150. func (XtPatientFeedback) TableName() string {
  151. return "xt_patient_feedback"
  152. }
  153. type XtCheckRemind struct {
  154. ID int64 `gorm:"column:id" json:"id" form:"id"`
  155. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  156. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  157. Status int64 `gorm:"column:status" json:"status" form:"status"`
  158. LastRemindDate int64 `gorm:"column:last_remind_date" json:"last_remind_date" form:"last_remind_date"`
  159. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  160. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
  161. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  162. InspectionReference InspectionReference `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"re"`
  163. }
  164. func (XtCheckRemind) TableName() string {
  165. return "xt_check_remind"
  166. }
  167. type XtCheckRemindCinfig struct {
  168. ID int64 `gorm:"column:id" json:"id" form:"id"`
  169. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  170. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  171. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  172. Status int64 `gorm:"column:status" json:"status" form:"status"`
  173. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  174. }
  175. func (XtCheckRemindCinfig) TableName() string {
  176. return "xt_check_remind_config"
  177. }