|
@@ -4,7 +4,6 @@ import java.io.File;
|
|
|
import java.io.FileNotFoundException;
|
|
|
import java.io.FileOutputStream;
|
|
|
import java.io.IOException;
|
|
|
-import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
@@ -38,7 +37,6 @@ import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
import com.lemon.lifecenter.common.LifeCenterFileDownload;
|
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
|
-import com.lemon.lifecenter.dto.LoginDTO;
|
|
|
import com.lemon.lifecenter.dto.PatientDTO;
|
|
|
import com.lemon.lifecenter.dto.PatientMemoDTO;
|
|
|
import com.lemon.lifecenter.dto.PatientPHRHistoryDTO;
|
|
@@ -161,7 +159,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/excel")
|
|
|
- public void getPatientList(
|
|
|
+ public void getExcelFile(
|
|
|
@RequestParam(value="phrType", required=true, defaultValue="temperature") String phrType,
|
|
|
@RequestParam(value="patientIdx", required=true, defaultValue="") int patientIdx,
|
|
|
HttpServletRequest request, HttpServletResponse response ) {
|
|
@@ -171,7 +169,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
patientDto = patientService.selectPatientOne(patientDto);
|
|
|
|
|
|
// phrType = "memo";
|
|
|
- if (phrType == "symptom") {
|
|
|
+ if (phrType.equals("symptom")) {
|
|
|
PatientSymptomSimDTO dto = new PatientSymptomSimDTO();
|
|
|
dto.setPatientIdx(patientIdx);
|
|
|
|
|
@@ -183,7 +181,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
}
|
|
|
|
|
|
this.getPhrSymptomListExcel(request, response, patientDto, result);
|
|
|
- } else if (phrType == "memo") {
|
|
|
+ } else if (phrType.equals("memo")) {
|
|
|
PatientMemoDTO dto = new PatientMemoDTO();
|
|
|
dto.setPatientIdx(patientIdx);
|
|
|
|
|
@@ -365,6 +363,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
cell2.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
cell3.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
cell4.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+
|
|
|
|
|
|
sheet1.setColumnWidth( 0, 5000); //환자명
|
|
|
sheet1.setColumnWidth( 1, 5000); //기록일시
|
|
@@ -572,7 +571,8 @@ public class ClinicController extends LifeCenterController {
|
|
|
cell17.setCellValue("기타증상");
|
|
|
cell18.setCellValue("기록자");
|
|
|
|
|
|
- for (PatientSymptomSimDTO dto : data) {
|
|
|
+ for (int index = data.size() - 1; index >= 0; index--) {
|
|
|
+ PatientSymptomSimDTO dto = data.get(index);
|
|
|
row = sheet1.createRow(i);
|
|
|
cell1 = row.createCell(0);
|
|
|
cell2 = row.createCell(1);
|
|
@@ -581,7 +581,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
cell5 = row.createCell(4);
|
|
|
cell6 = row.createCell(5);
|
|
|
cell7 = row.createCell(6);
|
|
|
- cell8 = row.createCell(7);
|
|
|
+ cell8 = row.createCell(7);
|
|
|
cell9 = row.createCell(8);
|
|
|
cell10 = row.createCell(9);
|
|
|
cell11 = row.createCell(10);
|
|
@@ -604,30 +604,23 @@ public class ClinicController extends LifeCenterController {
|
|
|
}
|
|
|
|
|
|
cell1.setCellValue(createDate);
|
|
|
- cell2.setCellValue(dto.getCoughCheck());
|
|
|
- cell3.setCellValue(dto.getDyspneaCheck());
|
|
|
- cell4.setCellValue(dto.getColdFitCheck());
|
|
|
- cell5.setCellValue(dto.getMusclePainCheck());
|
|
|
- cell6.setCellValue(dto.getHeadacheCheck());
|
|
|
- cell7.setCellValue(dto.getSoreThroatCheck());
|
|
|
- cell8.setCellValue(dto.getSmellPalateCheck());
|
|
|
- cell9.setCellValue(dto.getFatigueCheck());
|
|
|
- cell10.setCellValue(dto.getAppetiteLossCheck());
|
|
|
- cell11.setCellValue(dto.getSputumCheck());
|
|
|
- cell12.setCellValue(dto.getOcinCheck());
|
|
|
- cell13.setCellValue(dto.getVomitingCheck());
|
|
|
- cell14.setCellValue(dto.getDiarrheaCheck());
|
|
|
- cell15.setCellValue(dto.getDizzinessCheck());
|
|
|
- cell16.setCellValue(dto.getNoseCheck());
|
|
|
-
|
|
|
- String etcCheckYN = dto.getEtcCheck();
|
|
|
- String etcContent = etcCheckYN;
|
|
|
- if (etcCheckYN == "Y") {
|
|
|
- etcContent = dto.getEtcContent();
|
|
|
- }
|
|
|
- cell17.setCellValue(etcContent);
|
|
|
-
|
|
|
- cell18.setCellValue(dto.getRecordedByName());
|
|
|
+ cell2.setCellValue(dto.getCoughCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell3.setCellValue(dto.getDyspneaCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell4.setCellValue(dto.getColdFitCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell5.setCellValue(dto.getMusclePainCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell6.setCellValue(dto.getHeadacheCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell7.setCellValue(dto.getSoreThroatCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell8.setCellValue(dto.getSmellPalateCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell9.setCellValue(dto.getFatigueCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell10.setCellValue(dto.getAppetiteLossCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell11.setCellValue(dto.getSputumCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell12.setCellValue(dto.getOcinCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell13.setCellValue(dto.getVomitingCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell14.setCellValue(dto.getDiarrheaCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell15.setCellValue(dto.getDizzinessCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell16.setCellValue(dto.getNoseCheck().equals("Y") ? "V" : "-");
|
|
|
+ cell17.setCellValue(dto.getEtcCheck().equals("Y") ? dto.getEtcContent() : "-");
|
|
|
+ cell18.setCellValue(dto.getRecordedByName());
|
|
|
|
|
|
i++;
|
|
|
}
|
|
@@ -695,14 +688,15 @@ public class ClinicController extends LifeCenterController {
|
|
|
cell3.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
|
|
|
sheet1.setColumnWidth( 0, 5000); // 기록일시
|
|
|
- sheet1.setColumnWidth( 1, 10000); // 내용
|
|
|
+ sheet1.setColumnWidth( 1, 20000); // 내용
|
|
|
sheet1.setColumnWidth( 2, 3000); // 기록자
|
|
|
|
|
|
cell1.setCellValue("기록일시");
|
|
|
cell2.setCellValue("내용");
|
|
|
cell3.setCellValue("기록자");
|
|
|
|
|
|
- for (PatientMemoDTO dto : data) {
|
|
|
+ for (int index = data.size() - 1; index >= 0; index--) {
|
|
|
+ PatientMemoDTO dto = data.get(index);
|
|
|
row = sheet1.createRow(i);
|
|
|
cell1 = row.createCell(0);
|
|
|
cell2 = row.createCell(1);
|
|
@@ -721,6 +715,11 @@ public class ClinicController extends LifeCenterController {
|
|
|
cell1.setCellValue(createDate);
|
|
|
cell2.setCellValue(dto.getContents());
|
|
|
cell3.setCellValue(dto.getRecordedByName());
|
|
|
+
|
|
|
+ CellStyle cs = workbook.createCellStyle();
|
|
|
+ cs.setWrapText(true);
|
|
|
+ cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); //높이 가운데 정렬
|
|
|
+ cell2.setCellStyle(cs);
|
|
|
|
|
|
i++;
|
|
|
}
|