医疗系统的设计与实现

医疗系统的设计与实现登录注册界面

医疗系统的设计与实现mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

患者表创建语句如下:


create table t_customer(
	id int primary key auto_increment comment '主键',
	customerName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	sfz varchar(100) comment '身份证',
	birthday varchar(100) comment '生日',
	address varchar(100) comment '住址'
) comment '患者';

医生表创建语句如下:


create table t_doctor(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码 ',
	doctorName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	zw varchar(100) comment '职位名称',
	ksName varchar(100) comment '所属科室'
) comment '医生';

公告表创建语句如下:


create table t_gg(
	id int primary key auto_increment comment '主键',
	title varchar(100) comment '标题',
	pic varchar(100) comment '图片',
	showDate datetime comment '日期',
	content varchar(100) comment '内容'
) comment '公告';

挂号表创建语句如下:


create table t_gh(
	id int primary key auto_increment comment '主键',
	customerId int comment '患者',
	doctorId int comment '医生',
	ksName varchar(100) comment '所挂科室',
	title varchar(100) comment '病情简单描述',
	v1 varchar(100) comment '就诊记录',
	v2 varchar(100) comment '拍片',
	v3 int comment '费用',
	v4 datetime comment '挂号日期',
	v5 varchar(100) comment '药品记录',
	status varchar(100) comment '状态'
) comment '挂号';

医疗系统的设计与实现oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

患者表创建语句如下:


create table t_customer(
	id integer,
	customerName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	sfz varchar(100),
	birthday varchar(100),
	address varchar(100)
);
--患者字段加注释
comment on column t_customer.id is '主键';
comment on column t_customer.customerName is '姓名';
comment on column t_customer.age is '年龄';
comment on column t_customer.sex is '性别';
comment on column t_customer.phone is '电话';
comment on column t_customer.sfz is '身份证';
comment on column t_customer.birthday is '生日';
comment on column t_customer.address is '住址';
--患者表加注释
comment on table t_customer is '患者';

医生表创建语句如下:


create table t_doctor(
	id integer,
	username varchar(100),
	password varchar(100),
	doctorName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	zw varchar(100),
	ksName varchar(100)
);
--医生字段加注释
comment on column t_doctor.id is '主键';
comment on column t_doctor.username is '账号';
comment on column t_doctor.password is '密码 ';
comment on column t_doctor.doctorName is '姓名';
comment on column t_doctor.age is '年龄';
comment on column t_doctor.sex is '性别';
comment on column t_doctor.phone is '电话';
comment on column t_doctor.zw is '职位名称';
comment on column t_doctor.ksName is '所属科室';
--医生表加注释
comment on table t_doctor is '医生';

公告表创建语句如下:


create table t_gg(
	id integer,
	title varchar(100),
	pic varchar(100),
	showDate datetime,
	content varchar(100)
);
--公告字段加注释
comment on column t_gg.id is '主键';
comment on column t_gg.title is '标题';
comment on column t_gg.pic is '图片';
comment on column t_gg.showDate is '日期';
comment on column t_gg.content is '内容';
--公告表加注释
comment on table t_gg is '公告';

挂号表创建语句如下:


create table t_gh(
	id integer,
	customerId int,
	doctorId int,
	ksName varchar(100),
	title varchar(100),
	v1 varchar(100),
	v2 varchar(100),
	v3 int,
	v4 datetime,
	v5 varchar(100),
	status varchar(100)
);
--挂号字段加注释
comment on column t_gh.id is '主键';
comment on column t_gh.customerId is '患者';
comment on column t_gh.doctorId is '医生';
comment on column t_gh.ksName is '所挂科室';
comment on column t_gh.title is '病情简单描述';
comment on column t_gh.v1 is '就诊记录';
comment on column t_gh.v2 is '拍片';
comment on column t_gh.v3 is '费用';
comment on column t_gh.v4 is '挂号日期';
comment on column t_gh.v5 is '药品记录';
comment on column t_gh.status is '状态';
--挂号表加注释
comment on table t_gh is '挂号';

oracle特有,对应序列如下:


create sequence s_t_customer;
create sequence s_t_doctor;
create sequence s_t_gg;
create sequence s_t_gh;

医疗系统的设计与实现sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

患者表创建语句如下:


--患者表注释
create table t_customer(
	id int identity(1,1) primary key not null,--主键
	customerName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	sfz varchar(100),--身份证
	birthday varchar(100),--生日
	address varchar(100)--住址
);

医生表创建语句如下:


--医生表注释
create table t_doctor(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码 
	doctorName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	zw varchar(100),--职位名称
	ksName varchar(100)--所属科室
);

公告表创建语句如下:


