|
@@ -93,7 +93,7 @@ public class PcaStatsAnalyse implements CommonHistoryStats {
|
|
|
//根据病号对输注进行划分
|
|
//根据病号对输注进行划分
|
|
|
groupByTime.forEach((k,histories)->{
|
|
groupByTime.forEach((k,histories)->{
|
|
|
if(CollectionUtil.isNotEmpty(histories)){
|
|
if(CollectionUtil.isNotEmpty(histories)){
|
|
|
- groupByTimeAndPatient.put(k,groupByPatient(histories));
|
|
|
|
|
|
|
+ groupByTimeAndPatient.put(k, groupByClinic(histories));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -169,7 +169,7 @@ public class PcaStatsAnalyse implements CommonHistoryStats {
|
|
|
//根据病号对输注进行划分,计算人均次数
|
|
//根据病号对输注进行划分,计算人均次数
|
|
|
groupByTime.forEach((k,histories)->{
|
|
groupByTime.forEach((k,histories)->{
|
|
|
if(CollectionUtil.isNotEmpty(histories)){
|
|
if(CollectionUtil.isNotEmpty(histories)){
|
|
|
- groupByTimeAndPatient.put(k,groupByTimeAndPatient.put(k,groupByPatient(histories)));
|
|
|
|
|
|
|
+ groupByTimeAndPatient.put(k,groupByTimeAndPatient.put(k, groupByClinic(histories)));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -184,7 +184,7 @@ public class PcaStatsAnalyse implements CommonHistoryStats {
|
|
|
long total=0;
|
|
long total=0;
|
|
|
long pcaValidTotalCount=0;
|
|
long pcaValidTotalCount=0;
|
|
|
long pcaInvalidTotalCount=0;
|
|
long pcaInvalidTotalCount=0;
|
|
|
- List<CombineHistoryResult> personalPcaResults =groupByPatient(combineResults);
|
|
|
|
|
|
|
+ List<CombineHistoryResult> personalPcaResults = groupByClinic(combineResults);
|
|
|
|
|
|
|
|
for (CombineHistoryResult combineResult : personalPcaResults) {
|
|
for (CombineHistoryResult combineResult : personalPcaResults) {
|
|
|
Integer validCount = Optional.ofNullable(combineResult.getPcaValidCount()).orElse(0);
|
|
Integer validCount = Optional.ofNullable(combineResult.getPcaValidCount()).orElse(0);
|
|
@@ -213,18 +213,18 @@ public class PcaStatsAnalyse implements CommonHistoryStats {
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 描述: 根据病号对结果进行划分
|
|
|
|
|
|
|
+ * 描述: 根据临床手术对结果进行划分
|
|
|
* @author lifang
|
|
* @author lifang
|
|
|
* @date 2022/7/23 15:21
|
|
* @date 2022/7/23 15:21
|
|
|
* @param sources
|
|
* @param sources
|
|
|
- * @return List<CombineHistoryResult> 一个病人信息占据一个CombineHistoryResult,包括PCA信息
|
|
|
|
|
|
|
+ * @return List<CombineHistoryResult> 一个临床手术信息占据一个CombineHistoryResult,包括PCA信息
|
|
|
*/
|
|
*/
|
|
|
- private List<CombineHistoryResult> groupByPatient(List<CombineHistoryResult> sources){
|
|
|
|
|
|
|
+ private List<CombineHistoryResult> groupByClinic(List<CombineHistoryResult> sources){
|
|
|
List<CombineHistoryResult> result = new ArrayList<>();
|
|
List<CombineHistoryResult> result = new ArrayList<>();
|
|
|
Map<String, List<CombineHistoryResult>> patientMap = sources.parallelStream()
|
|
Map<String, List<CombineHistoryResult>> patientMap = sources.parallelStream()
|
|
|
.collect(
|
|
.collect(
|
|
|
- Collectors.groupingBy(CombineHistoryResult::getPatientId));
|
|
|
|
|
- patientMap.forEach((patientId,histories)->{
|
|
|
|
|
|
|
+ Collectors.groupingBy(CombineHistoryResult::getClinicId));
|
|
|
|
|
+ patientMap.forEach((clinicId,histories)->{
|
|
|
CombineHistoryResult value = new CombineHistoryResult();
|
|
CombineHistoryResult value = new CombineHistoryResult();
|
|
|
AtomicInteger pcaValidCount=new AtomicInteger(0);
|
|
AtomicInteger pcaValidCount=new AtomicInteger(0);
|
|
|
AtomicInteger pcaInValidCount=new AtomicInteger(0);
|
|
AtomicInteger pcaInValidCount=new AtomicInteger(0);
|
|
@@ -234,7 +234,7 @@ public class PcaStatsAnalyse implements CommonHistoryStats {
|
|
|
});
|
|
});
|
|
|
value.setPcaValidCount(pcaValidCount.get());
|
|
value.setPcaValidCount(pcaValidCount.get());
|
|
|
value.setPcaInvalidCount(pcaInValidCount.get());
|
|
value.setPcaInvalidCount(pcaInValidCount.get());
|
|
|
- value.setPatientId(patientId);
|
|
|
|
|
|
|
+ value.setClinicId(clinicId);
|
|
|
result.add(value);
|
|
result.add(value);
|
|
|
});
|
|
});
|
|
|
return result;
|
|
return result;
|