schedule_models.go 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. package models
  2. type VmSchedules struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  5. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  6. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  7. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  8. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  9. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  10. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  11. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  12. Status int64 `gorm:"column:status" json:"status" form:"status"`
  13. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  14. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  15. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  16. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  17. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  18. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  19. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  20. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  21. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  22. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  23. DialysisSolution []*DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  24. }
  25. func (VmSchedules) TableName() string {
  26. return "xt_schedule"
  27. }
  28. type ScheduleXcx struct {
  29. ID int64 `gorm:"column:id" json:"id" form:"id"`
  30. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  31. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  32. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  33. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  34. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  35. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  36. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  37. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  38. Status int64 `gorm:"column:status" json:"status" form:"status"`
  39. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  40. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  41. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  42. }
  43. func (ScheduleXcx) TableName() string {
  44. return "xt_schedule"
  45. }
  46. type Schedule struct {
  47. ID int64 `gorm:"column:id" json:"id" form:"id"`
  48. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  49. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  50. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  51. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  52. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  53. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  54. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  55. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  56. Status int64 `gorm:"column:status" json:"status" form:"status"`
  57. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  58. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  59. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  60. Patient string `gorm:"-" json:"patient" form:"patient"`
  61. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  62. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  63. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  64. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  65. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  66. }
  67. func (Schedule) TableName() string {
  68. return "xt_schedule"
  69. }
  70. type SchedulePatients struct {
  71. ID int64 `gorm:"column:id" json:"id" form:"id"`
  72. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  73. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  74. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  75. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  76. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  77. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  78. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  79. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  80. Status int64 `gorm:"column:status" json:"status" form:"status"`
  81. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  82. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  83. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  84. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  85. }
  86. func (SchedulePatients) TableName() string {
  87. return "xt_schedule"
  88. }
  89. type PatientSchedule struct {
  90. Schedule
  91. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  92. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  93. Week int64 `gorm:"-" json:"week" form:"week"`
  94. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  95. }
  96. type Partition struct {
  97. DeviceZone
  98. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  99. }
  100. type Search_Schedule struct {
  101. ID int64 `gorm:"column:id" json:"id" form:"id"`
  102. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  103. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  104. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  105. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  106. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  107. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  108. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  109. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  110. Status int64 `gorm:"column:status" json:"status" form:"status"`
  111. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  112. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  113. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  114. Patient string `gorm:"-" json:"patient" form:"patient"`
  115. }
  116. func (Search_Schedule) TableName() string {
  117. return "xt_schedule"
  118. }
  119. type WeekSchedule struct {
  120. ID int64 `gorm:"column:id" json:"id" form:"id"`
  121. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  122. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  123. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  124. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  125. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  126. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  127. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  128. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  129. Status int64 `gorm:"column:status" json:"status" form:"status"`
  130. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  131. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  132. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  133. Patient string `gorm:"-" json:"patient" form:"patient"`
  134. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  135. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  136. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  137. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  138. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  139. DialysisSolution []*DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  140. }
  141. func (WeekSchedule) TableName() string {
  142. return "xt_schedule"
  143. }
  144. type ScheduleTemplate struct {
  145. ID int64 `gorm:"column:id" json:"id" form:"id"`
  146. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  147. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  148. Status int64 `gorm:"column:status" json:"status" form:"status"`
  149. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  150. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  151. }
  152. func (ScheduleTemplate) TableName() string {
  153. return "xt_schedule_template"
  154. }
  155. type XtDataPrint struct {
  156. ID int64 `gorm:"column:id" json:"id" form:"id"`
  157. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  158. Status int64 `gorm:"column:status" json:"status" form:"status"`
  159. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  160. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  161. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  162. }
  163. func (XtDataPrint) TableName() string {
  164. return "xt_data_print"
  165. }
  166. type VmSchedulesRemind struct {
  167. ID int64 `gorm:"column:id" json:"id" form:"id"`
  168. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  169. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  170. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  171. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  172. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  173. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  174. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  175. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  176. Status int64 `gorm:"column:status" json:"status" form:"status"`
  177. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  178. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  179. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  180. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  181. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  182. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  183. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  184. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  185. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  186. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  187. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  188. }
  189. func (VmSchedulesRemind) TableName() string {
  190. return "xt_schedule"
  191. }