smart_sch.go 5.7KB

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. //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:"-"`
  39. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  40. }
  41. func (SmartSchedule) TableName() string {
  42. return "xt_schedule"
  43. }
  44. type XtPatientScheduleTemplateId struct {
  45. ID int64 `gorm:"column:id" json:"id" form:"id"`
  46. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  47. Status int64 `gorm:"column:status" json:"status" form:"status"`
  48. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  49. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  50. Week int64 `gorm:"column:week" json:"week" form:"week"`
  51. XtPatientScheduleTemplateItem []*XtPatientScheduleTemplateItem `gorm:"foreignkey:TemplateId;AssociationForeignKey:ID;" json:"template" form:"template"`
  52. }
  53. func (XtPatientScheduleTemplateId) TableName() string {
  54. return "xt_patient_schedule_template_id"
  55. }
  56. type XtPatientScheduleTemplateItem struct {
  57. ID int64 `gorm:"column:id" json:"id" form:"id"`
  58. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  59. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  60. DeviceNumberId int64 `gorm:"column:device_number_id" json:"device_number_id" form:"device_number_id"`
  61. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  62. TreatMode int64 `gorm:"column:treat_mode" json:"treat_mode" form:"treat_mode"`
  63. Weekday int64 `gorm:"column:weekday" json:"weekday" form:"weekday"`
  64. TimeType int64 `gorm:"column:time_type" json:"time_type" form:"time_type"`
  65. Status int64 `gorm:"column:status" json:"status" form:"status"`
  66. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  67. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  68. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  69. ZoneId int64 `gorm:"-" json:"zone_id" form:"zone_id"`
  70. }
  71. func (XtPatientScheduleTemplateItem) TableName() string {
  72. return "xt_patient_schedule_template_item"
  73. }
  74. type SmSchDialysisOrder struct {
  75. ID int64 `gorm:"column:id" json:"id" form:"id"`
  76. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  77. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  78. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  79. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  80. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  81. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  82. StartNurse int64 `gorm:"column:start_nurse" json:"start_nurse" form:"start_nurse"`
  83. FinishNurse int64 `gorm:"column:finish_nurse" json:"finish_nurse" form:"finish_nurse"`
  84. Status int64 `gorm:"column:status" json:"status" form:"status"`
  85. }
  86. func (SmSchDialysisOrder) TableName() string {
  87. return "xt_dialysis_order"
  88. }