/**
* AnswererMasterServiceImpl.java
* @author:yaohang
* @DATE:2015-04-22 @TIME: 上午09:34:00
* Copyright (C) 2013 陕西天健源达信息科技有限公司
*
**/
package com.sxtj.nurseqc.nurseqcmain.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.sxtj.mobilehis.tools.PropertiesUtils;
import com.sxtj.nurseqc.nurseqcmain.dao.PatientInfoDao;
import com.sxtj.nurseqc.nurseqcmain.dao.AnswererMasterDao;
import com.sxtj.nurseqc.nurseqcmain.dao.QuestionDao;
import com.sxtj.nurseqc.nurseqcmain.entity.AnswerMaster;
import com.sxtj.nurseqc.nurseqcmain.entity.Question;
import com.sxtj.nurseqc.nurseqcmain.entity.Subject;
import com.sxtj.nurseqc.nurseqcmain.entity.SubjectCategory;
import com.sxtj.nurseqc.nurseqcmain.myenum.AnswerStatus;
import com.sxtj.nurseqc.nurseqcmain.service.AnswererMasterService;
import com.sxtj.nurseqc.nurseqcmain.vo.AnswerDetailInfo;
import com.sxtj.nurseqc.nurseqcmain.vo.PatientaInfo;
/**
* 功能说明: 实现护理质量的查询
*
* @author: yaohang
* @DATE:2015-04-22 @TIME: 上午09:27:00
*/
@Service("answererMasterService")
public class AnswererMasterServiceImpl implements AnswererMasterService {
private AnswererMasterDao answererMasterDao;
public AnswererMasterDao getAnswererMasterDao() {
return answererMasterDao;
}
@Resource(name = "answererMasterDao")
public void setAnswererMasterDao(AnswererMasterDao answererMasterDao) {
this.answererMasterDao = answererMasterDao;
}
private PatientInfoDao patientInfoDao;
public PatientInfoDao getPatientInfoDao() {
return patientInfoDao;
}
@Resource(name = "patientInfoDao")
public void setPatientInfoDao(PatientInfoDao patientInfoDao) {
this.patientInfoDao = patientInfoDao;
}
private QuestionDao questionDao;
public QuestionDao getQuestionDao() {
return questionDao;
}
@Resource(name = "questionDao")
public void setQuestionDao(QuestionDao questionDao) {
this.questionDao = questionDao;
}
/**
*
* 功能说明:查询护理文书质量,需要添加patientInfo
*
* @Example: AnswererMasterServiceImpl.queryAnswerMasterAndPatientInfo(String,int,int)
* @param aWardCode:护理单元
* @param aYear:年
* @param aMonth:月
* @return Map<Object,Object> 查询结果
* @author: yaohang
* @DATE:2015-05-22 @TIME: 下午15:29:00
*/
@Override
public Map<Object, Object> queryAnswerMasterAndPatientInfo(
String aWardCode, int aYear, int aMonth) {
Map<Object, Object> tmpMap = new HashMap<Object, Object>();
Properties localProperties = PropertiesUtils
.readProperties("/nurseqc.properties");
String tmpQuestionId = localProperties
.getProperty("config.qualityCheck.questionid");
try {
if (tmpQuestionId != null) {
List<Object> tmpTitleList = new ArrayList<Object>();
Question tmpQuestion = questionDao.queryById(tmpQuestionId);
if (tmpQuestion != null) {
Set<SubjectCategory> tmpSubjectCategorySet = tmpQuestion
.getSubjectCategorys();
if (tmpSubjectCategorySet != null) {
for (SubjectCategory tmpSubjectCategory : tmpSubjectCategorySet) {
List<Object> tmpList = new ArrayList<Object>();
Set<Subject> tmpSubjects = tmpSubjectCategory
.getSubjects();
for (Subject tmpSubject : tmpSubjects) {
Map<Object, Object> tmpSubjectMap = new HashMap<Object, Object>();
List<Object> tmpSub = new ArrayList<Object>();
tmpSub.add(tmpSubject.getWeights());
tmpSub.add(appendBrToString(tmpSubject
.getSubjectName()));
tmpSub.add(tmpSubject.getSubjectCategory()
.getSubjectCategoryName());
tmpSubjectMap.put(tmpSubject.getSubjectId(),
tmpSub);
tmpList.add(tmpSubjectMap);
}
if (tmpList.size() > 0) {
tmpTitleList.add(tmpList);
}
}
}
}
tmpMap.put("gridTitles", tmpTitleList);
List<Object> tmpDataList = new ArrayList<Object>();
boolean tmpBoolean = false;
List<AnswerMaster> tmpAnswerMasterList = answererMasterDao
.queryMasterByWardCodeAndDate(aWardCode, tmpQuestionId,
aYear, aMonth);
for (AnswerMaster tmpAnswerMaster : tmpAnswerMasterList) {
if (tmpAnswerMaster.getAnswerStatus() == AnswerStatus.ACheck
|| tmpAnswerMaster.getAnswerStatus() == AnswerStatus.AReported) {
tmpBoolean = true;
}
Set<AnswerDetailInfo> tmpAnswerDetailInfos = answererMasterDao
.getDetailByMasterId(tmpAnswerMaster
.getAnswerMasterId());
Map<String, Object> tmpAnswerDetailMap = new HashMap<String, Object>();
int tmpTotal = 0;
for (AnswerDetailInfo tmpAnswerDetailInfo : tmpAnswerDetailInfos) {
String tmpId = tmpAnswerDetailInfo.getSubjectId();
if (tmpId != null) {
int tmpvalue = tmpAnswerDetailInfo
.getSubjectValue();
tmpTotal += tmpvalue;
if (tmpvalue != 0) {
tmpAnswerDetailMap.put(tmpId, tmpvalue);
}
}
}
if (tmpTotal > 0) {
tmpAnswerDetailMap.put("account", tmpTotal);
}
tmpAnswerDetailMap.put("answerStatus",
tmpAnswerMaster.getAnswerStatus());
tmpAnswerDetailMap.put("name", tmpAnswerMaster.getName());
tmpAnswerDetailMap.put("bedNo", tmpAnswerMaster.getBedNo());
tmpAnswerDetailMap.put("bedLabel",
tmpAnswerMaster.getBedLabel());
tmpAnswerDetailMap.put("inpNo", tmpAnswerMaster.getInpNo());
tmpAnswerDetailMap.put("patientId",
tmpAnswerMaster.getPatientId());
tmpAnswerDetailMap.put("visitId",
tmpAnswerMaster.getVisitId());
tmpAnswerDetailMap.put("sex", tmpAnswerMaster.getSex());
tmpDataList.add(tmpAnswerDetailMap);
}
List<PatientaInfo> tmpPatientInfos = patientInfoDao
.queryNameByWardCode(aWardCode, aYear, aMonth,
tmpQuestionId);
for (PatientaInfo tmpPatientInfo : tmpPatientInfos) {
Map<String, Object> tmpAnswerDetailMap = new HashMap<String, Object>();
if (tmpBoolean) {
tmpAnswerDetailMap.put("answerStatus", "AReported");
}
tmpAnswerDetailMap.put("name", tmpPatientInfo.getName());
tmpAnswerDetailMap.put("bedNo", tmpPatientInfo.getBedNo());
tmpAnswerDetailMap.put("bedLabel",
tmpPatientInfo.getBedLabel());
tmpAnswerDetailMap.put("inpNo", tmpPatientInfo.getInpNo());
tmpAnswerDetailMap.put("patientId",
tmpPatientInfo.getPatientId());
tmpAnswerDetailMap.put("visitId",
tmpPatientInfo.getVisitId());
tmpAnswerDetailMap.put("sex", tmpPatientInfo.getSex());
tmpDataList.add(tmpAnswerDetailMap);
}
tmpMap.put("gridDatas", tmpDataList);
}
} catch (Exception e) {
e.printStackTrace();
}
return tmpMap;
}
/**
*
* 功能说明:查询护理文书质量检查
*
* @Example: AnswererMasterServiceImpl.queryAnswerMaster(String,int,int)
* @param aWardCode
* :护理单元
* @param int aYear:年
* @param int aMonth:月
* @return Map<Object,Object> 查询结果
* @author: yaohang
* @DATE:2015-05-22 @TIME: 下午15:29:00
*/
@Override
public Map<Object, Object> queryAnswerMaster(String aWardCode, int aYear,
int aMonth) {
Map<Object, Object> tmpMap = new HashMap<Object, Object>();
Properties localProperties = PropertiesUtils
.readProperties("/nurseqc.properties");
String tmpQuestionId = localProperties
.getProperty("config.qualityCheck.questionid");
try {
if (tmpQuestionId != null) {
Question tmpQuestion = questionDao.queryById(tmpQuestionId);
Set<SubjectCategory> tmpSubjectCategorySet = tmpQuestion
.getSubjectCategorys()
没有合适的资源?快使用搜索试试~ 我知道了~
移动护理springMVC+maven+oracle
共306个文件
svn-base:76个
entries:38个
all-wcprops:38个
2星 需积分: 18 22 下载量 7 浏览量
2015-06-10
18:15:40
上传
评论 2
收藏 824KB RAR 举报
温馨提示
移动护理springMVC+maven+oracle,jpa注解,jdbctemplate,ztree,jqgrid,ligerUI
资源推荐
资源详情
资源评论
收起资源包目录
移动护理springMVC+maven+oracle (306个子文件)
all-wcprops 2KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 983B
all-wcprops 748B
all-wcprops 705B
all-wcprops 704B
all-wcprops 684B
all-wcprops 576B
all-wcprops 428B
all-wcprops 325B
all-wcprops 315B
all-wcprops 283B
all-wcprops 250B
all-wcprops 136B
all-wcprops 136B
all-wcprops 130B
all-wcprops 124B
all-wcprops 124B
all-wcprops 120B
all-wcprops 118B
all-wcprops 117B
all-wcprops 116B
all-wcprops 116B
all-wcprops 113B
all-wcprops 112B
all-wcprops 111B
all-wcprops 111B
all-wcprops 108B
all-wcprops 107B
all-wcprops 107B
all-wcprops 102B
all-wcprops 102B
all-wcprops 100B
all-wcprops 97B
AnswererMasterServiceImpl.class 14KB
QuestionsController.class 10KB
QuestionsDaoImpl.class 7KB
AnswererMasterDaoImpl.class 7KB
QuestionTypesServiceImpl.class 6KB
PatientInfoDaoImpl.class 6KB
QuestionsServiceImpl.class 5KB
QuestionTypesController.class 5KB
InvestigateObjectTypeController.class 4KB
InvestigatorTypeController.class 4KB
SubjectsServiceImpl.class 4KB
PatientInfoController.class 4KB
InvestigateObjectTypeServiceImpl.class 4KB
QuestionTypesDaoImpl.class 4KB
InvestigatorTypeServiceImpl.class 4KB
QualityCheckerController.class 3KB
WorksLoadController.class 3KB
QuestionsInfo.class 3KB
SatisfactoryController.class 2KB
PatientaInfo.class 2KB
PatientInfoServiceImpl.class 2KB
PatientSatisfactionServiceTest.class 1KB
Common.class 858B
PatientInfoDao.class 769B
AnswererMasterDao.class 686B
QuestionTypesService.class 647B
PatientInfoService.class 577B
QuestionsDao.class 559B
InvestigateObjectTypeService.class 525B
QuestionTypesDao.class 508B
InvestigatorTypeService.class 501B
QuestionsService.class 474B
AnswererMasterService.class 469B
SubjectsService.class 271B
.classpath 1KB
org.eclipse.wst.common.component 673B
org.eclipse.wst.jsdt.ui.superType.container 49B
jquery-ui-1.8.1.custom.css 31KB
ui.jqgrid.css 12KB
metroStyle.css 6KB
zTreeStyle.css 6KB
jquery.datepick.css 4KB
demo.css 2KB
nurseqc.css 1KB
investigator.css 661B
questionnairetype.css 661B
questionnaire.css 661B
workload.css 658B
quality.css 657B
entries 2KB
entries 2KB
entries 2KB
entries 2KB
entries 2KB
entries 1KB
entries 1KB
entries 907B
entries 901B
entries 814B
entries 809B
entries 762B
entries 741B
共 306 条
- 1
- 2
- 3
- 4
资源评论
- shensi_83122018-07-02怎么没有数据库
baidu_28161803
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功