瀏覽代碼

[phr] 진료관리 화면 수정.

sjpark 4 年之前
父節點
當前提交
e483a744fe

+ 11 - 7
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -16,6 +17,7 @@ import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterController;
 import com.lemon.lifecenter.common.LifeCenterSessionController;
+import com.lemon.lifecenter.dto.LoginDTO;
 import com.lemon.lifecenter.dto.PatientMemoDTO;
 import com.lemon.lifecenter.dto.PatientPHRHistoryDTO;
 import com.lemon.lifecenter.dto.PatientPHRLatestDTO;
@@ -234,13 +236,9 @@ public class ClinicController extends LifeCenterController {
 
 	@RequestMapping(value = "/api/symptomData", method = RequestMethod.POST)
 	public @ResponseBody String symptomData(
-			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
-			@RequestParam(value = "phrType", required = true, defaultValue = "") String phrType,
-			@RequestParam(value = "phrValue", required = true, defaultValue = "") float phrValue) {
+			@ModelAttribute("dto") final PatientSymptomSimDTO dto) {
 
 		try {
-			PatientSymptomSimDTO dto = new PatientSymptomSimDTO();
-
 			phrService.insertSymptom(dto);
 
 			JSONObject json = new JSONObject();
@@ -271,11 +269,17 @@ public class ClinicController extends LifeCenterController {
 	@RequestMapping(value = "/api/memoData", method = RequestMethod.POST)
 	public @ResponseBody String memoData(
 			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
-			@RequestParam(value = "phrType", required = true, defaultValue = "") String phrType,
-			@RequestParam(value = "phrValue", required = true, defaultValue = "") float phrValue) {
+			@RequestParam(value = "contents", required = true, defaultValue = "") String contents,
+			@RequestParam(value = "recordedById", required = true, defaultValue = "") String recordedById,
+			@RequestParam(value = "recordedByName", required = true, defaultValue = "") String recordedByName) {
 
 		try {
 			PatientMemoDTO dto = new PatientMemoDTO();
+			
+			dto.setPatientIdx(patientIdx);
+			dto.setContents(contents);
+			dto.setRecordedById(recordedById);
+			dto.setRecordedByName(recordedByName);
 
 			clinicService.insertMemo(dto);
 

+ 211 - 126
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -76,7 +76,7 @@ function retrievePhrData() {
             drawPhrChart(datas, phrName);
 
            	var html = "<thead><tr>";
-			html += "<th>진료일시</th>";
+			html += "<th>기록일시</th>";
 			html += "<th>"+phrName+"</th>";
 			html += "<th>진료담당자</th>";
 			html += "</tr></thead>";
@@ -272,6 +272,213 @@ $(document).ready(function() {
 </head>
 
 <body>
+	<div class="modal fade" id="defaultModalPrimary_1" tabindex="-1" role="dialog" aria-hidden="true">
+		<div class="modal-dialog modal-sm" role="document">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h5 class="modal-title">건강정보 입력</h5>
+					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
+							aria-hidden="true">&times;</span> </button>
+				</div>
+				<div class="modal-body m-3">
+					<table class="table mobile-table">
+						<colgroup>
+							<col style="width: 30%">
+							<col style="width: 70%">
+						</colgroup>
+						<tr>
+							<th>기록자</th>
+							<td>
+								<div class="form-group mb-xl-0">
+									<input class="form-control" type="text" value="${data._SES_ID}" readonly>
+								</div>
+							</td>
+						</tr>
+						<tr class="healthInfo"></tr>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
+					<button type="button" class="btn btn-primary">등록</button>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div class="modal fade" id="defaultModalPrimary_2" tabindex="-1" role="dialog" aria-hidden="true">
+		<div class="modal-dialog" role="document">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h5 class="modal-title">임상증상 입력</h5>
+					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
+							aria-hidden="true">&times;</span> </button>
+				</div>
+				<div class="modal-body m-3">
+					<table class="table mobile-table">
+						<colgroup>
+							<col style="width: 30%">
+							<col style="width: 70%">
+						</colgroup>
+						<tr>
+							<th>기록자</th>
+							<td>
+								<div class="form-group mb-xl-0">
+									<input class="form-control" type="text" value="${data._SES_ID}" readonly>
+								</div>
+							</td>
+						</tr>
+						<tr>
+							<th>임상증상</th>
+							<td>
+								<div class="form-group mb-xl-0">
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											기침
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											호흡곤란
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											오한
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											근육통
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											두통
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											인후통
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											후각/미각 손실
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											피로
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											식욕감소
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											가래
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											오
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											구토
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											설사
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											어지러움
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											콧물/코막힘
+										</span>
+									</label>
+									<label class="form-check form-check-inline">
+										<input id="" class="form-check-input" type="checkbox">
+										<span class="form-check-label">
+											기타 ( <input type="text" id="" class="form-control form-control-sm w150" value="" placeholder="증상 내용"> )
+										</span>
+									</label>
+								</div>
+							</td>
+						</tr>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
+					<button type="button" class="btn btn-primary">등록</button>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div class="modal fade" id="defaultModalPrimaryMemo" tabindex="-1" role="dialog" aria-hidden="true">
+		<div class="modal-dialog" role="document">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h5 class="modal-title">의료진 메모 입력</h5>
+					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
+							aria-hidden="true">&times;</span> </button>
+				</div>
+				<div class="modal-body m-3">
+					<table class="table mobile-table">
+						<colgroup>
+							<col style="width: 20%">
+							<col style="width: 80%">
+						</colgroup>
+						<tr>
+							<th>작성자</th>
+							<td>
+								<div class="form-row">
+									<input type="text" name="" class="form-control" placeholder="이름을 입력하세요" value="${data._SES_ID}" readonly>
+								</div>
+							</td>
+						</tr>
+						<tr>
+							<th>내용</th>
+							<td>
+								<div class="form-row">
+									<textarea class="form-control" rows="2" placeholder="내용을 입력하세요"></textarea>
+								</div>
+							</td>
+						</tr>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
+					<button type="button" class="btn btn-primary">등록</button>
+				</div>
+			</div>
+		</div>
+	</div>
 	<div class="wrapper">
 		<jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
 
@@ -470,39 +677,6 @@ $(document).ready(function() {
 												<button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1">기록추가</button>
 											</label>
 										</h1>
-										<div class="modal fade" id="defaultModalPrimary_1" tabindex="-1" role="dialog" aria-hidden="true">
-											<div class="modal-dialog max360" role="document">
-												<div class="modal-content">
-													<div class="modal-header">
-														<h5 class="modal-title">건강정보 입력</h5>
-														<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-															<span aria-hidden="true">&times;</span>
-														</button>
-													</div>
-													<div class="modal-body m-3">
-														<table class="table mobile-table">
-															<colgroup>
-																<col style="width: 30%">
-																<col style="width: 70%">
-															</colgroup>
-															<tr>
-																<th>기록자</th>
-																<td>
-																	<div class="form-group mb-xl-0">
-																		<input class="form-control" type="text" value="${data._SES_NAME}(${data._SES_ID})" disabled>
-																	</div>
-																</td>
-															</tr>
-															<tr class="healthInfo"></tr>
-														</table>
-													</div>
-													<div class="modal-footer">
-														<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
-														<button type="button" class="btn btn-primary" onclick="handlePhrData()">등록</button>
-													</div>
-												</div>
-											</div>
-										</div>
 									</div>
 									<div class="card-body">
 										<div class="graph-area mb-4">
@@ -512,7 +686,7 @@ $(document).ready(function() {
 											<table id="phrDataTable" class="table data-table text-center">
 												<thead>
 													<tr>
-														<th>진료일시</th>
+														<th>기록일시</th>
 														<th>체온</th>
 														<th>진료담당자</th>
 													</tr>
@@ -543,65 +717,16 @@ $(document).ready(function() {
 									<div class="card-header">
 										<h1 class="h4">
 											- 임상증상 <label class="ml-1">
-												<button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1">증상추가</button>
+												<button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_2">증상추가</button>
 											</label>
 										</h1>
-										<div class="modal fade" id="defaultModalPrimary_1" tabindex="-1" role="dialog" aria-hidden="true">
-											<div class="modal-dialog" role="document">
-												<div class="modal-content">
-													<div class="modal-header">
-														<h5 class="modal-title">임상증상 입력</h5>
-														<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-															<span aria-hidden="true">&times;</span>
-														</button>
-													</div>
-													<div class="modal-body m-3">
-														<table class="table mobile-table">
-															<colgroup>
-																<col style="width: 30%">
-																<col style="width: 70%">
-															</colgroup>
-															<tr>
-																<th>기록자</th>
-																<td>
-																	<div class="form-group mb-xl-0">
-																		<input class="form-control" type="text">
-																	</div>
-																</td>
-															</tr>
-															<tr>
-																<th>임상증상</th>
-																<td>
-																	<div class="form-group mb-xl-0">
-																		<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"> 기타 ( <input type="text" class="form-control form-control-sm w150" name=""> )
-																		</span>
-																		</label>
-																	</div>
-																</td>
-															</tr>
-														</table>
-													</div>
-													<div class="modal-footer">
-														<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
-														<button type="button" class="btn btn-primary">등록</button>
-													</div>
-												</div>
-											</div>
-										</div>
 									</div>
 									<div class="card-body">
 										<div class="table-responsive">
 											<table id="symptomDataTable" class="table data-table text-center">
 												<thead>
 													<tr>
-														<th>증상정보</th>
+														<th>기록일시</th>
 														<th>기침</th>
 														<th>호흡곤란</th>
 														<th>오한</th>
@@ -659,46 +784,6 @@ $(document).ready(function() {
 											- 의료진 메모
 											<button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimaryMemo">메모추가</button>
 										</h1>
-										<div class="modal fade" id="defaultModalPrimaryMemo" tabindex="-1" role="dialog" aria-hidden="true">
-											<div class="modal-dialog" role="document">
-												<div class="modal-content">
-													<div class="modal-header">
-														<h5 class="modal-title">의료진 메모 입력</h5>
-														<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-															<span aria-hidden="true">&times;</span>
-														</button>
-													</div>
-													<div class="modal-body m-3">
-														<table class="table mobile-table">
-															<colgroup>
-																<col style="width: 20%">
-																<col style="width: 80%">
-															</colgroup>
-															<tr>
-																<th>작성자</th>
-																<td>
-																	<div class="form-row">
-																		<input type="text" name="" class="form-control" placeholder="이름을 입력하세요" value="김의사" readonly>
-																	</div>
-																</td>
-															</tr>
-															<tr>
-																<th>내용</th>
-																<td>
-																	<div class="form-row">
-																		<textarea class="form-control" rows="2" placeholder="내용을 입력하세요"></textarea>
-																	</div>
-																</td>
-															</tr>
-														</table>
-													</div>
-													<div class="modal-footer">
-														<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
-														<button type="button" class="btn btn-primary">등록</button>
-													</div>
-												</div>
-											</div>
-										</div>
 									</div>
 									<div class="card-body">
 										<div class="table-responsive">

+ 21 - 8
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -269,26 +269,39 @@ $(document).ready(function() {
 										<jsp:useBean id="now" class="java.util.Date" />
 										<fmt:formatDate value="${now}" pattern="yyyyMMdd" var="nowDateString" />
 										<c:forEach var="patient" items="${items}" varStatus="status">
+											<fmt:formatDate value="${patient.symptomLastDate}" pattern="yyyyMMdd" var="symptomLastDateString" />
+											<fmt:formatDate value="${patient.temperatureCreateDate}" pattern="yyyyMMdd" var="temperatureDateString" />
+											<fmt:formatDate value="${patient.systolicBloodPressureCreateDate}" pattern="yyyyMMdd" var="systolicBloodPressureDateString" />
+											<fmt:formatDate value="${patient.oxygenSaturationCreateDate}" pattern="yyyyMMdd" var="oxygenSaturationDateString" />
+											<c:set var="title" value="${patient.roomNumber}(${patient.patientName})" />
 											<c:set var="viewLink" value="./info?patientIdx=${patient.patientIdx}" />
+											<c:set var="showMemoIcon" value="${patient.memoCount > 0}" />
+											<c:set var="showSymptomIcon" value="${symptomLastDateString == nowDateString}" />
+											<c:set var="temperature_step" value="${patient.temperature > 37 ? 'step_two' : 'step_one'}" />
+											<c:set var="temperature_overtime" value="${temperatureDateString == nowDateString ? '' : 'overtime'}" />
+											<c:set var="bloodPressure_step" value="${patient.temperature > 37 ? 'step_two' : 'step_one'}" />
+											<c:set var="bloodPressure_overtime" value="${temperatureDateString == nowDateString ? '' : 'overtime'}" />
+											<c:set var="oxygenSaturation_step" value="${patient.temperature > 37 ? 'step_two' : 'step_one'}" />
+											<c:set var="oxygenSaturation_overtime" value="${temperatureDateString == nowDateString ? '' : 'overtime'}" />
 											<div class="col-lg-2 col-md-6 mb-4">
 												<div class="patients-stats">
 													<div class="name">
-														<a href="${viewLink}"><c:out value="${patient.roomNumber}(${patient.patientName})" /></a>
+														<a href="${viewLink}"><c:out value="${title}" /></a>
 														<div class="check">
 															<ul>
-																<li><a href="javscript:;" class="symptom"> <i class="align-middle ml-2 fas fa-fw fa-user-plus"></i>
-																</a></li>
+																<c:if test="${showMemoIcon}">
+																<li><a href="javscript:;" class="memo"><i class="align-middle ml-2 fas fa-fw fa-edit"></i></a></li>
+																</c:if>
+																<c:if test="${showSymptomIcon}">
+																<li><a href="javscript:;" class="symptom"> <i class="align-middle ml-2 fas fa-fw fa-user-plus"></i></a></li>
+																</c:if>
 															</ul>
 														</div>
 													</div>
 													<div class="stats ${patient.temperature > 37 ? 'danger' : '' }">
 														<ul>
-															<c:set var="temperature_step_two" value="${patient.temperature > 37 ? 'step_one' : ''}" />
-															<fmt:formatDate value="${patient.temperatureCreateDate}" pattern="yyyyMMdd" var="temperatureDateString" />
-															<li class="fever ${temperature_step_two} ${temperatureDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.temperature != null ? patient.temperature : '--'} ℃" /></li>
-															<fmt:formatDate value="${patient.systolicBloodPressureCreateDate}" pattern="yyyyMMdd" var="systolicBloodPressureDateString" />
+															<li class="fever ${temperature_step} ${temperature_overtime}"><c:out value="${patient.temperature != null ? patient.temperature : '--'} ℃" /></li>
 															<li class="bloodPressure ${systolicBloodPressureDateString == nowDateString ? 'step_one' : ''}"><c:out value='${patient.bloodPressureDisplay}' /></li>
-															<fmt:formatDate value="${patient.oxygenSaturationCreateDate}" pattern="yyyyMMdd" var="oxygenSaturationDateString" />
 															<li class="oxygen ${oxygenSaturationDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.oxygenSaturation != null ? patient.oxygenSaturation : '--'} %" />
 														</ul>
 													</div>