基于javaweb+jsp的医院门诊病例管理系统
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
开发工具:eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>病例添加</title><%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid"><ul class="nav nav-tabs"><li><a href="bingList?">病例列表</a></li><li class="active"><a href="#">添加</a></li></ul><br/><form class="form-horizontal" role="form" action="bingAdd" method="post" onsubmit="return check()">
* 编辑药品** @param response* @param request* @throws IOException*/@RequestMapping("medicineEdit")public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {Medicine vo = new Medicine();vo.setId(Long.valueOf(Util.decode(request, "id")));vo.setMedicineName(Util.decode(request, "medicineName"));vo.setMedicineNo(Util.decode(request, "medicineNo"));vo.setMedicinePrice(Util.decode(request, "medicinePrice"));vo.setMedicineProducedate(Util.decode(request, "medicineProducedate"));
1=1</where></select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.demo.dao.ChuMapper"><resultMap id="BaseResultMap" type="com.demo.vo.Chu" ><result column="id" property="id" /><result column="chu_bing" property="chuBing" /><result column="chu_name" property="chuName" /><result column="chu_yao" property="chuYao" /><result column="chu_count" property="chuCount" /><result column="chu_price" property="chuPrice" /><result column="chu_status" property="chuStatus" /><result column="chu_text" property="chuText" /></resultMap>
</form>
</div>
</body>
<script type="text/javascript">//提交之前进行检查,如果return false,则不允许提交function check() {//根据ID获取值if (document.getElementById("bingNo").value.trim().length == 0) {alert("病例编号不能为空!");return false;}if (document.getElementById("bingKeshi").value.trim().length == 0) {alert("科室不能为空!");return false;}if (document.getElementById("bingName").value.trim().length == 0) {alert("姓名不能为空!");return false;}if (document.getElementById("bingAge").value.trim().length == 0) {alert("年龄不能为空!");return false;}if (document.getElementById("bingShi").value.trim().length == 0) {alert("病史不能为空!");return false;
@RequestMapping("noticeAdd")public void add(HttpServletResponse response, HttpServletRequest request) throws IOException {Notice vo = new Notice();//取出页面传进来的参数vo.setNoticeName(Util.decode(request, "noticeName"));vo.setNoticeText(Util.decode(request, "noticeText"));vo.setNoticeType(Util.decode(request, "noticeType"));vo.setCreateDate(Util.decode(request, "createDate"));//调用Service层的增加(insert)方法noticeService.insert(vo);this.redirectList(request, response);}/*** 删除公告** @param response* @param request* @throws IOException*/@RequestMapping("noticeDelete")
request.getRequestDispatcher("reset_password.jsp").forward(request, response);}// 返回一个随机颜色(Color对象)private Color getRandomColor(int minColor, int maxColor) {Random random = new Random();// 保存minColor最大不会超过255if (minColor > 255)minColor = 255;// 保存minColor最大不会超过255if (maxColor > 255)maxColor = 255;// 获得红色的随机颜色值int red = minColor + random.nextInt(maxColor - minColor);// 获得绿色的随机颜色值
public void setBingKeshi(String bingKeshi) {this.bingKeshi = bingKeshi;}public String getBingName() {return bingName;}public void setBingName(String bingName) {this.bingName = bingName;}public String getBingSex() {return bingSex;}public void setBingSex(String bingSex) {
</sql><!--新增--><insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Bing">INSERT INTO `t_bing`<trim prefix="(" suffix=")" suffixOverrides=","><if test ='id != null'>`id`,</if><if test ='bingNo != null'>`bing_no`,</if><if test ='bingKeshi != null'>`bing_keshi`,</if><if test ='bingName != null'>`bing_name`,</if><if test ='bingSex != null'>`bing_sex`,</if><if test ='bingAge != null'>`bing_age`,</if><if test ='bingShi != null'>`bing_shi`,</if><if test ='bingMiaosu != null'>`bing_miaosu`,</if><if test ='bingJieguo != null'>`bing_jieguo`,</if><if test ='bingText != null'>`bing_text`</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test ='id != null'>#{id},</if>
public String getBingJieguo() {return bingJieguo;}public void setBingJieguo(String bingJieguo) {this.bingJieguo = bingJieguo;}public String getBingText() {return bingText;}public void setBingText(String bingText) {this.bingText = bingText;}
}
package com.demo.vo;import java.io.Serializable;/*** 药品(t_medicine表对应的Java实体类)*/
public class Medicine implements Serializable {private Long id;//主键private String medicineName;//药品名称
<select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_chu`<where><if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">${searchColumn} LIKE CONCAT('%',#{keyword},'%') AND</if>1=1</where>ORDER BY id ASC<if test="startIndex != null and pageSize != null">LIMIT #{startIndex},#{pageSize};</if></select><!--数量--><select id="getAllCount" parameterType="java.util.Map" resultType="Integer">SELECT COUNT(*) FROM `t_chu`<where>
import com.demo.vo.Bing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;@Controller
@RequestMapping
public class BingController {
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、病例模块、药品模块、处方模块的增删改查管理