sync.go 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. package controllers
  2. import (
  3. "Data_Upload_Api/enums"
  4. "Data_Upload_Api/models/sz"
  5. "Data_Upload_Api/service"
  6. "Data_Upload_Api/service/city"
  7. "Data_Upload_Api/utils"
  8. _ "fmt"
  9. "github.com/astaxie/beego"
  10. _ "github.com/jinzhu/gorm"
  11. _ "math"
  12. _ "strconv"
  13. _ "strings"
  14. _ "time"
  15. )
  16. type SyncController struct {
  17. BaseAPIController
  18. }
  19. func SyncAPIRegisterRouters() {
  20. beego.Router("/sync/upload/hqyy", &SyncController{}, "get:SyncToHqyy")
  21. beego.Router("/sync/upload/lg2h", &SyncController{}, "get:SyncToLg2h")
  22. beego.Router("/sync/upload/smzy", &SyncController{}, "get:SyncToSmzy")
  23. beego.Router("/sync/upload/szbl", &SyncController{}, "get:SyncToSzbl")
  24. beego.Router("/sync/upload/szjk", &SyncController{}, "get:SyncToSzjk")
  25. }
  26. func (c *SyncController) SyncToSzbl() {
  27. org := &sz.DataUploadConfig{
  28. OrgId: 10138,
  29. ProvinceId: 19,
  30. CityId: 291,
  31. DepartmentName: "深圳市百霖血液透析中心",
  32. HospitalId: "MA5DB4KB6 ",
  33. InstType: 1,
  34. DbHost: "127.0.0.1",
  35. DbPort: "1433",
  36. DbPass: "adapter",
  37. DbUser: "adapter",
  38. DbName: "adapter_2019",
  39. }
  40. // for _, org := range configs {
  41. // 第二步:跟进配置,创建数据库连接
  42. if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
  43. orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
  44. if err != nil {
  45. utils.ErrorLog("创建数据库连接失败:%v", err)
  46. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  47. return
  48. }
  49. // 第三步:开始同步数据
  50. // 机构人员字典表 t_hd_hospital
  51. city.SyncTBDICPractitioner(orgDb, org.OrgId, org.HospitalId)
  52. // 机构床位 t_hd_wm
  53. city.SyncTMDICTBED(orgDb, org.OrgId, org.HospitalId)
  54. // 门诊患者信息表
  55. city.SyncTBMZPatientInformation(orgDb, org.OrgId, org.HospitalId)
  56. // 挂号表
  57. city.SyncTBHISMZReg(orgDb, org.OrgId, org.HospitalId)
  58. // 门诊就诊记录表
  59. city.SyncTB_YL_MZ_Medical_Record(orgDb, org.OrgId, org.HospitalId)
  60. // 门诊处方主表
  61. city.SyncTB_CIS_Prescription(orgDb, org.OrgId, org.HospitalId)
  62. // 18. 门诊处方明细表
  63. city.SyncTB_CIS_Prescription_Detail(orgDb, org.OrgId, org.HospitalId)
  64. // 19. 门诊收费表
  65. city.SyncTB_HIS_MZ_Charge(orgDb, org.OrgId, org.HospitalId)
  66. // 20. 门诊收费明细表
  67. city.SyncTB_HIS_MZ_Fee_Detail(orgDb, org.OrgId, org.HospitalId)
  68. // 第四步:关闭数据库连接
  69. service.CloseDB(orgDb)
  70. }
  71. // }
  72. c.ServeSuccessJSON(map[string]interface{}{
  73. "resultList": "12345",
  74. })
  75. return
  76. }
  77. func (c *SyncController) SyncToLg2h() {
  78. // 第一步:到上报配置表中找到深圳需要上报的机构
  79. // sz_province, _ := beego.AppConfig.Int64("sz_province")
  80. // sz_city, _ := beego.AppConfig.Int64("sz_city")
  81. // configs, _ := service.FindAllDataUploadConfigOrgInfo(sz_province, sz_city, 3)
  82. org := &sz.DataUploadConfig{
  83. OrgId: 9598,
  84. ProvinceId: 19,
  85. CityId: 291,
  86. DepartmentName: "深圳市龙岗区第二人民医院",
  87. HospitalId: "MA5DB4KB6",
  88. InstType: 1,
  89. DbHost: "183.62.158.36",
  90. DbPort: "61433",
  91. DbPass: "LG2H+9897",
  92. DbUser: "sa",
  93. DbName: "xtzk",
  94. }
  95. // for _, org := range configs {
  96. // 第二步:跟进配置,创建数据库连接
  97. if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
  98. orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
  99. if err != nil {
  100. utils.ErrorLog("创建数据库连接失败:%v", err)
  101. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  102. return
  103. }
  104. // 第三步:开始同步数据
  105. // 同步医院信息 t_hd_hospital
  106. city.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
  107. // 同步水处理器 t_hd_wm
  108. city.SyncWMS(orgDb, org.OrgId, org.HospitalId)
  109. // 同步员工 t_hd_staff
  110. city.SyncStaff(orgDb, org.OrgId, org.HospitalId)
  111. // 同步病人 t_hd_patient
  112. city.SyncPatient(orgDb, org.OrgId, org.HospitalId)
  113. // 同步排班 t_hd_shift
  114. city.SyncShift(orgDb, org.OrgId, org.HospitalId)
  115. // 同步处方 t_hd_ps
  116. city.SyncPs(orgDb, org.OrgId, org.HospitalId)
  117. // 同步处方药品 t_hd_ps
  118. city.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
  119. // 同步转院信息 t_hd_patient_out
  120. city.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
  121. // 同步处方信息 t_hd_doctors_advice
  122. city.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
  123. // 同步透中信息 t_hd_middle
  124. city.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
  125. // 同步设备 t_hd_other_machine
  126. city.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
  127. // 同步维修 t_hd_maintain
  128. city.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
  129. // 同步设备 t_hd_dm
  130. city.SyncDM(orgDb, org.OrgId, org.HospitalId)
  131. // 同步患者透析记录 t_hd_dialysis
  132. city.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
  133. // 同步透析床位分区 t_hd_division
  134. city.SyncDivision(orgDb, org.OrgId, org.HospitalId)
  135. // 患者通路信息表(T_HD_ACCESS)
  136. city.SyncAccess(orgDb, org.OrgId, org.HospitalId)
  137. // 透析床位表(T_HD_SICKBED)
  138. city.SyncSickbed(orgDb, org.OrgId, org.HospitalId)
  139. // 患者诊断信息表(T_HD_DIAGNOSIS)
  140. city.SyncDiagnosis(orgDb, org.OrgId, org.HospitalId)
  141. // 患者传染病检查记录表(T_HD_INFECTION
  142. city.SyncInfection(orgDb, org.OrgId, org.HospitalId)
  143. // 透析并发症记录表(T_HD_COMPLICATION)
  144. city.SyncComplication(orgDb, org.OrgId, org.HospitalId)
  145. // 血透患者检测结果表(T_HD_LIS_REPORT)
  146. city.SyncLisReport(orgDb, org.OrgId, org.HospitalId)
  147. // // 血透患者检验结果指标表(T_HD_LIS_INDICATORS)
  148. city.SyncLisIndicators(orgDb, org.OrgId, org.HospitalId)
  149. // // 透析机透析液细菌培养检测记录表(t_hd_dm_dialysate_bc)
  150. city.SyncLisCulture(orgDb,org.OrgId,org.HospitalId)
  151. // 透析机透析液内毒素检测记录表(T_HD_DM_DIALYSATE_BC)
  152. city.SyncDialysate(orgDb,org.OrgId,org.HospitalId)
  153. // 物表消毒记录表(T_HD_SURFACE_DISINFECT)
  154. city.SyncLisBodyDetection(orgDb,org.OrgId,org.HospitalId)
  155. // 第四步:关闭数据库连接
  156. //透析用水游离氯检测表(T_HD_WATER_FC)
  157. city.SyncLisWaterFc(orgDb,org.OrgId,org.HospitalId)
  158. //透析用水有毒化学物检测表(T_HD_WATER_NC)
  159. city.SynLisWaterNc(orgDb,org.OrgId,org.HospitalId)
  160. //透析用水PH值检测表(T_HD_WATER_PH)
  161. city.SynLisWaterPh(orgDb,org.OrgId,org.HospitalId)
  162. //透析用水水硬度检测表(T_HD_WATER_WH)
  163. city.SynListHadWater(orgDb,org.OrgId,org.HospitalId)
  164. //导管感染记录表(T_HD_CI)
  165. city.SynListHdCi(orgDb,org.OrgId,org.HospitalId)
  166. //导管感染转归记录表(T_HD_CI_OUTCOME)
  167. city.SynLisHdCiOutCome(orgDb,org.OrgId,org.HospitalId)
  168. //透析室空气消毒记录表(T_HD_AIR_DISINFECT)
  169. city.SyncLisAirDetection(orgDb,org.OrgId,org.HospitalId)
  170. //透析用水细菌培养检测表(T_HD_WATER_BC)
  171. city.SyncLisWaterBc(orgDb,org.OrgId,org.HospitalId)
  172. // //透析用水内毒素检测表(T_HD_WATER_EN)
  173. city.SyncLisWaterEn(orgDb,org.OrgId,org.HospitalId)
  174. // 第四步:关闭数据库连接
  175. service.CloseDB(orgDb)
  176. }
  177. // }
  178. c.ServeSuccessJSON(map[string]interface{}{
  179. "resultList": "12345",
  180. })
  181. return
  182. }
  183. func (c *SyncController) SyncToHqyy() {
  184. // 第一步:到上报配置表中找到深圳需要上报的机构
  185. // sz_province, _ := beego.AppConfig.Int64("sz_province")
  186. // sz_city, _ := beego.AppConfig.Int64("sz_city")
  187. // configs, _ := service.FindAllDataUploadConfigOrgInfo(sz_province, sz_city, 3)
  188. org := &sz.DataUploadConfig{
  189. OrgId: 9442,
  190. ProvinceId: 19,
  191. CityId: 291,
  192. DepartmentName: "暨南大学附属深圳华侨医院",
  193. HospitalId: "73307826X",
  194. InstType: 1,
  195. DbHost: "183.11.232.26",
  196. DbPort: "3306",
  197. DbPass: "1Q2W3e4r!@#$",
  198. DbUser: "sa",
  199. DbName: "xtzk",
  200. }
  201. // for _, org := range configs {
  202. // 第二步:跟进配置,创建数据库连接
  203. if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
  204. orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
  205. if err != nil {
  206. utils.ErrorLog("创建数据库连接失败:%v", err)
  207. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  208. return
  209. }
  210. // 第三步:开始同步数据
  211. // 同步医院信息 t_hd_hospital
  212. city.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
  213. // 同步水处理器 t_hd_wm
  214. city.SyncWMS(orgDb, org.OrgId, org.HospitalId)
  215. // // 同步员工 t_hd_staff
  216. city.SyncStaff(orgDb, org.OrgId, org.HospitalId)
  217. // // 同步病人 t_hd_patient
  218. city.SyncPatient(orgDb, org.OrgId, org.HospitalId)
  219. // // 同步排班 t_hd_shift
  220. city.SyncShift(orgDb, org.OrgId, org.HospitalId)
  221. // 同步处方 t_hd_ps
  222. city.SyncPs(orgDb, org.OrgId, org.HospitalId)
  223. // 同步处方药品 t_hd_ps
  224. city.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
  225. // // 同步转院信息 t_hd_patient_out
  226. city.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
  227. // 同步处方信息 t_hd_doctors_advice
  228. city.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
  229. // 同步透中信息 t_hd_middle
  230. city.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
  231. // // 同步设备 t_hd_other_machine
  232. city.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
  233. // // 同步维修 t_hd_maintain
  234. city.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
  235. // // 同步设备 t_hd_dm
  236. city.SyncDM(orgDb, org.OrgId, org.HospitalId)
  237. // // 同步患者透析记录 t_hd_dialysis
  238. city.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
  239. // 同步透析床位分区 t_hd_division
  240. city.SyncDivision(orgDb, org.OrgId, org.HospitalId)
  241. // 患者通路信息表(T_HD_ACCESS)
  242. city.SyncAccess(orgDb, org.OrgId, org.HospitalId)
  243. // 透析床位表(T_HD_SICKBED)
  244. city.SyncSickbed(orgDb, org.OrgId, org.HospitalId)
  245. // 患者诊断信息表(T_HD_DIAGNOSIS)
  246. city.SyncDiagnosis(orgDb, org.OrgId, org.HospitalId)
  247. // 患者传染病检查记录表(T_HD_INFECTION
  248. city.SyncInfection(orgDb, org.OrgId, org.HospitalId)
  249. // 透析并发症记录表(T_HD_COMPLICATION)
  250. city.SyncComplication(orgDb, org.OrgId, org.HospitalId)
  251. // 血透患者检测结果表(T_HD_LIS_REPORT)
  252. city.SyncLisReport(orgDb, org.OrgId, org.HospitalId)
  253. // 血透患者检验结果指标表(T_HD_LIS_INDICATORS)
  254. city.SyncLisIndicators(orgDb, org.OrgId, org.HospitalId)
  255. // 第四步:关闭数据库连接
  256. service.CloseDB(orgDb)
  257. }
  258. // }
  259. c.ServeSuccessJSON(map[string]interface{}{
  260. "resultList": "12345",
  261. })
  262. return
  263. }
  264. func (c *SyncController) SyncToSmzy() {
  265. // 第一步:到上报配置表中找到深圳需要上报的机构
  266. // sz_province, _ := beego.AppConfig.Int64("sz_province")
  267. // sz_city, _ := beego.AppConfig.Int64("sz_city")
  268. // configs, _ := service.FindAllDataUploadConfigOrgInfo(sz_province, sz_city, 3)
  269. org := &sz.DataUploadConfig{
  270. OrgId: 9504,
  271. ProvinceId: 19,
  272. CityId: 291,
  273. DepartmentName: "深圳生命之源血液透析中心",
  274. HospitalId: "MA5EU4PC0",
  275. InstType: 1,
  276. DbHost: "localhost",
  277. DbPort: "1433",
  278. DbPass: "1Q2W3e4r!@#$",
  279. DbUser: "sa",
  280. DbName: "xtzk",
  281. }
  282. // for _, org := range configs {
  283. // 第二步:跟进配置,创建数据库连接
  284. if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
  285. orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
  286. if err != nil {
  287. utils.ErrorLog("创建数据库连接失败:%v", err)
  288. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  289. return
  290. }
  291. // 第三步:开始同步数据
  292. // 同步医院信息 t_hd_hospital
  293. city.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
  294. // 同步水处理器 t_hd_wm
  295. city.SyncWMS(orgDb, org.OrgId, org.HospitalId)
  296. // // 同步员工 t_hd_staff
  297. city.SyncStaff(orgDb, org.OrgId, org.HospitalId)
  298. // // 同步病人 t_hd_patient
  299. city.SyncPatient(orgDb, org.OrgId, org.HospitalId)
  300. // // 同步排班 t_hd_shift
  301. city.SyncShift(orgDb, org.OrgId, org.HospitalId)
  302. // 同步处方 t_hd_ps
  303. city.SyncPs(orgDb, org.OrgId, org.HospitalId)
  304. // 同步处方药品 t_hd_ps
  305. city.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
  306. // // 同步转院信息 t_hd_patient_out
  307. city.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
  308. // 同步处方信息 t_hd_doctors_advice
  309. city.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
  310. // 同步透中信息 t_hd_middle
  311. city.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
  312. // // 同步设备 t_hd_other_machine
  313. city.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
  314. // // 同步维修 t_hd_maintain
  315. city.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
  316. // // 同步设备 t_hd_dm
  317. city.SyncDM(orgDb, org.OrgId, org.HospitalId)
  318. // // 同步患者透析记录 t_hd_dialysis
  319. city.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
  320. // 同步透析床位分区 t_hd_division
  321. city.SyncDivision(orgDb, org.OrgId, org.HospitalId)
  322. // 患者通路信息表(T_HD_ACCESS)
  323. city.SyncAccess(orgDb, org.OrgId, org.HospitalId)
  324. // 透析床位表(T_HD_SICKBED)
  325. city.SyncSickbed(orgDb, org.OrgId, org.HospitalId)
  326. // 患者诊断信息表(T_HD_DIAGNOSIS)
  327. city.SyncDiagnosis(orgDb, org.OrgId, org.HospitalId)
  328. // 患者传染病检查记录表(T_HD_INFECTION
  329. city.SyncInfection(orgDb, org.OrgId, org.HospitalId)
  330. // 透析并发症记录表(T_HD_COMPLICATION)
  331. city.SyncComplication(orgDb, org.OrgId, org.HospitalId)
  332. // 血透患者检测结果表(T_HD_LIS_REPORT)
  333. city.SyncLisReport(orgDb, org.OrgId, org.HospitalId)
  334. // 血透患者检验结果指标表(T_HD_LIS_INDICATORS)
  335. city.SyncLisIndicators(orgDb, org.OrgId, org.HospitalId)
  336. // 第四步:关闭数据库连接
  337. service.CloseDB(orgDb)
  338. }
  339. // }
  340. c.ServeSuccessJSON(map[string]interface{}{
  341. "resultList": "12345",
  342. })
  343. return
  344. }
  345. func (c *SyncController) SyncToSzjk() {
  346. // 第一步:到上报配置表中找到深圳需要上报的机构
  347. // sz_province, _ := beego.AppConfig.Int64("sz_province")
  348. // sz_city, _ := beego.AppConfig.Int64("sz_city")
  349. // configs, _ := service.FindAllDataUploadConfigOrgInfo(sz_province, sz_city, 3)
  350. org := &sz.DataUploadConfig{
  351. OrgId: 10245,
  352. ProvinceId: 19,
  353. CityId: 291,
  354. DepartmentName: "深圳静康医院血液透析中心",
  355. HospitalId: "MA5DKWHG3",
  356. InstType: 1,
  357. DbHost: "localhost",
  358. DbPort: "1433",
  359. DbPass: "Ya2019",
  360. DbUser: "sa",
  361. DbName: "xtzk",
  362. }
  363. // for _, org := range configs {
  364. // 第二步:跟进配置,创建数据库连接
  365. if len(org.DbHost) > 0 && len(org.DbUser) > 0 && len(org.DbPort) > 0 && len(org.DbPass) > 0 && len(org.DbName) > 0 {
  366. orgDb, err := service.CreateSqlServiceDB(org.DbHost, org.DbPort, org.DbUser, org.DbPass, org.DbName)
  367. if err != nil {
  368. utils.ErrorLog("创建数据库连接失败:%v", err)
  369. c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
  370. return
  371. }
  372. // 第三步:开始同步数据
  373. // 同步医院信息 t_hd_hospital
  374. city.SyncHospital(orgDb, org.OrgId, org.HospitalId, org.InstType, org.DepartmentName)
  375. // 同步水处理器 t_hd_wm
  376. city.SyncWMS(orgDb, org.OrgId, org.HospitalId)
  377. // // 同步员工 t_hd_staff
  378. city.SyncStaff(orgDb, org.OrgId, org.HospitalId)
  379. // // 同步病人 t_hd_patient
  380. city.SyncPatient(orgDb, org.OrgId, org.HospitalId)
  381. // // 同步排班 t_hd_shift
  382. city.SyncShift(orgDb, org.OrgId, org.HospitalId)
  383. // 同步处方 t_hd_ps
  384. city.SyncPs(orgDb, org.OrgId, org.HospitalId)
  385. // 同步处方药品 t_hd_ps
  386. city.SyncPsMedicine(orgDb, org.OrgId, org.HospitalId)
  387. // // 同步转院信息 t_hd_patient_out
  388. city.SyncPatientOut(orgDb, org.OrgId, org.HospitalId)
  389. // 同步处方信息 t_hd_doctors_advice
  390. city.SyncDoctorAdvice(orgDb, org.OrgId, org.HospitalId)
  391. // 同步透中信息 t_hd_middle
  392. city.SyncMiddle(orgDb, org.OrgId, org.HospitalId)
  393. // // 同步设备 t_hd_other_machine
  394. city.SyncOtherMachine(orgDb, org.OrgId, org.HospitalId)
  395. // // 同步维修 t_hd_maintain
  396. city.SyncMachineRepair(orgDb, org.OrgId, org.HospitalId)
  397. // // 同步设备 t_hd_dm
  398. city.SyncDM(orgDb, org.OrgId, org.HospitalId)
  399. // // 同步患者透析记录 t_hd_dialysis
  400. city.SyncDialysis(orgDb, org.OrgId, org.HospitalId)
  401. // 同步透析床位分区 t_hd_division
  402. city.SyncDivision(orgDb, org.OrgId, org.HospitalId)
  403. // 患者通路信息表(T_HD_ACCESS)
  404. city.SyncAccess(orgDb, org.OrgId, org.HospitalId)
  405. // 透析床位表(T_HD_SICKBED)
  406. city.SyncSickbed(orgDb, org.OrgId, org.HospitalId)
  407. // 患者诊断信息表(T_HD_DIAGNOSIS)
  408. city.SyncDiagnosis(orgDb, org.OrgId, org.HospitalId)
  409. // 患者传染病检查记录表(T_HD_INFECTION
  410. city.SyncInfection(orgDb, org.OrgId, org.HospitalId)
  411. // 透析并发症记录表(T_HD_COMPLICATION)
  412. city.SyncComplication(orgDb, org.OrgId, org.HospitalId)
  413. // 血透患者检测结果表(T_HD_LIS_REPORT)
  414. city.SyncLisReport(orgDb, org.OrgId, org.HospitalId)
  415. // 血透患者检验结果指标表(T_HD_LIS_INDICATORS)
  416. city.SyncLisIndicators(orgDb, org.OrgId, org.HospitalId)
  417. // 透析机透析液细菌培养检测记录表(t_hd_dm_dialysate_bc)
  418. city.SyncLisCulture(orgDb,org.OrgId,org.HospitalId)
  419. //透析机透析液内毒素检测记录表(T_HD_DM_DIALYSATE_BC)
  420. city.SyncDialysate(orgDb,org.OrgId,org.HospitalId)
  421. //物表消毒记录表(T_HD_SURFACE_DISINFECT)
  422. city.SyncLisBodyDetection(orgDb,org.OrgId,org.HospitalId)
  423. //透析用水游离氯检测表(T_HD_WATER_FC)
  424. city.SyncLisWaterFc(orgDb,org.OrgId,org.HospitalId)
  425. //透析用水有毒化学物检测表(T_HD_WATER_NC)
  426. city.SynLisWaterNc(orgDb,org.OrgId,org.HospitalId)
  427. //透析用水PH值检测表(T_HD_WATER_PH)
  428. city.SynLisWaterPh(orgDb,org.OrgId,org.HospitalId)
  429. //透析用水水硬度检测表(T_HD_WATER_WH)
  430. city.SynListHadWater(orgDb,org.OrgId,org.HospitalId)
  431. //导管感染记录表(T_HD_CI)
  432. city.SynListHdCi(orgDb,org.OrgId,org.HospitalId)
  433. //导管感染转归记录表(T_HD_CI_OUTCOME)
  434. city.SynLisHdCiOutCome(orgDb,org.OrgId,org.HospitalId)
  435. //透析室空气消毒记录表(T_HD_AIR_DISINFECT)
  436. city.SyncLisAirDetection(orgDb,org.OrgId,org.HospitalId)
  437. //透析用水细菌培养检测表(T_HD_WATER_BC)
  438. city.SyncLisWaterBc(orgDb,org.OrgId,org.HospitalId)
  439. //透析用水内毒素检测表(T_HD_WATER_EN)
  440. city.SyncLisWaterEn(orgDb,org.OrgId,org.HospitalId)
  441. // 第四步:关闭数据库连接
  442. service.CloseDB(orgDb)
  443. }
  444. // }
  445. c.ServeSuccessJSON(map[string]interface{}{
  446. "resultList": "12345",
  447. })
  448. return
  449. }