|
|
@@ -39,11 +39,13 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
private IOutpatientSettleBillService outpatientSettleBillService;
|
|
|
@Autowired
|
|
|
private IPrescriptionOrderService prescriptionOrderService;
|
|
|
+ @Autowired
|
|
|
+ private IAfterStatisticsService afterStatisticsService;
|
|
|
|
|
|
@Override
|
|
|
public DashboardStatisticsBarResponse loadStatisticsBar(String startTime, String endTime) {
|
|
|
//只算当日 数量统计汇总
|
|
|
- DashboardStatisticsBarResponse sourceData = getSourceData(startTime, endTime);
|
|
|
+ DashboardStatisticsBarResponse sourceData = getSourceData(endTime, endTime);
|
|
|
DashboardStatisticsBarResponse result = new DashboardStatisticsBarResponse();
|
|
|
result.setSwipesTotal(sourceData.getSwipesTotal());
|
|
|
result.setBeforeReminderTotal(sourceData.getBeforeReminderTotal());
|
|
|
@@ -54,12 +56,12 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
// Date startTimeDate = DateTimeUtil.parse(startTime, DateTimeUtil.FULL_STYLE);
|
|
|
// Date endTimeDate = DateTimeUtil.parse(endTime, DateTimeUtil.FULL_STYLE);
|
|
|
// long diffDay = DateTimeUtil.subDay(startTimeDate, endTimeDate);
|
|
|
- result.setSwipesTotal(result.getSwipesTotal());
|
|
|
- result.setBeforeReminderTotal(result.getBeforeReminderTotal());
|
|
|
- result.setFormulaTotal(result.getFormulaTotal());
|
|
|
- result.setMiddleReviewTotal(result.getMiddleReviewTotal());
|
|
|
- result.setViolationAmountTotal(result.getViolationAmountTotal());
|
|
|
- result.setAfterSupervisoryTotal(result.getAfterSupervisoryTotal());
|
|
|
+// result.setSwipesTotal(result.getSwipesTotal());
|
|
|
+// result.setBeforeReminderTotal(result.getBeforeReminderTotal());
|
|
|
+// result.setFormulaTotal(result.getFormulaTotal());
|
|
|
+// result.setMiddleReviewTotal(result.getMiddleReviewTotal());
|
|
|
+// result.setViolationAmountTotal(result.getViolationAmountTotal());
|
|
|
+// result.setAfterSupervisoryTotal(result.getAfterSupervisoryTotal());
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -67,7 +69,8 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
DashboardStatisticsBarResponse sourceData = new DashboardStatisticsBarResponse();
|
|
|
//只算当日
|
|
|
sourceData.setSwipesTotal(outpatientSettleBillService.statisticsVisit(startTime, endTime));
|
|
|
- sourceData.setBeforeReminderTotal(advanceWarningAuditService.statisticsLine(startTime, endTime).get(0).intValue());
|
|
|
+ int beforeReminderTotal = advanceWarningAuditService.statisticsLine(startTime, endTime).get(0).intValue();
|
|
|
+ sourceData.setBeforeReminderTotal(beforeReminderTotal);
|
|
|
sourceData.setFormulaTotal(prescriptionOrderService.statisticsFormula(startTime, endTime));
|
|
|
sourceData.setMiddleReviewTotal(midIncidentAuditService.statisticsLine(startTime, endTime).get(0).intValue());
|
|
|
sourceData.setViolationAmountTotal(afterwardsAuditService.statisticsAmount(startTime, endTime));
|
|
|
@@ -169,8 +172,8 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
// Date endTimeDate = DateTimeUtil.parse(endTime, DateTimeUtil.FULL_STYLE);
|
|
|
// long diffDay = DateTimeUtil.subDay(startTimeDate, endTimeDate);
|
|
|
|
|
|
- // 生成事前规则类型排名
|
|
|
- DashboardStatisticsDetailedItem beforeRulesTop = generateBeforeRuleTop(sourceData);
|
|
|
+ // 生成事前规则类型排名-改 统计指标监测排名
|
|
|
+ DashboardStatisticsDetailedItem beforeRulesTop = generateBeforeRuleTop(startTime, endTime);
|
|
|
// 生成事中规则类型排名
|
|
|
DashboardStatisticsDetailedItem middleRulesTop = generateMiddleRuleTop(startTime, endTime);
|
|
|
// 生成事后规则类型排名
|
|
|
@@ -195,8 +198,8 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
List<StaticResponse> hashMaps = afterwardsAuditService.statisticsProject(startTime, endTime);
|
|
|
hashMaps.forEach(it -> {
|
|
|
JSONObject item = new JSONObject();
|
|
|
- item.put("title", it.getName());
|
|
|
- item.put("total", it.getNum());
|
|
|
+ item.put("name", it.getName());
|
|
|
+ item.put("value", it.getNum());
|
|
|
result.add(item);
|
|
|
});
|
|
|
|
|
|
@@ -327,75 +330,27 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
item.put("total", it.getNum());
|
|
|
rule.add(item);
|
|
|
});
|
|
|
-// JSONObject item1 = new JSONObject();
|
|
|
-// item1.put("title", "限适应症和支付疗程(药品)");
|
|
|
-// item1.put("total", top1);
|
|
|
-// rule1.add(item1);
|
|
|
-//
|
|
|
-// JSONObject item2 = new JSONObject();
|
|
|
-// item2.put("title", "限适应症(药品)");
|
|
|
-// item2.put("total", top2);
|
|
|
-// rule1.add(item2);
|
|
|
-//
|
|
|
-// JSONObject item3 = new JSONObject();
|
|
|
-// item3.put("title", "限医院等级适应症疗程(药品)");
|
|
|
-// item3.put("total", top3);
|
|
|
-// rule1.add(item3);
|
|
|
-//
|
|
|
-// JSONObject item4 = new JSONObject();
|
|
|
-// item4.put("title", "限病种(药品)");
|
|
|
-// item4.put("total", top4);
|
|
|
-// rule1.add(item4);
|
|
|
-//
|
|
|
-// JSONObject item5 = new JSONObject();
|
|
|
-// item5.put("title", "限适应症"); //TODO 等待数据
|
|
|
-// item5.put("total", top5);
|
|
|
-// rule1.add(item5);
|
|
|
middleRulesTop.setList(rule);
|
|
|
return middleRulesTop;
|
|
|
}
|
|
|
|
|
|
- private static DashboardStatisticsDetailedItem generateBeforeRuleTop(DashboardStatisticsBarResponse sourceData) {
|
|
|
- Integer beforeReminderTotal = sourceData.getBeforeReminderTotal();
|
|
|
- // 生成事前规则类型排名
|
|
|
+ private DashboardStatisticsDetailedItem generateBeforeRuleTop(String startTime, String endTime) {
|
|
|
+// Integer beforeReminderTotal = sourceData.getBeforeReminderTotal();
|
|
|
+ // 生成事前规则类型排名--改 统计指标监测排名
|
|
|
DashboardStatisticsDetailedItem beforeRulesTop = new DashboardStatisticsDetailedItem();
|
|
|
- beforeRulesTop.setTitle("事前规则类型排名");
|
|
|
- beforeRulesTop.setTotal(beforeReminderTotal);
|
|
|
- ArrayList<JSONObject> rule1 = new ArrayList<>();
|
|
|
-
|
|
|
-
|
|
|
- BigDecimal top1 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.23")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
- BigDecimal top2 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.17")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
- BigDecimal top3 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.14")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
- BigDecimal top4 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.11")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
- BigDecimal top5 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.03")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
- JSONObject item1 = new JSONObject();
|
|
|
- item1.put("title", "频繁门诊");
|
|
|
- item1.put("total", top1);
|
|
|
-
|
|
|
- rule1.add(item1);
|
|
|
-
|
|
|
- JSONObject item2 = new JSONObject();
|
|
|
- item2.put("title", "即往诊断信息提醒");
|
|
|
- item2.put("total", top2);
|
|
|
- rule1.add(item2);
|
|
|
-
|
|
|
- JSONObject item3 = new JSONObject();
|
|
|
- item3.put("title", "意外伤害类疾病提醒");
|
|
|
- item3.put("total", top3);
|
|
|
- rule1.add(item3);
|
|
|
-
|
|
|
- JSONObject item4 = new JSONObject();
|
|
|
- item4.put("title", "死亡人员提示");
|
|
|
- item4.put("total", top4);
|
|
|
- rule1.add(item4);
|
|
|
-
|
|
|
- JSONObject item5 = new JSONObject();
|
|
|
- item5.put("title", "药品违规提示");
|
|
|
- item5.put("total", top5);
|
|
|
- rule1.add(item5);
|
|
|
-
|
|
|
- beforeRulesTop.setList(rule1);
|
|
|
+ beforeRulesTop.setTitle("统计指标监测排名");
|
|
|
+ beforeRulesTop.setTotal(0);
|
|
|
+ ArrayList<JSONObject> rule = new ArrayList<>();
|
|
|
+
|
|
|
+ List<StaticResponse> hashMaps = afterStatisticsService.statisticsMidRule(startTime, endTime);
|
|
|
+ hashMaps.forEach(it -> {
|
|
|
+ JSONObject item = new JSONObject();
|
|
|
+ item.put("title", it.getName());
|
|
|
+ item.put("total", it.getNum());
|
|
|
+ rule.add(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ beforeRulesTop.setList(rule);
|
|
|
return beforeRulesTop;
|
|
|
}
|
|
|
}
|