浏览代码

[phr] 진료관리 - 환자상세 환자 정보 표시 구현.

sjpark 4 年之前
父节点
当前提交
6cb238a0b0

+ 28 - 2
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -6,6 +6,8 @@ import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 
 import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -16,8 +18,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterController;
+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;
 import com.lemon.lifecenter.dto.PatientPHRLatestDTO;
@@ -40,6 +44,8 @@ public class ClinicController extends LifeCenterController {
 	private PatientService patientService;
 
 	final int pageSize = 30;
+	
+	private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
 	@RequestMapping("/state")
 	public ModelAndView clinicState(HttpServletRequest request,
@@ -47,8 +53,6 @@ public class ClinicController extends LifeCenterController {
 			@RequestParam(value = "searchText", required = false, defaultValue = "") String searchText) {
 
 
-		System.err.println("page : " + page);
-
 		String centerCode = LifeCenterSessionController.getSession( request, "sesCenterCode" );
 
 		PatientPHRLatestDTO dto = new PatientPHRLatestDTO();
@@ -78,6 +82,27 @@ public class ClinicController extends LifeCenterController {
 			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
 			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType) {
 
+		// 환자정보
+		PatientDTO patientDto = new PatientDTO();
+		patientDto.setPatientIdx(patientIdx);
+		patientDto = patientService.selectPatientOne(patientDto);
+
+		String jumin = patientDto.getJumin();
+		jumin = jumin.substring(0, 4) + "년 " + jumin.substring(4, 6) + "월 " + jumin.substring(6, 8) + "일";
+		patientDto.setJumin(jumin);
+		
+		patientDto.setPatientPhone(LifeCenterFunction.phone(patientDto.getPatientPhone()));
+		patientDto.setGuardianPhone(LifeCenterFunction.phone(patientDto.getGuardianPhone()));
+		
+		String bloodPress = patientDto.getBloodPressureLevel();
+		
+		if (!bloodPress.equals("")) {
+				String[] bloodPressureLevel = patientDto.getBloodPressureLevel().split("[|]");
+				logger.error("bloodPress -- > " + bloodPressureLevel[0]);
+				logger.error("bloodPress -- > " + bloodPressureLevel[1]);
+		}
+
+		// phr 정보
 		PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
 		dto.setPhrType(phrType);
 		dto.setPatientIdx(patientIdx);
@@ -92,6 +117,7 @@ public class ClinicController extends LifeCenterController {
 		ModelAndView mv = setMV("clinic/info");
 
 		mv.addObject("patientIdx", patientIdx);
+		mv.addObject("info", patientDto);
 		mv.addObject("phrType", phrType);
 		mv.addObject("phrTotal", total);
 		mv.addObject("phrItems", result);

+ 145 - 121
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -729,7 +729,7 @@ $(document).ready(function() {
 						<div class="col-12">
 							<div class="card toggle">
 								<div class="card-header">
-									<h1 class="h4">김환자 환자 기본정보</h1>
+									<h1 class="h4"><c:out value="${info.patientName}" /> 환자 기본정보</h1>
 									<a href="#" class="toggleBtn">메뉴</a>
 								</div>
 								<div class="card-body">
@@ -741,150 +741,174 @@ $(document).ready(function() {
 											<col style="width: 35%">
 										</colgroup>
 										<tr>
-											<th>치료센터</th>
-											<td>레몬종합병원</td>
-											<th>입소일시</th>
-											<td colspan="2">2020-10-10 10:24</td>
+												<th>치료센터</th>
+												<td><c:out value="${info.centerName}" /></td>
+												<th>입소일시</th>
+												<td colspan="2">
+														<c:out value="${info.hospitalizationDate}" />
+												</td>
 										</tr>
 										<tr>
-											<th>병동 번호</th>
-											<td>1동 105호</td>
-											<th>이름</th>
-											<td>김레몬</td>
+												<th>병동 번호</th>
+												<td>
+														<c:out value="${info.wardNumber}동 ${info.roomNumber}호" />
+												</td>
+												<th>이름</th>
+												<td>
+														<c:out value="${info.patientName}" />
+												</td>
 										</tr>
 										<tr>
-											<th>성별</th>
-											<td>남</td>
-											<th>생년월일</th>
-											<td>1973년 11월 11일</td>
+												<th>성별</th>
+												<td>
+														<c:if test="${info.gender eq 'M'}">
+																남
+														</c:if>
+														<c:if test="${info.gender ne 'M'}">
+																여
+														</c:if>
+												</td>
+												<th>생년월일</th>
+												<td>
+														<c:out value="${info.jumin}" />
+												</td>
 										</tr>
 										<tr>
-											<th>연락처</th>
-											<td>010-1234-1234</td>
-											<th>보호자 연락처</th>
-											<td>010-1234-1234</td>
+												<th>연락처</th>
+												<td>
+														<c:out value="${info.patientPhone}" />
+												</td>
+												<th>보호자 연락처</th>
+												<td>
+														<c:out value="${info.guardianPhone}" />
+												</td>
 										</tr>
 										<tr>
-											<th>증상시작일</th>
-											<td>2020-10-08</td>
-											<th>확진일</th>
-											<td>2020-10-09</td>
+												<th>증상시작일</th>
+												<td>
+														<c:out value="${info.symptomStartDate}" />
+												</td>
+												<th>확진일</th>
+												<td>
+														<c:out value="${info.confirmationDate}" />
+												</td>
 										</tr>
 										<tr>
-											<th>격리해제 예정일</th>
-											<td colspan="3">2020-10-25</td>
+												<th>격리해제 예정일</th>
+												<td colspan="3">
+														<c:out value="${info.disisolationDate}" />
+												</td>
 										</tr>
 										<tr>
-											<th>최근 약복용<br />(최근 24시간 이내)
-											</th>
-											<td>미복용</td>
-											<th>임신</th>
-											<td>무</td>
+												<th>최근 약복용<br />(최근 24시간 이내)</th>
+												<td>
+														<c:choose>
+																<c:when test="${info.drugYn eq 'Y'}">
+																		복용 (<c:out value="${info.drugContent}" />)
+																</c:when>
+																<c:otherwise>
+																		미복용
+																</c:otherwise>
+														</c:choose>
+												</td>
+												<th>임신</th>
+												<td>
+														<c:choose>
+																<c:when test="${info.pregnancyStatus eq 'N'}">
+																		무
+																</c:when>
+																<c:otherwise>
+																		유 (<c:out value="${info.pregnancyWeek}주차" />)
+																</c:otherwise>
+														</c:choose>
+												</td>
 										</tr>
 										<tr>
-											<th rowspan="8">기저질환 여부</th>
-											<td colspan="3"><label class="form-check form-check-inline"><input class="form-check-input" type="radio" name="inline-radios-example-2" value="option1" checked> <span class="form-check-label"> 예 </span></label>
-											<label class="form-check form-check-inline"><input class="form-check-input" type="radio" name="inline-radios-example-2" value="option2"> <span class="form-check-label"> 아니오 </span> (예인 경우 하단의 기저질환을 선택하세요)</label></td>
+												<th rowspan="2">기저질환 여부</th>
+												<td colspan="3">
+														<c:choose>
+																<c:when test="${info.basalDiseaseYn eq 'Y'}">
+																		유
+																</c:when>
+																<c:otherwise>
+																		무
+																</c:otherwise>
+														</c:choose>
+												</td>
 										</tr>
 										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1" checked> <span class="form-check-label"> 고혈압</span></label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 저혈압 </span></label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 장기이식(신장, 간 등) </span></label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 당뇨병 </span></label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 호흡기 질환 </span></label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 면역질환(류마티스 등) </span></label></td>
+												<td colspan="3">
+														<c:if test="${info.highBloodPressureCheck eq 'Y'}">, 고혈압</c:if>
+														<c:if test="${info.lowBloodPressureCheck eq 'Y'}">, 저혈압</c:if>
+														<c:if test="${info.organTransplantCheck eq 'Y'}">, 장기이식(신장, 간 등)</c:if>
+														<c:if test="${info.diabetesCheck eq 'Y'}">, 당뇨</c:if>
+														<c:if test="${info.respiratoryDiseaseCheck eq 'Y'}">, 호흡기질환</c:if>
+														<c:if test="${info.immunologicalDiseaseCheck eq 'Y'}">, 면역질환(류마티스 등)</c:if>
+														<c:if test="${info.heartDisease eq 'Y'}">, 심장질환</c:if>
+														<c:if test="${info.liverDisease eq 'Y'}">, 간질환</c:if>
+														<c:if test="${info.operation eq 'Y'}">, 수술(<c:out value="${info.operationContent}" />)</c:if>
+														<c:if test="${info.allergyCheck eq 'Y'}">, 알레르기</c:if>
+														<c:if test="${info.kidneyDisease eq 'Y'}">, 신장질환</c:if>
+														<c:if test="${info.cancerCheck eq 'Y'}">, 암(<c:out value="${info.cancerName}" />)</c:if>
+														<c:if test="${info.ectCheckDisease eq 'Y'}">, 기타(<c:out value="${info.etcContentDisease}" />)</c:if>
+												</td>
 										</tr>
 										<tr>
-											<td colspan="3">
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 호흡곤란 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 오한 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 근육통 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 두통 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 인후통 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 후각/미각손실 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 피로 </span></label>
-											</td>
+												<th>현재 증상<br />(입소 당시)</th>
+												<td colspan="3">
+														<c:if test="${info.feverCheck eq 'Y'}">, 열감(열나는느낌)</c:if>
+														<c:if test="${info.coughCheck eq 'Y'}">, 기침</c:if>
+														<c:if test="${info.colic eq 'Y'}">, 복통(배아픔)</c:if>
+														<c:if test="${info.coldFitCheck eq 'Y'}">, 오한(추운 느낌)</c:if>
+														<c:if test="${info.sputumCheck eq 'Y'}">, 가래</c:if>
+														<c:if test="${info.ocinCheck eq 'Y'}">, 오심(구역질)</c:if>
+														<c:if test="${info.chestPain eq 'Y'}">, 흉통</c:if>
+														<c:if test="${info.noseCheck eq 'Y'}">, 콧물 또는 코 막힘</c:if>
+														<c:if test="${info.vomitingCheck eq 'Y'}">, 구토</c:if>
+														<c:if test="${info.musclePainCheck eq 'Y'}">, 근육통(몸살)</c:if>
+														<c:if test="${info.soreThroatCheck eq 'Y'}">, 인후통(목 아픔)</c:if>
+														<c:if test="${info.diarrheaCheck eq 'Y'}">, 설사</c:if>
+														<c:if test="${info.headacheCheck eq 'Y'}">, 두통(머리아픔)</c:if>
+														<c:if test="${info.dyspneaCheck eq 'Y'}">, 호흡곤란(숨가쁨)</c:if>
+														<c:if test="${info.fatigueCheck eq 'Y'}">, 권태감(피곤함)</c:if>
+														<c:if test="${info.ectCheckSymptom eq 'Y'}">, 기타(<c:out value="${info.etcContentSymptom}" />)</c:if>
+												</td>
 										</tr>
 										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 심장질환 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 간질환 </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1" checked> <span class="form-check-label"> 수술 ( 맹장수술 ) </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1" checked> <span class="form-check-label"> 신장질환 </span></label>
-											</td>
+												<th>
+														체온
+												</th>
+												<td>
+														<c:out value="우측 ${info.feverRight}℃ /  좌측  ${info.feverRight}℃" />
+												</td>
+												<th>
+														맥박수
+												</th>
+												<td>
+														<c:out value="${info.pulseRate} 회/분" />
+												</td>
 										</tr>
 										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 암 ( ) </span> </label>
-											<label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 기타 ( 허리가 아픔 ) </span> </label>
-											</td>
+												<th>
+														호흡수
+												</th>
+												<td>
+														<c:out value="${info.respirationRate} 회/분" />
+												</td>
+												<th>
+														혈압
+												</th>
+												<td>
+												<c:out value="수축기 ${info.bloodPressureLevelCon} mmHg  /  이완기 ${info.bloodPressureLevelRel} mmHg" />
+												</td>
 										</tr>
 										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 열감(열나는 느낌) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 기침 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 복통(배아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 오한(추운 느낌) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 가래 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 오심(구역질) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 흉통(가슴 통증) </span>
-											</label></td>
-										</tr>
-										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 콧물 또는 코막힘 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 구토 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 근육통(몸살) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 인후통(목아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 설사 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 두통(머리아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 호흡곤란(숨가쁨) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 권태감(피곤함) </span>
-											</label></td>
-										</tr>
-										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 기타 ( ) </span>
-											</label></td>
-										</tr>
-										<tr>
-											<th rowspan="3">현재 증상<br />(입소 당시)
-											</th>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 열감(열나는 느낌) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 기침 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 복통(배아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 오한(추운 느낌) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 가래 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 오심(구역질) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 흉통(가슴 통증) </span>
-											</label></td>
-										</tr>
-										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 콧물 또는 코 막힘 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 구토 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 근육통(몸살) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 인후통(목 아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 설사 </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 두통(머리아픔) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 호흡곤란(숨가쁨) </span>
-											</label> <label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 권태감(피곤함) </span>
-											</label></td>
-										</tr>
-										<tr>
-											<td colspan="3"><label class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" value="option1"> <span class="form-check-label"> 기타 ( <input type="text" class="form-control form-control-sm w150" name=""> )
-												</span>
-											</label></td>
-										</tr>
-										<tr>
-											<th>체온</th>
-											<td>우측 36.7 ℃ / 좌측 36.5 ℃</td>
-											<th>맥박수</th>
-											<td>72 회/분</td>
-										</tr>
-										<tr>
-											<th>호흡수</th>
-											<td>54 회/분</td>
-											<th>혈압</th>
-											<td>수축기 94 mmHg / 이완기 110 mmHg</td>
-										</tr>
-										<tr>
-											<th>산소포화도</th>
-											<td colspan="3">90 %</td>
+												<th>
+														산소포화도
+												</th>
+												<td colspan="3">
+														<c:out value="${info.oxygenSaturation} %" />
+												</td>
 										</tr>
 									</table>
 									<div class="row mt-3">