inspection_models.go 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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. //remind XtCheckRemind `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"good_info"`
  71. }
  72. func (InspectionReference) TableName() string {
  73. return "xt_inspection_reference"
  74. }
  75. type UserInspectionProjectCounts struct {
  76. PatientId int64
  77. Count int64
  78. ProjectId int64
  79. ProjectName string
  80. InspectionFrequency string
  81. Sort int64
  82. }
  83. type UserInspectionProjectCount struct {
  84. PatientId int64
  85. Count int64
  86. ProjectId int64
  87. }
  88. type UserDoctorAdvicesCount struct {
  89. PatientId int64
  90. Count int64
  91. }
  92. type InspectionReferenceMap struct {
  93. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  94. Project string `gorm:"-" json:"project" form:"project"`
  95. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  96. Count int64 `gorm:"-" json:"count" form:"count"`
  97. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  98. }
  99. type InepectionForm struct {
  100. Method string `json:"method"`
  101. ProjectId int64 `json:"project_id"`
  102. InspectDate string `json:"inspect_date"`
  103. OldInspectDate string `json:"old_inspect_date"`
  104. FormItem []struct {
  105. ID int64 `json:"id"`
  106. ProjectId int64 `json:"project_id"`
  107. ProjectName string `json:"project_name"`
  108. ItemId int64 `json:"item_id"`
  109. Item string `json:"item"`
  110. ItemName string `json:"item_name"`
  111. RangeType int64 `json:"range_type"`
  112. Value string `json:"value"`
  113. } `json:"formItem"`
  114. Imags []struct {
  115. ID int64 `json:"id"`
  116. ImgUrl string `json:"img_url"`
  117. Desc string `json:"desc"`
  118. } `json:"imgs"`
  119. }
  120. type InepectionPICForm struct {
  121. Method string `json:"method"`
  122. ProjectId int64 `json:"project_id"`
  123. InspectDate string `json:"inspect_date"`
  124. OldInspectDate string `json:"old_inspect_date"`
  125. Imags []struct {
  126. ID int64 `json:"id"`
  127. ImgUrl string `json:"img_url"`
  128. Desc string `json:"desc"`
  129. } `json:"imgs"`
  130. DeleteImg []struct {
  131. ID int64 `json:"id"`
  132. } `json:"delete_imgs"`
  133. }
  134. type InspectionDate struct {
  135. InspectDate int64
  136. }
  137. type AdviceDate struct {
  138. RecordDate int64
  139. }
  140. type XtPatientFeedback struct {
  141. ID int64 `gorm:"column:id" json:"id" form:"id"`
  142. ProblemType int64 `gorm:"column:problem_type" json:"problem_type" form:"problem_type"`
  143. Title string `gorm:"column:title" json:"title" form:"title"`
  144. Content string `gorm:"column:content" json:"content" form:"content"`
  145. Image string `gorm:"column:image" json:"image" form:"image"`
  146. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  147. TimeQuantum int64 `gorm:"column:time_quantum" json:"time_quantum" form:"time_quantum"`
  148. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  149. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  150. Status int64 `gorm:"column:status" json:"status" form:"status"`
  151. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  152. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  153. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  154. }
  155. func (XtPatientFeedback) TableName() string {
  156. return "xt_patient_feedback"
  157. }
  158. type XtCheckRemind struct {
  159. ID int64 `gorm:"column:id" json:"id" form:"id"`
  160. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  161. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  162. Status int64 `gorm:"column:status" json:"status" form:"status"`
  163. LastRemindDate int64 `gorm:"column:last_remind_date" json:"last_remind_date" form:"last_remind_date"`
  164. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  165. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
  166. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  167. InspectionReference InspectionReference `gorm:"ForeignKey:ProjectId;AssociationForeignKey:ProjectId" json:"re"`
  168. }
  169. func (XtCheckRemind) TableName() string {
  170. return "xt_check_remind"
  171. }
  172. type XtCheckRemindCinfig struct {
  173. ID int64 `gorm:"column:id" json:"id" form:"id"`
  174. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  175. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  176. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  177. Status int64 `gorm:"column:status" json:"status" form:"status"`
  178. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  179. }
  180. func (XtCheckRemindCinfig) TableName() string {
  181. return "xt_check_remind_config"
  182. }
  183. type XtPatientsTen struct {
  184. ID int64 `gorm:"column:id" json:"id" form:"id"`
  185. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  186. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  187. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  188. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  189. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  190. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  191. Source int64 `gorm:"column:source" json:"source" form:"source"`
  192. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  193. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  194. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  195. Name string `gorm:"column:name" json:"name" form:"name"`
  196. }
  197. func (XtPatientsTen) TableName() string {
  198. return "xt_patients"
  199. }
  200. type XtPatientsTenOne struct {
  201. ID int64 `gorm:"column:id" json:"id" form:"id"`
  202. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  203. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  204. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  205. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  206. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  207. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  208. Source int64 `gorm:"column:source" json:"source" form:"source"`
  209. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  210. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  211. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  212. Name string `gorm:"column:name" json:"name" form:"name"`
  213. Inspection []Inspection
  214. }
  215. func (XtPatientsTenOne) TableName() string {
  216. return "xt_patients"
  217. }
  218. type InspectionValue struct {
  219. Name string `gorm:"-" json:"name" form:"name"`
  220. Value string `gorm:"-" json:"value" form:"value"`
  221. }
  222. type InspectionTen struct {
  223. ID int64 `gorm:"column:id" json:"id" form:"id"`
  224. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  225. Name string `gorm:"-" json:"name" form:"name"`
  226. Values []InspectionValue `gorm:"-" json:"values" form:"values"`
  227. }
  228. func (InspectionTen) TableName() string {
  229. return "xt_inspection"
  230. }
  231. type InspectionTenOne struct {
  232. ID int64 `gorm:"-" json:"id" form:"id"`
  233. PatientId int64 `gorm:"-" json:"patient_id" form:"patient_id"`
  234. Name string `gorm:"-" json:"name" form:"name"`
  235. ItemName string `gorm:"-" json:"item_name" form:"item_name"`
  236. InspectValue string `gorm:"-" json:"inspect_value" form:"inspect_value"`
  237. ItemID string `gorm:"-" json:"item_id" form:"item_id"`
  238. }