|
@@ -370,14 +370,17 @@ func (this *CommonApiController) GetTotalLapseCount() {
|
370
|
370
|
adminUser := this.GetAdminUserInfo()
|
371
|
371
|
orgid := adminUser.CurrentOrgId
|
372
|
372
|
startime, _ := this.GetInt64("startime")
|
373
|
|
- fmt.Println("startime--", startime)
|
|
373
|
+ fmt.Println("startime", startime)
|
374
|
374
|
endtime, _ := this.GetInt64("endtime")
|
375
|
|
- fmt.Println("endtime--", endtime)
|
|
375
|
+ fmt.Println("endtime", endtime)
|
376
|
376
|
|
377
|
377
|
//统计一个月内转出的病人
|
378
|
|
- patients, total, err := service.GetTotalRollOut(startime, endtime, orgid)
|
|
378
|
+ //patients, total, err := service.GetTotalRollOut(startime, endtime, orgid)
|
|
379
|
+ //统计该机构的转出人数
|
|
380
|
+ patients, total, err := service.GetTotalRollOutPatients(orgid)
|
379
|
381
|
//统计总共病人
|
380
|
|
- _, count, _ := service.GetPatientTotalCountTwo(orgid, startime, endtime)
|
|
382
|
+ // _, count, _ := service.GetPatientTotalCountTwo(orgid, startime, endtime)
|
|
383
|
+ count := service.GetPatientTotalCount(orgid)
|
381
|
384
|
if err != nil {
|
382
|
385
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
383
|
386
|
return
|
|
@@ -397,10 +400,8 @@ func (this *CommonApiController) GetTotalSexCount() {
|
397
|
400
|
fmt.Println("开始时间", startime)
|
398
|
401
|
endtime, _ := this.GetInt64("endtime")
|
399
|
402
|
fmt.Println("结束时间", endtime)
|
400
|
|
- //统计这个月透析病人的总数
|
401
|
|
- _, total, err := service.GetPatientTotalCountTwo(orgid, startime, endtime)
|
402
|
|
- //统计改月男病人的总数
|
403
|
|
- _, totalSex, err := service.GetManPatientTotalCount(orgid, startime, endtime)
|
|
403
|
+ total := service.GetPatientTotalCount(orgid)
|
|
404
|
+ _, totalSex, err := service.GetManPatientTotal(orgid)
|
404
|
405
|
|
405
|
406
|
if err != nil {
|
406
|
407
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -420,20 +421,20 @@ func (this *CommonApiController) GetTotalInfectiouscount() {
|
420
|
421
|
fmt.Println("开始时间", startime)
|
421
|
422
|
endtime, _ := this.GetInt64("endtime")
|
422
|
423
|
fmt.Println("结束时间", endtime)
|
423
|
|
- //统计本月透析总人数
|
424
|
|
- _, total, err := service.GetPatientTotalCountTwo(orgid, startime, endtime)
|
425
|
|
- fmt.Println("err--", err)
|
426
|
|
- fmt.Println("total", total)
|
427
|
|
- //统计本月透析人数传染病所占比例
|
428
|
|
- count, err := service.GetPatientInfectiousCount(orgid, startime, endtime)
|
429
|
|
- fmt.Println("报错-------------", count)
|
|
424
|
+ //统计透析总人数
|
|
425
|
+ total := service.GetPatientTotalCount(orgid)
|
|
426
|
+ //统计透析人数传染病所占比例
|
|
427
|
+ count, err := service.GetPatientInfectiousCount(orgid)
|
|
428
|
+ //统计其他
|
|
429
|
+ _, otherTotal, err := service.GetPatientOtherInfectious(orgid)
|
430
|
430
|
if err != nil {
|
431
|
431
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
432
|
432
|
return
|
433
|
433
|
}
|
434
|
434
|
this.ServeSuccessJSON(map[string]interface{}{
|
435
|
|
- "total": total,
|
436
|
|
- "count": count,
|
|
435
|
+ "total": total,
|
|
436
|
+ "count": count,
|
|
437
|
+ "otherTotal": otherTotal,
|
437
|
438
|
})
|
438
|
439
|
}
|
439
|
440
|
|
|
@@ -445,11 +446,9 @@ func (this *CommonApiController) GetTotalAgeCount() {
|
445
|
446
|
fmt.Println("开始时间", startime)
|
446
|
447
|
endtime, _ := this.GetInt64("endtime")
|
447
|
448
|
fmt.Println("结束时间", endtime)
|
448
|
|
- //统计本月透析总人数
|
449
|
|
- _, total, err := service.GetPatientTotalCountTwo(orgid, startime, endtime)
|
450
|
|
- fmt.Println("err--", err)
|
451
|
|
- fmt.Println("total", total)
|
452
|
|
- agecount, err := service.GetTotalAgeCount(orgid, startime, endtime)
|
|
449
|
+ //统计透析总人数
|
|
450
|
+ total := service.GetPatientTotalCount(orgid)
|
|
451
|
+ agecount, err := service.GetTotalAgeCount(orgid)
|
453
|
452
|
//two, err := service.GetTotalAgeCountTwo(orgid, startime, endtime)
|
454
|
453
|
if err != nil {
|
455
|
454
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -469,4 +468,18 @@ func (this *CommonApiController) GetTotalDialysisCount() {
|
469
|
468
|
fmt.Println(startime)
|
470
|
469
|
endtime, _ := this.GetInt64("endtime")
|
471
|
470
|
fmt.Println(endtime)
|
|
471
|
+ //统计透析总人数
|
|
472
|
+ total := service.GetPatientTotalCount(orgid)
|
|
473
|
+ fmt.Println("total--------------", total)
|
|
474
|
+ //获取该机构下的所有病人数据
|
|
475
|
+ patients, err := service.GetTotalDialysisAgeCount(orgid)
|
|
476
|
+ fmt.Println("patients--------", patients)
|
|
477
|
+ if err != nil {
|
|
478
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
479
|
+ return
|
|
480
|
+ }
|
|
481
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
482
|
+ "total": total,
|
|
483
|
+ "patients": patients,
|
|
484
|
+ })
|
472
|
485
|
}
|