inspection_models.go 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. }
  64. func (InspectionReference) TableName() string {
  65. return "xt_inspection_reference"
  66. }
  67. type UserInspectionProjectCounts struct {
  68. PatientId int64
  69. Count int64
  70. ProjectId int64
  71. ProjectName string
  72. InspectionFrequency string
  73. Sort int64
  74. }
  75. type UserInspectionProjectCount struct {
  76. PatientId int64
  77. Count int64
  78. ProjectId int64
  79. }
  80. type UserDoctorAdvicesCount struct {
  81. PatientId int64
  82. Count int64
  83. }
  84. type InspectionReferenceMap struct {
  85. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  86. Project string `gorm:"-" json:"project" form:"project"`
  87. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  88. Count int64 `gorm:"-" json:"count" form:"count"`
  89. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  90. }
  91. type InepectionForm struct {
  92. Method string `json:"method"`
  93. ProjectId int64 `json:"project_id"`
  94. InspectDate string `json:"inspect_date"`
  95. OldInspectDate string `json:"old_inspect_date"`
  96. FormItem []struct {
  97. ID int64 `json:"id"`
  98. ProjectId int64 `json:"project_id"`
  99. ProjectName string `json:"project_name"`
  100. ItemId int64 `json:"item_id"`
  101. Item string `json:"item"`
  102. ItemName string `json:"item_name"`
  103. RangeType int64 `json:"range_type"`
  104. Value string `json:"value"`
  105. } `json:"formItem"`
  106. Imags []struct {
  107. ID int64 `json:"id"`
  108. ImgUrl string `json:"img_url"`
  109. Desc string `json:"desc"`
  110. } `json:"imgs"`
  111. }
  112. type InepectionPICForm struct {
  113. Method string `json:"method"`
  114. ProjectId int64 `json:"project_id"`
  115. InspectDate string `json:"inspect_date"`
  116. OldInspectDate string `json:"old_inspect_date"`
  117. Imags []struct {
  118. ID int64 `json:"id"`
  119. ImgUrl string `json:"img_url"`
  120. Desc string `json:"desc"`
  121. } `json:"imgs"`
  122. DeleteImg []struct {
  123. ID int64 `json:"id"`
  124. } `json:"delete_imgs"`
  125. }
  126. type InspectionDate struct {
  127. InspectDate int64
  128. }
  129. type AdviceDate struct {
  130. RecordDate int64
  131. }
  132. type XtPatientFeedback struct {
  133. ID int64 `gorm:"column:id" json:"id" form:"id"`
  134. ProblemType int64 `gorm:"column:problem_type" json:"problem_type" form:"problem_type"`
  135. Title string `gorm:"column:title" json:"title" form:"title"`
  136. Content string `gorm:"column:content" json:"content" form:"content"`
  137. Image string `gorm:"column:image" json:"image" form:"image"`
  138. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  139. TimeQuantum int64 `gorm:"column:time_quantum" json:"time_quantum" form:"time_quantum"`
  140. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  141. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  142. Status int64 `gorm:"column:status" json:"status" form:"status"`
  143. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  144. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  145. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  146. }
  147. func (XtPatientFeedback) TableName() string {
  148. return "xt_patient_feedback"
  149. }