老年人能力评估7
新建能力评估表:
drop table daily,mood,perception,social;
create table daily(
eat varbinary(2),
bath varbinary(2),
wash varbinary(2),
cloth varbinary(2),
stool varbinary(2),
urinal varbinary(2),
toilet varbinary(2),
move varbinary(2),
walk varbinary(2),
floor varbinary(2),
total varbinary(2),
level varbinary(1),
number text,
idnumber varbinary(18)
);
create table mood(
cogniton varbinary(2),
attack varbinary(2),
depression varbinary(2),
total varbinary(2),
level varbinary(1),
number text,
idnumber varbinary(18)
);
create table perception(
consciousness varbinary(2),
vision varbinary(2),
hearing varbinary(2),
communication varbinary(2),
level varbinary(1),
number text,
idnumber varbinary(18)
);
create table social(
live varbinary(2),
work varbinary(2),
timespace varbinary(2),
relation varbinary(2),
socialing varbinary(2),
total varbinary(2),
levele varbinary(1),
number text,
idnumber varbinary(18)
);
前两个的能力评估:
import data.dailydata;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
@WebServlet("/adddaily")
public class adddaily extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String idnumber = request.getParameter("idnumber");
int eat = Integer.parseInt(request.getParameter("eat"));
int bath = Integer.parseInt(request.getParameter("bath"));
int wash = Integer.parseInt(request.getParameter("wash"));
int cloth = Integer.parseInt(request.getParameter("cloth"));
int stool = Integer.parseInt(request.getParameter("stool"));
int urinal= Integer.parseInt(request.getParameter("urinal"));
int toilet= Integer.parseInt(request.getParameter("toile"));
int walk= Integer.parseInt(request.getParameter("walk"));
int move= Integer.parseInt(request.getParameter("move"));
int floor= Integer.parseInt(request.getParameter("floor"));
int total= Integer.parseInt(request.getParameter("total"));
int level= Integer.parseInt(request.getParameter("level"));
dailydata data=new dailydata(eat,bath,wash,cloth,stool,urinal,toilet,walk,move,
floor,total,level,"",idnumber);
Dao dao=new Dao();
try {
if(dao.adddaily(data)) {
request.getSession().setAttribute("idnumber",idnumber);
response.sendRedirect("addmood.jsp");
}
else {
request.getRequestDispatcher("adddaily.jsp").forward(request, response);
}
} catch (SQLException | ClassNotFoundException e) {
throw new ServletException(e);
}
}
}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>填写日常生活活动评估表</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f9;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: url("117a94c5-8e45-42c8-947f-6085fb41242b.jpg");
background-size: cover;
background-position: center;
}
.container {
background-color: rgba(255, 255, 255, 0.9);
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: left;
max-width: 100%;
margin: 0 auto;
}
h2 {
font-size: 1.5em;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: inline-block;
width: 120px;
font-weight: bold;
vertical-align: top;
}
.form-group input,
.form-group select {
width: calc(100% - 130px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
vertical-align: top;
}
.form-group select {
width: calc(100% - 130px + 15px);
}
.form-group input[type="text"],
.form-group input[type="date"] {
width: calc(100% - 130px);
}
.form-group input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
.form-group input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<form action="adddaily" method="post">
<div class="container">
<h2>填写日常生活活动评估表</h2>
<div class="form-group">
<label for="idnumber">被评估者的身份证号:</label>
<input name="idnumber" type="text" id="idnumber">
</div>
<div class="form-group">
<label for="eat">进食(指用餐具将食物由容器送到口中、咀嚼、吞咽等过程):</label>
<select id="eat" name="eat">
<option value="10">10 分,可独立进食</option>
<option value="5">5 分,需部分帮助</option>
<option value="0">0 分,需极大帮助或完全依赖他人,或有留置营养管</option>
</select>
</div>
<div class="form-group">
<label for="bath">洗澡:</label>
<select id="bath" name="bath">
<option value="5">5 分,准备好洗澡水后,可自己独立完成洗澡过程</option>
<option value="0">0 分,在洗澡过程中需他人帮助</option>
</select>
</div>
<div class="form-group">
<label for="wash">修饰(指洗脸、刷牙、梳头、刮脸等):</label>
<select id="wash" name="wash">
<option value="5">5 分,可自己独立完成</option>
<option value="0">0 分,需他人帮助</option>
</select>
</div>
<div class="form-group">
<label for="cloth">穿衣(指穿脱衣服、系扣、拉拉链、穿脱鞋袜、系鞋带):</label>
<select id="cloth" name="cloth">
<option value="10">10 分,可独立完成</option>
<option value="5">5 分,需部分帮助</option>
<option value="0">0 分,需极大帮助或完全依赖他人</option>
</select>
</div>
<div class="form-group">
<label for="stool">大便控制:</label>
<select id="stool" name="stool">
<option value="10">10 分,可控制大便</option>
<option value="5">5 分,偶尔失控(每周<1 次),或需要他人提示</option>
<option value="0">0 分,完全失控</option>
</select>
</div>
<div class="form-group">
<label for="urinal">小便控制:</label>
<select id="urinal" name="urinal">
<option value="10">10 分,可控制小便</option>
<option value="5">5 分,偶尔失控(每天<1 次,但每周>1 次),或需要他人提示</option>
<option value="0">0 分,完全失控,或留置导尿管</option>
</select>
</div>
<div class="form-group">
<label for="toilet">如厕(包括去厕所、解开衣裤、擦净、整理衣裤、冲水):</label>
<select id="toilet" name="toilet">
<option value="10">10 分,可独立完成</option>
<option value="5">5 分,需部分帮助</option>
<option value="0">0 分,需极大帮助或完全依赖他人</option>
</select>
</div>
<div class="form-group">
<label for="move">床椅转移:</label>
<select id="move" name="move">
<option value="15">15 分,可独立完成</option>
<option value="10">10 分,需部分帮助</option>
<option value="5">5 分,需极大帮助</option>
<option value="0">0 分,完全依赖他人</option>
</select>
</div>
<div class="form-group">
<label for="walk">平地行走:</label>
<select id="walk" name="walk">
<option value="15">15 分,可独立在平地上行走 45m</option>
<option value="10">10 分,需部分帮助</option>
<option value="5">5 分,需极大帮助</option>
<option value="0">0 分,完全依赖他人</option>
</select>
</div>
<div class="form-group">
<label for="floor">上下楼梯:</label>
<select id="floor" name="floor">
<option value="10">10 分,可独立上下楼梯(连续上下 10-15 个台阶)</option>
<option value="5">5 分,需部分帮助</option>
<option value="0">0 分,需极大帮助或完全依赖他人</option>
</select>
</div>
<div class="form-group">
<input type="submit" value="提交">
</div>
</div>
</form>
</body>
</html>
import data.mooddata;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
@WebServlet("/addmood")
public class addmood extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int cogintion=Integer.parseInt(request.getParameter("cogintion"));
int attack=Integer.parseInt(request.getParameter("attack"));
int depression=Integer.parseInt(request.getParameter("depression"));
int total=Integer.parseInt(request.getParameter("total"));
int level=Integer.parseInt(request.getParameter("level"));
String idnumber=request.getParameter("idnumber");
mooddata data=new mooddata(cogintion,attack,depression,total,level,"",idnumber);
Dao dao=new Dao();
try {
if(dao.addmood(data)) {
request.getSession().setAttribute("idnumber",idnumber);
response.sendRedirect("addperception.jsp");
}
else {
request.getRequestDispatcher("addmood.jsp").forward(request, response);
}
} catch (SQLException | ClassNotFoundException e) {
throw new ServletException(e);
}
}
}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>填写精神状态评估表</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f9;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-image: url("117a94c5-8e45-42c8-947f-6085fb41242b.jpg");
background-size: cover;
background-position: center;
}
.container {
background-color: rgba(255, 255, 255, 0.9);
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: left;
max-width: 100%;
margin: 0 auto;
}
h2 {
font-size: 1.5em;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: inline-block;
width: 120px;
font-weight: bold;
vertical-align: top;
}
.form-group input,
.form-group select {
width: calc(100% - 130px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
vertical-align: top;
}
.form-group select {
width: calc(100% - 130px + 15px);
}
.form-group input[type="text"],
.form-group input[type="date"] {
width: calc(100% - 130px);
}
.form-group input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
.form-group input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<form action="addmood" method="post">
<div class="container">
<h2>填写精神状态评估表</h2>
<div class="form-group">
<label for="cogintion">认知功能:</label>
<p>测验: 记忆测验:“我说三样东西,请重复一遍,并记住,一会儿会问您”:苹果、手表、国旗
画钟测验:“请您画一个圆形的时钟,在时钟上标出 10 点 45 分”</p>
<select name="cogintion" id="cogintion">
<option value="0">0 分,画钟正确(画出一个闭锁圆,指针位置准确),且能回忆出 2-3 个词</option>
<option value="1">1 分,画钟错误(画的圆不闭锁,或指针位置不准确),或只回忆出 0-1 个词</option>
<option value="2">2 分,已确诊为认知障碍,如老年痴呆</option>
</select>
</div>
<div class="form-group">
<label for="attack">攻击行为:</label>
<select name="attack" id="attack">
<option value="0">0 分,无身体攻击行为和语言攻击行为</option>
<option value="1">1 分,每月有几次身体攻击行为,或每周有几次语言攻击行为</option>
<option value="2">2 分,每周有几次身体攻击行为,或每日有语言攻击行为</option>
</select>
</div>
<div class="form-group">
<label for="depression">抑郁症状:</label>
<select name="depression" id="depression">
<option value="0">0 分,无</option>
<option value="1">1 分,情绪低落、不爱说话、不爱梳洗、不爱活动</option>
<option value="2">2 分,有自杀念头或自杀行为</option>
</select>
</div>
<div class="form-group">
<label for="total">精神状态总分:</label>
<input name="total" type="text" id="total" readonly>
</div>
<div class="form-group">
<label for="level">精神状态分级:</label>
<select name="level" id="level">
<option value="0">0 能力完好:总分为 0 分</option>
<option value="1">1 轻度受损:总分为 1 分</option>
<option value="2">2 中度受损:总分 2-3 分</option>
<option value="3">3 重度受损:总分 4-6 分</option>
</select>
</div>
<%
String idnumber=(String)session.getAttribute("idnumber");
%>
<input name="idnumber" type="hidden" value="<%=idnumber%>">
<div class="form-group">
<input type="submit" value="完成">
</div>
</div>
</form>
</body>
</html>