Commit 6200f9ddd60fd7c5b17543e30cd68c3f3d6a865b

Authored by liquanyu
1 parent 63bbbb38c0

服务

Showing 11 changed files with 305 additions and 11 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IQuestionDao.java View file @ 6200f9d
  1 +package com.lyms.platform.biz.dal;
  2 +
  3 +import com.lyms.platform.pojo.QuestionModel;
  4 +
  5 +/**
  6 + * Created by Administrator on 2018-09-19.
  7 + */
  8 +public interface IQuestionDao {
  9 + QuestionModel addQuestions(QuestionModel questionModel);
  10 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/QuestionDaoImpl.java View file @ 6200f9d
  1 +package com.lyms.platform.biz.dal.impl;
  2 +
  3 +import com.lyms.platform.biz.dal.IQuestionDao;
  4 +import com.lyms.platform.common.dao.BaseMongoDAOImpl;
  5 +import com.lyms.platform.pojo.QuestionModel;
  6 +import org.springframework.stereotype.Repository;
  7 +
  8 +/**
  9 + * Created by Administrator on 2018-09-19.
  10 + */
  11 +@Repository("questionDao")
  12 +public class QuestionDaoImpl extends BaseMongoDAOImpl<QuestionModel> implements IQuestionDao {
  13 + @Override
  14 + public QuestionModel addQuestions(QuestionModel questionModel) {
  15 + return save(questionModel);
  16 + }
  17 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/QuestionService.java View file @ 6200f9d
  1 +package com.lyms.platform.biz.service;
  2 +
  3 +import com.lyms.platform.biz.dal.IQuestionDao;
  4 +import com.lyms.platform.pojo.QuestionModel;
  5 +import org.slf4j.Logger;
  6 +import org.slf4j.LoggerFactory;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +
  11 +/**
  12 + */
  13 +@Service
  14 +public class QuestionService {
  15 +
  16 + private static final Logger logger = LoggerFactory.getLogger(QuestionService.class);
  17 + @Autowired
  18 + private IQuestionDao questionDao;
  19 +
  20 +
  21 + public QuestionModel addQuestions(QuestionModel questionModel) {
  22 + return questionDao.addQuestions(questionModel);
  23 + }
  24 +}
platform-common/src/main/java/com/lyms/platform/common/enums/QuestionEnums.java View file @ 6200f9d
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +
  4 +
  5 +
  6 +/**
  7 + * 发送日期
  8 + * Created by lqy on 2016/06/27
  9 + */
  10 +public enum QuestionEnums {
  11 +
  12 +
  13 + Q1(1,"0-4(没有或极少)","在孕期,孕妇开始出现早孕反应(疲劳,乏力,嗜睡,食欲减退,恶心,呕吐等)。这些都属于怀孕期间正常的表现,通过PHQ-9的测量表的测量分数可看出您身心状体良好,请保持充足的休息,不要剧烈运动,做好孕期检查的工作。"),
  14 + Q2(2,"5-9(轻微抑郁)","孕妈妈在怀孕期间可能会出现担心胚胎的发育情况,害怕流产或没有准备好当妈妈的心理压力等情绪问题。这种担心表达了对未出生孩子的爱,但有研究表明长期的消极情绪会对胎儿造成不良影响,所以为了更好的给予爱和被孩子感受到爱,请保持良好的心情,积极乐观的看待事情,保持充足的休息,不要剧烈运动,遵医嘱来院做孕期检查。若自我调节无效果,建议及时来我院弘毅楼三楼围产医学科心理门诊预约心理咨询。"),
  15 + Q3(3,"10-14(中等程度)","孕期因体内激素分泌水平变化,身体不适的情况增加,患者的饮食及睡眠情况下降,情绪、认知也会随之受到影响。若出现这种情况,请孕妈妈明确这种情绪及认知是由身体的不适所致,此时需放松心情,及时调整心态,建议写感恩日记。若身体不适请及时来院孕检。若自我调节无效果,建议及时来我院弘毅楼三楼围产医学科心理门诊预约心理咨询。"),
  16 + Q4(4,"15-19(较严重抑郁)","亲爱的孕妈妈,根据您的测试,您目前可能会体验到高兴不起来、不愿意动、自觉脑子不好使,记不住事、思考问题困难,觉得脑子空空、变笨了等情况。建议多与家人沟通,调整心态,写感恩日记。若自我调节无效果,建议及时来我院弘毅楼三楼围产医学科心理门诊预约心理咨询。"),
  17 + Q5(5,"20-27(严重抑郁)","亲爱的孕妈妈,根据您的测试,您目前可能会有不能集中注意力,焦虑,极端易怒,睡眠不好,非常容易疲劳,或有持续的疲劳感,不停地想吃东西或者毫无食欲,对什么都不感兴趣,总是提不起精神,持续的情绪低落,想哭,情绪起伏很大,喜怒无常,经常想一些不太现实的东西等多种体验,建议您多与家人沟通,调整心态,写感恩日记。若自我调节无效果,建议及时来我院弘毅楼三楼围产医学科心理门诊预约心理咨询。");
  18 +
  19 + QuestionEnums(int id, String title, String content) {
  20 + this.id = id;
  21 + this.title = title;
  22 + this.content = content;
  23 + }
  24 +
  25 + private int id;
  26 + private String title;
  27 + private String content;
  28 +
  29 +}
platform-common/src/main/java/com/lyms/platform/common/enums/RemoteServerEnmus.java View file @ 6200f9d
... ... @@ -14,7 +14,11 @@
14 14 HY("https://area-huaiyang.healthbaby.com.cn:12356", "淮阳"),
15 15 ZC("https://area-zhucheng.healthbaby.com.cn:12356", "诸城"),
16 16 WH("https://area-weihai.healthbaby.com.cn:12356", "威海"),
17   - KF("https://area-kaifeng-api.healthbaby.com.cn:12356", "开封");
  17 +// KF("https://area-kaifeng-api.healthbaby.com.cn:12356", "开封"),
  18 + CY("https://area-changyi-api.healthbaby.com.cn:12356", "昌邑"),
  19 + XT("https://area-xtrm-api.healthbaby.com.cn:12356", "邢台人民医院系统"),
  20 + RC("https://area-rongcheng-api.healthbaby.com.cn:12356", "荣成");
  21 +
18 22  
19 23 private String address;
20 24 private String remark;
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java View file @ 6200f9d
... ... @@ -75,6 +75,7 @@
75 75 PatientCourseModel("PatientCourseModel", 92531039591L),
76 76 ModularFunctionConfigModel("ModularFunctionConfigModel", 97531039991L),
77 77 BabySieveModel("BabySieveModel", 97531049991L),
  78 + QuestionModel("QuestionModel", 97521049991L),
78 79 BabyEyeCheck("BabyEyeCheck", 97521039591L);
79 80  
80 81 private String cname;
platform-dal/src/main/java/com/lyms/platform/pojo/QuestionModel.java View file @ 6200f9d
  1 +package com.lyms.platform.pojo;
  2 +
  3 +import com.lyms.platform.beans.SerialIdEnum;
  4 +import com.lyms.platform.common.result.BaseModel;
  5 +import org.springframework.data.mongodb.core.mapping.Document;
  6 +
  7 +import java.util.Date;
  8 +import java.util.List;
  9 +import java.util.Map;
  10 +
  11 +/**
  12 + * 问卷调查
  13 + * Created by Administrator on 2018-09-19.
  14 + */
  15 +@Document(collection="lyms_question")
  16 +public class QuestionModel extends BaseModel {
  17 +
  18 + private static final long serialVersionUID = SerialIdEnum.PuerperaModel.getCid();
  19 +
  20 + private String id;
  21 +
  22 + //问题答案和题号
  23 + private List<Map<String,String>> questions;
  24 +
  25 + //分数
  26 + private int score;
  27 + //困难
  28 + private String trouble;
  29 +
  30 + //调查单位
  31 + private String investHospitalId;
  32 +
  33 + //调查员
  34 + private String investigator;
  35 + //调查日期
  36 + private Date investDate;
  37 +
  38 + private String patientId;
  39 + private String pid;
  40 +
  41 + private Date created;
  42 + private Date modified;
  43 +
  44 + public String getId() {
  45 + return id;
  46 + }
  47 +
  48 + public void setId(String id) {
  49 + this.id = id;
  50 + }
  51 +
  52 + public List<Map<String, String>> getQuestions() {
  53 + return questions;
  54 + }
  55 +
  56 + public void setQuestions(List<Map<String, String>> questions) {
  57 + this.questions = questions;
  58 + }
  59 +
  60 + public int getScore() {
  61 + return score;
  62 + }
  63 +
  64 + public void setScore(int score) {
  65 + this.score = score;
  66 + }
  67 +
  68 + public String getTrouble() {
  69 + return trouble;
  70 + }
  71 +
  72 + public void setTrouble(String trouble) {
  73 + this.trouble = trouble;
  74 + }
  75 +
  76 + public String getInvestHospitalId() {
  77 + return investHospitalId;
  78 + }
  79 +
  80 + public void setInvestHospitalId(String investHospitalId) {
  81 + this.investHospitalId = investHospitalId;
  82 + }
  83 +
  84 + public String getInvestigator() {
  85 + return investigator;
  86 + }
  87 +
  88 + public void setInvestigator(String investigator) {
  89 + this.investigator = investigator;
  90 + }
  91 +
  92 + public Date getInvestDate() {
  93 + return investDate;
  94 + }
  95 +
  96 + public void setInvestDate(Date investDate) {
  97 + this.investDate = investDate;
  98 + }
  99 +
  100 + public String getPatientId() {
  101 + return patientId;
  102 + }
  103 +
  104 + public void setPatientId(String patientId) {
  105 + this.patientId = patientId;
  106 + }
  107 +
  108 + public String getPid() {
  109 + return pid;
  110 + }
  111 +
  112 + public void setPid(String pid) {
  113 + this.pid = pid;
  114 + }
  115 +
  116 + public Date getCreated() {
  117 + return created;
  118 + }
  119 +
  120 + public void setCreated(Date created) {
  121 + this.created = created;
  122 + }
  123 +
  124 + public Date getModified() {
  125 + return modified;
  126 + }
  127 +
  128 + public void setModified(Date modified) {
  129 + this.modified = modified;
  130 + }
  131 +}
platform-dal/src/main/java/com/lyms/platform/query/CancerScreeningQuery.java View file @ 6200f9d
... ... @@ -102,13 +102,6 @@
102 102  
103 103 Criteria c = null;
104 104  
105   - if (null != createdStart && createdEnd != null) {
106   - if (null != c) {
107   - c = c.where("created").gte(createdStart).lte(createdEnd);
108   - } else {
109   - c = Criteria.where("created").gte(createdStart).lte(createdEnd);
110   - }
111   - }
112 105  
113 106 if (StringUtils.isNotEmpty(queryNo)) {
114 107 MongoCondition c1 = MongoCondition.newInstance();
... ... @@ -122,6 +115,17 @@
122 115 c = c1.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria();
123 116 }
124 117 }
  118 +
  119 +
  120 + if (null != createdStart && createdEnd != null) {
  121 + if (null != c) {
  122 + c = c.and("created").gte(createdStart).lte(createdEnd);
  123 + } else {
  124 + c = Criteria.where("created").gte(createdStart).lte(createdEnd);
  125 + }
  126 + }
  127 +
  128 +
125 129  
126 130 if (null != c) {
127 131 condition = condition.andCondition(new MongoCondition(c));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/QuestionController.java View file @ 6200f9d
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import com.lyms.platform.common.base.BaseController;
  4 +import com.lyms.platform.common.result.BaseResponse;
  5 +import com.lyms.platform.operate.web.facade.AssistBuildFacade;
  6 +import com.lyms.platform.operate.web.facade.QuestionFacade;
  7 +import com.lyms.platform.pojo.AssistBuildUserModel;
  8 +import com.lyms.platform.pojo.QuestionModel;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Controller;
  11 +import org.springframework.web.bind.annotation.*;
  12 +
  13 +import javax.servlet.http.HttpServletRequest;
  14 +import javax.validation.Valid;
  15 +
  16 +/**
  17 + * 问卷调查
  18 + * Created by Administrator on 2018-08-06.
  19 + */
  20 +@Controller
  21 +@RequestMapping("/assist")
  22 +public class QuestionController extends BaseController {
  23 +
  24 + @Autowired
  25 + private QuestionFacade questionFacade;
  26 +
  27 + /**
  28 + * 添加
  29 + * @param questionModel
  30 + * @param httpServletRequest
  31 + * @return
  32 + */
  33 + @RequestMapping(method = RequestMethod.POST, value = "/addQuestions")
  34 + @ResponseBody
  35 + public BaseResponse addQuestions(@Valid @RequestBody QuestionModel questionModel,
  36 + HttpServletRequest httpServletRequest) {
  37 + return questionFacade.addQuestions(questionModel);
  38 + }
  39 +
  40 +
  41 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java View file @ 6200f9d
... ... @@ -249,9 +249,9 @@
249 249 result.put("birthday",DateUtil.getyyyy_MM_dd(model.getBirthday()));
250 250 result.put("phone",model.getPhone());
251 251  
252   - //户籍地址
253   - String addressRegister = CommonsHelper.getResidence(model.getProvinceRegisterId(), model.getCityRegisterId(),
254   - model.getAreaRegisterId(), model.getStreetRegisterId(), model.getAddressRegister(), basicConfigService);
  252 + //居住地址
  253 + String addressRegister = CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(),
  254 + model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService);
255 255 result.put("registAddress",addressRegister);
256 256 result.put("levelType",FunvCommonUtil.getBaseicConfigByid(model.getLevelTypeId(), basicConfigService));
257 257 result.put("residentId", model.getId());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/QuestionFacade.java View file @ 6200f9d
  1 +package com.lyms.platform.operate.web.facade;
  2 +
  3 +
  4 +import com.lyms.platform.biz.service.QuestionService;
  5 +import com.lyms.platform.common.constants.ErrorCodeConstants;
  6 +import com.lyms.platform.common.result.BaseResponse;
  7 +
  8 +import com.lyms.platform.pojo.QuestionModel;
  9 +
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Component;
  12 +
  13 +
  14 +
  15 +/**
  16 + * 数据访问权限的门面 Created by Administrator on 2016/3/30 0030.
  17 + */
  18 +@Component
  19 +public class QuestionFacade {
  20 +
  21 + @Autowired
  22 + private QuestionService questionService;
  23 +
  24 + public BaseResponse addQuestions(QuestionModel questionModel) {
  25 +
  26 + QuestionModel question = questionService.addQuestions(questionModel);
  27 +
  28 + BaseResponse response = new BaseResponse();
  29 + response.setErrormsg("成功");
  30 + response.setErrorcode(ErrorCodeConstants.SUCCESS);
  31 + return response;
  32 + }
  33 +}