schedule_models.go 62KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  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. }
  266. func (VmSchedulesRemind) TableName() string {
  267. return "xt_schedule"
  268. }
  269. type WeekScheduleSix struct {
  270. ID int64 `gorm:"column:id" json:"id" form:"id"`
  271. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  272. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  273. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  274. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  275. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  276. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  277. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  278. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  279. Status int64 `gorm:"column:status" json:"status" form:"status"`
  280. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  281. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  282. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  283. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  284. Gender string `gorm:"-" json:"gender" form:"gender"`
  285. Phone string `gorm:"-" json:"phone" form:"phone"`
  286. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  287. Patient string `gorm:"-" json:"patient" form:"patient"`
  288. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  289. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  290. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  291. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  292. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  293. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  294. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  295. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  296. }
  297. func (WeekScheduleSix) TableName() string {
  298. return "xt_schedule"
  299. }
  300. type BlodSchedule struct {
  301. ID int64 `gorm:"column:id" json:"id" form:"id"`
  302. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  303. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  304. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  305. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  306. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  307. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  308. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  309. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  310. Status int64 `gorm:"column:status" json:"status" form:"status"`
  311. VmBloodPatients VmBloodPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  312. BloodDialysisOrder BloodPatientDialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  313. BloodDialysisPrescription BloodDialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  314. }
  315. func (BlodSchedule) TableName() string {
  316. return "xt_schedule"
  317. }
  318. type BloodPatientDialysisOrder struct {
  319. ID int64 `gorm:"column:id" json:"id" form:"id"`
  320. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  321. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  322. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  323. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  324. }
  325. func (BloodPatientDialysisOrder) TableName() string {
  326. return "xt_dialysis_order"
  327. }
  328. type BloodPatientDialysisPrescription struct {
  329. ID int64 `gorm:"column:id" json:"id" form:"id"`
  330. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  331. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  332. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  333. DialysisDialyszers string `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  334. DialysisIrrigation string `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  335. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  336. }
  337. func (BloodPatientDialysisPrescription) TableName() string {
  338. return "xt_dialysis_prescription"
  339. }
  340. type VmBloodPatients struct {
  341. ID int64 `gorm:"column:id" json:"id" form:"id"`
  342. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  343. Name string `gorm:"column:name" json:"name" form:"name"`
  344. FirstLetter string `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
  345. }
  346. func (VmBloodPatients) TableName() string {
  347. return "xt_patients"
  348. }
  349. type VmBloodSchedule struct {
  350. ID int64 `gorm:"column:id" json:"id" form:"id"`
  351. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  352. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  353. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  354. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  355. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  356. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  357. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  358. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  359. Status int64 `gorm:"column:status" json:"status" form:"status"`
  360. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  361. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  362. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  363. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  364. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  365. DialysisSolution DialysisSolution `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"dialysis_solution"`
  366. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  367. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"assessment_befor_dislysis"`
  368. XtDoctorAdvice XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  369. XtDoctorAdviceOne []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"advice"`
  370. HisDoctorAdvice []*HisDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  371. ReceiveTreatmentAsses ReceiveTreatmentAsses `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_receive_treatment_asses"`
  372. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  373. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  374. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  375. }
  376. func (VmBloodSchedule) TableName() string {
  377. return "xt_schedule"
  378. }
  379. type NewMDeviceNumberVM struct {
  380. DeviceNumber
  381. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  382. }
  383. func (NewMDeviceNumberVM) TableName() string {
  384. return "xt_device_number"
  385. }
  386. type NewMSchedualPatientVMList struct {
  387. ID int64 `gorm:"column:id" json:"id" form:"id"`
  388. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  389. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  390. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  391. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  392. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  393. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  394. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  395. Age int64 `gorm:"column:age" json:"age"`
  396. Name string `gorm:"column:name" json:"name" form:"name"`
  397. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  398. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  399. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  400. Status int64 `gorm:"column:status" json:"status" form:"status"`
  401. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  402. }
  403. func (NewMSchedualPatientVMList) TableName() string {
  404. return "xt_patients"
  405. }
  406. type VmBloodScheduleTwo struct {
  407. ID int64 `gorm:"column:id" json:"id" form:"id"`
  408. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  409. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  410. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  411. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  412. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  413. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  414. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  415. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  416. Status int64 `gorm:"column:status" json:"status" form:"status"`
  417. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  418. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  419. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  420. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  421. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  422. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,Mode;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  423. HisPrescriptionProject []*HisPrescriptionProject `gorm:"ForeignKey:PatientId,schedule_date;AssociationForeignKey:PatientId,RecordDate" json:"his_prescription_project"`
  424. }
  425. func (VmBloodScheduleTwo) TableName() string {
  426. return "xt_schedule"
  427. }
  428. type VmBloodScheduleThree struct {
  429. ID int64 `gorm:"column:id" json:"id" form:"id"`
  430. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  431. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  432. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  433. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  434. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  435. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  436. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  437. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  438. Status int64 `gorm:"column:status" json:"status" form:"status"`
  439. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  440. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  441. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  442. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  443. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  444. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  445. }
  446. func (VmBloodScheduleThree) TableName() string {
  447. return "xt_schedule"
  448. }
  449. type HisPrescriptionTemplateSix struct {
  450. ID int64 `gorm:"column:id" json:"id" form:"id"`
  451. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  452. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  453. Type int64 `gorm:"column:type" json:"type" form:"type"`
  454. Status int64 `gorm:"column:status" json:"status" form:"status"`
  455. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  456. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  457. Name string `gorm:"column:name" json:"name" form:"name"`
  458. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  459. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  460. }
  461. func (HisPrescriptionTemplateSix) TableName() string {
  462. return "his_prescription_template"
  463. }
  464. type HisPrescriptionInfoTemplateSix struct {
  465. ID int64 `gorm:"column:id" json:"id" form:"id"`
  466. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  467. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  468. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  469. Status int64 `gorm:"column:status" json:"status" form:"status"`
  470. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  471. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  472. Type int64 `gorm:"column:type" json:"type" form:"type"`
  473. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  474. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  475. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  476. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  477. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  478. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"his_advice"`
  479. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  480. }
  481. func (HisPrescriptionInfoTemplateSix) TableName() string {
  482. return "his_prescription_info_template"
  483. }
  484. type HisPrescriptionProjectTemplateSeven struct {
  485. ID int64 `gorm:"column:id" json:"id" form:"id"`
  486. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  487. Price float64 `gorm:"column:price" json:"price" form:"price"`
  488. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  489. Status int64 `gorm:"column:status" json:"status" form:"status"`
  490. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  491. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  492. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  493. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  494. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  495. Count string `gorm:"column:count" json:"count" form:"count"`
  496. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  497. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  498. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  499. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  500. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  501. Day string `gorm:"column:day" json:"day" form:"day"`
  502. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  503. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  504. Type int64 `gorm:"column:type" json:"type" form:"type"`
  505. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  506. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  507. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  508. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  509. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  510. }
  511. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  512. return "his_prescription_project_template"
  513. }
  514. type GoodInfoNight struct {
  515. ID int64 `gorm:"column:id" json:"id" form:"id"`
  516. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  517. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  518. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  519. }
  520. func (GoodInfoNight) TableName() string {
  521. return "xt_good_information"
  522. }
  523. type ScheduleTwenty struct {
  524. ID int64 `gorm:"column:id" json:"id" form:"id"`
  525. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  526. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  527. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  528. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  529. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  530. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  531. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  532. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  533. Status int64 `gorm:"column:status" json:"status" form:"status"`
  534. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  535. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  536. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  537. Patient string `gorm:"-" json:"patient" form:"patient"`
  538. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  539. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  540. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  541. DialysisOrderTwenty DialysisOrderTwenty `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  542. }
  543. func (ScheduleTwenty) TableName() string {
  544. return "xt_schedule"
  545. }
  546. type ScheduleTwentyOne struct {
  547. ID int64 `gorm:"column:id" json:"id" form:"id"`
  548. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  549. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  550. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  551. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  552. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  553. Status int64 `gorm:"column:status" json:"status" form:"status"`
  554. }
  555. func (ScheduleTwentyOne) TableName() string {
  556. return "xt_schedule"
  557. }
  558. type VmBloodScheduleOne struct {
  559. ID int64 `gorm:"column:id" json:"id" form:"id"`
  560. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  561. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  562. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  563. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  564. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  565. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  566. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  567. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  568. Status int64 `gorm:"column:status" json:"status" form:"status"`
  569. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  570. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  571. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  572. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  573. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  574. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  575. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  576. }
  577. func (VmBloodScheduleOne) TableName() string {
  578. return "xt_schedule"
  579. }
  580. type VmBloodScheduleSix struct {
  581. ID int64 `gorm:"column:id" json:"id" form:"id"`
  582. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  583. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  584. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  585. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  586. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  587. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  588. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  589. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  590. Status int64 `gorm:"column:status" json:"status" form:"status"`
  591. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  592. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  593. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  594. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  595. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  596. HisPrescriptionProject []*HisPrescriptionProjectFourty `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,RecordDate" json:"his_doctor_project"`
  597. }
  598. func (VmBloodScheduleSix) TableName() string {
  599. return "xt_schedule"
  600. }
  601. type VmNewSchedulesRemind struct {
  602. ID int64 `gorm:"column:id" json:"id" form:"id"`
  603. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  604. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  605. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  606. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  607. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  608. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  609. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  610. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  611. Status int64 `gorm:"column:status" json:"status" form:"status"`
  612. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  613. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  614. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  615. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  616. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  617. DialysisOrder NewDialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  618. XtPatients XtNewPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  619. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  620. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  621. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  622. DialysisSolution NewDialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  623. XtAssessmentBeforeDislysis XtNewAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  624. LastAfterWeight NewAssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  625. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  626. }
  627. func (VmNewSchedulesRemind) TableName() string {
  628. return "xt_schedule"
  629. }
  630. type WeekScheduleSeven struct {
  631. ID int64 `gorm:"column:id" json:"id" form:"id"`
  632. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  633. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  634. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  635. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  636. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  637. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  638. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  639. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  640. Status int64 `gorm:"column:status" json:"status" form:"status"`
  641. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  642. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  643. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  644. IdCardNo string `gorm:"-" json:"id_card_no" form:"id_card_no"`
  645. Gender string `gorm:"-" json:"gender" form:"gender"`
  646. Phone string `gorm:"-" json:"phone" form:"phone"`
  647. DialysisNo string `gorm:"-" json:"dialysis_no" form:"dialysis_no"`
  648. Patient string `gorm:"-" json:"patient" form:"patient"`
  649. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  650. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  651. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  652. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  653. XtDialysisOrderSix XtDialysisOrderSix `json:"dialysis_order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  654. DialysisPrescription NewDialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  655. }
  656. func (WeekScheduleSeven) TableName() string {
  657. return "xt_schedule"
  658. }
  659. type ScheduleNewPatients struct {
  660. ID int64 `gorm:"column:id" json:"id" form:"id"`
  661. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  662. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  663. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  664. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  665. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  666. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  667. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  668. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  669. Status int64 `gorm:"column:status" json:"status" form:"status"`
  670. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  671. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  672. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  673. DialysisMachineName string `gorm:"column:dialysis_machine_name" json:"dialysis_machine_name" form:"dialysis_machine_name"`
  674. }
  675. func (ScheduleNewPatients) TableName() string {
  676. return "xt_schedule"
  677. }
  678. type MySchedule struct {
  679. ID int64 `gorm:"column:id" json:"id" form:"id"`
  680. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  681. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  682. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  683. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  684. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  685. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  686. Status int64 `gorm:"column:status" json:"status" form:"status"`
  687. Count int64
  688. }
  689. func (MySchedule) TableName() string {
  690. return "xt_schedule"
  691. }
  692. type MyVmBloodSchedule struct {
  693. ID int64 `gorm:"column:id" json:"id" form:"id"`
  694. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  695. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  696. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  697. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  698. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  699. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  700. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  701. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  702. Status int64 `gorm:"column:status" json:"status" form:"status"`
  703. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  704. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  705. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  706. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  707. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  708. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  709. MonitoringRecord MonitoringRecord `gorm:"ForeignKey:PatientId,MonitoringDate;AssociationForeignKey:PatientId,ScheduleDate" json:"monitor_record"`
  710. }
  711. func (MyVmBloodSchedule) TableName() string {
  712. return "xt_schedule"
  713. }
  714. type ScheduleConfig struct {
  715. ID int64 `gorm:"column:id" json:"id" form:"id"`
  716. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  717. IsShowMode int64 `gorm:"column:is_show_mode" json:"is_show_mode" form:"is_show_mode"`
  718. Status int64 `gorm:"column:status" json:"status" form:"status"`
  719. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  720. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  721. IsShowMachine int64 `gorm:"column:is_show_machine" json:"is_show_machine" form:"is_show_machine"`
  722. }
  723. func (ScheduleConfig) TableName() string {
  724. return "xt_schedule_config"
  725. }
  726. type VmLongBloodSchedule struct {
  727. ID int64 `gorm:"column:id" json:"id" form:"id"`
  728. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  729. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  730. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  731. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  732. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  733. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  734. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  735. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  736. Status int64 `gorm:"column:status" json:"status" form:"status"`
  737. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  738. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  739. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  740. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  741. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  742. XtDoctorAdvice []*XtDoctorAdvice `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"xt_doctor_advice"`
  743. HisDoctorAdvice []*HisDoctorAdviceFourty `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  744. }
  745. func (VmLongBloodSchedule) TableName() string {
  746. return "xt_schedule"
  747. }