inspection_models.go 7.0KB

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