Commit 150e69bc607dde94bb5f49f4c5009f7495b8c69b

Authored by yangfei
1 parent d3a918c9c5

高危儿查询条件、体弱儿查询条件

Showing 5 changed files with 82 additions and 22 deletions

platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java View file @ 150e69b
... ... @@ -124,6 +124,11 @@
124 124 //是否体弱 0 非高危 1高危
125 125 private Integer weakSon;
126 126  
  127 + //高危儿多项
  128 + private List highRiskInfos;
  129 + //体弱儿多项
  130 + private List weakSonInfos;
  131 +
127 132 //高危ID
128 133 private String highRiskInfo;
129 134  
... ... @@ -168,6 +173,22 @@
168 173 //身长别体重
169 174 private String heightWeight;
170 175  
  176 + public List getHighRiskInfos() {
  177 + return highRiskInfos;
  178 + }
  179 +
  180 + public void setHighRiskInfos(List highRiskInfos) {
  181 + this.highRiskInfos = highRiskInfos;
  182 + }
  183 +
  184 + public List getWeakSonInfos() {
  185 + return weakSonInfos;
  186 + }
  187 +
  188 + public void setWeakSonInfos(List weakSonInfos) {
  189 + this.weakSonInfos = weakSonInfos;
  190 + }
  191 +
171 192 public String getHighRiskInfo() {
172 193 return highRiskInfo;
173 194 }
... ... @@ -688,6 +709,12 @@
688 709 }
689 710 if (CollectionUtils.isNotEmpty(enableListNot)) {
690 711 condition = condition.and("enable", enableListNot, MongoOper.NIN);
  712 + }
  713 + if (null != highRiskInfos) {
  714 + condition = condition.and("highRiskInfo", highRiskInfos, MongoOper.IN);
  715 + }
  716 + if (null != weakSonInfos) {
  717 + condition = condition.and("weakSonInfo", weakSonInfos, MongoOper.IN);
691 718 }
692 719  
693 720 if (null != hospitalIdList) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java View file @ 150e69b
... ... @@ -17,6 +17,7 @@
17 17 import com.lyms.platform.operate.web.request.BookbuildingQueryRequest;
18 18 import com.lyms.platform.operate.web.result.QueryHospitalListRequest;
19 19 import com.lyms.platform.operate.web.result.QueryHospitalListResult;
  20 +import com.lyms.platform.operate.web.utils.CollectionUtils;
20 21 import com.lyms.platform.permission.service.CouponService;
21 22 import org.apache.log4j.Logger;
22 23 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -28,6 +29,7 @@
28 29 import javax.servlet.http.HttpServletResponse;
29 30 import javax.validation.Valid;
30 31 import java.io.UnsupportedEncodingException;
  32 +import java.util.List;
