schedule_models.go 57KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  351. }
  352. func (VmBloodSchedule) TableName() string {
  353. return "xt_schedule"
  354. }
  355. type NewMDeviceNumberVM struct {
  356. DeviceNumber
  357. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  358. }
  359. func (NewMDeviceNumberVM) TableName() string {
  360. return "xt_device_number"
  361. }
  362. type NewMSchedualPatientVMList struct {
  363. ID int64 `gorm:"column:id" json:"id" form:"id"`
  364. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  365. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  366. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  367. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  368. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  369. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  370. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  371. Age int64 `gorm:"column:age" json:"age"`
  372. Name string `gorm:"column:name" json:"name" form:"name"`
  373. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  374. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  375. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  376. Status int64 `gorm:"column:status" json:"status" form:"status"`
  377. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  378. }
  379. func (NewMSchedualPatientVMList) TableName() string {
  380. return "xt_patients"
  381. }
  382. type VmBloodScheduleTwo struct {
  383. ID int64 `gorm:"column:id" json:"id" form:"id"`
  384. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  385. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  386. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  387. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  388. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  389. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  390. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  391. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  392. Status int64 `gorm:"column:status" json:"status" form:"status"`
  393. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  394. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  395. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  396. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  397. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  398. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,Mode;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  399. }
  400. func (VmBloodScheduleTwo) TableName() string {
  401. return "xt_schedule"
  402. }
  403. type VmBloodScheduleThree struct {
  404. ID int64 `gorm:"column:id" json:"id" form:"id"`
  405. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  406. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  407. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  408. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  409. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  410. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  411. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  412. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  413. Status int64 `gorm:"column:status" json:"status" form:"status"`
  414. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  415. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  416. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  417. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  418. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  419. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  420. }
  421. func (VmBloodScheduleThree) TableName() string {
  422. return "xt_schedule"
  423. }
  424. type HisPrescriptionTemplateSix struct {
  425. ID int64 `gorm:"column:id" json:"id" form:"id"`
  426. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  427. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  428. Type int64 `gorm:"column:type" json:"type" form:"type"`
  429. Status int64 `gorm:"column:status" json:"status" form:"status"`
  430. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  431. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  432. Name string `gorm:"column:name" json:"name" form:"name"`
  433. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  434. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  435. }
  436. func (HisPrescriptionTemplateSix) TableName() string {
  437. return "his_prescription_template"
  438. }
  439. type HisPrescriptionInfoTemplateSix struct {
  440. ID int64 `gorm:"column:id" json:"id" form:"id"`
  441. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  442. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  443. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  444. Status int64 `gorm:"column:status" json:"status" form:"status"`
  445. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  446. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  447. Type int64 `gorm:"column:type" json:"type" form:"type"`
  448. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  449. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  450. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  451. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  452. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  453. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"his_advice"`
  454. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  455. }
  456. func (HisPrescriptionInfoTemplateSix) TableName() string {
  457. return "his_prescription_info_template"
  458. }
  459. type HisPrescriptionProjectTemplateSeven struct {
  460. ID int64 `gorm:"column:id" json:"id" form:"id"`
  461. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  462. Price float64 `gorm:"column:price" json:"price" form:"price"`
  463. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  464. Status int64 `gorm:"column:status" json:"status" form:"status"`
  465. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  466. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  467. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  468. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  469. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  470. Count string `gorm:"column:count" json:"count" form:"count"`
  471. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  472. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  473. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  474. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  475. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  476. Day string `gorm:"column:day" json:"day" form:"day"`
  477. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  478. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  479. Type int64 `gorm:"column:type" json:"type" form:"type"`
  480. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  481. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  482. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  483. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  484. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  485. }
  486. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  487. return "his_prescription_project_template"
  488. }
  489. type GoodInfoNight struct {
  490. ID int64 `gorm:"column:id" json:"id" form:"id"`
  491. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  492. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  493. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  494. }
  495. func (GoodInfoNight) TableName() string {
  496. return "xt_good_information"
  497. }
  498. type ScheduleTwenty struct {
  499. ID int64 `gorm:"column:id" json:"id" form:"id"`
  500. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  501. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  502. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  503. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  504. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  505. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  506. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  507. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  508. Status int64 `gorm:"column:status" json:"status" form:"status"`
  509. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  510. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  511. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  512. Patient string `gorm:"-" json:"patient" form:"patient"`
  513. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  514. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  515. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  516. DialysisOrderTwenty DialysisOrderTwenty `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  517. }
  518. func (ScheduleTwenty) TableName() string {
  519. return "xt_schedule"
  520. }
  521. type ScheduleTwentyOne struct {
  522. ID int64 `gorm:"column:id" json:"id" form:"id"`
  523. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  524. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  525. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  526. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  527. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  528. Status int64 `gorm:"column:status" json:"status" form:"status"`
  529. }
  530. func (ScheduleTwentyOne) TableName() string {
  531. return "xt_schedule"
  532. }
  533. type VmBloodScheduleOne struct {
  534. ID int64 `gorm:"column:id" json:"id" form:"id"`
  535. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  536. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  537. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  538. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  539. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  540. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  541. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  542. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  543. Status int64 `gorm:"column:status" json:"status" form:"status"`
  544. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  545. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  546. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  547. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  548. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  549. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  550. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  551. }
  552. func (VmBloodScheduleOne) TableName() string {
  553. return "xt_schedule"
  554. }
  555. type VmNewSchedulesRemind struct {
  556. ID int64 `gorm:"column:id" json:"id" form:"id"`
  557. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  558. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  559. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  560. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  561. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  562. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  563. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  564. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  565. Status int64 `gorm:"column:status" json:"status" form:"status"`
  566. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  567. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  568. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  569. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  570. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  571. DialysisOrder NewDialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  572. XtPatients XtNewPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  573. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  574. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  575. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  576. DialysisSolution NewDialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  577. XtAssessmentBeforeDislysis XtNewAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  578. LastAfterWeight NewAssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  579. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  580. }
  581. func (VmNewSchedulesRemind) TableName() string {
  582. return "xt_schedule"
  583. }
  584. type WeekScheduleSeven struct {
  585. ID int64 `gorm:"column:id" json:"id" form:"id"`
  586. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  587. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  588. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  589. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  590. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  591. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  592. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  593. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  594. Status int64 `gorm:"column:status" json:"status" form:"status"`
  595. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  596. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  597. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  598. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  599. Gender string `gorm:"-" json:"gender" form:"gender"`
  600. Phone string `gorm:"-" json:"phone" form:"phone"`
  601. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  602. Patient string `gorm:"-" json:"patient" form:"patient"`
  603. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  604. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  605. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  606. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  607. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  608. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  609. }
  610. func (WeekScheduleSeven) TableName() string {
  611. return "xt_schedule"
  612. }
  613. type ScheduleNewPatients struct {
  614. ID int64 `gorm:"column:id" json:"id" form:"id"`
  615. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  616. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  617. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  618. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  619. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  620. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  621. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  622. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  623. Status int64 `gorm:"column:status" json:"status" form:"status"`
  624. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  625. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  626. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  627. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  628. }
  629. func (ScheduleNewPatients) TableName() string {
  630. return "xt_schedule"
  631. }
  632. type MySchedule struct {
  633. ID int64 `gorm:"column:id" json:"id" form:"id"`
  634. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  635. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  636. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  637. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  638. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  639. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  640. Status int64 `gorm:"column:status" json:"status" form:"status"`
  641. Count int64
  642. }
  643. func (MySchedule) TableName() string {
  644. return "xt_schedule"
  645. }
  646. type MyVmBloodSchedule struct {
  647. ID int64 `gorm:"column:id" json:"id" form:"id"`
  648. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  649. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  650. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  651. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  652. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  653. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  654. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  655. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  656. Status int64 `gorm:"column:status" json:"status" form:"status"`
  657. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  658. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  659. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  660. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  661. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  662. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  663. MonitoringRecord MonitoringRecord `gorm:"ForeignKey:PatientId,MonitoringDate;AssociationForeignKey:PatientId,ScheduleDate" json:"monitor_record"`
  664. }
  665. func (MyVmBloodSchedule) TableName() string {
  666. return "xt_schedule"
  667. }
  668. type ScheduleConfig struct {
  669. ID int64 `gorm:"column:id" json:"id" form:"id"`
  670. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  671. IsShowMode int64 `gorm:"column:is_show_mode" json:"is_show_mode" form:"is_show_mode"`
  672. Status int64 `gorm:"column:status" json:"status" form:"status"`
  673. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  674. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  675. IsShowMachine int64 `gorm:"column:is_show_machine" json:"is_show_machine" form:"is_show_machine"`
  676. }
  677. func (ScheduleConfig) TableName() string {
  678. return "xt_schedule_config"
  679. }
  680. type VmLongBloodSchedule struct {
  681. ID int64 `gorm:"column:id" json:"id" form:"id"`
  682. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  683. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  684. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  685. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  686. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  687. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  688. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  689. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  690. Status int64 `gorm:"column:status" json:"status" form:"status"`
  691. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  692. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  693. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  694. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  695. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  696. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"xt_doctor_advice"`
  697. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  698. }
  699. func (VmLongBloodSchedule) TableName() string {
  700. return "xt_schedule"
  701. }