schedule_models.go 62KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  1. package models
  2. type VmSchedules struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  5. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  6. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  7. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  8. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  9. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  10. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  11. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  12. Status int64 `gorm:"column:status" json:"status" form:"status"`
  13. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  14. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  15. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  16. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  17. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  18. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  19. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  20. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  21. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  22. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  23. DialysisSolution []*DialysisSolution `json:"dialysissolution" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  24. }
  25. func (VmSchedules) TableName() string {
  26. return "xt_schedule"
  27. }
  28. type Schedule struct {
  29. ID int64 `gorm:"column:id" json:"id" form:"id"`
  30. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  31. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  32. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  33. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  34. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  35. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  36. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  37. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  38. Status int64 `gorm:"column:status" json:"status" form:"status"`
  39. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  40. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  41. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  42. Patient string `gorm:"-" json:"patient" form:"patient"`
  43. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  44. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  45. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  46. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  47. DialysisPrescription DialysisPrescription `json:"dialysis_prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  48. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  49. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  50. }
  51. func (Schedule) TableName() string {
  52. return "xt_schedule"
  53. }
  54. type ScheduleTwo struct {
  55. ID int64 `gorm:"column:id" json:"id" form:"id"`
  56. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  57. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  58. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  59. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  60. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  61. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  62. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  63. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  64. Status int64 `gorm:"column:status" json:"status" form:"status"`
  65. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  66. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  67. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  68. Patient string `gorm:"-" json:"patient" form:"patient"`
  69. PatientInfectiousDiseases []InfectiousDiseases `json:"patient_contagions" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  70. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  71. DialysisSolution VmDialysisSolutionOne `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  72. }
  73. func (ScheduleTwo) TableName() string {
  74. return "xt_schedule"
  75. }
  76. type ScheduleThree struct {
  77. ID int64 `gorm:"column:id" json:"id" form:"id"`
  78. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  79. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  80. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  81. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  82. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  83. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  84. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  85. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  86. Status int64 `gorm:"column:status" json:"status" form:"status"`
  87. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  88. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  89. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  90. Patient string `gorm:"-" json:"patient" form:"patient"`
  91. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  92. DialysisSolution VmDialysisSolutionOne `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  93. SchedulePatientsOne SchedulePatientsOne `json:"next_schedule" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  94. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  95. }
  96. func (ScheduleThree) TableName() string {
  97. return "xt_schedule"
  98. }
  99. type SchedulePatientsOne struct {
  100. ID int64 `gorm:"column:id" json:"id" form:"id"`
  101. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  102. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  103. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  104. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  105. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  106. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  107. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  108. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  109. Status int64 `gorm:"column:status" json:"status" form:"status"`
  110. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  111. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  112. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  113. }
  114. func (SchedulePatientsOne) TableName() string {
  115. return "xt_schedule"
  116. }
  117. type SchedulePatients struct {
  118. ID int64 `gorm:"column:id" json:"id" form:"id"`
  119. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  120. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  121. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  122. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  123. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  124. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  125. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  126. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  127. Status int64 `gorm:"column:status" json:"status" form:"status"`
  128. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  129. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  130. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  131. Patient PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  132. }
  133. func (SchedulePatients) TableName() string {
  134. return "xt_schedule"
  135. }
  136. type XtTreatmentMode struct {
  137. ID int64 `gorm:"column:id" json:"id" form:"id"`
  138. Name string `gorm:"column:name" json:"name" form:"name"`
  139. DialysisDuration int64 `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
  140. ReplacementWay int64 `gorm:"column:replacement_way" json:"replacement_way" form:"replacement_way"`
  141. HemodialysisMachine int64 `gorm:"column:hemodialysis_machine" json:"hemodialysis_machine" form:"hemodialysis_machine"`
  142. BloodFilter int64 `gorm:"column:blood_filter" json:"blood_filter" form:"blood_filter"`
  143. PerfusionApparatus int64 `gorm:"column:perfusion_apparatus" json:"perfusion_apparatus" form:"perfusion_apparatus"`
  144. BloodFlowVolume int64 `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
  145. DialysateFlow int64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
  146. Kalium int64 `gorm:"column:kalium" json:"kalium" form:"kalium"`
  147. Sodium int64 `gorm:"column:sodium" json:"sodium" form:"sodium"`
  148. Calcium int64 `gorm:"column:calcium" json:"calcium" form:"calcium"`
  149. Bicarbonate int64 `gorm:"column:bicarbonate" json:"bicarbonate" form:"bicarbonate"`
  150. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  151. Status int64 `gorm:"column:status" json:"status" form:"status"`
  152. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  153. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  154. ModeID int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  155. }
  156. func (XtTreatmentMode) TableName() string {
  157. return "xt_treatment_mode"
  158. }
  159. type PatientSchedule struct {
  160. Schedule
  161. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  162. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  163. Week int64 `gorm:"-" json:"week" form:"week"`
  164. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  165. }
  166. type Partition struct {
  167. DeviceZone
  168. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  169. }
  170. type Search_Schedule struct {
  171. ID int64 `gorm:"column:id" json:"id" form:"id"`
  172. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  173. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  174. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  175. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  176. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  177. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  178. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  179. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  180. Status int64 `gorm:"column:status" json:"status" form:"status"`
  181. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  182. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  183. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  184. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  185. Patient string `gorm:"-" json:"patient" form:"patient"`
  186. }
  187. func (Search_Schedule) TableName() string {
  188. return "xt_schedule"
  189. }
  190. type WeekSchedule struct {
  191. ID int64 `gorm:"column:id" json:"id" form:"id"`
  192. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  193. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  194. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  195. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  196. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  197. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  198. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  199. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  200. Status int64 `gorm:"column:status" json:"status" form:"status"`
  201. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  202. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  203. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  204. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  205. Patient string `gorm:"-" json:"patient" form:"patient"`
  206. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  207. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  208. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  209. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  210. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  211. Solution []*DialysisSolution `json:"solution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  212. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  213. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  214. }
  215. func (WeekSchedule) TableName() string {
  216. return "xt_schedule"
  217. }
  218. type ScheduleTemplate struct {
  219. ID int64 `gorm:"column:id" json:"id" form:"id"`
  220. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  221. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  222. Status int64 `gorm:"column:status" json:"status" form:"status"`
  223. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  224. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  225. }
  226. func (ScheduleTemplate) TableName() string {
  227. return "xt_schedule_template"
  228. }
  229. type XtDataPrint struct {
  230. ID int64 `gorm:"column:id" json:"id" form:"id"`
  231. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  232. Status int64 `gorm:"column:status" json:"status" form:"status"`
  233. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  234. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  235. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  236. }
  237. func (XtDataPrint) TableName() string {
  238. return "xt_data_print"
  239. }
  240. type VmSchedulesRemind struct {
  241. ID int64 `gorm:"column:id" json:"id" form:"id"`
  242. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  243. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  244. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  245. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  246. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  247. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  248. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  249. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  250. Status int64 `gorm:"column:status" json:"status" form:"status"`
  251. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  252. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  253. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  254. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  255. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  256. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  257. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  258. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  259. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  260. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  261. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  262. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  263. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  264. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  265. HisPrescriptionTemplate HisPrescriptionTemplateSix `json:"his_prescription_template" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  266. }
  267. func (VmSchedulesRemind) TableName() string {
  268. return "xt_schedule"
  269. }
  270. type WeekScheduleSix struct {
  271. ID int64 `gorm:"column:id" json:"id" form:"id"`
  272. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  273. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  274. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  275. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  276. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  277. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  278. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  279. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  280. Status int64 `gorm:"column:status" json:"status" form:"status"`
  281. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  282. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  283. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  284. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  285. Gender string `gorm:"-" json:"gender" form:"gender"`
  286. Phone string `gorm:"-" json:"phone" form:"phone"`
  287. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  288. Patient string `gorm:"-" json:"patient" form:"patient"`
  289. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  290. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  291. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  292. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  293. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  294. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  295. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  296. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  297. }
  298. func (WeekScheduleSix) TableName() string {
  299. return "xt_schedule"
  300. }
  301. type BlodSchedule struct {
  302. ID int64 `gorm:"column:id" json:"id" form:"id"`
  303. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  304. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  305. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  306. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  307. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  308. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  309. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  310. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  311. Status int64 `gorm:"column:status" json:"status" form:"status"`
  312. VmBloodPatients VmBloodPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  313. BloodDialysisOrder BloodPatientDialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  314. BloodDialysisPrescription BloodDialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  315. }
  316. func (BlodSchedule) TableName() string {
  317. return "xt_schedule"
  318. }
  319. type BloodPatientDialysisOrder struct {
  320. ID int64 `gorm:"column:id" json:"id" form:"id"`
  321. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  322. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  323. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  324. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  325. }
  326. func (BloodPatientDialysisOrder) TableName() string {
  327. return "xt_dialysis_order"
  328. }
  329. type BloodPatientDialysisPrescription struct {
  330. ID int64 `gorm:"column:id" json:"id" form:"id"`
  331. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  332. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  333. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  334. DialysisDialyszers string `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  335. DialysisIrrigation string `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  336. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  337. }
  338. func (BloodPatientDialysisPrescription) TableName() string {
  339. return "xt_dialysis_prescription"
  340. }
  341. type VmBloodPatients struct {
  342. ID int64 `gorm:"column:id" json:"id" form:"id"`
  343. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  344. Name string `gorm:"column:name" json:"name" form:"name"`
  345. FirstLetter string `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
  346. }
  347. func (VmBloodPatients) TableName() string {
  348. return "xt_patients"
  349. }
  350. type VmBloodSchedule struct {
  351. ID int64 `gorm:"column:id" json:"id" form:"id"`
  352. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  353. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  354. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  355. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  356. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  357. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  358. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  359. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  360. Status int64 `gorm:"column:status" json:"status" form:"status"`
  361. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  362. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  363. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  364. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  365. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  366. DialysisSolution DialysisSolution `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"dialysis_solution"`
  367. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  368. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"assessment_befor_dislysis"`
  369. XtDoctorAdvice XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  370. XtDoctorAdviceOne []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"advice"`
  371. HisDoctorAdvice []*HisDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  372. ReceiveTreatmentAsses ReceiveTreatmentAsses `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_receive_treatment_asses"`
  373. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  374. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  375. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  376. }
  377. func (VmBloodSchedule) TableName() string {
  378. return "xt_schedule"
  379. }
  380. type NewMDeviceNumberVM struct {
  381. DeviceNumber
  382. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  383. }
  384. func (NewMDeviceNumberVM) TableName() string {
  385. return "xt_device_number"
  386. }
  387. type NewMSchedualPatientVMList struct {
  388. ID int64 `gorm:"column:id" json:"id" form:"id"`
  389. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  390. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  391. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  392. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  393. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  394. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  395. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  396. Age int64 `gorm:"column:age" json:"age"`
  397. Name string `gorm:"column:name" json:"name" form:"name"`
  398. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  399. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  400. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  401. Status int64 `gorm:"column:status" json:"status" form:"status"`
  402. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  403. }
  404. func (NewMSchedualPatientVMList) TableName() string {
  405. return "xt_patients"
  406. }
  407. type VmBloodScheduleTwo struct {
  408. ID int64 `gorm:"column:id" json:"id" form:"id"`
  409. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  410. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  411. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  412. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  413. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  414. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  415. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  416. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  417. Status int64 `gorm:"column:status" json:"status" form:"status"`
  418. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  419. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  420. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  421. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  422. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  423. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,Mode;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  424. HisPrescriptionProject []*HisPrescriptionProject `gorm:"ForeignKey:PatientId,schedule_date;AssociationForeignKey:PatientId,RecordDate" json:"his_prescription_project"`
  425. }
  426. func (VmBloodScheduleTwo) TableName() string {
  427. return "xt_schedule"
  428. }
  429. type VmBloodScheduleThree struct {
  430. ID int64 `gorm:"column:id" json:"id" form:"id"`
  431. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  432. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  433. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  434. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  435. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  436. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  437. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  438. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  439. Status int64 `gorm:"column:status" json:"status" form:"status"`
  440. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  441. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  442. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  443. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  444. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  445. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  446. }
  447. func (VmBloodScheduleThree) TableName() string {
  448. return "xt_schedule"
  449. }
  450. type HisPrescriptionTemplateSix struct {
  451. ID int64 `gorm:"column:id" json:"id" form:"id"`
  452. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  453. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  454. Type int64 `gorm:"column:type" json:"type" form:"type"`
  455. Status int64 `gorm:"column:status" json:"status" form:"status"`
  456. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  457. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  458. Name string `gorm:"column:name" json:"name" form:"name"`
  459. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  460. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  461. }
  462. func (HisPrescriptionTemplateSix) TableName() string {
  463. return "his_prescription_template"
  464. }
  465. type HisPrescriptionInfoTemplateSix struct {
  466. ID int64 `gorm:"column:id" json:"id" form:"id"`
  467. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  468. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  469. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  470. Status int64 `gorm:"column:status" json:"status" form:"status"`
  471. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  472. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  473. Type int64 `gorm:"column:type" json:"type" form:"type"`
  474. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  475. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  476. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  477. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  478. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  479. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"his_advice"`
  480. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  481. }
  482. func (HisPrescriptionInfoTemplateSix) TableName() string {
  483. return "his_prescription_info_template"
  484. }
  485. type HisPrescriptionProjectTemplateSeven struct {
  486. ID int64 `gorm:"column:id" json:"id" form:"id"`
  487. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  488. Price float64 `gorm:"column:price" json:"price" form:"price"`
  489. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  490. Status int64 `gorm:"column:status" json:"status" form:"status"`
  491. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  492. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  493. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  494. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  495. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  496. Count string `gorm:"column:count" json:"count" form:"count"`
  497. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  498. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  499. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  500. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  501. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  502. Day string `gorm:"column:day" json:"day" form:"day"`
  503. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  504. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  505. Type int64 `gorm:"column:type" json:"type" form:"type"`
  506. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  507. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  508. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  509. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  510. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  511. }
  512. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  513. return "his_prescription_project_template"
  514. }
  515. type GoodInfoNight struct {
  516. ID int64 `gorm:"column:id" json:"id" form:"id"`
  517. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  518. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  519. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  520. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  521. }
  522. func (GoodInfoNight) TableName() string {
  523. return "xt_good_information"
  524. }
  525. type ScheduleTwenty struct {
  526. ID int64 `gorm:"column:id" json:"id" form:"id"`
  527. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  528. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  529. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  530. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  531. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  532. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  533. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  534. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  535. Status int64 `gorm:"column:status" json:"status" form:"status"`
  536. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  537. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  538. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  539. Patient string `gorm:"-" json:"patient" form:"patient"`
  540. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  541. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  542. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  543. DialysisOrderTwenty DialysisOrderTwenty `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  544. }
  545. func (ScheduleTwenty) TableName() string {
  546. return "xt_schedule"
  547. }
  548. type ScheduleTwentyOne struct {
  549. ID int64 `gorm:"column:id" json:"id" form:"id"`
  550. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  551. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  552. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  553. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  554. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  555. Status int64 `gorm:"column:status" json:"status" form:"status"`
  556. }
  557. func (ScheduleTwentyOne) TableName() string {
  558. return "xt_schedule"
  559. }
  560. type VmBloodScheduleOne struct {
  561. ID int64 `gorm:"column:id" json:"id" form:"id"`
  562. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  563. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  564. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  565. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  566. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  567. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  568. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  569. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  570. Status int64 `gorm:"column:status" json:"status" form:"status"`
  571. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  572. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  573. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  574. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  575. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  576. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  577. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  578. }
  579. func (VmBloodScheduleOne) TableName() string {
  580. return "xt_schedule"
  581. }
  582. type VmBloodScheduleSix struct {
  583. ID int64 `gorm:"column:id" json:"id" form:"id"`
  584. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  585. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  586. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  587. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  588. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  589. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  590. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  591. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  592. Status int64 `gorm:"column:status" json:"status" form:"status"`
  593. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  594. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  595. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  596. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  597. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  598. HisPrescriptionProject []*HisPrescriptionProjectFourty `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,RecordDate" json:"his_doctor_project"`
  599. }
  600. func (VmBloodScheduleSix) TableName() string {
  601. return "xt_schedule"
  602. }
  603. type VmNewSchedulesRemind struct {
  604. ID int64 `gorm:"column:id" json:"id" form:"id"`
  605. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  606. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  607. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  608. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  609. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  610. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  611. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  612. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  613. Status int64 `gorm:"column:status" json:"status" form:"status"`
  614. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  615. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  616. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  617. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  618. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  619. DialysisOrder NewDialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  620. XtPatients XtNewPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  621. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  622. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  623. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  624. DialysisSolution NewDialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  625. XtAssessmentBeforeDislysis XtNewAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  626. LastAfterWeight NewAssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  627. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  628. }
  629. func (VmNewSchedulesRemind) TableName() string {
  630. return "xt_schedule"
  631. }
  632. type WeekScheduleSeven struct {
  633. ID int64 `gorm:"column:id" json:"id" form:"id"`
  634. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  635. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  636. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  637. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  638. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  639. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  640. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  641. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  642. Status int64 `gorm:"column:status" json:"status" form:"status"`
  643. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  644. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  645. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  646. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  647. Gender string `gorm:"-" json:"gender" form:"gender"`
  648. Phone string `gorm:"-" json:"phone" form:"phone"`
  649. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  650. Patient string `gorm:"-" json:"patient" form:"patient"`
  651. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  652. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  653. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  654. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  655. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  656. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  657. }
  658. func (WeekScheduleSeven) TableName() string {
  659. return "xt_schedule"
  660. }
  661. type ScheduleNewPatients struct {
  662. ID int64 `gorm:"column:id" json:"id" form:"id"`
  663. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  664. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  665. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  666. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  667. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  668. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  669. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  670. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  671. Status int64 `gorm:"column:status" json:"status" form:"status"`
  672. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  673. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  674. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  675. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  676. }
  677. func (ScheduleNewPatients) TableName() string {
  678. return "xt_schedule"
  679. }
  680. type MySchedule struct {
  681. ID int64 `gorm:"column:id" json:"id" form:"id"`
  682. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  683. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  684. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  685. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  686. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  687. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  688. Status int64 `gorm:"column:status" json:"status" form:"status"`
  689. Count int64
  690. }
  691. func (MySchedule) TableName() string {
  692. return "xt_schedule"
  693. }
  694. type MyVmBloodSchedule struct {
  695. ID int64 `gorm:"column:id" json:"id" form:"id"`
  696. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  697. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  698. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  699. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  700. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  701. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  702. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  703. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  704. Status int64 `gorm:"column:status" json:"status" form:"status"`
  705. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  706. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  707. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  708. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  709. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  710. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  711. MonitoringRecord MonitoringRecord `gorm:"ForeignKey:PatientId,MonitoringDate;AssociationForeignKey:PatientId,ScheduleDate" json:"monitor_record"`
  712. }
  713. func (MyVmBloodSchedule) TableName() string {
  714. return "xt_schedule"
  715. }
  716. type ScheduleConfig struct {
  717. ID int64 `gorm:"column:id" json:"id" form:"id"`
  718. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  719. IsShowMode int64 `gorm:"column:is_show_mode" json:"is_show_mode" form:"is_show_mode"`
  720. Status int64 `gorm:"column:status" json:"status" form:"status"`
  721. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  722. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  723. IsShowMachine int64 `gorm:"column:is_show_machine" json:"is_show_machine" form:"is_show_machine"`
  724. }
  725. func (ScheduleConfig) TableName() string {
  726. return "xt_schedule_config"
  727. }
  728. type VmLongBloodSchedule struct {
  729. ID int64 `gorm:"column:id" json:"id" form:"id"`
  730. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  731. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  732. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  733. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  734. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  735. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  736. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  737. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  738. Status int64 `gorm:"column:status" json:"status" form:"status"`
  739. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  740. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  741. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  742. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  743. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  744. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"xt_doctor_advice"`
  745. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  746. }
  747. func (VmLongBloodSchedule) TableName() string {
  748. return "xt_schedule"
  749. }