Commit 457d9d357d1bffab7b18fb14df9951b2e49eafb0
1 parent
b5630e9c2d
Exists in
master
and in
6 other branches
孕前优生修改
Showing 10 changed files with 336 additions and 15 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/LhBabyGravidityEndingTabModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/LhBabyPregnancyFollowTabModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LhBabyGravidityEndingTabController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LhBabyPregnancyFollowTabController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PreEugenicsBaseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyGravidityEndingTabFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyPregnancyFollowTabFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPreEugenicsService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PreEugebicsServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/LhBabyGravidityEndingTabModel.java
View file @
457d9d3
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | private String code; |
21 | 21 | //建档id |
22 | 22 | private String buildId; |
23 | - | |
23 | + private String hospitalId; | |
24 | 24 | //姓名 |
25 | 25 | private String name; |
26 | 26 | //年龄 |
... | ... | @@ -108,6 +108,14 @@ |
108 | 108 | private Date writeDate; |
109 | 109 | //随访者签名 |
110 | 110 | private String visitSign; |
111 | + | |
112 | + public String getHospitalId() { | |
113 | + return hospitalId; | |
114 | + } | |
115 | + | |
116 | + public void setHospitalId(String hospitalId) { | |
117 | + this.hospitalId = hospitalId; | |
118 | + } | |
111 | 119 | |
112 | 120 | public List<Integer> getGravidityHigh() { |
113 | 121 | return gravidityHigh; |
platform-dal/src/main/java/com/lyms/platform/pojo/LhBabyPregnancyFollowTabModel.java
View file @
457d9d3
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | private String code; |
20 | 20 | //建档id |
21 | 21 | private String buildId; |
22 | + private String hospitalId; | |
22 | 23 | |
23 | 24 | //姓名 |
24 | 25 | private String name; |
... | ... | @@ -115,6 +116,14 @@ |
115 | 116 | private Date writeDate; |
116 | 117 | //随访者签名 |
117 | 118 | private String visitSign; |
119 | + | |
120 | + public String getHospitalId() { | |
121 | + return hospitalId; | |
122 | + } | |
123 | + | |
124 | + public void setHospitalId(String hospitalId) { | |
125 | + this.hospitalId = hospitalId; | |
126 | + } | |
118 | 127 | |
119 | 128 | public String getId() { |
120 | 129 | return id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LhBabyGravidityEndingTabController.java
View file @
457d9d3
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | @ResponseBody |
58 | 58 | @TokenRequired |
59 | 59 | public BaseResponse addOrUpdateLhBabyGravidityEndingTab(@RequestBody LhBabyGravidityEndingTabModel lhBabyGravidityEndingTabModel, HttpServletRequest request) { |
60 | - return lhBabyGravidityEndingTabFacade.addOrUpdateLhBabyGravidityEndingTab(lhBabyGravidityEndingTabModel); | |
60 | + return lhBabyGravidityEndingTabFacade.addOrUpdateLhBabyGravidityEndingTab(lhBabyGravidityEndingTabModel,getUserId(request)); | |
61 | 61 | } |
62 | 62 | |
63 | 63 | //删除-隆化-妊娠结局记录表 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LhBabyPregnancyFollowTabController.java
View file @
457d9d3
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | @ResponseBody |
58 | 58 | @TokenRequired |
59 | 59 | public BaseResponse addOrUpdateLhBabyPregnancyFollowTab(@RequestBody LhBabyPregnancyFollowTabModel lhBabyPregnancyFollowTabModel, HttpServletRequest request) { |
60 | - return lhBabyPregnancyFollowTabFacade.addOrUpdateLhBabyPregnancyFollowTab(lhBabyPregnancyFollowTabModel); | |
60 | + return lhBabyPregnancyFollowTabFacade.addOrUpdateLhBabyPregnancyFollowTab(lhBabyPregnancyFollowTabModel,getUserId(request)); | |
61 | 61 | } |
62 | 62 | |
63 | 63 | //删除-隆化-早孕随访记录表 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PreEugenicsBaseController.java
View file @
457d9d3
... | ... | @@ -361,16 +361,29 @@ |
361 | 361 | |
362 | 362 | |
363 | 363 | /** |
364 | - * 孕前优生统计 | |
364 | + * 国家优生项目技术服务工作月统计报表 | |
365 | 365 | * @param param |
366 | 366 | * @param request |
367 | 367 | * @return |
368 | 368 | */ |
369 | - @RequestMapping(method = RequestMethod.GET, value = "/listCount") | |
369 | + @RequestMapping(method = RequestMethod.GET, value = "/listServiceCount") | |
370 | 370 | @ResponseBody |
371 | 371 | @TokenRequired |
372 | - public BaseListResponse listCount(@JsonAlias PreEugenicsBaseListRequest param, HttpServletRequest request) { | |
372 | + public BaseObjectResponse listCount(@JsonAlias PreEugenicsBaseListRequest param, HttpServletRequest request) { | |
373 | 373 | return iPreEugenicsService.listCount(param, getUserId(request)); |
374 | + } | |
375 | + | |
376 | + /** | |
377 | + * 国家优生项目妊娠结局月统计报表 | |
378 | + * @param param | |
379 | + * @param request | |
380 | + * @return | |
381 | + */ | |
382 | + @RequestMapping(method = RequestMethod.GET, value = "/listRsjjCount") | |
383 | + @ResponseBody | |
384 | + @TokenRequired | |
385 | + public BaseObjectResponse listRsjjCount(@JsonAlias PreEugenicsBaseListRequest param, HttpServletRequest request) { | |
386 | + return iPreEugenicsService.listRsjjCount(param, getUserId(request)); | |
374 | 387 | } |
375 | 388 | |
376 | 389 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
457d9d3
... | ... | @@ -5342,6 +5342,101 @@ |
5342 | 5342 | return "success"; |
5343 | 5343 | } |
5344 | 5344 | |
5345 | + /** | |
5346 | + * 计算妻子血常规是否存在异常项 | |
5347 | + * @param startDate | |
5348 | + * @param endDate | |
5349 | + * @return | |
5350 | + */ | |
5351 | + @RequestMapping(value = "/handleWifeClinicalCheck", method = RequestMethod.GET) | |
5352 | + @ResponseBody | |
5353 | + public String handleWifeClinicalCheck(String startDate,String endDate) { | |
5354 | + | |
5355 | + Query query = Query.query(Criteria.where("hospitalId").is("2100001605"). | |
5356 | + and("fillDate").gte(DateUtil.parseYMD(startDate)).lte(DateUtil.parseYMD(endDate))); | |
5357 | + List<PreEugenicsBaseModel> modelList = mongoTemplate.find(query, PreEugenicsBaseModel.class); | |
5358 | + if (CollectionUtils.isNotEmpty(modelList)) { | |
5359 | + for(PreEugenicsBaseModel model : modelList) | |
5360 | + { | |
5361 | + int zc = 0; | |
5362 | + Map<String,Object> wifeClinical = model.getWifeClinicalCheck(); | |
5363 | + if (wifeClinical != null && wifeClinical.size() > 0 && wifeClinical.get("xxbfx") != null) | |
5364 | + { | |
5365 | + try{ | |
5366 | + List<String> xxbfx = (ArrayList)wifeClinical.get("xxbfx"); | |
5367 | + if (xxbfx != null && xxbfx.size() == 9) | |
5368 | + { | |
5369 | + Double hb = Double.parseDouble(xxbfx.get(0)); | |
5370 | + if (hb >= 110 && hb <= 150) | |
5371 | + { | |
5372 | + zc++; | |
5373 | + } | |
5374 | + Double rbc = Double.parseDouble(xxbfx.get(1)); | |
5375 | + if (rbc >= 3.5 && rbc <= 5.0) | |
5376 | + { | |
5377 | + zc++; | |
5378 | + } | |
5379 | + Double plt = Double.parseDouble(xxbfx.get(2)); | |
5380 | + if (plt >= 100 && plt <= 300) | |
5381 | + { | |
5382 | + zc++; | |
5383 | + } | |
5384 | + Double wbc = Double.parseDouble(xxbfx.get(3)); | |
5385 | + if (wbc >= 4 && wbc <= 10) | |
5386 | + { | |
5387 | + zc++; | |
5388 | + } | |
5389 | + Double n = Double.parseDouble(xxbfx.get(4)); | |
5390 | + if (n >= 50 && n <= 70) | |
5391 | + { | |
5392 | + zc++; | |
5393 | + } | |
5394 | + Double l = Double.parseDouble(xxbfx.get(5)); | |
5395 | + if (l >= 20 && l <= 40) | |
5396 | + { | |
5397 | + zc++; | |
5398 | + } | |
5399 | + Double m = Double.parseDouble(xxbfx.get(6)); | |
5400 | + if (m >= 3 && m <= 12) | |
5401 | + { | |
5402 | + zc++; | |
5403 | + } | |
5404 | + | |
5405 | + Double e = Double.parseDouble(xxbfx.get(7)); | |
5406 | + if (e >= 0.5 && e <= 5) | |
5407 | + { | |
5408 | + zc++; | |
5409 | + } | |
5410 | + Double b = Double.parseDouble(xxbfx.get(8)); | |
5411 | + if (b >= 0 && b <= 1) | |
5412 | + { | |
5413 | + zc++; | |
5414 | + } | |
5415 | + } | |
5416 | + }catch (Exception e) | |
5417 | + { | |
5418 | + continue; | |
5419 | + } | |
5420 | + } | |
5421 | + if (zc==9) | |
5422 | + { | |
5423 | + wifeClinical.put("xxbfxzc",1); | |
5424 | + model.setWifeClinicalCheck(wifeClinical); | |
5425 | + Update update = MongoConvertHelper | |
5426 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
5427 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, PreEugenicsBaseModel.class); | |
5428 | + }else if (zc < 9 && wifeClinical != null && wifeClinical.size() > 0 && wifeClinical.get("xxbfx") != null) | |
5429 | + { | |
5430 | + wifeClinical.put("xxbfxzc",2); | |
5431 | + model.setWifeClinicalCheck(wifeClinical); | |
5432 | + Update update = MongoConvertHelper | |
5433 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
5434 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(model.getId())), update, PreEugenicsBaseModel.class); | |
5435 | + } | |
5436 | + } | |
5437 | + } | |
5438 | + return "success"; | |
5439 | + } | |
5345 | 5440 | |
5346 | 5441 | |
5347 | 5442 | @RequestMapping(value = "/handleFmData", method = RequestMethod.GET) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyGravidityEndingTabFacade.java
View file @
457d9d3
... | ... | @@ -108,9 +108,10 @@ |
108 | 108 | * @param lhBabyGravidityEndingTabModel |
109 | 109 | * @return |
110 | 110 | */ |
111 | - public BaseObjectResponse addOrUpdateLhBabyGravidityEndingTab(LhBabyGravidityEndingTabModel lhBabyGravidityEndingTabModel) { | |
111 | + public BaseObjectResponse addOrUpdateLhBabyGravidityEndingTab(LhBabyGravidityEndingTabModel lhBabyGravidityEndingTabModel,Integer userId) { | |
112 | 112 | BaseObjectResponse br = new BaseObjectResponse(); |
113 | 113 | //修改 |
114 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
114 | 115 | if(StringUtils.isNotEmpty(lhBabyGravidityEndingTabModel.getId())){ |
115 | 116 | update(new MongoQuery(new MongoCondition("id", lhBabyGravidityEndingTabModel.getId(), MongoOper.IS)).convertToMongoQuery(),lhBabyGravidityEndingTabModel); |
116 | 117 | }else { |
... | ... | @@ -118,6 +119,7 @@ |
118 | 119 | if (StringUtils.isEmpty(lhBabyGravidityEndingTabModel.getBuildId())) { |
119 | 120 | return br.setErrormsg("参数缺失").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); |
120 | 121 | } |
122 | + lhBabyGravidityEndingTabModel.setHospitalId(hospitalId); | |
121 | 123 | lhBabyGravidityEndingTabModel.setYn(YnEnums.YES.getId());//设置增加数据为有效数据(删除状态) |
122 | 124 | save(lhBabyGravidityEndingTabModel); |
123 | 125 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyPregnancyFollowTabFacade.java
View file @
457d9d3
... | ... | @@ -108,7 +108,9 @@ |
108 | 108 | * @param lhBabyPregnancyFollowTabModel |
109 | 109 | * @return |
110 | 110 | */ |
111 | - public BaseObjectResponse addOrUpdateLhBabyPregnancyFollowTab(LhBabyPregnancyFollowTabModel lhBabyPregnancyFollowTabModel) { | |
111 | + public BaseObjectResponse addOrUpdateLhBabyPregnancyFollowTab(LhBabyPregnancyFollowTabModel lhBabyPregnancyFollowTabModel | |
112 | + ,Integer userId) { | |
113 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
112 | 114 | BaseObjectResponse br = new BaseObjectResponse(); |
113 | 115 | //修改 |
114 | 116 | if(StringUtils.isNotEmpty(lhBabyPregnancyFollowTabModel.getId())){ |
... | ... | @@ -119,6 +121,7 @@ |
119 | 121 | return br.setErrormsg("参数缺失").setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); |
120 | 122 | } |
121 | 123 | lhBabyPregnancyFollowTabModel.setYn(YnEnums.YES.getId());//设置增加数据为有效数据(删除状态) |
124 | + lhBabyPregnancyFollowTabModel.setHospitalId(hospitalId); | |
122 | 125 | save(lhBabyPregnancyFollowTabModel); |
123 | 126 | } |
124 | 127 | //同步到孕前优生信息 实体类(便于检查信息页面获取) |
... | ... | @@ -149,7 +152,7 @@ |
149 | 152 | model.setYn(YnEnums.NO.getId());//设置为无效数据(删除状态) |
150 | 153 | update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), model); |
151 | 154 | //存入操作日志 |
152 | - operateLogFacade.addDeleteOptLog(userId, Integer.valueOf(hospitalId), delModel, OptActionEnums.DELETE.getId(), "删除早孕随访记录表"); | |
155 | + //operateLogFacade.addDeleteOptLog(userId, Integer.valueOf(hospitalId), delModel, OptActionEnums.DELETE.getId(), "删除早孕随访记录表"); | |
153 | 156 | } |
154 | 157 | |
155 | 158 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IPreEugenicsService.java
View file @
457d9d3
... | ... | @@ -45,6 +45,8 @@ |
45 | 45 | |
46 | 46 | BaseResponse pastAbnormityProposalAdd(); |
47 | 47 | |
48 | - BaseListResponse listCount(PreEugenicsBaseListRequest param, Integer userId); | |
48 | + BaseObjectResponse listCount(PreEugenicsBaseListRequest param, Integer userId); | |
49 | + | |
50 | + BaseObjectResponse listRsjjCount(PreEugenicsBaseListRequest param, Integer userId); | |
49 | 51 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PreEugebicsServiceImpl.java
View file @
457d9d3
... | ... | @@ -1857,7 +1857,7 @@ |
1857 | 1857 | } |
1858 | 1858 | |
1859 | 1859 | @Override |
1860 | - public BaseListResponse listCount(PreEugenicsBaseListRequest param, Integer userId) { | |
1860 | + public BaseObjectResponse listCount(PreEugenicsBaseListRequest param, Integer userId) { | |
1861 | 1861 | |
1862 | 1862 | |
1863 | 1863 | List<Integer> datas = new LinkedList<>(); |
1864 | 1864 | |
... | ... | @@ -1904,8 +1904,8 @@ |
1904 | 1904 | |
1905 | 1905 | datas.add(manCount+womanCount-manCountExc-womanCountExc);//正常人数 |
1906 | 1906 | datas.add(manCountExc+womanCountExc);//异常人数 |
1907 | + datas.add(0);//合计 | |
1907 | 1908 | |
1908 | - | |
1909 | 1909 | //体格检查异常人数男 |
1910 | 1910 | int manTgjcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) |
1911 | 1911 | .and("fillDate").gte(start).lte(end) |
... | ... | @@ -1962,7 +1962,7 @@ |
1962 | 1962 | datas.add(manCount+womanCount-manTgjcCount-womanTgjcCount);//正常人数 |
1963 | 1963 | datas.add(manTgjcCount+womanTgjcCount);//异常人数 |
1964 | 1964 | |
1965 | - | |
1965 | + datas.add(0); | |
1966 | 1966 | //检查生殖正常人数男 |
1967 | 1967 | int manSzCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) |
1968 | 1968 | .and("fillDate").gte(start).lte(end) |
1969 | 1969 | |
... | ... | @@ -2035,9 +2035,19 @@ |
2035 | 2035 | datas.add(womansyCount);//阳性人数 |
2036 | 2036 | |
2037 | 2037 | |
2038 | - datas.add(0);//血常规正常人数 | |
2039 | - datas.add(0);//血常规异常人数 | |
2038 | + //血常规 | |
2039 | + int womanXcgCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2040 | + .and("fillDate").gte(start).lte(end) | |
2041 | + .and("wifeClinicalCheck.xxbfxzc").is(1) | |
2042 | + ), PreEugenicsBaseModel.class); | |
2043 | + int womanXcgCountyc = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2044 | + .and("fillDate").gte(start).lte(end) | |
2045 | + .and("wifeClinicalCheck.xxbfxzc").is(2) | |
2046 | + ), PreEugenicsBaseModel.class); | |
2040 | 2047 | |
2048 | + datas.add(womanXcgCount);//血常规正常人数 | |
2049 | + datas.add(womanXcgCountyc);//血常规异常人数 | |
2050 | + | |
2041 | 2051 | //检查尿常规异常人数 |
2042 | 2052 | int womanncgCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) |
2043 | 2053 | .and("fillDate").gte(start).lte(end) |
... | ... | @@ -2046,6 +2056,185 @@ |
2046 | 2056 | |
2047 | 2057 | datas.add(womanCount-womanncgCount);//正常人数 |
2048 | 2058 | datas.add(womanncgCount);//正常人数 |
2059 | + | |
2060 | + | |
2061 | + //rh 阳性 | |
2062 | + int manRhCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2063 | + .and("fillDate").gte(start).lte(end) | |
2064 | + .and("wifeClinicalCheck.rh").is(1) | |
2065 | + ), PreEugenicsBaseModel.class); | |
2066 | + | |
2067 | + //rh 阳性 | |
2068 | + int womanRhCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2069 | + .and("fillDate").gte(start).lte(end) | |
2070 | + .and("husbandClinicalCheck.rh").is(1) | |
2071 | + ), PreEugenicsBaseModel.class); | |
2072 | + | |
2073 | + datas.add(womanCount+manCount-manRhCount-womanRhCount);//正常人数 | |
2074 | + datas.add(manRhCount+womanRhCount);//异常人数 | |
2075 | + | |
2076 | + | |
2077 | + //血糖 | |
2078 | + int womanXuetangCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2079 | + .and("fillDate").gte(start).lte(end) | |
2080 | + .and("wifeClinicalCheck.xuetang").gte("3.9").lte("6.1") | |
2081 | + ), PreEugenicsBaseModel.class); | |
2082 | + datas.add(womanXuetangCount);//正常人数 | |
2083 | + datas.add(womanCount-womanXuetangCount);//异常人数 | |
2084 | + | |
2085 | + | |
2086 | + //谷丙转氨酶和肌酐 | |
2087 | + int womanGbzamCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2088 | + .and("fillDate").gte(start).lte(end) | |
2089 | + .and("wifeClinicalCheck.gbzam").gte("5").lte("40") | |
2090 | + .and("wifeClinicalCheck.jigan").gte("41").lte("73") | |
2091 | + ), PreEugenicsBaseModel.class); | |
2092 | + | |
2093 | + | |
2094 | + int manGbzamCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2095 | + .and("fillDate").gte(start).lte(end) | |
2096 | + .and("husbandClinicalCheck.gbzam").gte("5").lte("40") | |
2097 | + .and("husbandClinicalCheck.jigan").gte("57").lte("97") | |
2098 | + ), PreEugenicsBaseModel.class); | |
2099 | + //肝功 | |
2100 | + datas.add(womanGbzamCount+manGbzamCount);//正常人数 | |
2101 | + datas.add(womanCount+manCount-womanGbzamCount-manGbzamCount);//异常人数 | |
2102 | + | |
2103 | + | |
2104 | + //乙肝异常 | |
2105 | + int womanYgCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2106 | + .and("fillDate").gte(start).lte(end) | |
2107 | + .and("wifeClinicalCheck.yigan").in(1) | |
2108 | + ), PreEugenicsBaseModel.class); | |
2109 | + | |
2110 | + //乙肝异常 | |
2111 | + int manYgCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2112 | + .and("fillDate").gte(start).lte(end) | |
2113 | + .and("husbandClinicalCheck.yigan").in(1) | |
2114 | + ), PreEugenicsBaseModel.class); | |
2115 | + datas.add(womanCount+manCount-manYgCount-womanYgCount);//正常人数 | |
2116 | + datas.add(womanYgCount+manYgCount);//异常人数 | |
2117 | + | |
2118 | + //肾功 | |
2119 | + datas.add(womanGbzamCount+manGbzamCount);//正常人数 | |
2120 | + datas.add(womanCount+manCount-womanGbzamCount-manGbzamCount);//异常人数 | |
2121 | + | |
2122 | + | |
2123 | + int womanCjzxjsCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2124 | + .and("fillDate").gte(start).lte(end) | |
2125 | + .and("wifeClinicalCheck.cjzxjs").gte("0.35").lte("5.1") | |
2126 | + ), PreEugenicsBaseModel.class); | |
2127 | + datas.add(womanCjzxjsCount);//正常人数 | |
2128 | + datas.add(womanCount-womanCjzxjsCount);//异常人数 | |
2129 | + | |
2130 | + //梅毒螺旋体 | |
2131 | + int manMdCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2132 | + .and("fillDate").gte(start).lte(end) | |
2133 | + .and("wifeClinicalCheck.meidu").is(1) | |
2134 | + ), PreEugenicsBaseModel.class); | |
2135 | + | |
2136 | + //梅毒螺旋体 | |
2137 | + int womanMdCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2138 | + .and("fillDate").gte(start).lte(end) | |
2139 | + .and("husbandClinicalCheck.meidu").is(1) | |
2140 | + ), PreEugenicsBaseModel.class); | |
2141 | + | |
2142 | + datas.add(womanCount+manCount-womanMdCount-manMdCount);//正常人数 | |
2143 | + datas.add(manMdCount+womanMdCount);//异常人数 | |
2144 | + | |
2145 | + //风疹病毒IgG | |
2146 | + int manFzbdCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2147 | + .and("fillDate").gte(start).lte(end) | |
2148 | + .and("wifeClinicalCheck.fzbd").is(1) | |
2149 | + ), PreEugenicsBaseModel.class); | |
2150 | + | |
2151 | + datas.add(womanCount - manFzbdCount);//正常人数 | |
2152 | + datas.add(manFzbdCount);//异常人数 | |
2153 | + | |
2154 | + int womanjxbbdIgMCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2155 | + .and("fillDate").gte(start).lte(end) | |
2156 | + .and("wifeClinicalCheck.jxbbdIgM").is(1) | |
2157 | + ), PreEugenicsBaseModel.class); | |
2158 | + | |
2159 | + datas.add(womanCount - womanjxbbdIgMCount);//正常人数 | |
2160 | + datas.add(womanjxbbdIgMCount);//异常人数 | |
2161 | + | |
2162 | + int womanjxbbdCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2163 | + .and("fillDate").gte(start).lte(end) | |
2164 | + .and("wifeClinicalCheck.jxbbd").is(1) | |
2165 | + ), PreEugenicsBaseModel.class); | |
2166 | + | |
2167 | + datas.add(womanCount - womanjxbbdCount);//正常人数 | |
2168 | + datas.add(womanjxbbdCount);//异常人数 | |
2169 | + | |
2170 | + | |
2171 | + int womangxtIgMCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2172 | + .and("fillDate").gte(start).lte(end) | |
2173 | + .and("wifeClinicalCheck.gxtIgM").is(1) | |
2174 | + ), PreEugenicsBaseModel.class); | |
2175 | + | |
2176 | + datas.add(womanCount - womangxtIgMCount);//正常人数 | |
2177 | + datas.add(womangxtIgMCount);//异常人数 | |
2178 | + | |
2179 | + int womangxtCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2180 | + .and("fillDate").gte(start).lte(end) | |
2181 | + .and("wifeClinicalCheck.gxt").is(1) | |
2182 | + ), PreEugenicsBaseModel.class); | |
2183 | + | |
2184 | + datas.add(womanCount - womangxtCount);//正常人数 | |
2185 | + datas.add(womangxtCount);//异常人数 | |
2186 | + | |
2187 | + //超声检查 | |
2188 | + int womanCsjcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2189 | + .and("fillDate").gte(start).lte(end) | |
2190 | + .and("wifeBCheck.bcjc").in(1) | |
2191 | + ), PreEugenicsBaseModel.class); | |
2192 | + datas.add(womanCount - womanCsjcCount);//正常人数 | |
2193 | + datas.add(womanCsjcCount);//异常人数 | |
2194 | + | |
2195 | + int womanGwCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2196 | + .and("fillDate").gte(start).lte(end) | |
2197 | + .and("resultAdvice.wifeType").is("3") | |
2198 | + ), PreEugenicsBaseModel.class); | |
2199 | + | |
2200 | + int manGwCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2201 | + .and("fillDate").gte(start).lte(end) | |
2202 | + .and("resultAdvice.husbandType").is("3") | |
2203 | + ), PreEugenicsBaseModel.class); | |
2204 | + datas.add(womanGwCount+manGwCount);//高危合计人数 | |
2205 | + datas.add(manGwCount);//高危男人数 | |
2206 | + datas.add(womanGwCount);//高危女人数 | |
2207 | + | |
2208 | + datas.add(manCount+womanCount);//咨询指导人数 | |
2209 | + | |
2210 | + //早孕 | |
2211 | + int zyCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2212 | + .and("writeDate").gte(start).lte(end) | |
2213 | + ), LhBabyPregnancyFollowTabModel.class); | |
2214 | + | |
2215 | + datas.add(zyCount);//早孕人数 | |
2216 | + | |
2217 | + // 妊娠结局 | |
2218 | + int rsjjCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
2219 | + .and("writeDate").gte(start).lte(end) | |
2220 | + ), LhBabyGravidityEndingTabModel.class); | |
2221 | + | |
2222 | + datas.add(rsjjCount);//早孕人数 | |
2223 | + | |
2224 | + int all = 0; | |
2225 | + for(int i= 9; i <=39;i++) | |
2226 | + { | |
2227 | + all+=datas.get(i); | |
2228 | + } | |
2229 | + | |
2230 | + datas.add(8,all); | |
2231 | + | |
2232 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); | |
2233 | + } | |
2234 | + | |
2235 | + @Override | |
2236 | + public BaseObjectResponse listRsjjCount(PreEugenicsBaseListRequest param, Integer userId) { | |
2237 | + | |
2049 | 2238 | return null; |
2050 | 2239 | } |
2051 | 2240 |