|
@ -226,13 +226,13 @@ public class DataQualityHomeService extends BaseJpaService {
|
|
totalMap.put("orgName", cloudName);//机构名称
|
|
totalMap.put("orgName", cloudName);//机构名称
|
|
totalMap.put("totalInTime", totalInTime);//及时数
|
|
totalMap.put("totalInTime", totalInTime);//及时数
|
|
totalMap.put("totalComplete", totalVisitNum);//总就诊完整数
|
|
totalMap.put("totalComplete", totalVisitNum);//总就诊完整数
|
|
totalMap.put("totalCorrect", totalCorrect);//准确数
|
|
|
|
|
|
totalMap.put("totalCorrect", dataSetsMun-totalCorrect);//准确数
|
|
totalMap.put("totalHospital", totalHospitalNum);//医院总就诊数
|
|
totalMap.put("totalHospital", totalHospitalNum);//医院总就诊数
|
|
totalMap.put("totalDataSet", dataSetsMun);//数据集总行数
|
|
totalMap.put("totalDataSet", dataSetsMun);//数据集总行数
|
|
//计算及时率及完整率,准确性
|
|
//计算及时率及完整率,准确性
|
|
totalMap.put("inTimeRate", calRate(totalInTime, totalHospitalNum));//及时率
|
|
totalMap.put("inTimeRate", calRate(totalInTime, totalHospitalNum));//及时率
|
|
totalMap.put("completeRate", calRate(totalVisitNum, totalHospitalNum));//完整率
|
|
totalMap.put("completeRate", calRate(totalVisitNum, totalHospitalNum));//完整率
|
|
totalMap.put("correctRate", calRate(totalCorrect, dataSetsMun));//数据集准确率
|
|
|
|
|
|
totalMap.put("correctRate", calRate(dataSetsMun-totalCorrect, dataSetsMun));//数据集准确率
|
|
|
|
|
|
Map<String, Object> outPatientMap = genVisitMap("outPatient", hospitalOutpatientNum, totalHospitalNum);
|
|
Map<String, Object> outPatientMap = genVisitMap("outPatient", hospitalOutpatientNum, totalHospitalNum);
|
|
Map<String, Object> inPatientMap = genVisitMap("inPatient", hospitalInpatientNum, totalHospitalNum);
|
|
Map<String, Object> inPatientMap = genVisitMap("inPatient", hospitalInpatientNum, totalHospitalNum);
|
|
@ -309,10 +309,10 @@ public class DataQualityHomeService extends BaseJpaService {
|
|
double dataSetsMun = getDataSetsMap(start, end, null);
|
|
double dataSetsMun = getDataSetsMap(start, end, null);
|
|
long endTime2= System.currentTimeMillis();
|
|
long endTime2= System.currentTimeMillis();
|
|
logger.info("总准确数据集数耗时:"+ (endTime2-endTime1));
|
|
logger.info("总准确数据集数耗时:"+ (endTime2-endTime1));
|
|
totalMap.put("totalCorrect", totalCorrect);//准确数
|
|
|
|
|
|
totalMap.put("totalCorrect", dataSetsMun-totalCorrect);//准确数
|
|
totalMap.put("totalDataSet", dataSetsMun);//数据集总行数
|
|
totalMap.put("totalDataSet", dataSetsMun);//数据集总行数
|
|
//3 计算准确性
|
|
//3 计算准确性
|
|
totalMap.put("correctRate", calRate(totalCorrect, dataSetsMun));//数据集准确率
|
|
|
|
|
|
totalMap.put("correctRate", calRate(dataSetsMun-totalCorrect, dataSetsMun));//数据集准确率
|
|
long endlong = System.currentTimeMillis();
|
|
long endlong = System.currentTimeMillis();
|
|
logger.info("总耗时:"+ (endlong-startlong));
|
|
logger.info("总耗时:"+ (endlong-startlong));
|
|
return totalMap;
|
|
return totalMap;
|
|
@ -439,8 +439,8 @@ public class DataQualityHomeService extends BaseJpaService {
|
|
TransportClient transportClient = elasticSearchPool.getClient();
|
|
TransportClient transportClient = elasticSearchPool.getClient();
|
|
// 条件设置
|
|
// 条件设置
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
stringBuilder.append("event_date>=" + start + " 00:00:00;");
|
|
|
|
stringBuilder.append("event_date<=" + end + " 23:59:59;");
|
|
|
|
|
|
stringBuilder.append("receive_date>=" + start + " 00:00:00;");
|
|
|
|
stringBuilder.append("receive_date<=" + end + " 23:59:59;");
|
|
if (StringUtils.isNotEmpty(orgCode)) {
|
|
if (StringUtils.isNotEmpty(orgCode)) {
|
|
stringBuilder.append("org_code=" + orgCode);
|
|
stringBuilder.append("org_code=" + orgCode);
|
|
}
|
|
}
|
|
@ -729,7 +729,7 @@ public class DataQualityHomeService extends BaseJpaService {
|
|
for(int i=0;i<name.size();i++){
|
|
for(int i=0;i<name.size();i++){
|
|
if(map1.get(name.get(i))!=null&&map2.get(name.get(i))!=null){
|
|
if(map1.get(name.get(i))!=null&&map2.get(name.get(i))!=null){
|
|
if(Double.parseDouble(map2.get(name.get(i))+"")!=0){
|
|
if(Double.parseDouble(map2.get(name.get(i))+"")!=0){
|
|
double rate = (double)map1.get(name.get(i))/(double)map2.get(name.get(i))*100;
|
|
|
|
|
|
double rate = ((double)map2.get(name.get(i))-(double)map1.get(name.get(i)))/(double)map2.get(name.get(i))*100;
|
|
data.add((double) Math.round(rate * 100) / 100);
|
|
data.add((double) Math.round(rate * 100) / 100);
|
|
}else{
|
|
}else{
|
|
data.add(0.0);
|
|
data.add(0.0);
|