inspection_models.go 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. Name string `gorm:"-" json:"name" form:"name"`
  19. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  20. Date string `gorm:"-" json:"date" form:"date"`
  21. }
  22. func (Inspection) TableName() string {
  23. return "xt_inspection"
  24. }
  25. type Inspections struct {
  26. ID int64 `gorm:"column:id" json:"id" form:"id"`
  27. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  28. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  29. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  30. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  31. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  32. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  33. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  34. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  35. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  36. Status int64 `gorm:"column:status" json:"status" form:"status"`
  37. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  38. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  39. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  40. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  41. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  42. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  43. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  44. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  45. }
  46. type InspectionReference struct {
  47. ID int64 `gorm:"column:id" json:"id" form:"id"`
  48. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  49. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  50. Project string `gorm:"column:project" json:"project" form:"project"`
  51. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  52. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  53. ItemId string `gorm:"column:item_id" json:"item_id" form:"item_id"`
  54. SysItemId int64 `gorm:"column:sys_item_id" json:"sys_item_id" form:"sys_item_id"`
  55. ItemNameAddition string `gorm:"column:item_name_addition" json:"item_name_addition" form:"item_name_addition"`
  56. Item string `gorm:"column:item" json:"item" form:"item"`
  57. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  58. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  59. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  60. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  61. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  62. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  63. Status int64 `gorm:"column:status" json:"status" form:"status"`
  64. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  65. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  66. SystemProjectId int64 `gorm:"column:system_project_id" json:"system_project_id" form:"system_project_id"`
  67. SystemItemId int64 `gorm:"column:system_item_id" json:"system_item_id" form:"system_item_id"`
  68. //remind XtCheckRemind `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"good_info"`
  69. }
  70. func (InspectionReference) TableName() string {
  71. return "xt_inspection_reference"
  72. }
  73. type UserInspectionProjectCounts struct {
  74. PatientId int64
  75. Count int64
  76. ProjectId int64
  77. ProjectName string
  78. InspectionFrequency string
  79. Sort int64
  80. }
  81. type UserInspectionProjectCount struct {
  82. PatientId int64
  83. Count int64
  84. ProjectId int64
  85. }
  86. type UserDoctorAdvicesCount struct {
  87. PatientId int64
  88. Count int64
  89. }
  90. type InspectionReferenceMap struct {
  91. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  92. Project string `gorm:"-" json:"project" form:"project"`
  93. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  94. Count int64 `gorm:"-" json:"count" form:"count"`
  95. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  96. }
  97. type InepectionForm struct {
  98. Method string `json:"method"`
  99. ProjectId int64 `json:"project_id"`
  100. InspectDate string `json:"inspect_date"`
  101. OldInspectDate string `json:"old_inspect_date"`
  102. FormItem []struct {
  103. ID int64 `json:"id"`
  104. ProjectId int64 `json:"project_id"`
  105. ProjectName string `json:"project_name"`
  106. ItemId int64 `json:"item_id"`
  107. Item string `json:"item"`
  108. ItemName string `json:"item_name"`
  109. RangeType int64 `json:"range_type"`
  110. Value string `json:"value"`
  111. } `json:"formItem"`
  112. Imags []struct {
  113. ID int64 `json:"id"`
  114. ImgUrl string `json:"img_url"`
  115. Desc string `json:"desc"`
  116. } `json:"imgs"`
  117. }
  118. type InepectionPICForm struct {
  119. Method string `json:"method"`
  120. ProjectId int64 `json:"project_id"`
  121. InspectDate string `json:"inspect_date"`
  122. OldInspectDate string `json:"old_inspect_date"`
  123. Imags []struct {
  124. ID int64 `json:"id"`
  125. ImgUrl string `json:"img_url"`
  126. Desc string `json:"desc"`
  127. } `json:"imgs"`
  128. DeleteImg []struct {
  129. ID int64 `json:"id"`
  130. } `json:"delete_imgs"`
  131. }
  132. type InspectionDate struct {
  133. InspectDate int64
  134. }
  135. type AdviceDate struct {
  136. RecordDate int64
  137. }
  138. type XtPatientFeedback struct {
  139. ID int64 `gorm:"column:id" json:"id" form:"id"`
  140. ProblemType int64 `gorm:"column:problem_type" json:"problem_type" form:"problem_type"`
  141. Title string `gorm:"column:title" json:"title" form:"title"`
  142. Content string `gorm:"column:content" json:"content" form:"content"`
  143. Image string `gorm:"column:image" json:"image" form:"image"`
  144. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  145. TimeQuantum int64 `gorm:"column:time_quantum" json:"time_quantum" form:"time_quantum"`
  146. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  147. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  148. Status int64 `gorm:"column:status" json:"status" form:"status"`
  149. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  150. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  151. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  152. }
  153. func (XtPatientFeedback) TableName() string {
  154. return "xt_patient_feedback"
  155. }
  156. type XtCheckRemind struct {
  157. ID int64 `gorm:"column:id" json:"id" form:"id"`
  158. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  159. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  160. Status int64 `gorm:"column:status" json:"status" form:"status"`
  161. LastRemindDate int64 `gorm:"column:last_remind_date" json:"last_remind_date" form:"last_remind_date"`
  162. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  163. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
  164. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  165. InspectionReference InspectionReference `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"re"`
  166. }
  167. func (XtCheckRemind) TableName() string {
  168. return "xt_check_remind"
  169. }
  170. type XtCheckRemindCinfig struct {
  171. ID int64 `gorm:"column:id" json:"id" form:"id"`
  172. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  173. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  174. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  175. Status int64 `gorm:"column:status" json:"status" form:"status"`
  176. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  177. }
  178. func (XtCheckRemindCinfig) TableName() string {
  179. return "xt_check_remind_config"
  180. }
  181. type XtPatientsTen struct {
  182. ID int64 `gorm:"column:id" json:"id" form:"id"`
  183. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  184. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  185. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  186. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  187. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  188. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  189. Source int64 `gorm:"column:source" json:"source" form:"source"`
  190. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  191. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  192. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  193. Name string `gorm:"column:name" json:"name" form:"name"`
  194. }
  195. func (XtPatientsTen) TableName() string {
  196. return "xt_patients"
  197. }
  198. type XtPatientsTenOne struct {
  199. ID int64 `gorm:"column:id" json:"id" form:"id"`
  200. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  201. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  202. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  203. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  204. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  205. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  206. Source int64 `gorm:"column:source" json:"source" form:"source"`
  207. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  208. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  209. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  210. Name string `gorm:"column:name" json:"name" form:"name"`
  211. Inspection []Inspection
  212. }
  213. func (XtPatientsTenOne) TableName() string {
  214. return "xt_patients"
  215. }
  216. type InspectionTen struct {
  217. ID int64 `gorm:"column:id" json:"id" form:"id"`
  218. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  219. Name string `gorm:"-" json:"name" form:"name"`
  220. Ipth string `gorm:"-" json:"ipth" form:"ipth"`
  221. Xuejia string `gorm:"-" json:"xuejia" form:"xuejia"`
  222. Xuelin string `gorm:"-" json:"xuelin" form:"xuelin"`
  223. Bdb string `gorm:"-" json:"bdb" form:"bdb"`
  224. Xhdb string `gorm:"-" json:"xhdb" form:"xhdb"`
  225. }
  226. func (InspectionTen) TableName() string {
  227. return "xt_inspection"
  228. }