|
@@ -75,7 +75,7 @@ func PublicApiRegistRouters() {
|
75
|
75
|
beego.Router("/handleExportData10138", &PublicApiController{}, "get:HandleExportData10138")
|
76
|
76
|
|
77
|
77
|
beego.Router("/handleData10265", &PublicApiController{}, "get:HandleData10265")
|
78
|
|
- //beego.Router("/handleData10265two", &PublicApiController{}, "get:HandleData10265two")
|
|
78
|
+ beego.Router("/handleData10265two", &PublicApiController{}, "get:HandleData10265two")
|
79
|
79
|
|
80
|
80
|
beego.Router("/handleData10106", &PublicApiController{}, "get:HandleData10106")
|
81
|
81
|
beego.Router("/handleData10318", &PublicApiController{}, "get:HandleData10318")
|
|
@@ -92,17 +92,14 @@ func PublicApiRegistRouters() {
|
92
|
92
|
//beego.Router("/handleorderinfo", &PublicApiController{}, "get:HandleOrderInfoData")
|
93
|
93
|
//
|
94
|
94
|
//beego.Router("/hande10138", &PublicApiController{}, "get:HandleOrderInfoData10138")
|
95
|
|
-
|
96
|
95
|
//935887
|
97
|
|
-
|
98
|
96
|
beego.Router("/handle10210", &PublicApiController{}, "get:Handle10210")
|
99
|
|
-
|
100
|
97
|
beego.Router("/handle10210", &PublicApiController{}, "get:Handle10210")
|
101
|
|
-
|
102
|
98
|
//beego.Router("/handle10028", &PublicApiController{}, "get:Handle10028")
|
103
|
|
-
|
104
|
99
|
beego.Router("/handleTeamData", &PublicApiController{}, "get:HandleTeamData")
|
105
|
100
|
|
|
101
|
+ beego.Router("/handleHisPatientTwo", &PublicApiController{}, "get:HandleHisPatientTwo")
|
|
102
|
+
|
106
|
103
|
}
|
107
|
104
|
|
108
|
105
|
func (c *PublicApiController) HandleTeamData() {
|
|
@@ -274,6 +271,70 @@ func (c *PublicApiController) HandleOne() {
|
274
|
271
|
//
|
275
|
272
|
//}
|
276
|
273
|
|
|
274
|
+func (c *PublicApiController) HandleHisPatientTwo() {
|
|
275
|
+ ps, _ := service.GetHisPatient4444555()
|
|
276
|
+ for _, item := range ps {
|
|
277
|
+ var rf []*ResultFiveT
|
|
278
|
+ json.Unmarshal([]byte(item.Iinfo), &rf)
|
|
279
|
+ var insuplc_admdvs string
|
|
280
|
+ var emp_name string
|
|
281
|
+
|
|
282
|
+ var insutype string
|
|
283
|
+ var is390 int = 0
|
|
284
|
+ var is310 int = 0
|
|
285
|
+ var insutypes []*ResultFiveT
|
|
286
|
+
|
|
287
|
+ for _, item := range rf {
|
|
288
|
+ if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
|
|
289
|
+ insutypes = append(insutypes, item)
|
|
290
|
+ }
|
|
291
|
+ }
|
|
292
|
+
|
|
293
|
+ fmt.Println(insutypes)
|
|
294
|
+ if len(insutypes) == 1 {
|
|
295
|
+ insutype = insutypes[0].Insutype
|
|
296
|
+ is390 = 1
|
|
297
|
+ fmt.Println("111111")
|
|
298
|
+ //insuplc_admdvs = insutypes[0].InsuplcAdmdvs
|
|
299
|
+ } else {
|
|
300
|
+ fmt.Println("222222")
|
|
301
|
+
|
|
302
|
+ for _, i := range insutypes {
|
|
303
|
+ if i.Insutype == "390" {
|
|
304
|
+ is390 = 1
|
|
305
|
+ }
|
|
306
|
+
|
|
307
|
+ if i.Insutype == "310" {
|
|
308
|
+ is310 = 1
|
|
309
|
+ }
|
|
310
|
+ }
|
|
311
|
+ }
|
|
312
|
+
|
|
313
|
+ if is390 == 1 {
|
|
314
|
+ insutype = "390"
|
|
315
|
+ }
|
|
316
|
+
|
|
317
|
+ if is310 == 1 {
|
|
318
|
+ insutype = "310"
|
|
319
|
+ }
|
|
320
|
+
|
|
321
|
+ if len(insutypes) == 0 {
|
|
322
|
+ insutype = "390"
|
|
323
|
+ }
|
|
324
|
+ for _, item := range rf {
|
|
325
|
+ if item.Insutype == insutype {
|
|
326
|
+ insuplc_admdvs = item.InsuplcAdmdvs
|
|
327
|
+ emp_name = item.EmpName
|
|
328
|
+ }
|
|
329
|
+ }
|
|
330
|
+ item.InsuplcAdmdvs = insuplc_admdvs
|
|
331
|
+ item.Emp = emp_name
|
|
332
|
+ service.Savehis(item)
|
|
333
|
+
|
|
334
|
+ //service.SaveHisTwo(item)
|
|
335
|
+ }
|
|
336
|
+}
|
|
337
|
+
|
277
|
338
|
func (c *PublicApiController) HandleHisPatient() {
|
278
|
339
|
ps, _ := service.GetHisPatient11111(10215)
|
279
|
340
|
for _, item := range ps {
|
|
@@ -2485,42 +2546,42 @@ func (c *PublicApiController) HandleData10265() {
|
2485
|
2546
|
|
2486
|
2547
|
}
|
2487
|
2548
|
|
2488
|
|
-//func (c *PublicApiController) HandleData10265two() {
|
2489
|
|
-// orders, _ := service.GetHisOrder10265two()
|
2490
|
|
-// for _, items := range orders {
|
2491
|
|
-// if items.AdviceId == 0 && items.ProjectId > 0 {
|
2492
|
|
-// p, _ := service.GetHisPrescriptionProjectByIDTwoone(items.ProjectId)
|
2493
|
|
-// if p.Type == 2 {
|
2494
|
|
-// if p.HisProject.MedicalCoverage == 1 {
|
2495
|
|
-// items.ChrgitmLv = "01"
|
2496
|
|
-// } else if p.HisProject.MedicalCoverage == 2 {
|
2497
|
|
-// items.ChrgitmLv = "02"
|
2498
|
|
-// } else {
|
2499
|
|
-// items.ChrgitmLv = "03"
|
2500
|
|
-// }
|
2501
|
|
-// } else {
|
2502
|
|
-// if p.GoodInfo.MedicalInsuranceLevel == 1 {
|
2503
|
|
-// items.ChrgitmLv = "01"
|
2504
|
|
-// } else if p.GoodInfo.MedicalInsuranceLevel == 2 {
|
2505
|
|
-// items.ChrgitmLv = "02"
|
2506
|
|
-// } else {
|
2507
|
|
-// items.ChrgitmLv = "03"
|
2508
|
|
-// }
|
2509
|
|
-// }
|
2510
|
|
-// }
|
2511
|
|
-// if items.AdviceId > 0 && items.ProjectId == 0 {
|
2512
|
|
-// info, _ := service.GetHisDoctorAdviceInfo(items.AdviceId)
|
2513
|
|
-// if info.Drug.MedicalInsuranceLevel == 1 {
|
2514
|
|
-// items.ChrgitmLv = "01"
|
2515
|
|
-// } else if info.Drug.MedicalInsuranceLevel == 2 {
|
2516
|
|
-// items.ChrgitmLv = "02"
|
2517
|
|
-// } else {
|
2518
|
|
-// items.ChrgitmLv = "03"
|
2519
|
|
-// }
|
2520
|
|
-// }
|
2521
|
|
-// service.SaveOrderInfo(items)
|
2522
|
|
-// }
|
2523
|
|
-//}
|
|
2549
|
+func (c *PublicApiController) HandleData10265two() {
|
|
2550
|
+ orders, _ := service.GetHisOrder10265two()
|
|
2551
|
+ for _, items := range orders {
|
|
2552
|
+ if items.AdviceId == 0 && items.ProjectId > 0 {
|
|
2553
|
+ p, _ := service.GetHisPrescriptionProjectByIDTwoone(items.ProjectId)
|
|
2554
|
+ if p.Type == 2 {
|
|
2555
|
+ if p.HisProject.MedicalCoverage == 1 {
|
|
2556
|
+ items.ChrgitmLv = "01"
|
|
2557
|
+ } else if p.HisProject.MedicalCoverage == 2 {
|
|
2558
|
+ items.ChrgitmLv = "02"
|
|
2559
|
+ } else {
|
|
2560
|
+ items.ChrgitmLv = "03"
|
|
2561
|
+ }
|
|
2562
|
+ } else {
|
|
2563
|
+ if p.GoodInfo.MedicalInsuranceLevel == 1 {
|
|
2564
|
+ items.ChrgitmLv = "01"
|
|
2565
|
+ } else if p.GoodInfo.MedicalInsuranceLevel == 2 {
|
|
2566
|
+ items.ChrgitmLv = "02"
|
|
2567
|
+ } else {
|
|
2568
|
+ items.ChrgitmLv = "03"
|
|
2569
|
+ }
|
|
2570
|
+ }
|
|
2571
|
+ }
|
|
2572
|
+ if items.AdviceId > 0 && items.ProjectId == 0 {
|
|
2573
|
+ info, _ := service.GetHisDoctorAdviceInfo(items.AdviceId)
|
|
2574
|
+ if info.Drug.MedicalInsuranceLevel == 1 {
|
|
2575
|
+ items.ChrgitmLv = "01"
|
|
2576
|
+ } else if info.Drug.MedicalInsuranceLevel == 2 {
|
|
2577
|
+ items.ChrgitmLv = "02"
|
|
2578
|
+ } else {
|
|
2579
|
+ items.ChrgitmLv = "03"
|
|
2580
|
+ }
|
|
2581
|
+ }
|
|
2582
|
+ service.SaveOrderInfo(items)
|
|
2583
|
+ }
|
|
2584
|
+}
|
2524
|
2585
|
|
2525
|
2586
|
//func (c *PublicApiController) HandleOrderInfoData() {
|
2526
|
2587
|
// orders, _ := service.GetHisOrderInfoDetail()
|