schedule_models.go 54KB

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