|
|
@ -142,23 +142,23 @@ public class PatientReportVo { |
|
|
|
//第一栏
|
|
|
|
rows.add( |
|
|
|
fillRow( |
|
|
|
"姓名:" + this.patientName, |
|
|
|
"性别:" + (this.sex == 0 ? "男" : "女"), |
|
|
|
"年龄:" + this.patientAge + " 岁") |
|
|
|
"姓名:" + (StrUtil.isEmpty(this.patientName) ? "" : this.patientName), |
|
|
|
"性别:" + (this.sex == null ? "" : this.sex == 0 ? "男" : "女"), |
|
|
|
"年龄:" + (this.patientAge != null && this.patientAge != 0 ? this.patientAge + " 岁" : "")) |
|
|
|
); |
|
|
|
//第二栏
|
|
|
|
rows.add( |
|
|
|
fillRow( |
|
|
|
"文化程度:" + this.educationalStatusUnit + "年", |
|
|
|
"编号:" + this.serialNumber, |
|
|
|
"职业:" + careerMap.get(this.career)) |
|
|
|
"文化程度:" + (StrUtil.isEmpty(this.educationalStatusUnit) ? "" : this.educationalStatusUnit + "年"), |
|
|
|
"编号:" + (StrUtil.isEmpty(this.serialNumber) ? "" : this.serialNumber), |
|
|
|
"职业:" + (this.career != null ? careerMap.get(this.career) : "")) |
|
|
|
); |
|
|
|
//第三栏
|
|
|
|
rows.add( |
|
|
|
fillRow( |
|
|
|
"科别:" + this.department, |
|
|
|
"床号:" + this.bedNumber, |
|
|
|
"病案号:" + this.hospitalNumber) |
|
|
|
"科别:" + (StrUtil.isEmpty(this.department) ? "" : this.department), |
|
|
|
"床号:" + (StrUtil.isEmpty(this.bedNumber) ? "" : this.bedNumber), |
|
|
|
"病案号:" + (StrUtil.isEmpty(this.hospitalNumber) ? "" : this.hospitalNumber)) |
|
|
|
); |
|
|
|
//第四栏
|
|
|
|
// Date date = null;
|
|
|
@ -169,7 +169,7 @@ public class PatientReportVo { |
|
|
|
|
|
|
|
rows.add( |
|
|
|
fillRow( |
|
|
|
"临床诊断:" + this.clinicalDiagnosis, |
|
|
|
"临床诊断:" + (StrUtil.isEmpty(this.clinicalDiagnosis) ? "" : this.clinicalDiagnosis), |
|
|
|
"","") |
|
|
|
// "检查日期:" + (date == null ? "" : DateUtil.format(date, "yyyy-MM-dd")))
|
|
|
|
); |
|
|
@ -282,11 +282,11 @@ public class PatientReportVo { |
|
|
|
this.subReport.forEach(reportScore -> { |
|
|
|
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); |
|
|
|
boolean isLast = npi.equalsIgnoreCase(this.code) && this.subReport.indexOf(reportScore) == this.subReport.size() - 1; |
|
|
|
fillRow(row1,row2, reportScore.getName(), score, mmse.equalsIgnoreCase(this.code), isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); |
|
|
|
fillRow(row1,row2, reportScore.getName(), score, isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); |
|
|
|
}); |
|
|
|
// 总分
|
|
|
|
if (mmse.equalsIgnoreCase(this.code)) { |
|
|
|
fillRow(row1,row2, "总分", (this.score == null ? "" : this.score) + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true); |
|
|
|
fillRow(row1,row2, "总分", (this.score == null ? "" : this.score) + (this.totalScore > 0 ? "/" + this.totalScore : ""), true); |
|
|
|
} |
|
|
|
rows.add(row1); |
|
|
|
rows.add(row2); |
|
|
@ -305,10 +305,10 @@ public class PatientReportVo { |
|
|
|
ReportScore reportScore = this.subReport.get(i); |
|
|
|
String jy = "JY"; |
|
|
|
if (jy.equalsIgnoreCase(reportScore.getCode())) { |
|
|
|
fillRow(row1, row2, reportScore.getName(), " ", false, false, i == 0 ? new int[]{2,2}: null); |
|
|
|
fillRow(row1, row2, reportScore.getName(), " ", false, i == 0 ? new int[]{2,2}: null); |
|
|
|
} else { |
|
|
|
String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); |
|
|
|
fillRow(row1, row2, reportScore.getName(), score, false, false, i == 0 ? new int[]{2,2}: null); |
|
|
|
fillRow(row1, row2, reportScore.getName(), score, false, i == 0 ? new int[]{2,2}: null); |
|
|
|
} |
|
|
|
} |
|
|
|
PdfUtil.Cell scoreNameCell = new PdfUtil.Cell(); |
|
|
@ -392,11 +392,11 @@ public class PatientReportVo { |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){ |
|
|
|
private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isRight, int... colspan){ |
|
|
|
//名称
|
|
|
|
PdfUtil.Cell cell1 = new PdfUtil.Cell(); |
|
|
|
cell1.setContent(name); |
|
|
|
cell1.setBorderTop(isTop? 1 : 0); |
|
|
|
// cell1.setBorderTop(isTop? 1 : 0);
|
|
|
|
cell1.setBorderRight(isRight? 1 : 0); |
|
|
|
cell1.setColSpan(colspan == null || colspan.length == 0 ? 1 : colspan[0]); |
|
|
|
row1.addCell(cell1); |
|
|
|