schedule_models.go 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. }
  24. func (VmSchedules) TableName() string {
  25. return "xt_schedule"
  26. }
  27. type Schedule struct {
  28. ID int64 `gorm:"column:id" json:"id" form:"id"`
  29. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  30. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  31. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  32. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  33. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  34. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  35. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  36. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  37. Status int64 `gorm:"column:status" json:"status" form:"status"`
  38. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  39. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  40. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  41. Patient string `gorm:"-" json:"patient" form:"patient"`
  42. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  43. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  44. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  45. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  46. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  47. }
  48. func (Schedule) TableName() string {
  49. return "xt_schedule"
  50. }
  51. type SchedulePatients struct {
  52. ID int64 `gorm:"column:id" json:"id" form:"id"`
  53. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  54. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  55. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  56. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  57. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  58. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  59. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  60. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  61. Status int64 `gorm:"column:status" json:"status" form:"status"`
  62. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  63. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  64. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  65. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  66. }
  67. func (SchedulePatients) TableName() string {
  68. return "xt_schedule"
  69. }
  70. type PatientSchedule struct {
  71. Schedule
  72. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  73. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  74. Week int64 `gorm:"-" json:"week" form:"week"`
  75. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  76. }
  77. type Partition struct {
  78. DeviceZone
  79. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  80. }
  81. type Search_Schedule struct {
  82. ID int64 `gorm:"column:id" json:"id" form:"id"`
  83. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  84. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  85. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  86. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  87. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  88. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  89. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  90. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  91. Status int64 `gorm:"column:status" json:"status" form:"status"`
  92. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  93. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  94. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  95. Patient string `gorm:"-" json:"patient" form:"patient"`
  96. }
  97. func (Search_Schedule) TableName() string {
  98. return "xt_schedule"
  99. }
  100. type WeekSchedule 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. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  116. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  117. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  118. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  119. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  120. }
  121. func (WeekSchedule) TableName() string {
  122. return "xt_schedule"
  123. }
  124. type ScheduleTemplate struct {
  125. ID int64 `gorm:"column:id" json:"id" form:"id"`
  126. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  127. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  128. Status int64 `gorm:"column:status" json:"status" form:"status"`
  129. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  130. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  131. }
  132. func (ScheduleTemplate) TableName() string {
  133. return "xt_schedule_template"
  134. }