schedule_models.go 58KB

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