|
|
|
@ -433,7 +433,28 @@ public class RmsServiceImpl implements IRmsService { |
|
|
|
if (CollUtil.isNotEmpty(scores)) { |
|
|
|
//组装成父子级关系
|
|
|
|
scores = buildReportScoreTree(scores, 0L); |
|
|
|
for (RmsVo.ReportScore score : scores) { |
|
|
|
//查询量表的总分趋势信息
|
|
|
|
List<RmsVo.ScoreTrend> scoreTrend = rmsDao.getScoreTrend(reportPatient.getPatientId(), score.getCode(), time.getMinTime(), time.getMaxTime()); |
|
|
|
//折线图上只显示近5条记录
|
|
|
|
if (CollectionUtil.isNotEmpty(scoreTrend) && scoreTrend.size() > 5) { |
|
|
|
scoreTrend = scoreTrend.subList(scoreTrend.size() - 5, scoreTrend.size()); |
|
|
|
} |
|
|
|
score.setScoreTrend(scoreTrend); |
|
|
|
//给moca添加雷达图信息
|
|
|
|
if (GenConstants.Ht.Report.MOCA.equals(score.getCode())) { |
|
|
|
List<RmsVo.EvaluationScoreDistribution> scoreDistributions = rmsDao.getScoreDistributions(reportPatient.getPatientId()); |
|
|
|
if (CollUtil.isNotEmpty(scoreDistributions)) { |
|
|
|
//处理认知域
|
|
|
|
List<RmsVo.EvaluationScoreDistribution> distributions = disposeDistribution(scoreDistributions); |
|
|
|
//根据日期倒序排序
|
|
|
|
distributions.sort(Comparator.comparing(RmsVo.EvaluationScoreDistribution::getDay).reversed()); |
|
|
|
score.setScoreDistributions(distributions); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
detail.setPatient(reportPatient); |
|
|
|
detail.setScores(scores); |
|
|
|
return detail; |
|
|
|
|