smart_sch.go 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. package models
  2. type SmartSchPatient 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. Name string `gorm:"column:name" json:"name" form:"name"`
  6. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  7. SmartSchedule []*SmartSchedule `gorm:"-" json:"sch"`
  8. }
  9. func (SmartSchPatient) TableName() string {
  10. return "xt_patients"
  11. }
  12. type SmartSchTemplatePatient struct {
  13. ID int64 `gorm:"column:id" json:"id" form:"id"`
  14. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  15. Name string `gorm:"column:name" json:"name" form:"name"`
  16. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  17. XtPatientScheduleTemplateId []*XtPatientScheduleTemplateId
  18. }
  19. func (SmartSchTemplatePatient) TableName() string {
  20. return "xt_patients"
  21. }
  22. type SmartSchedule struct {
  23. ID int64 `gorm:"column:id" json:"id" form:"id"`
  24. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  25. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  26. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  27. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  28. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  29. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  30. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  31. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  32. Status int64 `gorm:"column:status" json:"status" form:"status"`
  33. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  34. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  35. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  36. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  37. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  38. SmSchDialysisOrder SmSchDialysisOrder `json:"order" gorm:"foreignkey:BedId,PatientId,DialysisDate;AssociationForeignKey:BedId,PatientId,ScheduleDate;"`
  39. }
  40. func (SmartSchedule) TableName() string {
  41. return "xt_schedule"
  42. }
  43. type XtPatientScheduleTemplateId struct {
  44. ID int64 `gorm:"column:id" json:"id" form:"id"`
  45. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  46. Status int64 `gorm:"column:status" json:"status" form:"status"`
  47. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  48. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  49. Week int64 `gorm:"column:week" json:"week" form:"week"`
  50. XtPatientScheduleTemplateItem []*XtPatientScheduleTemplateItem `gorm:"foreignkey:TemplateId;AssociationForeignKey:ID;" json:"template" form:"template"`
  51. }
  52. func (XtPatientScheduleTemplateId) TableName() string {
  53. return "xt_patient_schedule_template_id"
  54. }
  55. type XtPatientScheduleTemplateItem struct {
  56. ID int64 `gorm:"column:id" json:"id" form:"id"`
  57. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  58. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  59. DeviceNumberId int64 `gorm:"column:device_number_id" json:"device_number_id" form:"device_number_id"`
  60. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  61. TreatMode int64 `gorm:"column:treat_mode" json:"treat_mode" form:"treat_mode"`
  62. Weekday int64 `gorm:"column:weekday" json:"weekday" form:"weekday"`
  63. TimeType int64 `gorm:"column:time_type" json:"time_type" form:"time_type"`
  64. Status int64 `gorm:"column:status" json:"status" form:"status"`
  65. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  66. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  67. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  68. ZoneId int64 `gorm:"-" json:"zone_id" form:"zone_id"`
  69. }
  70. func (XtPatientScheduleTemplateItem) TableName() string {
  71. return "xt_patient_schedule_template_item"
  72. }
  73. type SmSchDialysisOrder struct {
  74. ID int64 `gorm:"column:id" json:"id" form:"id"`
  75. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  76. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  77. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  78. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  79. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  80. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  81. StartNurse int64 `gorm:"column:start_nurse" json:"start_nurse" form:"start_nurse"`
  82. FinishNurse int64 `gorm:"column:finish_nurse" json:"finish_nurse" form:"finish_nurse"`
  83. Status int64 `gorm:"column:status" json:"status" form:"status"`
  84. }
  85. func (SmSchDialysisOrder) TableName() string {
  86. return "xt_dialysis_order"
  87. }