schedule_models.go 62KB

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