schedule_models.go 57KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  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 ScheduleTwo 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 string `gorm:"-" json:"patient" form:"patient"`
  69. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  70. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  71. DialysisSolution VmDialysisSolutionOne `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  72. }
  73. func (ScheduleTwo) TableName() string {
  74. return "xt_schedule"
  75. }
  76. type ScheduleThree struct {
  77. ID int64 `gorm:"column:id" json:"id" form:"id"`
  78. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  79. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  80. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  81. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  82. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  83. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  84. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  85. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  86. Status int64 `gorm:"column:status" json:"status" form:"status"`
  87. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  88. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  89. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  90. Patient string `gorm:"-" json:"patient" form:"patient"`
  91. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  92. DialysisSolution VmDialysisSolutionOne `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  93. SchedulePatientsOne SchedulePatientsOne `json:"next_schedule" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  94. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  95. }
  96. func (ScheduleThree) TableName() string {
  97. return "xt_schedule"
  98. }
  99. type SchedulePatientsOne struct {
  100. ID int64 `gorm:"column:id" json:"id" form:"id"`
  101. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  102. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  103. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  104. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  105. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  106. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  107. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  108. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  109. Status int64 `gorm:"column:status" json:"status" form:"status"`
  110. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  111. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  112. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  113. }
  114. func (SchedulePatientsOne) TableName() string {
  115. return "xt_schedule"
  116. }
  117. type SchedulePatients struct {
  118. ID int64 `gorm:"column:id" json:"id" form:"id"`
  119. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  120. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  121. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  122. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  123. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  124. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  125. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  126. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  127. Status int64 `gorm:"column:status" json:"status" form:"status"`
  128. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  129. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  130. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  131. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  132. }
  133. func (SchedulePatients) TableName() string {
  134. return "xt_schedule"
  135. }
  136. type PatientSchedule struct {
  137. Schedule
  138. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  139. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  140. Week int64 `gorm:"-" json:"week" form:"week"`
  141. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  142. }
  143. type Partition struct {
  144. DeviceZone
  145. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  146. }
  147. type Search_Schedule struct {
  148. ID int64 `gorm:"column:id" json:"id" form:"id"`
  149. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  150. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  151. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  152. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  153. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  154. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  155. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  156. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  157. Status int64 `gorm:"column:status" json:"status" form:"status"`
  158. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  159. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  160. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  161. Patient string `gorm:"-" json:"patient" form:"patient"`
  162. }
  163. func (Search_Schedule) TableName() string {
  164. return "xt_schedule"
  165. }
  166. type WeekSchedule struct {
  167. ID int64 `gorm:"column:id" json:"id" form:"id"`
  168. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  169. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  170. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  171. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  172. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  173. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  174. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  175. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  176. Status int64 `gorm:"column:status" json:"status" form:"status"`
  177. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  178. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  179. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  180. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  181. Patient string `gorm:"-" json:"patient" form:"patient"`
  182. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  183. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  184. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  185. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  186. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  187. Solution []*DialysisSolution `json:"solution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  188. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  189. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  190. }
  191. func (WeekSchedule) TableName() string {
  192. return "xt_schedule"
  193. }
  194. type ScheduleTemplate struct {
  195. ID int64 `gorm:"column:id" json:"id" form:"id"`
  196. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  197. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  198. Status int64 `gorm:"column:status" json:"status" form:"status"`
  199. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  200. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  201. }
  202. func (ScheduleTemplate) TableName() string {
  203. return "xt_schedule_template"
  204. }
  205. type XtDataPrint struct {
  206. ID int64 `gorm:"column:id" json:"id" form:"id"`
  207. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  208. Status int64 `gorm:"column:status" json:"status" form:"status"`
  209. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  210. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  211. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  212. }
  213. func (XtDataPrint) TableName() string {
  214. return "xt_data_print"
  215. }
  216. type VmSchedulesRemind struct {
  217. ID int64 `gorm:"column:id" json:"id" form:"id"`
  218. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  219. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  220. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  221. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  222. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  223. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  224. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  225. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  226. Status int64 `gorm:"column:status" json:"status" form:"status"`
  227. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  228. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  229. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  230. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  231. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  232. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  233. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  234. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  235. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  236. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  237. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  238. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  239. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  240. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  241. }
  242. func (VmSchedulesRemind) TableName() string {
  243. return "xt_schedule"
  244. }
  245. type WeekScheduleSix struct {
  246. ID int64 `gorm:"column:id" json:"id" form:"id"`
  247. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  248. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  249. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  250. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  251. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  252. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  253. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  254. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  255. Status int64 `gorm:"column:status" json:"status" form:"status"`
  256. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  257. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  258. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  259. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  260. Gender string `gorm:"-" json:"gender" form:"gender"`
  261. Phone string `gorm:"-" json:"phone" form:"phone"`
  262. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  263. Patient string `gorm:"-" json:"patient" form:"patient"`
  264. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  265. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  266. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  267. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  268. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  269. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  270. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  271. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  272. }
  273. func (WeekScheduleSix) TableName() string {
  274. return "xt_schedule"
  275. }
  276. type BlodSchedule struct {
  277. ID int64 `gorm:"column:id" json:"id" form:"id"`
  278. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  279. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  280. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  281. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  282. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  283. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  284. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  285. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  286. Status int64 `gorm:"column:status" json:"status" form:"status"`
  287. VmBloodPatients VmBloodPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  288. BloodDialysisOrder BloodPatientDialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  289. BloodDialysisPrescription BloodDialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  290. }
  291. func (BlodSchedule) TableName() string {
  292. return "xt_schedule"
  293. }
  294. type BloodPatientDialysisOrder struct {
  295. ID int64 `gorm:"column:id" json:"id" form:"id"`
  296. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  297. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  298. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  299. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  300. }
  301. func (BloodPatientDialysisOrder) TableName() string {
  302. return "xt_dialysis_order"
  303. }
  304. type BloodPatientDialysisPrescription struct {
  305. ID int64 `gorm:"column:id" json:"id" form:"id"`
  306. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  307. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  308. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  309. DialysisDialyszers string `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  310. DialysisIrrigation string `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  311. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  312. }
  313. func (BloodPatientDialysisPrescription) TableName() string {
  314. return "xt_dialysis_prescription"
  315. }
  316. type VmBloodPatients struct {
  317. ID int64 `gorm:"column:id" json:"id" form:"id"`
  318. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  319. Name string `gorm:"column:name" json:"name" form:"name"`
  320. FirstLetter string `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
  321. }
  322. func (VmBloodPatients) TableName() string {
  323. return "xt_patients"
  324. }
  325. type VmBloodSchedule struct {
  326. ID int64 `gorm:"column:id" json:"id" form:"id"`
  327. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  328. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  329. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  330. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  331. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  332. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  333. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  334. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  335. Status int64 `gorm:"column:status" json:"status" form:"status"`
  336. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  337. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  338. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  339. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  340. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  341. DialysisSolution DialysisSolution `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"dialysis_solution"`
  342. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  343. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"assessment_befor_dislysis"`
  344. XtDoctorAdvice XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  345. XtDoctorAdviceOne []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"advice"`
  346. HisDoctorAdvice HisDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  347. ReceiveTreatmentAsses ReceiveTreatmentAsses `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_receive_treatment_asses"`
  348. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  349. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  350. }
  351. func (VmBloodSchedule) TableName() string {
  352. return "xt_schedule"
  353. }
  354. type NewMDeviceNumberVM struct {
  355. DeviceNumber
  356. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  357. }
  358. func (NewMDeviceNumberVM) TableName() string {
  359. return "xt_device_number"
  360. }
  361. type NewMSchedualPatientVMList struct {
  362. ID int64 `gorm:"column:id" json:"id" form:"id"`
  363. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  364. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  365. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  366. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  367. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  368. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  369. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  370. Age int64 `gorm:"column:age" json:"age"`
  371. Name string `gorm:"column:name" json:"name" form:"name"`
  372. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  373. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  374. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  375. Status int64 `gorm:"column:status" json:"status" form:"status"`
  376. }
  377. func (NewMSchedualPatientVMList) TableName() string {
  378. return "xt_patients"
  379. }
  380. type VmBloodScheduleTwo struct {
  381. ID int64 `gorm:"column:id" json:"id" form:"id"`
  382. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  383. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  384. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  385. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  386. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  387. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  388. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  389. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  390. Status int64 `gorm:"column:status" json:"status" form:"status"`
  391. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  392. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  393. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  394. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  395. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  396. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,Mode;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  397. }
  398. func (VmBloodScheduleTwo) TableName() string {
  399. return "xt_schedule"
  400. }
  401. type VmBloodScheduleThree struct {
  402. ID int64 `gorm:"column:id" json:"id" form:"id"`
  403. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  404. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  405. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  406. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  407. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  408. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  409. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  410. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  411. Status int64 `gorm:"column:status" json:"status" form:"status"`
  412. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  413. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  414. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  415. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  416. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  417. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  418. }
  419. func (VmBloodScheduleThree) TableName() string {
  420. return "xt_schedule"
  421. }
  422. type HisPrescriptionTemplateSix struct {
  423. ID int64 `gorm:"column:id" json:"id" form:"id"`
  424. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  425. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  426. Type int64 `gorm:"column:type" json:"type" form:"type"`
  427. Status int64 `gorm:"column:status" json:"status" form:"status"`
  428. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  429. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  430. Name string `gorm:"column:name" json:"name" form:"name"`
  431. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  432. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  433. }
  434. func (HisPrescriptionTemplateSix) TableName() string {
  435. return "his_prescription_template"
  436. }
  437. type HisPrescriptionInfoTemplateSix struct {
  438. ID int64 `gorm:"column:id" json:"id" form:"id"`
  439. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  440. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  441. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  442. Status int64 `gorm:"column:status" json:"status" form:"status"`
  443. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  444. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  445. Type int64 `gorm:"column:type" json:"type" form:"type"`
  446. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  447. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  448. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  449. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  450. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  451. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"his_advice"`
  452. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  453. }
  454. func (HisPrescriptionInfoTemplateSix) TableName() string {
  455. return "his_prescription_info_template"
  456. }
  457. type HisPrescriptionProjectTemplateSeven struct {
  458. ID int64 `gorm:"column:id" json:"id" form:"id"`
  459. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  460. Price float64 `gorm:"column:price" json:"price" form:"price"`
  461. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  462. Status int64 `gorm:"column:status" json:"status" form:"status"`
  463. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  464. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  465. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  466. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  467. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  468. Count string `gorm:"column:count" json:"count" form:"count"`
  469. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  470. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  471. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  472. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  473. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  474. Day string `gorm:"column:day" json:"day" form:"day"`
  475. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  476. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  477. Type int64 `gorm:"column:type" json:"type" form:"type"`
  478. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  479. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  480. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  481. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  482. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  483. }
  484. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  485. return "his_prescription_project_template"
  486. }
  487. type GoodInfoNight struct {
  488. ID int64 `gorm:"column:id" json:"id" form:"id"`
  489. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  490. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  491. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  492. }
  493. func (GoodInfoNight) TableName() string {
  494. return "xt_good_information"
  495. }
  496. type ScheduleTwenty struct {
  497. ID int64 `gorm:"column:id" json:"id" form:"id"`
  498. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  499. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  500. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  501. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  502. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  503. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  504. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  505. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  506. Status int64 `gorm:"column:status" json:"status" form:"status"`
  507. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  508. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  509. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  510. Patient string `gorm:"-" json:"patient" form:"patient"`
  511. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  512. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  513. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  514. DialysisOrderTwenty DialysisOrderTwenty `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  515. }
  516. func (ScheduleTwenty) TableName() string {
  517. return "xt_schedule"
  518. }
  519. type ScheduleTwentyOne struct {
  520. ID int64 `gorm:"column:id" json:"id" form:"id"`
  521. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  522. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  523. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  524. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  525. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  526. Status int64 `gorm:"column:status" json:"status" form:"status"`
  527. }
  528. func (ScheduleTwentyOne) TableName() string {
  529. return "xt_schedule"
  530. }
  531. type VmBloodScheduleOne struct {
  532. ID int64 `gorm:"column:id" json:"id" form:"id"`
  533. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  534. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  535. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  536. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  537. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  538. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  539. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  540. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  541. Status int64 `gorm:"column:status" json:"status" form:"status"`
  542. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  543. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  544. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  545. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  546. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  547. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  548. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  549. }
  550. func (VmBloodScheduleOne) TableName() string {
  551. return "xt_schedule"
  552. }
  553. type VmNewSchedulesRemind struct {
  554. ID int64 `gorm:"column:id" json:"id" form:"id"`
  555. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  556. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  557. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  558. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  559. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  560. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  561. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  562. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  563. Status int64 `gorm:"column:status" json:"status" form:"status"`
  564. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  565. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  566. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  567. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  568. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  569. DialysisOrder NewDialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  570. XtPatients XtNewPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  571. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  572. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  573. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  574. DialysisSolution NewDialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  575. XtAssessmentBeforeDislysis XtNewAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  576. LastAfterWeight NewAssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  577. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  578. }
  579. func (VmNewSchedulesRemind) TableName() string {
  580. return "xt_schedule"
  581. }
  582. type WeekScheduleSeven struct {
  583. ID int64 `gorm:"column:id" json:"id" form:"id"`
  584. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  585. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  586. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  587. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  588. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  589. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  590. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  591. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  592. Status int64 `gorm:"column:status" json:"status" form:"status"`
  593. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  594. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  595. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  596. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  597. Gender string `gorm:"-" json:"gender" form:"gender"`
  598. Phone string `gorm:"-" json:"phone" form:"phone"`
  599. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  600. Patient string `gorm:"-" json:"patient" form:"patient"`
  601. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  602. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  603. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  604. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  605. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  606. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  607. }
  608. func (WeekScheduleSeven) TableName() string {
  609. return "xt_schedule"
  610. }
  611. type ScheduleNewPatients struct {
  612. ID int64 `gorm:"column:id" json:"id" form:"id"`
  613. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  614. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  615. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  616. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  617. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  618. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  619. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  620. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  621. Status int64 `gorm:"column:status" json:"status" form:"status"`
  622. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  623. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  624. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  625. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  626. }
  627. func (ScheduleNewPatients) TableName() string {
  628. return "xt_schedule"
  629. }
  630. type MySchedule struct {
  631. ID int64 `gorm:"column:id" json:"id" form:"id"`
  632. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  633. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  634. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  635. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  636. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  637. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  638. Status int64 `gorm:"column:status" json:"status" form:"status"`
  639. Count int64
  640. }
  641. func (MySchedule) TableName() string {
  642. return "xt_schedule"
  643. }
  644. type MyVmBloodSchedule struct {
  645. ID int64 `gorm:"column:id" json:"id" form:"id"`
  646. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  647. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  648. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  649. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  650. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  651. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  652. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  653. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  654. Status int64 `gorm:"column:status" json:"status" form:"status"`
  655. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  656. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  657. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  658. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  659. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  660. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  661. MonitoringRecord MonitoringRecord `gorm:"ForeignKey:PatientId,MonitoringDate;AssociationForeignKey:PatientId,ScheduleDate" json:"monitor_record"`
  662. }
  663. func (MyVmBloodSchedule) TableName() string {
  664. return "xt_schedule"
  665. }
  666. type ScheduleConfig struct {
  667. ID int64 `gorm:"column:id" json:"id" form:"id"`
  668. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  669. IsShowMode int64 `gorm:"column:is_show_mode" json:"is_show_mode" form:"is_show_mode"`
  670. Status int64 `gorm:"column:status" json:"status" form:"status"`
  671. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  672. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  673. IsShowMachine int64 `gorm:"column:is_show_machine" json:"is_show_machine" form:"is_show_machine"`
  674. }
  675. func (ScheduleConfig) TableName() string {
  676. return "xt_schedule_config"
  677. }
  678. type VmLongBloodSchedule struct {
  679. ID int64 `gorm:"column:id" json:"id" form:"id"`
  680. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  681. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  682. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  683. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  684. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  685. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  686. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  687. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  688. Status int64 `gorm:"column:status" json:"status" form:"status"`
  689. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  690. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  691. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  692. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  693. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  694. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"xt_doctor_advice"`
  695. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  696. }
  697. func (VmLongBloodSchedule) TableName() string {
  698. return "xt_schedule"
  699. }