무소의 뿔처럼
(검사결과조회화면)과정평가형 정보처리산업기사_v1 진단검사 프로그램 본문
쿼리
select p.p_no, p.p_name,
l.t_name,
r.t_sdate, r.t_status, r.t_ldate, r.t_result
from tbl_patient_202004 p,
tbl_lab_test_202004 l,
tbl_result_202004 r
where p.p_no = r.p_no and l.t_code = r.t_code
order by p.p_no ;
jsp
더보기
더보기
더보기
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<jsp:include page="header.jsp"></jsp:include>
<section>
<h3>검사결과조회</h3>
<div class="vTableDiv">
<table class="vTable2">
<tr>
<th> 환자번호 </th>
<th> 환자명 </th>
<th> 검사명 </th>
<th> 검사시작일 </th>
<th> 검사상태 </th>
<th> 검사종료일 </th>
<th> 검사결과 </th>
</tr>
<tr>
<%
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try{
con = dbcon.getConnection();
stmt = con.createStatement();
String sql = "select p.p_no, p.p_name, l.t_name, r.t_sdate, r.t_status, r.t_ldate, r.t_result " +
" from tbl_patient_202004 p, tbl_lab_test_202004 l, tbl_result_202004 r "+
" where p.p_no = r.p_no and l.t_code = r.t_code "+
" order by p.p_no";
rs = stmt.executeQuery(sql);
while(rs.next()){
String t_status = rs.getString("T_status") ;
switch(t_status){
case "1":
t_status = "검사중";
break;
case "2":
t_status = "검사완료";
break;
}
String t_sdate1 = rs.getString("t_sdate");
String t_sdate = t_sdate1.substring(0,10);
String t_ldate1 = rs.getString("t_ldate");
String t_ldate = t_ldate1.substring(0,10);
String t_result = rs.getString("t_result");
switch(t_result){
case "X":
t_result = "미입력";
break;
case "P":
t_result = "양성";
break;
case "N":
t_result = "음성";
break;
}
%>
<td><%=rs.getString("p_no") %></td>
<td><%=rs.getString("p_name")%></td>
<td><%=rs.getString("t_name") %></td>
<td><%=t_sdate %></td>
<td><%=t_status %></td>
<td><%=t_ldate %></td>
<td><%=t_result %></td>
</tr>
<%
}
if (rs != null ) rs.close();
if (stmt != null ) stmt.close();
if (con != null ) con.close();
}catch(Exception e){
e.printStackTrace();
}
%>
</table>
</div>
</section>
<jsp:include page="footer.jsp"></jsp:include>
'과정평가_정산기_기록 > 진단검사 프로그램' 카테고리의 다른 글
(지역별_검사건수통계)과정평가형 정보처리산업기사_v1 진단검사 프로그램 (0) | 2022.02.11 |
---|---|
(검사결과입력화면)과정평가형 정보처리산업기사_v1 진단검사 프로그램 (0) | 2022.02.11 |
(HTML)과정평가형 정보처리산업기사_v1 진단검사 프로그램 (0) | 2022.02.11 |
(환자조회화면)과정평가형 정보처리산업기사_v1 진단검사 프로그램 (0) | 2022.02.11 |
Comments