new_monitor.go 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. DialysisTotal int64 `gorm:"column:dialysis_total" json:"dialysis_total" form:"dialysis_total"`
  46. }
  47. func (VMMonitorDialysisOrder) TableName() string {
  48. return "xt_dialysis_order"
  49. }
  50. type VMDialysisPrescription struct {
  51. ID int64 `gorm:"column:id" json:"id"`
  52. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  53. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  54. Status int64 `gorm:"column:status" json:"status"`
  55. RecordDate int64 `gorm:"column:record_date" json:"record_date"`
  56. TargetUltrafiltration float64 `gorm:"column:target_ultrafiltration" json:"target_ultrafiltration"`
  57. HemodialysisPipelines string `gorm:"column:hemodialysis_pipelines" json:"hemodialysis_pipelines" form:"hemodialysis_pipelines"`
  58. HemodialysisPipelinesCount float64 `gorm:"column:hemodialysis_pipelines_count" json:"hemodialysis_pipelines_count" form:"hemodialysis_pipelines_count"`
  59. PunctureNeedle string `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
  60. PunctureNeedleCount float64 `gorm:"column:puncture_needle_count" json:"puncture_needle_count" form:"puncture_needle_count"`
  61. Epo string `gorm:"column:epo" json:"epo" form:"epo"`
  62. EpoCount float64 `gorm:"column:epo_count" json:"epo_count" form:"epo_count"`
  63. }
  64. func (VMDialysisPrescription) TableName() string {
  65. return "xt_dialysis_prescription"
  66. }
  67. type VMPredialysisEvaluation struct {
  68. ID int64 `gorm:"column:id" json:"id"`
  69. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  70. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  71. AssessmentDate int64 `gorm:"column:assessment_date" json:"assessment_date"`
  72. WeighingBefore float64 `gorm:"column:weighing_before" json:"weighing_before"`
  73. WeightBefore float64 `gorm:"column:weight_before" json:"weight_before"`
  74. Status int64 `gorm:"column:status" json:"status"`
  75. }
  76. func (VMPredialysisEvaluation) TableName() string {
  77. return "xt_assessment_before_dislysis"
  78. }
  79. type VMAssessmentAfterDislysis struct {
  80. ID int64 `gorm:"column:id" json:"id"`
  81. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  82. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  83. AssessmentDate int64 `gorm:"column:assessment_date" json:"assessment_date"`
  84. WeightAfter float64 `gorm:"column:weight_after" json:"weight_after"`
  85. Status int64 `gorm:"column:status" json:"status"`
  86. ActualUltrafiltration float64 `gorm:"column:actual_ultrafiltration" json:"actual_ultrafiltration" form:"actual_ultrafiltration"`
  87. }
  88. func (VMAssessmentAfterDislysis) TableName() string {
  89. return "xt_assessment_after_dislysis"
  90. }
  91. type VMMonitoringRecord struct {
  92. ID int64 `gorm:"column:id" json:"id"`
  93. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id"`
  94. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  95. MonitoringDate int64 `gorm:"column:monitoring_date" json:"monitoring_date"`
  96. SystolicBloodPressure float64 `gorm:"column:systolic_blood_pressure" json:"systolic_blood_pressure"`
  97. DiastolicBloodPressure float64 `gorm:"column:diastolic_blood_pressure" json:"diastolic_blood_pressure"`
  98. Status int64 `gorm:"column:status" json:"status"`
  99. AccumulatedBloodVolume float64 `gorm:"column:accumulated_blood_volume" json:"accumulated_blood_volume" form:"accumulated_blood_volume"`
  100. }
  101. func (VMMonitoringRecord) TableName() string {
  102. return "xt_monitoring_record"
  103. }