| | |
| | | private TjOrderYcxmService ycxmService; |
| | | @Resource |
| | | private TjXdtgmdjgService xdtgmdjgService; |
| | | @Autowired |
| | | private TjReportSpecialProjectService tjReportSpecialProjectService; |
| | | |
| | | private Integer pdfPage = 0; |
| | | |
| | |
| | | * @throws DocumentException |
| | | */ |
| | | private void notHuaYanTable(Document document1, Map<TjOrderRemark, List<TjPdfVO>> printReport, DictHosp dictHosp, String colorStr, boolean isPacs) throws DocumentException { |
| | | List<TjReportSpecialProject> tjReportSpecialProjects = tjReportSpecialProjectService.list(); |
| | | for (Map.Entry<TjOrderRemark, List<TjPdfVO>> entry : printReport.entrySet()) { |
| | | LambdaQueryWrapper<TjProject> wqqq = new LambdaQueryWrapper<>(); |
| | | wqqq.eq(TjProject::getProId, entry.getKey().getProId()); |
| | |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (!value.isEmpty()) { |
| | | if (value.size() > 1) { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph ppp = new Paragraph("阳性参考值:", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("DOB值: ≥ 4.0 HP-阳性", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(" < 4.0 正常", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | |
| | | ppp = new Paragraph("检测结果: DOB=" + value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | ppp = new Paragraph("结论:" + entry.getKey().getRemark().replaceAll("null",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果", "单位"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | } else { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph ppp = new Paragraph("阳性参考值:", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("DOB值: ≥ 4.0 HP-阳性", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(" < 4.0 正常", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | |
| | | ppp = new Paragraph("检测结果: DOB=" + value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | ppp = new Paragraph("结论:" + entry.getKey().getRemark().replaceAll("null",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (!value.isEmpty()) { |
| | | if (value.size() > 1) { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph ppp = new Paragraph("阳性参考值:", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("DOB值: ≥ 4.0 HP-阳性", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(" < 4.0 正常", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | |
| | | ppp = new Paragraph("检测结果: DOB=" + value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | ppp = new Paragraph("结论:" + entry.getKey().getRemark().replaceAll("null",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果", "单位"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | } else { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph ppp = new Paragraph("阳性参考值:", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("DOB值: ≥ 4.0 HP-阳性", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(" < 4.0 正常", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | |
| | | ppp = new Paragraph("检测结果: DOB=" + value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | ppp = new Paragraph("结论:" + entry.getKey().getRemark().replaceAll("null",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 目前写死 只有碳13、14 模板都是一样的只不过参考值不同 |
| | | * 凌云:{"dy":"4.0","xy":"4.0","title":"阳性参考值:","dystr":"DOB值: ≥ ${dy} HP-阳性","xystr":" < ${xy} 正常","en":"DOB"} |
| | | * 泾川县医院:{"dy":"100","xy":"100","title":"参考值(DPM):","dystr":"DPM值: ≥ ${dy} 阳性","xystr":" < ${xy} 阴性","en":"DPM"} |
| | | * @param document1 |
| | | * @param entry |
| | | * @param paragraph |
| | | * @param value |
| | | * @param tjReportSpecialProject |
| | | * @throws DocumentException |
| | | */ |
| | | private static void reportSpecialProject(Document document1, Map.Entry<TjOrderRemark, List<TjPdfVO>> entry, Paragraph paragraph, List<TjPdfVO> value,TjReportSpecialProject tjReportSpecialProject) throws DocumentException { |
| | | JSONObject entries = JSONUtil.parseObj(tjReportSpecialProject.getParams()); |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph ppp = new Paragraph(entries.getStr("title"), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(entries.getStr("dystr").replace("${dy}",entries.getStr("dy")), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph(entries.getStr("xystr").replace("${xy}",entries.getStr("xy")), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | |
| | | ppp = new Paragraph("检测结果: "+entries.getStr("en")+"=" + value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("", remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | ppp = new Paragraph("结论:" + entry.getKey().getRemark().replaceAll("null",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 主见医师行显示设置 |
| | | * |
| | | * @param document1 |