inspection_models.go 13KB

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