Commit a12d011f9273c5ef89fe3a5730c67fc19eb10b0e

Authored by yangfei
1 parent 6b4475fe49

初诊复诊、查看和修改时返回筛查结果和补充数据

Showing 3 changed files with 120 additions and 82 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ a12d011
... ... @@ -311,6 +311,24 @@
311 311 map.put("highRisk", list);
312 312 }
313 313  
  314 + private void getscreenResult(List<String> screenResult, Map<String, Object> map) {
  315 + BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
  316 + List<Map<String, Object>> list = new ArrayList<>();
  317 + for(String scr:screenResult){
  318 + basicConfigQuery.setId(scr);
  319 + List<BasicConfig> basicConfigs = basicConfigService.queryBasicConfig(basicConfigQuery);
  320 + if (CollectionUtils.isNotEmpty(basicConfigs)) {
  321 + for (BasicConfig basicConfig : basicConfigs) {
  322 + Map<String, Object> scrMap = new HashMap<>();
  323 + scrMap.put("id", basicConfig.getId());
  324 + scrMap.put("name", basicConfig.getName());
  325 + list.add(scrMap);
  326 + }
  327 + }
  328 + }
  329 + map.put("screenResult", list);
  330 + }
  331 +
314 332 /**
315 333 * 导出复诊查询
316 334 *
... ... @@ -1237,6 +1255,8 @@
1237 1255  
1238 1256 //处理高危因素
1239 1257 getRisk(data.getHighrisk(), data.getOtherHighRisk(), map);
  1258 + //完善筛查结果
  1259 + getscreenResult(data.getScreenResult(), map);
1240 1260  
1241 1261 //产检基本信息
1242 1262 map.put("checkDate", DateUtil.getyyyy_MM_dd(data.getCheckTime()));
1243 1263  
... ... @@ -1937,8 +1957,12 @@
1937 1957  
1938 1958 map.put("barCode", data.getBarCode());
1939 1959  
  1960 + //完善高危
1940 1961 getRisk(data.getRiskFactor(), data.getOtherRisk(), map);
1941 1962  
  1963 + //完善筛查结果
  1964 + getscreenResult(data.getScreenResult(), map);
  1965 +
1942 1966 //产检基本信息
1943 1967 map.put("checkDate", DateUtil.getyyyy_MM_dd(data.getCheckDate()));
1944 1968 map.put("currentDueDate", ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckDate()));
1945 1969  
... ... @@ -2010,16 +2034,13 @@
2010 2034 map.put("bp", UnitUtils.unitSplice(ssy + "/" + szy, UnitConstants.MMHG));
2011 2035  
2012 2036 String gongGao = "";
2013   - if (StringUtils.isNotEmpty(data.getGongGaoSelect()) )
2014   - {
  2037 + if (StringUtils.isNotEmpty(data.getGongGaoSelect())) {
2015 2038 if (StringUtils.isNotEmpty(data.getGongGaoType())) {
2016 2039 gongGao = GongJingEnums.getGongGaoNameById(data.getGongGaoSelect()) + "," + GongJingEnums.getHengZhiNameById(data.getGongGaoType());
2017 2040 } else {
2018 2041 gongGao = GongJingEnums.getGongGaoNameById(data.getGongGaoSelect());
2019 2042 }
2020   - }
2021   - else if (StringUtils.isNotEmpty(data.getGongGao()))
2022   - {
  2043 + } else if (StringUtils.isNotEmpty(data.getGongGao())) {
2023 2044 gongGao = UnitUtils.unitSplice(data.getGongGao(), UnitConstants.CM);
2024 2045 }
2025 2046  
... ... @@ -2794,7 +2815,7 @@
2794 2815 }
2795 2816 map.put("diagnosis", diagnosis);
2796 2817 map.put("diagOther", data.getDiagOther());
2797   - if(StringUtils.isEmpty(data.getDiagOther())){
  2818 + if (StringUtils.isEmpty(data.getDiagOther())) {
2798 2819 map.put("diagOther", diagnosis);
2799 2820 }
2800 2821  
... ... @@ -4312,8 +4333,7 @@
4312 4333 patientsQuery.setCardNo(idCard);
4313 4334 patientsQuery.setType(3);
4314 4335  
4315   - if (StringUtils.isNotEmpty(hospitalName))
4316   - {
  4336 + if (StringUtils.isNotEmpty(hospitalName)) {
4317 4337 OrganizationQuery query = new OrganizationQuery();
4318 4338 query.setName(hospitalName.trim());
4319 4339 query.setYn(YnEnums.YES.getId());
4320 4340  
4321 4341  
4322 4342  
... ... @@ -4321,32 +4341,28 @@
4321 4341 if (CollectionUtils.isNotEmpty(organizations)) {
4322 4342 patientsQuery.setHospitalId(String.valueOf(organizations.get(0).getId()));
4323 4343 }
4324   - }
4325   - else
4326   - {
4327   - deliverMap.put("motherinfo",new ArrayList<>());
  4344 + } else {
  4345 + deliverMap.put("motherinfo", new ArrayList<>());
4328 4346 return deliverMap;
4329 4347 }
4330 4348  
4331 4349 List<Map<String, Object>> deliverList = new ArrayList<>();
4332 4350 List<Patients> list = patientsService.queryPatient1(patientsQuery, "created");
4333 4351 if (CollectionUtils.isNotEmpty(list)) {
4334   - for (Patients pat : list)
4335   - {
  4352 + for (Patients pat : list) {
4336 4353  
4337 4354 MatDeliverQuery deliverQuery = new MatDeliverQuery();
4338 4355 deliverQuery.setYn(YnEnums.YES.getId());
4339 4356 deliverQuery.setParentId(pat.getId());
4340 4357 List<MaternalDeliverModel> datas = matDeliverService.query(deliverQuery);
4341   - if (CollectionUtils.isEmpty(datas))
4342   - {
  4358 + if (CollectionUtils.isEmpty(datas)) {
4343 4359 continue;
4344 4360 }
4345 4361  
4346 4362 Map<String, Object> patientMap = new HashMap<>();
4347 4363  
4348   - patientMap.put("mid",pat.getId());//
4349   - patientMap.put("mbuilddate",DateUtil.getyyyy_MM_dd(pat.getBookbuildingDate()));// 建档时间
  4364 + patientMap.put("mid", pat.getId());//
  4365 + patientMap.put("mbuilddate", DateUtil.getyyyy_MM_dd(pat.getBookbuildingDate()));// 建档时间
4350 4366  
4351 4367 String buildHospital = "";
4352 4368 if (StringUtils.isNotEmpty(pat.getHospitalId())) {
4353 4369  
4354 4370  
4355 4371  
4356 4372  
... ... @@ -4355,23 +4371,22 @@
4355 4371 buildHospital = organization.getName();
4356 4372 }
4357 4373 }
4358   - patientMap.put("mbuildhospital",buildHospital);//建档单位
  4374 + patientMap.put("mbuildhospital", buildHospital);//建档单位
4359 4375  
4360   - patientMap.put("mname",pat.getUsername());//母亲姓名
4361   - patientMap.put("mcountry",getBasicConfig(pat.getPcountryId()));//母亲国籍
4362   - patientMap.put("mnation",getBasicConfig(pat.getPnationId()));//母亲民族
4363   - patientMap.put("mbirthday",DateUtil.getyyyy_MM_dd(pat.getBirth()));//母亲出生日期
4364   - patientMap.put("mcardtype",getBasicConfig(pat.getPcerteTypeId()));//母亲证件类型
  4376 + patientMap.put("mname", pat.getUsername());//母亲姓名
  4377 + patientMap.put("mcountry", getBasicConfig(pat.getPcountryId()));//母亲国籍
  4378 + patientMap.put("mnation", getBasicConfig(pat.getPnationId()));//母亲民族
  4379 + patientMap.put("mbirthday", DateUtil.getyyyy_MM_dd(pat.getBirth()));//母亲出生日期
  4380 + patientMap.put("mcardtype", getBasicConfig(pat.getPcerteTypeId()));//母亲证件类型
4365 4381 patientMap.put("mcardnum", pat.getCardNo());//母亲证件号码
4366   - patientMap.put("maddress",CommonsHelper.getResidence(pat.getProvinceId(), pat.getCityId(),
  4382 + patientMap.put("maddress", CommonsHelper.getResidence(pat.getProvinceId(), pat.getCityId(),
4367 4383 pat.getAreaId(), pat.getStreetId(), pat.getAddress(), basicConfigService));//母亲户籍地址
4368 4384  
4369   - if (StringUtils.isNotEmpty(pat.getHusbandName()))
4370   - {
4371   - patientMap.put("fname",StringUtils.isNotEmpty(pat.getHusbandName()) ? pat.getHusbandName() : "");//父亲姓名
  4385 + if (StringUtils.isNotEmpty(pat.getHusbandName())) {
  4386 + patientMap.put("fname", StringUtils.isNotEmpty(pat.getHusbandName()) ? pat.getHusbandName() : "");//父亲姓名
4372 4387  
4373   - patientMap.put("fcountry",getBasicConfig(pat.getHcountryId()));//父亲国籍
4374   - patientMap.put("fnation",getBasicConfig(pat.getHnationId()));//父亲民族
  4388 + patientMap.put("fcountry", getBasicConfig(pat.getHcountryId()));//父亲国籍
  4389 + patientMap.put("fnation", getBasicConfig(pat.getHnationId()));//父亲民族
4375 4390 String fbirthday = "";
4376 4391 if (StringUtils.isNotEmpty(pat.getHcertificateTypeId()) && StringUtils.isNotEmpty(pat.getHcertificateNum()) &&
4377 4392 pat.getHcertificateNum().length() == 18 &&
4378 4393  
4379 4394  
4380 4395  
4381 4396  
... ... @@ -4381,28 +4396,25 @@
4381 4396 fbirthday = DateUtil.getyyyy_MM_dd(date);
4382 4397 }
4383 4398  
4384   - patientMap.put("fbirthday",fbirthday);//父亲出生日期
4385   - patientMap.put("fcardtype",getBasicConfig(pat.getHcertificateTypeId()));//父亲证件类型
  4399 + patientMap.put("fbirthday", fbirthday);//父亲出生日期
  4400 + patientMap.put("fcardtype", getBasicConfig(pat.getHcertificateTypeId()));//父亲证件类型
4386 4401  
4387 4402  
4388   - patientMap.put("fcardnum",StringUtils.isNotEmpty(pat.getHcertificateNum()) ? pat.getHcertificateNum() : "");//父亲证件号码
4389   - patientMap.put("faddress",CommonsHelper.getResidence(pat.getHprovinceRegisterId(), pat.getHcityRegisterId(),
  4403 + patientMap.put("fcardnum", StringUtils.isNotEmpty(pat.getHcertificateNum()) ? pat.getHcertificateNum() : "");//父亲证件号码
  4404 + patientMap.put("faddress", CommonsHelper.getResidence(pat.getHprovinceRegisterId(), pat.getHcityRegisterId(),
4390 4405 pat.getHareaRegisterId(), pat.getHstreetRegisterId(), pat.getHaddressRegister(),
4391 4406 basicConfigService));//父亲户籍地址
  4407 + } else {
  4408 + patientMap.put("fname", "");//父亲姓名
  4409 + patientMap.put("fcountry", "");//父亲国籍
  4410 + patientMap.put("fnation", "");//父亲民族
  4411 + patientMap.put("fbirthday", "");//父亲出生日期
  4412 + patientMap.put("fcardtype", "");//父亲证件类型
  4413 + patientMap.put("fcardnum", "");//父亲证件号码
  4414 + patientMap.put("faddress", "");//父亲户籍地址
4392 4415 }
4393   - else
4394   - {
4395   - patientMap.put("fname","");//父亲姓名
4396   - patientMap.put("fcountry","");//父亲国籍
4397   - patientMap.put("fnation","");//父亲民族
4398   - patientMap.put("fbirthday","");//父亲出生日期
4399   - patientMap.put("fcardtype","");//父亲证件类型
4400   - patientMap.put("fcardnum","");//父亲证件号码
4401   - patientMap.put("faddress","");//父亲户籍地址
4402   - }
4403 4416  
4404 4417  
4405   -
4406 4418 Organization organization = null;
4407 4419 String fmHospital = "";
4408 4420 if (StringUtils.isNotEmpty(datas.get(0).getFmHospital())) {
4409 4421  
4410 4422  
4411 4423  
4412 4424  
4413 4425  
... ... @@ -4426,36 +4438,28 @@
4426 4438 Users users = usersService.getUsers(Integer.parseInt(datas.get(0).getDeliverDoctor()));
4427 4439 if (users != null && users.getYn() == YnEnums.YES.getId()) {
4428 4440 deliverDoctor = users.getName();
4429   - }
4430   - else
4431   - {
  4441 + } else {
4432 4442 deliverDoctor = datas.get(0).getDeliverDoctor();
4433 4443 }
4434 4444 } else {
4435 4445 deliverDoctor = datas.get(0).getDeliverDoctor();
4436 4446 }
4437 4447 }
4438   - patientMap.put("doctor",deliverDoctor);//接生人
  4448 + patientMap.put("doctor", deliverDoctor);//接生人
4439 4449 MaternalDeliverModel data = datas.get(0);
4440 4450  
4441 4451 String place = ""; //1 "住院" : "其他
4442   - if (data.getFmType() != null && "1".equals(data.getFmType()))
4443   - {
4444   - if (fmHospital.contains("妇幼"))
4445   - {
  4452 + if (data.getFmType() != null && "1".equals(data.getFmType())) {
  4453 + if (fmHospital.contains("妇幼")) {
4446 4454 place = "妇幼保健院";
4447   - }
4448   - else
4449   - {
  4455 + } else {
4450 4456 place = "医院";
4451 4457 }
4452   - }
4453   - else
4454   - {
  4458 + } else {
4455 4459 place = "其他";
4456 4460 }
4457 4461  
4458   - patientMap.put("place",place);//出生地点分类
  4462 + patientMap.put("place", place);//出生地点分类
4459 4463  
4460 4464 List babyList = new ArrayList();
4461 4465  
4462 4466  
... ... @@ -4476,13 +4480,10 @@
4476 4480 Integer week = 0;
4477 4481 Integer day = 0;
4478 4482 Map<String, Object> dueMap = data.getHandDueWeek();
4479   - if (dueMap != null && dueMap.size() > 0 && dueMap.get("week") != null && !"".equals(dueMap.get("week")))
4480   - {
4481   - week = (dueMap.get("week") == null || "".equals(dueMap.get("week")) ) ? 0 : Integer.parseInt(String.valueOf(dueMap.get("week")));
  4483 + if (dueMap != null && dueMap.size() > 0 && dueMap.get("week") != null && !"".equals(dueMap.get("week"))) {
  4484 + week = (dueMap.get("week") == null || "".equals(dueMap.get("week"))) ? 0 : Integer.parseInt(String.valueOf(dueMap.get("week")));
4482 4485 day = (dueMap.get("day") == null || "".equals(dueMap.get("day"))) ? 0 : Integer.parseInt(String.valueOf(dueMap.get("day")));
4483   - }
4484   - else
4485   - {
  4486 + } else {
4486 4487 Integer betweenDay = DateUtil.getDays(pat.getLastMenses(), data.getDueDate1());
4487 4488 week = betweenDay / 7;
4488 4489 day = betweenDay % 7;
... ... @@ -4498,7 +4499,7 @@
4498 4499 map.put("babybirthday", DateUtil.getyyyy_MM_dd(fmDate));
4499 4500  
4500 4501 //新生儿出生日期 小时
4501   - map.put("babybirthdayhour",hh.format(fmDate));
  4502 + map.put("babybirthdayhour", hh.format(fmDate));
4502 4503  
4503 4504 //新生儿出生日期 分
4504 4505 map.put("babybirthdayminute", mm.format(fmDate));
... ... @@ -4511,8 +4512,7 @@
4511 4512 String babyprovince = "";
4512 4513 String babycity = "";
4513 4514 String babydistrict = "";
4514   - if (organization != null)
4515   - {
  4515 + if (organization != null) {
4516 4516 babyprovince = getBasicConfig(organization.getProvinceId());
4517 4517 babycity = getBasicConfig(organization.getCityId());
4518 4518 babydistrict = getBasicConfig(organization.getAreaId());
4519 4519  
4520 4520  
... ... @@ -4528,16 +4528,11 @@
4528 4528 map.put("babydistrict", babydistrict);
4529 4529  
4530 4530 String babyState = "";
4531   - if (baby.getDeformity() != null && baby.getDeformity() == 1)
4532   - {
  4531 + if (baby.getDeformity() != null && baby.getDeformity() == 1) {
4533 4532 babyState = "差";
4534   - }
4535   - else if (StringUtils.isNotEmpty(baby.getBabyHealthy()) && !"健康".equals(baby.getBabyHealthy()))
4536   - {
  4533 + } else if (StringUtils.isNotEmpty(baby.getBabyHealthy()) && !"健康".equals(baby.getBabyHealthy())) {
4537 4534 babyState = "一般";
4538   - }
4539   - else
4540   - {
  4535 + } else {
4541 4536 babyState = "良好";
4542 4537 }
4543 4538  
... ... @@ -4559,11 +4554,9 @@
4559 4554 deliverList.add(patientMap);
4560 4555 }
4561 4556 }
4562   - deliverMap.put("motherinfo",deliverList);
4563   - }
4564   - catch (Exception e)
4565   - {
4566   - System.out.println(e.getMessage()+"出生医学接口异常");
  4557 + deliverMap.put("motherinfo", deliverList);
  4558 + } catch (Exception e) {
  4559 + System.out.println(e.getMessage() + "出生医学接口异常");
4567 4560 }
4568 4561  
4569 4562 return deliverMap;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java View file @ a12d011
... ... @@ -59,7 +59,27 @@
59 59 * 胎动备注
60 60 */
61 61 private String quickenRemark;
  62 + //筛查结果
  63 + private List<String> screenResult;
  64 + //结果补充
  65 + private String resultSupple;
