schedule_models.go 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 Schedule 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. Patient string `gorm:"-" json:"patient" form:"patient"`
  43. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  44. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  45. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  46. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  47. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  48. }
  49. func (Schedule) TableName() string {
  50. return "xt_schedule"
  51. }
  52. type SchedulePatients struct {
  53. ID int64 `gorm:"column:id" json:"id" form:"id"`
  54. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  55. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  56. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  57. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  58. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  59. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  60. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  61. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  62. Status int64 `gorm:"column:status" json:"status" form:"status"`
  63. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  64. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  65. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  66. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  67. }
  68. func (SchedulePatients) TableName() string {
  69. return "xt_schedule"
  70. }
  71. type PatientSchedule struct {
  72. Schedule
  73. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  74. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  75. Week int64 `gorm:"-" json:"week" form:"week"`
  76. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  77. }
  78. type Partition struct {
  79. DeviceZone
  80. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  81. }
  82. type Search_Schedule struct {
  83. ID int64 `gorm:"column:id" json:"id" form:"id"`
  84. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  85. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  86. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  87. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  88. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  89. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  90. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  91. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  92. Status int64 `gorm:"column:status" json:"status" form:"status"`
  93. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  94. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  95. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  96. Patient string `gorm:"-" json:"patient" form:"patient"`
  97. }
  98. func (Search_Schedule) TableName() string {
  99. return "xt_schedule"
  100. }
  101. type WeekSchedule struct {
  102. ID int64 `gorm:"column:id" json:"id" form:"id"`
  103. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  104. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  105. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  106. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  107. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  108. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  109. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  110. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  111. Status int64 `gorm:"column:status" json:"status" form:"status"`
  112. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  113. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  114. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  115. Patient string `gorm:"-" json:"patient" form:"patient"`
  116. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  117. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  118. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  119. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  120. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  121. DialysisSolution []*DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  122. }
  123. func (WeekSchedule) TableName() string {
  124. return "xt_schedule"
  125. }
  126. type ScheduleTemplate struct {
  127. ID int64 `gorm:"column:id" json:"id" form:"id"`
  128. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  129. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  130. Status int64 `gorm:"column:status" json:"status" form:"status"`
  131. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  132. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  133. }
  134. func (ScheduleTemplate) TableName() string {
  135. return "xt_schedule_template"
  136. }
  137. type XtDataPrint struct {
  138. ID int64 `gorm:"column:id" json:"id" form:"id"`
  139. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  140. Status int64 `gorm:"column:status" json:"status" form:"status"`
  141. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  142. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  143. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  144. }
  145. func (XtDataPrint) TableName() string {
  146. return "xt_data_print"
  147. }
  148. type VmSchedulesRemind struct {
  149. ID int64 `gorm:"column:id" json:"id" form:"id"`
  150. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  151. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  152. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  153. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  154. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  155. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  156. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  157. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  158. Status int64 `gorm:"column:status" json:"status" form:"status"`
  159. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  160. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  161. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  162. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  163. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  164. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  165. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  166. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  167. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  168. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  169. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  170. }
  171. func (VmSchedulesRemind) TableName() string {
  172. return "xt_schedule"
  173. }