⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updatehistory.jsp

📁 经典的“医疗门诊查询系统”JSP源代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=gbk"%><%@ include file = "../include/ccs.inc" %>
<%@ page import="hospital.db.dboperation.*" %>
<%@ page import="hospital.db.*" %>
<%@ page import="java.sql.*" %>

<html>
<head>
<title>医院门诊预约系统-更改病历</title>

</head>
<%
String _updateHistory="";
String _updatePassword="";

Doctor doctor=(Doctor)session.getAttribute("doctor");
if(doctor==null)
{
	_updatePassword="请先<a href=\"/hospital/doctor/login.jsp\">登录</a>";
	//return;
}

ResultSet rs=null;
int hid=Integer.parseInt(request.getParameter("hid"));

doctor.getPatientHistory(hid);
rs=doctor.getResultSet();
rs.next();

if(request.getParameter("update")!=null){
	String description=request.getParameter("description");
	String diagnose=request.getParameter("diagnose");
	String rx=request.getParameter("rx");

	int u=doctor.updateHistory(hid,description,rx,diagnose);
	switch(u){
		case 1:
			_updateHistory="修改成功";
			break;
		case 0:
			_updateHistory="一般异常";
			break;
		case -1:
			_updateHistory="数据库异常";
			break;
		case -2:
			_updateHistory="非法HID值或无权更改该病人病历";
			break;
	}
}
%>
<body bgcolor="#FFFFFF">

<table width="770" height="423" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
	<tr>
		<td height="421" bgcolor="#FFFFFF"><%@ include file = "../include/head.inc" %>
				<table width="770" height="290" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<%@ include file = "../include/doctor.inc" %>
						<td width="603" align="center" valign="top">
							<table width="100%" height="85%" border="0" cellpadding="3" cellspacing="1" bgcolor="#666666">
								<tr>
									<td width="488" height="257" align="center" valign="top" bgcolor="E3EDFF"><br>
										<p><%=_updateHistory%></p>
<form action="updateHistory.jsp?hid=<%=hid%>&amp;update=true" method="POST">
	<p>症状:<input type="text" name="description" value="<%=Util.decode(rs.getString("Description"))%>"/></p>
	<p>诊断:<input type="text" name="diagnose" value="<%=Util.decode(rs.getString("Diagnose"))%>"/></p>
	<p>处方:<input type="text" name="rx" value="<%=Util.decode(rs.getString("Rx"))%>"/></p>
	<p><input type="submit" value="确认更改"/></p>
</form>
									</td>
								</tr>
							</table>
						</td>
					</tr>
			</table></td>
	</tr>
</table>
</body>
</html>
<%
if(doctor!=null)
	doctor.closeConnection();
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -