|
@@ -676,6 +676,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
this.createPHRSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto, "혈압", "bloodPressure");
|
|
|
this.createPHRSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto, "맥박", "pulseRate");
|
|
|
this.createPHRSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto, "산소포화도", "oxygenSaturation");
|
|
|
+ this.createMentalSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto);
|
|
|
this.createPHRSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto, "혈당", "bloodSugar");
|
|
|
|
|
|
this.createSymptomSheet(workbook, styleOfBoardFillFontBlackBold16, patientDto);
|
|
@@ -1110,6 +1111,88 @@ public class ClinicController extends LifeCenterController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void createMentalSheet(Workbook workbook, CellStyle styleOfBoardFillFontBlackBold16, PatientDTO patientDto) {
|
|
|
+ // 정신건강 자가진단 추가 21.06.17
|
|
|
+ MentalDTO mDTO = new MentalDTO();
|
|
|
+ mDTO.setPatientIdx(patientDto.getPatientIdx());
|
|
|
+ List<MentalDTO> data = new ArrayList<MentalDTO>();
|
|
|
+ int mentalTotal = mentalService.selectMentalHealthTotalCount(mDTO);
|
|
|
+ if (mentalTotal > 0) {
|
|
|
+ data = mentalService.selectMentalHealthTotalList(mDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ Sheet sheet1 = workbook.createSheet("정신건강");
|
|
|
+
|
|
|
+ Row row = sheet1.createRow(0);
|
|
|
+ Cell cell1 = row.createCell(0);
|
|
|
+ Cell cell2 = row.createCell(1);
|
|
|
+ Cell cell3 = row.createCell(2);
|
|
|
+ Cell cell4 = row.createCell(3);
|
|
|
+ Cell cell5 = row.createCell(4);
|
|
|
+ Cell cell6 = row.createCell(5);
|
|
|
+ Cell cell7 = row.createCell(6);
|
|
|
+ Cell cell8 = row.createCell(7);
|
|
|
+
|
|
|
+ cell1.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell2.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell3.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell4.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell5.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell6.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell7.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+ cell8.setCellStyle(styleOfBoardFillFontBlackBold16);
|
|
|
+
|
|
|
+ sheet1.setColumnWidth(0, 5000); // 측정일시
|
|
|
+ sheet1.setColumnWidth(1, 7000); // 외상후 스트레스 증상(총점)
|
|
|
+ sheet1.setColumnWidth(2, 4000); // 우울(총점)
|
|
|
+ sheet1.setColumnWidth(3, 5000); // 우울(9번 문항)
|
|
|
+ sheet1.setColumnWidth(4, 3000); // VAS
|
|
|
+ sheet1.setColumnWidth(5, 4000); // 상담연계동의
|
|
|
+ sheet1.setColumnWidth(6, 4000); // 기록자
|
|
|
+ sheet1.setColumnWidth(7, 5000); // 기록일
|
|
|
+
|
|
|
+ cell1.setCellValue("측정일시");
|
|
|
+ cell2.setCellValue("외상후 스트레스 증상(총점)");
|
|
|
+ cell3.setCellValue("우울(총점)");
|
|
|
+ cell4.setCellValue("우울(9번 문항)");
|
|
|
+ cell5.setCellValue("VAS");
|
|
|
+ cell6.setCellValue("상담연계동의");
|
|
|
+ cell7.setCellValue("기록자");
|
|
|
+ cell8.setCellValue("기록일");
|
|
|
+
|
|
|
+
|
|
|
+ int i = 1;
|
|
|
+ for (MentalDTO dto : data ) {
|
|
|
+ row = sheet1.createRow(i);
|
|
|
+ cell1 = row.createCell(0);
|
|
|
+ cell2 = row.createCell(1);
|
|
|
+ cell3 = row.createCell(2);
|
|
|
+ cell4 = row.createCell(3);
|
|
|
+ cell5 = row.createCell(4);
|
|
|
+ cell6 = row.createCell(5);
|
|
|
+ cell7 = row.createCell(6);
|
|
|
+ cell8 = row.createCell(7);
|
|
|
+
|
|
|
+ cell1.setCellValue( dto.getRecordedDate() );
|
|
|
+ cell2.setCellValue( dto.getStressTotal() );
|
|
|
+ cell3.setCellValue( dto.getDepressedTotal() );
|
|
|
+ cell4.setCellValue( dto.getDepressedNine() );
|
|
|
+ cell5.setCellValue( dto.getVasTotal() );
|
|
|
+ cell6.setCellValue( dto.getAgreeYn().equals("Y") ? "동의" : "비동의" );
|
|
|
+ cell7.setCellValue( dto.getCreatedBy() );
|
|
|
+ cell8.setCellValue( dto.getCreateDate() );
|
|
|
+
|
|
|
+ CellStyle cs = workbook.createCellStyle();
|
|
|
+ cs.setWrapText(true);
|
|
|
+ cs.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 높이 가운데 정렬
|
|
|
+ cell5.setCellStyle(cs);
|
|
|
+
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@RequestMapping("/api/configuration")
|
|
|
public @ResponseBody ClinicConfigurationDTO getConfigurationAPI(
|
|
|
@RequestParam(value = "centerCode", required = true, defaultValue = "") int centerCode) {
|
|
@@ -1260,6 +1343,7 @@ public class ClinicController extends LifeCenterController {
|
|
|
// total 통계부터 insert 계산
|
|
|
for (String key : keySet) {
|
|
|
if (key.equals("recordedDate")) {
|
|
|
+ System.out.println( "request.getParameter(key) : " + request.getParameter(key) );
|
|
|
recordedDate = request.getParameter(key) == "" ? LifeCenterFunction.getNow("yyyy-MM-dd HH:mm").toString(): request
|
|
|
.getParameter(key);
|
|
|
continue;
|