inspection_models.go 13KB

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