Commit 5dca76cdd1239e6b52aca3cbe59d843406b8c3d8
1 parent
457d9d357d
Exists in
master
and in
6 other branches
孕前优生修改
Showing 2 changed files with 124 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyService.java
View file @
5dca76c
| ... | ... | @@ -857,6 +857,15 @@ |
| 857 | 857 | // } |
| 858 | 858 | // break; |
| 859 | 859 | /***乙肝表面抗原***/ |
| 860 | + case "HBSAG": | |
| 861 | + if(StringUtils.isEmpty(premaritalCheckup.getHbsag())) { | |
| 862 | + if(result.contains("阳性")) { | |
| 863 | + premaritalCheckup.setHbsag("1"); | |
| 864 | + }else if(result.contains("阴性")) { | |
| 865 | + premaritalCheckup.setHbsag("2"); | |
| 866 | + } | |
| 867 | + } | |
| 868 | + break; | |
| 860 | 869 | case "HBSAG-1": |
| 861 | 870 | if(StringUtils.isEmpty(premaritalCheckup.getHbsag())) { |
| 862 | 871 | if(result.contains("阳性")) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PreEugebicsServiceImpl.java
View file @
5dca76c
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import java.util.*; |
| 4 | 4 | import java.util.concurrent.Callable; |
| 5 | 5 | import java.util.concurrent.Future; |
| 6 | +import java.util.regex.Pattern; | |
| 6 | 7 | |
| 7 | 8 | import com.lyms.hospitalapi.lcfy.LisService; |
| 8 | 9 | import com.lyms.platform.biz.service.CancerScreeningService; |
| ... | ... | @@ -1904,7 +1905,7 @@ |
| 1904 | 1905 | |
| 1905 | 1906 | datas.add(manCount+womanCount-manCountExc-womanCountExc);//正常人数 |
| 1906 | 1907 | datas.add(manCountExc+womanCountExc);//异常人数 |
| 1907 | - datas.add(0);//合计 | |
| 1908 | + //datas.add(0);//合计 | |
| 1908 | 1909 | |
| 1909 | 1910 | //体格检查异常人数男 |
| 1910 | 1911 | int manTgjcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) |
| ... | ... | @@ -1962,7 +1963,6 @@ |
| 1962 | 1963 | datas.add(manCount+womanCount-manTgjcCount-womanTgjcCount);//正常人数 |
| 1963 | 1964 | datas.add(manTgjcCount+womanTgjcCount);//异常人数 |
| 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) |
| ... | ... | @@ -2219,7 +2219,7 @@ |
| 2219 | 2219 | .and("writeDate").gte(start).lte(end) |
| 2220 | 2220 | ), LhBabyGravidityEndingTabModel.class); |
| 2221 | 2221 | |
| 2222 | - datas.add(rsjjCount);//早孕人数 | |
| 2222 | + datas.add(rsjjCount);//妊娠结局人数 | |
| 2223 | 2223 | |
| 2224 | 2224 | int all = 0; |
| 2225 | 2225 | for(int i= 9; i <=39;i++) |
| 2226 | 2226 | |
| ... | ... | @@ -2234,8 +2234,119 @@ |
| 2234 | 2234 | |
| 2235 | 2235 | @Override |
| 2236 | 2236 | public BaseObjectResponse listRsjjCount(PreEugenicsBaseListRequest param, Integer userId) { |
| 2237 | + List<Integer> datas = new LinkedList<>(); | |
| 2238 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 2239 | + Date start = null; | |
| 2240 | + Date end = null; | |
| 2241 | + String createTime = param.getCreateTime(); | |
| 2242 | + if (StringUtils.isNotEmpty(createTime)) { | |
| 2243 | + String[] arrs = createTime.split(" - "); | |
| 2244 | + start = DateUtil.parseYMD(arrs[0]); | |
| 2245 | + end = DateUtil.parseYMD(arrs[1]); | |
| 2246 | + end = DateUtil.getDayLastSecond(end); | |
| 2247 | + } | |
| 2237 | 2248 | |
| 2238 | - return null; | |
| 2249 | + // 妊娠结局 | |
| 2250 | + int rsjjCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2251 | + .and("writeDate").gte(start).lte(end) | |
| 2252 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2253 | + datas.add(rsjjCount);//妊娠结局人数 | |
| 2254 | + // datas.add(0);//总合计人数 | |
| 2255 | + | |
| 2256 | + //男活产 | |
| 2257 | + int manhcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2258 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*1,.*$")).and("babySex").is("1") | |
| 2259 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2260 | + | |
| 2261 | + //女活产 | |
| 2262 | + int womanhcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2263 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*1,.*$")).and("babySex").is("2") | |
| 2264 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2265 | + | |
| 2266 | + datas.add(manhcCount+womanhcCount);//活产数合计人数 | |
| 2267 | + datas.add(manhcCount);//男活产人数 | |
| 2268 | + datas.add(womanhcCount);//女活产人数 | |
| 2269 | + | |
| 2270 | + //早产 | |
| 2271 | + int zcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2272 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*2,.*$")) | |
| 2273 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2274 | + datas.add(zcCount);//早产 | |
| 2275 | + //低出生体重儿 | |
| 2276 | + int dtzCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2277 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*3,.*$")) | |
| 2278 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2279 | + datas.add(dtzCount);//低出生体重儿 | |
| 2280 | + | |
| 2281 | + //男出生缺陷 | |
| 2282 | + int mancsqxCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2283 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*4,.*$")).and("babySex").is("1") | |
| 2284 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2285 | + | |
| 2286 | + //女出生缺陷 | |
| 2287 | + int womancsqxCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2288 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*4,.*$")).and("babySex").is("2") | |
| 2289 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2290 | + | |
| 2291 | + //两性畸形 | |
| 2292 | + int manlxjxCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2293 | + .and("writeDate").gte(start).lte(end).and("babySex").is("3") | |
| 2294 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2295 | + | |
| 2296 | + //性别不祥 | |
| 2297 | + int womanxbbxCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2298 | + .and("writeDate").gte(start).lte(end).and("babySex").is("4") | |
| 2299 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2300 | + | |
| 2301 | + datas.add(mancsqxCount+womancsqxCount+manlxjxCount+womanxbbxCount);//出生缺陷合计 | |
| 2302 | + datas.add(mancsqxCount);//出生缺陷男 | |
| 2303 | + datas.add(womancsqxCount);//出生缺陷女 | |
| 2304 | + datas.add(manlxjxCount);//出生缺陷合计 | |
| 2305 | + datas.add(womanxbbxCount);//出生缺陷合计 | |
| 2306 | + | |
| 2307 | + //自然流产 | |
| 2308 | + int zrlcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2309 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*5,.*$")) | |
| 2310 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2311 | + | |
| 2312 | + //医学性人工流产 | |
| 2313 | + int yxlcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2314 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*6,.*$")) | |
| 2315 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2316 | + | |
| 2317 | + //治疗性引产 | |
| 2318 | + int zllcCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2319 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*7,.*$")) | |
| 2320 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2321 | + | |
| 2322 | + //异位妊娠 | |
| 2323 | + int ywrsCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2324 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*8,.*$")) | |
| 2325 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2326 | + | |
| 2327 | + //死胎死产 | |
| 2328 | + int stscCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2329 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*9,.*$")) | |
| 2330 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2331 | + | |
| 2332 | + //其他 | |
| 2333 | + int qtCount = (int)mongoTemplate.count(new Query(Criteria.where("hospitalId").is(hospitalId) | |
| 2334 | + .and("writeDate").gte(start).lte(end).and("gravidityEnding").regex(Pattern.compile("^.*10,.*$")) | |
| 2335 | + ), LhBabyGravidityEndingTabModel.class); | |
| 2336 | + | |
| 2337 | + datas.add(zrlcCount+yxlcCount+zllcCount+ywrsCount+stscCount+qtCount);//其他不良妊娠结局数量 | |
| 2338 | + datas.add(zrlcCount); | |
| 2339 | + datas.add(yxlcCount); | |
| 2340 | + datas.add(zllcCount); | |
| 2341 | + datas.add(ywrsCount); | |
| 2342 | + datas.add(stscCount); | |
| 2343 | + datas.add(qtCount); | |
| 2344 | + | |
| 2345 | + //3+6+7+8+13 | |
| 2346 | + datas.add(1,datas.get(2)+datas.get(5)+datas.get(6)+datas.get(7)+datas.get(12));//总合计人数 | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(datas); | |
| 2239 | 2350 | } |
| 2240 | 2351 | |
| 2241 | 2352 |