Browse Source

添加MOCA雷达图, 添加总分趋势

whszxyjhyy
ccsens_zhengzhichuan 5 days ago
parent
commit
344a385997
  1. 3
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsReportServiceImpl.java
  2. 21
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java

3
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsReportServiceImpl.java

@ -2123,6 +2123,7 @@ public class AmsReportServiceImpl implements AmsReportService {
// params.put("cpy_img_url", patientInfo.getName()); // params.put("cpy_img_url", patientInfo.getName());
params.put("report_date", DateUtil.date(patientInfo.getReportTime())); params.put("report_date", DateUtil.date(patientInfo.getReportTime()));
params.put("reportDate", DateUtil.format(DateUtil.date(patientInfo.getReportTime()), "yyyy-MM-dd"));
//生成表格 //生成表格
// 创建带有样式的文本 // 创建带有样式的文本
@ -2294,7 +2295,7 @@ public class AmsReportServiceImpl implements AmsReportService {
if (dto.getVersion() != null && dto.getVersion() == 0 && StrUtil.isNotEmpty(report.getAllUrl())) { if (dto.getVersion() != null && dto.getVersion() == 0 && StrUtil.isNotEmpty(report.getAllUrl())) {
AmsReportVo.Result result = new AmsReportVo.Result(); AmsReportVo.Result result = new AmsReportVo.Result();
result.setPath(report.getAllUrl()); result.setPath(report.getAllUrl());
return result; // return result;
} }
if (dto.getVersion() != null && dto.getVersion() == 1 && StrUtil.isNotEmpty(report.getUrl())) { if (dto.getVersion() != null && dto.getVersion() == 1 && StrUtil.isNotEmpty(report.getUrl())) {
AmsReportVo.Result result = new AmsReportVo.Result(); AmsReportVo.Result result = new AmsReportVo.Result();

21
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java

@ -433,7 +433,28 @@ public class RmsServiceImpl implements IRmsService {
if (CollUtil.isNotEmpty(scores)) { if (CollUtil.isNotEmpty(scores)) {
//组装成父子级关系 //组装成父子级关系
scores = buildReportScoreTree(scores, 0L); 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.setPatient(reportPatient);
detail.setScores(scores); detail.setScores(scores);
return detail; return detail;

Loading…
Cancel
Save