smart_sch.go 5.9KB

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