inspection_models.go 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. }
  18. func (Inspection) TableName() string {
  19. return "xt_inspection"
  20. }
  21. type Inspections struct {
  22. ID int64 `gorm:"column:id" json:"id" form:"id"`
  23. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  24. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  25. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  26. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  27. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  28. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  29. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  30. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  31. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  32. Status int64 `gorm:"column:status" json:"status" form:"status"`
  33. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  34. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  35. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  36. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  37. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  38. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  39. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  40. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  41. }
  42. type InspectionReference struct {
  43. ID int64 `gorm:"column:id" json:"id" form:"id"`
  44. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  45. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  46. Project string `gorm:"column:project" json:"project" form:"project"`
  47. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  48. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  49. ItemId string `gorm:"column:item_id" json:"item_id" form:"item_id"`
  50. SysItemId int64 `gorm:"column:sys_item_id" json:"sys_item_id" form:"sys_item_id"`
  51. ItemNameAddition string `gorm:"column:item_name_addition" json:"item_name_addition" form:"item_name_addition"`
  52. Item string `gorm:"column:item" json:"item" form:"item"`
  53. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  54. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  55. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  56. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  57. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  58. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  59. Status int64 `gorm:"column:status" json:"status" form:"status"`
  60. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  61. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  62. }
  63. func (InspectionReference) TableName() string {
  64. return "xt_inspection_reference"
  65. }
  66. type UserInspectionProjectCounts struct {
  67. PatientId int64
  68. Count int64
  69. ProjectId int64
  70. ProjectName string
  71. InspectionFrequency string
  72. Sort int64
  73. }
  74. type UserInspectionProjectCount struct {
  75. PatientId int64
  76. Count int64
  77. ProjectId int64
  78. }
  79. type UserDoctorAdvicesCount struct {
  80. PatientId int64
  81. Count int64
  82. }
  83. type InspectionReferenceMap struct {
  84. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  85. Project string `gorm:"-" json:"project" form:"project"`
  86. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  87. Count int64 `gorm:"-" json:"count" form:"count"`
  88. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  89. }
  90. type InepectionForm struct {
  91. Method string `json:"method"`
  92. ProjectId int64 `json:"project_id"`
  93. InspectDate string `json:"inspect_date"`
  94. OldInspectDate string `json:"old_inspect_date"`
  95. FormItem []struct {
  96. ID int64 `json:"id"`
  97. ProjectId int64 `json:"project_id"`
  98. ProjectName string `json:"project_name"`
  99. ItemId int64 `json:"item_id"`
  100. Item string `json:"item"`
  101. ItemName string `json:"item_name"`
  102. RangeType int64 `json:"range_type"`
  103. Value string `json:"value"`
  104. } `json:"formItem"`
  105. }
  106. type InspectionDate struct {
  107. InspectDate int64
  108. }
  109. type AdviceDate struct {
  110. RecordDate int64
  111. }
  112. type XtPatientFeedback struct {
  113. ID int64 `gorm:"column:id" json:"id" form:"id"`
  114. ProblemType int64 `gorm:"column:problem_type" json:"problem_type" form:"problem_type"`
  115. Title string `gorm:"column:title" json:"title" form:"title"`
  116. Content string `gorm:"column:content" json:"content" form:"content"`
  117. Image string `gorm:"column:image" json:"image" form:"image"`
  118. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  119. TimeQuantum int64 `gorm:"column:time_quantum" json:"time_quantum" form:"time_quantum"`
  120. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  121. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  122. Status int64 `gorm:"column:status" json:"status" form:"status"`
  123. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  124. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  125. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  126. }
  127. func (XtPatientFeedback) TableName() string {
  128. return "xt_patient_feedback"
  129. }