new_monitor.go 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package models
  2. type NewVMMonitorDialysisSchedule struct {
  3. ID int64 `gorm:"column:id" json:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  5. PartitionId int64 `gorm:"column:partition_id" json:"partition_id"`
  6. BedId int64 `gorm:"column:bed_id" json:"bed_id"`
  7. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  8. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date"`
  9. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type"`
  10. ModeId int64 `gorm:"column:mode_id" json:"mode_id"`
  11. Status int64 `gorm:"column:status" json:"status"`
  12. MonitorPatients *VMMonitorPatients `gorm:"ForeignKey:PatientId" json:"patient"`
  13. DeviceNumber *DeviceNumber `gorm:"ForeignKey:BedId" json:"device_number"`
  14. DeviceZone *DeviceZone `gorm:"ForeignKey:PartitionId" json:"device_zone"`
  15. TreatmentMode *TreatmentMode `gorm:"ForeignKey:ModeId" json:"treatment_mode"`
  16. DialysisOrder *VMMonitorDialysisOrder `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"dialysis_order"`
  17. Prescription *VMDialysisPrescription `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"prescription"`
  18. AssessmentBeforeDislysis *VMPredialysisEvaluation `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"assessment_before_dislysis"`
  19. AssessmentAfterDislysis *VMAssessmentAfterDislysis `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"assessment_after_dislysis"`
  20. MonitoringRecord []*VMMonitoringRecord `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
  21. }
  22. func (NewVMMonitorDialysisSchedule) TableName() string {
  23. return "xt_schedule"
  24. }
  25. type VMMonitorPatients struct {
  26. ID int64 `gorm:"column:id" json:"id" form:"id"`
  27. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  28. Name string `gorm:"column:name" json:"name" form:"name"`
  29. Status int64 `gorm:"column:status" json:"status" form:"status"`
  30. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  31. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  32. }
  33. func (VMMonitorPatients) TableName() string {
  34. return "xt_patients"
  35. }
  36. type VMMonitorDialysisOrder struct {
  37. ID int64 `gorm:"column:id" json:"id"`
  38. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date"`
  39. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  40. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  41. BedID int64 `gorm:"column:bed_id" json:"bed_id"`
  42. Status int64 `gorm:"column:status" json:"status"`
  43. DeviceNumber DeviceNumber `gorm:"ForeignKey:BedId" json:"device_number"`
  44. StartTime int64 `gorm:"column:start_time" json:"start_time"`
  45. }
  46. func (VMMonitorDialysisOrder) TableName() string {
  47. return "xt_dialysis_order"
  48. }
  49. type VMDialysisPrescription struct {
  50. ID int64 `gorm:"column:id" json:"id"`
  51. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  52. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  53. Status int64 `gorm:"column:status" json:"status"`
  54. RecordDate int64 `gorm:"column:record_date" json:"record_date"`
  55. TargetUltrafiltration float64 `gorm:"column:target_ultrafiltration" json:"target_ultrafiltration"`
  56. HemodialysisPipelines string `gorm:"column:hemodialysis_pipelines" json:"hemodialysis_pipelines" form:"hemodialysis_pipelines"`
  57. HemodialysisPipelinesCount float64 `gorm:"column:hemodialysis_pipelines_count" json:"hemodialysis_pipelines_count" form:"hemodialysis_pipelines_count"`
  58. PunctureNeedle string `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
  59. PunctureNeedleCount float64 `gorm:"column:puncture_needle_count" json:"puncture_needle_count" form:"puncture_needle_count"`
  60. Epo string `gorm:"column:epo" json:"epo" form:"epo"`
  61. EpoCount float64 `gorm:"column:epo_count" json:"epo_count" form:"epo_count"`
  62. }
  63. func (VMDialysisPrescription) TableName() string {
  64. return "xt_dialysis_prescription"
  65. }
  66. type VMPredialysisEvaluation struct {
  67. ID int64 `gorm:"column:id" json:"id"`
  68. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  69. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  70. AssessmentDate int64 `gorm:"column:assessment_date" json:"assessment_date"`
  71. WeighingBefore float64 `gorm:"column:weighing_before" json:"weighing_before"`
  72. WeightBefore float64 `gorm:"column:weight_before" json:"weight_before"`
  73. Status int64 `gorm:"column:status" json:"status"`
  74. }
  75. func (VMPredialysisEvaluation) TableName() string {
  76. return "xt_assessment_before_dislysis"
  77. }
  78. type VMAssessmentAfterDislysis struct {
  79. ID int64 `gorm:"column:id" json:"id"`
  80. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  81. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  82. AssessmentDate int64 `gorm:"column:assessment_date" json:"assessment_date"`
  83. WeightAfter float64 `gorm:"column:weight_after" json:"weight_after"`
  84. Status int64 `gorm:"column:status" json:"status"`
  85. }
  86. func (VMAssessmentAfterDislysis) TableName() string {
  87. return "xt_assessment_after_dislysis"
  88. }
  89. type VMMonitoringRecord struct {
  90. ID int64 `gorm:"column:id" json:"id"`
  91. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  92. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  93. MonitoringDate int64 `gorm:"column:monitoring_date" json:"monitoring_date"`
  94. SystolicBloodPressure float64 `gorm:"column:systolic_blood_pressure" json:"systolic_blood_pressure"`
  95. DiastolicBloodPressure float64 `gorm:"column:diastolic_blood_pressure" json:"diastolic_blood_pressure"`
  96. Status int64 `gorm:"column:status" json:"status"`
  97. AccumulatedBloodVolume float64 `gorm:"column:accumulated_blood_volume" json:"accumulated_blood_volume" form:"accumulated_blood_volume"`
  98. }
  99. func (VMMonitoringRecord) TableName() string {
  100. return "xt_monitoring_record"
  101. }