62 66  
  67 + public List<String> getScreenResult() {
  68 + return screenResult;
  69 + }
  70 +
  71 + public void setScreenResult(List<String> screenResult) {
  72 + this.screenResult = screenResult;
  73 + }
  74 +
  75 + public String getResultSupple() {
  76 + return resultSupple;
  77 + }
  78 +
  79 + public void setResultSupple(String resultSupple) {
  80 + this.resultSupple = resultSupple;
  81 + }
  82 +
63 83 public List getmHighRiskReason() {
64 84 return mHighRiskReason;
65 85 }
... ... @@ -566,6 +586,8 @@
566 586  
567 587 @Override
568 588 public AntenatalExaminationResult convertToResult(AntenatalExaminationModel destModel) {
  589 + setResultSupple(destModel.getResultSupple());
  590 + setScreenResult(destModel.getScreenResult());
569 591 setTtita(destModel.getTtita());
570 592 setTotalThy(destModel.getTotalThy());
571 593 setFtita(destModel.getFtita());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ a12d011
... ... @@ -82,6 +82,27 @@
82 82 */
83 83 private String quickenRemark;
84 84  
  85 + //筛查结果
  86 + private List<String> screenResult;
  87 + //结果补充
  88 + private String resultSupple;
  89 +
  90 + public List<String> getScreenResult() {
  91 + return screenResult;
  92 + }
  93 +
  94 + public void setScreenResult(List<String> screenResult) {
  95 + this.screenResult = screenResult;
  96 + }
  97 +
  98 + public String getResultSupple() {
  99 + return resultSupple;
  100 + }
  101 +
  102 + public void setResultSupple(String resultSupple) {
  103 + this.resultSupple = resultSupple;
  104 + }
  105 +
85 106 public String getQuicken() {
86 107 return quicken;
87 108 }
... ... @@ -1540,6 +1561,8 @@
1540 1561  
1541 1562 public AntexChuResult convertToResult(AntExChuModel antExChuModel) {
1542 1563 if (null != antExChuModel) {
  1564 + setScreenResult(antExChuModel.getScreenResult());
  1565 + setResultSupple(antExChuModel.getResultSupple());
1543 1566 setTtita(antExChuModel.getTtita());
1544 1567 setTotalThy(antExChuModel.getTotalThy());
1545 1568 setFtita(antExChuModel.getFtita());