schedule_models.go 58KB

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