intergration_models.go 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. package models
  2. type VMPatients 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. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  6. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  7. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  8. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  9. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  10. Source int64 `gorm:"column:source" json:"source" form:"source"`
  11. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  12. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  13. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  14. Name string `gorm:"column:name" json:"name" form:"name"`
  15. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  16. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  17. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  18. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  19. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  20. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  21. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  22. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  23. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  24. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  25. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  26. Height int64 `gorm:"column:height" json:"height" form:"height"`
  27. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  28. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  29. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  30. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  31. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  32. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  33. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  34. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  35. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  36. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  37. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  38. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  39. Children int64 `gorm:"column:children" json:"children" form:"children"`
  40. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  41. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  42. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  43. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  44. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  45. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  46. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  47. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  48. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  49. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  50. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  51. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  52. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  53. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  54. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  55. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  56. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  57. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  58. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  59. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  60. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains"` // 主诉
  61. PresentHistory string `gorm:"column:present_history" json:"present_history"` // 现病史
  62. PastHistory string `gorm:"column:past_history" json:"past_history"` // 既往史
  63. Temperature float64 `gorm:"column:temperature" json:"temperature"` // 体格检查-体温
  64. Pulse int64 `gorm:"column:pulse" json:"pulse"` // 体格检查-脉搏
  65. Respiratory int64 `gorm:"column:respiratory" json:"respiratory"` // 体格检查-呼吸频率
  66. SBP int64 `gorm:"column:sbp" json:"sbp"` // 体格检查-收缩压
  67. DBP int64 `gorm:"column:dbp" json:"dbp"` // 体格检查-舒张压
  68. Status int64 `gorm:"column:status" json:"status" form:"status"`
  69. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  70. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  71. DialysisSolutions []DialysisSolution `json:"solutions" gorm:"foreignkey:PatientId"`
  72. Age int64 `gorm:"column:age" json:"age"`
  73. Schedules []Schedule `json:"schedules" gorm:"foreignkey:PatientId"`
  74. Contagions []InfectiousDiseases `json:"contagions" gorm:"foreignkey:PatientId"`
  75. Diseases []ChronicDiseases `json:"diseases" gorm:"foreignkey:PatientId"`
  76. InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time"`
  77. IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious"`
  78. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle"`
  79. ResponseResult string `gorm:"column:response_result" json:"response_result"`
  80. IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind"`
  81. DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
  82. ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
  83. TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
  84. FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
  85. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  86. VMHisPatients VMHisPatients `gorm:"ForeignKey:XtPatientId;AssociationForeignKey:ID" json:"his_patient"`
  87. }
  88. func (VMPatients) TableName() string {
  89. return "xt_patients"
  90. }
  91. type VMHisPatients struct {
  92. ID int64 `gorm:"column:id" json:"id" form:"id"`
  93. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  94. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  95. XtPatientId int64 `gorm:"column:xt_patient_id" json:"xt_patient_id" form:"xt_patient_id"`
  96. }
  97. func (VMHisPatients) TableName() string {
  98. return "xt_middle_patients"
  99. }
  100. type HisPatients struct {
  101. ID int64 `gorm:"column:id" json:"id" form:"id"`
  102. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  103. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  104. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  105. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  106. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  107. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  108. Source int64 `gorm:"column:source" json:"source" form:"source"`
  109. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  110. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  111. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  112. Name string `gorm:"column:name" json:"name" form:"name"`
  113. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  114. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  115. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  116. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  117. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  118. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  119. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  120. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  121. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  122. Height int64 `gorm:"column:height" json:"height" form:"height"`
  123. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  124. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  125. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  126. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  127. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  128. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  129. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  130. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  131. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  132. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  133. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  134. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  135. Children int64 `gorm:"column:children" json:"children" form:"children"`
  136. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  137. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  138. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  139. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  140. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  141. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  142. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  143. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  144. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  145. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  146. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  147. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  148. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  149. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  150. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  151. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  152. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  153. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  154. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  155. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  156. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains" form:"patient_complains"`
  157. PresentHistory string `gorm:"column:present_history" json:"present_history" form:"present_history"`
  158. PastHistory string `gorm:"column:past_history" json:"past_history" form:"past_history"`
  159. Temperature float64 `gorm:"column:temperature" json:"temperature" form:"temperature"`
  160. Pulse int64 `gorm:"column:pulse" json:"pulse" form:"pulse"`
  161. Respiratory int64 `gorm:"column:respiratory" json:"respiratory" form:"respiratory"`
  162. Sbp int64 `gorm:"column:sbp" json:"sbp" form:"sbp"`
  163. Dbp int64 `gorm:"column:dbp" json:"dbp" form:"dbp"`
  164. Status int64 `gorm:"column:status" json:"status" form:"status"`
  165. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  166. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  167. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  168. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  169. Age int64 `gorm:"column:age" json:"age" form:"age"`
  170. InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time" form:"infectious_next_record_time"`
  171. IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious" form:"is_infectious"`
  172. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
  173. ResponseResult string `gorm:"column:response_result" json:"response_result" form:"response_result"`
  174. IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind" form:"is_open_remind"`
  175. FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
  176. DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
  177. ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
  178. TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
  179. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  180. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  181. XtPatientId int64 `gorm:"column:xt_patient_id" json:"xt_patient_id" form:"xt_patient_id"`
  182. }
  183. func (HisPatients) TableName() string {
  184. return "xt_middle_patients"
  185. }
  186. type HisUserAdminRole struct {
  187. ID int64 `gorm:"column:id" json:"id" form:"id"`
  188. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  189. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  190. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  191. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  192. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  193. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  194. UserType int64 `gorm:"column:user_type" json:"user_type" form:"user_type"`
  195. UserTitle int64 `gorm:"column:user_title" json:"user_title" form:"user_title"`
  196. Intro string `gorm:"column:intro" json:"intro" form:"intro"`
  197. Status int64 `gorm:"column:status" json:"status" form:"status"`
  198. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  199. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  200. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  201. XtRoleId int64 `gorm:"column:xt_role_id" json:"xt_role_id" form:"xt_role_id"`
  202. }
  203. func (HisUserAdminRole) TableName() string {
  204. return "xt_middle_user_admin_role"
  205. }
  206. type VMUserAdminRole struct {
  207. ID int64 `gorm:"column:id" json:"id" form:"id"`
  208. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  209. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  210. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  211. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  212. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  213. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  214. UserType int64 `gorm:"column:user_type" json:"user_type" form:"user_type"`
  215. UserTitle int64 `gorm:"column:user_title" json:"user_title" form:"user_title"`
  216. Intro string `gorm:"column:intro" json:"intro" form:"intro"`
  217. Status int64 `gorm:"column:status" json:"status" form:"status"`
  218. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  219. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  220. VMUserAdmin VMUserAdmin `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"`
  221. HisUserAdminRole HisUserAdminRole `gorm:"ForeignKey:XtRoleId;AssociationForeignKey:ID" json:"middle_admin_role"`
  222. VMUserRole VMUserRole `gorm:"ForeignKey:ID;AssociationForeignKey:RoleId" json:"role"`
  223. }
  224. func (VMUserAdminRole) TableName() string {
  225. return "sgj_user_admin_role"
  226. }
  227. type VMUserAdmin struct {
  228. ID int64 `gorm:"column:id" json:"id" form:"id"`
  229. Mobile string `gorm:"column:mobile" json:"mobile" form:"mobile"`
  230. Password string `gorm:"column:password" json:"password" form:"password"`
  231. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  232. Status int64 `gorm:"column:status" json:"status" form:"status"`
  233. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  234. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  235. Source int64 `gorm:"column:source" json:"source" form:"source"`
  236. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  237. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  238. Tuid int64 `gorm:"column:tuid" json:"tuid" form:"tuid"`
  239. }
  240. func (VMUserAdmin) TableName() string {
  241. return "sgj_user_admin"
  242. }
  243. type VMUserRole struct {
  244. ID int64 `gorm:"column:id" json:"id" form:"id"`
  245. RoleName string `gorm:"column:role_name" json:"role_name" form:"role_name"`
  246. RoleIntroduction string `gorm:"column:role_introduction" json:"role_introduction" form:"role_introduction"`
  247. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  248. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  249. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  250. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  251. Status int64 `gorm:"column:status" json:"status" form:"status"`
  252. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  253. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  254. Number int64 `gorm:"column:number" json:"number" form:"number"`
  255. IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"`
  256. }
  257. func (VMUserRole) TableName() string {
  258. return "sgj_user_role"
  259. }