JAVA-based management system Medicare SSM framework

Today, a friend and together to complete a Medicare Management System project, we use in the development of the framework is SSM (MYECLIPSE) framework. Limited knowledge of my friend, only this framework, ha ha, is designed to facilitate him. As usual selection of simple and convenient MYECLIPSE as a development tool, which is a background program. Introduction of this system is this: health care (PC) is defined as related services pharmacists directly responsible for providing the drug therapy, which aims to achieve the exact effect of improving the patients' quality of life. National Medicare information management system "is a subproject of the national medical and health science data sharing project with the aim of opening up a green channel for the elderly medical care in the country by Chinese elderly health insurance network, the real the elderly enjoy the "sunset red" aspiration, completely solve the elderly medical treatment is difficult and expensive status quo, thus promoting the development of China's elderly healthy industry. This paper analyzes the significance of the construction project of healthy red sunset, sunset red and health projects the overall goal of the master plan, expected goals were outlined., a Medicare management system should include user roles administrator user. In order to allow users to log in successfully complete the relevant operating system, you need to set up accounts for each login role and password fields.

The summary results for all data systems: the administrator (admin), user (yonghu), health records (jiankangdangan)

Administrators table

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | administrator the above mentioned id 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password

 

user table

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | user the above mentioned id 
Xingming |  VARCHAR ( 255 ) |  | Name 
nianling |  VARCHAR ( 255 ) |  | Age 
xingbie |  VARCHAR ( 255 ) |  | Sex 
Zhiwu |  VARCHAR ( 255 ) |  |Position 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password

 

Health records table

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | health records the above mentioned id 
Xingming |  VARCHAR ( 255 ) |  | Name 
nianliang |  VARCHAR ( 255 ) |  | Age 
xingbie |  VARCHAR ( 255 ) |  | Sex 
shentiqingkuang |  VARCHAR ( 255 ) |  | health condition

 

 

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------

-- ----------------------------

-- Table structure for gglaonianyiliaobaojianglxt

-- ----------------------------

DROP TABLE IF EXISTS `t_admin`;

CREATE TABLE `t_admin` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id',`username` VARCHAR(255) DEFAULT NULL COMMENT '账号',`password` VARCHAR(255) DEFAULT NULL COMMENT '密码',PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='管理员';

-- ----------------------------

DROP TABLE IF EXISTS `t_yonghu`;

CREATE TABLE `t_yonghu` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'User the above mentioned id ' , `xingming` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' name ' ,` nianling` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' Age ' , `xingbie` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' sex ' ,` zhiwu` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' post ' , `username` VARCHAR (255) DEFAULT NULL COMMENT '账号',`password` VARCHAR(255) DEFAULT NULL COMMENT '密码',PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户';

-- ----------------------------

DROP TABLE IF EXISTS `t_jiankangdangan`;

CREATE TABLE `t_jiankangdangan` (`id` INT( 11 ) the NOT  NULL AUTO_INCREMENT the COMMENT ' health records the above mentioned id ' , `xingming` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' name ' ,` nianliang` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' Age ' , `xingbie` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' sex ' , `shentiqingkuang` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' physical condition ' , PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULT CHARSET = utf8 the COMMENT = ' health records ' ;

 

Adding health record modules:

From page via the post method, the health records of information passed to the server in the background, in tianjiajiankangdanganact

Receive, fields including name, age, sex, physical condition using the insert method to add data to the data synchronization

Database, add the operation is complete. Add the definition of a successful message, adding the success of health records, and save it to request specific code is as follows:

Jiankangdangandao by the insert method to add a page transfer health records to the database jiankangdangandao.insert (jiankangdangan);

Add the successful health records information, save it to a message request, the user is given the page prompt request.setAttribute ( "message", "add health records success");

Return to health records management interface

return "forward:/tianjiajiankangdangan.action";

Query module health records:

Health records implementation inquiry module is launched jiankangdanganguanli.action request page. By this request, the server response jiankangdanganController class jiankangdanganguanli, query operation data in the process by selectByexample. After all the health records information query, save it to request the jiankangdanganall in, on display in the page and return jiankangdanganguanli.jsp, the part of the core code is as follows:

Generating a sample-based health records, query by example defined JiankangdanganExample example = new JiankangdanganExample ();

Check out all of the method by selectByExample jiankangdangandao of health archival information List jiankangdanganall = jiankangdangandao.selectByExample (example);

The health profile information, saved to the request, make the show request.setAttribute ( "jiankangdanganall", jiankangdanganall) page by foreach method;

Return to health records management interface

return "forward:/jiankangdanganguanli.action";

Modify health record modules:

After the completion of health records of the page modify information to fill, the incoming xiugaijiankangdangan.action address part of the data, and submit it by post. After receiving submitted by xiugaijiankangdangan in jiankangdanganController in all fields packaged as a health record entity. And the entity in the incoming updateByPrimaryKeySelective method jiankangdangandao, the definition of health records by remaining id updated health records of the field in the method, the part of the field including name, age, sex, physical condition, which is part of the core code shown below :

Health records corresponding modified jiankangdangandao.updateByPrimaryKeySelective (jiankangdangan) by modifying the method according to the id of jiankangdangandao;

The success amend health records information, save it to a message request, the user is given prompt request.setAttribute in the page ( "message", "modify health record information successfully");

Return to health records management interface

return "forward:/jiankangdanganguanli.action";

Delete health record modules:

By a label, shanchujiankangdangan the page? Id = id will be passed to the background, to receive health records by id shanchujiankangdangan. Use of deleteByid

Delete the health records, complete the deletion. Delete the definition of a successful message, delete successful health records, and saved to the request, the part of the code is as follows:

Delete the corresponding health records jiankangdangandao.deleteByPrimaryKey (id) id by removing method according to the jiankangdangandao;

Health information will be deleted successfully files saved to the message request, the user is given prompt request.setAttribute in the page ( "message", "health records deleted successfully");

Return to health records management interface

return "forward:/jiankangdanganguanli.action";

Guess you like

Origin www.cnblogs.com/xxsnn/p/11593816.html