--公告表注释
create table t_gg(
	id int identity(1,1) primary key not null,--主键
	title varchar(100),--标题
	pic varchar(100),--图片
	showDate datetime,--日期
	content varchar(100)--内容
);

挂号表创建语句如下:


--挂号表注释
create table t_gh(
	id int identity(1,1) primary key not null,--主键
	customerId int,--患者
	doctorId int,--医生
	ksName varchar(100),--所挂科室
	title varchar(100),--病情简单描述
	v1 varchar(100),--就诊记录
	v2 varchar(100),--拍片
	v3 int,--费用
	v4 datetime,--挂号日期
	v5 varchar(100),--药品记录
	status varchar(100)--状态
);

医疗系统的设计与实现登录后主页

医疗系统的设计与实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

患者javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//患者
@Table(name = "t_customer")
public class Customer {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String customerName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//生日
private String birthday;
//住址
private String address;
public String getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getBirthday() {return birthday;}
public void setBirthday(String birthday) {this.birthday = birthday;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
}

医生javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//医生
@Table(name = "t_doctor")
public class Doctor {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码 
private String password;
//姓名
private String doctorName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//职位名称
private String zw;
//所属科室
private String ksName;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getDoctorName() {return doctorName;}
public void setDoctorName(String doctorName) {this.doctorName = doctorName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getZw() {return zw;}
public void setZw(String zw) {this.zw = zw;}
public String getKsName() {return ksName;}
public void setKsName(String ksName) {this.ksName = ksName;}
}

公告javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//公告
@Table(name = "t_gg")
public class Gg {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//标题
private String title;
//图片
private String pic;
//日期
private Date showDate;
//内容
private String content;
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}

挂号javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//挂号
@Table(name = "t_gh")
public class Gh {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//患者
private Integer customerId;
//医生
private Integer doctorId;
//所挂科室
private String ksName;
//病情简单描述
private String title;
//就诊记录
private String v1;
//拍片
private String v2;
//费用
private Integer v3;
//挂号日期
private Date v4;
//药品记录
private String v5;
//状态
private String status;
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Integer getDoctorId() {return doctorId;}
public void setDoctorId(Integer doctorId) {this.doctorId = doctorId;}
public String getKsName() {return ksName;}
public void setKsName(String ksName) {this.ksName = ksName;}
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getV1() {return v1;}
public void setV1(String v1) {this.v1 = v1;}
public String getV2() {return v2;}
public void setV2(String v2) {this.v2 = v2;}
public Integer getV3() {return v3;}
public void setV3(Integer v3) {this.v3 = v3;}
public Date getV4() {return v4;}
public void setV4(Date v4) {this.v4 = v4;}
public String getV5() {return v5;}
public void setV5(String v5) {this.v5 = v5;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

医疗系统的设计与实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

患者javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//患者
public class Customer  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String customerName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//生日
private String birthday;
//住址
private String address;
public String getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getBirthday() {return birthday;}
public void setBirthday(String birthday) {this.birthday = birthday;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
}

医生javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//医生
public class Doctor  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码 
private String password;
//姓名
private String doctorName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//职位名称
private String zw;
//所属科室
private String ksName;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getDoctorName() {return doctorName;}
public void setDoctorName(String doctorName) {this.doctorName = doctorName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getZw() {return zw;}
public void setZw(String zw) {this.zw = zw;}
public String getKsName() {return ksName;}
public void setKsName(String ksName) {this.ksName = ksName;}
}

公告javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//公告
public class Gg  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//标题
private String title;
//图片
private String pic;
//日期
private Date showDate;
//内容
private String content;
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}

挂号javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//挂号
public class Gh  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//患者
private Integer customerId;
//医生
private Integer doctorId;
//所挂科室
private String ksName;
//病情简单描述
private String title;
//就诊记录
private String v1;
//拍片
private String v2;
//费用
private Integer v3;
//挂号日期
private Date v4;
//药品记录
private String v5;
//状态
private String status;
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Integer getDoctorId() {return doctorId;}
public void setDoctorId(Integer doctorId) {this.doctorId = doctorId;}
public String getKsName() {return ksName;}
public void setKsName(String ksName) {this.ksName = ksName;}
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getV1() {return v1;}
public void setV1(String v1) {this.v1 = v1;}
public String getV2() {return v2;}
public void setV2(String v2) {this.v2 = v2;}
public Integer getV3() {return v3;}
public void setV3(Integer v3) {this.v3 = v3;}
public Date getV4() {return v4;}
public void setV4(Date v4) {this.v4 = v4;}
public String getV5() {return v5;}
public void setV5(String v5) {this.v5 = v5;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

源代码下载点这里

评论