schedule_models.go 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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 SchedulePatients 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 PatientListForFace `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  69. }
  70. func (SchedulePatients) TableName() string {
  71. return "xt_schedule"
  72. }
  73. type PatientSchedule struct {
  74. Schedule
  75. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  76. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  77. Week int64 `gorm:"-" json:"week" form:"week"`
  78. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  79. }
  80. type Partition struct {
  81. DeviceZone
  82. Jihaos []DeviceNumber `json:"jihaos" gorm:"foreignkey:ZoneID"`
  83. }
  84. type Search_Schedule struct {
  85. ID int64 `gorm:"column:id" json:"id" form:"id"`
  86. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  87. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  88. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  89. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  90. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  91. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  92. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  93. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  94. Status int64 `gorm:"column:status" json:"status" form:"status"`
  95. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  96. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  97. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  98. Patient string `gorm:"-" json:"patient" form:"patient"`
  99. }
  100. func (Search_Schedule) TableName() string {
  101. return "xt_schedule"
  102. }
  103. type WeekSchedule struct {
  104. ID int64 `gorm:"column:id" json:"id" form:"id"`
  105. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  106. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  107. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  108. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  109. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  110. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  111. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  112. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  113. Status int64 `gorm:"column:status" json:"status" form:"status"`
  114. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  115. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  116. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  117. Patient string `gorm:"-" json:"patient" form:"patient"`
  118. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  119. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  120. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  121. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  122. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  123. Solution []*DialysisSolution `json:"solution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  124. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  125. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  126. }
  127. func (WeekSchedule) TableName() string {
  128. return "xt_schedule"
  129. }
  130. type ScheduleTemplate struct {
  131. ID int64 `gorm:"column:id" json:"id" form:"id"`
  132. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  133. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  134. Status int64 `gorm:"column:status" json:"status" form:"status"`
  135. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  136. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  137. }
  138. func (ScheduleTemplate) TableName() string {
  139. return "xt_schedule_template"
  140. }
  141. type XtDataPrint struct {
  142. ID int64 `gorm:"column:id" json:"id" form:"id"`
  143. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  144. Status int64 `gorm:"column:status" json:"status" form:"status"`
  145. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  146. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  147. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  148. }
  149. func (XtDataPrint) TableName() string {
  150. return "xt_data_print"
  151. }
  152. type VmSchedulesRemind struct {
  153. ID int64 `gorm:"column:id" json:"id" form:"id"`
  154. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  155. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  156. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  157. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  158. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  159. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  160. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  161. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  162. Status int64 `gorm:"column:status" json:"status" form:"status"`
  163. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  164. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  165. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  166. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  167. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  168. DialysisOrder DialysisOrder `json:"order" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  169. XtPatients XtPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  170. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  171. DialysisPrescription DialysisPrescription `json:"prescription" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  172. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  173. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId;"`
  174. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId;AssociationForeignKey:PatientId;"`
  175. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  176. }
  177. func (VmSchedulesRemind) TableName() string {
  178. return "xt_schedule"
  179. }
  180. type WeekScheduleSix struct {
  181. ID int64 `gorm:"column:id" json:"id" form:"id"`
  182. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  183. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  184. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  185. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  186. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  187. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  188. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  189. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  190. Status int64 `gorm:"column:status" json:"status" form:"status"`
  191. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  192. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  193. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  194. Patient string `gorm:"-" json:"patient" form:"patient"`
  195. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  196. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  197. DialysisPrescription DialysisSolution `json:"prescription" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  198. DoctorAdvice []*DoctorAdvice `json:"doctoradvice" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  199. HisDoctorAdviceInfo []*HisDoctorAdviceInfo `json:"hisdoctoradviceinfo" gorm:"foreignkey:AdviceDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  200. DialysisSolution DialysisSolution `json:"dialysissolution" gorm:"foreignkey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId"`
  201. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `json:"assessmentbefor" gorm:"foreignkey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate"`
  202. }
  203. func (WeekScheduleSix) TableName() string {
  204. return "xt_schedule"
  205. }
  206. type BlodSchedule struct {
  207. ID int64 `gorm:"column:id" json:"id" form:"id"`
  208. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  209. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  210. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  211. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  212. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  213. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  214. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  215. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  216. Status int64 `gorm:"column:status" json:"status" form:"status"`
  217. VmBloodPatients VmBloodPatients `json:"patient" gorm:"foreignkey:ID;AssociationForeignKey:PatientId;"`
  218. BloodDialysisOrder BloodPatientDialysisOrder `json:"order" gorm:"foreignkey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId;"`
  219. BloodDialysisPrescription BloodDialysisPrescription `json:"prescription" gorm:"foreignkey:RecordDate,PatientId;AssociationForeignKey:RecordDate,PatientId;"`
  220. }
  221. func (BlodSchedule) TableName() string {
  222. return "xt_schedule"
  223. }
  224. type BloodPatientDialysisOrder struct {
  225. ID int64 `gorm:"column:id" json:"id" form:"id"`
  226. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  227. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  228. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  229. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  230. }
  231. func (BloodPatientDialysisOrder) TableName() string {
  232. return "xt_dialysis_order"
  233. }
  234. type BloodPatientDialysisPrescription struct {
  235. ID int64 `gorm:"column:id" json:"id" form:"id"`
  236. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  237. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  238. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  239. DialysisDialyszers string `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  240. DialysisIrrigation string `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  241. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  242. }
  243. func (BloodPatientDialysisPrescription) TableName() string {
  244. return "xt_dialysis_prescription"
  245. }
  246. type VmBloodPatients struct {
  247. ID int64 `gorm:"column:id" json:"id" form:"id"`
  248. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  249. Name string `gorm:"column:name" json:"name" form:"name"`
  250. }
  251. func (VmBloodPatients) TableName() string {
  252. return "xt_patients"
  253. }
  254. type VmBloodSchedule struct {
  255. ID int64 `gorm:"column:id" json:"id" form:"id"`
  256. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  257. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  258. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  259. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  260. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  261. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  262. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  263. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  264. Status int64 `gorm:"column:status" json:"status" form:"status"`
  265. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  266. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  267. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  268. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  269. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  270. DialysisSolution DialysisSolution `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"dialysis_solution"`
  271. DialysisPrescription DialysisPrescription `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"dialysis_prescription"`
  272. XtAssessmentBeforeDislysis XtAssessmentBeforeDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"assessment_befor_dislysis"`
  273. XtDoctorAdvice XtDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_doctor_advice"`
  274. HisDoctorAdvice HisDoctorAdvice `gorm:"ForeignKey:PatientId,AdviceDate;AssociationForeignKey:PatientId,ScheduleDate" json:"his_doctor_advice"`
  275. ReceiveTreatmentAsses ReceiveTreatmentAsses `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_receive_treatment_asses"`
  276. XtAssessmentAfterDislysis XtAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,ScheduleDate" json:"xt_assesment_after_dislysis"`
  277. LastAfterWeight AssessmentAfterDislysis `gorm:"ForeignKey:PatientID;AssociationForeignKey:PatientID" json:"lastafterweight"`
  278. }
  279. func (VmBloodSchedule) TableName() string {
  280. return "xt_schedule"
  281. }
  282. type NewMDeviceNumberVM struct {
  283. DeviceNumber
  284. Zone *DeviceZone `gorm:"ForeignKey:ZoneID" json:"zone"`
  285. }
  286. func (NewMDeviceNumberVM) TableName() string {
  287. return "xt_device_number"
  288. }
  289. type NewMSchedualPatientVMList struct {
  290. ID int64 `gorm:"column:id" json:"id" form:"id"`
  291. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  292. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  293. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  294. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  295. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  296. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  297. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  298. Age int64 `gorm:"column:age" json:"age"`
  299. Name string `gorm:"column:name" json:"name" form:"name"`
  300. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  301. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  302. TrobleShoot int64 `gorm:"column:troble_shoot" json:"troble_shoot" form:"troble_shoot"`
  303. Status int64 `gorm:"column:status" json:"status" form:"status"`
  304. }
  305. func (NewMSchedualPatientVMList) TableName() string {
  306. return "xt_patients"
  307. }
  308. type VmBloodScheduleTwo struct {
  309. ID int64 `gorm:"column:id" json:"id" form:"id"`
  310. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  311. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  312. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  313. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  314. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  315. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  316. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  317. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  318. Status int64 `gorm:"column:status" json:"status" form:"status"`
  319. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  320. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  321. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  322. DeviceNumber *NewMDeviceNumberVM `gorm:"ForeignKey:BedId" json:"device_number"`
  323. SchedualPatient *NewMSchedualPatientVMList `gorm:"ForeignKey:PatientId" json:"patient"`
  324. HisPrescriptionTemplateSix HisPrescriptionTemplateSix `gorm:"ForeignKey:PatientId,ModeId;AssociationForeignKey:PatientId,ModeId" json:"his_prescription_template"`
  325. }
  326. func (VmBloodScheduleTwo) TableName() string {
  327. return "xt_schedule"
  328. }
  329. type HisPrescriptionTemplateSix struct {
  330. ID int64 `gorm:"column:id" json:"id" form:"id"`
  331. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  332. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  333. Type int64 `gorm:"column:type" json:"type" form:"type"`
  334. Status int64 `gorm:"column:status" json:"status" form:"status"`
  335. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  336. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  337. Name string `gorm:"column:name" json:"name" form:"name"`
  338. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  339. HisPrescriptionInfoTemplateSix []*HisPrescriptionInfoTemplateSix `gorm:"ForeignKey:PTemplateId;AssociationForeignKey:ID" json:"his_prescription_info"`
  340. }
  341. func (HisPrescriptionTemplateSix) TableName() string {
  342. return "his_prescription_template"
  343. }
  344. type HisPrescriptionInfoTemplateSix struct {
  345. ID int64 `gorm:"column:id" json:"id" form:"id"`
  346. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  347. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  348. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  349. Status int64 `gorm:"column:status" json:"status" form:"status"`
  350. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  351. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  352. Type int64 `gorm:"column:type" json:"type" form:"type"`
  353. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  354. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  355. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  356. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  357. HisPrescriptionProjectTemplateSeven []*HisPrescriptionProjectTemplateSeven `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  358. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  359. }
  360. func (HisPrescriptionInfoTemplateSix) TableName() string {
  361. return "his_prescription_info_template"
  362. }
  363. type HisPrescriptionProjectTemplateSeven struct {
  364. ID int64 `gorm:"column:id" json:"id" form:"id"`
  365. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  366. Price float64 `gorm:"column:price" json:"price" form:"price"`
  367. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  368. Status int64 `gorm:"column:status" json:"status" form:"status"`
  369. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  370. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  371. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  372. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  373. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  374. Count string `gorm:"column:count" json:"count" form:"count"`
  375. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  376. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  377. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  378. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  379. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  380. Day string `gorm:"column:day" json:"day" form:"day"`
  381. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  382. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  383. Type int64 `gorm:"column:type" json:"type" form:"type"`
  384. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  385. GoodInfo GoodInfoNight `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  386. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  387. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  388. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  389. }
  390. func (HisPrescriptionProjectTemplateSeven) TableName() string {
  391. return "his_prescription_project_template"
  392. }
  393. type GoodInfoNight struct {
  394. ID int64 `gorm:"column:id" json:"id" form:"id"`
  395. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  396. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  397. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  398. }
  399. func (GoodInfoNight) TableName() string {
  400. return "xt_good_information"
  401. }