31 33  
32 34  
33 35 /*
... ... @@ -198,6 +200,8 @@
198 200 @RequestParam(value = "highRiskType", required = false) Integer highRiskType,
199 201 @RequestParam(value = "diagnose", required = false) String diagnose,
200 202 @RequestParam(value = "dateRange", required = false) String dateRange,
  203 + @RequestParam(value = "highRiskInfos", required = false) List highRiskInfos,
  204 + @RequestParam(value = "weakSonInfo", required = false) List weakSonInfos,
201 205 @RequestParam("page") Integer page,
202 206 @RequestParam("limit") Integer limit,
203 207 @RequestParam(value = "showDetail",defaultValue = "0") Integer showDetail,
204 208  
... ... @@ -212,9 +216,18 @@
212 216 @RequestParam(value = "hospitalCityId",required = false) String hospitalCityId,
213 217 @RequestParam(value = "hospitalAreaId",required = false) String hospitalAreaId,
214 218 @RequestParam(value = "hospitalId",required = false) String hospitalId,
215   - @RequestParam(value = "isArea",required = false) String isArea){
  219 + @RequestParam(value = "isArea",required = false) String isArea) {
  220 +
  221 + if (CollectionUtils.isNotEmpty(highRiskInfos)){
  222 + System.out.println(highRiskInfos.size() + ":highRiskInfos" );
  223 + }
  224 + if (CollectionUtils.isNotEmpty(weakSonInfos)){
  225 + System.out.println("weakSonInfos:" + weakSonInfos.size());
  226 + }
216 227 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
217 228 BabyManageRequest request = new BabyManageRequest();
  229 + request.setWeakSonInfos(weakSonInfos);
  230 + request.setHighRiskInfos(highRiskInfos);
218 231 request.setShowDetail(showDetail);
219 232 request.setBuildDoctor(buildDoctor);
220 233 request.setQueryNo(queryNo);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 150e69b
... ... @@ -682,8 +682,8 @@
682 682 boolean isHightRisk = false;
683 683 if (patient.getRiskScore() != null) {
684 684 if (patient.getRiskScore() > 0) {//高危评分大于0
685   - if(CollectionUtils.isNotEmpty(patient.getRiskFactorId())){
686   - if(!"d42eec03-aa86-45b8-a4e0-78a0ff365fb6".equals(patient.getRiskFactorId().get(0))){
  685 + if (CollectionUtils.isNotEmpty(patient.getRiskFactorId())) {
  686 + if (!"d42eec03-aa86-45b8-a4e0-78a0ff365fb6".equals(patient.getRiskFactorId().get(0))) {
687 687 isHightRisk = true;
688 688 }
689 689 }
690 690  
... ... @@ -750,9 +750,9 @@
750 750 if (isHightRisk) {
751 751 //风险名称
752 752 String riskNmae = queryRiskNameStr(patient.getRiskFactorId());
753   - content = com.lyms.platform.common.utils.StringUtils.replaceNameRisk(patient.getUsername(), riskNmae, templateModel.getContent(),doctorName);
  753 + content = com.lyms.platform.common.utils.StringUtils.replaceNameRisk(patient.getUsername(), riskNmae, templateModel.getContent(), doctorName);
754 754 } else {
755   - content = com.lyms.platform.common.utils.StringUtils.replaceName(patient.getUsername(), templateModel.getContent(),doctorName);
  755 + content = com.lyms.platform.common.utils.StringUtils.replaceName(patient.getUsername(), templateModel.getContent(), doctorName);
756 756 }
757 757  
758 758 mr.setFirst("【" + messagePrefix + "】" + content);
... ... @@ -1666,6 +1666,10 @@
1666 1666 List listData = new ArrayList();
1667 1667 Patients patients = iterator.next();
1668 1668 Patients patients2 = null;
  1669 +
  1670 + List<String> patientIds = new ArrayList<>();
  1671 + patientIds.add(patientId);
  1672 +
1669 1673 //建档记录
1670 1674 if (null != patients.getHospitalId()) {
1671 1675 organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId()));
1672 1676  
... ... @@ -1689,16 +1693,15 @@
1689 1693 patientsQuery.setBuildType(1);
1690 1694 List<Patients> patients1 = patientsService.queryPatient(patientsQuery);
1691 1695 if (CollectionUtils.isNotEmpty(patients1)) {
  1696 + for (Patients ps : patients1) {
  1697 + patientIds.add(ps.getId());
  1698 + }
1692 1699 patients2 = patients1.get(0);
1693 1700 }
1694 1701 //初诊记录
1695 1702 AntExChuQuery antExChuQuery = new AntExChuQuery();
1696 1703 antExChuQuery.setYn(YnEnums.YES.getId());
1697   - if (patients2 != null) {
1698   - antExChuQuery.setParentIds(Arrays.asList(patientId, patients2.getId()));
1699   - } else {
1700   - antExChuQuery.setParentId(patientId);
1701   - }
  1704 + antExChuQuery.setParentIds(patientIds);
1702 1705 List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery);
1703 1706 if (CollectionUtils.isNotEmpty(antExChuModels)) {
1704 1707 for (AntExChuModel an : antExChuModels) {
... ... @@ -1712,11 +1715,7 @@
1712 1715 //复诊记录
1713 1716 AntExQuery antExQuery = new AntExQuery();
1714 1717 antExQuery.setYn(YnEnums.YES.getId());
1715   - if (patients2 != null) {
1716   - antExQuery.setParentIds(Arrays.asList(patientId, patients2.getId()));
1717   - } else {
1718   - antExQuery.setParentId(patientId);
1719   - }
  1718 + antExQuery.setParentIds(patientIds);
1720 1719  
1721 1720  
1722 1721 List<AntenatalExaminationModel> list1 = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery());
... ... @@ -1733,11 +1732,7 @@
1733 1732 MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
1734 1733 matDeliverQuery.setYn(YnEnums.YES.getId());
1735 1734  
1736   - if (patients2 != null) {
1737   - matDeliverQuery.setParentIdList(Arrays.asList(patientId, patients2.getId()));
1738   - } else {
1739   - matDeliverQuery.setParentId(patientId);
1740   - }
  1735 + matDeliverQuery.setParentIdList(patientIds);
1741 1736 List<MaternalDeliverModel> l = matDeliverService.query(matDeliverQuery);
1742 1737 if (CollectionUtils.isNotEmpty(l)) {
1743 1738 MaternalDeliverModel model = l.get(0);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 150e69b
... ... @@ -2038,6 +2038,11 @@
2038 2038 babyQuery.setWeakSonInfo(request.getWeakSonInfo());
2039 2039 //高危儿详情
2040 2040 babyQuery.setHighRiskInfo(request.getHighRiskInfo());
  2041 + //多项体弱儿因素查询条件
  2042 + babyQuery.setWeakSonInfos(request.getWeakSonInfos());
  2043 + //多项体弱儿因素查询
  2044 + babyQuery.setHighRiskInfos(request.getHighRiskInfos());
  2045 +
2041 2046 if(String.valueOf("true").equals(request.getIsArea())){
2042 2047 List list = new ArrayList();
2043 2048 list.add("1");//转诊,建档已接受
... ... @@ -2282,8 +2287,6 @@
2282 2287 babyQuery.setWeakSon(1);
2283 2288 }
2284 2289 }
2285   -
2286   -
2287 2290  
2288 2291 if(org.apache.commons.lang.StringUtils.isNotEmpty(request.getDateRange())){
2289 2292 String[] dates = request.getDateRange().split(" - ");
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java View file @ 150e69b
... ... @@ -2,6 +2,8 @@
2 2  
3 3 import com.lyms.platform.common.dao.BaseQuery;
4 4  
  5 +import java.util.List;
  6 +
5 7 /**
6 8 * Created by lqy on 2016/6/17.
7 9 */
... ... @@ -40,6 +42,10 @@
40 42 private String weakSonInfo;
41 43 //高危儿详情
42 44 private String highRiskInfo;
  45 + //高危儿多项
  46 + private List highRiskInfos;
  47 + //体弱儿多项
  48 + private List weakSonInfos;
43 49 //建档医生id
44 50 private String buildDoctor;
45 51 private String dateRange;
... ... @@ -69,6 +75,22 @@
69 75  
70 76 //1-需要隐藏姓名、电话、地址
71 77 private int showDetail;
  78 +
  79 + public List getHighRiskInfos() {
  80 + return highRiskInfos;
  81 + }
  82 +
  83 + public void setHighRiskInfos(List highRiskInfos) {
  84 + this.highRiskInfos = highRiskInfos;
  85 + }
  86 +
  87 + public List getWeakSonInfos() {
  88 + return weakSonInfos;
  89 + }
  90 +
  91 + public void setWeakSonInfos(List weakSonInfos) {
  92 + this.weakSonInfos = weakSonInfos;
  93 + }
72 94  
73 95 public String getWeakSonInfo() {
74 96 return weakSonInfo;