Jelajahi Sumber

[phr] 진료관리 - 환자 기본정보 수정.

sjpark 4 tahun lalu
induk
melakukan
0baa56c5aa

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

@@ -47,6 +47,104 @@ public class ClinicController extends LifeCenterController {
 	
 	private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
+	private String getSymptom(PatientDTO dto) {
+		String feverCheck = dto.getFeverCheck().equals("Y") ? "열감(열나는 느낌)" : "";
+		String coughCheck = dto.getCoughCheck().equals("Y") ? "기침" : "";
+		String colic = dto.getColic().equals("Y") ? "복통(배아픔)" : "";
+		String coldFitCheck = dto.getColdFitCheck().equals("Y") ? "오한(추운 느낌)" : "";
+		String sputumCheck = dto.getSputumCheck().equals("Y") ? "가래" : "";
+		String ocinCheck = dto.getOcinCheck().equals("Y") ? "오심(구역질)" : "";
+		String chestPain = dto.getChestPain().equals("Y") ? "흉통" : "";
+		String noseCheck = dto.getNoseCheck().equals("Y") ? "콧물 또는 코 막힘" : "";
+		String vomitingCheck = dto.getVomitingCheck().equals("Y") ? "구토" : "";
+		String musclePainCheck = dto.getMusclePainCheck().equals("Y") ? "근육통(몸살)" : "";
+		String soreThroatCheck = dto.getSoreThroatCheck().equals("Y") ? "인후통(목 아픔)" : "";
+		String diarrheaCheck = dto.getDiarrheaCheck().equals("Y") ? "설사" : "";
+		String headacheCheck = dto.getHeadacheCheck().equals("Y") ? "두통(머리아픔)" : "";
+		String dyspneaCheck = dto.getDyspneaCheck().equals("Y") ? "호흡곤란(숨가쁨)" : "";
+		String fatigueCheck = dto.getFatigueCheck().equals("Y") ? "권태감(피로감)" : "";
+		String etcContent = dto.getEtcContentSymptom() == null ? "" : dto.getEtcContentSymptom();
+		String ectCheckSymptom = dto.getEtcCheckSymptom().equals("Y") ? "기타(" + etcContent + ")" : "";
+		
+		String strSymptom = "";
+		ArrayList<String> symptom = new ArrayList<String>();
+		symptom.add(feverCheck);
+		symptom.add(coughCheck);
+		symptom.add(colic);
+		symptom.add(coldFitCheck);
+		symptom.add(sputumCheck);
+		symptom.add(ocinCheck);
+		symptom.add(chestPain);
+		symptom.add(noseCheck);
+		symptom.add(vomitingCheck);
+		symptom.add(musclePainCheck);
+		symptom.add(soreThroatCheck);
+		symptom.add(diarrheaCheck);
+		symptom.add(headacheCheck);
+		symptom.add(dyspneaCheck);
+		symptom.add(fatigueCheck);
+		symptom.add(ectCheckSymptom);
+		
+		for (int i = 0; i < symptom.size(); i++) {
+				String str = symptom.get(i);
+				if (!str.equals("")) {
+						strSymptom += str;
+						strSymptom += ", ";
+				}
+		}
+		
+		strSymptom = strSymptom.trim();
+		strSymptom = strSymptom.substring(0, strSymptom.length() - 1);
+		
+		return strSymptom;
+  }
+
+	private String getDisease(PatientDTO dto) {
+		String highBloodPressureCheck = dto.getHighBloodPressureCheck().equals("Y") ? "고혈압" : "";
+		String lowBloodPressureCheck = dto.getLowBloodPressureCheck().equals("Y") ? "저혈압" : "";
+		String organTransplantCheck = dto.getOrganTransplantCheck().equals("Y") ? "장기이식(신장, 간 등)" : "";
+		String diabetesCheck = dto.getDiabetesCheck().equals("Y") ? "당뇨" : "";
+		String respiratoryDiseaseCheck = dto.getRespiratoryDiseaseCheck().equals("Y") ? "호흡기질환" : "";
+		String immunologicalDiseaseCheck = dto.getImmunologicalDiseaseCheck().equals("Y") ? "면역질환(류마티스 등)" : "";
+		String heartDisease = dto.getHeartDisease().equals("Y") ? "심장질환" : "";
+		String liverDisease = dto.getLiverDisease().equals("Y") ? "간질환" : "";
+		String operation = dto.getOperation().equals("Y") ? "수술(" + dto.getOperationContent() + ")" : "";
+		String allergyCheck = dto.getAllergyCheck().equals("Y") ? "알레르기" : "";
+		String kidneyDisease = dto.getKidneyDisease().equals("Y") ? "신장질환" : "";
+		String cancerName = dto.getCancerName() == null ? "" : dto.getCancerName();
+		String cancerCheck = dto.getCancerCheck().equals("Y") ? "암(" + cancerName + ")" : "";
+		String etcContent = dto.getEtcContentDisease() == null ? "" : dto.getEtcContentDisease();
+		String ectCheckDisease = dto.getEtcCheckDisease().equals("Y") ? "기타(" + etcContent + ")" : "";
+		
+		ArrayList<String> disease = new ArrayList<String>();
+		disease.add(highBloodPressureCheck);
+		disease.add(lowBloodPressureCheck);
+		disease.add(organTransplantCheck);
+		disease.add(diabetesCheck);
+		disease.add(respiratoryDiseaseCheck);
+		disease.add(immunologicalDiseaseCheck);
+		disease.add(heartDisease);
+		disease.add(liverDisease);
+		disease.add(operation);
+		disease.add(allergyCheck);
+		disease.add(kidneyDisease);
+		disease.add(cancerCheck);
+		disease.add(ectCheckDisease);
+		
+		String strDisease = "";
+		for (int i = 0; i < disease.size(); i++) {
+				String str = disease.get(i);
+				if (!str.equals("")) {
+						strDisease += str;
+						strDisease += ", ";
+				}
+		}
+		
+		strDisease = strDisease.trim();
+		strDisease = strDisease.substring(0, strDisease.length()-1);
+		return strDisease;
+    }
+
 	@RequestMapping("/state")
 	public ModelAndView clinicState(HttpServletRequest request,
 			@RequestParam(value = "page", required = true, defaultValue = "1") int page,
@@ -98,8 +196,14 @@ public class ClinicController extends LifeCenterController {
 		
 		if (!bloodPress.equals("")) {
 				String[] bloodPressureLevel = patientDto.getBloodPressureLevel().split("[|]");
-				logger.error("bloodPress -- > " + bloodPressureLevel[0]);
-				logger.error("bloodPress -- > " + bloodPressureLevel[1]);
+				patientDto.setBloodPressureLevelCon(bloodPressureLevel[0]);
+				patientDto.setBloodPressureLevelRel(bloodPressureLevel[0]);
+		}
+		
+		String strDisease = "";
+		String strSymptom = getSymptom(patientDto);
+		if (patientDto.getBasalDiseaseYn().equals("Y")) {
+				strDisease = getDisease(patientDto);
 		}
 
 		// phr 정보
@@ -118,6 +222,8 @@ public class ClinicController extends LifeCenterController {
 
 		mv.addObject("patientIdx", patientIdx);
 		mv.addObject("info", patientDto);
+		mv.addObject("symptom", strSymptom);
+		mv.addObject("disease", strDisease);
 		mv.addObject("phrType", phrType);
 		mv.addObject("phrTotal", total);
 		mv.addObject("phrItems", result);

+ 47 - 30
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -795,9 +795,24 @@ $(document).ready(function() {
 										</tr>
 										<tr>
 												<th>격리해제 예정일</th>
-												<td colspan="3">
+												<td>
 														<c:out value="${info.disisolationDate}" />
 												</td>
+												<th>상태</th>
+												<td>
+														<c:if test="${info.state eq 'H'}">
+																입소
+														</c:if>
+														<c:if test="${info.state eq 'D'}">
+																퇴소
+														</c:if>
+														<c:if test="${info.state eq 'T'}">
+																지정병원 이송
+														</c:if>
+														<c:if test="${info.state eq 'E'}">
+																기타
+														</c:if>
+												</td>
 										</tr>
 										<tr>
 												<th>최근 약복용<br />(최근 24시간 이내)</th>
@@ -838,40 +853,42 @@ $(document).ready(function() {
 										</tr>
 										<tr>
 												<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.etcCheckDisease eq 'Y'}">, 기타(<c:out value="${info.etcContentDisease}" />)</c:if>
+<%--                                                 <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> --%>
+														<c:out value="${disease}" />
 												</td>
 										</tr>
 										<tr>
 												<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.etcCheckSymptom eq 'Y'}">, 기타(<c:out value="${info.etcContentSymptom}" />)</c:if>
+<%--                                                 <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> --%>
+														<c:out value="${symptom}" />
 												</td>
 										</tr>
 										<tr>