浏览代码

수정사항반영, 엑셀다운로드 정신건강 추가

huiwonseo 4 年之前
父节点
当前提交
568221852a

+ 84 - 0
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -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;

+ 1 - 1
src/main/java/com/lemon/lifecenter/dto/PatientPHRLatestDTO.java

@@ -500,7 +500,6 @@ public class PatientPHRLatestDTO {
 
     long diffSec = (todayCalendar.getTimeInMillis() - targetCalendar.getTimeInMillis()) / 1000;
     long diffDays = diffSec / (24 * 60 * 60);
-    System.out.println("두 날짜간의 일수 차 = " + diffDays + " 일");
     
     if( diffSec <= 5 ) {
       needCheck = false;
@@ -514,6 +513,7 @@ public class PatientPHRLatestDTO {
   }
 
   public boolean getIsMentalWarning() {
+    System.out.println( "this.mentalCreateDate : " + this.mentalCreateDate + " | " + this.patientName );
     if (this.mentalCreateDate == null)
       return false;
     

+ 1 - 1
src/main/resources/mybatis/mapper/patient/patientPHRLatest.xml

@@ -324,7 +324,7 @@
           m.agree_yn                  AS agreeYn
 
 		FROM patient_care c LEFT JOIN patient_phr_latest p ON p.patient_idx = c.patient_idx
-    LEFT JOIN ( SELECT * FROM mental_health_total WHERE patient_idx = c.patient_idx ORDER BY idx DESC limit 1 ) m ON m.patient_idx = p.patient_idx
+    LEFT JOIN ( SELECT * FROM mental_health_total WHERE patient_idx = c.patient_idx ORDER BY idx DESC limit 1 ) m ON m.patient_idx = c.patient_idx
 		WHERE c.center_code = #{centerCode} AND c.state = 'H'
 	]]>
 		<if test="filterList != null and filterList.length > 0"> 

文件差异内容过多而无法显示
+ 1891 - 0
src/main/webapp/WEB-INF/jsp/accept/list.jsp


+ 5 - 3
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -1539,7 +1539,7 @@ $(document).ready(function() {
   <!-- 정신건강 상세 확인 팝업 -->
   <div class="modal fade" id="defaultModalMentalDetail" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
 		<div class="modal-dialog modal-fullsize" role="document">
-			<div class="modal-content">
+			<div class="modal-content" style="border-bottom-right-radius: 0; border-bottom-left-radius: 0;">
 				<div class="modal-header">
 					<h5 class="modal-title">정신건강 상세</h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
@@ -1547,9 +1547,11 @@ $(document).ready(function() {
 				</div>
 				<div class="modal-body m-3">
           <jsp:include page="/WEB-INF/jsp/clinic/mentalDetail.jsp"></jsp:include>
+
 				</div>
-        <div class="modal-footer">
-					<button type="button" class="btn btn-outline-primary" data-dismiss="modal">확인</button>
+        
+        <div class="modal-footer bg-white">
+          <button type="button" class="btn btn-primary" data-dismiss="modal">확인</button>
 				</div>
 			</div>
 		</div>

+ 1 - 1
src/main/webapp/WEB-INF/jsp/clinic/mentalDetail.jsp

@@ -9,7 +9,7 @@
 //         errorPlacement: function(error, element) {
 //             // $( element ).closest('.checkgroup').find('.title').text()
 //             alertBox({ type:"alert", 
-//                 txt : "모든항목에 체크해주세요", 
+//                 txt : "모든 항목에 체크해 주세요", 
 //             });
 //             $( element ).focus();
 //         }

+ 2 - 1
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -164,7 +164,8 @@ console.log( 12312312313)
 						if (result.items.length > 0) {
 							html = "";
 							result.items.forEach(function(d) {
-								var danger = (d.isTemperatureWarning || d.isBloodPressureWarning || d.isPulseRateWarning || d.isOxygenSaturationeWarning || d.isBloodSugarWarning) ? "danger" : "";
+                console.log( d.patientName, d );
+								var danger = (d.isTemperatureWarning || d.isBloodPressureWarning || d.isPulseRateWarning || d.isOxygenSaturationeWarning || d.isBloodSugarWarning || d.isMentalWarning) ? "danger" : "";
                 
                 var temperatureStep = d.isTemperatureWarning ? "step_two" : "step_one";
                 var bloodPressureStep = d.isBloodPressureWarning ? "step_two" : "step_one";

+ 3 - 0
src/main/webapp/WEB-INF/jsp/mobile/accept/info.jsp

@@ -104,6 +104,9 @@ p.a a{padding:0 !important;margin:0 !important;
 
 
 <style>
+  #defaultModalPrimary_1 {
+        transition: 0.5s;
+      }
   #defaultModalPrimary_1 .modal-open .modal {
     overflow-x: hidden;
     overflow-y: auto;

文件差异内容过多而无法显示
+ 1976 - 0
src/main/webapp/WEB-INF/jsp/mobile/accept/list.jsp


+ 1 - 1
src/main/webapp/WEB-INF/jsp/mobile/health/health6.jsp

@@ -11,7 +11,7 @@ $( function(){
         errorPlacement: function(error, element) {
             // $( element ).closest('.checkgroup').find('.title').text()
             alertBox({ type:"alert", 
-                txt : "모든항목에 체크해주세요", 
+                txt : "모든 항목에 체크해 주세요", 
             });
             $( element ).focus();
         }

+ 2 - 2
src/main/webapp/resources/css/common/classic.css

@@ -533,8 +533,8 @@ table pre {
   font-size: 18px;
 }
 .phrSection {
-  padding: 20px 0;
-  margin: 0 -15px;
+  padding: 40px 0;
+  margin: 30px -15px;
   border-top: 1px solid #dddddd;
 }
 .phrSection h1 {