schedule_models.go 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. package models
  2. type VmSchedules 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. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  6. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  7. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  8. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  9. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  10. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  11. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  12. Status int64 `gorm:"column:status" json:"status" form:"status"`
  13. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  14. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  15. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  16. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  17. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  18. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  19. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  20. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  21. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  22. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  23. DialysisSolution []*DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  24. }
  25. func (VmSchedules) TableName() string {
  26. return "xt_schedule"
  27. }
  28. type Schedule struct {
  29. ID int64 `gorm:"column:id" json:"id" form:"id"`
  30. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  31. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  32. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  33. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  34. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  35. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  36. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  37. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  38. Status int64 `gorm:"column:status" json:"status" form:"status"`
  39. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  40. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  41. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  42. Patient string `gorm:"-" json:"patient" form:"patient"`
  43. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  44. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  45. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  46. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  47. DialysisPrescription DialysisPrescription `json:"dialysis_prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  48. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  49. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  50. }
  51. func (Schedule) TableName() string {
  52. return "xt_schedule"
  53. }
  54. type SchedulePatients struct {
  55. ID int64 `gorm:"column:id" json:"id" form:"id"`
  56. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  57. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  58. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  59. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  60. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  61. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  62. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  63. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  64. Status int64 `gorm:"column:status" json:"status" form:"status"`
  65. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  66. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  67. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  68. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  69. }
  70. func (SchedulePatients) TableName() string {
  71. return "xt_schedule"
  72. }
  73. type PatientSchedule struct {
  74. Schedule
  75. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  76. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  77. Week int64 `gorm:"-" json:"week" form:"week"`
  78. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  79. }
  80. type Partition struct {
  81. DeviceZone
  82. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  83. }
  84. type Search_Schedule struct {
  85. ID int64 `gorm:"column:id" json:"id" form:"id"`
  86. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  87. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  88. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  89. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  90. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  91. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  92. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  93. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  94. Status int64 `gorm:"column:status" json:"status" form:"status"`
  95. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  96. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  97. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  98. Patient string `gorm:"-" json:"patient" form:"patient"`
  99. }
  100. func (Search_Schedule) TableName() string {
  101. return "xt_schedule"
  102. }
  103. type WeekSchedule struct {
  104. ID int64 `gorm:"column:id" json:"id" form:"id"`
  105. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  106. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  107. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  108. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  109. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  110. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  111. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  112. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  113. Status int64 `gorm:"column:status" json:"status" form:"status"`
  114. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  115. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  116. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  117. Patient string `gorm:"-" json:"patient" form:"patient"`
  118. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  119. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  120. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  121. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  122. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  123. Solution []*DialysisSolution `json:"solution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  124. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  125. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  126. }
  127. func (WeekSchedule) TableName() string {
  128. return "xt_schedule"
  129. }
  130. type ScheduleTemplate struct {
  131. ID int64 `gorm:"column:id" json:"id" form:"id"`
  132. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  133. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  134. Status int64 `gorm:"column:status" json:"status" form:"status"`
  135. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  136. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  137. }
  138. func (ScheduleTemplate) TableName() string {
  139. return "xt_schedule_template"
  140. }
  141. type XtDataPrint struct {
  142. ID int64 `gorm:"column:id" json:"id" form:"id"`
  143. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  144. Status int64 `gorm:"column:status" json:"status" form:"status"`
  145. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  146. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  147. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  148. }
  149. func (XtDataPrint) TableName() string {
  150. return "xt_data_print"
  151. }
  152. type VmSchedulesRemind struct {
  153. ID int64 `gorm:"column:id" json:"id" form:"id"`
  154. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  155. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  156. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  157. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  158. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  159. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  160. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  161. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  162. Status int64 `gorm:"column:status" json:"status" form:"status"`
  163. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  164. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  165. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  166. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  167. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  168. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  169. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  170. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  171. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  172. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  173. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  174. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  175. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  176. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  177. }
  178. func (VmSchedulesRemind) TableName() string {
  179. return "xt_schedule"
  180. }
  181. type WeekScheduleSix struct {
  182. ID int64 `gorm:"column:id" json:"id" form:"id"`
  183. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  184. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  185. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  186. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  187. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  188. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  189. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  190. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  191. Status int64 `gorm:"column:status" json:"status" form:"status"`
  192. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  193. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  194. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  195. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  196. Gender string `gorm:"-" json:"gender" form:"gender"`
  197. Phone string `gorm:"-" json:"phone" form:"phone"`
  198. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  199. Patient string `gorm:"-" json:"patient" form:"patient"`
  200. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  201. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  202. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  203. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  204. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  205. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  206. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  207. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  208. }
  209. func (WeekScheduleSix) TableName() string {
  210. return "xt_schedule"
  211. }
  212. type BlodSchedule struct {
  213. ID int64 `gorm:"column:id" json:"id" form:"id"`
  214. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  215. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  216. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  217. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  218. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  219. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  220. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  221. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  222. Status int64 `gorm:"column:status" json:"status" form:"status"`
  223. VmBloodPatients VmBloodPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  224. BloodDialysisOrder BloodPatientDialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  225. BloodDialysisPrescription BloodDialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  226. }
  227. func (BlodSchedule) TableName() string {
  228. return "xt_schedule"
  229. }
  230. type BloodPatientDialysisOrder struct {
  231. ID int64 `gorm:"column:id" json:"id" form:"id"`
  232. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  233. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  234. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  235. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  236. }
  237. func (BloodPatientDialysisOrder) TableName() string {
  238. return "xt_dialysis_order"
  239. }
  240. type BloodPatientDialysisPrescription struct {
  241. ID int64 `gorm:"column:id" json:"id" form:"id"`
  242. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  243. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  244. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  245. DialysisDialyszers string `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  246. DialysisIrrigation string `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  247. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  248. }
  249. func (BloodPatientDialysisPrescription) TableName() string {
  250. return "xt_dialysis_prescription"
  251. }
  252. type VmBloodPatients struct {
  253. ID int64 `gorm:"column:id" json:"id" form:"id"`
  254. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  255. Name string `gorm:"column:name" json:"name" form:"name"`
  256. }
  257. func (VmBloodPatients) TableName() string {
  258. return "xt_patients"
  259. }
  260. type VmBloodSchedule struct {
  261. ID int64 `gorm:"column:id" json:"id" form:"id"`
  262. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  263. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  264. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  265. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  266. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  267. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  268. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  269. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  270. Status int64 `gorm:"column:status" json:"status" form:"status"`
  271. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  272. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  273. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  274. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  275. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  276. DialysisSolution DialysisSolution `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"dialysis_solution"`
  277. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  278. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"assessment_befor_dislysis"`
  279. XtDoctorAdvice XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  280. HisDoctorAdvice HisDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  281. ReceiveTreatmentAsses ReceiveTreatmentAsses `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_receive_treatment_asses"`
  282. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  283. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  284. }
  285. func (VmBloodSchedule) TableName() string {
  286. return "xt_schedule"
  287. }
  288. type NewMDeviceNumberVM struct {
  289. DeviceNumber
  290. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  291. }
  292. func (NewMDeviceNumberVM) TableName() string {
  293. return "xt_device_number"
  294. }
  295. type NewMSchedualPatientVMList struct {
  296. ID int64 `gorm:"column:id" json:"id" form:"id"`
  297. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  298. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  299. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  300. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  301. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  302. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  303. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  304. Age int64 `gorm:"column:age" json:"age"`
  305. Name string `gorm:"column:name" json:"name" form:"name"`
  306. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  307. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  308. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  309. Status int64 `gorm:"column:status" json:"status" form:"status"`
  310. }
  311. func (NewMSchedualPatientVMList) TableName() string {
  312. return "xt_patients"
  313. }
  314. type VmBloodScheduleTwo struct {
  315. ID int64 `gorm:"column:id" json:"id" form:"id"`
  316. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  317. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  318. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  319. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  320. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  321. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  322. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  323. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  324. Status int64 `gorm:"column:status" json:"status" form:"status"`
  325. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  326. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  327. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  328. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  329. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  330. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,Mode;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  331. }
  332. func (VmBloodScheduleTwo) TableName() string {
  333. return "xt_schedule"
  334. }
  335. type VmBloodScheduleThree struct {
  336. ID int64 `gorm:"column:id" json:"id" form:"id"`
  337. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  338. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  339. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  340. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  341. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  342. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  343. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  344. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  345. Status int64 `gorm:"column:status" json:"status" form:"status"`
  346. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  347. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  348. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  349. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  350. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  351. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  352. }
  353. func (VmBloodScheduleThree) TableName() string {
  354. return "xt_schedule"
  355. }
  356. type HisPrescriptionTemplateSix struct {
  357. ID int64 `gorm:"column:id" json:"id" form:"id"`
  358. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  359. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  360. Type int64 `gorm:"column:type" json:"type" form:"type"`
  361. Status int64 `gorm:"column:status" json:"status" form:"status"`
  362. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  363. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  364. Name string `gorm:"column:name" json:"name" form:"name"`
  365. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  366. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  367. }
  368. func (HisPrescriptionTemplateSix) TableName() string {
  369. return "his_prescription_template"
  370. }
  371. type HisPrescriptionInfoTemplateSix struct {
  372. ID int64 `gorm:"column:id" json:"id" form:"id"`
  373. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  374. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  375. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  376. Status int64 `gorm:"column:status" json:"status" form:"status"`
  377. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  378. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  379. Type int64 `gorm:"column:type" json:"type" form:"type"`
  380. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  381. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  382. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  383. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  384. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  385. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"his_advice"`
  386. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  387. }
  388. func (HisPrescriptionInfoTemplateSix) TableName() string {
  389. return "his_prescription_info_template"
  390. }
  391. type HisPrescriptionProjectTemplateSeven struct {
  392. ID int64 `gorm:"column:id" json:"id" form:"id"`
  393. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  394. Price float64 `gorm:"column:price" json:"price" form:"price"`
  395. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  396. Status int64 `gorm:"column:status" json:"status" form:"status"`
  397. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  398. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  399. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  400. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  401. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  402. Count string `gorm:"column:count" json:"count" form:"count"`
  403. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  404. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  405. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  406. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  407. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  408. Day string `gorm:"column:day" json:"day" form:"day"`
  409. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  410. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  411. Type int64 `gorm:"column:type" json:"type" form:"type"`
  412. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  413. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  414. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  415. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  416. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  417. }
  418. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  419. return "his_prescription_project_template"
  420. }
  421. type GoodInfoNight struct {
  422. ID int64 `gorm:"column:id" json:"id" form:"id"`
  423. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  424. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  425. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  426. }
  427. func (GoodInfoNight) TableName() string {
  428. return "xt_good_information"
  429. }
  430. type ScheduleTwenty struct {
  431. ID int64 `gorm:"column:id" json:"id" form:"id"`
  432. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  433. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  434. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  435. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  436. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  437. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  438. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  439. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  440. Status int64 `gorm:"column:status" json:"status" form:"status"`
  441. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  442. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  443. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  444. Patient string `gorm:"-" json:"patient" form:"patient"`
  445. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  446. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  447. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  448. DialysisOrderTwenty DialysisOrderTwenty `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  449. }
  450. func (ScheduleTwenty) TableName() string {
  451. return "xt_schedule"
  452. }
  453. type ScheduleTwentyOne struct {
  454. ID int64 `gorm:"column:id" json:"id" form:"id"`
  455. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  456. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  457. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  458. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  459. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  460. Status int64 `gorm:"column:status" json:"status" form:"status"`
  461. }
  462. func (ScheduleTwentyOne) TableName() string {
  463. return "xt_schedule"
  464. }
  465. type VmBloodScheduleOne struct {
  466. ID int64 `gorm:"column:id" json:"id" form:"id"`
  467. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  468. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  469. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  470. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  471. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  472. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  473. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  474. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  475. Status int64 `gorm:"column:status" json:"status" form:"status"`
  476. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  477. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  478. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  479. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  480. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  481. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  482. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  483. }
  484. func (VmBloodScheduleOne) TableName() string {
  485. return "xt_schedule"
  486. }