schedule_models.go 54KB

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