Browse Source

bug

sd
zhizhi wu 4 years ago
parent
commit
9192d77840
  1. 29
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  2. 4
      ht/src/main/resources/application.yml
  3. 3
      ht/src/main/resources/mapper_dao/HtPatientReportDao.xml
  4. 4
      ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml

29
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -1189,7 +1189,7 @@ public class PatientReportService implements IPatientReportService {
if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)
|| sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu) ) {
yuYan = sortScoreMap.getOrDefault(mingming1, zero).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero))
.add(sortScoreMap.getOrDefault(fushu1, zero)).add(sortScoreMap.getOrDefault(fushu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero));
.add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero));
}
// 注意指数:数字广度顺+数字广度逆+警觉性+连续减7+句子重复+即刻记忆2次  0-18分
if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing)
@ -1205,7 +1205,7 @@ public class PatientReportService implements IPatientReportService {
}
PdfUtil.Row titleRow = new PdfUtil.Row();
PdfUtil.Cell titleCell = new PdfUtil.Cell("MoCA认知域指数(CDIS)");
PdfUtil.Cell titleCell = new PdfUtil.Cell("MoCA认知域指数(CDIS)");
titleCell.setRowSpan(3);
titleRow.addCell(titleCell);
PdfUtil.Cell jiYiCell = new PdfUtil.Cell("记忆指数");
@ -1213,30 +1213,35 @@ public class PatientReportService implements IPatientReportService {
titleRow.addCell(jiYiCell);
titleRow.addCell(new PdfUtil.Cell("执行指数"));
titleRow.addCell(new PdfUtil.Cell("空间指数"));
titleRow.addCell(new PdfUtil.Cell("注意指数"));
titleRow.addCell(new PdfUtil.Cell("注意指数"));
titleRow.addCell(new PdfUtil.Cell("语言指数"));
titleRow.addCell(new PdfUtil.Cell("定向指数"));
PdfUtil.Cell dingXiangCell = new PdfUtil.Cell("定向指数");
dingXiangCell.setColSpan(2);
dingXiangCell.setBorderRight(1);
titleRow.addCell(dingXiangCell);
rows.add(titleRow);
PdfUtil.Row oneRow = new PdfUtil.Row();
PdfUtil.Cell jiYiValueCell = new PdfUtil.Cell(jiYi == null ? " / 15" : jiYi.toString() + " / 15");
PdfUtil.Cell jiYiValueCell = new PdfUtil.Cell(jiYi == null ? " / 15" : jiYi.intValue() + " / 15");
jiYiValueCell.setColSpan(2);
jiYiValueCell.setRowSpan(2);
oneRow.addCell(jiYiValueCell);
PdfUtil.Cell zhiXingValueCell = new PdfUtil.Cell(zhiXing == null ? " / 13" : zhiXing.toString() + " / 13");
PdfUtil.Cell zhiXingValueCell = new PdfUtil.Cell(zhiXing == null ? " / 13" : zhiXing.intValue() + " / 13");
zhiXingValueCell.setRowSpan(2);
oneRow.addCell(zhiXingValueCell);
PdfUtil.Cell kongJianValueCell = new PdfUtil.Cell(kongJian == null ? " / 7" : kongJian.toString() + " / 7");
PdfUtil.Cell kongJianValueCell = new PdfUtil.Cell(kongJian == null ? " / 7" : kongJian.intValue() + " / 7");
kongJianValueCell.setRowSpan(2);
oneRow.addCell(kongJianValueCell);
PdfUtil.Cell zhuYiValueCell = new PdfUtil.Cell(zhuYi == null ? " / 18" : zhuYi.toString() + " / 18");
PdfUtil.Cell zhuYiValueCell = new PdfUtil.Cell(zhuYi == null ? " / 18" : zhuYi.intValue() + " / 18");
zhuYiValueCell.setRowSpan(2);
oneRow.addCell(zhuYiValueCell);
PdfUtil.Cell yuYanValueCell = new PdfUtil.Cell(yuYan == null ? " / 6" : yuYan.toString() + " / 6");
PdfUtil.Cell yuYanValueCell = new PdfUtil.Cell(yuYan == null ? " / 6" : yuYan.intValue() + " / 6");
yuYanValueCell.setRowSpan(2);
oneRow.addCell(yuYanValueCell);
PdfUtil.Cell dingXiangValueCell = new PdfUtil.Cell(dingXiang == null ? " / 6" : dingXiang.toString() + " / 6");
zhuYiValueCell.setRowSpan(2);
oneRow.addCell(zhuYiValueCell);
PdfUtil.Cell dingXiangValueCell = new PdfUtil.Cell(dingXiang == null ? " / 6" : dingXiang.intValue() + " / 6");
dingXiangValueCell.setRowSpan(2);
dingXiangValueCell.setColSpan(2);
dingXiangValueCell.setBorderRight(1);
oneRow.addCell(dingXiangValueCell);
rows.add(oneRow);
rows.add(new PdfUtil.Row());
}

4
ht/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: dev
include: common, util-dev
active: prod
include: common, util-prod

3
ht/src/main/resources/mapper_dao/HtPatientReportDao.xml

@ -424,7 +424,7 @@
left join
-- MOCA
(select s.patient_report_id as mocaReportId, q.sort as mocaSort, sum(s.score) as mocaScore from
(select * from t_ht_question where evaluation_code = 'MOCA' AND is_del = 0) q
(select * from t_ht_question where evaluation_code in('MOCA', 'YCHY') AND is_del = 0) q
left join t_ht_patient_score s on q.id = s.question_id and s.patient_report_id in
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
@ -440,6 +440,7 @@
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
and s.type in (0, 2)
group by q.evaluation_code, s.patient_report_id) score
on report.id = score.scoreReportId
</select>

4
ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml

@ -54,14 +54,14 @@
AND q.is_del = 0
</select>
<select id="querySortScore" resultType="com.ccsens.ht.bean.vo.PatientReportVo$SortScore">
select q.sort, sum(s.score) as score
select q.sort, if(q.evaluation_code = 'MoCA' and q.parent_code = 'JY', count(s.score), sum(s.score)) as score
from t_ht_question q,
t_ht_patient_score s
where q.id = s.question_id
and s.patient_report_id = #{patientReportId}
<choose>
<when test="evaluationCode.length &lt; 1"></when>
<when test="evaluationCode.length = 1">and q.evaluation_code = #{evaluationCode[0]}</when>
<when test="evaluationCode.length == 1">and q.evaluation_code = #{evaluationCode[0]}</when>
<otherwise>
<foreach collection="evaluationCode" item="item" open="and q.evaluation_code in(" separator="," close=")">
#{item}

Loading…
Cancel
Save