|
|
@ -95,11 +95,11 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
return dealPlanResVO;
|
|
|
|
return dealPlanResVO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 查询出疾病处置计划
|
|
|
|
// 2. 查询出疾病处置计划(疾病配置的处置计划)
|
|
|
|
List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = diseaseTreatmentPlanService.queryListByDiseaseId(diseaseId);
|
|
|
|
List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = diseaseTreatmentPlanService.queryListByDiseaseId(diseaseId);
|
|
|
|
List<String> planIds = diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getPlanId).distinct().collect(Collectors.toList());
|
|
|
|
List<String> treatmentPlanId = diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getTreatmentPlanId).distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 查出疾病处置计划用药
|
|
|
|
// 3. 查出疾病处置计划用药(疾病配置的用药计划)
|
|
|
|
List<DiseaseTreatmentPlanDrug> diseaseTreatmentPlanDrugList = diseaseTreatmentPlanDrugService.lambdaQuery().eq(DiseaseTreatmentPlanDrug::getDiseaseId, diseaseId).list();
|
|
|
|
List<DiseaseTreatmentPlanDrug> diseaseTreatmentPlanDrugList = diseaseTreatmentPlanDrugService.lambdaQuery().eq(DiseaseTreatmentPlanDrug::getDiseaseId, diseaseId).list();
|
|
|
|
List<String> drugIds = diseaseTreatmentPlanDrugList.stream().map(DiseaseTreatmentPlanDrug::getDrugId).distinct().collect(Collectors.toList());
|
|
|
|
List<String> drugIds = diseaseTreatmentPlanDrugList.stream().map(DiseaseTreatmentPlanDrug::getDrugId).distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
@ -109,7 +109,7 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : treatmentPlanRecordList) {
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : treatmentPlanRecordList) {
|
|
|
|
TreatmentPlanRecordVo bean = BeanUtil.toBean(treatmentPlanRecord, TreatmentPlanRecordVo.class);
|
|
|
|
TreatmentPlanRecordVo bean = BeanUtil.toBean(treatmentPlanRecord, TreatmentPlanRecordVo.class);
|
|
|
|
// 是否正确
|
|
|
|
// 是否正确
|
|
|
|
boolean flag = StrUtil.isNotEmpty(bean.getDrugId()) ? drugIds.contains(bean.getDrugId()) : planIds.contains(bean.getTreatmentPlanId());
|
|
|
|
boolean flag = StrUtil.isNotEmpty(bean.getDrugId()) ? drugIds.contains(bean.getDrugId()) : treatmentPlanId.contains(bean.getTreatmentPlanId());
|
|
|
|
bean.setFlag(flag ? 1 : 0);
|
|
|
|
bean.setFlag(flag ? 1 : 0);
|
|
|
|
if (StrUtil.isNotEmpty(bean.getDrugId())) {
|
|
|
|
if (StrUtil.isNotEmpty(bean.getDrugId())) {
|
|
|
|
drugTreatmentPlanResults.add(bean);
|
|
|
|
drugTreatmentPlanResults.add(bean);
|
|
|
@ -432,24 +432,27 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
* ( 用户命中病历治疗计划配置问题数 / 疾病配置的治疗计划总数 ) * (用户命中病历治疗计划配置问题数 / 用户实际填写的治疗计划的数量 )
|
|
|
|
* ( 用户命中病历治疗计划配置问题数 / 疾病配置的治疗计划总数 ) * (用户命中病历治疗计划配置问题数 / 用户实际填写的治疗计划的数量 )
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private ChartNodeVO computeTreatmentPlanChart(Process process) {
|
|
|
|
private ChartNodeVO computeTreatmentPlanChart(Process process) {
|
|
|
|
// 查询用户填写的治疗计划
|
|
|
|
// 查询用户填写的治疗计划(包含处置计划和用药计划)
|
|
|
|
List<TreatmentPlanRecord> userTreatmentPlanRecordList = treatmentPlanRecordService.lambdaQuery().eq(TreatmentPlanRecord::getProcessId, process.getId()).list();
|
|
|
|
List<TreatmentPlanRecord> userTreatmentPlanRecordList = treatmentPlanRecordService.lambdaQuery().eq(TreatmentPlanRecord::getProcessId, process.getId()).list();
|
|
|
|
int userTreatmentPlanCount = userTreatmentPlanRecordList.size();
|
|
|
|
int userTreatmentPlanCount = userTreatmentPlanRecordList.size();
|
|
|
|
// 查询疾病配置的治疗计划
|
|
|
|
// 2. 查询出疾病处置计划(疾病配置的处置计划)
|
|
|
|
List<DiseaseTreatmentPlan> planList = diseaseTreatmentPlanService.lambdaQuery().eq(DiseaseTreatmentPlan::getDiseaseId, process.getDiseaseId()).select(DiseaseTreatmentPlan::getId).list();
|
|
|
|
List<DiseaseTreatmentPlanResVo> diseaseTreatmentPlanResVos = diseaseTreatmentPlanService.queryListByDiseaseId(process.getDiseaseId());
|
|
|
|
List<String> planIdList = planList.stream().map(DiseaseTreatmentPlan::getId).collect(Collectors.toList());
|
|
|
|
Set<String> treatmentPlanIdSet = diseaseTreatmentPlanResVos.stream().map(DiseaseTreatmentPlanResVo::getTreatmentPlanId).collect(Collectors.toSet());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 查出疾病处置计划用药(疾病配置的用药计划)
|
|
|
|
|
|
|
|
List<DiseaseTreatmentPlanDrug> diseaseTreatmentPlanDrugList = diseaseTreatmentPlanDrugService.lambdaQuery().eq(DiseaseTreatmentPlanDrug::getDiseaseId, process.getDiseaseId()).list();
|
|
|
|
|
|
|
|
Set<String> drugIdSet = diseaseTreatmentPlanDrugList.stream().map(DiseaseTreatmentPlanDrug::getDrugId).collect(Collectors.toSet());
|
|
|
|
// 疾病配置的治疗计划总数
|
|
|
|
// 疾病配置的治疗计划总数
|
|
|
|
int medicalCount = planIdList.size();
|
|
|
|
Collection<String> planIdSet = CollUtil.union(treatmentPlanIdSet, drugIdSet);
|
|
|
|
// 找到用户配置的药物计划
|
|
|
|
int medicalCount = planIdSet.size();
|
|
|
|
List<DiseaseTreatmentPlanDrug> drugList = diseaseTreatmentPlanDrugService.lambdaQuery().eq(DiseaseTreatmentPlanDrug::getDiseaseId, process.getDiseaseId()).select(DiseaseTreatmentPlanDrug::getDrugId).list();
|
|
|
|
|
|
|
|
List<String> drugIdList = drugList.stream().map(DiseaseTreatmentPlanDrug::getDrugId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
int hitPlanCount = 0;
|
|
|
|
int hitPlanCount = 0;
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : userTreatmentPlanRecordList) {
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : userTreatmentPlanRecordList) {
|
|
|
|
// 需要分别看是否是药物计划
|
|
|
|
// 需要分别看是否是药物计划
|
|
|
|
if (StrUtil.isNotBlank(treatmentPlanRecord.getTreatmentPlanId()) && planIdList.contains(treatmentPlanRecord.getTreatmentPlanId())) {
|
|
|
|
if (StrUtil.isNotBlank(treatmentPlanRecord.getTreatmentPlanId()) && planIdSet.contains(treatmentPlanRecord.getTreatmentPlanId())) {
|
|
|
|
hitPlanCount++;
|
|
|
|
hitPlanCount++;
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StrUtil.isNotBlank(treatmentPlanRecord.getDrugId()) && drugIdList.contains(treatmentPlanRecord.getDrugId())) {
|
|
|
|
if (StrUtil.isNotBlank(treatmentPlanRecord.getDrugId()) && planIdSet.contains(treatmentPlanRecord.getDrugId())) {
|
|
|
|
hitPlanCount++;
|
|
|
|
hitPlanCount++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|