|
|
@@ -276,7 +276,7 @@ public class DigitalReceiptService {
|
|
|
document.add(line);
|
|
|
|
|
|
document.add(Chunk.NEWLINE);
|
|
|
- document.add(getFooter(baseFont, request.getRxMdtrtinfo()));
|
|
|
+ document.add(getFooter(baseFont, request));
|
|
|
|
|
|
pdfWriter.setPageEvent(new PdfPageEventHelper() {
|
|
|
@Override
|
|
|
@@ -408,18 +408,36 @@ public class DigitalReceiptService {
|
|
|
return table;
|
|
|
}
|
|
|
|
|
|
- private PdfPTable getFooter(BaseFont baseFont, RxMdtrtInfo mdtrt) throws Exception {
|
|
|
+ private PdfPTable getFooter(BaseFont baseFont, RxPreCheckRequest request) throws Exception {
|
|
|
+ RxMdtrtInfo mdtrt = request.getRxMdtrtinfo();
|
|
|
Font smallFont = new Font(baseFont, 10, Font.NORMAL);
|
|
|
- PdfPTable table = new PdfPTable(2);
|
|
|
+ PdfPTable table = new PdfPTable(5);
|
|
|
table.setHorizontalAlignment(Element.ALIGN_LEFT);
|
|
|
- table.setWidthPercentage(30);
|
|
|
- PdfPCell nameCell = new PdfPCell(new Phrase("开方医师:", smallFont));
|
|
|
- nameCell.setBorder(-1);
|
|
|
- PdfPCell signCell = new PdfPCell();
|
|
|
- signCell.setBorder(-1);
|
|
|
- signCell.setImage(getDoctorSign(mdtrt.getDrCode()));
|
|
|
- table.addCell(nameCell);
|
|
|
- table.addCell(signCell);
|
|
|
+ table.setWidthPercentage(80);
|
|
|
+
|
|
|
+ PdfPCell drNameCell = new PdfPCell(new Phrase("开方医师:", smallFont));
|
|
|
+ drNameCell.setBorder(-1);
|
|
|
+
|
|
|
+ String hisCode = rxDao.getDoctorHisCode(mdtrt.getDrCode());
|
|
|
+ PdfPCell drSignCell = new PdfPCell();
|
|
|
+ drSignCell.setBorder(-1);
|
|
|
+ drSignCell.setImage(getDoctorSign(hisCode));
|
|
|
+
|
|
|
+ PdfPCell blankCell = new PdfPCell(new Phrase(""));
|
|
|
+ blankCell.setBorder(-1);
|
|
|
+
|
|
|
+ PdfPCell phNameCell = new PdfPCell(new Phrase("审方药师:", smallFont));
|
|
|
+ phNameCell.setBorder(-1);
|
|
|
+
|
|
|
+ PdfPCell phSignCell = new PdfPCell();
|
|
|
+ phSignCell.setBorder(-1);
|
|
|
+ phSignCell.setImage(getDoctorSign(request.getStaffId()));
|
|
|
+
|
|
|
+ table.addCell(drNameCell);
|
|
|
+ table.addCell(drSignCell);
|
|
|
+ table.addCell(blankCell);
|
|
|
+ table.addCell(phNameCell);
|
|
|
+ table.addCell(phSignCell);
|
|
|
return table;
|
|
|
}
|
|
|
|
|
|
@@ -431,11 +449,12 @@ public class DigitalReceiptService {
|
|
|
return stamp;
|
|
|
}
|
|
|
|
|
|
- private Image getDoctorSign(String ybCode) throws BadElementException, IOException {
|
|
|
- String hisCode = rxDao.getDoctorHisCode(ybCode);
|
|
|
- Image signature = Image.getInstance("http://webhis.thyy.cn:8080/doctorSignatureImage/" + hisCode + ".png");
|
|
|
- signature.scalePercent(35);
|
|
|
- return signature;
|
|
|
+ private Image getDoctorSign(String hisCode) {
|
|
|
+ return TryUtil.ignoreErr(() -> {
|
|
|
+ Image signature = Image.getInstance("http://webhis.thyy.cn:8080/doctorSignatureImage/" + hisCode + ".png");
|
|
|
+ signature.scalePercent(35);
|
|
|
+ return signature;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private String translateGender(String gend) {
|