Commit 18e9af0117c458c2239488b4ab8a70b732262900

Authored by baohanddd

Merge remote-tracking branch 'origin/master'

Showing 20 changed files

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ISieveDao.java View file @ 18e9af0
... ... @@ -28,6 +28,14 @@
28 28 SieveResultModel findById(String id);
29 29  
30 30 /**
  31 + * 查询产筛列表
  32 + *
  33 + * @param sieveQuery
  34 + * @return
  35 + */
  36 + List<SieveResultModel> queryListSieveResult(MongoQuery sieveQuery);
  37 +
  38 + /**
31 39 * 修改数据
32 40 */
33 41 void update(MongoQuery mongoQuery, SieveResultModel sieveResultModel);
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/SieveDaoImpl.java View file @ 18e9af0
... ... @@ -64,5 +64,14 @@
64 64 Assert.notNull(sieveQuery, "execute find method query must not null.");
65 65 return mongoTemplate.find(sieveQuery.convertToMongoQuery(), SieveModel.class);
66 66 }
  67 + /**
  68 + * 查询产筛列表
  69 + *
  70 + * @param sieveQuery
  71 + * @return
  72 + */
  73 + public List<SieveResultModel> queryListSieveResult(MongoQuery sieveQuery){
  74 + return find(sieveQuery.convertToMongoQuery());
  75 + }
67 76 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/SieveService.java View file @ 18e9af0
... ... @@ -5,6 +5,7 @@
5 5 import com.lyms.platform.pojo.SieveModel;
6 6 import com.lyms.platform.pojo.SieveResultModel;
7 7 import com.lyms.platform.query.SieveQuery;
  8 +import com.lyms.platform.query.SieveResultQuery;
8 9 import org.springframework.beans.factory.annotation.Autowired;
9 10 import org.springframework.data.domain.Sort;
10 11 import org.springframework.stereotype.Service;
... ... @@ -31,7 +32,9 @@
31 32 public SieveResultModel findById(String id) {
32 33 return iSieveDao.findById(id);
33 34 }
34   -
  35 + public List<SieveResultModel> queryListSieveResult(SieveResultQuery sieveResultQuery){
  36 + return iSieveDao.queryListSieveResult(sieveResultQuery.convertToQuery());
  37 + }
