Browse Source

调整报告单

whszxyjhyy
ccsens_zhengzhichuan 5 days ago
parent
commit
b454f1d086
  1. 29
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsReportServiceImpl.java

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

@ -31,6 +31,7 @@ import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.data.*;
import com.deepoove.poi.data.style.BorderStyle;
import com.deepoove.poi.data.style.TableStyle;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import com.deepoove.poi.xwpf.BodyContainer;
import com.deepoove.poi.xwpf.BodyContainerFactory;
@ -2092,8 +2093,8 @@ public class AmsReportServiceImpl implements AmsReportService {
params.put("place", patientInfoById.getNativePlace());
params.put("address", patientInfoById.getAddress());
params.put("hobby", patientInfoById.getHobby());
params.put("aboBlood", patientInfoById.getAboBloodType());
params.put("rhBlood", patientInfoById.getRhBloodType());
params.put("aboBlood", ObjectUtil.isEmpty(patientInfoById.getAboBloodType()) ? "" : ObjectUtil.equals(patientInfoById.getAboBloodType(), "1") ? "A" : ObjectUtil.equals(patientInfoById.getAboBloodType(), "2") ? "B" : ObjectUtil.equals(patientInfoById.getAboBloodType(), "3") ? "O" : ObjectUtil.equals(patientInfoById.getAboBloodType(), "4") ? "AB" : ObjectUtil.equals(patientInfoById.getAboBloodType(), "5") ? "不详" : "未查");
params.put("rhBlood", ObjectUtil.isEmpty(patientInfoById.getRhBloodType()) ? "" : ObjectUtil.equals(patientInfoById.getRhBloodType(), "1") ? "阳性" : ObjectUtil.equals(patientInfoById.getRhBloodType(), "2") ? "阴性" :ObjectUtil.equals(patientInfoById.getRhBloodType(), "3") ? "不详" : "未查");
params.put("visit_type", ObjectUtil.isEmpty(pmsPatientBodyMap.get("visitType")) ? "" : ObjectUtil.equals(pmsPatientBodyMap.get("visitType"), "1") ? "门诊" : "住院");
params.put("visitNo", pmsPatientBodyMap.get("outpatientNo"));
params.put("age", pmsPatientBodyMap.get("age"));
@ -2105,8 +2106,8 @@ public class AmsReportServiceImpl implements AmsReportService {
params.put("bedNumber", pmsPatientBodyMap.get("bedNumber"));
params.put("dischargeDate", ObjectUtil.isEmpty(pmsPatientBodyMap.get("dischargeDate")) ? "": DateUtil.format(DateUtil.parse(pmsPatientBodyMap.get("dischargeDate").toString()), "yyyy-MM-dd"));
params.put("dischargeMethod", ObjectUtil.isNull(pmsPatientBodyMap.get("dischargeMethod")) ? "": ObjectUtil.equals(pmsPatientBodyMap.get("dischargeMethod"), "1") ? "医嘱离院" : ObjectUtil.equals(pmsPatientBodyMap.get("dischargeMethod"), "2") ? "医嘱转院" :ObjectUtil.equals(pmsPatientBodyMap.get("dischargeMethod"), "3") ? "医嘱转社区卫生服务机构/乡镇卫生院":ObjectUtil.equals(pmsPatientBodyMap.get("dischargeMethod"), "4") ? "非医嘱离院":ObjectUtil.equals(pmsPatientBodyMap.get("dischargeMethod"), "5") ? "死亡": "其他");
params.put("height", pmsPatientBodyMap.get("height"));
params.put("weight", pmsPatientBodyMap.get("weight"));
params.put("height", ObjectUtil.isEmpty(pmsPatientBodyMap.get("height")) ? "" : pmsPatientBodyMap.get("height") + "cm");
params.put("weight", ObjectUtil.isEmpty(pmsPatientBodyMap.get("weight")) ? "" : pmsPatientBodyMap.get("weight") + "kg");
params.put("bmi", pmsPatientBodyMap.get("bmi"));
params.put("tz", pmsPatientBodyMap.get("tz"));
params.put("temperature", pmsPatientBodyMap.get("temperature"));
@ -2159,15 +2160,17 @@ public class AmsReportServiceImpl implements AmsReportService {
TextRenderData text4 = Texts.of("评估结论").bold().fontSize(12).create();
// TextRenderData text5 = Texts.of("评估结论").bold().fontSize(12).create();
RowRenderData headerRow = Rows.of(text1, text2, text3, text4).create();
RowRenderData headerRow = Rows.of().create();
//查询
List<RmsVo.ExportInfo> exportInfos = rmsDao.queryReportExportInfo(dto.getEvaluationId());
if (CollUtil.isEmpty(exportInfos)) {
return null;
}
RowRenderData titleRow = Rows.of("一级指标/二级指标", "量表名称", "得分", "结论").create();
Tables.TableBuilder of = Tables.of(headerRow, titleRow);
RowRenderData titleRow = Rows.of("一级指标/二级指标", "量表名称", "得分", "结论").center()
.create();
Tables.TableBuilder of = Tables.of(titleRow);
for (int i = 0; i < exportInfos.size(); i++) {
RmsVo.Pgjl pgjl = new RmsVo.Pgjl();
params.put("yjzb", exportInfos.get(i).getComboParentName());
@ -2185,7 +2188,7 @@ public class AmsReportServiceImpl implements AmsReportService {
textName,
textScore,
textImpression
).create();
).center().create();
// if (StrUtil.isNotEmpty(exportInfos.get(i).getComboName() + "/" + exportInfos.get(i).getComboParentName())) {
// of.mergeRule(MergeCellRule.builder().map(MergeCellRule.Grid.of(i + 1, i + 1), MergeCellRule.Grid.of(0, 1)).build());
// }
@ -2204,7 +2207,7 @@ public class AmsReportServiceImpl implements AmsReportService {
textName,
textScore,
textImpression
).create();
).center().create();
of.addRow(row1);
} else {
TextRenderData textStr = Texts.of(exportInfos.get(i).getImpression().contains("\n") ? "量表结论" + "\n" + "肌少总结论" : "肌少总结论").bold().create();
@ -2219,12 +2222,12 @@ public class AmsReportServiceImpl implements AmsReportService {
textName,
textImpression,
textScore
).create();
).center().create();
if (StrUtil.isNotEmpty(exportInfos.get(i).getComboName() + "/" + exportInfos.get(i).getComboParentName())) {
of.mergeRule(
MergeCellRule.builder().map(
MergeCellRule.Grid.of(i + 2, 0), MergeCellRule.Grid.of(i + 2, 1))
.map(MergeCellRule.Grid.of(i + 2, 2), MergeCellRule.Grid.of(i + 2, 3)
MergeCellRule.Grid.of(i + 1, 0), MergeCellRule.Grid.of(i + 1, 1))
.map(MergeCellRule.Grid.of(i + 1, 2), MergeCellRule.Grid.of(i + 1, 3)
).build()
);
@ -2306,8 +2309,8 @@ public class AmsReportServiceImpl implements AmsReportService {
params.put("questionTables", listMap);
TableRenderData tableData = of
.center()
.create();
params.put("table", tableData);
return params;

Loading…
Cancel
Save