schedule_models.go 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  123. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  124. }
  125. func (WeekSchedule) TableName() string {
  126. return "xt_schedule"
  127. }
  128. type ScheduleTemplate struct {
  129. ID int64 `gorm:"column:id" json:"id" form:"id"`
  130. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  131. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  132. Status int64 `gorm:"column:status" json:"status" form:"status"`
  133. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  134. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  135. }
  136. func (ScheduleTemplate) TableName() string {
  137. return "xt_schedule_template"
  138. }
  139. type XtDataPrint struct {
  140. ID int64 `gorm:"column:id" json:"id" form:"id"`
  141. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  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. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  145. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  146. }
  147. func (XtDataPrint) TableName() string {
  148. return "xt_data_print"
  149. }
  150. type VmSchedulesRemind struct {
  151. ID int64 `gorm:"column:id" json:"id" form:"id"`
  152. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  153. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  154. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  155. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  156. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  157. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  158. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  159. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  160. Status int64 `gorm:"column:status" json:"status" form:"status"`
  161. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  162. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  163. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  164. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  165. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  166. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  167. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  168. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  169. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  170. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  171. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  172. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:AssessmentDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  173. }
  174. func (VmSchedulesRemind) TableName() string {
  175. return "xt_schedule"
  176. }