35 38  
36 39 public void updateOneChanQianDiaSieve(SieveModel sieveModel) {
37 40 sieveModel.setModified(new Date());
platform-dal/src/main/java/com/lyms/platform/query/SieveResultQuery.java View file @ 18e9af0
  1 +package com.lyms.platform.query;
  2 +
  3 +import com.lyms.platform.common.base.IConvertToNativeQuery;
  4 +import com.lyms.platform.common.dao.BaseQuery;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +
  9 +import java.util.Date;
  10 +
  11 +/**
  12 + *
  13 + * 产前筛查
  14 + *
  15 + * Created by Administrator on 2016/7/5 0005.
  16 + */
  17 +public class SieveResultQuery extends BaseQuery implements IConvertToNativeQuery {
  18 +
  19 + private String id;
  20 + //患者id
  21 + private String parentId;
  22 + //姓名
  23 + private String name;
  24 + //胎数
  25 + private Integer tireNumber;
  26 + //整体风险
  27 + private Integer ztfx;
  28 + //联系方式
  29 + private String phone;
  30 + //申请孕周
  31 + private String dueWeek;
  32 + //产前诊断 1 已检查 0 未检查
  33 + private Integer cqStatus;
  34 + //产前诊断结果
  35 + private Integer cqResult;
  36 + //妊娠结局
  37 + private Integer renShenResult;
  38 + //状态
  39 + private Integer status;
  40 + private String cardNo;
  41 +
  42 + private Integer yn;
  43 +
  44 + //孕周开始
  45 + private Date dueWeekStart;
  46 + //孕周结束
  47 + private Date dueWeekEnd;
  48 +
  49 + //是否通知
  50 + private Integer isNotify;
  51 +
  52 + public Integer getIsNotify() {
  53 + return isNotify;
  54 + }
  55 +
  56 + public void setIsNotify(Integer isNotify) {
  57 + this.isNotify = isNotify;
  58 + }
  59 +
  60 + public Date getDueWeekEnd() {
  61 + return dueWeekEnd;
  62 + }
  63 +
  64 + public void setDueWeekEnd(Date dueWeekEnd) {
  65 + this.dueWeekEnd = dueWeekEnd;
  66 + }
  67 +
  68 + public Date getDueWeekStart() {
  69 + return dueWeekStart;
  70 + }
  71 +
  72 + public void setDueWeekStart(Date dueWeekStart) {
  73 + this.dueWeekStart = dueWeekStart;
  74 + }
  75 +
  76 + public Integer getStatus() {
  77 + return status;
  78 + }
  79 +
  80 + public String getCardNo() {
  81 + return cardNo;
  82 + }
  83 +
  84 + public void setCardNo(String cardNo) {
  85 + this.cardNo = cardNo;
  86 + }
  87 +
  88 + public void setStatus(Integer status) {
  89 + this.status = status;
  90 + }
  91 +
  92 + @Override
  93 + public MongoQuery convertToQuery() {
  94 + MongoCondition condition = MongoCondition.newInstance();
  95 + if (null != id) {
  96 + condition = condition.and("id", id, MongoOper.IS);
  97 + }
  98 + if (null != parentId) {
  99 + condition = condition.and("parentId", parentId, MongoOper.IS);
  100 + }
  101 + if (null != name) {
  102 + condition = condition.and("name", name, MongoOper.IS);
  103 + }
  104 + if (null != tireNumber) {
  105 + condition = condition.and("tireNumber", tireNumber, MongoOper.IS);
  106 + }
  107 + if (null != ztfx) {
  108 + condition = condition.and("ztfx", ztfx, MongoOper.IS);
  109 + }
  110 + if (null != phone) {
  111 + condition = condition.and("phone", phone, MongoOper.IS);
  112 + }
  113 + if (null != dueWeek) {
  114 + condition = condition.and("dueWeek", dueWeek, MongoOper.IS);
  115 + }
  116 + if (null != cqStatus) {
  117 + condition = condition.and("cqStatus", cqStatus, MongoOper.IS);
  118 + }
  119 +
  120 + if (null != cqResult) {
  121 + condition = condition.and("cqResult", cqResult, MongoOper.IS);
  122 + }
  123 + if (null != renShenResult) {
  124 + condition = condition.and("renShenResult", renShenResult, MongoOper.IS);
  125 + }
  126 + return condition.toMongoQuery();
  127 + }
  128 +
  129 +
  130 + public Integer getCqResult() {
  131 + return cqResult;
  132 + }
  133 +
  134 + public void setCqResult(Integer cqResult) {
  135 + this.cqResult = cqResult;
  136 + }
  137 +
  138 + public void setRenShenResult(Integer renShenResult) {
  139 + this.renShenResult = renShenResult;
  140 + }
  141 +
  142 + public Integer getCqStatus() {
  143 + return cqStatus;
  144 + }
  145 +
  146 + public void setCqStatus(Integer cqStatus) {
  147 + this.cqStatus = cqStatus;
  148 + }
  149 +
  150 +
  151 + public String getDueWeek() {
  152 + return dueWeek;
  153 + }
  154 +
  155 + public void setDueWeek(String dueWeek) {
  156 + this.dueWeek = dueWeek;
  157 + }
  158 +
  159 + public String getId() {
  160 + return id;
  161 + }
  162 +
  163 + public void setId(String id) {
  164 + this.id = id;
  165 + }
  166 +
  167 + public String getName() {
  168 + return name;
  169 + }
  170 +
  171 + public void setName(String name) {
  172 + this.name = name;
  173 + }
  174 +
  175 + public String getParentId() {
  176 + return parentId;
  177 + }
  178 +
  179 + public void setParentId(String parentId) {
  180 + this.parentId = parentId;
  181 + }
  182 +
  183 + public String getPhone() {
  184 + return phone;
  185 + }
  186 +
  187 + public void setPhone(String phone) {
  188 + this.phone = phone;
  189 + }
  190 +
  191 +
  192 +
  193 + public Integer getTireNumber() {
  194 + return tireNumber;
  195 + }
  196 +
  197 + public void setTireNumber(Integer tireNumber) {
  198 + this.tireNumber = tireNumber;
  199 + }
  200 +
  201 + public Integer getYn() {
  202 + return yn;
  203 + }
  204 +
  205 + public void setYn(Integer yn) {
  206 + this.yn = yn;
  207 + }
  208 +
  209 + public Integer getZtfx() {
  210 + return ztfx;
  211 + }
  212 +
  213 + public void setZtfx(Integer ztfx) {
  214 + this.ztfx = ztfx;
  215 + }
  216 +}
platform-dal/src/main/java/com/lyms/platform/query/SmsTemplateQuery.java View file @ 18e9af0
... ... @@ -82,6 +82,9 @@
82 82 if (null != serviceType) {
83 83 condition = condition.and("serviceType", serviceType, MongoOper.IS);
84 84 }
  85 + if (null != serviceStatus) {
  86 + condition = condition.and("serviceStatus", serviceStatus, MongoOper.IS);
  87 + }
85 88  
86 89 if (null != serviceObj) {
87 90 condition = condition.and("serviceObj", serviceObj, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java View file @ 18e9af0
... ... @@ -81,6 +81,7 @@
81 81 return babyBookbuildingFacade.queryBabyBuildById(id);
82 82 }
83 83  
  84 +
84 85 /**
85 86 * 查询儿童建档就诊卡号,母亲身份证
86 87 * @param cardNo
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java View file @ 18e9af0
... ... @@ -3,16 +3,13 @@
3 3  
4 4 import javax.validation.Valid;
5 5  
6   -import com.lyms.platform.biz.service.AntenatalExaminationService;
7 6 import com.lyms.platform.common.utils.StringUtils;
8 7 import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade;
9 8 import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
10   -import com.lyms.platform.operate.web.request.BabyManageRequest;
11 9 import org.springframework.beans.factory.annotation.Autowired;
12 10 import org.springframework.stereotype.Controller;
13 11 import org.springframework.web.bind.annotation.*;
14 12  
15   -import com.lyms.platform.biz.service.BabyBookbuildingService;
16 13 import com.lyms.platform.biz.service.YunBookbuildingService;
17 14 import com.lyms.platform.common.base.BaseController;
18 15 import com.lyms.platform.common.constants.ErrorCodeConstants;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ 18e9af0
... ... @@ -7,6 +7,7 @@
7 7 import com.lyms.platform.common.result.BaseResponse;
8 8 import com.lyms.platform.operate.web.facade.PatientFacade;
9 9 import com.lyms.platform.operate.web.facade.PuerperaManagerFacade;
  10 +import com.lyms.platform.operate.web.request.PatientQueryRequest;
10 11 import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest;
11 12 import com.lyms.platform.operate.web.request.PuerperaMatcherCommunityRequest;
12 13 import com.lyms.platform.operate.web.request.RiskPatientsQueryRequest;
... ... @@ -84,7 +85,7 @@
84 85 @RequestMapping(value = "/hPuer", method = RequestMethod.GET)
85 86 @ResponseBody
86 87 public BaseResponse queryHighRiskPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest) {
87   - return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE,1);
  88 + return patientFacade.queryHighRisk(patientsQueryRequest, Boolean.TRUE, 1);
88 89 }
89 90 /**
90 91 *全部孕妇管理
... ... @@ -96,6 +97,16 @@
96 97 @ResponseBody
97 98 public BaseResponse queryAllPuerpera(@Valid RiskPatientsQueryRequest patientsQueryRequest) {
98 99 return patientFacade.queryHighRisk(patientsQueryRequest,null,1);
  100 + }
  101 + /**
  102 + * 获取产妇基本信息
  103 + *
  104 + * @return 返回结果
  105 + */
  106 + @RequestMapping(value = "/findp", method = RequestMethod.GET)
  107 + @ResponseBody
  108 + public BaseResponse getPatent(@Valid PatientQueryRequest request){
  109 + return patientFacade.findPatient(request);
99 110 }
100 111  
101 112 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java View file @ 18e9af0
... ... @@ -13,10 +13,7 @@
13 13 import com.lyms.platform.operate.web.request.SieveAddRequest;
14 14 import org.springframework.beans.factory.annotation.Autowired;
15 15 import org.springframework.stereotype.Controller;
16   -import org.springframework.web.bind.annotation.RequestBody;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
19   -import org.springframework.web.bind.annotation.ResponseBody;
  16 +import org.springframework.web.bind.annotation.*;
20 17  
21 18 import javax.validation.Valid;
22 19 import java.util.ArrayList;
23 20  
... ... @@ -46,7 +43,19 @@
46 43 return sieveFacade.addOneSieve(sieveAddRequest);
47 44 }
48 45  
  46 +
49 47 /**
  48 + * 获取一条产筛结果记录
  49 + *
  50 + * @param parentId
  51 + * @return
  52 + */
  53 + @ResponseBody
  54 + @RequestMapping(value = "/sieves",method = RequestMethod.GET)
  55 + public BaseResponse getOneSieve(@RequestParam("parentId")String parentId) {
  56 + return sieveFacade.getOneSieve(parentId);
  57 + }
  58 + /**
50 59 * 产前诊断
51 60 *
52 61 * @param chanQianDiaAddRequest
53 62  
... ... @@ -58,7 +67,19 @@
58 67 return sieveFacade.addOneChanQianDiaSieve(chanQianDiaAddRequest);
59 68 }
60 69  
  70 + /**
  71 + * 产前诊断
  72 + *
  73 + * @return
  74 + */
61 75 @ResponseBody
  76 + @RequestMapping(value = "/cqsieve",method = RequestMethod.GET)
  77 + public BaseResponse getOneChanQianDiaSieve(@RequestParam("id")String id) {
  78 + return sieveFacade.getOneChanQianDiaSieve(id);
  79 + }
  80 +
  81 +
  82 + @ResponseBody
62 83 @RequestMapping(value = "/cqsieve/enums",method = RequestMethod.GET)
63 84 public BaseResponse getEnums(){
64 85 Map<String, Object> map = new HashMap<>();
... ... @@ -131,7 +152,7 @@
131 152 * @return
132 153 */
133 154 @ResponseBody
134   - @RequestMapping(value = "/cqsieve",method = RequestMethod.GET)
  155 + @RequestMapping(value = "/cqsieves",method = RequestMethod.GET)
135 156 public BaseResponse queryChanQianSieve(@Valid CqSieveQueryRequest cqSieveQueryRequest){
136 157 return sieveFacade.queryList(cqSieveQueryRequest);
137 158 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 18e9af0
... ... @@ -389,7 +389,7 @@
389 389 return new BaseObjectResponse().setData(object).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
390 390 }
391 391  
392   - private List queryRisk(List<String> id) {
  392 + public List queryRisk(List<String> id) {
393 393 BasicConfigQuery
394 394 basicConfigQuery = new BasicConfigQuery();
395 395 List data = new ArrayList();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java View file @ 18e9af0
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.lyms.platform.biz.service.ApplyOrderService;
4 4 import com.lyms.platform.biz.service.PatientsService;
  5 +import com.lyms.platform.biz.service.SieveService;
5 6 import com.lyms.platform.common.constants.ErrorCodeConstants;
6 7 import com.lyms.platform.common.enums.YnEnums;
7 8 import com.lyms.platform.common.result.BaseListResponse;
8 9  
9 10  
... ... @@ -14,12 +15,16 @@
14 15 import com.lyms.platform.operate.web.result.ApplyOrderOutResult;
15 16 import com.lyms.platform.operate.web.result.ReferralApplyOrderResult;
16 17 import com.lyms.platform.operate.web.result.SieveApplyOrderResult;
  18 +import com.lyms.platform.permission.model.Organization;
  19 +import com.lyms.platform.permission.service.OrganizationService;
17 20 import com.lyms.platform.pojo.Patients;
18 21 import com.lyms.platform.pojo.ReferralApplyOrderModel;
19 22 import com.lyms.platform.pojo.SieveApplyOrderModel;
  23 +import com.lyms.platform.pojo.SieveModel;
20 24 import com.lyms.platform.query.PatientsQuery;
21 25 import com.lyms.platform.query.ReferralApplyOrderQuery;
22 26 import com.lyms.platform.query.SieveApplyOrderQuery;
  27 +import com.lyms.platform.query.SieveQuery;
23 28 import org.apache.commons.collections.CollectionUtils;
24 29 import org.springframework.beans.factory.annotation.Autowired;
25 30 import org.springframework.stereotype.Component;
... ... @@ -39,6 +44,10 @@
39 44 private AutoMatchFacade autoMatchFacade;
40 45 @Autowired
41 46 private BasicConfigFacade basicConfigFacade;
  47 + @Autowired
  48 + private SieveService sieveService;
  49 + @Autowired
  50 + private OrganizationService organizationService;
42 51  
43 52 /**
44 53 * 增加转诊申请
... ... @@ -83,6 +92,15 @@
83 92 SieveApplyOrderModel sieveApplyOrderModel = sieveApplyOrderAddRequest.convertToDataModel();
84 93 sieveApplyOrderModel.setCreated(new Date());
85 94 applyOrderService.addOneSieveApplyOrder(sieveApplyOrderModel);
  95 + SieveQuery sieveQuery=new SieveQuery();
  96 + sieveQuery.setYn(YnEnums.YES.getId());
  97 + sieveQuery.setParentId(sieveApplyOrderAddRequest.getParentId());
  98 + List<SieveModel> sieveModels= sieveService.queryList(sieveQuery);
  99 + if(CollectionUtils.isNotEmpty(sieveModels)){
  100 + SieveModel sieveModel = sieveModels.get(0);
  101 + sieveModel.setStatus(2);
  102 + sieveService.updateOneChanQianDiaSieve(sieveModel);
  103 + }
86 104 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
87 105 }
88 106  
... ... @@ -96,9 +114,20 @@
96 114 ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery();
97 115 referralApplyOrderQuery.setId(id);
98 116 List<ReferralApplyOrderModel> list = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery);
99   - ReferralApplyOrderResult referralApplyOrderResult=new ReferralApplyOrderResult();
100   - if(CollectionUtils.isNotEmpty(list)){
101   - referralApplyOrderResult.convertToResult(list.get(0));
  117 + ReferralApplyOrderResult referralApplyOrderResult = new ReferralApplyOrderResult();
  118 + if (CollectionUtils.isNotEmpty(list)) {
  119 + Patients patients = patientsService.findOnePatientById(list.get(0).getParentId());
  120 + String zhuanchu =list.get(0).getOutHospitalId();
  121 + Organization zhuanc =organizationService.getOrganization(Integer.valueOf(zhuanchu));
  122 + String zhuanCName=""; String zhuanRname="";
  123 + if(null!=zhuanc){
  124 + zhuanCName= zhuanc.getName();
  125 + }
  126 + Organization zhuanc1 =organizationService.getOrganization(Integer.valueOf(zhuanchu));
  127 + if(null!=zhuanc1){
  128 + zhuanRname =zhuanc1.getName();
  129 + }
  130 + referralApplyOrderResult.convertToResult(list.get(0), patients,zhuanCName,zhuanRname);
102 131 }
103 132 return new BaseObjectResponse().setData(referralApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
104 133 }
... ... @@ -118,8 +147,8 @@
118 147 SieveApplyOrderModel sieveApplyOrderModel = null;
119 148 if (CollectionUtils.isNotEmpty(list)) {
120 149 sieveApplyOrderModel = list.get(0);
121   - Patients patients =patientsService.findOnePatientById(sieveApplyOrderModel.getParentId());
122   - sieveApplyOrderResult.convertToResult(sieveApplyOrderModel,patients);
  150 + Patients patients = patientsService.findOnePatientById(sieveApplyOrderModel.getParentId());
  151 + sieveApplyOrderResult.convertToResult(sieveApplyOrderModel, patients);
123 152 }
124 153 return new BaseObjectResponse().setData(sieveApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
125 154 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 18e9af0
... ... @@ -8,14 +8,9 @@
8 8 import com.lyms.platform.common.result.BaseResponse;
9 9 import com.lyms.platform.common.utils.Assert;
10 10 import com.lyms.platform.common.utils.DateUtil;
11   -import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest;
12   -import com.lyms.platform.operate.web.request.PuerperaManagerUpdateRequest;
13   -import com.lyms.platform.operate.web.request.PuerperaMatcherCommunityRequest;
14   -import com.lyms.platform.operate.web.request.RiskPatientsQueryRequest;
15   -import com.lyms.platform.operate.web.result.PuerperaResult;
16   -import com.lyms.platform.operate.web.result.QuanChanResult;
17   -import com.lyms.platform.operate.web.result.QuanPatientsResult;
18   -import com.lyms.platform.operate.web.result.RiskPatientsResult;
  11 +import com.lyms.platform.common.utils.JsonUtil;
  12 +import com.lyms.platform.operate.web.request.*;
  13 +import com.lyms.platform.operate.web.result.*;
19 14 import com.lyms.platform.operate.web.utils.CommonsHelper;
20 15 import com.lyms.platform.pojo.BabyModel;
21 16 import com.lyms.platform.pojo.CommunityConfig;
... ... @@ -53,6 +48,8 @@
53 48 private AutoMatchFacade autoMatchFacade;
54 49 @Autowired
55 50 private AntenatalExaminationService antExService;
  51 + @Autowired
  52 + private AntenatalExaminationFacade antenatalExaminationFacade;
56 53  
57 54 /**
58 55 * 修改产妇的社区
... ... @@ -224,6 +221,22 @@
224 221 return new BaseObjectResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(data);
225 222 }
226 223  
  224 + public BaseResponse findPatient(PatientQueryRequest patientQueryRequest){
  225 + PatientsQuery patientsQuery=new PatientsQuery();
  226 +
  227 + patientsQuery.setId(patientQueryRequest.getId());
  228 + patientsQuery.setPhone(patientQueryRequest.getPhone());
  229 + patientsQuery.setCardNo(patientQueryRequest.getCardNo());
  230 + Patients patients= patientsService.findOnePatientByCardNo(patientsQuery);
  231 + PatientBaseResult patientBaseResult=new PatientBaseResult();
  232 + if(null!=patients){
  233 + patientBaseResult.convert(patients);
  234 + }
  235 + try {
  236 + patientBaseResult.setRiskFactor(antenatalExaminationFacade.queryRisk(patients.getFirstRiskFactorId()));
  237 + }catch (Exception e){}
  238 + return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS);
  239 + }
227 240 /**
228 241 * 转成全部产妇的返回数据
229 242 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 18e9af0
1 1 package com.lyms.platform.operate.web.facade;
2 2  
  3 +import com.lyms.platform.biz.service.PatientsService;
3 4 import com.lyms.platform.biz.service.SieveService;
4 5 import com.lyms.platform.common.constants.ErrorCodeConstants;
5 6 import com.lyms.platform.common.enums.YnEnums;
6 7 import com.lyms.platform.common.result.BaseListResponse;
  8 +import com.lyms.platform.common.result.BaseObjectResponse;
7 9 import com.lyms.platform.common.result.BaseResponse;
8 10 import com.lyms.platform.common.utils.DateUtil;
9 11 import com.lyms.platform.operate.web.request.ChanQianDiaAddRequest;
10 12 import com.lyms.platform.operate.web.request.CqSieveQueryRequest;
11 13 import com.lyms.platform.operate.web.request.SieveAddRequest;
  14 +import com.lyms.platform.operate.web.result.SieveDetailResult;
12 15 import com.lyms.platform.operate.web.result.SieveListResult;
  16 +import com.lyms.platform.operate.web.result.SieveResult;
  17 +import com.lyms.platform.pojo.Patients;
13 18 import com.lyms.platform.pojo.SieveModel;
  19 +import com.lyms.platform.pojo.SieveResultModel;
14 20 import com.lyms.platform.query.SieveQuery;
  21 +import com.lyms.platform.query.SieveResultQuery;
15 22 import org.apache.commons.collections.CollectionUtils;
16 23 import org.springframework.beans.factory.annotation.Autowired;
17 24 import org.springframework.stereotype.Component;
... ... @@ -28,6 +35,8 @@
28 35 public class SieveFacade {
29 36 @Autowired
30 37 private SieveService sieveService;
  38 + @Autowired
  39 + private PatientsService patientsService;
31 40  
32 41 /**
33 42 * 增加一条产筛结果记录
34 43  
35 44  
36 45  
... ... @@ -36,10 +45,47 @@
36 45 * @return
37 46 */
38 47 public BaseResponse addOneSieve(SieveAddRequest sieveAddRequest) {
  48 +
39 49 sieveService.addSieve(sieveAddRequest.convertToDataModel());
  50 + SieveQuery sieveQuery=new SieveQuery();
  51 + sieveQuery.setParentId(sieveAddRequest.getParentId());
  52 + List<SieveModel> list = sieveService.queryList(sieveQuery);
  53 + SieveModel sieveModel=new SieveModel();
  54 + sieveModel.setStatus(3);
  55 + sieveModel.setId(list.get(0).getId());
  56 + sieveService.updateOneChanQianDiaSieve(sieveModel);
40 57 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
41 58 }
  59 + //产筛结果
  60 + public BaseResponse getOneSieve(String parentId){
  61 + SieveResultQuery sieveResultQuery=new SieveResultQuery();
  62 + sieveResultQuery.setParentId(parentId);
  63 + List<SieveResultModel> sb= sieveService.queryListSieveResult(sieveResultQuery);
  64 + SieveResult sieveResult=new SieveResult();
  65 + if(CollectionUtils.isNotEmpty(sb)){
  66 + SieveResultModel sieveResultModel=sb.get(0);
  67 + Patients patients= patientsService.findOnePatientById(sieveResultModel.getParentId());
  68 + sieveResult.convert(sieveResultModel,patients);
  69 + }
  70 + return new BaseObjectResponse().setData(sieveResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  71 + }
  72 + //产前诊断结果
  73 + public BaseResponse getOneChanQianDiaSieve(String id){
  74 + SieveQuery sieveQuery=new SieveQuery();
  75 + sieveQuery.setYn(YnEnums.YES.getId());
  76 + sieveQuery.setId(id);
  77 + List<SieveModel> sieveModels = sieveService.queryList(sieveQuery);
  78 + SieveDetailResult sieveDetailResult=new SieveDetailResult();
42 79  
  80 + if(CollectionUtils.isNotEmpty(sieveModels)){
  81 + SieveModel sieveModel= sieveModels.get(0);
  82 + Patients patients= patientsService.findOnePatientById(sieveModel.getParentId());
  83 + sieveDetailResult.convert(sieveModel,patients);
  84 +
  85 + }
  86 + return new BaseObjectResponse().setData(sieveDetailResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS);
  87 + }
  88 +
43 89 /**
44 90 * 产前诊断
45 91 *
... ... @@ -54,6 +100,7 @@
54 100 sieveModel.setDiaUnit(chanQianDiaAddRequest.getDiaUnit());
55 101 sieveModel.setCqResult(chanQianDiaAddRequest.getDiaresult());
56 102 sieveModel.setRenShenResult(chanQianDiaAddRequest.getPregnancyOutcome());
  103 + sieveModel.setStatus(4);
57 104 sieveService.updateOneChanQianDiaSieve(sieveModel);
58 105 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
59 106 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java View file @ 18e9af0
... ... @@ -154,7 +154,7 @@
154 154  
155 155 SmsTemplateQuery query = new SmsTemplateQuery();
156 156 query.setYn(YnEnums.YES.getId());
157   - query.setNeed("1");
  157 + query.setNeed("true");
158 158 query.setLimit(request.getLimit());
159 159 query.setPage(request.getPage());
160 160 query.setSmsType(request.getSmsType());
... ... @@ -162,6 +162,7 @@
162 162 query.setServiceType(request.getServiceType());
163 163 query.setContent(request.getContent());
164 164 query.setServiceObj(request.getServiceObj());
  165 + query.setHospitalId(request.getHospitalId());
165 166 if (request.getServiceObj() != null && request.getServiceObj() == 0)
166 167 {
167 168 //查询全部
... ... @@ -179,7 +180,7 @@
179 180  
180 181 if (request.getServiceStatus() != null && (request.getServiceStatus() == 101 || request.getServiceStatus() == 102 || request.getServiceStatus() == 103))
181 182 {
182   - query.setServiceType(null);
  183 + query.setServiceStatus(null);
183 184 }
184 185  
185 186 List<SmsTemplateModel> templates = smsTemplateService.querySmsTemplates(query);
186 187  
... ... @@ -208,8 +209,10 @@
208 209  
209 210 String dateRange = temp.getStart() == null ? "" : (temp.getStart() + " "+ temp.getEnd());
210 211  
  212 + String date = temp.getSendDate() == null ? "" : DateUtil.getyyyy_MM_dd(temp.getSendDate());
  213 +
211 214 String splDate = temp.getSpecialDateType() == null ? "" : SpecialDateEnums.getNameById(temp.getSpecialDateType());
212   - String str = SendFrequencyEnums.getNameById(temp.getSendFrequency())+ " " + sendDate+" "+splDate+ " " +dateRange;
  215 + String str = SendFrequencyEnums.getNameById(temp.getSendFrequency())+ " " + sendDate +" "+ date+" "+splDate+ " " +dateRange;
213 216  
214 217  
215 218  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChanQianDiaAddRequest.java View file @ 18e9af0
... ... @@ -10,8 +10,8 @@
10 10 */
11 11 @Form
12 12 public class ChanQianDiaAddRequest {
13   - @NotEmpty
14 13 private String id;
  14 + private String parentId;
15 15 @FormParam
16 16 private String diaTime;// 诊断时间
17 17 @FormParam
... ... @@ -22,6 +22,14 @@
22 22 private Integer pregnancyOutcome;// 妊娠结局
23 23 @FormParam
24 24 private String publishName;// 录入人员;
  25 +
  26 + public String getParentId() {
  27 + return parentId;
  28 + }
  29 +
  30 + public void setParentId(String parentId) {
  31 + this.parentId = parentId;
  32 + }
25 33  
26 34 public String getDiaTime() {
27 35 return diaTime;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientQueryRequest.java View file @ 18e9af0
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +/**
  4 + * Created by Administrator on 2016/7/10 0010.
  5 + */
  6 +public class PatientQueryRequest {
  7 + private String id;
  8 + private String phone;
  9 + private String cardNo;
  10 +
  11 + public String getCardNo() {
  12 + return cardNo;
  13 + }
  14 +
  15 + public void setCardNo(String cardNo) {
  16 + this.cardNo = cardNo;
  17 + }
  18 +
  19 + public String getId() {
  20 + return id;
  21 + }
  22 +
  23 + public void setId(String id) {
  24 + this.id = id;
  25 + }
  26 +
  27 + public String getPhone() {
  28 + return phone;
  29 + }
  30 +
  31 + public void setPhone(String phone) {
  32 + this.phone = phone;
  33 + }
  34 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java View file @ 18e9af0
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.utils.DateUtil;
  4 +import com.lyms.platform.pojo.Patients;
  5 +
  6 +import java.util.Date;
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * Created by Administrator on 2016/7/10 0010.
  11 + */
  12 +public class PatientBaseResult {
  13 + private String id;
  14 + //名字
  15 + private String name;
  16 + //年龄
  17 + private Integer age;
  18 + //孕周
  19 + private String dueWeek;
  20 + //预产期
  21 + private String yChanQi;
  22 + //手机号
  23 + private String phone;
  24 + //高危因素
  25 + private List riskFactor;
  26 + //高危评分
  27 + private String riskScore;
  28 + //备注
  29 + private String remarks;
  30 + //末次月经
  31 + private String lastMenses;
  32 +
  33 + public Integer getAge() {
  34 + return age;
  35 + }
  36 +
  37 + public void setAge(Integer age) {
  38 + this.age = age;
  39 + }
  40 +
  41 + public String getDueWeek() {
  42 + return dueWeek;
  43 + }
  44 +
  45 + public void setDueWeek(String dueWeek) {
  46 + this.dueWeek = dueWeek;
  47 + }
  48 +
  49 + public String getId() {
  50 + return id;
  51 + }
  52 +
  53 + public void setId(String id) {
  54 + this.id = id;
  55 + }
  56 +
  57 + public String getLastMenses() {
  58 + return lastMenses;
  59 + }
  60 +
  61 + public void setLastMenses(String lastMenses) {
  62 + this.lastMenses = lastMenses;
  63 + }
  64 +
  65 + public String getName() {
  66 + return name;
  67 + }
  68 +
  69 + public void setName(String name) {
  70 + this.name = name;
  71 + }
  72 +
  73 + public String getPhone() {
  74 + return phone;
  75 + }
  76 +
  77 + public void setPhone(String phone) {
  78 + this.phone = phone;
  79 + }
  80 +
  81 + public String getRemarks() {
  82 + return remarks;
  83 + }
  84 +
  85 + public void setRemarks(String remarks) {
  86 + this.remarks = remarks;
  87 + }
  88 +
  89 + public List getRiskFactor() {
  90 + return riskFactor;
  91 + }
  92 +
  93 + public void setRiskFactor(List riskFactor) {
  94 + this.riskFactor = riskFactor;
  95 + }
  96 +
  97 + public String getRiskScore() {
  98 + return riskScore;
  99 + }
  100 +
  101 + public void setRiskScore(String riskScore) {
  102 + this.riskScore = riskScore;
  103 + }
  104 +
  105 + public String getyChanQi() {
  106 + return yChanQi;
  107 + }
  108 +
  109 + public void setyChanQi(String yChanQi) {
  110 + this.yChanQi = yChanQi;
  111 + }
  112 + public PatientBaseResult convert(Patients patients){
  113 + setId(patients.getId());
  114 + try {
  115 + if(null!=patients.getBirth()){
  116 + setAge(DateUtil.getAge(patients.getBirth()));
  117 + }
  118 + }catch (Exception e){
  119 + }
  120 + setName(patients.getUsername());
  121 + setPhone(patients.getPhone());
  122 + setRemarks(patients.getMremark());
  123 + setRiskScore("60");
  124 +
  125 + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date());
  126 + String week= (days/7)+"";
  127 + int day = (days%7);
  128 + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
  129 + if(null!=patients.getLastMenses()){
  130 + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
  131 + }
  132 + return this;
  133 + }
  134 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java View file @ 18e9af0
1 1 package com.lyms.platform.operate.web.result;
2 2  
3   -import com.lyms.platform.common.base.IBasicResultConvert;
4 3 import com.lyms.platform.common.utils.DateUtil;
  4 +import com.lyms.platform.pojo.Patients;
5 5 import com.lyms.platform.pojo.ReferralApplyOrderModel;
6   -import com.lyms.platform.pojo.SieveApplyOrderModel;
7 6  
8 7 import java.util.Date;
9 8 import java.util.List;
... ... @@ -11,8 +10,20 @@
11 10 /**
12 11 * Created by Administrator on 2016/7/7 0007.
13 12 */
14   -public class ReferralApplyOrderResult implements IBasicResultConvert<ReferralApplyOrderResult, ReferralApplyOrderModel> {
15   -
  13 +public class ReferralApplyOrderResult {
  14 + //年龄
  15 + //预产期
  16 + private String yChanQi;
  17 + //手机号
  18 + private String phone;
  19 + //高危因素
  20 + private List riskFactor;
  21 + //高危评分
  22 + private String riskScore;
  23 + //备注
  24 + private String remarks;
  25 + //末次月经
  26 + private String lastMenses;
16 27 private String id;
17 28 //患者id
18 29 private String parentId;
19 30  
... ... @@ -49,7 +60,27 @@
49 60 private String transferMode;
50 61 //申请医生
51 62 private String applyDoctor;
  63 + //转出医院
  64 + private String zhuanCName;
  65 + //转入医院
  66 + private String zhuanRname;
52 67  
  68 + public String getZhuanCName() {
  69 + return zhuanCName;
  70 + }
  71 +
  72 + public void setZhuanCName(String zhuanCName) {
  73 + this.zhuanCName = zhuanCName;
  74 + }
  75 +
  76 + public String getZhuanRname() {
  77 + return zhuanRname;
  78 + }
  79 +
  80 + public void setZhuanRname(String zhuanRname) {
  81 + this.zhuanRname = zhuanRname;
  82 + }
  83 +
53 84 public Integer getAge() {
54 85 return age;
55 86 }
... ... @@ -194,8 +225,7 @@
194 225 this.transferredHospital = transferredHospital;
195 226 }
196 227  
197   - @Override
198   - public ReferralApplyOrderResult convertToResult(ReferralApplyOrderModel destModel) {
  228 + public ReferralApplyOrderResult convertToResult(ReferralApplyOrderModel destModel,Patients patients,String zhuanCName ,String zhuanRname) {
199 229 setId(destModel.getId());
200 230 setParentId(destModel.getParentId());
201 231 setName(destModel.getName());
202 232  
... ... @@ -210,7 +240,79 @@
210 240 setPotentialRisk(destModel.getPotentialRisk());
211 241 setTransferMode(destModel.getTransferMode());
212 242 setApplyDoctor(destModel.getApplyDoctor());
  243 + setTransferredHospital(destModel.getTransferredHospital());
  244 + setZhuanCName(zhuanCName);
  245 + setZhuanRname(zhuanRname);
  246 + if(null!=patients){
  247 + setName(patients.getUsername());
  248 + setPhone(patients.getPhone());
  249 + setRemarks(patients.getMremark());
  250 + setRiskScore("60");
  251 +
  252 + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date());
  253 + String week= (days/7)+"";
  254 + int day = (days%7);
  255 + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
  256 + if(null!=patients.getLastMenses()){
  257 + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
  258 + }
  259 + try {
  260 + if(null!=patients.getBirth()){
  261 + setAge(DateUtil.getAge(patients.getBirth()));
  262 + }
  263 + }catch (Exception e){
  264 + }
  265 + }
  266 +
213 267 return this;
  268 + }
  269 +
  270 + public String getLastMenses() {
  271 + return lastMenses;
  272 + }
  273 +
  274 + public void setLastMenses(String lastMenses) {
  275 + this.lastMenses = lastMenses;
  276 + }
  277 +
  278 + public String getPhone() {
  279 + return phone;
  280 + }
  281 +
  282 + public void setPhone(String phone) {
  283 + this.phone = phone;
  284 + }
  285 +
  286 + public String getRemarks() {
  287 + return remarks;
  288 + }
  289 +
  290 + public void setRemarks(String remarks) {
  291 + this.remarks = remarks;
  292 + }
  293 +
  294 + public List getRiskFactor() {
  295 + return riskFactor;
  296 + }
  297 +
  298 + public void setRiskFactor(List riskFactor) {
  299 + this.riskFactor = riskFactor;
  300 + }
  301 +
  302 + public String getRiskScore() {
  303 + return riskScore;
  304 + }
  305 +
  306 + public void setRiskScore(String riskScore) {
  307 + this.riskScore = riskScore;
  308 + }
  309 +
  310 + public String getyChanQi() {
  311 + return yChanQi;
  312 + }
  313 +
  314 + public void setyChanQi(String yChanQi) {
  315 + this.yChanQi = yChanQi;
214 316 }
215 317 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveDetailResult.java View file @ 18e9af0
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.enums.ChanQResultEnums;
  4 +import com.lyms.platform.common.enums.RenShenJieJuEnums;
  5 +import com.lyms.platform.common.utils.DateUtil;
  6 +import com.lyms.platform.pojo.Patients;
  7 +import com.lyms.platform.pojo.SieveModel;
  8 +
  9 +import java.util.Date;
  10 +import java.util.List;
  11 +
  12 +/**
  13 + *产前诊断结果
  14 + *
  15 + * Created by Administrator on 2016/7/8 0008.
  16 + */
  17 +public class SieveDetailResult {
  18 + private String id;
  19 + private String parentId;
  20 + //名字
  21 + private String name;
  22 + //年龄
  23 + private Integer age;
  24 + //孕周
  25 + private String dueWeek;
  26 + //预产期
  27 + private String yChanQi;
  28 + //手机号
  29 + private String phone;
  30 + //高危因素
  31 + private List riskFactor;
  32 + //高危评分
  33 + private String riskScore;
  34 + //备注
  35 + private String remarks;
  36 + //末次月经
  37 + private String lastMenses;
  38 + //产前诊断结果
  39 + private Integer diaresult;
  40 +
  41 + private String diaresultText;
  42 + //妊娠结局
  43 + private Integer pregnancyOutcome;
  44 +
  45 + private String pregnancyOutcomeText;
  46 + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊
  47 + private Integer status;
  48 +
  49 + // 诊断时间
  50 + private String diaTime;
  51 + //诊断单位
  52 + private String diaUnit;
  53 + //录入人员
  54 + private String publishName;
  55 +
  56 + public Integer getDiaresult() {
  57 + return diaresult;
  58 + }
  59 +
  60 + public void setDiaresult(Integer diaresult) {
  61 + this.diaresult = diaresult;
  62 + }
  63 +
  64 + public String getDiaresultText() {
  65 + return diaresultText;
  66 + }
  67 +
  68 + public void setDiaresultText(String diaresultText) {
  69 + this.diaresultText = diaresultText;
  70 + }
  71 +
  72 + public String getId() {
  73 + return id;
  74 + }
  75 +
  76 + public void setId(String id) {
  77 + this.id = id;
  78 + }
  79 +
  80 + public String getParentId() {
  81 + return parentId;
  82 + }
  83 +
  84 + public void setParentId(String parentId) {
  85 + this.parentId = parentId;
  86 + }
  87 +
  88 + public Integer getPregnancyOutcome() {
  89 + return pregnancyOutcome;
  90 + }
  91 +
  92 + public void setPregnancyOutcome(Integer pregnancyOutcome) {
  93 + this.pregnancyOutcome = pregnancyOutcome;
  94 + }
  95 +
  96 + public String getPregnancyOutcomeText() {
  97 + return pregnancyOutcomeText;
  98 + }
  99 +
  100 + public void setPregnancyOutcomeText(String pregnancyOutcomeText) {
  101 + this.pregnancyOutcomeText = pregnancyOutcomeText;
  102 + }
  103 +
  104 + public Integer getAge() {
  105 + return age;
  106 + }
  107 +
  108 + public void setAge(Integer age) {
  109 + this.age = age;
  110 + }
  111 +
  112 +
  113 + public String getDiaTime() {
  114 + return diaTime;
  115 + }
  116 +
  117 + public void setDiaTime(String diaTime) {
  118 + this.diaTime = diaTime;
  119 + }
  120 +
  121 + public String getDiaUnit() {
  122 + return diaUnit;
  123 + }
  124 +
  125 + public void setDiaUnit(String diaUnit) {
  126 + this.diaUnit = diaUnit;
  127 + }
  128 +
  129 + public String getDueWeek() {
  130 + return dueWeek;
  131 + }
  132 +
  133 + public void setDueWeek(String dueWeek) {
  134 + this.dueWeek = dueWeek;
  135 + }
  136 +
  137 + public String getLastMenses() {
  138 + return lastMenses;
  139 + }
  140 +
  141 + public void setLastMenses(String lastMenses) {
  142 + this.lastMenses = lastMenses;
  143 + }
  144 +
  145 + public String getName() {
  146 + return name;
  147 + }
  148 +
  149 + public void setName(String name) {
  150 + this.name = name;
  151 + }
  152 +
  153 + public String getPhone() {
  154 + return phone;
  155 + }
  156 +
  157 + public void setPhone(String phone) {
  158 + this.phone = phone;
  159 + }
  160 +
  161 + public String getPublishName() {
  162 + return publishName;
  163 + }
  164 +
  165 + public void setPublishName(String publishName) {
  166 + this.publishName = publishName;
  167 + }
  168 +
  169 + public String getRemarks() {
  170 + return remarks;
  171 + }
  172 +
  173 + public void setRemarks(String remarks) {
  174 + this.remarks = remarks;
  175 + }
  176 +
  177 +
  178 + public List getRiskFactor() {
  179 + return riskFactor;
  180 + }
  181 +
  182 + public void setRiskFactor(List riskFactor) {
  183 + this.riskFactor = riskFactor;
  184 + }
  185 +
  186 + public String getRiskScore() {
  187 + return riskScore;
  188 + }
  189 +
  190 + public void setRiskScore(String riskScore) {
  191 + this.riskScore = riskScore;
  192 + }
  193 +
  194 + public Integer getStatus() {
  195 + return status;
  196 + }
  197 +
  198 + public void setStatus(Integer status) {
  199 + this.status = status;
  200 + }
  201 +
  202 + public String getyChanQi() {
  203 + return yChanQi;
  204 + }
  205 +
  206 + public void setyChanQi(String yChanQi) {
  207 + this.yChanQi = yChanQi;
  208 + }
  209 +
  210 + public SieveDetailResult convert(SieveModel sieveModel,Patients patients) {
  211 + try {
  212 + if(null!=patients.getBirth()){
  213 + setAge(DateUtil.getAge(patients.getBirth()));
  214 + }
  215 + }catch (Exception e){
  216 + }
  217 + setName(patients.getUsername());
  218 + setPhone(patients.getPhone());
  219 + setRemarks(patients.getMremark());
  220 + setRiskScore("60");
  221 +
  222 + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date());
  223 + String week= (days/7)+"";
  224 + int day = (days%7);
  225 + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
  226 + if(null!=patients.getLastMenses()){
  227 + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
  228 + }
  229 + /* //产前诊断结果
  230 + private Integer cqResult;
  231 + //妊娠结局
  232 + private Integer renShenResult;
  233 + //1 待产筛 2 产筛中 3 完成产筛 4 完成产诊
  234 + private Integer status;
  235 +
  236 + // 诊断时间
  237 + private String diaTime;
  238 + //诊断单位
  239 + private String diaUnit;
  240 + //录入人员
  241 + private String publishName;*/
  242 + setId(sieveModel.getId());
  243 + setParentId(sieveModel.getParentId());
  244 + setDiaresult(sieveModel.getCqResult());
  245 + if(null!=sieveModel.getCqResult()){
  246 + setDiaresultText(ChanQResultEnums.getTitle(sieveModel.getCqResult()));
  247 + }
  248 + setPregnancyOutcome(sieveModel.getRenShenResult());
  249 + if(null!=sieveModel.getRenShenResult()){
  250 + setPregnancyOutcomeText(RenShenJieJuEnums.getTitle(sieveModel.getRenShenResult()));
  251 + }
  252 + setStatus(sieveModel.getStatus());
  253 + setDiaTime(sieveModel.getDiaTime());
  254 + setDiaUnit(sieveModel.getDiaUnit());
  255 + setPublishName(sieveModel.getPublishName());
  256 + return this;
  257 + }
  258 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveResult.java View file @ 18e9af0
  1 +package com.lyms.platform.operate.web.result;
  2 +
  3 +import com.lyms.platform.common.utils.DateUtil;
  4 +import com.lyms.platform.pojo.Patients;
  5 +import com.lyms.platform.pojo.SieveResultModel;
  6 +
  7 +import java.util.Date;
  8 +import java.util.List;
  9 +
  10 +/**
  11 + *
  12 + * 产前诊断结果
  13 + *
  14 + * Created by Administrator on 2016/7/8 0008.
  15 + */
  16 +public class SieveResult {
  17 +
  18 +
  19 +
  20 + //名字
  21 + private String name;
  22 + //年龄
  23 + private Integer age;
  24 + //孕周
  25 + private String dueWeek;
  26 + //预产期
  27 + private String yChanQi;
  28 + //手机号
  29 + private String phone;
  30 + //高危因素
  31 + private List riskFactor;
  32 + //高危评分
  33 + private String riskScore;
  34 + //备注
  35 + private String remarks;
  36 + //末次月经
  37 + private String lastMenses;
  38 + private String id;
  39 + private String parentId;
  40 +
  41 + private String tszhz;// 唐氏综合症
  42 + private String sjgjx;// 神经管畸形
  43 + private String sbst;// 18-三体
  44 + private String dzhpx;// 地中海贫血
  45 + private String cspj;// 产筛评价
  46 + //录入人员
  47 + private String publishName;
  48 +
  49 + public String getCspj() {
  50 + return cspj;
  51 + }
  52 +
  53 + public void setCspj(String cspj) {
  54 + this.cspj = cspj;
  55 + }
  56 +
  57 + public String getDzhpx() {
  58 + return dzhpx;
  59 + }
  60 +
  61 + public void setDzhpx(String dzhpx) {
  62 + this.dzhpx = dzhpx;
  63 + }
  64 +
  65 + public String getId() {
  66 + return id;
  67 + }
  68 +
  69 + public void setId(String id) {
  70 + this.id = id;
  71 + }
  72 +
  73 + public String getParentId() {
  74 + return parentId;
  75 + }
  76 +
  77 + public void setParentId(String parentId) {
  78 + this.parentId = parentId;
  79 + }
  80 +
  81 + public String getPublishName() {
  82 + return publishName;
  83 + }
  84 +
  85 + public void setPublishName(String publishName) {
  86 + this.publishName = publishName;
  87 + }
  88 +
  89 + public String getSbst() {
  90 + return sbst;
  91 + }
  92 +
  93 + public void setSbst(String sbst) {
  94 + this.sbst = sbst;
  95 + }
  96 +
  97 + public String getSjgjx() {
  98 + return sjgjx;
  99 + }
  100 +
  101 + public void setSjgjx(String sjgjx) {
  102 + this.sjgjx = sjgjx;
  103 + }
  104 +
  105 + public String getTszhz() {
  106 + return tszhz;
  107 + }
  108 +
  109 + public void setTszhz(String tszhz) {
  110 + this.tszhz = tszhz;
  111 + }
  112 +
  113 + public Integer getAge() {
  114 + return age;
  115 + }
  116 +
  117 + public void setAge(Integer age) {
  118 + this.age = age;
  119 + }
  120 +
  121 + public String getDueWeek() {
  122 + return dueWeek;
  123 + }
  124 +
  125 + public void setDueWeek(String dueWeek) {
  126 + this.dueWeek = dueWeek;
  127 + }
  128 +
  129 + public String getLastMenses() {
  130 + return lastMenses;
  131 + }
  132 +
  133 + public void setLastMenses(String lastMenses) {
  134 + this.lastMenses = lastMenses;
  135 + }
  136 +
  137 + public String getName() {
  138 + return name;
  139 + }
  140 +
  141 + public void setName(String name) {
  142 + this.name = name;
  143 + }
  144 +
  145 + public String getPhone() {
  146 + return phone;
  147 + }
  148 +
  149 + public void setPhone(String phone) {
  150 + this.phone = phone;
  151 + }
  152 +
  153 + public String getRemarks() {
  154 + return remarks;
  155 + }
  156 +
  157 + public void setRemarks(String remarks) {
  158 + this.remarks = remarks;
  159 + }
  160 +
  161 + public List getRiskFactor() {
  162 + return riskFactor;
  163 + }
  164 +
  165 + public void setRiskFactor(List riskFactor) {
  166 + this.riskFactor = riskFactor;
  167 + }
  168 +
  169 + public String getRiskScore() {
  170 + return riskScore;
  171 + }
  172 +
  173 + public void setRiskScore(String riskScore) {
  174 + this.riskScore = riskScore;
  175 + }
  176 +
  177 + public String getyChanQi() {
  178 + return yChanQi;
  179 + }
  180 +
  181 + public void setyChanQi(String yChanQi) {
  182 + this.yChanQi = yChanQi;
  183 + }
  184 +
  185 + public SieveResult convert(SieveResultModel sieveResultModel,Patients patients){
  186 + try {
  187 + if(null!=patients.getBirth()){
  188 + setAge(DateUtil.getAge(patients.getBirth()));
  189 + }
  190 + }catch (Exception e){
  191 + }
  192 + setName(patients.getUsername());
  193 + setPhone(patients.getPhone());
  194 + setRemarks(patients.getMremark());
  195 + setRiskScore("60");
  196 +
  197 + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date());
  198 + String week= (days/7)+"";
  199 + int day = (days%7);
  200 + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":"");
  201 + if(null!=patients.getLastMenses()){
  202 + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses()));
  203 + }
  204 +
  205 +
  206 + setParentId(sieveResultModel.getParentId());
  207 + setId(sieveResultModel.getId());
  208 + setCspj(sieveResultModel.getCspj());
  209 + setDzhpx(sieveResultModel.getDzhpx());
  210 + setPublishName(sieveResultModel.getPublishName());
  211 + setSbst(sieveResultModel.getSbst());
  212 + setSjgjx(sieveResultModel.getSjgjx());
  213 + setTszhz(sieveResultModel.getTszhz());
  214 + return this;
  215 + }
  216 +}