schedule_models.go 52KB

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